Section 1
//ExplosionLayer (boxhead.assets.render.ExplosionLayer)
package boxhead.assets.render {
import flash.display.*;
import flash.geom.*;
public class ExplosionLayer extends MovieClip {
protected var dPos:Point;
protected var dRot:Number;
protected var dScale:Number;
protected static const dScaleSpeed:Number = 0.1;
protected static const dDecay:Number = 0.99;
public function ExplosionLayer(){
stop();
blendMode = "add";
rotation = (Math.random() * 360);
scaleX = (scaleY = (0.5 + (Math.random() * 0.5)));
dRot = (Math.random() - 0.5);
dScale = ((Math.random() * 0.4) + 1.6);
dPos = Point.polar((8 + (Math.random() * 4)), ((Math.random() * Math.PI) * 2));
dPos.y = (dPos.y * (Constants.CELL_HEIGHT / Constants.CELL_WIDTH));
}
public function get finished():Boolean{
return ((currentFrame == totalFrames));
}
public function process():void{
rotation = (rotation + dRot);
scaleX = (scaleX + ((dScale - scaleX) * dScaleSpeed));
scaleY = scaleX;
x = (x + dPos.x);
y = (y + dPos.y);
dRot = (dRot * 1.1);
dPos.normalize((dPos.length * dDecay));
dPos.y = (dPos.y - 0.25);
nextFrame();
}
}
}//package boxhead.assets.render
Section 2
//ExplosionRenderer (boxhead.assets.render.ExplosionRenderer)
package boxhead.assets.render {
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.display.*;
public class ExplosionRenderer {
protected var container:Sprite;
protected var layers:Array;
protected var frames:Array;
protected var wrapper:Sprite;
protected var layersSpawned:int;// = 0
protected var frameTime:int;// = 0
protected static const NUM_LAYERS:int = 10;
public static var displays:Array = new Array();
public static var finished:Boolean = false;
public function ExplosionRenderer(){
var _local1:*;
var _local2:*;
super();
layers = new Array();
container = new Sprite();
container.scaleX = (container.scaleY = 0.08);
wrapper = new Sprite();
wrapper.addChild(container);
frames = new Array();
do {
_local1 = 0;
while (_local1 < 5) {
advance();
_local1++;
};
_local2 = renderFrame();
if (_local2){
frames.push(_local2);
};
} while (((layers.length) || (!(layersSpawned))));
}
protected function advance():void{
var _local2:ExplosionLayer;
if ((((layersSpawned < NUM_LAYERS)) && ((Math.random() > 0.5)))){
addLayer();
};
var _local1:int = (layers.length - 1);
while (_local1 >= 0) {
_local2 = layers[_local1];
_local2.process();
if (_local2.finished){
container.removeChild(_local2);
layers[_local1] = layers[(layers.length - 1)];
layers.pop();
};
_local1--;
};
}
protected function addLayer():void{
var _local1:ExplosionLayer = new ExplosionLayer();
layers.push(_local1);
container.addChildAt(_local1, 0);
layersSpawned++;
}
public function getFrames():Array{
return (frames.slice());
}
protected function renderFrame():ThingSprite{
if (!container.numChildren){
return (null);
};
var _local1:Rectangle = wrapper.getBounds(wrapper);
var _local2:BitmapData = new BitmapData(Math.ceil(_local1.width), Math.ceil(_local1.height), true, 0);
_local2.draw(wrapper, new Matrix(1, 0, 0, 1, -(_local1.x), -(_local1.y)));
return (new ThingSprite(_local2, _local1.topLeft));
}
public static function advance():void{
displays.push(new (ExplosionRenderer).getFrames());
finished = (displays.length >= 5);
}
}
}//package boxhead.assets.render
Section 3
//FireLayer (boxhead.assets.render.FireLayer)
package boxhead.assets.render {
import flash.display.*;
import flash.geom.*;
public class FireLayer extends MovieClip {
protected var dPos:Point;
protected var dRot:Number;
protected var dScale:Number;
protected static const dScaleSpeed:Number = 0.1;
protected static const dDecay:Number = 0.99;
public function FireLayer(){
stop();
blendMode = "add";
rotation = (Math.random() * 360);
scaleX = (scaleY = (0.5 + (Math.random() * 0.5)));
dRot = (Math.random() - 0.5);
dScale = ((Math.random() * 0.4) + 1.6);
dPos = new Point(((Math.random() * 16) - 8), -50);
dPos.y = (dPos.y * (Constants.CELL_HEIGHT / Constants.CELL_WIDTH));
}
public function get finished():Boolean{
return ((currentFrame == totalFrames));
}
public function process():void{
rotation = (rotation + dRot);
scaleX = (scaleX + ((dScale - scaleX) * dScaleSpeed));
scaleY = scaleX;
x = (x + dPos.x);
y = (y + dPos.y);
dRot = (dRot * 1.1);
dPos.normalize((dPos.length * dDecay));
dPos.y = (dPos.y - 0.5);
nextFrame();
}
}
}//package boxhead.assets.render
Section 4
//FireRenderer (boxhead.assets.render.FireRenderer)
package boxhead.assets.render {
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.display.*;
public class FireRenderer {
protected var container:Sprite;
protected var layers:Array;
protected var frames:Array;
protected var addTime:int;// = 4
protected var wrapper:Sprite;
protected var layersSpawned:int;// = 0
protected var frameTime:int;// = 0
protected static const ADD_TIME:int = 4;
protected static const NUM_LAYERS:int = 10;
public static var displays:Array = [[], [], []];
public static var finished:Boolean = false;
public function FireRenderer(_arg1:int){
var _local2:*;
var _local3:*;
super();
layers = new Array();
container = new Sprite();
container.scaleX = (container.scaleY = (0.014 + (0.002 * _arg1)));
wrapper = new Sprite();
wrapper.addChild(container);
frames = new Array();
do {
_local2 = 0;
while (_local2 < 5) {
advance();
_local2++;
};
_local3 = renderFrame();
if (_local3){
frames.push(_local3);
};
} while (((layers.length) || (!(layersSpawned))));
}
public function getFrames():Array{
return (frames.slice());
}
protected function advance():void{
var _local2:FireLayer;
if (layersSpawned < NUM_LAYERS){
addTime--;
if (!addTime){
addTime = ADD_TIME;
addLayer();
};
};
var _local1:int = (layers.length - 1);
while (_local1 >= 0) {
_local2 = layers[_local1];
_local2.process();
if (_local2.finished){
container.removeChild(_local2);
layers[_local1] = layers[(layers.length - 1)];
layers.pop();
};
_local1--;
};
}
protected function addLayer():void{
var _local1:FireLayer = new FireLayer();
layers.push(_local1);
container.addChildAt(_local1, 0);
layersSpawned++;
}
protected function renderFrame():ThingSprite{
if (!container.numChildren){
return (null);
};
var _local1:Rectangle = wrapper.getBounds(wrapper);
var _local2:BitmapData = new BitmapData(Math.ceil(_local1.width), Math.ceil(_local1.height), true, 0);
_local2.draw(wrapper, new Matrix(1, 0, 0, 1, -(_local1.x), -(_local1.y)));
return (new ThingSprite(_local2, _local1.topLeft));
}
public static function advance():void{
var _local1:int;
while (_local1 < 3) {
if (displays[_local1].length < 4){
displays[_local1].push(new FireRenderer(_local1).getFrames());
return;
};
_local1++;
};
finished = true;
}
}
}//package boxhead.assets.render
Section 5
//SmokePuffLayer (boxhead.assets.render.SmokePuffLayer)
package boxhead.assets.render {
import flash.display.*;
import flash.geom.*;
public class SmokePuffLayer extends MovieClip {
protected var dPos:Point;
protected var dRot:Number;
protected var dScale:Number;
protected var frameSkip:int;// = 0
protected static const dScaleSpeed:Number = 0.002;
protected static const dDecay:Number = 0.99;
public function SmokePuffLayer(){
stop();
transform.colorTransform = new ColorTransform(0, 0, 0, 1, 0xFF, 0xFF, 0xFF);
blendMode = "add";
rotation = (Math.random() * 360);
scaleX = (scaleY = (0.5 + (Math.random() * 0.5)));
dRot = ((Math.random() - 0.5) * 0.3);
dScale = ((Math.random() * 0.4) + 10.6);
dPos = Point.polar((1 + (Math.random() * 1)), ((Math.random() * Math.PI) * 2));
dPos.y = (dPos.y * (Constants.CELL_HEIGHT / Constants.CELL_WIDTH));
}
public function get finished():Boolean{
return ((currentFrame == totalFrames));
}
public function process():void{
rotation = (rotation + dRot);
scaleX = (scaleX + ((dScale - scaleX) * dScaleSpeed));
scaleY = scaleX;
x = (x + dPos.x);
y = (y + dPos.y);
dRot = (dRot * 1.01);
dPos.normalize((dPos.length * dDecay));
dPos.y = (dPos.y - 0.4);
frameSkip++;
if (frameSkip > 3){
frameSkip = 0;
nextFrame();
};
}
}
}//package boxhead.assets.render
Section 6
//SmokePuffRenderer (boxhead.assets.render.SmokePuffRenderer)
package boxhead.assets.render {
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.display.*;
public class SmokePuffRenderer {
protected var container:Sprite;
protected var layers:Array;
protected var frames:Array;
protected var wrapper:Sprite;
protected var layersSpawned:int;// = 0
protected var frameTime:int;// = 0
protected static const NUM_LAYERS:int = 2;
public static var displays:Array = new Array();
public static var finished:Boolean = false;
public function SmokePuffRenderer(){
var _local1:*;
var _local2:*;
super();
layers = new Array();
container = new Sprite();
container.scaleX = (container.scaleY = 0.01);
wrapper = new Sprite();
wrapper.addChild(container);
frames = new Array();
do {
_local1 = 0;
while (_local1 < 5) {
advance();
_local1++;
};
_local2 = renderFrame();
if (_local2){
frames.push(_local2);
};
} while (((layers.length) || (!(layersSpawned))));
}
protected function advance():void{
var _local2:SmokePuffLayer;
if ((((layersSpawned < NUM_LAYERS)) && ((Math.random() > 0.5)))){
addLayer();
};
var _local1:int = (layers.length - 1);
while (_local1 >= 0) {
_local2 = layers[_local1];
_local2.process();
if (_local2.finished){
container.removeChild(_local2);
layers[_local1] = layers[(layers.length - 1)];
layers.pop();
};
_local1--;
};
}
protected function addLayer():void{
var _local1:SmokePuffLayer = new SmokePuffLayer();
layers.push(_local1);
container.addChildAt(_local1, 0);
layersSpawned++;
}
public function getFrames():Array{
return (frames.slice());
}
protected function renderFrame():ThingSprite{
if (!container.numChildren){
return (null);
};
var _local1:Rectangle = wrapper.getBounds(wrapper);
var _local2:BitmapData = new BitmapData(Math.ceil(_local1.width), Math.ceil(_local1.height), true, 0);
_local2.draw(wrapper, new Matrix(1, 0, 0, 1, -(_local1.x), -(_local1.y)));
return (new ThingSprite(_local2, _local1.topLeft));
}
public static function advance():void{
displays.push(new (SmokePuffRenderer).getFrames());
finished = (displays.length >= 5);
}
}
}//package boxhead.assets.render
Section 7
//AssetLoader (boxhead.assets.AssetLoader)
package boxhead.assets {
import flash.events.*;
import MMOcha.server.*;
import flash.net.*;
import boxhead.world.*;
import flash.display.*;
import flash.system.*;
import flash.utils.*;
public class AssetLoader extends EventDispatcher {
private var _started:Boolean;// = false
private var xmlLoader:URLLoader;
private var assetProgress:Number;// = 0
private var _finished:Boolean;// = false
private var loader:Loader;
private var prerenderTimer:Timer;
private var _premiumsReceived:Boolean;// = false
private var premiumsRequest:DatabaseRequest;
private var _dispatched:Boolean;// = false
private var _xmlLoaded:Boolean;// = false
private var _mapsReceived:Boolean;// = false
private var mapsRequest:DatabaseRequest;
protected static const CONSTANTS_URL:String = "http://www.boxheadbounty.com/boxhead-bounty-hunter-lite/Constants.xml";
private static var GraphicAssets:Class = AssetLoader_GraphicAssets;
public function AssetLoader(){
loader = new Loader();
xmlLoader = new URLLoader();
}
private function get loaded():int{
if (!_started){
return (0);
};
return (loader.contentLoaderInfo.bytesLoaded);
}
private function get total():int{
if (!_started){
return (0);
};
return (loader.contentLoaderInfo.bytesTotal);
}
protected function premiumListReceived(_arg1:DatabaseEvent):void{
premiumsRequest.removeEventListener(DatabaseEvent.PREMIUM_MASTER_LIST, premiumListReceived);
premiumsRequest = null;
if (_arg1.error){
Debug.error("Could not retrieve premiums list. Retrying...");
getPremiumList();
return;
};
Premium.readMasterList((_arg1.data as XMLList));
_premiumsReceived = true;
xmlLoader.load(new URLRequest(CONSTANTS_URL));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoadComplete);
checkFinished();
}
protected function advancePrerender(_arg1:Event):void{
Prerender.advance();
if (Prerender.finished){
prerenderTimer.removeEventListener(TimerEvent.TIMER, advancePrerender);
prerenderTimer.stop();
prerenderTimer = null;
checkFinished();
};
}
protected function checkFinished():void{
if (((finished) && (!(_dispatched)))){
_dispatched = true;
dispatchEvent(new Event(Event.COMPLETE));
};
}
protected function getPremiumList():void{
premiumsRequest = new DatabaseRequest(DatabaseRequest.PREMIUM_MASTER_LIST);
premiumsRequest.addEventListener(DatabaseEvent.PREMIUM_MASTER_LIST, premiumListReceived);
}
protected function getMapList():void{
mapsRequest = new DatabaseRequest(DatabaseRequest.MAP_LIST, MapInfo.BOUNTY_ACCOUNT);
mapsRequest.addEventListener(DatabaseEvent.MAP_LIST, mapListReceived);
}
public function begin(_arg1:Boolean=true):void{
if (_started){
return;
};
var _local2:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
loader.loadBytes(new GraphicAssets(), _local2);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
if (_arg1){
getMapList();
getPremiumList();
} else {
_mapsReceived = true;
_premiumsReceived = true;
xmlLoader.load(new URLRequest(CONSTANTS_URL));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoadComplete);
};
_started = true;
}
protected function mapListReceived(_arg1:DatabaseEvent):void{
var _local5:XML;
var _local6:int;
mapsRequest.removeEventListener(DatabaseEvent.MAP_LIST, mapListReceived);
mapsRequest = null;
if (_arg1.error){
Debug.error("Could not retrieve map list. Retrying...");
getMapList();
return;
};
var _local2:XMLList = (_arg1.data as XMLList);
var _local3 = "";
var _local4:Array = new Array();
for each (_local5 in _local2.map) {
_local6 = parseInt(_local5.attribute("slot_id"));
_local4[_local6] = new MapInfo(_local6, _local5["name"].toString());
};
MapInfo.mapList = _local4;
_mapsReceived = true;
checkFinished();
}
protected function loaderComplete(_arg1:Event):void{
_arg1.target.removeEventListener(Event.COMPLETE, loaderComplete);
AssetPool.readAssets(loader.contentLoaderInfo);
_finished = true;
prerenderTimer = new Timer(100);
prerenderTimer.addEventListener(TimerEvent.TIMER, advancePrerender);
prerenderTimer.start();
}
public function get finished():Boolean{
return (((((((((_finished) && (_xmlLoaded))) && (_mapsReceived))) && (_premiumsReceived))) && (Prerender.finished)));
}
public function get progress():Number{
if (_finished){
return (1);
};
if (!_started){
return (0);
};
return ((loaded / total));
}
protected function xmlLoadComplete(_arg1:Event):void{
XMLConstants.readXML(new XML(_arg1.target.data));
_xmlLoaded = true;
checkFinished();
}
}
}//package boxhead.assets
Section 8
//AssetLoader_GraphicAssets (boxhead.assets.AssetLoader_GraphicAssets)
package boxhead.assets {
import mx.core.*;
public class AssetLoader_GraphicAssets extends ByteArrayAsset {
}
}//package boxhead.assets
Section 9
//AssetPool (boxhead.assets.AssetPool)
package boxhead.assets {
import flash.display.*;
public class AssetPool {
public static var pool:Object = {};
private static function get nameList():Array{
var _local1:int;
var _local3:String;
var _local4:String;
var _local2:Array = ["Crate1", "Crate2", "Crate_Shadow", "Rock1", "Rock1_Shadow", "Rock2", "Rock2_Shadow", "Tree1", "Tree1_Shadow", "Tree2", "Tree2_Shadow", "WallPost", "WallPost_Shadow", "WallHorizontal", "WallHorizontal_Shadow", "WallVertical", "WallVertical_Shadow", "Mailbox0", "Mailbox1", "Mailbox2", "Mailbox3", "Mailbox_Shadow0", "Mailbox_Shadow1", "FireHydrant0", "FireHydrant1", "FireHydrant_Shadow", "TrashCan0", "TrashCan1", "TrashCan2", "TrashCan_Shadow", "Fence1", "Fence2", "Fence3", "Fence4", "Fence6", "Fence7", "Fence8", "Fence9", "Fence_Shadow1", "Fence_Shadow2", "Fence_Shadow3", "Fence_Shadow4", "Fence_Shadow7", "Fence_Shadow9", "StoneWall1", "BrickWall1", "BrickWall2", "BrickWall3", "BrickWall_Shadow1", "BrickWall_Shadow2", "BrickWall_Shadow3", "Factory1", "Factory2", "Factory3", "Factory4", "Factory5", "Factory6", "Factory_Shadow1", "Factory_Shadow2", "Factory_Shadow3", "Barrel1", "Barrel2", "Barrel3", "Barrel_Shadow", "Barricade1", "Barricade2", "Barricade3", "Barricade_Shadow", "TurretMG", "TurretMGCustom", "TurretMortar", "TurretMortarCustom", "Turret_Shadow", "ChargePack1", "ChargePack2", "ChargePack3", "ChargePack4", "AirstrikeBeacon", "AirstrikeBeaconLight1", "AirstrikeBeaconLight2", "Claymore", "ClaymoreLight1", "ClaymoreLight2", "MuzzleFlashLarge1", "MuzzleFlashLarge2", "MuzzleFlashSmall1", "MuzzleFlashSmall2", "MuzzleFlashRailgun", "MuzzleFlashTurret1", "ShellCasing1", "ShotgunShell", "Scorch1", "Scorch2", "Scorch3", "ScorchCell1", "ScorchCell2", "ScorchCell3", "PlasmaBallExplosion", "MortarShell", "Grenade_Projectile1", "Grenade_Projectile2", "Grenade_Shadow", "LaunchGrenade", "PlasmaBall", "PlasmaBall_Shadow", "BountyCrate", "RedBountyCrate", "GoldBountyCrate", "BountyCrate_Shadow"];
for each (_local3 in ["AkimboPistols", "AkimboUzis", "Pistol", "Shotgun", "Minigun", "MinigunSpin", "Flamer", "FlamerBackpack", "Magnum", "AK47", "M16", "Rifle", "Railgun", "RailgunLit", "Wrench"]) {
_local2.push((_local3 + "Color"));
_local2.push((_local3 + "Alpha"));
};
_local2.push("Railgun");
_local2.push("RailgunLit");
_local2.push("Grenade");
_local2.push("ChargePackHeld");
_local2.push("Detonator");
_local2.push("AirstrikeBeaconHeld");
_local2.push("ClaymoreHeld");
_local2.push("PDA");
_local2.push("GrenadeLauncher");
_local2.push("PlasmaCannon");
_local2.push("PlasmaCannonLit");
for each (_local4 in ["Bond", "Bambo", "GI", "Swat", "Ninja", "Croft", "Bride", "Cop", "Mummy", "Zombie", "Vampire", "Devil"]) {
_local2.push((_local4 + "BodyColor"));
_local2.push((_local4 + "BodyAlpha"));
_local2.push((_local4 + "BodyCustomColor"));
_local2.push((_local4 + "BodyCustomAlpha"));
_local2.push((_local4 + "HeadColor"));
_local2.push((_local4 + "HeadAlpha"));
_local2.push((_local4 + "HeadCustomColor"));
_local2.push((_local4 + "HeadCustomAlpha"));
};
_local2.push("MaleBodyCustomAlpha");
_local2.push("MaleHeadCustomAlpha");
_local2.push("CapHeadCustomAlpha");
_local2.push("Character_Shadow");
_local1 = 1;
while (_local1 <= 15) {
_local2.push(("Car" + _local1));
_local1++;
};
_local2.push("Car_Shadow1");
_local2.push("Car_Shadow7");
_local2.push("Car_Shadow10");
_local2.push("Car_Shadow13");
_local1 = 1;
while (_local1 <= 9) {
_local2.push(("CastleWall" + _local1));
_local1++;
};
_local2.push("CastleWall_Shadow1");
_local2.push("CastleWall_Shadow2");
_local2.push("CastleWall_Shadow4");
_local2.push("CastleWall_Shadow6");
_local2.push("CastleWall_Shadow8");
_local2.push("CastleWall_Shadow9");
_local1 = 1;
while (_local1 <= 2) {
_local2.push(("StoreFrontSmall" + _local1));
_local1++;
};
_local1 = 1;
while (_local1 <= 4) {
_local2.push(("StoreFrontLarge" + _local1));
_local1++;
};
_local2.push("StoreFrontRoof");
_local2.push("StoreFrontSmall_Shadow1");
_local2.push("StoreFrontSmall_Shadow2");
_local2.push("StoreFrontLarge_Shadow");
return (_local2);
}
public static function readAssets(_arg1:LoaderInfo):void{
var _local3:String;
var _local4:Class;
var _local2:Class = (_arg1.applicationDomain.getDefinition("AssetsMain") as Class);
for each (_local3 in nameList) {
_local4 = _local2[_local3];
if (_local4){
pool[_local3] = new (_local4).bitmapData;
};
};
}
}
}//package boxhead.assets
Section 10
//Assets (boxhead.assets.Assets)
package boxhead.assets {
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import boxhead.world.thing.display.*;
import flash.utils.*;
public class Assets {
private static const TreeSprite:Class = Assets_TreeSprite;
protected static const SHADOW_BLUR:BlurFilter = new BlurFilter(2, 2, 1);
private static const CharacterSprite:Class = Assets_CharacterSprite;
protected static const DROP_SHADOW:DropShadowFilter = new DropShadowFilter(3, 45, 0, 0.7, 2, 2, 1, 1);
public static var characterFilter:ColorMatrixFilter;
private static var storage:Dictionary = new Dictionary();
public static var treeFilters:Array;
private static function processShadow(_arg1:ThingSprite):ThingSprite{
var _local2:BitmapData = _arg1.bitmapData;
var _local3:Rectangle = _local2.generateFilterRect(_local2.rect, SHADOW_BLUR);
var _local4:BitmapData = new BitmapData(_local3.width, _local3.height, true, 0);
_local4.copyChannel(_local2, _local2.rect, new Point(-(_local3.x), -(_local3.y)), BitmapDataChannel.RED, BitmapDataChannel.ALPHA);
_local4.applyFilter(_local4, _local4.rect, new Point(0, 0), DROP_SHADOW);
_arg1.bitmapData = _local4;
_local2.dispose();
var _local5:Point = _arg1.getOffset();
_arg1.getOffset().x = (_local5.x + _local3.x);
_local5.y = (_local5.y + _local3.y);
return (_arg1);
}
public static function lookup(_arg1:String):ThingDisplay{
var _local3:int;
var _local4:ThingClip;
var _local5:BitmapData;
var _local2:ThingDisplay = storage[_arg1];
if (_local2){
return (_local2);
};
_local2 = null;
switch (_arg1){
default:
break;
case "Character_Shadow":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local5 = _local2.bitmapData;
_local2.bitmapData.applyFilter(_local2.bitmapData, _local5.rect, new Point(0, 0), SHADOW_BLUR);
_local4.addFrame(new Rectangle(311, 3, 29, 25), new Point(-10, -3));
_local4.addFrame(new Rectangle(457, 187, 30, 29), new Point(-11, -6));
_local4.addFrame(new Rectangle(614, 63, 30, 28), new Point(-11, -5));
_local4.addFrame(new Rectangle(441, 3, 30, 26), new Point(-11, -3));
_local4.addFrame(new Rectangle(650, 63, 30, 28), new Point(-11, -5));
_local4.addFrame(new Rectangle(493, 187, 30, 29), new Point(-11, -6));
_local4.addFrame(new Rectangle(686, 63, 30, 28), new Point(-11, -5));
_local4.addFrame(new Rectangle(762, 3, 30, 27), new Point(-11, -4));
_local4.addFrame(new Rectangle(722, 63, 30, 28), new Point(-11, -5));
_local4.addFrame(new Rectangle(492, 350, 28, 32), new Point(-9, -3));
_local4.addFrame(new Rectangle(364, 494, 28, 36), new Point(-9, -6));
_local4.addFrame(new Rectangle(654, 456, 28, 35), new Point(-9, -5));
_local4.addFrame(new Rectangle(526, 350, 28, 32), new Point(-9, -3));
_local4.addFrame(new Rectangle(294, 456, 28, 34), new Point(-9, -5));
_local4.addFrame(new Rectangle(688, 456, 28, 35), new Point(-9, -6));
_local4.addFrame(new Rectangle(328, 456, 28, 34), new Point(-9, -5));
_local4.addFrame(new Rectangle(121, 420, 28, 33), new Point(-9, -4));
_local4.addFrame(new Rectangle(362, 456, 28, 34), new Point(-9, -5));
_local4.addFrame(new Rectangle(49, 316, 28, 31), new Point(-10, -3));
_local4.addFrame(new Rectangle(722, 456, 28, 35), new Point(-10, -6));
_local4.addFrame(new Rectangle(155, 420, 28, 33), new Point(-10, -5));
_local4.addFrame(new Rectangle(83, 316, 28, 31), new Point(-10, -3));
_local4.addFrame(new Rectangle(189, 420, 28, 33), new Point(-10, -5));
_local4.addFrame(new Rectangle(223, 420, 27, 33), new Point(-9, -6));
_local4.addFrame(new Rectangle(560, 350, 28, 32), new Point(-10, -5));
_local4.addFrame(new Rectangle(594, 350, 27, 32), new Point(-10, -4));
_local4.addFrame(new Rectangle(0x0100, 420, 28, 33), new Point(-10, -5));
_local4.addFrame(new Rectangle(627, 350, 28, 32), new Point(-9, -3));
_local4.addFrame(new Rectangle(398, 494, 28, 36), new Point(-9, -6));
_local4.addFrame(new Rectangle(756, 456, 28, 35), new Point(-9, -5));
_local4.addFrame(new Rectangle(661, 350, 28, 32), new Point(-9, -3));
_local4.addFrame(new Rectangle(3, 494, 28, 35), new Point(-9, -5));
_local4.addFrame(new Rectangle(432, 494, 28, 36), new Point(-9, -6));
_local4.addFrame(new Rectangle(37, 494, 28, 35), new Point(-9, -5));
_local4.addFrame(new Rectangle(290, 420, 28, 33), new Point(-9, -4));
_local4.addFrame(new Rectangle(396, 456, 28, 34), new Point(-9, -5));
_local4.addFrame(new Rectangle(162, 3, 50, 24), new Point(-19, -2));
_local4.addFrame(new Rectangle(3, 33, 42, 27), new Point(-12, -4));
_local4.addFrame(new Rectangle(218, 3, 39, 24), new Point(-12, -3));
_local4.addFrame(new Rectangle(3, 3, 35, 20), new Point(-11, -3));
_local4.addFrame(new Rectangle(217, 283, 33, 30), new Point(-12, -18));
_local4.addFrame(new Rectangle(531, 534, 31, 39), new Point(-16, -25));
_local4.addFrame(new Rectangle(758, 63, 29, 28), new Point(-11, -4));
_local4.addFrame(new Rectangle(117, 316, 31, 31), new Point(-13, -6));
_local4.addFrame(new Rectangle(0x0100, 283, 30, 30), new Point(-12, -6));
_local4.addFrame(new Rectangle(529, 187, 27, 29), new Point(-10, -5));
_local4.addFrame(new Rectangle(695, 350, 27, 32), new Point(-10, -8));
_local4.addFrame(new Rectangle(728, 350, 30, 32), new Point(-13, -8));
_local4.addFrame(new Rectangle(764, 350, 29, 32), new Point(-12, -8));
_local4.addFrame(new Rectangle(3, 94, 27, 28), new Point(-10, -4));
_local4.addFrame(new Rectangle(292, 283, 29, 30), new Point(-11, -6));
_local4.addFrame(new Rectangle(477, 3, 35, 26), new Point(-17, -3));
_local4.addFrame(new Rectangle(562, 187, 36, 29), new Point(-18, -5));
_local4.addFrame(new Rectangle(36, 94, 36, 28), new Point(-18, -4));
_local4.addFrame(new Rectangle(51, 33, 35, 27), new Point(-18, -3));
_local4.addFrame(new Rectangle(3, 385, 34, 32), new Point(-17, -8));
_local4.addFrame(new Rectangle(43, 385, 34, 32), new Point(-17, -8));
_local4.addFrame(new Rectangle(83, 385, 35, 32), new Point(-18, -8));
_local4.addFrame(new Rectangle(78, 94, 35, 28), new Point(-18, -4));
_local4.addFrame(new Rectangle(92, 33, 36, 27), new Point(-18, -3));
_local4.addFrame(new Rectangle(119, 94, 39, 28), new Point(-21, -4));
_local4.addFrame(new Rectangle(604, 187, 38, 29), new Point(-21, -5));
_local4.addFrame(new Rectangle(164, 94, 38, 28), new Point(-21, -4));
_local4.addFrame(new Rectangle(208, 94, 38, 28), new Point(-21, -4));
_local4.addFrame(new Rectangle(124, 385, 37, 32), new Point(-20, -8));
_local4.addFrame(new Rectangle(167, 385, 37, 32), new Point(-20, -8));
_local4.addFrame(new Rectangle(210, 385, 37, 32), new Point(-20, -8));
_local4.addFrame(new Rectangle(252, 94, 38, 28), new Point(-21, -4));
_local4.addFrame(new Rectangle(134, 33, 38, 27), new Point(-21, -3));
_local4.addFrame(new Rectangle(253, 385, 35, 32), new Point(-17, -3));
_local4.addFrame(new Rectangle(71, 494, 36, 35), new Point(-18, -5));
_local4.addFrame(new Rectangle(324, 420, 36, 33), new Point(-18, -4));
_local4.addFrame(new Rectangle(366, 420, 35, 33), new Point(-18, -3));
_local4.addFrame(new Rectangle(42, 534, 34, 38), new Point(-17, -8));
_local4.addFrame(new Rectangle(82, 534, 34, 38), new Point(-17, -8));
_local4.addFrame(new Rectangle(122, 534, 35, 38), new Point(-18, -8));
_local4.addFrame(new Rectangle(430, 456, 35, 34), new Point(-18, -4));
_local4.addFrame(new Rectangle(294, 385, 36, 32), new Point(-18, -3));
_local4.addFrame(new Rectangle(113, 494, 37, 35), new Point(-16, -5));
_local4.addFrame(new Rectangle(568, 494, 35, 37), new Point(-14, -7));
_local4.addFrame(new Rectangle(471, 456, 35, 34), new Point(-13, -6));
_local4.addFrame(new Rectangle(296, 94, 41, 28), new Point(-13, -5));
_local4.addFrame(new Rectangle(343, 94, 49, 28), new Point(-15, -11));
_local4.addFrame(new Rectangle(0x0200, 456, 49, 34), new Point(-16, -19));
_local4.addFrame(new Rectangle(398, 94, 23, 28), new Point(-7, -6));
_local4.addFrame(new Rectangle(648, 187, 24, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(427, 94, 22, 28), new Point(-8, -6));
_local4.addFrame(new Rectangle(455, 94, 20, 28), new Point(-6, -6));
_local4.addFrame(new Rectangle(481, 94, 23, 28), new Point(-8, -6));
_local4.addFrame(new Rectangle(510, 94, 24, 28), new Point(-9, -6));
_local4.addFrame(new Rectangle(540, 94, 24, 28), new Point(-9, -6));
_local4.addFrame(new Rectangle(570, 94, 21, 28), new Point(-7, -6));
_local4.addFrame(new Rectangle(597, 94, 23, 28), new Point(-8, -6));
_local4.addFrame(new Rectangle(178, 33, 32, 27), new Point(-16, -6));
_local4.addFrame(new Rectangle(626, 94, 33, 28), new Point(-18, -6));
_local4.addFrame(new Rectangle(665, 94, 32, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(216, 33, 32, 27), new Point(-17, -6));
_local4.addFrame(new Rectangle(254, 33, 31, 27), new Point(-16, -6));
_local4.addFrame(new Rectangle(291, 33, 31, 27), new Point(-16, -6));
_local4.addFrame(new Rectangle(328, 33, 32, 27), new Point(-17, -6));
_local4.addFrame(new Rectangle(366, 33, 32, 27), new Point(-17, -6));
_local4.addFrame(new Rectangle(703, 94, 32, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(678, 187, 38, 29), new Point(-20, -6));
_local4.addFrame(new Rectangle(741, 94, 38, 28), new Point(-21, -6));
_local4.addFrame(new Rectangle(3, 125, 38, 28), new Point(-20, -6));
_local4.addFrame(new Rectangle(47, 125, 38, 28), new Point(-20, -6));
_local4.addFrame(new Rectangle(91, 125, 37, 28), new Point(-19, -6));
_local4.addFrame(new Rectangle(134, 125, 38, 28), new Point(-19, -6));
_local4.addFrame(new Rectangle(178, 125, 37, 28), new Point(-19, -6));
_local4.addFrame(new Rectangle(221, 125, 38, 28), new Point(-20, -6));
_local4.addFrame(new Rectangle(265, 125, 38, 28), new Point(-20, -6));
_local4.addFrame(new Rectangle(309, 125, 32, 28), new Point(-16, -6));
_local4.addFrame(new Rectangle(722, 187, 33, 29), new Point(-18, -6));
_local4.addFrame(new Rectangle(347, 125, 31, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(384, 125, 31, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(421, 125, 32, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(459, 125, 33, 28), new Point(-18, -6));
_local4.addFrame(new Rectangle(498, 125, 32, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(536, 125, 31, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(573, 125, 32, 28), new Point(-17, -6));
_local4.addFrame(new Rectangle(609, 494, 26, 37), new Point(-8, -6));
_local4.addFrame(new Rectangle(466, 494, 25, 36), new Point(-8, -6));
_local4.addFrame(new Rectangle(407, 420, 30, 33), new Point(-10, -6));
_local4.addFrame(new Rectangle(3, 219, 43, 29), new Point(-12, -6));
_local4.addFrame(new Rectangle(346, 3, 53, 25), new Point(-13, -6));
_local4.addFrame(new Rectangle(44, 3, 53, 23), new Point(-15, -11));
_local4.addFrame(new Rectangle(404, 33, 29, 27), new Point(-11, -4));
_local4.addFrame(new Rectangle(336, 385, 30, 32), new Point(-13, -9));
_local4.addFrame(new Rectangle(154, 316, 28, 31), new Point(-11, -8));
_local4.addFrame(new Rectangle(439, 33, 27, 27), new Point(-10, -4));
_local4.addFrame(new Rectangle(611, 125, 30, 28), new Point(-12, -5));
_local4.addFrame(new Rectangle(52, 219, 31, 29), new Point(-13, -6));
_local4.addFrame(new Rectangle(89, 219, 30, 29), new Point(-12, -6));
_local4.addFrame(new Rectangle(647, 125, 28, 28), new Point(-11, -5));
_local4.addFrame(new Rectangle(188, 316, 27, 31), new Point(-10, -8));
_local4.addFrame(new Rectangle(125, 219, 30, 29), new Point(-11, -6));
_local4.addFrame(new Rectangle(372, 385, 31, 32), new Point(-13, -9));
_local4.addFrame(new Rectangle(327, 283, 29, 30), new Point(-11, -8));
_local4.addFrame(new Rectangle(681, 125, 28, 28), new Point(-10, -6));
_local4.addFrame(new Rectangle(715, 125, 30, 28), new Point(-12, -6));
_local4.addFrame(new Rectangle(751, 125, 31, 28), new Point(-13, -6));
_local4.addFrame(new Rectangle(3, 156, 30, 28), new Point(-12, -6));
_local4.addFrame(new Rectangle(39, 156, 29, 28), new Point(-11, -6));
_local4.addFrame(new Rectangle(362, 283, 28, 30), new Point(-10, -8));
_local4.addFrame(new Rectangle(443, 420, 33, 33), new Point(-11, -9));
_local4.addFrame(new Rectangle(482, 420, 32, 33), new Point(-10, -10));
_local4.addFrame(new Rectangle(520, 420, 32, 33), new Point(-10, -10));
_local4.addFrame(new Rectangle(409, 385, 33, 32), new Point(-11, -10));
_local4.addFrame(new Rectangle(221, 316, 35, 31), new Point(-12, -9));
_local4.addFrame(new Rectangle(448, 385, 36, 32), new Point(-13, -9));
_local4.addFrame(new Rectangle(262, 316, 35, 31), new Point(-12, -9));
_local4.addFrame(new Rectangle(490, 385, 33, 32), new Point(-11, -10));
_local4.addFrame(new Rectangle(558, 420, 33, 33), new Point(-11, -10));
_local4.addFrame(new Rectangle(161, 219, 35, 29), new Point(-17, -6));
_local4.addFrame(new Rectangle(529, 385, 34, 32), new Point(-17, -9));
_local4.addFrame(new Rectangle(303, 316, 34, 31), new Point(-17, -8));
_local4.addFrame(new Rectangle(202, 219, 35, 29), new Point(-18, -6));
_local4.addFrame(new Rectangle(243, 219, 36, 29), new Point(-18, -6));
_local4.addFrame(new Rectangle(285, 219, 36, 29), new Point(-18, -6));
_local4.addFrame(new Rectangle(327, 219, 36, 29), new Point(-18, -6));
_local4.addFrame(new Rectangle(369, 219, 35, 29), new Point(-18, -6));
_local4.addFrame(new Rectangle(343, 316, 34, 31), new Point(-17, -8));
_local4.addFrame(new Rectangle(383, 316, 37, 31), new Point(-13, -7));
_local4.addFrame(new Rectangle(472, 33, 36, 27), new Point(-14, -5));
_local4.addFrame(new Rectangle(426, 316, 37, 31), new Point(-14, -6));
_local4.addFrame(new Rectangle(163, 534, 40, 38), new Point(-14, -9));
_local4.addFrame(new Rectangle(597, 534, 47, 40), new Point(-15, -10));
_local4.addFrame(new Rectangle(156, 494, 47, 35), new Point(-16, -10));
_local4.addFrame(new Rectangle(0x0202, 33, 29, 27), new Point(-10, -5));
_local4.addFrame(new Rectangle(549, 33, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(585, 33, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(405, 3, 30, 25), new Point(-11, -4));
_local4.addFrame(new Rectangle(621, 33, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(657, 33, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(693, 33, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(518, 3, 30, 26), new Point(-11, -5));
_local4.addFrame(new Rectangle(554, 3, 30, 26), new Point(-11, -5));
_local4.addFrame(new Rectangle(729, 33, 29, 27), new Point(-10, -5));
_local4.addFrame(new Rectangle(764, 33, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(3, 63, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(590, 3, 30, 26), new Point(-11, -5));
_local4.addFrame(new Rectangle(39, 63, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(75, 63, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(111, 63, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(626, 3, 30, 26), new Point(-11, -5));
_local4.addFrame(new Rectangle(147, 63, 30, 27), new Point(-11, -6));
_local4.addFrame(new Rectangle(469, 316, 27, 31), new Point(-8, -9));
_local4.addFrame(new Rectangle(502, 316, 29, 31), new Point(-9, -10));
_local4.addFrame(new Rectangle(396, 283, 29, 30), new Point(-9, -9));
_local4.addFrame(new Rectangle(431, 283, 29, 30), new Point(-9, -9));
_local4.addFrame(new Rectangle(410, 219, 29, 29), new Point(-9, -8));
_local4.addFrame(new Rectangle(445, 219, 28, 29), new Point(-9, -8));
_local4.addFrame(new Rectangle(466, 283, 28, 30), new Point(-9, -9));
_local4.addFrame(new Rectangle(500, 283, 29, 30), new Point(-9, -9));
_local4.addFrame(new Rectangle(535, 283, 29, 30), new Point(-9, -9));
_local4.addFrame(new Rectangle(183, 63, 27, 27), new Point(-8, -5));
_local4.addFrame(new Rectangle(216, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(250, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(284, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(318, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(352, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(386, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(420, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(454, 63, 28, 27), new Point(-9, -6));
_local4.addFrame(new Rectangle(74, 156, 49, 28), new Point(-14, -5));
_local4.addFrame(new Rectangle(263, 3, 42, 24), new Point(-14, -5));
_local4.addFrame(new Rectangle(537, 316, 39, 31), new Point(-13, -6));
_local4.addFrame(new Rectangle(209, 534, 37, 38), new Point(-13, -7));
_local4.addFrame(new Rectangle(687, 534, 34, 42), new Point(-14, -9));
_local4.addFrame(new Rectangle(650, 534, 31, 40), new Point(-14, -10));
_local4.addFrame(new Rectangle(129, 156, 26, 28), new Point(-8, -5));
_local4.addFrame(new Rectangle(570, 283, 31, 30), new Point(-12, -7));
_local4.addFrame(new Rectangle(479, 219, 30, 29), new Point(-11, -6));
_local4.addFrame(new Rectangle(161, 156, 29, 28), new Point(-10, -5));
_local4.addFrame(new Rectangle(582, 316, 30, 31), new Point(-10, -8));
_local4.addFrame(new Rectangle(569, 385, 31, 32), new Point(-11, -9));
_local4.addFrame(new Rectangle(618, 316, 30, 31), new Point(-10, -8));
_local4.addFrame(new Rectangle(196, 156, 28, 28), new Point(-9, -5));
_local4.addFrame(new Rectangle(230, 156, 29, 28), new Point(-10, -5));
_local4.addFrame(new Rectangle(515, 219, 39, 29), new Point(-8, -5));
_local4.addFrame(new Rectangle(607, 283, 44, 30), new Point(-12, -7));
_local4.addFrame(new Rectangle(560, 219, 43, 29), new Point(-11, -6));
_local4.addFrame(new Rectangle(265, 156, 42, 28), new Point(-10, -5));
_local4.addFrame(new Rectangle(654, 316, 41, 31), new Point(-10, -8));
_local4.addFrame(new Rectangle(606, 385, 43, 32), new Point(-11, -9));
_local4.addFrame(new Rectangle(701, 316, 41, 31), new Point(-10, -8));
_local4.addFrame(new Rectangle(313, 156, 41, 28), new Point(-9, -5));
_local4.addFrame(new Rectangle(360, 156, 42, 28), new Point(-10, -5));
_local4.addFrame(new Rectangle(408, 156, 40, 28), new Point(-8, -5));
_local4.addFrame(new Rectangle(454, 156, 44, 28), new Point(-12, -5));
_local4.addFrame(new Rectangle(609, 219, 43, 29), new Point(-11, -6));
_local4.addFrame(new Rectangle(488, 63, 42, 27), new Point(-10, -4));
_local4.addFrame(new Rectangle(748, 316, 39, 31), new Point(-8, -8));
_local4.addFrame(new Rectangle(655, 385, 38, 32), new Point(-7, -9));
_local4.addFrame(new Rectangle(3, 350, 39, 31), new Point(-8, -8));
_local4.addFrame(new Rectangle(504, 156, 40, 28), new Point(-9, -5));
_local4.addFrame(new Rectangle(662, 3, 42, 26), new Point(-10, -3));
_local4.addFrame(new Rectangle(658, 219, 39, 29), new Point(-8, -6));
_local4.addFrame(new Rectangle(550, 156, 44, 28), new Point(-12, -5));
_local4.addFrame(new Rectangle(703, 219, 43, 29), new Point(-11, -6));
_local4.addFrame(new Rectangle(752, 219, 42, 29), new Point(-10, -6));
_local4.addFrame(new Rectangle(48, 350, 39, 31), new Point(-8, -8));
_local4.addFrame(new Rectangle(699, 385, 39, 32), new Point(-7, -9));
_local4.addFrame(new Rectangle(93, 350, 39, 31), new Point(-8, -8));
_local4.addFrame(new Rectangle(3, 251, 41, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(50, 251, 42, 29), new Point(-10, -6));
_local4.addFrame(new Rectangle(597, 420, 39, 33), new Point(-8, -7));
_local4.addFrame(new Rectangle(657, 283, 38, 30), new Point(-8, -8));
_local4.addFrame(new Rectangle(567, 456, 37, 34), new Point(-10, -9));
_local4.addFrame(new Rectangle(641, 494, 38, 37), new Point(-14, -9));
_local4.addFrame(new Rectangle(252, 534, 42, 38), new Point(-24, -10));
_local4.addFrame(new Rectangle(642, 420, 48, 33), new Point(-29, -10));
_local4.addFrame(new Rectangle(600, 156, 20, 28), new Point(-4, -6));
_local4.addFrame(new Rectangle(626, 156, 27, 28), new Point(-9, -6));
_local4.addFrame(new Rectangle(659, 156, 25, 28), new Point(-7, -6));
_local4.addFrame(new Rectangle(690, 156, 23, 28), new Point(-5, -6));
_local4.addFrame(new Rectangle(98, 251, 25, 29), new Point(-7, -6));
_local4.addFrame(new Rectangle(129, 251, 27, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(719, 156, 26, 28), new Point(-8, -6));
_local4.addFrame(new Rectangle(751, 156, 24, 28), new Point(-6, -6));
_local4.addFrame(new Rectangle(3, 187, 24, 28), new Point(-6, -6));
_local4.addFrame(new Rectangle(162, 251, 34, 29), new Point(-4, -6));
_local4.addFrame(new Rectangle(202, 251, 41, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(249, 251, 38, 29), new Point(-7, -6));
_local4.addFrame(new Rectangle(293, 251, 36, 29), new Point(-5, -6));
_local4.addFrame(new Rectangle(335, 251, 38, 29), new Point(-7, -6));
_local4.addFrame(new Rectangle(379, 251, 39, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(424, 251, 39, 29), new Point(-8, -6));
_local4.addFrame(new Rectangle(469, 251, 37, 29), new Point(-6, -6));
_local4.addFrame(new Rectangle(0x0200, 251, 37, 29), new Point(-6, -6));
_local4.addFrame(new Rectangle(33, 187, 38, 28), new Point(-7, -6));
_local4.addFrame(new Rectangle(555, 251, 41, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(602, 251, 39, 29), new Point(-7, -6));
_local4.addFrame(new Rectangle(647, 251, 38, 29), new Point(-7, -6));
_local4.addFrame(new Rectangle(691, 251, 37, 29), new Point(-7, -6));
_local4.addFrame(new Rectangle(734, 251, 39, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(3, 283, 38, 29), new Point(-8, -6));
_local4.addFrame(new Rectangle(77, 187, 38, 28), new Point(-7, -5));
_local4.addFrame(new Rectangle(121, 187, 37, 28), new Point(-6, -6));
_local4.addFrame(new Rectangle(164, 187, 34, 28), new Point(-4, -6));
_local4.addFrame(new Rectangle(204, 187, 41, 28), new Point(-9, -6));
_local4.addFrame(new Rectangle(251, 187, 38, 28), new Point(-7, -6));
_local4.addFrame(new Rectangle(295, 187, 36, 28), new Point(-5, -6));
_local4.addFrame(new Rectangle(47, 283, 38, 29), new Point(-7, -6));
_local4.addFrame(new Rectangle(91, 283, 41, 29), new Point(-9, -6));
_local4.addFrame(new Rectangle(337, 187, 39, 28), new Point(-8, -6));
_local4.addFrame(new Rectangle(536, 63, 37, 27), new Point(-6, -5));
_local4.addFrame(new Rectangle(382, 187, 37, 28), new Point(-6, -6));
_local4.addFrame(new Rectangle(568, 534, 23, 39), new Point(-5, -6));
_local4.addFrame(new Rectangle(209, 494, 27, 35), new Point(-6, -6));
_local4.addFrame(new Rectangle(696, 420, 25, 33), new Point(-7, -6));
_local4.addFrame(new Rectangle(701, 283, 28, 30), new Point(-13, -6));
_local4.addFrame(new Rectangle(710, 3, 46, 26), new Point(-31, -7));
_local4.addFrame(new Rectangle(103, 3, 53, 23), new Point(-36, -10));
_local4.addFrame(new Rectangle(425, 187, 26, 28), new Point(-8, -4));
_local4.addFrame(new Rectangle(744, 385, 32, 32), new Point(-12, -8));
_local4.addFrame(new Rectangle(3, 420, 31, 32), new Point(-11, -8));
_local4.addFrame(new Rectangle(579, 63, 29, 27), new Point(-10, -3));
_local4.addFrame(new Rectangle(735, 283, 30, 30), new Point(-11, -5));
_local4.addFrame(new Rectangle(138, 350, 31, 31), new Point(-12, -6));
_local4.addFrame(new Rectangle(175, 350, 30, 31), new Point(-11, -6));
_local4.addFrame(new Rectangle(138, 283, 29, 29), new Point(-10, -5));
_local4.addFrame(new Rectangle(40, 420, 30, 32), new Point(-10, -8));
_local4.addFrame(new Rectangle(727, 420, 26, 33), new Point(-8, -4));
_local4.addFrame(new Rectangle(300, 534, 26, 38), new Point(-7, -8));
_local4.addFrame(new Rectangle(332, 534, 27, 38), new Point(-8, -8));
_local4.addFrame(new Rectangle(759, 420, 28, 33), new Point(-10, -3));
_local4.addFrame(new Rectangle(242, 494, 29, 35), new Point(-11, -5));
_local4.addFrame(new Rectangle(497, 494, 30, 36), new Point(-12, -6));
_local4.addFrame(new Rectangle(533, 494, 29, 36), new Point(-11, -6));
_local4.addFrame(new Rectangle(277, 494, 28, 35), new Point(-10, -5));
_local4.addFrame(new Rectangle(365, 534, 26, 38), new Point(-8, -8));
_local4.addFrame(new Rectangle(211, 350, 33, 31), new Point(-11, -2));
_local4.addFrame(new Rectangle(685, 494, 33, 37), new Point(-11, -8));
_local4.addFrame(new Rectangle(724, 494, 33, 37), new Point(-11, -8));
_local4.addFrame(new Rectangle(250, 350, 33, 31), new Point(-11, -3));
_local4.addFrame(new Rectangle(289, 350, 34, 31), new Point(-12, -3));
_local4.addFrame(new Rectangle(329, 350, 34, 31), new Point(-12, -3));
_local4.addFrame(new Rectangle(369, 350, 34, 31), new Point(-12, -3));
_local4.addFrame(new Rectangle(409, 350, 33, 31), new Point(-11, -3));
_local4.addFrame(new Rectangle(3, 534, 33, 37), new Point(-11, -8));
_local4.addFrame(new Rectangle(76, 420, 39, 32), new Point(-8, -3));
_local4.addFrame(new Rectangle(397, 534, 38, 38), new Point(-7, -8));
_local4.addFrame(new Rectangle(441, 534, 39, 38), new Point(-8, -8));
_local4.addFrame(new Rectangle(3, 456, 42, 33), new Point(-10, -3));
_local4.addFrame(new Rectangle(51, 456, 43, 33), new Point(-11, -3));
_local4.addFrame(new Rectangle(100, 456, 44, 33), new Point(-12, -3));
_local4.addFrame(new Rectangle(150, 456, 43, 33), new Point(-11, -3));
_local4.addFrame(new Rectangle(199, 456, 42, 33), new Point(-10, -3));
_local4.addFrame(new Rectangle(486, 534, 39, 38), new Point(-8, -8));
_local4.addFrame(new Rectangle(610, 456, 38, 34), new Point(-8, -4));
_local4.addFrame(new Rectangle(247, 456, 41, 33), new Point(-10, -4));
_local4.addFrame(new Rectangle(448, 350, 38, 31), new Point(-10, -4));
_local4.addFrame(new Rectangle(173, 283, 38, 29), new Point(-14, -5));
_local4.addFrame(new Rectangle(3, 316, 40, 30), new Point(-22, -13));
_local4.addFrame(new Rectangle(311, 494, 47, 35), new Point(-28, -20));
break;
case "BondBody":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(489, 0, 24, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(451, 32, 27, 33), new Point(-14, -27));
_local4.addFrame(new Rectangle(513, 0, 27, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(231, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(540, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(478, 32, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(566, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(0x0101, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(592, 0, 27, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(619, 0, 24, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(504, 32, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(643, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(283, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(669, 0, 25, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(530, 32, 25, 33), new Point(-12, -27));
_local4.addFrame(new Rectangle(694, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(309, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(720, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(280, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(711, 32, 27, 34), new Point(-15, -28));
_local4.addFrame(new Rectangle(738, 32, 27, 34), new Point(-15, -28));
_local4.addFrame(new Rectangle(555, 32, 27, 33), new Point(-15, -28));
_local4.addFrame(new Rectangle(306, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(332, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(358, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(582, 32, 26, 33), new Point(-15, -28));
_local4.addFrame(new Rectangle(0, 66, 27, 34), new Point(-15, -28));
_local4.addFrame(new Rectangle(0, 32, 24, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(608, 32, 25, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(24, 32, 25, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(335, 0, 25, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(49, 32, 25, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(633, 32, 25, 33), new Point(-12, -27));
_local4.addFrame(new Rectangle(74, 32, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(360, 0, 25, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(100, 32, 25, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(27, 66, 50, 34), new Point(-27, -30));
_local4.addFrame(new Rectangle(77, 66, 43, 34), new Point(-20, -29));
_local4.addFrame(new Rectangle(577, 66, 39, 36), new Point(-19, -30));
_local4.addFrame(new Rectangle(616, 66, 37, 36), new Point(-18, -29));
_local4.addFrame(new Rectangle(384, 66, 34, 35), new Point(-16, -27));
_local4.addFrame(new Rectangle(145, 0, 31, 30), new Point(-16, -22));
_local4.addFrame(new Rectangle(604, 139, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(574, 102, 26, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(600, 102, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(628, 139, 23, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(651, 139, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(72, 253, 29, 39), new Point(-15, -31));
_local4.addFrame(new Rectangle(677, 139, 27, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(704, 139, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(728, 139, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(101, 253, 35, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(0, 177, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(37, 177, 36, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(73, 177, 35, 38), new Point(-23, -30));
_local4.addFrame(new Rectangle(136, 253, 36, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(172, 253, 37, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(209, 253, 36, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(245, 253, 35, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(280, 253, 36, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(316, 253, 30, 39), new Point(-21, -31));
_local4.addFrame(new Rectangle(108, 177, 34, 38), new Point(-21, -31));
_local4.addFrame(new Rectangle(142, 177, 32, 38), new Point(-20, -31));
_local4.addFrame(new Rectangle(346, 253, 30, 39), new Point(-20, -31));
_local4.addFrame(new Rectangle(376, 253, 28, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(404, 253, 27, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(431, 253, 27, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(458, 253, 29, 39), new Point(-20, -31));
_local4.addFrame(new Rectangle(487, 253, 32, 39), new Point(-21, -31));
_local4.addFrame(new Rectangle(519, 253, 35, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(174, 177, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(211, 177, 36, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(247, 177, 34, 38), new Point(-23, -30));
_local4.addFrame(new Rectangle(554, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(588, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(622, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(656, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(690, 253, 35, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(252, 413, 39, 44), new Point(-24, -38));
_local4.addFrame(new Rectangle(385, 371, 36, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(421, 371, 36, 41), new Point(-20, -33));
_local4.addFrame(new Rectangle(170, 331, 36, 40), new Point(-17, -32));
_local4.addFrame(new Rectangle(653, 66, 38, 36), new Point(-16, -27));
_local4.addFrame(new Rectangle(385, 0, 40, 31), new Point(-18, -22));
_local4.addFrame(new Rectangle(281, 177, 14, 38), new Point(-8, -31));
_local4.addFrame(new Rectangle(206, 331, 19, 40), new Point(-10, -32));
_local4.addFrame(new Rectangle(225, 331, 17, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(295, 177, 14, 38), new Point(-8, -31));
_local4.addFrame(new Rectangle(725, 253, 17, 39), new Point(-9, -31));
_local4.addFrame(new Rectangle(242, 331, 19, 40), new Point(-10, -32));
_local4.addFrame(new Rectangle(742, 253, 17, 39), new Point(-9, -31));
_local4.addFrame(new Rectangle(309, 177, 14, 38), new Point(-8, -31));
_local4.addFrame(new Rectangle(0, 292, 15, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(15, 292, 26, 39), new Point(-20, -32));
_local4.addFrame(new Rectangle(261, 331, 30, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(291, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(41, 292, 27, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(320, 331, 28, 40), new Point(-20, -32));
_local4.addFrame(new Rectangle(348, 331, 29, 40), new Point(-20, -32));
_local4.addFrame(new Rectangle(377, 331, 28, 40), new Point(-20, -32));
_local4.addFrame(new Rectangle(68, 292, 27, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(405, 331, 28, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(624, 102, 32, 37), new Point(-19, -30));
_local4.addFrame(new Rectangle(323, 177, 31, 38), new Point(-19, -30));
_local4.addFrame(new Rectangle(354, 177, 30, 38), new Point(-18, -30));
_local4.addFrame(new Rectangle(656, 102, 30, 37), new Point(-17, -30));
_local4.addFrame(new Rectangle(384, 177, 30, 38), new Point(-17, -30));
_local4.addFrame(new Rectangle(414, 177, 30, 38), new Point(-17, -30));
_local4.addFrame(new Rectangle(444, 177, 30, 38), new Point(-17, -30));
_local4.addFrame(new Rectangle(686, 102, 31, 37), new Point(-18, -30));
_local4.addFrame(new Rectangle(474, 177, 30, 38), new Point(-18, -30));
_local4.addFrame(new Rectangle(95, 292, 26, 39), new Point(-20, -32));
_local4.addFrame(new Rectangle(433, 331, 30, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(463, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(121, 292, 27, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(492, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(521, 331, 30, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(551, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(148, 292, 27, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(580, 331, 28, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(724, 458, 21, 52), new Point(-10, -45));
_local4.addFrame(new Rectangle(640, 458, 24, 49), new Point(-13, -42));
_local4.addFrame(new Rectangle(106, 458, 24, 46), new Point(-11, -39));
_local4.addFrame(new Rectangle(660, 371, 30, 42), new Point(-13, -35));
_local4.addFrame(new Rectangle(120, 66, 35, 34), new Point(-15, -26));
_local4.addFrame(new Rectangle(34, 0, 37, 25), new Point(-17, -14));
_local4.addFrame(new Rectangle(717, 102, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(504, 177, 30, 38), new Point(-15, -30));
_local4.addFrame(new Rectangle(534, 177, 27, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(561, 177, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(741, 102, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(691, 66, 26, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(717, 66, 25, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(0, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(585, 177, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(528, 413, 24, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(431, 458, 26, 47), new Point(-15, -39));
_local4.addFrame(new Rectangle(130, 458, 25, 46), new Point(-14, -38));
_local4.addFrame(new Rectangle(155, 458, 23, 46), new Point(-12, -38));
_local4.addFrame(new Rectangle(552, 413, 24, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(291, 413, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(317, 413, 25, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(576, 413, 23, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(178, 458, 24, 46), new Point(-13, -38));
_local4.addFrame(new Rectangle(611, 177, 33, 38), new Point(-16, -31));
_local4.addFrame(new Rectangle(175, 292, 33, 39), new Point(-16, -31));
_local4.addFrame(new Rectangle(644, 177, 33, 38), new Point(-16, -30));
_local4.addFrame(new Rectangle(677, 177, 33, 38), new Point(-16, -30));
_local4.addFrame(new Rectangle(24, 139, 33, 37), new Point(-16, -30));
_local4.addFrame(new Rectangle(0, 102, 33, 36), new Point(-16, -30));
_local4.addFrame(new Rectangle(33, 102, 33, 36), new Point(-16, -30));
_local4.addFrame(new Rectangle(57, 139, 33, 37), new Point(-16, -30));
_local4.addFrame(new Rectangle(208, 292, 33, 39), new Point(-16, -31));
_local4.addFrame(new Rectangle(599, 413, 35, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(457, 458, 34, 47), new Point(-23, -39));
_local4.addFrame(new Rectangle(202, 458, 34, 46), new Point(-23, -38));
_local4.addFrame(new Rectangle(236, 458, 34, 46), new Point(-23, -38));
_local4.addFrame(new Rectangle(634, 413, 35, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(342, 413, 37, 44), new Point(-24, -38));
_local4.addFrame(new Rectangle(379, 413, 36, 44), new Point(-24, -38));
_local4.addFrame(new Rectangle(669, 413, 34, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(270, 458, 34, 46), new Point(-23, -38));
_local4.addFrame(new Rectangle(491, 458, 38, 47), new Point(-22, -42));
_local4.addFrame(new Rectangle(563, 458, 38, 48), new Point(-23, -42));
_local4.addFrame(new Rectangle(415, 413, 38, 44), new Point(-21, -39));
_local4.addFrame(new Rectangle(241, 292, 38, 39), new Point(-19, -35));
_local4.addFrame(new Rectangle(125, 32, 39, 32), new Point(-16, -24));
_local4.addFrame(new Rectangle(164, 32, 40, 32), new Point(-18, -17));
_local4.addFrame(new Rectangle(176, 0, 24, 30), new Point(-12, -27));
_local4.addFrame(new Rectangle(658, 32, 27, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(204, 32, 27, 32), new Point(-13, -27));
_local4.addFrame(new Rectangle(425, 0, 26, 31), new Point(-13, -27));
_local4.addFrame(new Rectangle(231, 32, 26, 32), new Point(-13, -27));
_local4.addFrame(new Rectangle(685, 32, 26, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(0x0101, 32, 26, 32), new Point(-13, -27));
_local4.addFrame(new Rectangle(283, 32, 26, 32), new Point(-13, -27));
_local4.addFrame(new Rectangle(309, 32, 27, 32), new Point(-13, -27));
_local4.addFrame(new Rectangle(279, 292, 24, 39), new Point(-12, -36));
_local4.addFrame(new Rectangle(690, 371, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(716, 371, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(608, 331, 26, 40), new Point(-13, -36));
_local4.addFrame(new Rectangle(457, 371, 25, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(482, 371, 25, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(507, 371, 26, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(533, 371, 26, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(0, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(155, 66, 26, 34), new Point(-12, -31));
_local4.addFrame(new Rectangle(66, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(93, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(418, 66, 27, 35), new Point(-12, -31));
_local4.addFrame(new Rectangle(120, 102, 26, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(90, 139, 26, 37), new Point(-12, -31));
_local4.addFrame(new Rectangle(146, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(173, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(200, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(303, 292, 25, 39), new Point(-13, -36));
_local4.addFrame(new Rectangle(26, 413, 25, 42), new Point(-12, -37));
_local4.addFrame(new Rectangle(51, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(634, 331, 25, 40), new Point(-12, -36));
_local4.addFrame(new Rectangle(77, 413, 25, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(192, 413, 25, 43), new Point(-13, -37));
_local4.addFrame(new Rectangle(102, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(559, 371, 25, 41), new Point(-12, -36));
_local4.addFrame(new Rectangle(128, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(227, 102, 51, 36), new Point(-23, -35));
_local4.addFrame(new Rectangle(659, 331, 43, 40), new Point(-23, -36));
_local4.addFrame(new Rectangle(278, 102, 39, 36), new Point(-20, -33));
_local4.addFrame(new Rectangle(108, 0, 37, 29), new Point(-19, -28));
_local4.addFrame(new Rectangle(0, 0, 34, 24), new Point(-18, -17));
_local4.addFrame(new Rectangle(200, 0, 31, 30), new Point(-15, -16));
_local4.addFrame(new Rectangle(317, 102, 24, 36), new Point(-12, -30));
_local4.addFrame(new Rectangle(341, 102, 26, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(116, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(140, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(710, 177, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(736, 177, 30, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(0, 215, 27, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(27, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(164, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(367, 102, 35, 36), new Point(-12, -30));
_local4.addFrame(new Rectangle(402, 102, 37, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(188, 139, 36, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(224, 139, 35, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(51, 215, 36, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(87, 215, 37, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(124, 215, 36, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(160, 215, 35, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(259, 139, 36, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(195, 215, 30, 38), new Point(-9, -32));
_local4.addFrame(new Rectangle(328, 292, 34, 39), new Point(-13, -33));
_local4.addFrame(new Rectangle(362, 292, 32, 39), new Point(-12, -32));
_local4.addFrame(new Rectangle(394, 292, 30, 39), new Point(-10, -32));
_local4.addFrame(new Rectangle(702, 331, 27, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(729, 331, 27, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(0, 371, 27, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(27, 371, 29, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(424, 292, 32, 39), new Point(-11, -32));
_local4.addFrame(new Rectangle(217, 413, 35, 43), new Point(-12, -37));
_local4.addFrame(new Rectangle(453, 413, 37, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(703, 413, 36, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(0, 458, 34, 45), new Point(-11, -38));
_local4.addFrame(new Rectangle(304, 458, 34, 46), new Point(-11, -38));
_local4.addFrame(new Rectangle(529, 458, 34, 47), new Point(-11, -39));
_local4.addFrame(new Rectangle(338, 458, 34, 46), new Point(-11, -38));
_local4.addFrame(new Rectangle(372, 458, 34, 46), new Point(-11, -38));
_local4.addFrame(new Rectangle(34, 458, 36, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(601, 458, 39, 48), new Point(-15, -43));
_local4.addFrame(new Rectangle(664, 458, 36, 50), new Point(-14, -43));
_local4.addFrame(new Rectangle(70, 458, 36, 45), new Point(-16, -39));
_local4.addFrame(new Rectangle(225, 215, 36, 38), new Point(-19, -33));
_local4.addFrame(new Rectangle(451, 0, 38, 31), new Point(-22, -23));
_local4.addFrame(new Rectangle(336, 32, 40, 32), new Point(-22, -17));
_local4.addFrame(new Rectangle(261, 215, 14, 38), new Point(-6, -31));
_local4.addFrame(new Rectangle(56, 371, 19, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(456, 292, 17, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(275, 215, 14, 38), new Point(-6, -31));
_local4.addFrame(new Rectangle(473, 292, 17, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(75, 371, 19, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(490, 292, 17, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(507, 292, 14, 39), new Point(-6, -31));
_local4.addFrame(new Rectangle(521, 292, 15, 39), new Point(-7, -31));
_local4.addFrame(new Rectangle(289, 215, 26, 38), new Point(-6, -31));
_local4.addFrame(new Rectangle(94, 371, 30, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(536, 292, 29, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(315, 215, 27, 38), new Point(-6, -31));
_local4.addFrame(new Rectangle(565, 292, 28, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(124, 371, 29, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(593, 292, 28, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(621, 292, 27, 39), new Point(-6, -31));
_local4.addFrame(new Rectangle(648, 292, 28, 39), new Point(-7, -31));
_local4.addFrame(new Rectangle(295, 139, 32, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(342, 215, 31, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(373, 215, 30, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(439, 102, 30, 36), new Point(-13, -29));
_local4.addFrame(new Rectangle(327, 139, 30, 37), new Point(-13, -29));
_local4.addFrame(new Rectangle(403, 215, 30, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(357, 139, 30, 37), new Point(-13, -29));
_local4.addFrame(new Rectangle(387, 139, 31, 37), new Point(-13, -29));
_local4.addFrame(new Rectangle(433, 215, 30, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(676, 292, 26, 39), new Point(-6, -32));
_local4.addFrame(new Rectangle(153, 371, 30, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(183, 371, 29, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(702, 292, 27, 39), new Point(-6, -32));
_local4.addFrame(new Rectangle(212, 371, 29, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(241, 371, 30, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(271, 371, 29, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(300, 371, 27, 40), new Point(-6, -32));
_local4.addFrame(new Rectangle(327, 371, 28, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(745, 458, 21, 52), new Point(-11, -45));
_local4.addFrame(new Rectangle(700, 458, 24, 51), new Point(-11, -44));
_local4.addFrame(new Rectangle(406, 458, 25, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(355, 371, 30, 40), new Point(-17, -33));
_local4.addFrame(new Rectangle(376, 32, 35, 32), new Point(-20, -25));
_local4.addFrame(new Rectangle(71, 0, 37, 25), new Point(-20, -14));
_local4.addFrame(new Rectangle(463, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(487, 215, 31, 38), new Point(-15, -30));
_local4.addFrame(new Rectangle(518, 215, 27, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(545, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(418, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(442, 139, 26, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(468, 139, 25, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(569, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(593, 215, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(619, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(643, 215, 27, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(670, 215, 25, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(695, 215, 23, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(493, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(517, 139, 26, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(543, 139, 25, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(718, 215, 23, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(741, 215, 24, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(469, 102, 33, 36), new Point(-17, -28));
_local4.addFrame(new Rectangle(502, 102, 33, 36), new Point(-17, -28));
_local4.addFrame(new Rectangle(445, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(478, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(181, 66, 33, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(214, 66, 33, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(247, 66, 33, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(511, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(544, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(729, 292, 35, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(0, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(34, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(68, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(0, 253, 35, 38), new Point(-12, -31));
_local4.addFrame(new Rectangle(35, 253, 37, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(568, 139, 36, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(102, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(136, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(490, 413, 38, 44), new Point(-16, -38));
_local4.addFrame(new Rectangle(154, 413, 38, 42), new Point(-15, -35));
_local4.addFrame(new Rectangle(584, 371, 38, 41), new Point(-17, -33));
_local4.addFrame(new Rectangle(622, 371, 38, 41), new Point(-19, -32));
_local4.addFrame(new Rectangle(535, 102, 39, 36), new Point(-23, -27));
_local4.addFrame(new Rectangle(411, 32, 40, 32), new Point(-22, -22));
break;
case "BondBodyCustom":
_local4 = new ThingClip(combine((_arg1 + "Color"), "MaleBodyCustomAlpha"));
_local2 = _local4;
_local4.addFrame(new Rectangle(481, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(97, 33, 29, 34), new Point(-15, -27));
_local4.addFrame(new Rectangle(507, 0, 28, 33), new Point(-14, -27));
_local4.addFrame(new Rectangle(172, 0, 28, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(126, 33, 28, 34), new Point(-14, -27));
_local4.addFrame(new Rectangle(154, 33, 28, 34), new Point(-14, -27));
_local4.addFrame(new Rectangle(182, 33, 28, 34), new Point(-14, -27));
_local4.addFrame(new Rectangle(200, 0, 28, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(535, 0, 28, 33), new Point(-14, -27));
_local4.addFrame(new Rectangle(563, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(210, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(589, 0, 27, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(228, 0, 27, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(237, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(264, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(291, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(0xFF, 0, 27, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(616, 0, 27, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(261, 67, 27, 36), new Point(-15, -30));
_local4.addFrame(new Rectangle(288, 67, 29, 36), new Point(-16, -29));
_local4.addFrame(new Rectangle(0, 67, 29, 35), new Point(-16, -29));
_local4.addFrame(new Rectangle(29, 67, 27, 35), new Point(-15, -29));
_local4.addFrame(new Rectangle(317, 67, 28, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(602, 67, 27, 37), new Point(-15, -30));
_local4.addFrame(new Rectangle(345, 67, 27, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(56, 67, 27, 35), new Point(-15, -29));
_local4.addFrame(new Rectangle(83, 67, 28, 35), new Point(-16, -29));
_local4.addFrame(new Rectangle(643, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(318, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(669, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(282, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(344, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(370, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(396, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(308, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(695, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(111, 67, 51, 35), new Point(-28, -30));
_local4.addFrame(new Rectangle(372, 67, 44, 36), new Point(-21, -30));
_local4.addFrame(new Rectangle(377, 104, 41, 38), new Point(-20, -31));
_local4.addFrame(new Rectangle(606, 142, 37, 39), new Point(-18, -31));
_local4.addFrame(new Rectangle(416, 67, 35, 36), new Point(-17, -28));
_local4.addFrame(new Rectangle(334, 0, 33, 32), new Point(-17, -23));
_local4.addFrame(new Rectangle(287, 220, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(418, 104, 27, 38), new Point(-14, -31));
_local4.addFrame(new Rectangle(445, 104, 25, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(311, 220, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(335, 220, 27, 40), new Point(-14, -31));
_local4.addFrame(new Rectangle(362, 220, 31, 40), new Point(-16, -31));
_local4.addFrame(new Rectangle(393, 220, 29, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(422, 220, 25, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(447, 220, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(421, 300, 35, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(470, 104, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(643, 142, 36, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(471, 220, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(456, 300, 37, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(493, 300, 38, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(531, 300, 38, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(507, 220, 37, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(544, 220, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(580, 220, 32, 40), new Point(-22, -31));
_local4.addFrame(new Rectangle(679, 142, 34, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(612, 220, 33, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(645, 220, 31, 40), new Point(-20, -31));
_local4.addFrame(new Rectangle(569, 300, 29, 41), new Point(-20, -32));
_local4.addFrame(new Rectangle(598, 300, 28, 41), new Point(-20, -32));
_local4.addFrame(new Rectangle(626, 300, 29, 41), new Point(-20, -32));
_local4.addFrame(new Rectangle(676, 220, 31, 40), new Point(-21, -31));
_local4.addFrame(new Rectangle(655, 300, 33, 41), new Point(-21, -32));
_local4.addFrame(new Rectangle(688, 300, 36, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(507, 104, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(0, 181, 36, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(707, 220, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(0, 341, 36, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(36, 341, 35, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(71, 341, 36, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(0, 260, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(36, 260, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(280, 468, 39, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(421, 382, 38, 42), new Point(-23, -34));
_local4.addFrame(new Rectangle(372, 424, 38, 43), new Point(-21, -34));
_local4.addFrame(new Rectangle(459, 382, 38, 42), new Point(-18, -33));
_local4.addFrame(new Rectangle(629, 67, 40, 37), new Point(-17, -28));
_local4.addFrame(new Rectangle(367, 0, 41, 32), new Point(-18, -22));
_local4.addFrame(new Rectangle(36, 181, 15, 39), new Point(-8, -32));
_local4.addFrame(new Rectangle(107, 341, 21, 41), new Point(-11, -32));
_local4.addFrame(new Rectangle(128, 341, 18, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(72, 260, 15, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(146, 341, 19, 41), new Point(-10, -32));
_local4.addFrame(new Rectangle(165, 341, 21, 41), new Point(-11, -32));
_local4.addFrame(new Rectangle(87, 260, 19, 40), new Point(-10, -32));
_local4.addFrame(new Rectangle(106, 260, 15, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(121, 260, 16, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(137, 260, 28, 40), new Point(-21, -33));
_local4.addFrame(new Rectangle(497, 382, 32, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(529, 382, 31, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(186, 341, 28, 41), new Point(-21, -33));
_local4.addFrame(new Rectangle(560, 382, 30, 42), new Point(-21, -33));
_local4.addFrame(new Rectangle(590, 382, 31, 42), new Point(-21, -33));
_local4.addFrame(new Rectangle(214, 341, 30, 41), new Point(-21, -33));
_local4.addFrame(new Rectangle(244, 341, 28, 41), new Point(-21, -33));
_local4.addFrame(new Rectangle(272, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(669, 67, 34, 37), new Point(-20, -30));
_local4.addFrame(new Rectangle(165, 260, 31, 40), new Point(-19, -31));
_local4.addFrame(new Rectangle(196, 260, 32, 40), new Point(-19, -31));
_local4.addFrame(new Rectangle(51, 181, 31, 39), new Point(-18, -31));
_local4.addFrame(new Rectangle(228, 260, 32, 40), new Point(-18, -31));
_local4.addFrame(new Rectangle(260, 260, 31, 40), new Point(-17, -31));
_local4.addFrame(new Rectangle(82, 181, 32, 39), new Point(-18, -31));
_local4.addFrame(new Rectangle(544, 104, 31, 38), new Point(-18, -30));
_local4.addFrame(new Rectangle(114, 181, 32, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(291, 260, 28, 40), new Point(-21, -33));
_local4.addFrame(new Rectangle(621, 382, 32, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(653, 382, 31, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(301, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(684, 382, 31, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(715, 382, 32, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(330, 341, 31, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(361, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(390, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(695, 515, 22, 54), new Point(-11, -46));
_local4.addFrame(new Rectangle(530, 515, 24, 50), new Point(-13, -42));
_local4.addFrame(new Rectangle(717, 468, 26, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(569, 424, 30, 44), new Point(-13, -36));
_local4.addFrame(new Rectangle(162, 67, 36, 35), new Point(-15, -27));
_local4.addFrame(new Rectangle(0, 0, 37, 26), new Point(-17, -15));
_local4.addFrame(new Rectangle(703, 67, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(319, 260, 31, 40), new Point(-16, -31));
_local4.addFrame(new Rectangle(350, 260, 29, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(575, 104, 25, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(600, 104, 25, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(625, 104, 28, 38), new Point(-14, -31));
_local4.addFrame(new Rectangle(653, 104, 26, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(679, 104, 25, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(146, 181, 27, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(144, 468, 25, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(427, 515, 28, 49), new Point(-16, -40));
_local4.addFrame(new Rectangle(267, 515, 27, 48), new Point(-15, -39));
_local4.addFrame(new Rectangle(319, 468, 24, 46), new Point(-12, -38));
_local4.addFrame(new Rectangle(343, 468, 25, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(368, 468, 28, 46), new Point(-14, -39));
_local4.addFrame(new Rectangle(396, 468, 26, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(0, 515, 24, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(24, 515, 25, 47), new Point(-13, -39));
_local4.addFrame(new Rectangle(173, 181, 35, 39), new Point(-17, -32));
_local4.addFrame(new Rectangle(419, 341, 34, 41), new Point(-17, -32));
_local4.addFrame(new Rectangle(379, 260, 34, 40), new Point(-17, -31));
_local4.addFrame(new Rectangle(208, 181, 35, 39), new Point(-17, -31));
_local4.addFrame(new Rectangle(704, 104, 35, 38), new Point(-17, -31));
_local4.addFrame(new Rectangle(0, 142, 35, 38), new Point(-17, -31));
_local4.addFrame(new Rectangle(35, 142, 35, 38), new Point(-17, -31));
_local4.addFrame(new Rectangle(243, 181, 35, 39), new Point(-17, -31));
_local4.addFrame(new Rectangle(278, 181, 35, 39), new Point(-17, -31));
_local4.addFrame(new Rectangle(169, 468, 36, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(455, 515, 35, 49), new Point(-23, -40));
_local4.addFrame(new Rectangle(294, 515, 36, 48), new Point(-24, -39));
_local4.addFrame(new Rectangle(422, 468, 36, 46), new Point(-24, -38));
_local4.addFrame(new Rectangle(458, 468, 36, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(494, 468, 38, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(532, 468, 37, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(49, 515, 36, 47), new Point(-24, -39));
_local4.addFrame(new Rectangle(85, 515, 36, 47), new Point(-24, -39));
_local4.addFrame(new Rectangle(490, 515, 40, 49), new Point(-23, -43));
_local4.addFrame(new Rectangle(554, 515, 40, 50), new Point(-24, -43));
_local4.addFrame(new Rectangle(569, 468, 39, 46), new Point(-22, -40));
_local4.addFrame(new Rectangle(453, 341, 39, 41), new Point(-19, -36));
_local4.addFrame(new Rectangle(422, 33, 40, 34), new Point(-17, -25));
_local4.addFrame(new Rectangle(462, 33, 41, 34), new Point(-18, -18));
_local4.addFrame(new Rectangle(109, 0, 26, 31), new Point(-13, -27));
_local4.addFrame(new Rectangle(198, 67, 28, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(503, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(0, 33, 28, 33), new Point(-14, -28));
_local4.addFrame(new Rectangle(531, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(559, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(587, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(28, 33, 28, 33), new Point(-14, -28));
_local4.addFrame(new Rectangle(615, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(413, 260, 26, 40), new Point(-13, -36));
_local4.addFrame(new Rectangle(599, 424, 27, 44), new Point(-14, -38));
_local4.addFrame(new Rectangle(626, 424, 27, 44), new Point(-14, -38));
_local4.addFrame(new Rectangle(0, 424, 27, 42), new Point(-14, -37));
_local4.addFrame(new Rectangle(410, 424, 27, 43), new Point(-14, -37));
_local4.addFrame(new Rectangle(437, 424, 27, 43), new Point(-14, -37));
_local4.addFrame(new Rectangle(464, 424, 27, 43), new Point(-14, -37));
_local4.addFrame(new Rectangle(27, 424, 27, 42), new Point(-14, -37));
_local4.addFrame(new Rectangle(653, 424, 27, 44), new Point(-14, -38));
_local4.addFrame(new Rectangle(451, 67, 27, 36), new Point(-12, -32));
_local4.addFrame(new Rectangle(70, 142, 29, 38), new Point(-13, -32));
_local4.addFrame(new Rectangle(99, 142, 29, 38), new Point(-13, -32));
_local4.addFrame(new Rectangle(478, 67, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(0, 104, 28, 37), new Point(-13, -31));
_local4.addFrame(new Rectangle(28, 104, 27, 37), new Point(-12, -31));
_local4.addFrame(new Rectangle(128, 142, 27, 38), new Point(-12, -32));
_local4.addFrame(new Rectangle(505, 67, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(155, 142, 28, 38), new Point(-12, -32));
_local4.addFrame(new Rectangle(439, 260, 26, 40), new Point(-13, -36));
_local4.addFrame(new Rectangle(680, 424, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(706, 424, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(54, 424, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(0, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(26, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(52, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(80, 424, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(78, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(183, 142, 51, 38), new Point(-23, -36));
_local4.addFrame(new Rectangle(492, 341, 44, 41), new Point(-23, -36));
_local4.addFrame(new Rectangle(234, 142, 41, 38), new Point(-21, -34));
_local4.addFrame(new Rectangle(135, 0, 37, 31), new Point(-19, -29));
_local4.addFrame(new Rectangle(37, 0, 35, 26), new Point(-18, -18));
_local4.addFrame(new Rectangle(408, 0, 33, 32), new Point(-16, -17));
_local4.addFrame(new Rectangle(55, 104, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(275, 142, 27, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(302, 142, 25, 38), new Point(-12, -31));
_local4.addFrame(new Rectangle(313, 181, 24, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(465, 260, 26, 40), new Point(-13, -31));
_local4.addFrame(new Rectangle(491, 260, 31, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(337, 181, 29, 39), new Point(-14, -31));
_local4.addFrame(new Rectangle(366, 181, 25, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(391, 181, 24, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(79, 104, 35, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(327, 142, 37, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(364, 142, 36, 38), new Point(-12, -31));
_local4.addFrame(new Rectangle(415, 181, 36, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(522, 260, 37, 40), new Point(-13, -31));
_local4.addFrame(new Rectangle(559, 260, 38, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(451, 181, 38, 39), new Point(-14, -31));
_local4.addFrame(new Rectangle(489, 181, 37, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(526, 181, 36, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(597, 260, 32, 40), new Point(-10, -33));
_local4.addFrame(new Rectangle(536, 341, 34, 41), new Point(-13, -34));
_local4.addFrame(new Rectangle(629, 260, 33, 40), new Point(-12, -33));
_local4.addFrame(new Rectangle(570, 341, 31, 41), new Point(-11, -33));
_local4.addFrame(new Rectangle(106, 424, 29, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(135, 424, 28, 42), new Point(-8, -33));
_local4.addFrame(new Rectangle(601, 341, 29, 41), new Point(-9, -33));
_local4.addFrame(new Rectangle(630, 341, 31, 41), new Point(-10, -33));
_local4.addFrame(new Rectangle(661, 341, 33, 41), new Point(-12, -33));
_local4.addFrame(new Rectangle(205, 468, 36, 45), new Point(-13, -38));
_local4.addFrame(new Rectangle(608, 468, 37, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(645, 468, 36, 46), new Point(-12, -39));
_local4.addFrame(new Rectangle(121, 515, 36, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(330, 515, 36, 48), new Point(-12, -39));
_local4.addFrame(new Rectangle(366, 515, 35, 48), new Point(-12, -39));
_local4.addFrame(new Rectangle(157, 515, 36, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(681, 468, 36, 46), new Point(-12, -38));
_local4.addFrame(new Rectangle(193, 515, 36, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(594, 515, 39, 50), new Point(-15, -44));
_local4.addFrame(new Rectangle(633, 515, 38, 52), new Point(-15, -44));
_local4.addFrame(new Rectangle(229, 515, 38, 47), new Point(-17, -40));
_local4.addFrame(new Rectangle(562, 181, 38, 39), new Point(-20, -33));
_local4.addFrame(new Rectangle(441, 0, 40, 32), new Point(-23, -24));
_local4.addFrame(new Rectangle(643, 33, 42, 34), new Point(-23, -18));
_local4.addFrame(new Rectangle(600, 181, 15, 39), new Point(-7, -32));
_local4.addFrame(new Rectangle(694, 341, 21, 41), new Point(-10, -32));
_local4.addFrame(new Rectangle(715, 341, 18, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(662, 260, 15, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(0, 382, 19, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(163, 424, 21, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(19, 382, 19, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(677, 260, 15, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(692, 260, 16, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(615, 181, 28, 39), new Point(-7, -32));
_local4.addFrame(new Rectangle(38, 382, 32, 41), new Point(-10, -32));
_local4.addFrame(new Rectangle(70, 382, 31, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(708, 260, 28, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(101, 382, 30, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(184, 424, 31, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(131, 382, 30, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(0, 300, 28, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(28, 300, 29, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(114, 104, 34, 37), new Point(-14, -30));
_local4.addFrame(new Rectangle(643, 181, 31, 39), new Point(-12, -30));
_local4.addFrame(new Rectangle(674, 181, 32, 39), new Point(-13, -30));
_local4.addFrame(new Rectangle(400, 142, 31, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(706, 181, 32, 39), new Point(-14, -30));
_local4.addFrame(new Rectangle(0, 220, 31, 39), new Point(-14, -30));
_local4.addFrame(new Rectangle(31, 220, 32, 39), new Point(-14, -30));
_local4.addFrame(new Rectangle(431, 142, 31, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(462, 142, 32, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(57, 300, 28, 40), new Point(-7, -33));
_local4.addFrame(new Rectangle(215, 424, 32, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(247, 424, 31, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(161, 382, 29, 41), new Point(-7, -33));
_local4.addFrame(new Rectangle(278, 424, 31, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(309, 424, 32, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(341, 424, 31, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(190, 382, 29, 41), new Point(-7, -33));
_local4.addFrame(new Rectangle(219, 382, 29, 41), new Point(-7, -33));
_local4.addFrame(new Rectangle(717, 515, 22, 54), new Point(-11, -46));
_local4.addFrame(new Rectangle(671, 515, 24, 52), new Point(-11, -44));
_local4.addFrame(new Rectangle(401, 515, 26, 48), new Point(-14, -40));
_local4.addFrame(new Rectangle(248, 382, 30, 41), new Point(-17, -33));
_local4.addFrame(new Rectangle(685, 33, 36, 34), new Point(-21, -26));
_local4.addFrame(new Rectangle(72, 0, 37, 27), new Point(-20, -15));
_local4.addFrame(new Rectangle(85, 300, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(109, 300, 31, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(140, 300, 29, 40), new Point(-14, -31));
_local4.addFrame(new Rectangle(63, 220, 25, 39), new Point(-13, -30));
_local4.addFrame(new Rectangle(88, 220, 25, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(148, 104, 27, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(113, 220, 26, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(169, 300, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(193, 300, 27, 40), new Point(-14, -31));
_local4.addFrame(new Rectangle(220, 300, 25, 40), new Point(-13, -31));
_local4.addFrame(new Rectangle(245, 300, 28, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(273, 300, 27, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(139, 220, 24, 39), new Point(-12, -30));
_local4.addFrame(new Rectangle(163, 220, 25, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(175, 104, 27, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(188, 220, 26, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(300, 300, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(324, 300, 25, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(202, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(494, 142, 35, 38), new Point(-18, -29));
_local4.addFrame(new Rectangle(237, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(272, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(532, 67, 35, 36), new Point(-18, -28));
_local4.addFrame(new Rectangle(226, 67, 35, 35), new Point(-18, -28));
_local4.addFrame(new Rectangle(567, 67, 35, 36), new Point(-18, -28));
_local4.addFrame(new Rectangle(307, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(342, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(278, 382, 36, 41), new Point(-13, -32));
_local4.addFrame(new Rectangle(314, 382, 35, 41), new Point(-12, -32));
_local4.addFrame(new Rectangle(349, 382, 36, 41), new Point(-12, -32));
_local4.addFrame(new Rectangle(349, 300, 36, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(214, 220, 36, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(529, 142, 37, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(250, 220, 37, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(385, 300, 36, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(385, 382, 36, 41), new Point(-12, -32));
_local4.addFrame(new Rectangle(241, 468, 39, 45), new Point(-17, -38));
_local4.addFrame(new Rectangle(104, 468, 40, 44), new Point(-16, -36));
_local4.addFrame(new Rectangle(491, 424, 39, 43), new Point(-17, -34));
_local4.addFrame(new Rectangle(530, 424, 39, 43), new Point(-20, -33));
_local4.addFrame(new Rectangle(566, 142, 40, 38), new Point(-23, -28));
_local4.addFrame(new Rectangle(56, 33, 41, 33), new Point(-23, -22));
break;
case "BondHead":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(141, 36, 12, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(153, 36, 12, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(294, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(306, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(318, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(165, 36, 12, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(330, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(342, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(354, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(177, 36, 13, 19), new Point(-7, -38));
_local4.addFrame(new Rectangle(190, 36, 13, 19), new Point(-7, -38));
_local4.addFrame(new Rectangle(366, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(379, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(203, 36, 14, 19), new Point(-8, -38));
_local4.addFrame(new Rectangle(217, 36, 14, 19), new Point(-8, -38));
_local4.addFrame(new Rectangle(231, 36, 14, 19), new Point(-8, -38));
_local4.addFrame(new Rectangle(392, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(405, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(245, 36, 12, 19), new Point(-5, -38));
_local4.addFrame(new Rectangle(0x0101, 36, 12, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(418, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(430, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(443, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(269, 36, 13, 19), new Point(-7, -38));
_local4.addFrame(new Rectangle(456, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(469, 0, 13, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(482, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(282, 36, 12, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(294, 36, 12, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(494, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(506, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(518, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(306, 36, 12, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(530, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(542, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(554, 0, 12, 18), new Point(-6, -37));
_local4.addFrame(new Rectangle(566, 0, 12, 18), new Point(-6, -39));
_local4.addFrame(new Rectangle(35, 0, 12, 15), new Point(-6, -35));
_local4.addFrame(new Rectangle(578, 0, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(318, 36, 15, 19), new Point(-6, -44));
_local4.addFrame(new Rectangle(63, 0, 16, 16), new Point(-6, -42));
_local4.addFrame(new Rectangle(333, 36, 16, 19), new Point(-7, -34));
_local4.addFrame(new Rectangle(262, 95, 16, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(278, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(294, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(310, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(326, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(418, 55, 16, 20), new Point(-9, -39));
_local4.addFrame(new Rectangle(342, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(358, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(374, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(390, 95, 16, 21), new Point(-9, -40));
_local4.addFrame(new Rectangle(406, 95, 16, 21), new Point(-10, -40));
_local4.addFrame(new Rectangle(422, 95, 16, 21), new Point(-10, -39));
_local4.addFrame(new Rectangle(438, 95, 16, 21), new Point(-10, -39));
_local4.addFrame(new Rectangle(454, 95, 16, 21), new Point(-10, -40));
_local4.addFrame(new Rectangle(470, 95, 16, 21), new Point(-10, -40));
_local4.addFrame(new Rectangle(486, 95, 16, 21), new Point(-10, -40));
_local4.addFrame(new Rectangle(502, 95, 16, 21), new Point(-10, -39));
_local4.addFrame(new Rectangle(518, 95, 16, 21), new Point(-10, -39));
_local4.addFrame(new Rectangle(534, 95, 16, 21), new Point(-8, -39));
_local4.addFrame(new Rectangle(550, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(566, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(582, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(598, 95, 17, 21), new Point(-10, -39));
_local4.addFrame(new Rectangle(434, 55, 17, 20), new Point(-10, -39));
_local4.addFrame(new Rectangle(615, 95, 17, 21), new Point(-10, -39));
_local4.addFrame(new Rectangle(632, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(648, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(664, 95, 16, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(680, 95, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(0, 116, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(16, 116, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(32, 116, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(451, 55, 16, 20), new Point(-9, -39));
_local4.addFrame(new Rectangle(48, 116, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(64, 116, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(80, 116, 16, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(467, 55, 17, 20), new Point(-7, -40));
_local4.addFrame(new Rectangle(349, 36, 19, 19), new Point(-10, -37));
_local4.addFrame(new Rectangle(96, 116, 17, 21), new Point(-5, -41));
_local4.addFrame(new Rectangle(113, 116, 19, 21), new Point(1, -42));
_local4.addFrame(new Rectangle(368, 36, 18, 19), new Point(10, -37));
_local4.addFrame(new Rectangle(386, 36, 19, 19), new Point(12, -28));
_local4.addFrame(new Rectangle(591, 0, 11, 18), new Point(-6, -38));
_local4.addFrame(new Rectangle(405, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(602, 0, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(613, 0, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(416, 36, 12, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(624, 0, 11, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(428, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(635, 0, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(646, 0, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(657, 0, 11, 18), new Point(-6, -39));
_local4.addFrame(new Rectangle(668, 0, 11, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(679, 0, 11, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(439, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(0, 18, 11, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(450, 36, 11, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(11, 18, 12, 18), new Point(-8, -39));
_local4.addFrame(new Rectangle(461, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(23, 18, 11, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(34, 18, 11, 18), new Point(-6, -38));
_local4.addFrame(new Rectangle(472, 36, 12, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(484, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(495, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(506, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(45, 18, 11, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(517, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(528, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(539, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(56, 18, 11, 18), new Point(-6, -38));
_local4.addFrame(new Rectangle(550, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(67, 18, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(78, 18, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(561, 36, 12, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(89, 18, 11, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(573, 36, 11, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(100, 18, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(111, 18, 11, 18), new Point(-7, -38));
_local4.addFrame(new Rectangle(584, 36, 13, 19), new Point(-4, -38));
_local4.addFrame(new Rectangle(484, 55, 16, 20), new Point(-9, -38));
_local4.addFrame(new Rectangle(597, 36, 14, 19), new Point(-2, -37));
_local4.addFrame(new Rectangle(122, 18, 17, 18), new Point(5, -33));
_local4.addFrame(new Rectangle(79, 0, 20, 17), new Point(16, -23));
_local4.addFrame(new Rectangle(47, 0, 16, 15), new Point(20, -11));
_local4.addFrame(new Rectangle(500, 55, 16, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(516, 55, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(532, 55, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(548, 55, 16, 20), new Point(-9, -40));
_local4.addFrame(new Rectangle(564, 55, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(580, 55, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(596, 55, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(612, 55, 16, 20), new Point(-9, -40));
_local4.addFrame(new Rectangle(628, 55, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(644, 55, 17, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(661, 55, 17, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(678, 55, 17, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(0, 75, 17, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(17, 75, 17, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(611, 36, 17, 19), new Point(-9, -41));
_local4.addFrame(new Rectangle(34, 75, 17, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(51, 75, 17, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(68, 75, 17, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(85, 75, 16, 20), new Point(-9, -40));
_local4.addFrame(new Rectangle(101, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(117, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(133, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(149, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(165, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(181, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(197, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(213, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(229, 75, 16, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(245, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(261, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(277, 75, 16, 20), new Point(-9, -40));
_local4.addFrame(new Rectangle(293, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(309, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(325, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(341, 75, 16, 20), new Point(-9, -40));
_local4.addFrame(new Rectangle(357, 75, 16, 20), new Point(-9, -41));
_local4.addFrame(new Rectangle(628, 36, 17, 19), new Point(-7, -37));
_local4.addFrame(new Rectangle(645, 36, 19, 19), new Point(-10, -38));
_local4.addFrame(new Rectangle(664, 36, 17, 19), new Point(-5, -35));
_local4.addFrame(new Rectangle(373, 75, 17, 20), new Point(0, -28));
_local4.addFrame(new Rectangle(99, 0, 20, 17), new Point(7, -10));
_local4.addFrame(new Rectangle(390, 75, 21, 20), new Point(9, 1));
_local4.addFrame(new Rectangle(119, 0, 12, 17), new Point(-6, -38));
_local4.addFrame(new Rectangle(139, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(151, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(131, 0, 12, 17), new Point(-6, -39));
_local4.addFrame(new Rectangle(163, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(175, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(187, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(143, 0, 12, 17), new Point(-6, -39));
_local4.addFrame(new Rectangle(199, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(211, 18, 13, 18), new Point(-6, -39));
_local4.addFrame(new Rectangle(224, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(237, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(250, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(263, 18, 14, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(277, 18, 14, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(291, 18, 14, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(305, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(318, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(331, 18, 12, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(343, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(355, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(155, 0, 13, 17), new Point(-6, -39));
_local4.addFrame(new Rectangle(367, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(380, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(393, 18, 13, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(168, 0, 13, 17), new Point(-6, -39));
_local4.addFrame(new Rectangle(181, 0, 12, 17), new Point(-6, -39));
_local4.addFrame(new Rectangle(193, 0, 12, 17), new Point(-6, -38));
_local4.addFrame(new Rectangle(406, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(418, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(205, 0, 12, 17), new Point(-6, -39));
_local4.addFrame(new Rectangle(430, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(442, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(454, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(217, 0, 12, 17), new Point(-6, -39));
_local4.addFrame(new Rectangle(466, 18, 12, 18), new Point(-6, -40));
_local4.addFrame(new Rectangle(478, 18, 12, 18), new Point(-6, -36));
_local4.addFrame(new Rectangle(229, 0, 12, 17), new Point(-6, -37));
_local4.addFrame(new Rectangle(241, 0, 13, 17), new Point(-7, -33));
_local4.addFrame(new Rectangle(490, 18, 15, 18), new Point(-9, -25));
_local4.addFrame(new Rectangle(505, 18, 16, 18), new Point(-10, -6));
_local4.addFrame(new Rectangle(411, 75, 16, 20), new Point(-9, 6));
_local4.addFrame(new Rectangle(427, 75, 16, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(443, 75, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(459, 75, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(0, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(16, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(475, 75, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(32, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(48, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(491, 75, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(64, 55, 16, 19), new Point(-7, -39));
_local4.addFrame(new Rectangle(507, 75, 16, 20), new Point(-6, -41));
_local4.addFrame(new Rectangle(523, 75, 16, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(539, 75, 16, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(555, 75, 16, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(571, 75, 16, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(587, 75, 16, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(603, 75, 16, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(619, 75, 16, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(635, 75, 16, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(651, 75, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(80, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(667, 75, 16, 20), new Point(-7, -40));
_local4.addFrame(new Rectangle(0, 95, 17, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(17, 95, 17, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(96, 55, 17, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(34, 95, 16, 20), new Point(-7, -40));
_local4.addFrame(new Rectangle(113, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(50, 95, 16, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(66, 95, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(82, 95, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(129, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(145, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(98, 95, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(161, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(177, 55, 16, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(114, 95, 16, 20), new Point(-7, -41));
_local4.addFrame(new Rectangle(130, 95, 17, 20), new Point(-10, -38));
_local4.addFrame(new Rectangle(193, 55, 19, 19), new Point(-9, -38));
_local4.addFrame(new Rectangle(147, 95, 17, 20), new Point(-12, -36));
_local4.addFrame(new Rectangle(521, 18, 19, 18), new Point(-20, -28));
_local4.addFrame(new Rectangle(0, 0, 19, 12), new Point(-29, -9));
_local4.addFrame(new Rectangle(254, 0, 19, 17), new Point(-31, 1));
_local4.addFrame(new Rectangle(540, 18, 11, 18), new Point(-5, -38));
_local4.addFrame(new Rectangle(551, 18, 11, 18), new Point(-4, -39));
_local4.addFrame(new Rectangle(212, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(562, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(223, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(234, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(573, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(584, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(245, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(595, 18, 11, 18), new Point(-5, -38));
_local4.addFrame(new Rectangle(606, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(617, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(628, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(639, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(650, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(661, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(672, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(683, 18, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(0x0100, 55, 11, 19), new Point(-5, -39));
_local4.addFrame(new Rectangle(267, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(0, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(11, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(22, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(278, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(33, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(44, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(55, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(66, 36, 11, 18), new Point(-5, -38));
_local4.addFrame(new Rectangle(77, 36, 11, 18), new Point(-4, -39));
_local4.addFrame(new Rectangle(289, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(88, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(300, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(311, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(99, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(110, 36, 11, 18), new Point(-4, -38));
_local4.addFrame(new Rectangle(322, 55, 11, 19), new Point(-4, -39));
_local4.addFrame(new Rectangle(333, 55, 13, 19), new Point(-9, -38));
_local4.addFrame(new Rectangle(164, 95, 16, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(180, 95, 14, 20), new Point(-12, -38));
_local4.addFrame(new Rectangle(346, 55, 16, 19), new Point(-22, -36));
_local4.addFrame(new Rectangle(121, 36, 20, 18), new Point(-36, -26));
_local4.addFrame(new Rectangle(19, 0, 16, 14), new Point(-36, -12));
_local4.addFrame(new Rectangle(651, 116, 16, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(132, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(148, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(164, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(180, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(196, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(212, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(228, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(244, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(260, 116, 17, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(277, 116, 17, 21), new Point(-8, -39));
_local4.addFrame(new Rectangle(294, 116, 17, 21), new Point(-8, -39));
_local4.addFrame(new Rectangle(194, 95, 17, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(311, 116, 17, 21), new Point(-8, -39));
_local4.addFrame(new Rectangle(328, 116, 17, 21), new Point(-8, -39));
_local4.addFrame(new Rectangle(211, 95, 17, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(228, 95, 17, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(345, 116, 17, 21), new Point(-8, -39));
_local4.addFrame(new Rectangle(362, 116, 16, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(378, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(394, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(410, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(426, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(442, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(458, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(474, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(490, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(667, 116, 16, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(506, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(522, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(538, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(554, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(570, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(586, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(602, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(618, 116, 16, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(245, 95, 17, 20), new Point(-10, -40));
_local4.addFrame(new Rectangle(362, 55, 19, 19), new Point(-9, -37));
_local4.addFrame(new Rectangle(634, 116, 17, 21), new Point(-12, -41));
_local4.addFrame(new Rectangle(381, 55, 17, 19), new Point(-17, -42));
_local4.addFrame(new Rectangle(398, 55, 20, 19), new Point(-27, -39));
_local4.addFrame(new Rectangle(273, 0, 21, 17), new Point(-30, -28));
break;
case "BondHeadCustom":
_local4 = new ThingClip(combine((_arg1 + "Color"), "MaleHeadCustomAlpha"));
_local2 = _local4;
_local4.addFrame(new Rectangle(296, 19, 14, 20), new Point(-7, -39));
_local4.addFrame(new Rectangle(310, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(324, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(338, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(352, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(366, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(380, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(394, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(408, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(422, 19, 14, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(436, 19, 15, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(451, 19, 15, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(466, 19, 14, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(480, 19, 14, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(494, 19, 14, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(508, 19, 14, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(522, 19, 14, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(536, 19, 15, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(83, 59, 13, 21), new Point(-6, -39));
_local4.addFrame(new Rectangle(551, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(565, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(579, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(593, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(607, 19, 15, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(96, 59, 14, 21), new Point(-7, -39));
_local4.addFrame(new Rectangle(622, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(636, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(650, 19, 14, 20), new Point(-7, -39));
_local4.addFrame(new Rectangle(664, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(678, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(692, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(706, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(720, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(734, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(748, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(762, 19, 14, 20), new Point(-7, -38));
_local4.addFrame(new Rectangle(266, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(56, 0, 14, 17), new Point(-7, -36));
_local4.addFrame(new Rectangle(280, 0, 14, 19), new Point(-7, -41));
_local4.addFrame(new Rectangle(110, 59, 17, 21), new Point(-7, -45));
_local4.addFrame(new Rectangle(70, 0, 17, 18), new Point(-7, -43));
_local4.addFrame(new Rectangle(0, 39, 17, 20), new Point(-7, -35));
_local4.addFrame(new Rectangle(655, 80, 17, 22), new Point(-9, -40));
_local4.addFrame(new Rectangle(250, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(268, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(286, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(672, 80, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(689, 80, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(706, 80, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(304, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(322, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(340, 124, 18, 23), new Point(-10, -41));
_local4.addFrame(new Rectangle(723, 80, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(741, 80, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(0, 102, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(18, 102, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(358, 124, 18, 23), new Point(-11, -41));
_local4.addFrame(new Rectangle(36, 102, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(54, 102, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(72, 102, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(376, 124, 18, 23), new Point(-9, -40));
_local4.addFrame(new Rectangle(90, 102, 18, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(394, 124, 17, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(411, 124, 17, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(108, 102, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(125, 102, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(142, 102, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(428, 124, 17, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(445, 124, 17, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(159, 102, 17, 22), new Point(-9, -40));
_local4.addFrame(new Rectangle(462, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(480, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(498, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(176, 102, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(193, 102, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(210, 102, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(516, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(534, 124, 18, 23), new Point(-10, -40));
_local4.addFrame(new Rectangle(227, 102, 18, 22), new Point(-7, -41));
_local4.addFrame(new Rectangle(127, 59, 20, 21), new Point(-11, -38));
_local4.addFrame(new Rectangle(245, 102, 18, 22), new Point(-5, -41));
_local4.addFrame(new Rectangle(263, 102, 19, 22), new Point(1, -42));
_local4.addFrame(new Rectangle(294, 0, 20, 19), new Point(9, -37));
_local4.addFrame(new Rectangle(17, 39, 21, 20), new Point(11, -28));
_local4.addFrame(new Rectangle(38, 39, 13, 20), new Point(-7, -39));
_local4.addFrame(new Rectangle(314, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(51, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(64, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(327, 0, 14, 19), new Point(-9, -39));
_local4.addFrame(new Rectangle(77, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(341, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(90, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(103, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(116, 39, 13, 20), new Point(-7, -40));
_local4.addFrame(new Rectangle(129, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(142, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(155, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(168, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(181, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(194, 39, 14, 20), new Point(-9, -40));
_local4.addFrame(new Rectangle(208, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(221, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(234, 39, 13, 20), new Point(-7, -39));
_local4.addFrame(new Rectangle(247, 39, 14, 20), new Point(-9, -40));
_local4.addFrame(new Rectangle(354, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(367, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(261, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(274, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(287, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(380, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(393, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(300, 39, 13, 20), new Point(-7, -39));
_local4.addFrame(new Rectangle(406, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(313, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(326, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(419, 0, 14, 19), new Point(-9, -39));
_local4.addFrame(new Rectangle(339, 39, 13, 20), new Point(-8, -40));
_local4.addFrame(new Rectangle(433, 0, 13, 19), new Point(-8, -39));
_local4.addFrame(new Rectangle(352, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(365, 39, 13, 20), new Point(-8, -39));
_local4.addFrame(new Rectangle(147, 59, 15, 21), new Point(-5, -39));
_local4.addFrame(new Rectangle(282, 102, 17, 22), new Point(-9, -39));
_local4.addFrame(new Rectangle(162, 59, 14, 21), new Point(-2, -38));
_local4.addFrame(new Rectangle(378, 39, 18, 20), new Point(5, -34));
_local4.addFrame(new Rectangle(446, 0, 21, 19), new Point(15, -24));
_local4.addFrame(new Rectangle(20, 0, 18, 16), new Point(19, -11));
_local4.addFrame(new Rectangle(299, 102, 17, 22), new Point(-9, -41));
_local4.addFrame(new Rectangle(316, 102, 17, 22), new Point(-10, -42));
_local4.addFrame(new Rectangle(176, 59, 17, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(193, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(211, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(333, 102, 18, 22), new Point(-10, -42));
_local4.addFrame(new Rectangle(229, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(247, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(265, 59, 17, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(282, 59, 18, 21), new Point(-9, -41));
_local4.addFrame(new Rectangle(300, 59, 18, 21), new Point(-10, -42));
_local4.addFrame(new Rectangle(318, 59, 18, 21), new Point(-10, -42));
_local4.addFrame(new Rectangle(336, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(396, 39, 19, 20), new Point(-10, -41));
_local4.addFrame(new Rectangle(354, 59, 19, 21), new Point(-10, -42));
_local4.addFrame(new Rectangle(415, 39, 19, 20), new Point(-10, -41));
_local4.addFrame(new Rectangle(373, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(391, 59, 18, 21), new Point(-10, -42));
_local4.addFrame(new Rectangle(409, 59, 18, 21), new Point(-10, -40));
_local4.addFrame(new Rectangle(427, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(445, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(463, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(351, 102, 18, 22), new Point(-10, -42));
_local4.addFrame(new Rectangle(369, 102, 18, 22), new Point(-10, -42));
_local4.addFrame(new Rectangle(387, 102, 18, 22), new Point(-10, -42));
_local4.addFrame(new Rectangle(481, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(499, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(405, 102, 17, 22), new Point(-9, -41));
_local4.addFrame(new Rectangle(422, 102, 17, 22), new Point(-10, -42));
_local4.addFrame(new Rectangle(517, 59, 17, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(534, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(552, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(439, 102, 18, 22), new Point(-10, -42));
_local4.addFrame(new Rectangle(570, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(588, 59, 18, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(606, 59, 17, 21), new Point(-10, -41));
_local4.addFrame(new Rectangle(623, 59, 18, 21), new Point(-7, -38));
_local4.addFrame(new Rectangle(467, 0, 20, 19), new Point(-11, -38));
_local4.addFrame(new Rectangle(641, 59, 18, 21), new Point(-6, -36));
_local4.addFrame(new Rectangle(659, 59, 18, 21), new Point(0, -28));
_local4.addFrame(new Rectangle(87, 0, 22, 18), new Point(6, -11));
_local4.addFrame(new Rectangle(677, 59, 22, 21), new Point(8, 0));
_local4.addFrame(new Rectangle(109, 0, 14, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(487, 0, 14, 19), new Point(-7, -41));
_local4.addFrame(new Rectangle(123, 0, 14, 18), new Point(-7, -40));
_local4.addFrame(new Rectangle(501, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(515, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(529, 0, 14, 19), new Point(-7, -41));
_local4.addFrame(new Rectangle(543, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(557, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(571, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(585, 0, 14, 19), new Point(-6, -39));
_local4.addFrame(new Rectangle(599, 0, 15, 19), new Point(-7, -41));
_local4.addFrame(new Rectangle(137, 0, 15, 18), new Point(-7, -40));
_local4.addFrame(new Rectangle(614, 0, 14, 19), new Point(-6, -40));
_local4.addFrame(new Rectangle(434, 39, 14, 20), new Point(-6, -41));
_local4.addFrame(new Rectangle(628, 0, 14, 19), new Point(-6, -41));
_local4.addFrame(new Rectangle(642, 0, 14, 19), new Point(-6, -40));
_local4.addFrame(new Rectangle(656, 0, 14, 19), new Point(-6, -40));
_local4.addFrame(new Rectangle(670, 0, 15, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(152, 0, 13, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(165, 0, 14, 18), new Point(-7, -40));
_local4.addFrame(new Rectangle(179, 0, 14, 18), new Point(-7, -40));
_local4.addFrame(new Rectangle(685, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(193, 0, 14, 18), new Point(-7, -40));
_local4.addFrame(new Rectangle(699, 0, 15, 19), new Point(-7, -41));
_local4.addFrame(new Rectangle(714, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(728, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(742, 0, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(207, 0, 14, 18), new Point(-7, -39));
_local4.addFrame(new Rectangle(756, 0, 14, 19), new Point(-7, -41));
_local4.addFrame(new Rectangle(221, 0, 14, 18), new Point(-7, -40));
_local4.addFrame(new Rectangle(0, 19, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(14, 19, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(28, 19, 14, 19), new Point(-7, -41));
_local4.addFrame(new Rectangle(42, 19, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(56, 19, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(70, 19, 14, 19), new Point(-7, -40));
_local4.addFrame(new Rectangle(84, 19, 14, 19), new Point(-7, -36));
_local4.addFrame(new Rectangle(235, 0, 14, 18), new Point(-7, -37));
_local4.addFrame(new Rectangle(98, 19, 14, 19), new Point(-7, -34));
_local4.addFrame(new Rectangle(112, 19, 17, 19), new Point(-10, -25));
_local4.addFrame(new Rectangle(249, 0, 17, 18), new Point(-10, -6));
_local4.addFrame(new Rectangle(457, 102, 17, 22), new Point(-10, 5));
_local4.addFrame(new Rectangle(699, 59, 17, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(716, 59, 18, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(474, 102, 18, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(734, 59, 18, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(752, 59, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(0, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(17, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(34, 80, 18, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(52, 80, 18, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(70, 80, 18, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(88, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(106, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(124, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(142, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(160, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(178, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(196, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(214, 80, 18, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(232, 80, 18, 21), new Point(-9, -41));
_local4.addFrame(new Rectangle(492, 102, 18, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(250, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(267, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(284, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(301, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(318, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(335, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(352, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(369, 80, 17, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(386, 80, 18, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(510, 102, 18, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(404, 80, 18, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(422, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(439, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(456, 80, 17, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(473, 80, 18, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(491, 80, 18, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(509, 80, 18, 21), new Point(-11, -38));
_local4.addFrame(new Rectangle(129, 19, 20, 19), new Point(-9, -38));
_local4.addFrame(new Rectangle(527, 80, 18, 21), new Point(-13, -36));
_local4.addFrame(new Rectangle(448, 39, 20, 20), new Point(-21, -29));
_local4.addFrame(new Rectangle(0, 0, 20, 14), new Point(-29, -10));
_local4.addFrame(new Rectangle(149, 19, 21, 19), new Point(-32, 0));
_local4.addFrame(new Rectangle(468, 39, 13, 20), new Point(-6, -39));
_local4.addFrame(new Rectangle(481, 39, 13, 20), new Point(-5, -40));
_local4.addFrame(new Rectangle(170, 19, 13, 19), new Point(-5, -39));
_local4.addFrame(new Rectangle(494, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(507, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(545, 80, 13, 21), new Point(-5, -40));
_local4.addFrame(new Rectangle(520, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(533, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(183, 19, 13, 19), new Point(-5, -39));
_local4.addFrame(new Rectangle(196, 19, 13, 19), new Point(-6, -38));
_local4.addFrame(new Rectangle(546, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(559, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(209, 19, 13, 19), new Point(-5, -38));
_local4.addFrame(new Rectangle(572, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(585, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(222, 19, 13, 19), new Point(-5, -38));
_local4.addFrame(new Rectangle(235, 19, 13, 19), new Point(-5, -38));
_local4.addFrame(new Rectangle(598, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(611, 39, 13, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(624, 39, 13, 20), new Point(-5, -40));
_local4.addFrame(new Rectangle(637, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(650, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(663, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(676, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(558, 80, 13, 21), new Point(-5, -40));
_local4.addFrame(new Rectangle(689, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(702, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(715, 39, 13, 20), new Point(-6, -39));
_local4.addFrame(new Rectangle(728, 39, 13, 20), new Point(-5, -40));
_local4.addFrame(new Rectangle(248, 19, 13, 19), new Point(-5, -39));
_local4.addFrame(new Rectangle(741, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(754, 39, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(571, 80, 13, 21), new Point(-5, -40));
_local4.addFrame(new Rectangle(0, 59, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(13, 59, 13, 20), new Point(-5, -39));
_local4.addFrame(new Rectangle(261, 19, 13, 19), new Point(-5, -39));
_local4.addFrame(new Rectangle(584, 80, 15, 21), new Point(-10, -39));
_local4.addFrame(new Rectangle(528, 102, 17, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(26, 59, 14, 20), new Point(-12, -38));
_local4.addFrame(new Rectangle(599, 80, 18, 21), new Point(-23, -37));
_local4.addFrame(new Rectangle(40, 59, 21, 20), new Point(-36, -27));
_local4.addFrame(new Rectangle(38, 0, 18, 16), new Point(-37, -13));
_local4.addFrame(new Rectangle(545, 102, 17, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(562, 102, 17, 22), new Point(-7, -40));
_local4.addFrame(new Rectangle(552, 124, 17, 23), new Point(-7, -40));
_local4.addFrame(new Rectangle(579, 102, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(597, 102, 18, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(615, 102, 18, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(569, 124, 18, 23), new Point(-8, -40));
_local4.addFrame(new Rectangle(633, 102, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(587, 124, 17, 23), new Point(-7, -40));
_local4.addFrame(new Rectangle(604, 124, 18, 23), new Point(-9, -40));
_local4.addFrame(new Rectangle(622, 124, 18, 23), new Point(-8, -40));
_local4.addFrame(new Rectangle(651, 102, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(669, 102, 19, 22), new Point(-9, -39));
_local4.addFrame(new Rectangle(688, 102, 19, 22), new Point(-9, -39));
_local4.addFrame(new Rectangle(707, 102, 19, 22), new Point(-9, -39));
_local4.addFrame(new Rectangle(726, 102, 19, 22), new Point(-9, -39));
_local4.addFrame(new Rectangle(745, 102, 19, 22), new Point(-9, -39));
_local4.addFrame(new Rectangle(0, 124, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(18, 124, 18, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(36, 124, 18, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(640, 124, 18, 23), new Point(-8, -40));
_local4.addFrame(new Rectangle(54, 124, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(658, 124, 18, 23), new Point(-8, -40));
_local4.addFrame(new Rectangle(72, 124, 18, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(676, 124, 18, 23), new Point(-8, -40));
_local4.addFrame(new Rectangle(90, 124, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(694, 124, 18, 23), new Point(-8, -40));
_local4.addFrame(new Rectangle(108, 124, 17, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(125, 124, 17, 22), new Point(-7, -40));
_local4.addFrame(new Rectangle(712, 124, 17, 23), new Point(-7, -40));
_local4.addFrame(new Rectangle(142, 124, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(160, 124, 18, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(178, 124, 18, 22), new Point(-8, -40));
_local4.addFrame(new Rectangle(729, 124, 18, 23), new Point(-8, -40));
_local4.addFrame(new Rectangle(196, 124, 18, 22), new Point(-8, -39));
_local4.addFrame(new Rectangle(747, 124, 17, 23), new Point(-7, -40));
_local4.addFrame(new Rectangle(214, 124, 18, 22), new Point(-11, -41));
_local4.addFrame(new Rectangle(617, 80, 20, 21), new Point(-9, -38));
_local4.addFrame(new Rectangle(232, 124, 18, 22), new Point(-12, -42));
_local4.addFrame(new Rectangle(637, 80, 18, 21), new Point(-18, -43));
_local4.addFrame(new Rectangle(61, 59, 22, 20), new Point(-28, -39));
_local4.addFrame(new Rectangle(274, 19, 22, 19), new Point(-30, -29));
break;
case "BamboBody":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(489, 0, 24, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(345, 32, 27, 33), new Point(-14, -27));
_local4.addFrame(new Rectangle(513, 0, 27, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(231, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(540, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(372, 32, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(566, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(0x0101, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(592, 0, 27, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(619, 0, 24, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(398, 32, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(643, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(283, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(669, 0, 25, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(424, 32, 25, 33), new Point(-12, -27));
_local4.addFrame(new Rectangle(694, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(309, 0, 26, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(720, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(280, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(711, 32, 27, 34), new Point(-15, -28));
_local4.addFrame(new Rectangle(738, 32, 27, 34), new Point(-15, -28));
_local4.addFrame(new Rectangle(449, 32, 27, 33), new Point(-15, -28));
_local4.addFrame(new Rectangle(306, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(332, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(358, 66, 26, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(476, 32, 26, 33), new Point(-15, -28));
_local4.addFrame(new Rectangle(0, 66, 27, 34), new Point(-15, -28));
_local4.addFrame(new Rectangle(0, 32, 24, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(502, 32, 25, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(24, 32, 25, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(335, 0, 25, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(49, 32, 25, 32), new Point(-12, -26));
_local4.addFrame(new Rectangle(527, 32, 25, 33), new Point(-12, -27));
_local4.addFrame(new Rectangle(74, 32, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(360, 0, 25, 31), new Point(-13, -26));
_local4.addFrame(new Rectangle(100, 32, 25, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(27, 66, 50, 34), new Point(-27, -30));
_local4.addFrame(new Rectangle(77, 66, 43, 34), new Point(-20, -29));
_local4.addFrame(new Rectangle(577, 66, 39, 36), new Point(-19, -30));
_local4.addFrame(new Rectangle(541, 102, 37, 37), new Point(-18, -30));
_local4.addFrame(new Rectangle(384, 66, 34, 35), new Point(-16, -27));
_local4.addFrame(new Rectangle(145, 0, 31, 30), new Point(-16, -22));
_local4.addFrame(new Rectangle(604, 139, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(578, 102, 26, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(604, 102, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(628, 139, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(652, 139, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(72, 253, 29, 39), new Point(-15, -31));
_local4.addFrame(new Rectangle(678, 139, 27, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(705, 139, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(729, 139, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(101, 253, 35, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(0, 177, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(37, 177, 36, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(73, 177, 35, 38), new Point(-23, -30));
_local4.addFrame(new Rectangle(136, 253, 36, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(172, 253, 37, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(209, 253, 36, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(245, 253, 35, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(280, 253, 36, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(316, 253, 30, 39), new Point(-21, -31));
_local4.addFrame(new Rectangle(108, 177, 34, 38), new Point(-21, -31));
_local4.addFrame(new Rectangle(142, 177, 32, 38), new Point(-20, -31));
_local4.addFrame(new Rectangle(346, 253, 30, 39), new Point(-20, -31));
_local4.addFrame(new Rectangle(376, 253, 28, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(404, 253, 27, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(431, 253, 27, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(458, 253, 29, 39), new Point(-20, -31));
_local4.addFrame(new Rectangle(487, 253, 32, 39), new Point(-21, -31));
_local4.addFrame(new Rectangle(519, 253, 35, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(174, 177, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(211, 177, 36, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(247, 177, 34, 38), new Point(-23, -30));
_local4.addFrame(new Rectangle(554, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(588, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(622, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(656, 253, 34, 39), new Point(-23, -31));
_local4.addFrame(new Rectangle(690, 253, 35, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(278, 413, 39, 44), new Point(-24, -38));
_local4.addFrame(new Rectangle(413, 371, 36, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(449, 371, 36, 41), new Point(-20, -33));
_local4.addFrame(new Rectangle(205, 331, 36, 40), new Point(-17, -32));
_local4.addFrame(new Rectangle(616, 66, 38, 36), new Point(-16, -27));
_local4.addFrame(new Rectangle(385, 0, 40, 31), new Point(-18, -22));
_local4.addFrame(new Rectangle(281, 177, 14, 38), new Point(-8, -31));
_local4.addFrame(new Rectangle(241, 331, 19, 40), new Point(-10, -32));
_local4.addFrame(new Rectangle(260, 331, 17, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(295, 177, 15, 38), new Point(-8, -31));
_local4.addFrame(new Rectangle(725, 253, 17, 39), new Point(-9, -31));
_local4.addFrame(new Rectangle(277, 331, 19, 40), new Point(-10, -32));
_local4.addFrame(new Rectangle(742, 253, 17, 39), new Point(-9, -31));
_local4.addFrame(new Rectangle(310, 177, 15, 38), new Point(-8, -31));
_local4.addFrame(new Rectangle(0, 292, 15, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(15, 292, 26, 39), new Point(-20, -32));
_local4.addFrame(new Rectangle(296, 331, 30, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(326, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(41, 292, 28, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(355, 331, 28, 40), new Point(-20, -32));
_local4.addFrame(new Rectangle(383, 331, 29, 40), new Point(-20, -32));
_local4.addFrame(new Rectangle(412, 331, 28, 40), new Point(-20, -32));
_local4.addFrame(new Rectangle(69, 292, 28, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(440, 331, 28, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(628, 102, 32, 37), new Point(-19, -30));
_local4.addFrame(new Rectangle(325, 177, 31, 38), new Point(-19, -30));
_local4.addFrame(new Rectangle(356, 177, 30, 38), new Point(-18, -30));
_local4.addFrame(new Rectangle(660, 102, 30, 37), new Point(-17, -30));
_local4.addFrame(new Rectangle(386, 177, 30, 38), new Point(-17, -30));
_local4.addFrame(new Rectangle(416, 177, 30, 38), new Point(-17, -30));
_local4.addFrame(new Rectangle(446, 177, 30, 38), new Point(-17, -30));
_local4.addFrame(new Rectangle(690, 102, 31, 37), new Point(-18, -30));
_local4.addFrame(new Rectangle(476, 177, 30, 38), new Point(-18, -30));
_local4.addFrame(new Rectangle(97, 292, 26, 39), new Point(-20, -32));
_local4.addFrame(new Rectangle(468, 331, 30, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(498, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(123, 292, 28, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(527, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(556, 331, 30, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(586, 331, 29, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(151, 292, 28, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(615, 331, 28, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(724, 458, 21, 52), new Point(-10, -45));
_local4.addFrame(new Rectangle(640, 458, 24, 49), new Point(-13, -42));
_local4.addFrame(new Rectangle(106, 458, 24, 46), new Point(-11, -39));
_local4.addFrame(new Rectangle(688, 371, 30, 42), new Point(-13, -35));
_local4.addFrame(new Rectangle(120, 66, 35, 34), new Point(-15, -26));
_local4.addFrame(new Rectangle(34, 0, 37, 25), new Point(-17, -14));
_local4.addFrame(new Rectangle(721, 102, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(506, 177, 30, 38), new Point(-15, -30));
_local4.addFrame(new Rectangle(536, 177, 27, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(563, 177, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(745, 102, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(654, 66, 26, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(680, 66, 25, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(0, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(587, 177, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(554, 413, 24, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(431, 458, 26, 47), new Point(-15, -39));
_local4.addFrame(new Rectangle(130, 458, 25, 46), new Point(-14, -38));
_local4.addFrame(new Rectangle(155, 458, 23, 46), new Point(-12, -38));
_local4.addFrame(new Rectangle(578, 413, 24, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(317, 413, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(343, 413, 25, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(602, 413, 23, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(178, 458, 24, 46), new Point(-13, -38));
_local4.addFrame(new Rectangle(613, 177, 33, 38), new Point(-16, -31));
_local4.addFrame(new Rectangle(179, 292, 33, 39), new Point(-16, -31));
_local4.addFrame(new Rectangle(646, 177, 33, 38), new Point(-16, -30));
_local4.addFrame(new Rectangle(679, 177, 33, 38), new Point(-16, -30));
_local4.addFrame(new Rectangle(24, 139, 33, 37), new Point(-16, -30));
_local4.addFrame(new Rectangle(705, 66, 33, 36), new Point(-16, -30));
_local4.addFrame(new Rectangle(0, 102, 33, 36), new Point(-16, -30));
_local4.addFrame(new Rectangle(57, 139, 33, 37), new Point(-16, -30));
_local4.addFrame(new Rectangle(212, 292, 33, 39), new Point(-16, -31));
_local4.addFrame(new Rectangle(625, 413, 35, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(457, 458, 34, 47), new Point(-23, -39));
_local4.addFrame(new Rectangle(202, 458, 34, 46), new Point(-23, -38));
_local4.addFrame(new Rectangle(236, 458, 34, 46), new Point(-23, -38));
_local4.addFrame(new Rectangle(660, 413, 35, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(368, 413, 37, 44), new Point(-24, -38));
_local4.addFrame(new Rectangle(405, 413, 36, 44), new Point(-24, -38));
_local4.addFrame(new Rectangle(695, 413, 34, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(270, 458, 34, 46), new Point(-23, -38));
_local4.addFrame(new Rectangle(491, 458, 38, 47), new Point(-22, -42));
_local4.addFrame(new Rectangle(563, 458, 38, 48), new Point(-23, -42));
_local4.addFrame(new Rectangle(441, 413, 38, 44), new Point(-21, -39));
_local4.addFrame(new Rectangle(245, 292, 38, 39), new Point(-19, -35));
_local4.addFrame(new Rectangle(125, 32, 39, 32), new Point(-16, -24));
_local4.addFrame(new Rectangle(164, 32, 40, 32), new Point(-18, -17));
_local4.addFrame(new Rectangle(176, 0, 24, 30), new Point(-12, -27));
_local4.addFrame(new Rectangle(552, 32, 27, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(579, 32, 27, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(425, 0, 26, 31), new Point(-13, -27));
_local4.addFrame(new Rectangle(606, 32, 26, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(632, 32, 26, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(658, 32, 26, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(204, 32, 26, 32), new Point(-13, -27));
_local4.addFrame(new Rectangle(684, 32, 27, 33), new Point(-13, -28));
_local4.addFrame(new Rectangle(283, 292, 24, 39), new Point(-12, -36));
_local4.addFrame(new Rectangle(718, 371, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(0, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(643, 331, 26, 40), new Point(-13, -36));
_local4.addFrame(new Rectangle(485, 371, 25, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(510, 371, 25, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(535, 371, 26, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(561, 371, 26, 41), new Point(-13, -36));
_local4.addFrame(new Rectangle(26, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(155, 66, 26, 34), new Point(-12, -31));
_local4.addFrame(new Rectangle(33, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(60, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(418, 66, 27, 35), new Point(-12, -31));
_local4.addFrame(new Rectangle(87, 102, 26, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(90, 139, 26, 37), new Point(-12, -31));
_local4.addFrame(new Rectangle(113, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(140, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(167, 102, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(307, 292, 25, 39), new Point(-13, -36));
_local4.addFrame(new Rectangle(52, 413, 25, 42), new Point(-12, -37));
_local4.addFrame(new Rectangle(77, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(669, 331, 25, 40), new Point(-12, -36));
_local4.addFrame(new Rectangle(103, 413, 25, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(218, 413, 25, 43), new Point(-13, -37));
_local4.addFrame(new Rectangle(128, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(587, 371, 25, 41), new Point(-12, -36));
_local4.addFrame(new Rectangle(154, 413, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(194, 102, 51, 36), new Point(-23, -35));
_local4.addFrame(new Rectangle(694, 331, 43, 40), new Point(-23, -36));
_local4.addFrame(new Rectangle(245, 102, 39, 36), new Point(-20, -33));
_local4.addFrame(new Rectangle(108, 0, 37, 29), new Point(-19, -28));
_local4.addFrame(new Rectangle(0, 0, 34, 24), new Point(-18, -17));
_local4.addFrame(new Rectangle(200, 0, 31, 30), new Point(-15, -16));
_local4.addFrame(new Rectangle(284, 102, 24, 36), new Point(-12, -30));
_local4.addFrame(new Rectangle(308, 102, 26, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(116, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(140, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(712, 177, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(738, 177, 30, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(0, 215, 27, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(27, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(164, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(334, 102, 35, 36), new Point(-12, -30));
_local4.addFrame(new Rectangle(369, 102, 37, 36), new Point(-13, -30));
_local4.addFrame(new Rectangle(188, 139, 36, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(224, 139, 35, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(51, 215, 36, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(87, 215, 37, 38), new Point(-14, -30));
_local4.addFrame(new Rectangle(124, 215, 36, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(160, 215, 35, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(259, 139, 36, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(195, 215, 30, 38), new Point(-9, -32));
_local4.addFrame(new Rectangle(332, 292, 34, 39), new Point(-13, -33));
_local4.addFrame(new Rectangle(366, 292, 32, 39), new Point(-12, -32));
_local4.addFrame(new Rectangle(398, 292, 30, 39), new Point(-10, -32));
_local4.addFrame(new Rectangle(737, 331, 27, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(0, 371, 27, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(27, 371, 27, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(54, 371, 29, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(428, 292, 32, 39), new Point(-11, -32));
_local4.addFrame(new Rectangle(243, 413, 35, 43), new Point(-12, -37));
_local4.addFrame(new Rectangle(479, 413, 37, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(729, 413, 36, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(0, 458, 34, 45), new Point(-11, -38));
_local4.addFrame(new Rectangle(304, 458, 34, 46), new Point(-11, -38));
_local4.addFrame(new Rectangle(529, 458, 34, 47), new Point(-11, -39));
_local4.addFrame(new Rectangle(338, 458, 34, 46), new Point(-11, -38));
_local4.addFrame(new Rectangle(372, 458, 34, 46), new Point(-11, -38));
_local4.addFrame(new Rectangle(34, 458, 36, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(601, 458, 39, 48), new Point(-15, -43));
_local4.addFrame(new Rectangle(664, 458, 36, 50), new Point(-14, -43));
_local4.addFrame(new Rectangle(70, 458, 36, 45), new Point(-16, -39));
_local4.addFrame(new Rectangle(225, 215, 36, 38), new Point(-19, -33));
_local4.addFrame(new Rectangle(451, 0, 38, 31), new Point(-22, -23));
_local4.addFrame(new Rectangle(230, 32, 40, 32), new Point(-22, -17));
_local4.addFrame(new Rectangle(261, 215, 14, 38), new Point(-6, -31));
_local4.addFrame(new Rectangle(83, 371, 19, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(460, 292, 17, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(275, 215, 15, 38), new Point(-7, -31));
_local4.addFrame(new Rectangle(477, 292, 17, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(102, 371, 19, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(494, 292, 17, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(511, 292, 15, 39), new Point(-7, -31));
_local4.addFrame(new Rectangle(526, 292, 15, 39), new Point(-7, -31));
_local4.addFrame(new Rectangle(290, 215, 26, 38), new Point(-6, -31));
_local4.addFrame(new Rectangle(121, 371, 30, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(541, 292, 29, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(316, 215, 28, 38), new Point(-7, -31));
_local4.addFrame(new Rectangle(570, 292, 28, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(151, 371, 29, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(598, 292, 28, 39), new Point(-8, -31));
_local4.addFrame(new Rectangle(626, 292, 28, 39), new Point(-7, -31));
_local4.addFrame(new Rectangle(654, 292, 28, 39), new Point(-7, -31));
_local4.addFrame(new Rectangle(295, 139, 32, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(344, 215, 31, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(375, 215, 30, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(406, 102, 30, 36), new Point(-13, -29));
_local4.addFrame(new Rectangle(327, 139, 30, 37), new Point(-13, -29));
_local4.addFrame(new Rectangle(405, 215, 30, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(357, 139, 30, 37), new Point(-13, -29));
_local4.addFrame(new Rectangle(387, 139, 31, 37), new Point(-13, -29));
_local4.addFrame(new Rectangle(435, 215, 30, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(682, 292, 26, 39), new Point(-6, -32));
_local4.addFrame(new Rectangle(180, 371, 30, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(210, 371, 29, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(708, 292, 28, 39), new Point(-7, -32));
_local4.addFrame(new Rectangle(239, 371, 29, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(268, 371, 30, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(298, 371, 29, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(327, 371, 28, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(355, 371, 28, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(745, 458, 21, 52), new Point(-11, -45));
_local4.addFrame(new Rectangle(700, 458, 24, 51), new Point(-11, -44));
_local4.addFrame(new Rectangle(406, 458, 25, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(383, 371, 30, 40), new Point(-17, -33));
_local4.addFrame(new Rectangle(270, 32, 35, 32), new Point(-20, -25));
_local4.addFrame(new Rectangle(71, 0, 37, 26), new Point(-20, -15));
_local4.addFrame(new Rectangle(465, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(489, 215, 31, 38), new Point(-15, -30));
_local4.addFrame(new Rectangle(520, 215, 27, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(547, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(418, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(442, 139, 26, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(468, 139, 25, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(571, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(595, 215, 26, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(621, 215, 24, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(645, 215, 27, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(672, 215, 25, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(697, 215, 23, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(493, 139, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(517, 139, 26, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(543, 139, 25, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(720, 215, 23, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(743, 215, 24, 38), new Point(-11, -30));
_local4.addFrame(new Rectangle(436, 102, 33, 36), new Point(-17, -28));
_local4.addFrame(new Rectangle(469, 102, 33, 36), new Point(-17, -28));
_local4.addFrame(new Rectangle(445, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(478, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(181, 66, 33, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(214, 66, 33, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(247, 66, 33, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(511, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(544, 66, 33, 35), new Point(-17, -27));
_local4.addFrame(new Rectangle(0, 331, 35, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(35, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(69, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(103, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(0, 253, 35, 38), new Point(-12, -31));
_local4.addFrame(new Rectangle(35, 253, 37, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(568, 139, 36, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(137, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(171, 331, 34, 39), new Point(-11, -31));
_local4.addFrame(new Rectangle(516, 413, 38, 44), new Point(-16, -38));
_local4.addFrame(new Rectangle(180, 413, 38, 42), new Point(-15, -35));
_local4.addFrame(new Rectangle(612, 371, 38, 41), new Point(-17, -33));
_local4.addFrame(new Rectangle(650, 371, 38, 41), new Point(-19, -32));
_local4.addFrame(new Rectangle(502, 102, 39, 36), new Point(-23, -27));
_local4.addFrame(new Rectangle(305, 32, 40, 32), new Point(-22, -22));
break;
case "BamboBodyCustom":
_local4 = new ThingClip(combine((_arg1 + "Color"), "MaleBodyCustomAlpha"));
_local2 = _local4;
_local4.addFrame(new Rectangle(481, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(97, 33, 29, 34), new Point(-15, -27));
_local4.addFrame(new Rectangle(507, 0, 28, 33), new Point(-14, -27));
_local4.addFrame(new Rectangle(172, 0, 28, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(126, 33, 28, 34), new Point(-14, -27));
_local4.addFrame(new Rectangle(154, 33, 28, 34), new Point(-14, -27));
_local4.addFrame(new Rectangle(182, 33, 28, 34), new Point(-14, -27));
_local4.addFrame(new Rectangle(200, 0, 28, 32), new Point(-14, -26));
_local4.addFrame(new Rectangle(535, 0, 28, 33), new Point(-14, -27));
_local4.addFrame(new Rectangle(563, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(210, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(589, 0, 27, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(228, 0, 27, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(237, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(264, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(291, 33, 27, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(0xFF, 0, 27, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(616, 0, 27, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(261, 67, 27, 36), new Point(-15, -30));
_local4.addFrame(new Rectangle(288, 67, 29, 36), new Point(-16, -29));
_local4.addFrame(new Rectangle(0, 67, 29, 35), new Point(-16, -29));
_local4.addFrame(new Rectangle(29, 67, 27, 35), new Point(-15, -29));
_local4.addFrame(new Rectangle(317, 67, 28, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(602, 67, 27, 37), new Point(-15, -30));
_local4.addFrame(new Rectangle(345, 67, 27, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(56, 67, 27, 35), new Point(-15, -29));
_local4.addFrame(new Rectangle(83, 67, 28, 35), new Point(-16, -29));
_local4.addFrame(new Rectangle(643, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(318, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(669, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(282, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(344, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(370, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(396, 33, 26, 34), new Point(-13, -27));
_local4.addFrame(new Rectangle(308, 0, 26, 32), new Point(-13, -26));
_local4.addFrame(new Rectangle(695, 0, 26, 33), new Point(-13, -27));
_local4.addFrame(new Rectangle(111, 67, 51, 35), new Point(-28, -30));
_local4.addFrame(new Rectangle(372, 67, 44, 36), new Point(-21, -30));
_local4.addFrame(new Rectangle(377, 104, 41, 38), new Point(-20, -31));
_local4.addFrame(new Rectangle(606, 142, 37, 39), new Point(-18, -31));
_local4.addFrame(new Rectangle(416, 67, 35, 36), new Point(-17, -28));
_local4.addFrame(new Rectangle(334, 0, 33, 32), new Point(-17, -23));
_local4.addFrame(new Rectangle(287, 220, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(418, 104, 27, 38), new Point(-14, -31));
_local4.addFrame(new Rectangle(445, 104, 25, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(311, 220, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(335, 220, 27, 40), new Point(-14, -31));
_local4.addFrame(new Rectangle(362, 220, 31, 40), new Point(-16, -31));
_local4.addFrame(new Rectangle(393, 220, 29, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(422, 220, 25, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(447, 220, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(421, 300, 35, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(470, 104, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(643, 142, 36, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(471, 220, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(456, 300, 37, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(493, 300, 38, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(531, 300, 38, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(507, 220, 37, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(544, 220, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(580, 220, 32, 40), new Point(-22, -31));
_local4.addFrame(new Rectangle(679, 142, 34, 39), new Point(-21, -32));
_local4.addFrame(new Rectangle(612, 220, 33, 40), new Point(-21, -32));
_local4.addFrame(new Rectangle(645, 220, 31, 40), new Point(-20, -31));
_local4.addFrame(new Rectangle(569, 300, 29, 41), new Point(-20, -32));
_local4.addFrame(new Rectangle(598, 300, 28, 41), new Point(-20, -32));
_local4.addFrame(new Rectangle(626, 300, 29, 41), new Point(-20, -32));
_local4.addFrame(new Rectangle(676, 220, 31, 40), new Point(-21, -31));
_local4.addFrame(new Rectangle(655, 300, 33, 41), new Point(-21, -32));
_local4.addFrame(new Rectangle(688, 300, 36, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(507, 104, 37, 38), new Point(-24, -31));
_local4.addFrame(new Rectangle(0, 181, 36, 39), new Point(-24, -31));
_local4.addFrame(new Rectangle(707, 220, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(0, 341, 36, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(36, 341, 35, 41), new Point(-23, -32));
_local4.addFrame(new Rectangle(71, 341, 36, 41), new Point(-24, -32));
_local4.addFrame(new Rectangle(0, 260, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(36, 260, 36, 40), new Point(-24, -31));
_local4.addFrame(new Rectangle(280, 468, 39, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(421, 382, 38, 42), new Point(-23, -34));
_local4.addFrame(new Rectangle(372, 424, 38, 43), new Point(-21, -34));
_local4.addFrame(new Rectangle(459, 382, 38, 42), new Point(-18, -33));
_local4.addFrame(new Rectangle(629, 67, 40, 37), new Point(-17, -28));
_local4.addFrame(new Rectangle(367, 0, 41, 32), new Point(-18, -22));
_local4.addFrame(new Rectangle(36, 181, 15, 39), new Point(-8, -32));
_local4.addFrame(new Rectangle(107, 341, 21, 41), new Point(-11, -32));
_local4.addFrame(new Rectangle(128, 341, 18, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(72, 260, 15, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(146, 341, 19, 41), new Point(-10, -32));
_local4.addFrame(new Rectangle(165, 341, 21, 41), new Point(-11, -32));
_local4.addFrame(new Rectangle(87, 260, 19, 40), new Point(-10, -32));
_local4.addFrame(new Rectangle(106, 260, 15, 40), new Point(-8, -32));
_local4.addFrame(new Rectangle(121, 260, 16, 40), new Point(-9, -32));
_local4.addFrame(new Rectangle(137, 260, 28, 40), new Point(-21, -33));
_local4.addFrame(new Rectangle(497, 382, 32, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(529, 382, 31, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(186, 341, 28, 41), new Point(-21, -33));
_local4.addFrame(new Rectangle(560, 382, 30, 42), new Point(-21, -33));
_local4.addFrame(new Rectangle(590, 382, 31, 42), new Point(-21, -33));
_local4.addFrame(new Rectangle(214, 341, 30, 41), new Point(-21, -33));
_local4.addFrame(new Rectangle(244, 341, 28, 41), new Point(-21, -33));
_local4.addFrame(new Rectangle(272, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(669, 67, 34, 37), new Point(-20, -30));
_local4.addFrame(new Rectangle(165, 260, 31, 40), new Point(-19, -31));
_local4.addFrame(new Rectangle(196, 260, 32, 40), new Point(-19, -31));
_local4.addFrame(new Rectangle(51, 181, 31, 39), new Point(-18, -31));
_local4.addFrame(new Rectangle(228, 260, 32, 40), new Point(-18, -31));
_local4.addFrame(new Rectangle(260, 260, 31, 40), new Point(-17, -31));
_local4.addFrame(new Rectangle(82, 181, 32, 39), new Point(-18, -31));
_local4.addFrame(new Rectangle(544, 104, 31, 38), new Point(-18, -30));
_local4.addFrame(new Rectangle(114, 181, 32, 39), new Point(-19, -31));
_local4.addFrame(new Rectangle(291, 260, 28, 40), new Point(-21, -33));
_local4.addFrame(new Rectangle(621, 382, 32, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(653, 382, 31, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(301, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(684, 382, 31, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(715, 382, 32, 42), new Point(-22, -33));
_local4.addFrame(new Rectangle(330, 341, 31, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(361, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(390, 341, 29, 41), new Point(-22, -33));
_local4.addFrame(new Rectangle(695, 515, 22, 54), new Point(-11, -46));
_local4.addFrame(new Rectangle(530, 515, 24, 50), new Point(-13, -42));
_local4.addFrame(new Rectangle(717, 468, 26, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(569, 424, 30, 44), new Point(-13, -36));
_local4.addFrame(new Rectangle(162, 67, 36, 35), new Point(-15, -27));
_local4.addFrame(new Rectangle(0, 0, 37, 26), new Point(-17, -15));
_local4.addFrame(new Rectangle(703, 67, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(319, 260, 31, 40), new Point(-16, -31));
_local4.addFrame(new Rectangle(350, 260, 29, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(575, 104, 25, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(600, 104, 25, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(625, 104, 28, 38), new Point(-14, -31));
_local4.addFrame(new Rectangle(653, 104, 26, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(679, 104, 25, 38), new Point(-12, -30));
_local4.addFrame(new Rectangle(146, 181, 27, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(144, 468, 25, 45), new Point(-12, -38));
_local4.addFrame(new Rectangle(427, 515, 28, 49), new Point(-16, -40));
_local4.addFrame(new Rectangle(267, 515, 27, 48), new Point(-15, -39));
_local4.addFrame(new Rectangle(319, 468, 24, 46), new Point(-12, -38));
_local4.addFrame(new Rectangle(343, 468, 25, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(368, 468, 28, 46), new Point(-14, -39));
_local4.addFrame(new Rectangle(396, 468, 26, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(0, 515, 24, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(24, 515, 25, 47), new Point(-13, -39));
_local4.addFrame(new Rectangle(173, 181, 35, 39), new Point(-17, -32));
_local4.addFrame(new Rectangle(419, 341, 34, 41), new Point(-17, -32));
_local4.addFrame(new Rectangle(379, 260, 34, 40), new Point(-17, -31));
_local4.addFrame(new Rectangle(208, 181, 35, 39), new Point(-17, -31));
_local4.addFrame(new Rectangle(704, 104, 35, 38), new Point(-17, -31));
_local4.addFrame(new Rectangle(0, 142, 35, 38), new Point(-17, -31));
_local4.addFrame(new Rectangle(35, 142, 35, 38), new Point(-17, -31));
_local4.addFrame(new Rectangle(243, 181, 35, 39), new Point(-17, -31));
_local4.addFrame(new Rectangle(278, 181, 35, 39), new Point(-17, -31));
_local4.addFrame(new Rectangle(169, 468, 36, 45), new Point(-23, -38));
_local4.addFrame(new Rectangle(455, 515, 35, 49), new Point(-23, -40));
_local4.addFrame(new Rectangle(294, 515, 36, 48), new Point(-24, -39));
_local4.addFrame(new Rectangle(422, 468, 36, 46), new Point(-24, -38));
_local4.addFrame(new Rectangle(458, 468, 36, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(494, 468, 38, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(532, 468, 37, 46), new Point(-24, -39));
_local4.addFrame(new Rectangle(49, 515, 36, 47), new Point(-24, -39));
_local4.addFrame(new Rectangle(85, 515, 36, 47), new Point(-24, -39));
_local4.addFrame(new Rectangle(490, 515, 40, 49), new Point(-23, -43));
_local4.addFrame(new Rectangle(554, 515, 40, 50), new Point(-24, -43));
_local4.addFrame(new Rectangle(569, 468, 39, 46), new Point(-22, -40));
_local4.addFrame(new Rectangle(453, 341, 39, 41), new Point(-19, -36));
_local4.addFrame(new Rectangle(422, 33, 40, 34), new Point(-17, -25));
_local4.addFrame(new Rectangle(462, 33, 41, 34), new Point(-18, -18));
_local4.addFrame(new Rectangle(109, 0, 26, 31), new Point(-13, -27));
_local4.addFrame(new Rectangle(198, 67, 28, 35), new Point(-14, -29));
_local4.addFrame(new Rectangle(503, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(0, 33, 28, 33), new Point(-14, -28));
_local4.addFrame(new Rectangle(531, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(559, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(587, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(28, 33, 28, 33), new Point(-14, -28));
_local4.addFrame(new Rectangle(615, 33, 28, 34), new Point(-14, -28));
_local4.addFrame(new Rectangle(413, 260, 26, 40), new Point(-13, -36));
_local4.addFrame(new Rectangle(599, 424, 27, 44), new Point(-14, -38));
_local4.addFrame(new Rectangle(626, 424, 27, 44), new Point(-14, -38));
_local4.addFrame(new Rectangle(0, 424, 27, 42), new Point(-14, -37));
_local4.addFrame(new Rectangle(410, 424, 27, 43), new Point(-14, -37));
_local4.addFrame(new Rectangle(437, 424, 27, 43), new Point(-14, -37));
_local4.addFrame(new Rectangle(464, 424, 27, 43), new Point(-14, -37));
_local4.addFrame(new Rectangle(27, 424, 27, 42), new Point(-14, -37));
_local4.addFrame(new Rectangle(653, 424, 27, 44), new Point(-14, -38));
_local4.addFrame(new Rectangle(451, 67, 27, 36), new Point(-12, -32));
_local4.addFrame(new Rectangle(70, 142, 29, 38), new Point(-13, -32));
_local4.addFrame(new Rectangle(99, 142, 29, 38), new Point(-13, -32));
_local4.addFrame(new Rectangle(478, 67, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(0, 104, 28, 37), new Point(-13, -31));
_local4.addFrame(new Rectangle(28, 104, 27, 37), new Point(-12, -31));
_local4.addFrame(new Rectangle(128, 142, 27, 38), new Point(-12, -32));
_local4.addFrame(new Rectangle(505, 67, 27, 36), new Point(-12, -31));
_local4.addFrame(new Rectangle(155, 142, 28, 38), new Point(-12, -32));
_local4.addFrame(new Rectangle(439, 260, 26, 40), new Point(-13, -36));
_local4.addFrame(new Rectangle(680, 424, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(706, 424, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(54, 424, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(0, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(26, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(52, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(80, 424, 26, 42), new Point(-13, -37));
_local4.addFrame(new Rectangle(78, 468, 26, 44), new Point(-13, -38));
_local4.addFrame(new Rectangle(183, 142, 51, 38), new Point(-23, -36));
_local4.addFrame(new Rectangle(492, 341, 44, 41), new Point(-23, -36));
_local4.addFrame(new Rectangle(234, 142, 41, 38), new Point(-21, -34));
_local4.addFrame(new Rectangle(135, 0, 37, 31), new Point(-19, -29));
_local4.addFrame(new Rectangle(37, 0, 35, 26), new Point(-18, -18));
_local4.addFrame(new Rectangle(408, 0, 33, 32), new Point(-16, -17));
_local4.addFrame(new Rectangle(55, 104, 24, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(275, 142, 27, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(302, 142, 25, 38), new Point(-12, -31));
_local4.addFrame(new Rectangle(313, 181, 24, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(465, 260, 26, 40), new Point(-13, -31));
_local4.addFrame(new Rectangle(491, 260, 31, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(337, 181, 29, 39), new Point(-14, -31));
_local4.addFrame(new Rectangle(366, 181, 25, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(391, 181, 24, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(79, 104, 35, 37), new Point(-12, -30));
_local4.addFrame(new Rectangle(327, 142, 37, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(364, 142, 36, 38), new Point(-12, -31));
_local4.addFrame(new Rectangle(415, 181, 36, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(522, 260, 37, 40), new Point(-13, -31));
_local4.addFrame(new Rectangle(559, 260, 38, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(451, 181, 38, 39), new Point(-14, -31));
_local4.addFrame(new Rectangle(489, 181, 37, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(526, 181, 36, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(597, 260, 32, 40), new Point(-10, -33));
_local4.addFrame(new Rectangle(536, 341, 34, 41), new Point(-13, -34));
_local4.addFrame(new Rectangle(629, 260, 33, 40), new Point(-12, -33));
_local4.addFrame(new Rectangle(570, 341, 31, 41), new Point(-11, -33));
_local4.addFrame(new Rectangle(106, 424, 29, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(135, 424, 28, 42), new Point(-8, -33));
_local4.addFrame(new Rectangle(601, 341, 29, 41), new Point(-9, -33));
_local4.addFrame(new Rectangle(630, 341, 31, 41), new Point(-10, -33));
_local4.addFrame(new Rectangle(661, 341, 33, 41), new Point(-12, -33));
_local4.addFrame(new Rectangle(205, 468, 36, 45), new Point(-13, -38));
_local4.addFrame(new Rectangle(608, 468, 37, 46), new Point(-13, -39));
_local4.addFrame(new Rectangle(645, 468, 36, 46), new Point(-12, -39));
_local4.addFrame(new Rectangle(121, 515, 36, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(330, 515, 36, 48), new Point(-12, -39));
_local4.addFrame(new Rectangle(366, 515, 35, 48), new Point(-12, -39));
_local4.addFrame(new Rectangle(157, 515, 36, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(681, 468, 36, 46), new Point(-12, -38));
_local4.addFrame(new Rectangle(193, 515, 36, 47), new Point(-12, -39));
_local4.addFrame(new Rectangle(594, 515, 39, 50), new Point(-15, -44));
_local4.addFrame(new Rectangle(633, 515, 38, 52), new Point(-15, -44));
_local4.addFrame(new Rectangle(229, 515, 38, 47), new Point(-17, -40));
_local4.addFrame(new Rectangle(562, 181, 38, 39), new Point(-20, -33));
_local4.addFrame(new Rectangle(441, 0, 40, 32), new Point(-23, -24));
_local4.addFrame(new Rectangle(643, 33, 42, 34), new Point(-23, -18));
_local4.addFrame(new Rectangle(600, 181, 15, 39), new Point(-7, -32));
_local4.addFrame(new Rectangle(694, 341, 21, 41), new Point(-10, -32));
_local4.addFrame(new Rectangle(715, 341, 18, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(662, 260, 15, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(0, 382, 19, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(163, 424, 21, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(19, 382, 19, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(677, 260, 15, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(692, 260, 16, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(615, 181, 28, 39), new Point(-7, -32));
_local4.addFrame(new Rectangle(38, 382, 32, 41), new Point(-10, -32));
_local4.addFrame(new Rectangle(70, 382, 31, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(708, 260, 28, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(101, 382, 30, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(184, 424, 31, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(131, 382, 30, 41), new Point(-9, -32));
_local4.addFrame(new Rectangle(0, 300, 28, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(28, 300, 29, 40), new Point(-7, -32));
_local4.addFrame(new Rectangle(114, 104, 34, 37), new Point(-14, -30));
_local4.addFrame(new Rectangle(643, 181, 31, 39), new Point(-12, -30));
_local4.addFrame(new Rectangle(674, 181, 32, 39), new Point(-13, -30));
_local4.addFrame(new Rectangle(400, 142, 31, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(706, 181, 32, 39), new Point(-14, -30));
_local4.addFrame(new Rectangle(0, 220, 31, 39), new Point(-14, -30));
_local4.addFrame(new Rectangle(31, 220, 32, 39), new Point(-14, -30));
_local4.addFrame(new Rectangle(431, 142, 31, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(462, 142, 32, 38), new Point(-13, -30));
_local4.addFrame(new Rectangle(57, 300, 28, 40), new Point(-7, -33));
_local4.addFrame(new Rectangle(215, 424, 32, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(247, 424, 31, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(161, 382, 29, 41), new Point(-7, -33));
_local4.addFrame(new Rectangle(278, 424, 31, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(309, 424, 32, 42), new Point(-10, -33));
_local4.addFrame(new Rectangle(341, 424, 31, 42), new Point(-9, -33));
_local4.addFrame(new Rectangle(190, 382, 29, 41), new Point(-7, -33));
_local4.addFrame(new Rectangle(219, 382, 29, 41), new Point(-7, -33));
_local4.addFrame(new Rectangle(717, 515, 22, 54), new Point(-11, -46));
_local4.addFrame(new Rectangle(671, 515, 24, 52), new Point(-11, -44));
_local4.addFrame(new Rectangle(401, 515, 26, 48), new Point(-14, -40));
_local4.addFrame(new Rectangle(248, 382, 30, 41), new Point(-17, -33));
_local4.addFrame(new Rectangle(685, 33, 36, 34), new Point(-21, -26));
_local4.addFrame(new Rectangle(72, 0, 37, 27), new Point(-20, -15));
_local4.addFrame(new Rectangle(85, 300, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(109, 300, 31, 40), new Point(-15, -31));
_local4.addFrame(new Rectangle(140, 300, 29, 40), new Point(-14, -31));
_local4.addFrame(new Rectangle(63, 220, 25, 39), new Point(-13, -30));
_local4.addFrame(new Rectangle(88, 220, 25, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(148, 104, 27, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(113, 220, 26, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(169, 300, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(193, 300, 27, 40), new Point(-14, -31));
_local4.addFrame(new Rectangle(220, 300, 25, 40), new Point(-13, -31));
_local4.addFrame(new Rectangle(245, 300, 28, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(273, 300, 27, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(139, 220, 24, 39), new Point(-12, -30));
_local4.addFrame(new Rectangle(163, 220, 25, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(175, 104, 27, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(188, 220, 26, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(300, 300, 24, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(324, 300, 25, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(202, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(494, 142, 35, 38), new Point(-18, -29));
_local4.addFrame(new Rectangle(237, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(272, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(532, 67, 35, 36), new Point(-18, -28));
_local4.addFrame(new Rectangle(226, 67, 35, 35), new Point(-18, -28));
_local4.addFrame(new Rectangle(567, 67, 35, 36), new Point(-18, -28));
_local4.addFrame(new Rectangle(307, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(342, 104, 35, 37), new Point(-18, -28));
_local4.addFrame(new Rectangle(278, 382, 36, 41), new Point(-13, -32));
_local4.addFrame(new Rectangle(314, 382, 35, 41), new Point(-12, -32));
_local4.addFrame(new Rectangle(349, 382, 36, 41), new Point(-12, -32));
_local4.addFrame(new Rectangle(349, 300, 36, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(214, 220, 36, 39), new Point(-12, -31));
_local4.addFrame(new Rectangle(529, 142, 37, 38), new Point(-13, -31));
_local4.addFrame(new Rectangle(250, 220, 37, 39), new Point(-13, -31));
_local4.addFrame(new Rectangle(385, 300, 36, 40), new Point(-12, -31));
_local4.addFrame(new Rectangle(385, 382, 36, 41), new Point(-12, -32));
_local4.addFrame(new Rectangle(241, 468, 39, 45), new Point(-17, -38));
_local4.addFrame(new Rectangle(104, 468, 40, 44), new Point(-16, -36));
_local4.addFrame(new Rectangle(491, 424, 39, 43), new Point(-17, -34));
_local4.addFrame(new Rectangle(530, 424, 39, 43), new Point(-20, -33));
_local4.addFrame(new Rectangle(566, 142, 40, 38), new Point(-23, -28));
_local4.addFrame(new Rectangle(56, 33, 41, 33), new Point(-23, -22));
break;
case "BamboHead":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(426, 42, 12, 22), new Point(-6, -41));
_local4.addFrame(new Rectangle(343, 0, 13, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(356, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(369, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(381, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(393, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(406, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(418, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(430, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(438, 42, 14, 22), new Point(-8, -41));
_local4.addFrame(new Rectangle(452, 42, 13, 22), new Point(-7, -41));
_local4.addFrame(new Rectangle(443, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(456, 0, 14, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(470, 0, 14, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(465, 42, 14, 22), new Point(-8, -41));
_local4.addFrame(new Rectangle(484, 0, 14, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(498, 0, 14, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(0x0200, 0, 14, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(479, 42, 12, 22), new Point(-5, -41));
_local4.addFrame(new Rectangle(526, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(538, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(550, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(563, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(576, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(589, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(602, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(615, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(491, 42, 12, 22), new Point(-6, -41));
_local4.addFrame(new Rectangle(627, 0, 13, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(640, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(653, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(665, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(677, 0, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(690, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(702, 0, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(0, 21, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(13, 21, 12, 21), new Point(-6, -42));
_local4.addFrame(new Rectangle(61, 0, 12, 16), new Point(-6, -36));
_local4.addFrame(new Rectangle(25, 21, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(362, 64, 15, 23), new Point(-6, -48));
_local4.addFrame(new Rectangle(157, 0, 16, 20), new Point(-6, -46));
_local4.addFrame(new Rectangle(377, 64, 16, 23), new Point(-7, -38));
_local4.addFrame(new Rectangle(393, 64, 17, 23), new Point(-9, -42));
_local4.addFrame(new Rectangle(342, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(359, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(376, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(393, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(410, 64, 17, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(410, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(427, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(444, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(461, 110, 17, 24), new Point(-10, -43));
_local4.addFrame(new Rectangle(478, 110, 16, 24), new Point(-10, -43));
_local4.addFrame(new Rectangle(494, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(510, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(526, 110, 17, 24), new Point(-11, -43));
_local4.addFrame(new Rectangle(543, 110, 17, 24), new Point(-11, -43));
_local4.addFrame(new Rectangle(427, 64, 17, 23), new Point(-11, -42));
_local4.addFrame(new Rectangle(560, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(576, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(592, 110, 17, 24), new Point(-9, -42));
_local4.addFrame(new Rectangle(609, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(626, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(643, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(659, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(444, 64, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(675, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(691, 110, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(707, 110, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(460, 64, 17, 23), new Point(-9, -42));
_local4.addFrame(new Rectangle(0, 134, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(17, 134, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(34, 134, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(51, 134, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(477, 64, 17, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(68, 134, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(85, 134, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(102, 134, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(494, 64, 18, 23), new Point(-8, -43));
_local4.addFrame(new Rectangle(38, 21, 20, 21), new Point(-11, -39));
_local4.addFrame(new Rectangle(0x0200, 64, 17, 23), new Point(-5, -43));
_local4.addFrame(new Rectangle(119, 134, 20, 24), new Point(1, -45));
_local4.addFrame(new Rectangle(503, 42, 21, 22), new Point(10, -40));
_local4.addFrame(new Rectangle(58, 21, 22, 21), new Point(12, -30));
_local4.addFrame(new Rectangle(80, 21, 12, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(92, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(104, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(116, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(524, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(128, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(536, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(140, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(152, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(164, 21, 12, 21), new Point(-7, -42));
_local4.addFrame(new Rectangle(176, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(188, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(548, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(200, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(560, 42, 12, 22), new Point(-8, -43));
_local4.addFrame(new Rectangle(212, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(572, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(224, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(236, 21, 12, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(584, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(596, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(608, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(620, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(248, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(632, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(644, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(656, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(260, 21, 12, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(272, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(284, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(296, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(668, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(308, 21, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(680, 42, 12, 22), new Point(-8, -42));
_local4.addFrame(new Rectangle(320, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(332, 21, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(692, 42, 14, 22), new Point(-5, -41));
_local4.addFrame(new Rectangle(706, 42, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(0, 64, 15, 22), new Point(-3, -40));
_local4.addFrame(new Rectangle(344, 21, 18, 21), new Point(5, -36));
_local4.addFrame(new Rectangle(96, 0, 23, 18), new Point(16, -24));
_local4.addFrame(new Rectangle(21, 0, 20, 15), new Point(20, -11));
_local4.addFrame(new Rectangle(529, 64, 17, 23), new Point(-9, -43));
_local4.addFrame(new Rectangle(546, 64, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(563, 64, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(139, 134, 17, 24), new Point(-10, -44));
_local4.addFrame(new Rectangle(580, 64, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(596, 64, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(613, 64, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(156, 134, 17, 24), new Point(-10, -44));
_local4.addFrame(new Rectangle(630, 64, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(173, 134, 17, 24), new Point(-8, -44));
_local4.addFrame(new Rectangle(647, 64, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(663, 64, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(680, 64, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(697, 64, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(15, 64, 17, 22), new Point(-9, -44));
_local4.addFrame(new Rectangle(0, 87, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(17, 87, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(34, 87, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(51, 87, 16, 23), new Point(-9, -43));
_local4.addFrame(new Rectangle(67, 87, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(84, 87, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(101, 87, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(117, 87, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(133, 87, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(149, 87, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(165, 87, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(181, 87, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(197, 87, 17, 23), new Point(-9, -43));
_local4.addFrame(new Rectangle(214, 87, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(231, 87, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(190, 134, 17, 24), new Point(-10, -44));
_local4.addFrame(new Rectangle(248, 87, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(264, 87, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(281, 87, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(207, 134, 17, 24), new Point(-10, -44));
_local4.addFrame(new Rectangle(298, 87, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(315, 87, 17, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(32, 64, 20, 22), new Point(-11, -41));
_local4.addFrame(new Rectangle(332, 87, 18, 23), new Point(-6, -39));
_local4.addFrame(new Rectangle(52, 64, 18, 22), new Point(0, -30));
_local4.addFrame(new Rectangle(73, 0, 23, 17), new Point(7, -10));
_local4.addFrame(new Rectangle(70, 64, 24, 22), new Point(9, 1));
_local4.addFrame(new Rectangle(362, 21, 12, 21), new Point(-6, -42));
_local4.addFrame(new Rectangle(374, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(386, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(173, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(398, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(410, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(422, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(185, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(434, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(446, 21, 14, 21), new Point(-6, -42));
_local4.addFrame(new Rectangle(460, 21, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(473, 21, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(486, 21, 14, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(500, 21, 14, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(0x0202, 21, 14, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(528, 21, 14, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(542, 21, 14, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(556, 21, 14, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(570, 21, 12, 21), new Point(-7, -42));
_local4.addFrame(new Rectangle(582, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(594, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(606, 21, 14, 21), new Point(-7, -43));
_local4.addFrame(new Rectangle(620, 21, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(633, 21, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(646, 21, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(659, 21, 14, 21), new Point(-7, -43));
_local4.addFrame(new Rectangle(673, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(685, 21, 12, 21), new Point(-6, -42));
_local4.addFrame(new Rectangle(697, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(709, 21, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(197, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(0, 42, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(12, 42, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(24, 42, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(209, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(36, 42, 12, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(48, 42, 12, 21), new Point(-6, -39));
_local4.addFrame(new Rectangle(60, 42, 12, 21), new Point(-6, -41));
_local4.addFrame(new Rectangle(72, 42, 13, 21), new Point(-7, -37));
_local4.addFrame(new Rectangle(221, 0, 15, 20), new Point(-9, -27));
_local4.addFrame(new Rectangle(119, 0, 16, 18), new Point(-10, -6));
_local4.addFrame(new Rectangle(350, 87, 17, 23), new Point(-10, 6));
_local4.addFrame(new Rectangle(367, 87, 17, 23), new Point(-8, -43));
_local4.addFrame(new Rectangle(384, 87, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(400, 87, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(94, 64, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(416, 87, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(432, 87, 17, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(449, 87, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(110, 64, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(465, 87, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(126, 64, 17, 22), new Point(-7, -42));
_local4.addFrame(new Rectangle(143, 64, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(481, 87, 16, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(497, 87, 17, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(0x0202, 87, 17, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(531, 87, 17, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(548, 87, 17, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(565, 87, 17, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(582, 87, 16, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(598, 87, 16, 23), new Point(-8, -43));
_local4.addFrame(new Rectangle(614, 87, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(630, 87, 17, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(647, 87, 16, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(159, 64, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(663, 87, 16, 23), new Point(-6, -44));
_local4.addFrame(new Rectangle(175, 64, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(679, 87, 16, 23), new Point(-6, -43));
_local4.addFrame(new Rectangle(695, 87, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(0, 110, 17, 23), new Point(-8, -43));
_local4.addFrame(new Rectangle(17, 110, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(33, 110, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(191, 64, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(49, 110, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(65, 110, 17, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(82, 110, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(207, 64, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(98, 110, 16, 23), new Point(-7, -44));
_local4.addFrame(new Rectangle(114, 110, 17, 23), new Point(-10, -41));
_local4.addFrame(new Rectangle(223, 64, 21, 22), new Point(-9, -41));
_local4.addFrame(new Rectangle(131, 110, 17, 23), new Point(-12, -39));
_local4.addFrame(new Rectangle(85, 42, 20, 21), new Point(-21, -31));
_local4.addFrame(new Rectangle(0, 0, 21, 13), new Point(-31, -10));
_local4.addFrame(new Rectangle(135, 0, 22, 19), new Point(-34, 1));
_local4.addFrame(new Rectangle(105, 42, 12, 21), new Point(-5, -41));
_local4.addFrame(new Rectangle(117, 42, 12, 21), new Point(-4, -42));
_local4.addFrame(new Rectangle(244, 64, 12, 22), new Point(-4, -42));
_local4.addFrame(new Rectangle(129, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(141, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(153, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(165, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(177, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(0x0100, 64, 12, 22), new Point(-4, -42));
_local4.addFrame(new Rectangle(236, 0, 12, 20), new Point(-5, -40));
_local4.addFrame(new Rectangle(189, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(201, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(248, 0, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(260, 0, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(213, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(272, 0, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(284, 0, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(225, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(268, 64, 12, 22), new Point(-5, -42));
_local4.addFrame(new Rectangle(280, 64, 12, 22), new Point(-4, -42));
_local4.addFrame(new Rectangle(237, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(249, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(261, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(273, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(285, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(297, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(309, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(321, 42, 12, 21), new Point(-5, -41));
_local4.addFrame(new Rectangle(333, 42, 12, 21), new Point(-4, -42));
_local4.addFrame(new Rectangle(292, 64, 12, 22), new Point(-4, -42));
_local4.addFrame(new Rectangle(345, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(357, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(369, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(381, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(393, 42, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(304, 64, 12, 22), new Point(-4, -42));
_local4.addFrame(new Rectangle(316, 64, 14, 22), new Point(-9, -41));
_local4.addFrame(new Rectangle(148, 110, 18, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(330, 64, 15, 22), new Point(-12, -40));
_local4.addFrame(new Rectangle(345, 64, 17, 22), new Point(-23, -39));
_local4.addFrame(new Rectangle(296, 0, 23, 20), new Point(-39, -28));
_local4.addFrame(new Rectangle(41, 0, 20, 15), new Point(-40, -13));
_local4.addFrame(new Rectangle(224, 134, 16, 24), new Point(-8, -42));
_local4.addFrame(new Rectangle(240, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(0x0100, 134, 17, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(273, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(289, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(305, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(321, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(337, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(353, 134, 17, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(370, 134, 17, 24), new Point(-9, -42));
_local4.addFrame(new Rectangle(387, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(166, 110, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(183, 110, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(200, 110, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(217, 110, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(234, 110, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(251, 110, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(268, 110, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(403, 134, 16, 24), new Point(-7, -43));
_local4.addFrame(new Rectangle(419, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(435, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(451, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(467, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(483, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(499, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(515, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(531, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(547, 134, 16, 24), new Point(-8, -42));
_local4.addFrame(new Rectangle(563, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(579, 134, 17, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(596, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(612, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(628, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(644, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(660, 134, 16, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(676, 134, 17, 24), new Point(-7, -42));
_local4.addFrame(new Rectangle(285, 110, 17, 23), new Point(-10, -43));
_local4.addFrame(new Rectangle(405, 42, 21, 21), new Point(-9, -39));
_local4.addFrame(new Rectangle(693, 134, 18, 24), new Point(-12, -44));
_local4.addFrame(new Rectangle(302, 110, 18, 23), new Point(-18, -46));
_local4.addFrame(new Rectangle(320, 110, 22, 23), new Point(-29, -43));
_local4.addFrame(new Rectangle(319, 0, 24, 20), new Point(-33, -31));
break;
case "BamboHeadCustom":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(217, 0, 12, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(319, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(331, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(344, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(356, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(368, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(380, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(392, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(404, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(417, 20, 12, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(429, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(442, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(455, 20, 12, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(467, 20, 13, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(480, 20, 13, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(493, 20, 13, 21), new Point(-8, -40));
_local4.addFrame(new Rectangle(506, 20, 12, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(518, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(531, 20, 11, 21), new Point(-5, -40));
_local4.addFrame(new Rectangle(542, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(554, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(566, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(578, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(591, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(604, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(617, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(629, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(229, 0, 12, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(641, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(653, 20, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(666, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(678, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(690, 20, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(0, 41, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(12, 41, 12, 21), new Point(-6, -40));
_local4.addFrame(new Rectangle(24, 41, 13, 21), new Point(-7, -40));
_local4.addFrame(new Rectangle(134, 0, 12, 19), new Point(-6, -41));
_local4.addFrame(new Rectangle(61, 0, 12, 16), new Point(-6, -36));
_local4.addFrame(new Rectangle(146, 0, 13, 19), new Point(-6, -42));
_local4.addFrame(new Rectangle(120, 62, 15, 22), new Point(-6, -47));
_local4.addFrame(new Rectangle(241, 0, 16, 20), new Point(-6, -46));
_local4.addFrame(new Rectangle(135, 62, 15, 22), new Point(-6, -38));
_local4.addFrame(new Rectangle(601, 84, 16, 23), new Point(-9, -42));
_local4.addFrame(new Rectangle(407, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(424, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(441, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(617, 84, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(633, 84, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(649, 84, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(458, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(475, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(665, 84, 16, 23), new Point(-9, -42));
_local4.addFrame(new Rectangle(681, 84, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(0, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(16, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(32, 107, 17, 23), new Point(-11, -42));
_local4.addFrame(new Rectangle(49, 107, 17, 23), new Point(-11, -42));
_local4.addFrame(new Rectangle(66, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(82, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(98, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(492, 130, 17, 24), new Point(-9, -42));
_local4.addFrame(new Rectangle(114, 107, 17, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(509, 130, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(131, 107, 16, 23), new Point(-10, -41));
_local4.addFrame(new Rectangle(147, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(163, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(179, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(195, 107, 16, 23), new Point(-10, -41));
_local4.addFrame(new Rectangle(525, 130, 16, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(211, 107, 16, 23), new Point(-9, -42));
_local4.addFrame(new Rectangle(541, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(558, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(575, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(227, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(243, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(259, 107, 16, 23), new Point(-10, -42));
_local4.addFrame(new Rectangle(592, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(609, 130, 17, 24), new Point(-10, -42));
_local4.addFrame(new Rectangle(150, 62, 17, 22), new Point(-7, -42));
_local4.addFrame(new Rectangle(37, 41, 19, 21), new Point(-11, -39));
_local4.addFrame(new Rectangle(275, 107, 17, 23), new Point(-5, -43));
_local4.addFrame(new Rectangle(626, 130, 19, 24), new Point(2, -45));
_local4.addFrame(new Rectangle(0x0101, 0, 21, 20), new Point(10, -39));
_local4.addFrame(new Rectangle(56, 41, 22, 21), new Point(12, -30));
_local4.addFrame(new Rectangle(78, 41, 11, 21), new Point(-6, -41));
_local4.addFrame(new Rectangle(278, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(89, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(101, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(290, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(113, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(302, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(125, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(137, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(149, 41, 11, 21), new Point(-6, -42));
_local4.addFrame(new Rectangle(160, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(172, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(184, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(196, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(208, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(220, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(232, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(244, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(0x0100, 41, 12, 21), new Point(-7, -41));
_local4.addFrame(new Rectangle(314, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(326, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(338, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(268, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(280, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(292, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(350, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(362, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(304, 41, 11, 21), new Point(-6, -41));
_local4.addFrame(new Rectangle(374, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(315, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(327, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(386, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(339, 41, 12, 21), new Point(-8, -42));
_local4.addFrame(new Rectangle(398, 0, 12, 20), new Point(-8, -41));
_local4.addFrame(new Rectangle(351, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(363, 41, 12, 21), new Point(-8, -41));
_local4.addFrame(new Rectangle(167, 62, 14, 22), new Point(-5, -41));
_local4.addFrame(new Rectangle(181, 62, 18, 22), new Point(-11, -40));
_local4.addFrame(new Rectangle(199, 62, 14, 22), new Point(-3, -40));
_local4.addFrame(new Rectangle(410, 0, 17, 20), new Point(6, -35));
_local4.addFrame(new Rectangle(111, 0, 23, 18), new Point(16, -24));
_local4.addFrame(new Rectangle(21, 0, 20, 15), new Point(20, -11));
_local4.addFrame(new Rectangle(292, 107, 16, 23), new Point(-9, -43));
_local4.addFrame(new Rectangle(213, 62, 16, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(229, 62, 16, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(245, 62, 17, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(262, 62, 16, 22), new Point(-9, -43));
_local4.addFrame(new Rectangle(308, 107, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(278, 62, 17, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(295, 62, 17, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(312, 62, 16, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(328, 62, 17, 22), new Point(-8, -43));
_local4.addFrame(new Rectangle(345, 62, 16, 22), new Point(-9, -44));
_local4.addFrame(new Rectangle(361, 62, 17, 22), new Point(-9, -44));
_local4.addFrame(new Rectangle(325, 107, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(378, 62, 17, 22), new Point(-9, -44));
_local4.addFrame(new Rectangle(395, 62, 17, 22), new Point(-9, -44));
_local4.addFrame(new Rectangle(412, 62, 17, 22), new Point(-9, -44));
_local4.addFrame(new Rectangle(342, 107, 17, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(429, 62, 17, 22), new Point(-9, -44));
_local4.addFrame(new Rectangle(446, 62, 16, 22), new Point(-9, -42));
_local4.addFrame(new Rectangle(359, 107, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(376, 107, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(462, 62, 16, 22), new Point(-9, -43));
_local4.addFrame(new Rectangle(393, 107, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(409, 107, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(425, 107, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(478, 62, 16, 22), new Point(-9, -43));
_local4.addFrame(new Rectangle(441, 107, 16, 23), new Point(-9, -44));
_local4.addFrame(new Rectangle(457, 107, 16, 23), new Point(-9, -43));
_local4.addFrame(new Rectangle(494, 62, 16, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(510, 62, 16, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(526, 62, 17, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(543, 62, 16, 22), new Point(-9, -43));
_local4.addFrame(new Rectangle(473, 107, 17, 23), new Point(-10, -44));
_local4.addFrame(new Rectangle(559, 62, 17, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(576, 62, 17, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(593, 62, 16, 22), new Point(-10, -43));
_local4.addFrame(new Rectangle(490, 107, 17, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(375, 41, 19, 21), new Point(-11, -41));
_local4.addFrame(new Rectangle(609, 62, 17, 22), new Point(-6, -38));
_local4.addFrame(new Rectangle(626, 62, 17, 22), new Point(1, -30));
_local4.addFrame(new Rectangle(73, 0, 22, 17), new Point(7, -10));
_local4.addFrame(new Rectangle(394, 41, 23, 21), new Point(9, 1));
_local4.addFrame(new Rectangle(159, 0, 12, 19), new Point(-6, -41));
_local4.addFrame(new Rectangle(427, 0, 12, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(439, 0, 12, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(451, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(463, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(475, 0, 12, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(487, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(499, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(511, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(417, 41, 12, 21), new Point(-5, -42));
_local4.addFrame(new Rectangle(523, 0, 13, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(536, 0, 13, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(549, 0, 12, 20), new Point(-5, -42));
_local4.addFrame(new Rectangle(429, 41, 13, 21), new Point(-5, -43));
_local4.addFrame(new Rectangle(561, 0, 14, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(442, 41, 13, 21), new Point(-5, -43));
_local4.addFrame(new Rectangle(575, 0, 12, 20), new Point(-5, -42));
_local4.addFrame(new Rectangle(455, 41, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(587, 0, 11, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(598, 0, 12, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(171, 0, 12, 19), new Point(-6, -42));
_local4.addFrame(new Rectangle(610, 0, 13, 20), new Point(-7, -42));
_local4.addFrame(new Rectangle(623, 0, 13, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(636, 0, 13, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(468, 41, 13, 21), new Point(-6, -43));
_local4.addFrame(new Rectangle(649, 0, 13, 20), new Point(-7, -42));
_local4.addFrame(new Rectangle(662, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(183, 0, 12, 19), new Point(-6, -41));
_local4.addFrame(new Rectangle(674, 0, 12, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(686, 0, 12, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(698, 0, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(0, 20, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(12, 20, 12, 20), new Point(-6, -43));
_local4.addFrame(new Rectangle(24, 20, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(36, 20, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(48, 20, 12, 20), new Point(-6, -42));
_local4.addFrame(new Rectangle(481, 41, 12, 21), new Point(-6, -39));
_local4.addFrame(new Rectangle(60, 20, 12, 20), new Point(-6, -40));
_local4.addFrame(new Rectangle(493, 41, 13, 21), new Point(-7, -37));
_local4.addFrame(new Rectangle(72, 20, 15, 20), new Point(-9, -27));
_local4.addFrame(new Rectangle(95, 0, 16, 17), new Point(-10, -5));
_local4.addFrame(new Rectangle(507, 107, 16, 23), new Point(-10, 6));
_local4.addFrame(new Rectangle(523, 107, 15, 23), new Point(-7, -43));
_local4.addFrame(new Rectangle(643, 62, 16, 22), new Point(-7, -44));
_local4.addFrame(new Rectangle(659, 62, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(675, 62, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(691, 62, 15, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(538, 107, 15, 23), new Point(-6, -44));
_local4.addFrame(new Rectangle(0, 84, 15, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(15, 84, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(31, 84, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(47, 84, 16, 22), new Point(-7, -42));
_local4.addFrame(new Rectangle(63, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(79, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(95, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(111, 84, 17, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(128, 84, 17, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(145, 84, 17, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(162, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(178, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(194, 84, 16, 22), new Point(-8, -43));
_local4.addFrame(new Rectangle(210, 84, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(226, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(242, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(258, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(274, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(290, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(306, 84, 16, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(322, 84, 15, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(553, 107, 15, 23), new Point(-7, -43));
_local4.addFrame(new Rectangle(337, 84, 16, 22), new Point(-7, -44));
_local4.addFrame(new Rectangle(353, 84, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(369, 84, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(385, 84, 15, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(568, 107, 15, 23), new Point(-6, -44));
_local4.addFrame(new Rectangle(400, 84, 15, 22), new Point(-6, -43));
_local4.addFrame(new Rectangle(415, 84, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(431, 84, 16, 22), new Point(-7, -43));
_local4.addFrame(new Rectangle(447, 84, 17, 22), new Point(-10, -40));
_local4.addFrame(new Rectangle(506, 41, 20, 21), new Point(-9, -41));
_local4.addFrame(new Rectangle(583, 107, 17, 23), new Point(-12, -39));
_local4.addFrame(new Rectangle(526, 41, 19, 21), new Point(-21, -31));
_local4.addFrame(new Rectangle(0, 0, 21, 12), new Point(-31, -10));
_local4.addFrame(new Rectangle(195, 0, 22, 19), new Point(-34, 1));
_local4.addFrame(new Rectangle(545, 41, 11, 21), new Point(-5, -41));
_local4.addFrame(new Rectangle(556, 41, 12, 21), new Point(-4, -42));
_local4.addFrame(new Rectangle(87, 20, 12, 20), new Point(-4, -41));
_local4.addFrame(new Rectangle(568, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(580, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(592, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(604, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(616, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(99, 20, 12, 20), new Point(-4, -41));
_local4.addFrame(new Rectangle(111, 20, 11, 20), new Point(-5, -40));
_local4.addFrame(new Rectangle(628, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(122, 20, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(134, 20, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(146, 20, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(158, 20, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(170, 20, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(182, 20, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(194, 20, 12, 20), new Point(-4, -40));
_local4.addFrame(new Rectangle(206, 20, 12, 20), new Point(-5, -41));
_local4.addFrame(new Rectangle(218, 20, 12, 20), new Point(-4, -41));
_local4.addFrame(new Rectangle(640, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(652, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(664, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(676, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(688, 41, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(0, 62, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(12, 62, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(24, 62, 11, 21), new Point(-5, -41));
_local4.addFrame(new Rectangle(35, 62, 12, 21), new Point(-4, -42));
_local4.addFrame(new Rectangle(230, 20, 12, 20), new Point(-4, -41));
_local4.addFrame(new Rectangle(47, 62, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(59, 62, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(71, 62, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(83, 62, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(95, 62, 12, 21), new Point(-4, -41));
_local4.addFrame(new Rectangle(242, 20, 12, 20), new Point(-4, -41));
_local4.addFrame(new Rectangle(464, 84, 14, 22), new Point(-9, -41));
_local4.addFrame(new Rectangle(478, 84, 18, 22), new Point(-7, -40));
_local4.addFrame(new Rectangle(107, 62, 13, 21), new Point(-11, -40));
_local4.addFrame(new Rectangle(496, 84, 17, 22), new Point(-23, -39));
_local4.addFrame(new Rectangle(254, 20, 23, 20), new Point(-39, -28));
_local4.addFrame(new Rectangle(41, 0, 20, 15), new Point(-40, -13));
_local4.addFrame(new Rectangle(600, 107, 15, 23), new Point(-7, -42));
_local4.addFrame(new Rectangle(615, 107, 15, 23), new Point(-6, -42));
_local4.addFrame(new Rectangle(645, 130, 15, 24), new Point(-6, -42));
_local4.addFrame(new Rectangle(630, 107, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(513, 84, 16, 22), new Point(-7, -41));
_local4.addFrame(new Rectangle(646, 107, 16, 23), new Point(-7, -42));
_local4.addFrame(new Rectangle(662, 107, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(678, 107, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(660, 130, 15, 24), new Point(-6, -42));
_local4.addFrame(new Rectangle(0, 130, 17, 23), new Point(-9, -41));
_local4.addFrame(new Rectangle(17, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(33, 130, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(50, 130, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(67, 130, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(84, 130, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(101, 130, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(118, 130, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(135, 130, 17, 23), new Point(-8, -41));
_local4.addFrame(new Rectangle(152, 130, 16, 23), new Point(-7, -42));
_local4.addFrame(new Rectangle(168, 130, 16, 23), new Point(-7, -42));
_local4.addFrame(new Rectangle(184, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(200, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(216, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(232, 130, 16, 23), new Point(-7, -42));
_local4.addFrame(new Rectangle(248, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(264, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(280, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(296, 130, 15, 23), new Point(-7, -42));
_local4.addFrame(new Rectangle(311, 130, 15, 23), new Point(-6, -42));
_local4.addFrame(new Rectangle(675, 130, 15, 24), new Point(-6, -42));
_local4.addFrame(new Rectangle(326, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(529, 84, 16, 22), new Point(-7, -41));
_local4.addFrame(new Rectangle(342, 130, 16, 23), new Point(-7, -42));
_local4.addFrame(new Rectangle(358, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(374, 130, 16, 23), new Point(-7, -41));
_local4.addFrame(new Rectangle(690, 130, 15, 24), new Point(-6, -42));
_local4.addFrame(new Rectangle(390, 130, 17, 23), new Point(-10, -43));
_local4.addFrame(new Rectangle(277, 20, 19, 20), new Point(-8, -38));
_local4.addFrame(new Rectangle(545, 84, 17, 22), new Point(-11, -43));
_local4.addFrame(new Rectangle(562, 84, 17, 22), new Point(-18, -45));
_local4.addFrame(new Rectangle(579, 84, 22, 22), new Point(-29, -42));
_local4.addFrame(new Rectangle(296, 20, 23, 20), new Point(-32, -31));
break;
case "Pistol":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(56, 31, 4, 9), new Point(-12, -14));
_local4.addFrame(new Rectangle(60, 31, 4, 9), new Point(-12, -13));
_local4.addFrame(new Rectangle(64, 31, 4, 9), new Point(-12, -13));
_local4.addFrame(new Rectangle(68, 31, 3, 9), new Point(-12, -13));
_local4.addFrame(new Rectangle(71, 31, 4, 9), new Point(-12, -14));
_local4.addFrame(new Rectangle(0, 40, 4, 9), new Point(-12, -14));
_local4.addFrame(new Rectangle(4, 40, 4, 9), new Point(-12, -14));
_local4.addFrame(new Rectangle(8, 40, 3, 9), new Point(-12, -13));
_local4.addFrame(new Rectangle(11, 40, 4, 9), new Point(-12, -13));
_local4.addFrame(new Rectangle(31, 7, 9, 8), new Point(-24, -22));
_local4.addFrame(new Rectangle(40, 7, 9, 8), new Point(-25, -22));
_local4.addFrame(new Rectangle(49, 7, 9, 8), new Point(-25, -22));
_local4.addFrame(new Rectangle(58, 7, 9, 8), new Point(-25, -22));
_local4.addFrame(new Rectangle(67, 7, 9, 8), new Point(-25, -22));
_local4.addFrame(new Rectangle(0, 15, 9, 8), new Point(-24, -23));
_local4.addFrame(new Rectangle(9, 15, 9, 8), new Point(-25, -22));
_local4.addFrame(new Rectangle(18, 15, 9, 8), new Point(-25, -22));
_local4.addFrame(new Rectangle(27, 15, 9, 8), new Point(-25, -22));
_local4.addFrame(new Rectangle(0, 0, 10, 7), new Point(-23, -31));
_local4.addFrame(new Rectangle(10, 0, 11, 7), new Point(-25, -32));
_local4.addFrame(new Rectangle(36, 15, 10, 8), new Point(-24, -32));
_local4.addFrame(new Rectangle(21, 0, 10, 7), new Point(-24, -31));
_local4.addFrame(new Rectangle(46, 15, 11, 8), new Point(-24, -32));
_local4.addFrame(new Rectangle(57, 15, 10, 8), new Point(-23, -32));
_local4.addFrame(new Rectangle(0, 23, 11, 8), new Point(-24, -32));
_local4.addFrame(new Rectangle(11, 23, 10, 8), new Point(-24, -32));
_local4.addFrame(new Rectangle(21, 23, 10, 8), new Point(-24, -32));
_local4.addFrame(new Rectangle(54, 40, 9, 10), new Point(-10, -40));
_local4.addFrame(new Rectangle(45, 60, 9, 11), new Point(-11, -42));
_local4.addFrame(new Rectangle(63, 40, 9, 10), new Point(-11, -41));
_local4.addFrame(new Rectangle(0, 50, 10, 10), new Point(-11, -41));
_local4.addFrame(new Rectangle(10, 50, 9, 10), new Point(-10, -41));
_local4.addFrame(new Rectangle(19, 50, 9, 10), new Point(-10, -41));
_local4.addFrame(new Rectangle(28, 50, 9, 10), new Point(-10, -41));
_local4.addFrame(new Rectangle(37, 50, 10, 10), new Point(-11, -41));
_local4.addFrame(new Rectangle(47, 50, 9, 10), new Point(-11, -41));
_local4.addFrame(new Rectangle(31, 23, 4, 8), new Point(8, -39));
_local4.addFrame(new Rectangle(15, 40, 4, 9), new Point(8, -41));
_local4.addFrame(new Rectangle(19, 40, 4, 9), new Point(8, -41));
_local4.addFrame(new Rectangle(23, 40, 3, 9), new Point(9, -40));
_local4.addFrame(new Rectangle(26, 40, 4, 9), new Point(8, -40));
_local4.addFrame(new Rectangle(30, 40, 4, 9), new Point(8, -40));
_local4.addFrame(new Rectangle(34, 40, 4, 9), new Point(8, -40));
_local4.addFrame(new Rectangle(38, 40, 3, 9), new Point(9, -40));
_local4.addFrame(new Rectangle(41, 40, 4, 9), new Point(8, -41));
_local4.addFrame(new Rectangle(56, 50, 9, 10), new Point(15, -30));
_local4.addFrame(new Rectangle(65, 50, 9, 10), new Point(16, -31));
_local4.addFrame(new Rectangle(0, 60, 9, 10), new Point(16, -31));
_local4.addFrame(new Rectangle(9, 60, 9, 10), new Point(16, -30));
_local4.addFrame(new Rectangle(54, 60, 9, 11), new Point(16, -31));
_local4.addFrame(new Rectangle(18, 60, 9, 10), new Point(15, -31));
_local4.addFrame(new Rectangle(63, 60, 9, 11), new Point(16, -31));
_local4.addFrame(new Rectangle(27, 60, 9, 10), new Point(16, -30));
_local4.addFrame(new Rectangle(36, 60, 9, 10), new Point(16, -31));
_local4.addFrame(new Rectangle(31, 0, 10, 7), new Point(13, -17));
_local4.addFrame(new Rectangle(35, 23, 11, 8), new Point(14, -18));
_local4.addFrame(new Rectangle(41, 0, 10, 7), new Point(14, -17));
_local4.addFrame(new Rectangle(51, 0, 10, 7), new Point(14, -17));
_local4.addFrame(new Rectangle(61, 0, 11, 7), new Point(13, -17));
_local4.addFrame(new Rectangle(46, 23, 10, 8), new Point(13, -18));
_local4.addFrame(new Rectangle(0, 7, 11, 7), new Point(13, -17));
_local4.addFrame(new Rectangle(11, 7, 10, 7), new Point(14, -17));
_local4.addFrame(new Rectangle(21, 7, 10, 7), new Point(14, -17));
_local4.addFrame(new Rectangle(56, 23, 9, 8), new Point(1, -12));
_local4.addFrame(new Rectangle(65, 23, 9, 8), new Point(2, -12));
_local4.addFrame(new Rectangle(45, 40, 9, 9), new Point(2, -12));
_local4.addFrame(new Rectangle(0, 31, 10, 8), new Point(1, -12));
_local4.addFrame(new Rectangle(10, 31, 9, 8), new Point(1, -12));
_local4.addFrame(new Rectangle(19, 31, 9, 8), new Point(1, -13));
_local4.addFrame(new Rectangle(28, 31, 9, 8), new Point(1, -12));
_local4.addFrame(new Rectangle(37, 31, 10, 8), new Point(1, -12));
_local4.addFrame(new Rectangle(47, 31, 9, 8), new Point(2, -12));
break;
case "Shotgun":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(73, 84, 4, 19), new Point(-13, -18));
_local4.addFrame(new Rectangle(77, 103, 4, 20), new Point(-13, -18));
_local4.addFrame(new Rectangle(81, 103, 4, 20), new Point(-13, -18));
_local4.addFrame(new Rectangle(85, 103, 4, 20), new Point(-13, -18));
_local4.addFrame(new Rectangle(89, 103, 4, 20), new Point(-13, -19));
_local4.addFrame(new Rectangle(77, 84, 5, 19), new Point(-13, -19));
_local4.addFrame(new Rectangle(82, 84, 4, 19), new Point(-13, -18));
_local4.addFrame(new Rectangle(93, 103, 4, 20), new Point(-13, -18));
_local4.addFrame(new Rectangle(97, 103, 4, 20), new Point(-13, -18));
_local4.addFrame(new Rectangle(62, 51, 19, 16), new Point(-26, -25));
_local4.addFrame(new Rectangle(81, 51, 19, 16), new Point(-27, -24));
_local4.addFrame(new Rectangle(100, 51, 18, 16), new Point(-26, -24));
_local4.addFrame(new Rectangle(120, 67, 18, 17), new Point(-26, -25));
_local4.addFrame(new Rectangle(118, 51, 18, 16), new Point(-26, -25));
_local4.addFrame(new Rectangle(0, 67, 18, 16), new Point(-25, -25));
_local4.addFrame(new Rectangle(0, 84, 17, 17), new Point(-25, -25));
_local4.addFrame(new Rectangle(17, 84, 18, 17), new Point(-26, -25));
_local4.addFrame(new Rectangle(18, 67, 18, 16), new Point(-26, -24));
_local4.addFrame(new Rectangle(0, 6, 24, 7), new Point(-26, -29));
_local4.addFrame(new Rectangle(24, 6, 24, 7), new Point(-27, -29));
_local4.addFrame(new Rectangle(0, 0, 23, 6), new Point(-26, -28));
_local4.addFrame(new Rectangle(23, 0, 23, 6), new Point(-26, -28));
_local4.addFrame(new Rectangle(46, 0, 21, 6), new Point(-24, -28));
_local4.addFrame(new Rectangle(67, 0, 21, 6), new Point(-24, -28));
_local4.addFrame(new Rectangle(88, 0, 22, 6), new Point(-25, -28));
_local4.addFrame(new Rectangle(48, 6, 23, 7), new Point(-26, -28));
_local4.addFrame(new Rectangle(110, 0, 23, 6), new Point(-26, -28));
_local4.addFrame(new Rectangle(79, 36, 21, 15), new Point(-11, -38));
_local4.addFrame(new Rectangle(54, 23, 20, 13), new Point(-12, -38));
_local4.addFrame(new Rectangle(19, 36, 20, 14), new Point(-12, -38));
_local4.addFrame(new Rectangle(74, 23, 20, 13), new Point(-11, -37));
_local4.addFrame(new Rectangle(94, 23, 20, 13), new Point(-11, -37));
_local4.addFrame(new Rectangle(39, 36, 20, 14), new Point(-11, -37));
_local4.addFrame(new Rectangle(59, 36, 20, 14), new Point(-11, -37));
_local4.addFrame(new Rectangle(114, 23, 19, 13), new Point(-11, -37));
_local4.addFrame(new Rectangle(0, 36, 19, 13), new Point(-11, -38));
_local4.addFrame(new Rectangle(101, 103, 4, 21), new Point(9, -37));
_local4.addFrame(new Rectangle(105, 103, 4, 21), new Point(9, -38));
_local4.addFrame(new Rectangle(109, 103, 4, 21), new Point(9, -37));
_local4.addFrame(new Rectangle(134, 103, 4, 22), new Point(9, -37));
_local4.addFrame(new Rectangle(113, 103, 4, 21), new Point(9, -36));
_local4.addFrame(new Rectangle(117, 103, 5, 21), new Point(8, -36));
_local4.addFrame(new Rectangle(122, 103, 4, 21), new Point(9, -36));
_local4.addFrame(new Rectangle(126, 103, 4, 21), new Point(9, -36));
_local4.addFrame(new Rectangle(130, 103, 4, 21), new Point(9, -37));
_local4.addFrame(new Rectangle(54, 84, 19, 18), new Point(7, -27));
_local4.addFrame(new Rectangle(86, 84, 20, 19), new Point(7, -28));
_local4.addFrame(new Rectangle(106, 84, 20, 19), new Point(7, -27));
_local4.addFrame(new Rectangle(126, 84, 19, 19), new Point(7, -27));
_local4.addFrame(new Rectangle(0, 103, 20, 19), new Point(6, -27));
_local4.addFrame(new Rectangle(20, 103, 19, 19), new Point(6, -27));
_local4.addFrame(new Rectangle(39, 103, 19, 19), new Point(6, -27));
_local4.addFrame(new Rectangle(58, 103, 19, 19), new Point(7, -27));
_local4.addFrame(new Rectangle(35, 84, 19, 17), new Point(7, -27));
_local4.addFrame(new Rectangle(71, 6, 26, 8), new Point(-1, -13));
_local4.addFrame(new Rectangle(97, 6, 27, 8), new Point(0, -13));
_local4.addFrame(new Rectangle(26, 14, 26, 9), new Point(0, -13));
_local4.addFrame(new Rectangle(52, 14, 27, 9), new Point(-1, -13));
_local4.addFrame(new Rectangle(79, 14, 27, 9), new Point(-2, -13));
_local4.addFrame(new Rectangle(0, 14, 26, 8), new Point(-2, -13));
_local4.addFrame(new Rectangle(106, 14, 27, 9), new Point(-2, -13));
_local4.addFrame(new Rectangle(0, 23, 27, 9), new Point(-1, -13));
_local4.addFrame(new Rectangle(27, 23, 27, 9), new Point(-1, -13));
_local4.addFrame(new Rectangle(100, 36, 21, 15), new Point(-10, -13));
_local4.addFrame(new Rectangle(36, 67, 21, 16), new Point(-9, -13));
_local4.addFrame(new Rectangle(57, 67, 21, 16), new Point(-9, -13));
_local4.addFrame(new Rectangle(121, 36, 21, 15), new Point(-10, -13));
_local4.addFrame(new Rectangle(78, 67, 21, 16), new Point(-10, -14));
_local4.addFrame(new Rectangle(0, 51, 21, 15), new Point(-10, -14));
_local4.addFrame(new Rectangle(99, 67, 21, 16), new Point(-10, -14));
_local4.addFrame(new Rectangle(21, 51, 21, 15), new Point(-10, -13));
_local4.addFrame(new Rectangle(42, 51, 20, 15), new Point(-9, -13));
break;
case "AkimboUzis":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 24, 10), new Point(-12, -15));
_local4.addFrame(new Rectangle(48, 22, 24, 12), new Point(-12, -16));
_local4.addFrame(new Rectangle(24, 0, 24, 11), new Point(-12, -15));
_local4.addFrame(new Rectangle(48, 0, 24, 11), new Point(-12, -15));
_local4.addFrame(new Rectangle(72, 0, 24, 11), new Point(-12, -15));
_local4.addFrame(new Rectangle(72, 22, 24, 12), new Point(-12, -16));
_local4.addFrame(new Rectangle(96, 0, 24, 11), new Point(-12, -15));
_local4.addFrame(new Rectangle(120, 0, 24, 11), new Point(-12, -15));
_local4.addFrame(new Rectangle(0, 11, 24, 11), new Point(-12, -15));
_local4.addFrame(new Rectangle(0, 34, 25, 20), new Point(-25, -23));
_local4.addFrame(new Rectangle(25, 34, 26, 20), new Point(-26, -23));
_local4.addFrame(new Rectangle(26, 54, 26, 21), new Point(-26, -23));
_local4.addFrame(new Rectangle(52, 54, 25, 21), new Point(-26, -23));
_local4.addFrame(new Rectangle(77, 54, 24, 21), new Point(-25, -23));
_local4.addFrame(new Rectangle(126, 75, 24, 22), new Point(-25, -24));
_local4.addFrame(new Rectangle(101, 54, 25, 21), new Point(-26, -23));
_local4.addFrame(new Rectangle(126, 54, 25, 21), new Point(-26, -23));
_local4.addFrame(new Rectangle(51, 34, 26, 20), new Point(-26, -23));
_local4.addFrame(new Rectangle(15, 165, 14, 24), new Point(-25, -32));
_local4.addFrame(new Rectangle(0, 119, 15, 23), new Point(-26, -32));
_local4.addFrame(new Rectangle(29, 165, 14, 24), new Point(-26, -32));
_local4.addFrame(new Rectangle(43, 165, 14, 24), new Point(-26, -32));
_local4.addFrame(new Rectangle(57, 165, 14, 24), new Point(-26, -32));
_local4.addFrame(new Rectangle(71, 165, 15, 24), new Point(-26, -32));
_local4.addFrame(new Rectangle(86, 165, 14, 24), new Point(-26, -32));
_local4.addFrame(new Rectangle(100, 165, 14, 24), new Point(-26, -32));
_local4.addFrame(new Rectangle(114, 165, 14, 24), new Point(-26, -32));
_local4.addFrame(new Rectangle(15, 119, 25, 23), new Point(-25, -41));
_local4.addFrame(new Rectangle(128, 165, 24, 24), new Point(-25, -42));
_local4.addFrame(new Rectangle(40, 119, 25, 23), new Point(-26, -41));
_local4.addFrame(new Rectangle(65, 119, 26, 23), new Point(-26, -41));
_local4.addFrame(new Rectangle(0, 97, 26, 22), new Point(-26, -41));
_local4.addFrame(new Rectangle(26, 97, 26, 22), new Point(-26, -41));
_local4.addFrame(new Rectangle(52, 97, 26, 22), new Point(-26, -41));
_local4.addFrame(new Rectangle(91, 119, 26, 23), new Point(-26, -41));
_local4.addFrame(new Rectangle(117, 119, 24, 23), new Point(-25, -41));
_local4.addFrame(new Rectangle(24, 11, 24, 11), new Point(-12, -40));
_local4.addFrame(new Rectangle(96, 22, 24, 12), new Point(-12, -42));
_local4.addFrame(new Rectangle(48, 11, 24, 11), new Point(-12, -41));
_local4.addFrame(new Rectangle(72, 11, 24, 11), new Point(-12, -41));
_local4.addFrame(new Rectangle(96, 11, 24, 11), new Point(-12, -41));
_local4.addFrame(new Rectangle(120, 22, 24, 12), new Point(-12, -42));
_local4.addFrame(new Rectangle(120, 11, 24, 11), new Point(-12, -41));
_local4.addFrame(new Rectangle(0, 22, 24, 11), new Point(-12, -41));
_local4.addFrame(new Rectangle(24, 22, 24, 11), new Point(-12, -41));
_local4.addFrame(new Rectangle(78, 97, 25, 22), new Point(0, -40));
_local4.addFrame(new Rectangle(103, 97, 26, 22), new Point(0, -41));
_local4.addFrame(new Rectangle(0, 142, 26, 23), new Point(0, -41));
_local4.addFrame(new Rectangle(26, 142, 25, 23), new Point(1, -41));
_local4.addFrame(new Rectangle(51, 142, 24, 23), new Point(1, -41));
_local4.addFrame(new Rectangle(0, 189, 24, 24), new Point(1, -42));
_local4.addFrame(new Rectangle(75, 142, 25, 23), new Point(1, -41));
_local4.addFrame(new Rectangle(100, 142, 25, 23), new Point(1, -41));
_local4.addFrame(new Rectangle(125, 142, 26, 23), new Point(0, -41));
_local4.addFrame(new Rectangle(24, 189, 14, 24), new Point(11, -32));
_local4.addFrame(new Rectangle(38, 189, 15, 24), new Point(11, -32));
_local4.addFrame(new Rectangle(53, 189, 14, 24), new Point(12, -32));
_local4.addFrame(new Rectangle(67, 189, 14, 24), new Point(12, -32));
_local4.addFrame(new Rectangle(81, 189, 14, 24), new Point(12, -32));
_local4.addFrame(new Rectangle(0, 165, 15, 23), new Point(11, -32));
_local4.addFrame(new Rectangle(95, 189, 14, 24), new Point(12, -32));
_local4.addFrame(new Rectangle(109, 189, 14, 24), new Point(12, -32));
_local4.addFrame(new Rectangle(123, 189, 14, 24), new Point(12, -32));
_local4.addFrame(new Rectangle(0, 75, 25, 21), new Point(0, -23));
_local4.addFrame(new Rectangle(129, 97, 24, 22), new Point(1, -24));
_local4.addFrame(new Rectangle(25, 75, 25, 21), new Point(1, -23));
_local4.addFrame(new Rectangle(50, 75, 26, 21), new Point(0, -23));
_local4.addFrame(new Rectangle(77, 34, 26, 20), new Point(0, -23));
_local4.addFrame(new Rectangle(103, 34, 26, 20), new Point(0, -23));
_local4.addFrame(new Rectangle(0, 54, 26, 20), new Point(0, -23));
_local4.addFrame(new Rectangle(76, 75, 26, 21), new Point(0, -23));
_local4.addFrame(new Rectangle(102, 75, 24, 21), new Point(1, -23));
break;
case "Rifle":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(660, 33, 5, 36), new Point(-14, -25));
_local4.addFrame(new Rectangle(665, 33, 4, 36), new Point(-13, -24));
_local4.addFrame(new Rectangle(656, 33, 4, 35), new Point(-13, -23));
_local4.addFrame(new Rectangle(689, 33, 5, 37), new Point(-14, -25));
_local4.addFrame(new Rectangle(669, 33, 6, 36), new Point(-14, -25));
_local4.addFrame(new Rectangle(694, 33, 6, 37), new Point(-14, -26));
_local4.addFrame(new Rectangle(675, 33, 5, 36), new Point(-13, -25));
_local4.addFrame(new Rectangle(700, 33, 6, 37), new Point(-14, -25));
_local4.addFrame(new Rectangle(680, 33, 4, 36), new Point(-13, -24));
_local4.addFrame(new Rectangle(300, 33, 32, 28), new Point(-36, -30));
_local4.addFrame(new Rectangle(173, 33, 32, 27), new Point(-37, -28));
_local4.addFrame(new Rectangle(358, 8, 29, 24), new Point(-37, -25));
_local4.addFrame(new Rectangle(205, 33, 31, 27), new Point(-36, -28));
_local4.addFrame(new Rectangle(0, 33, 31, 26), new Point(-36, -28));
_local4.addFrame(new Rectangle(332, 33, 32, 28), new Point(-35, -30));
_local4.addFrame(new Rectangle(31, 33, 31, 26), new Point(-36, -28));
_local4.addFrame(new Rectangle(236, 33, 31, 27), new Point(-36, -28));
_local4.addFrame(new Rectangle(387, 8, 29, 24), new Point(-37, -25));
_local4.addFrame(new Rectangle(190, 0, 49, 6), new Point(-41, -29));
_local4.addFrame(new Rectangle(0, 0, 39, 5), new Point(-42, -28));
_local4.addFrame(new Rectangle(39, 0, 38, 5), new Point(-41, -28));
_local4.addFrame(new Rectangle(77, 0, 38, 5), new Point(-41, -28));
_local4.addFrame(new Rectangle(239, 0, 48, 6), new Point(-40, -29));
_local4.addFrame(new Rectangle(287, 0, 49, 6), new Point(-40, -29));
_local4.addFrame(new Rectangle(336, 0, 48, 6), new Point(-40, -29));
_local4.addFrame(new Rectangle(115, 0, 37, 5), new Point(-40, -28));
_local4.addFrame(new Rectangle(152, 0, 38, 5), new Point(-41, -28));
_local4.addFrame(new Rectangle(416, 8, 37, 24), new Point(-22, -45));
_local4.addFrame(new Rectangle(98, 8, 37, 23), new Point(-23, -45));
_local4.addFrame(new Rectangle(135, 8, 37, 23), new Point(-23, -45));
_local4.addFrame(new Rectangle(453, 8, 37, 24), new Point(-22, -45));
_local4.addFrame(new Rectangle(172, 8, 37, 23), new Point(-22, -44));
_local4.addFrame(new Rectangle(209, 8, 38, 23), new Point(-22, -44));
_local4.addFrame(new Rectangle(247, 8, 37, 23), new Point(-22, -44));
_local4.addFrame(new Rectangle(284, 8, 37, 23), new Point(-22, -44));
_local4.addFrame(new Rectangle(321, 8, 37, 23), new Point(-23, -45));
_local4.addFrame(new Rectangle(684, 33, 5, 36), new Point(9, -48));
_local4.addFrame(new Rectangle(631, 33, 4, 34), new Point(9, -49));
_local4.addFrame(new Rectangle(706, 33, 5, 37), new Point(9, -48));
_local4.addFrame(new Rectangle(635, 33, 5, 34), new Point(9, -47));
_local4.addFrame(new Rectangle(711, 33, 6, 37), new Point(8, -47));
_local4.addFrame(new Rectangle(640, 33, 6, 34), new Point(8, -47));
_local4.addFrame(new Rectangle(717, 33, 6, 37), new Point(8, -47));
_local4.addFrame(new Rectangle(646, 33, 6, 34), new Point(8, -47));
_local4.addFrame(new Rectangle(652, 33, 4, 34), new Point(9, -48));
_local4.addFrame(new Rectangle(397, 33, 33, 29), new Point(3, -35));
_local4.addFrame(new Rectangle(430, 33, 34, 29), new Point(3, -35));
_local4.addFrame(new Rectangle(464, 33, 34, 29), new Point(3, -35));
_local4.addFrame(new Rectangle(364, 33, 33, 28), new Point(3, -34));
_local4.addFrame(new Rectangle(564, 33, 33, 30), new Point(3, -35));
_local4.addFrame(new Rectangle(498, 33, 33, 29), new Point(2, -35));
_local4.addFrame(new Rectangle(597, 33, 34, 30), new Point(2, -35));
_local4.addFrame(new Rectangle(531, 33, 33, 29), new Point(3, -34));
_local4.addFrame(new Rectangle(267, 33, 33, 27), new Point(4, -35));
_local4.addFrame(new Rectangle(384, 0, 49, 7), new Point(-8, -13));
_local4.addFrame(new Rectangle(433, 0, 49, 7), new Point(-7, -13));
_local4.addFrame(new Rectangle(482, 0, 49, 7), new Point(-8, -13));
_local4.addFrame(new Rectangle(678, 0, 49, 8), new Point(-8, -13));
_local4.addFrame(new Rectangle(531, 0, 49, 7), new Point(-9, -13));
_local4.addFrame(new Rectangle(0, 8, 49, 8), new Point(-9, -14));
_local4.addFrame(new Rectangle(580, 0, 49, 7), new Point(-9, -13));
_local4.addFrame(new Rectangle(49, 8, 49, 8), new Point(-8, -13));
_local4.addFrame(new Rectangle(629, 0, 49, 7), new Point(-8, -13));
_local4.addFrame(new Rectangle(62, 33, 37, 26), new Point(-15, -18));
_local4.addFrame(new Rectangle(99, 33, 37, 26), new Point(-14, -17));
_local4.addFrame(new Rectangle(490, 8, 37, 25), new Point(-14, -16));
_local4.addFrame(new Rectangle(527, 8, 37, 25), new Point(-15, -17));
_local4.addFrame(new Rectangle(564, 8, 38, 25), new Point(-16, -17));
_local4.addFrame(new Rectangle(602, 8, 38, 25), new Point(-16, -18));
_local4.addFrame(new Rectangle(640, 8, 37, 25), new Point(-15, -17));
_local4.addFrame(new Rectangle(136, 33, 37, 26), new Point(-15, -17));
_local4.addFrame(new Rectangle(677, 8, 37, 25), new Point(-14, -16));
break;
case "Magnum":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(136, 43, 5, 20), new Point(-13, -16));
_local4.addFrame(new Rectangle(141, 43, 5, 20), new Point(-13, -15));
_local4.addFrame(new Rectangle(146, 43, 5, 20), new Point(-13, -15));
_local4.addFrame(new Rectangle(151, 43, 5, 20), new Point(-13, -15));
_local4.addFrame(new Rectangle(192, 24, 5, 19), new Point(-13, -15));
_local4.addFrame(new Rectangle(156, 43, 5, 20), new Point(-13, -16));
_local4.addFrame(new Rectangle(197, 24, 5, 19), new Point(-13, -15));
_local4.addFrame(new Rectangle(161, 43, 5, 20), new Point(-13, -15));
_local4.addFrame(new Rectangle(166, 43, 5, 20), new Point(-13, -15));
_local4.addFrame(new Rectangle(153, 9, 19, 14), new Point(-35, -23));
_local4.addFrame(new Rectangle(172, 9, 19, 15), new Point(-36, -23));
_local4.addFrame(new Rectangle(191, 9, 19, 15), new Point(-36, -23));
_local4.addFrame(new Rectangle(210, 9, 19, 15), new Point(-36, -23));
_local4.addFrame(new Rectangle(229, 9, 20, 15), new Point(-36, -24));
_local4.addFrame(new Rectangle(249, 9, 19, 15), new Point(-35, -24));
_local4.addFrame(new Rectangle(153, 24, 20, 16), new Point(-36, -24));
_local4.addFrame(new Rectangle(268, 9, 19, 15), new Point(-36, -23));
_local4.addFrame(new Rectangle(287, 9, 19, 15), new Point(-36, -23));
_local4.addFrame(new Rectangle(0, 0, 25, 9), new Point(-38, -33));
_local4.addFrame(new Rectangle(50, 9, 26, 10), new Point(-40, -34));
_local4.addFrame(new Rectangle(25, 0, 26, 9), new Point(-40, -33));
_local4.addFrame(new Rectangle(51, 0, 25, 9), new Point(-39, -33));
_local4.addFrame(new Rectangle(76, 9, 26, 10), new Point(-39, -34));
_local4.addFrame(new Rectangle(102, 9, 25, 10), new Point(-38, -34));
_local4.addFrame(new Rectangle(127, 9, 26, 10), new Point(-39, -34));
_local4.addFrame(new Rectangle(76, 0, 25, 9), new Point(-39, -33));
_local4.addFrame(new Rectangle(101, 0, 25, 9), new Point(-39, -33));
_local4.addFrame(new Rectangle(202, 24, 19, 19), new Point(-21, -49));
_local4.addFrame(new Rectangle(221, 24, 19, 19), new Point(-22, -50));
_local4.addFrame(new Rectangle(240, 24, 20, 19), new Point(-22, -50));
_local4.addFrame(new Rectangle(260, 24, 19, 19), new Point(-21, -50));
_local4.addFrame(new Rectangle(171, 43, 19, 20), new Point(-21, -50));
_local4.addFrame(new Rectangle(279, 24, 19, 19), new Point(-21, -50));
_local4.addFrame(new Rectangle(190, 43, 19, 20), new Point(-21, -50));
_local4.addFrame(new Rectangle(298, 24, 19, 19), new Point(-21, -50));
_local4.addFrame(new Rectangle(0, 43, 20, 19), new Point(-22, -50));
_local4.addFrame(new Rectangle(297, 43, 5, 21), new Point(8, -52));
_local4.addFrame(new Rectangle(209, 43, 5, 20), new Point(8, -53));
_local4.addFrame(new Rectangle(302, 43, 5, 21), new Point(8, -53));
_local4.addFrame(new Rectangle(214, 43, 5, 20), new Point(8, -52));
_local4.addFrame(new Rectangle(219, 43, 5, 20), new Point(8, -52));
_local4.addFrame(new Rectangle(224, 43, 5, 20), new Point(8, -52));
_local4.addFrame(new Rectangle(229, 43, 5, 20), new Point(8, -52));
_local4.addFrame(new Rectangle(234, 43, 5, 20), new Point(8, -52));
_local4.addFrame(new Rectangle(307, 43, 5, 21), new Point(8, -53));
_local4.addFrame(new Rectangle(20, 43, 19, 19), new Point(16, -39));
_local4.addFrame(new Rectangle(39, 43, 19, 19), new Point(17, -40));
_local4.addFrame(new Rectangle(239, 43, 19, 20), new Point(17, -40));
_local4.addFrame(new Rectangle(58, 43, 20, 19), new Point(16, -39));
_local4.addFrame(new Rectangle(258, 43, 20, 20), new Point(16, -40));
_local4.addFrame(new Rectangle(278, 43, 19, 20), new Point(16, -40));
_local4.addFrame(new Rectangle(78, 43, 20, 19), new Point(16, -39));
_local4.addFrame(new Rectangle(98, 43, 19, 19), new Point(17, -39));
_local4.addFrame(new Rectangle(117, 43, 19, 19), new Point(17, -40));
_local4.addFrame(new Rectangle(126, 0, 25, 9), new Point(13, -19));
_local4.addFrame(new Rectangle(151, 0, 26, 9), new Point(14, -19));
_local4.addFrame(new Rectangle(177, 0, 26, 9), new Point(14, -19));
_local4.addFrame(new Rectangle(203, 0, 25, 9), new Point(14, -19));
_local4.addFrame(new Rectangle(228, 0, 25, 9), new Point(13, -19));
_local4.addFrame(new Rectangle(253, 0, 25, 9), new Point(13, -19));
_local4.addFrame(new Rectangle(278, 0, 26, 9), new Point(13, -19));
_local4.addFrame(new Rectangle(0, 9, 25, 9), new Point(14, -19));
_local4.addFrame(new Rectangle(25, 9, 25, 9), new Point(14, -19));
_local4.addFrame(new Rectangle(173, 24, 19, 16), new Point(2, -14));
_local4.addFrame(new Rectangle(0, 24, 19, 15), new Point(3, -13));
_local4.addFrame(new Rectangle(19, 24, 20, 15), new Point(2, -13));
_local4.addFrame(new Rectangle(39, 24, 19, 15), new Point(2, -13));
_local4.addFrame(new Rectangle(58, 24, 19, 15), new Point(2, -13));
_local4.addFrame(new Rectangle(77, 24, 19, 15), new Point(2, -14));
_local4.addFrame(new Rectangle(96, 24, 19, 15), new Point(2, -13));
_local4.addFrame(new Rectangle(115, 24, 19, 15), new Point(2, -13));
_local4.addFrame(new Rectangle(134, 24, 19, 15), new Point(2, -13));
break;
case "AK47":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(679, 17, 5, 25), new Point(-14, -20));
_local4.addFrame(new Rectangle(721, 17, 4, 26), new Point(-13, -20));
_local4.addFrame(new Rectangle(725, 17, 4, 26), new Point(-13, -20));
_local4.addFrame(new Rectangle(684, 17, 4, 25), new Point(-13, -20));
_local4.addFrame(new Rectangle(729, 17, 4, 26), new Point(-13, -21));
_local4.addFrame(new Rectangle(688, 17, 5, 25), new Point(-13, -21));
_local4.addFrame(new Rectangle(733, 17, 4, 26), new Point(-13, -21));
_local4.addFrame(new Rectangle(693, 17, 4, 25), new Point(-13, -20));
_local4.addFrame(new Rectangle(697, 17, 4, 25), new Point(-13, -20));
_local4.addFrame(new Rectangle(327, 17, 23, 20), new Point(-30, -26));
_local4.addFrame(new Rectangle(350, 17, 23, 20), new Point(-31, -26));
_local4.addFrame(new Rectangle(373, 17, 22, 20), new Point(-30, -26));
_local4.addFrame(new Rectangle(395, 17, 22, 20), new Point(-30, -26));
_local4.addFrame(new Rectangle(131, 17, 22, 19), new Point(-29, -26));
_local4.addFrame(new Rectangle(153, 17, 22, 19), new Point(-29, -26));
_local4.addFrame(new Rectangle(417, 17, 21, 20), new Point(-29, -26));
_local4.addFrame(new Rectangle(175, 17, 22, 19), new Point(-30, -25));
_local4.addFrame(new Rectangle(438, 17, 22, 20), new Point(-30, -26));
_local4.addFrame(new Rectangle(0, 0, 30, 11), new Point(-31, -29));
_local4.addFrame(new Rectangle(30, 0, 29, 11), new Point(-32, -29));
_local4.addFrame(new Rectangle(59, 0, 29, 11), new Point(-32, -28));
_local4.addFrame(new Rectangle(88, 0, 28, 11), new Point(-31, -28));
_local4.addFrame(new Rectangle(432, 0, 28, 12), new Point(-31, -29));
_local4.addFrame(new Rectangle(116, 0, 28, 11), new Point(-30, -29));
_local4.addFrame(new Rectangle(144, 0, 28, 11), new Point(-31, -28));
_local4.addFrame(new Rectangle(172, 0, 28, 11), new Point(-31, -28));
_local4.addFrame(new Rectangle(200, 0, 29, 11), new Point(-32, -28));
_local4.addFrame(new Rectangle(711, 0, 25, 17), new Point(-15, -40));
_local4.addFrame(new Rectangle(562, 0, 25, 16), new Point(-16, -41));
_local4.addFrame(new Rectangle(587, 0, 25, 16), new Point(-16, -40));
_local4.addFrame(new Rectangle(612, 0, 24, 16), new Point(-15, -40));
_local4.addFrame(new Rectangle(636, 0, 25, 16), new Point(-15, -40));
_local4.addFrame(new Rectangle(736, 0, 24, 17), new Point(-15, -40));
_local4.addFrame(new Rectangle(0, 17, 25, 17), new Point(-15, -40));
_local4.addFrame(new Rectangle(661, 0, 25, 16), new Point(-16, -40));
_local4.addFrame(new Rectangle(686, 0, 25, 16), new Point(-16, -40));
_local4.addFrame(new Rectangle(737, 17, 5, 26), new Point(9, -41));
_local4.addFrame(new Rectangle(701, 17, 4, 25), new Point(9, -42));
_local4.addFrame(new Rectangle(705, 17, 4, 25), new Point(9, -41));
_local4.addFrame(new Rectangle(742, 17, 4, 26), new Point(9, -41));
_local4.addFrame(new Rectangle(746, 17, 4, 26), new Point(9, -41));
_local4.addFrame(new Rectangle(750, 17, 5, 26), new Point(8, -41));
_local4.addFrame(new Rectangle(709, 17, 4, 25), new Point(9, -40));
_local4.addFrame(new Rectangle(713, 17, 4, 25), new Point(9, -40));
_local4.addFrame(new Rectangle(717, 17, 4, 25), new Point(9, -41));
_local4.addFrame(new Rectangle(460, 17, 24, 22), new Point(6, -29));
_local4.addFrame(new Rectangle(484, 17, 25, 22), new Point(6, -30));
_local4.addFrame(new Rectangle(607, 17, 24, 23), new Point(6, -30));
_local4.addFrame(new Rectangle(509, 17, 25, 22), new Point(5, -29));
_local4.addFrame(new Rectangle(631, 17, 24, 23), new Point(5, -29));
_local4.addFrame(new Rectangle(534, 17, 24, 22), new Point(5, -29));
_local4.addFrame(new Rectangle(655, 17, 24, 23), new Point(5, -29));
_local4.addFrame(new Rectangle(558, 17, 25, 22), new Point(5, -29));
_local4.addFrame(new Rectangle(583, 17, 24, 22), new Point(6, -29));
_local4.addFrame(new Rectangle(229, 0, 34, 11), new Point(-3, -13));
_local4.addFrame(new Rectangle(263, 0, 34, 11), new Point(-2, -13));
_local4.addFrame(new Rectangle(460, 0, 34, 12), new Point(-2, -13));
_local4.addFrame(new Rectangle(494, 0, 34, 12), new Point(-3, -13));
_local4.addFrame(new Rectangle(297, 0, 34, 11), new Point(-3, -13));
_local4.addFrame(new Rectangle(331, 0, 33, 11), new Point(-3, -13));
_local4.addFrame(new Rectangle(364, 0, 34, 11), new Point(-3, -13));
_local4.addFrame(new Rectangle(528, 0, 34, 12), new Point(-3, -13));
_local4.addFrame(new Rectangle(398, 0, 34, 11), new Point(-2, -13));
_local4.addFrame(new Rectangle(197, 17, 26, 19), new Point(-11, -15));
_local4.addFrame(new Rectangle(25, 17, 26, 18), new Point(-10, -14));
_local4.addFrame(new Rectangle(223, 17, 26, 19), new Point(-10, -14));
_local4.addFrame(new Rectangle(51, 17, 26, 18), new Point(-11, -14));
_local4.addFrame(new Rectangle(249, 17, 26, 19), new Point(-11, -15));
_local4.addFrame(new Rectangle(77, 17, 27, 18), new Point(-12, -15));
_local4.addFrame(new Rectangle(275, 17, 26, 19), new Point(-11, -15));
_local4.addFrame(new Rectangle(104, 17, 27, 18), new Point(-11, -14));
_local4.addFrame(new Rectangle(301, 17, 26, 19), new Point(-10, -15));
break;
case "AkimboPistols":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 24, 9), new Point(-12, -14));
_local4.addFrame(new Rectangle(144, 0, 24, 10), new Point(-12, -14));
_local4.addFrame(new Rectangle(0, 10, 24, 10), new Point(-12, -14));
_local4.addFrame(new Rectangle(24, 0, 24, 9), new Point(-12, -13));
_local4.addFrame(new Rectangle(24, 10, 24, 10), new Point(-12, -14));
_local4.addFrame(new Rectangle(48, 10, 24, 10), new Point(-12, -14));
_local4.addFrame(new Rectangle(72, 10, 24, 10), new Point(-12, -14));
_local4.addFrame(new Rectangle(48, 0, 24, 9), new Point(-12, -13));
_local4.addFrame(new Rectangle(96, 10, 24, 10), new Point(-12, -14));
_local4.addFrame(new Rectangle(144, 20, 23, 18), new Point(-24, -22));
_local4.addFrame(new Rectangle(96, 20, 24, 17), new Point(-25, -22));
_local4.addFrame(new Rectangle(0, 38, 24, 18), new Point(-25, -22));
_local4.addFrame(new Rectangle(24, 38, 23, 18), new Point(-25, -22));
_local4.addFrame(new Rectangle(47, 38, 23, 18), new Point(-25, -22));
_local4.addFrame(new Rectangle(119, 56, 22, 19), new Point(-24, -23));
_local4.addFrame(new Rectangle(70, 38, 23, 18), new Point(-25, -22));
_local4.addFrame(new Rectangle(93, 38, 23, 18), new Point(-25, -22));
_local4.addFrame(new Rectangle(116, 38, 23, 18), new Point(-25, -22));
_local4.addFrame(new Rectangle(116, 95, 10, 21), new Point(-23, -31));
_local4.addFrame(new Rectangle(21, 137, 12, 22), new Point(-25, -32));
_local4.addFrame(new Rectangle(33, 137, 11, 22), new Point(-24, -32));
_local4.addFrame(new Rectangle(126, 95, 10, 21), new Point(-24, -31));
_local4.addFrame(new Rectangle(44, 137, 11, 22), new Point(-24, -32));
_local4.addFrame(new Rectangle(55, 137, 12, 22), new Point(-25, -32));
_local4.addFrame(new Rectangle(67, 137, 11, 22), new Point(-24, -32));
_local4.addFrame(new Rectangle(78, 137, 10, 22), new Point(-24, -32));
_local4.addFrame(new Rectangle(88, 137, 11, 22), new Point(-24, -32));
_local4.addFrame(new Rectangle(23, 75, 23, 20), new Point(-24, -40));
_local4.addFrame(new Rectangle(136, 95, 22, 21), new Point(-24, -42));
_local4.addFrame(new Rectangle(46, 75, 23, 20), new Point(-25, -41));
_local4.addFrame(new Rectangle(0, 116, 24, 21), new Point(-25, -41));
_local4.addFrame(new Rectangle(69, 75, 24, 20), new Point(-25, -41));
_local4.addFrame(new Rectangle(93, 75, 24, 20), new Point(-25, -41));
_local4.addFrame(new Rectangle(117, 75, 24, 20), new Point(-25, -41));
_local4.addFrame(new Rectangle(24, 116, 24, 21), new Point(-25, -41));
_local4.addFrame(new Rectangle(141, 75, 23, 20), new Point(-25, -41));
_local4.addFrame(new Rectangle(72, 0, 24, 9), new Point(-12, -40));
_local4.addFrame(new Rectangle(120, 10, 24, 10), new Point(-12, -41));
_local4.addFrame(new Rectangle(144, 10, 24, 10), new Point(-12, -41));
_local4.addFrame(new Rectangle(96, 0, 24, 9), new Point(-12, -40));
_local4.addFrame(new Rectangle(0, 20, 24, 10), new Point(-12, -41));
_local4.addFrame(new Rectangle(24, 20, 24, 10), new Point(-12, -41));
_local4.addFrame(new Rectangle(48, 20, 24, 10), new Point(-12, -41));
_local4.addFrame(new Rectangle(120, 0, 24, 9), new Point(-12, -40));
_local4.addFrame(new Rectangle(72, 20, 24, 10), new Point(-12, -41));
_local4.addFrame(new Rectangle(0, 95, 23, 20), new Point(1, -40));
_local4.addFrame(new Rectangle(23, 95, 24, 20), new Point(1, -41));
_local4.addFrame(new Rectangle(47, 95, 24, 20), new Point(1, -41));
_local4.addFrame(new Rectangle(48, 116, 23, 21), new Point(2, -41));
_local4.addFrame(new Rectangle(71, 116, 23, 21), new Point(2, -41));
_local4.addFrame(new Rectangle(71, 95, 22, 20), new Point(2, -41));
_local4.addFrame(new Rectangle(94, 116, 23, 21), new Point(2, -41));
_local4.addFrame(new Rectangle(117, 116, 23, 21), new Point(2, -41));
_local4.addFrame(new Rectangle(93, 95, 23, 20), new Point(2, -41));
_local4.addFrame(new Rectangle(140, 116, 10, 21), new Point(13, -31));
_local4.addFrame(new Rectangle(99, 137, 12, 22), new Point(13, -32));
_local4.addFrame(new Rectangle(111, 137, 12, 22), new Point(13, -32));
_local4.addFrame(new Rectangle(150, 116, 10, 21), new Point(14, -31));
_local4.addFrame(new Rectangle(123, 137, 11, 22), new Point(13, -32));
_local4.addFrame(new Rectangle(134, 137, 12, 22), new Point(13, -32));
_local4.addFrame(new Rectangle(146, 137, 11, 22), new Point(13, -32));
_local4.addFrame(new Rectangle(0, 137, 10, 21), new Point(14, -31));
_local4.addFrame(new Rectangle(10, 137, 11, 21), new Point(13, -31));
_local4.addFrame(new Rectangle(139, 38, 23, 18), new Point(1, -22));
_local4.addFrame(new Rectangle(141, 56, 22, 19), new Point(2, -23));
_local4.addFrame(new Rectangle(0, 75, 23, 19), new Point(2, -22));
_local4.addFrame(new Rectangle(0, 56, 24, 18), new Point(1, -22));
_local4.addFrame(new Rectangle(24, 56, 24, 18), new Point(1, -22));
_local4.addFrame(new Rectangle(120, 20, 24, 17), new Point(1, -22));
_local4.addFrame(new Rectangle(48, 56, 24, 18), new Point(1, -22));
_local4.addFrame(new Rectangle(72, 56, 24, 18), new Point(1, -22));
_local4.addFrame(new Rectangle(96, 56, 23, 18), new Point(2, -22));
break;
case "M16":
_local4 = new ThingClip(combine((_arg1 + "Color"), (_arg1 + "Alpha")));
_local2 = _local4;
_local4.addFrame(new Rectangle(645, 35, 5, 34), new Point(-14, -25));
_local4.addFrame(new Rectangle(615, 35, 4, 33), new Point(-13, -23));
_local4.addFrame(new Rectangle(619, 35, 4, 33), new Point(-13, -23));
_local4.addFrame(new Rectangle(623, 35, 4, 33), new Point(-13, -23));
_local4.addFrame(new Rectangle(650, 35, 5, 34), new Point(-13, -25));
_local4.addFrame(new Rectangle(655, 35, 5, 34), new Point(-13, -25));
_local4.addFrame(new Rectangle(627, 35, 5, 33), new Point(-13, -24));
_local4.addFrame(new Rectangle(632, 35, 4, 33), new Point(-13, -23));
_local4.addFrame(new Rectangle(636, 35, 4, 33), new Point(-13, -23));
_local4.addFrame(new Rectangle(244, 35, 30, 26), new Point(-34, -29));
_local4.addFrame(new Rectangle(69, 35, 30, 25), new Point(-35, -28));
_local4.addFrame(new Rectangle(314, 12, 27, 22), new Point(-35, -25));
_local4.addFrame(new Rectangle(99, 35, 29, 25), new Point(-34, -28));
_local4.addFrame(new Rectangle(128, 35, 29, 25), new Point(-34, -28));
_local4.addFrame(new Rectangle(157, 35, 29, 25), new Point(-33, -28));
_local4.addFrame(new Rectangle(186, 35, 29, 25), new Point(-34, -28));
_local4.addFrame(new Rectangle(215, 35, 29, 25), new Point(-34, -28));
_local4.addFrame(new Rectangle(341, 12, 27, 22), new Point(-35, -25));
_local4.addFrame(new Rectangle(116, 0, 46, 10), new Point(-38, -29));
_local4.addFrame(new Rectangle(233, 0, 36, 11), new Point(-39, -29));
_local4.addFrame(new Rectangle(269, 0, 36, 11), new Point(-39, -29));
_local4.addFrame(new Rectangle(162, 0, 36, 10), new Point(-38, -29));
_local4.addFrame(new Rectangle(46, 0, 35, 9), new Point(-37, -29));
_local4.addFrame(new Rectangle(0, 0, 46, 8), new Point(-37, -29));
_local4.addFrame(new Rectangle(81, 0, 35, 9), new Point(-37, -29));
_local4.addFrame(new Rectangle(198, 0, 35, 10), new Point(-38, -29));
_local4.addFrame(new Rectangle(305, 0, 35, 11), new Point(-38, -29));
_local4.addFrame(new Rectangle(368, 12, 35, 22), new Point(-20, -43));
_local4.addFrame(new Rectangle(91, 12, 30, 18), new Point(-21, -43));
_local4.addFrame(new Rectangle(274, 35, 33, 26), new Point(-21, -43));
_local4.addFrame(new Rectangle(121, 12, 29, 18), new Point(-20, -42));
_local4.addFrame(new Rectangle(209, 12, 35, 21), new Point(-20, -42));
_local4.addFrame(new Rectangle(244, 12, 35, 21), new Point(-20, -42));
_local4.addFrame(new Rectangle(279, 12, 35, 21), new Point(-20, -42));
_local4.addFrame(new Rectangle(150, 12, 29, 18), new Point(-20, -42));
_local4.addFrame(new Rectangle(179, 12, 30, 19), new Point(-21, -43));
_local4.addFrame(new Rectangle(640, 35, 5, 33), new Point(9, -45));
_local4.addFrame(new Rectangle(580, 35, 4, 29), new Point(9, -46));
_local4.addFrame(new Rectangle(588, 35, 4, 30), new Point(9, -46));
_local4.addFrame(new Rectangle(596, 35, 4, 31), new Point(9, -45));
_local4.addFrame(new Rectangle(600, 35, 5, 32), new Point(8, -45));
_local4.addFrame(new Rectangle(605, 35, 5, 32), new Point(8, -45));
_local4.addFrame(new Rectangle(610, 35, 5, 32), new Point(8, -45));
_local4.addFrame(new Rectangle(592, 35, 4, 30), new Point(9, -45));
_local4.addFrame(new Rectangle(584, 35, 4, 29), new Point(9, -45));
_local4.addFrame(new Rectangle(428, 35, 31, 27), new Point(3, -33));
_local4.addFrame(new Rectangle(307, 35, 30, 26), new Point(5, -33));
_local4.addFrame(new Rectangle(459, 35, 30, 27), new Point(5, -33));
_local4.addFrame(new Rectangle(337, 35, 30, 26), new Point(4, -32));
_local4.addFrame(new Rectangle(489, 35, 31, 27), new Point(3, -33));
_local4.addFrame(new Rectangle(520, 35, 30, 27), new Point(3, -33));
_local4.addFrame(new Rectangle(367, 35, 31, 26), new Point(3, -32));
_local4.addFrame(new Rectangle(398, 35, 30, 26), new Point(4, -32));
_local4.addFrame(new Rectangle(550, 35, 30, 27), new Point(5, -33));
_local4.addFrame(new Rectangle(476, 0, 46, 12), new Point(-8, -14));
_local4.addFrame(new Rectangle(522, 0, 45, 12), new Point(-6, -14));
_local4.addFrame(new Rectangle(340, 0, 45, 11), new Point(-6, -13));
_local4.addFrame(new Rectangle(385, 0, 46, 11), new Point(-8, -13));
_local4.addFrame(new Rectangle(567, 0, 46, 12), new Point(-9, -14));
_local4.addFrame(new Rectangle(613, 0, 46, 12), new Point(-9, -14));
_local4.addFrame(new Rectangle(0, 12, 46, 12), new Point(-9, -14));
_local4.addFrame(new Rectangle(431, 0, 45, 11), new Point(-7, -13));
_local4.addFrame(new Rectangle(46, 12, 45, 12), new Point(-7, -14));
_local4.addFrame(new Rectangle(0, 35, 35, 24), new Point(-15, -17));
_local4.addFrame(new Rectangle(35, 35, 34, 24), new Point(-13, -16));
_local4.addFrame(new Rectangle(438, 12, 34, 23), new Point(-13, -16));
_local4.addFrame(new Rectangle(472, 12, 34, 23), new Point(-14, -16));
_local4.addFrame(new Rectangle(506, 12, 35, 23), new Point(-15, -16));
_local4.addFrame(new Rectangle(541, 12, 35, 23), new Point(-15, -17));
_local4.addFrame(new Rectangle(403, 12, 35, 22), new Point(-15, -16));
_local4.addFrame(new Rectangle(576, 12, 34, 23), new Point(-14, -16));
_local4.addFrame(new Rectangle(610, 12, 35, 23), new Point(-14, -16));
break;
case "BountyCrate":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(16, 0, 18, 21), new Point(-9, -15));
_local4.addFrame(new Rectangle(68, 0, 18, 23), new Point(-9, -16));
_local4.addFrame(new Rectangle(86, 0, 20, 23), new Point(-10, -16));
_local4.addFrame(new Rectangle(106, 0, 20, 23), new Point(-10, -16));
_local4.addFrame(new Rectangle(126, 0, 18, 23), new Point(-9, -16));
_local4.addFrame(new Rectangle(34, 0, 18, 21), new Point(-9, -15));
_local4.addFrame(new Rectangle(52, 0, 16, 21), new Point(-8, -15));
_local4.addFrame(new Rectangle(0, 0, 16, 20), new Point(-8, -14));
break;
case "RedBountyCrate":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(16, 0, 18, 21), new Point(-9, -15));
_local4.addFrame(new Rectangle(68, 0, 18, 23), new Point(-9, -16));
_local4.addFrame(new Rectangle(86, 0, 20, 23), new Point(-10, -16));
_local4.addFrame(new Rectangle(106, 0, 20, 23), new Point(-10, -16));
_local4.addFrame(new Rectangle(126, 0, 18, 23), new Point(-9, -16));
_local4.addFrame(new Rectangle(34, 0, 18, 21), new Point(-9, -15));
_local4.addFrame(new Rectangle(52, 0, 16, 21), new Point(-8, -15));
_local4.addFrame(new Rectangle(0, 0, 16, 20), new Point(-8, -14));
break;
case "GoldBountyCrate":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(16, 0, 18, 21), new Point(-9, -15));
_local4.addFrame(new Rectangle(68, 0, 18, 23), new Point(-9, -16));
_local4.addFrame(new Rectangle(86, 0, 20, 23), new Point(-10, -16));
_local4.addFrame(new Rectangle(106, 0, 20, 23), new Point(-10, -16));
_local4.addFrame(new Rectangle(126, 0, 18, 23), new Point(-9, -16));
_local4.addFrame(new Rectangle(34, 0, 18, 21), new Point(-9, -15));
_local4.addFrame(new Rectangle(52, 0, 16, 21), new Point(-8, -15));
_local4.addFrame(new Rectangle(0, 0, 16, 20), new Point(-8, -14));
break;
case "BountyCrate_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-10, -8));
break;
case "MortarShell":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-3, -3));
break;
case "Grenade_Projectile1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-3, -4));
break;
case "Grenade_Projectile2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-4, -4));
break;
case "Grenade_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-2, -2));
break;
case "LaunchGrenade":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-2, -2));
break;
case "PlasmaBall":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(12, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(24, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(36, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(48, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(60, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(72, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(84, 0, 12, 12), new Point(-6, -6));
break;
case "PlasmaBall_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-5, -5));
break;
case "MuzzleFlashSmall1":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(128, 0, 18, 20), new Point(-10, -5));
_local4.addFrame(new Rectangle(0, 0, 19, 17), new Point(-14, -6));
_local4.addFrame(new Rectangle(19, 0, 24, 17), new Point(-20, -8));
_local4.addFrame(new Rectangle(86, 0, 21, 18), new Point(-15, -11));
_local4.addFrame(new Rectangle(146, 0, 19, 20), new Point(-9, -15));
_local4.addFrame(new Rectangle(43, 0, 19, 17), new Point(-5, -11));
_local4.addFrame(new Rectangle(62, 0, 24, 17), new Point(-4, -9));
_local4.addFrame(new Rectangle(107, 0, 21, 18), new Point(-6, -7));
break;
case "MuzzleFlashSmall2":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(124, 0, 17, 20), new Point(-8, -6));
_local4.addFrame(new Rectangle(0, 0, 19, 18), new Point(-14, -8));
_local4.addFrame(new Rectangle(19, 0, 23, 18), new Point(-19, -10));
_local4.addFrame(new Rectangle(42, 0, 20, 18), new Point(-14, -11));
_local4.addFrame(new Rectangle(83, 0, 18, 19), new Point(-9, -14));
_local4.addFrame(new Rectangle(62, 0, 21, 18), new Point(-6, -11));
_local4.addFrame(new Rectangle(101, 0, 23, 19), new Point(-4, -10));
_local4.addFrame(new Rectangle(141, 0, 21, 20), new Point(-6, -9));
break;
case "MuzzleFlashLarge1":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(180, 0, 26, 28), new Point(-14, -7));
_local4.addFrame(new Rectangle(66, 0, 28, 25), new Point(-21, -9));
_local4.addFrame(new Rectangle(33, 0, 33, 24), new Point(-29, -11));
_local4.addFrame(new Rectangle(94, 0, 29, 25), new Point(-21, -16));
_local4.addFrame(new Rectangle(206, 0, 25, 28), new Point(-11, -21));
_local4.addFrame(new Rectangle(123, 0, 28, 25), new Point(-7, -16));
_local4.addFrame(new Rectangle(0, 0, 33, 23), new Point(-4, -12));
_local4.addFrame(new Rectangle(151, 0, 29, 25), new Point(-8, -9));
break;
case "MuzzleFlashLarge2":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(200, 0, 24, 29), new Point(-12, -9));
_local4.addFrame(new Rectangle(60, 0, 28, 26), new Point(-20, -11));
_local4.addFrame(new Rectangle(0, 0, 33, 24), new Point(-29, -13));
_local4.addFrame(new Rectangle(33, 0, 27, 25), new Point(-20, -16));
_local4.addFrame(new Rectangle(176, 0, 24, 28), new Point(-12, -21));
_local4.addFrame(new Rectangle(88, 0, 28, 26), new Point(-7, -16));
_local4.addFrame(new Rectangle(116, 0, 32, 27), new Point(-4, -14));
_local4.addFrame(new Rectangle(148, 0, 28, 27), new Point(-7, -11));
break;
case "MuzzleFlashRailgun":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 22, 16), new Point(-12, -5));
_local4.addFrame(new Rectangle(77, 0, 16, 17), new Point(-11, -7));
_local4.addFrame(new Rectangle(125, 0, 16, 19), new Point(-16, -8));
_local4.addFrame(new Rectangle(22, 0, 17, 16), new Point(-11, -9));
_local4.addFrame(new Rectangle(39, 0, 21, 16), new Point(-9, -11));
_local4.addFrame(new Rectangle(93, 0, 16, 17), new Point(-5, -10));
_local4.addFrame(new Rectangle(109, 0, 16, 18), new Point(0, -10));
_local4.addFrame(new Rectangle(60, 0, 17, 16), new Point(-6, -7));
break;
case "MuzzleFlashTurret1":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(477, 0, 18, 20), new Point(-10, -5));
_local4.addFrame(new Rectangle(618, 0, 18, 21), new Point(-10, -6));
_local4.addFrame(new Rectangle(495, 0, 17, 20), new Point(-10, -6));
_local4.addFrame(new Rectangle(402, 0, 18, 19), new Point(-12, -6));
_local4.addFrame(new Rectangle(114, 0, 19, 17), new Point(-14, -6));
_local4.addFrame(new Rectangle(133, 0, 22, 17), new Point(-17, -7));
_local4.addFrame(new Rectangle(0, 0, 22, 16), new Point(-18, -7));
_local4.addFrame(new Rectangle(155, 0, 24, 17), new Point(-20, -8));
_local4.addFrame(new Rectangle(179, 0, 24, 17), new Point(-20, -8));
_local4.addFrame(new Rectangle(203, 0, 24, 17), new Point(-20, -8));
_local4.addFrame(new Rectangle(22, 0, 23, 16), new Point(-19, -8));
_local4.addFrame(new Rectangle(338, 0, 22, 18), new Point(-17, -10));
_local4.addFrame(new Rectangle(360, 0, 21, 18), new Point(-15, -11));
_local4.addFrame(new Rectangle(420, 0, 19, 19), new Point(-12, -13));
_local4.addFrame(new Rectangle(0x0200, 0, 17, 20), new Point(-9, -14));
_local4.addFrame(new Rectangle(529, 0, 18, 20), new Point(-8, -15));
_local4.addFrame(new Rectangle(547, 0, 19, 20), new Point(-9, -15));
_local4.addFrame(new Rectangle(636, 0, 18, 21), new Point(-8, -15));
_local4.addFrame(new Rectangle(566, 0, 17, 20), new Point(-7, -14));
_local4.addFrame(new Rectangle(439, 0, 18, 19), new Point(-6, -13));
_local4.addFrame(new Rectangle(227, 0, 19, 17), new Point(-5, -11));
_local4.addFrame(new Rectangle(246, 0, 22, 17), new Point(-5, -10));
_local4.addFrame(new Rectangle(45, 0, 22, 16), new Point(-4, -9));
_local4.addFrame(new Rectangle(268, 0, 24, 17), new Point(-4, -9));
_local4.addFrame(new Rectangle(292, 0, 24, 17), new Point(-4, -9));
_local4.addFrame(new Rectangle(67, 0, 24, 16), new Point(-4, -8));
_local4.addFrame(new Rectangle(91, 0, 23, 16), new Point(-4, -8));
_local4.addFrame(new Rectangle(316, 0, 22, 17), new Point(-5, -7));
_local4.addFrame(new Rectangle(381, 0, 21, 18), new Point(-6, -7));
_local4.addFrame(new Rectangle(457, 0, 20, 19), new Point(-7, -6));
_local4.addFrame(new Rectangle(583, 0, 17, 20), new Point(-8, -6));
_local4.addFrame(new Rectangle(600, 0, 18, 20), new Point(-10, -5));
break;
case "ShellCasing1":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(6, 0, 3, 4), new Point(-2, -2));
_local4.addFrame(new Rectangle(0, 0, 3, 3), new Point(-2, -2));
_local4.addFrame(new Rectangle(0, 4, 3, 4), new Point(-1, -2));
_local4.addFrame(new Rectangle(3, 4, 3, 4), new Point(-1, -2));
_local4.addFrame(new Rectangle(3, 0, 3, 3), new Point(-1, -1));
_local4.addFrame(new Rectangle(6, 4, 3, 4), new Point(-2, -2));
break;
case "ShotgunShell":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 5, 4), new Point(-3, -2));
_local4.addFrame(new Rectangle(5, 0, 4, 4), new Point(-2, -2));
_local4.addFrame(new Rectangle(28, 0, 4, 5), new Point(-2, -3));
_local4.addFrame(new Rectangle(9, 0, 5, 4), new Point(-2, -2));
_local4.addFrame(new Rectangle(14, 0, 5, 4), new Point(-2, -2));
_local4.addFrame(new Rectangle(19, 0, 4, 4), new Point(-2, -2));
_local4.addFrame(new Rectangle(32, 0, 4, 5), new Point(-2, -2));
_local4.addFrame(new Rectangle(23, 0, 5, 4), new Point(-3, -2));
break;
case "Scorch1":
case "Scorch2":
case "Scorch3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-80, -56));
break;
case "ScorchCell1":
case "ScorchCell2":
case "ScorchCell3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -14));
break;
case "PlasmaBallExplosion":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 12, 12), new Point(-6, -6));
_local4.addFrame(new Rectangle(12, 0, 12, 14), new Point(-6, -7));
_local4.addFrame(new Rectangle(0, 14, 12, 14), new Point(-6, -7));
_local4.addFrame(new Rectangle(12, 14, 14, 16), new Point(-7, -8));
_local4.addFrame(new Rectangle(0, 30, 14, 18), new Point(-7, -9));
_local4.addFrame(new Rectangle(14, 30, 14, 20), new Point(-7, -10));
_local4.addFrame(new Rectangle(0, 50, 14, 20), new Point(-7, -10));
_local4.addFrame(new Rectangle(0, 0, 0, 0), new Point(-75, -75));
break;
case "Tree1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-35, -90));
break;
case "Tree1_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-28, -9)));
break;
case "Tree2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-58, -65));
break;
case "Tree2_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-42, -12)));
break;
case "Rock1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-15, -45));
break;
case "Rock1_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-16, -6)));
break;
case "Rock2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -22));
break;
case "Rock2_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, -4)));
break;
case "Crate1":
case "Crate2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-19, -42));
break;
case "Crate_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-19, -11)));
break;
case "WallPost":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-40, -94));
break;
case "WallPost_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-56, -40));
break;
case "WallHorizontal":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-120, -66));
break;
case "WallHorizontal_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-136, -31));
break;
case "WallVertical":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-30, -132));
break;
case "WallVertical_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-46, -95));
break;
case "Mailbox0":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-18, -43));
break;
case "Mailbox1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-16, -47));
break;
case "Mailbox2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-18, -43));
break;
case "Mailbox3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-16, -47));
break;
case "Mailbox_Shadow0":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-17, -11)));
break;
case "Mailbox_Shadow1":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-15, -7)));
break;
case "FireHydrant0":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-12, -27));
break;
case "FireHydrant1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-11, -27));
break;
case "FireHydrant_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-9, -6)));
break;
case "TrashCan0":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-17, -37));
break;
case "TrashCan1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-18, -36));
break;
case "TrashCan2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-14, -35));
break;
case "TrashCan_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-12, -2)));
break;
case "StoneWall1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -70));
break;
case "Fence1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-2, -68));
break;
case "Fence2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -55));
break;
case "Fence3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -68));
break;
case "Fence4":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-2, -68));
break;
case "Fence6":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-2, -68));
break;
case "Fence7":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-2, -55));
break;
case "Fence8":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -55));
break;
case "Fence9":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -55));
break;
case "Fence_Shadow1":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-3, -4)));
break;
case "Fence_Shadow2":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, -3)));
break;
case "Fence_Shadow3":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, -18)));
break;
case "Fence_Shadow4":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-3, -18)));
break;
case "Fence_Shadow7":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-3, -3)));
break;
case "Fence_Shadow9":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, -4)));
break;
case "BrickWall1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-40, -55));
break;
case "BrickWall2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -69));
break;
case "BrickWall3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -55));
break;
case "BrickWall_Shadow1":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-41, -16)));
break;
case "BrickWall_Shadow2":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, -30)));
break;
case "BrickWall_Shadow3":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, -16)));
break;
case "Factory1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, (-14 - 126)));
break;
case "Factory2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, (-14 - 126)));
break;
case "Factory3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, (-14 - 126)));
break;
case "Factory4":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-40, (-14 - 126)));
break;
case "Factory5":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-60, (-14 - 126)));
break;
case "Factory6":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, (-14 - 126)));
break;
case "Factory_Shadow1":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, (-14 - 3))));
break;
case "Factory_Shadow2":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-41, (-14 - 3))));
break;
case "Factory_Shadow3":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-61, (-14 - 3))));
break;
case "Barricade1":
case "Barricade2":
case "Barricade3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -32));
break;
case "Barricade_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-50, -37));
break;
case "Barrel1":
case "Barrel2":
case "Barrel3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-13, -36));
break;
case "Barrel_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-24, -13));
break;
case "Turret_Shadow":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-16, -12));
break;
case "TurretMG":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 19, 14), new Point(-11, -7));
_local4.addFrame(new Rectangle(625, 0, 19, 28), new Point(-11, -21));
_local4.addFrame(new Rectangle(350, 0, 19, 26), new Point(-11, -19));
_local4.addFrame(new Rectangle(710, 0, 22, 30), new Point(-11, -23));
_local4.addFrame(new Rectangle(644, 0, 25, 29), new Point(-11, -22));
_local4.addFrame(new Rectangle(574, 0, 27, 27), new Point(-11, -20));
_local4.addFrame(new Rectangle(297, 0, 28, 25), new Point(-11, -18));
_local4.addFrame(new Rectangle(369, 0, 28, 26), new Point(-11, -19));
_local4.addFrame(new Rectangle(200, 0, 28, 21), new Point(-11, -14));
_local4.addFrame(new Rectangle(147, 0, 28, 20), new Point(-11, -13));
_local4.addFrame(new Rectangle(71, 0, 27, 19), new Point(-11, -12));
_local4.addFrame(new Rectangle(19, 0, 27, 18), new Point(-11, -11));
_local4.addFrame(new Rectangle(46, 0, 25, 18), new Point(-11, -11));
_local4.addFrame(new Rectangle(397, 0, 23, 26), new Point(-11, -19));
_local4.addFrame(new Rectangle(420, 0, 26, 26), new Point(-11, -19));
_local4.addFrame(new Rectangle(446, 0, 26, 26), new Point(-11, -19));
_local4.addFrame(new Rectangle(228, 0, 19, 21), new Point(-11, -14));
_local4.addFrame(new Rectangle(472, 0, 21, 26), new Point(-14, -19));
_local4.addFrame(new Rectangle(493, 0, 26, 26), new Point(-15, -19));
_local4.addFrame(new Rectangle(519, 0, 17, 26), new Point(-12, -19));
_local4.addFrame(new Rectangle(536, 0, 22, 26), new Point(-14, -19));
_local4.addFrame(new Rectangle(98, 0, 24, 19), new Point(-16, -12));
_local4.addFrame(new Rectangle(122, 0, 25, 19), new Point(-17, -12));
_local4.addFrame(new Rectangle(175, 0, 25, 20), new Point(-17, -13));
_local4.addFrame(new Rectangle(247, 0, 25, 21), new Point(-17, -14));
_local4.addFrame(new Rectangle(272, 0, 25, 23), new Point(-17, -16));
_local4.addFrame(new Rectangle(325, 0, 25, 25), new Point(-17, -18));
_local4.addFrame(new Rectangle(601, 0, 24, 27), new Point(-16, -20));
_local4.addFrame(new Rectangle(669, 0, 22, 29), new Point(-14, -22));
_local4.addFrame(new Rectangle(732, 0, 17, 30), new Point(-11, -23));
_local4.addFrame(new Rectangle(558, 0, 16, 26), new Point(-11, -19));
_local4.addFrame(new Rectangle(691, 0, 19, 29), new Point(-11, -22));
break;
case "TurretMGCustom":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(314, 0, 28, 36), new Point(-14, -29));
_local4.addFrame(new Rectangle(342, 0, 28, 36), new Point(-13, -29));
_local4.addFrame(new Rectangle(370, 0, 26, 36), new Point(-11, -29));
_local4.addFrame(new Rectangle(396, 0, 27, 36), new Point(-12, -29));
_local4.addFrame(new Rectangle(423, 0, 29, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(452, 0, 32, 36), new Point(-16, -29));
_local4.addFrame(new Rectangle(484, 0, 34, 36), new Point(-17, -29));
_local4.addFrame(new Rectangle(518, 0, 35, 36), new Point(-18, -29));
_local4.addFrame(new Rectangle(553, 0, 34, 36), new Point(-17, -29));
_local4.addFrame(new Rectangle(190, 0, 35, 35), new Point(-18, -28));
_local4.addFrame(new Rectangle(64, 0, 34, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(0, 0, 32, 33), new Point(-16, -26));
_local4.addFrame(new Rectangle(98, 0, 29, 34), new Point(-15, -27));
_local4.addFrame(new Rectangle(225, 0, 27, 35), new Point(-12, -28));
_local4.addFrame(new Rectangle(587, 0, 26, 36), new Point(-11, -29));
_local4.addFrame(new Rectangle(789, 0, 28, 37), new Point(-13, -30));
_local4.addFrame(new Rectangle(817, 0, 28, 37), new Point(-14, -30));
_local4.addFrame(new Rectangle(845, 0, 28, 37), new Point(-15, -30));
_local4.addFrame(new Rectangle(613, 0, 26, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(252, 0, 27, 35), new Point(-15, -28));
_local4.addFrame(new Rectangle(127, 0, 29, 34), new Point(-14, -27));
_local4.addFrame(new Rectangle(32, 0, 32, 33), new Point(-16, -26));
_local4.addFrame(new Rectangle(156, 0, 34, 34), new Point(-17, -27));
_local4.addFrame(new Rectangle(279, 0, 35, 35), new Point(-17, -28));
_local4.addFrame(new Rectangle(639, 0, 34, 36), new Point(-17, -29));
_local4.addFrame(new Rectangle(673, 0, 35, 36), new Point(-17, -29));
_local4.addFrame(new Rectangle(873, 0, 34, 37), new Point(-17, -30));
_local4.addFrame(new Rectangle(907, 0, 32, 37), new Point(-16, -30));
_local4.addFrame(new Rectangle(939, 0, 28, 37), new Point(-14, -30));
_local4.addFrame(new Rectangle(708, 0, 27, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(735, 0, 26, 36), new Point(-15, -29));
_local4.addFrame(new Rectangle(761, 0, 28, 36), new Point(-15, -29));
break;
case "TurretMortar":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 36, 28), new Point(-18, -15));
_local4.addFrame(new Rectangle(108, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(144, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(180, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(216, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(252, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(36, 0, 36, 28), new Point(-18, -15));
_local4.addFrame(new Rectangle(180, 29, 36, 31), new Point(-18, -18));
_local4.addFrame(new Rectangle(216, 29, 36, 32), new Point(-18, -19));
_local4.addFrame(new Rectangle(252, 96, 36, 39), new Point(-18, -26));
_local4.addFrame(new Rectangle(36, 61, 36, 34), new Point(-18, -21));
_local4.addFrame(new Rectangle(144, 96, 36, 38), new Point(-18, -25));
_local4.addFrame(new Rectangle(144, 61, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(180, 61, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(216, 61, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(252, 61, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(72, 61, 36, 34), new Point(-18, -21));
_local4.addFrame(new Rectangle(0, 96, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(36, 96, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(72, 96, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(108, 96, 36, 35), new Point(-18, -22));
_local4.addFrame(new Rectangle(180, 96, 36, 38), new Point(-18, -25));
_local4.addFrame(new Rectangle(108, 61, 36, 34), new Point(-18, -21));
_local4.addFrame(new Rectangle(216, 96, 36, 38), new Point(-18, -25));
_local4.addFrame(new Rectangle(252, 29, 36, 32), new Point(-18, -19));
_local4.addFrame(new Rectangle(0, 61, 36, 32), new Point(-18, -19));
_local4.addFrame(new Rectangle(72, 0, 36, 28), new Point(-18, -15));
_local4.addFrame(new Rectangle(0, 29, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(36, 29, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(144, 29, 36, 30), new Point(-18, -17));
_local4.addFrame(new Rectangle(72, 29, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(108, 29, 36, 29), new Point(-18, -16));
break;
case "TurretMortarCustom":
_local4 = new ThingClip(AssetPool.pool[_arg1]);
_local2 = _local4;
_local4.addFrame(new Rectangle(0, 0, 36, 28), new Point(-18, -15));
_local4.addFrame(new Rectangle(36, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(72, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(108, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(252, 0, 36, 31), new Point(-18, -18));
_local4.addFrame(new Rectangle(36, 31, 36, 32), new Point(-18, -19));
_local4.addFrame(new Rectangle(108, 31, 36, 34), new Point(-18, -21));
_local4.addFrame(new Rectangle(180, 31, 36, 36), new Point(-18, -23));
_local4.addFrame(new Rectangle(252, 31, 36, 37), new Point(-18, -24));
_local4.addFrame(new Rectangle(36, 68, 36, 39), new Point(-18, -26));
_local4.addFrame(new Rectangle(108, 68, 36, 41), new Point(-18, -28));
_local4.addFrame(new Rectangle(180, 68, 36, 42), new Point(-18, -29));
_local4.addFrame(new Rectangle(252, 68, 36, 43), new Point(-18, -30));
_local4.addFrame(new Rectangle(36, 111, 36, 44), new Point(-18, -31));
_local4.addFrame(new Rectangle(108, 111, 36, 45), new Point(-18, -32));
_local4.addFrame(new Rectangle(144, 111, 36, 45), new Point(-18, -32));
_local4.addFrame(new Rectangle(180, 111, 36, 45), new Point(-18, -32));
_local4.addFrame(new Rectangle(216, 111, 36, 45), new Point(-18, -32));
_local4.addFrame(new Rectangle(252, 111, 36, 45), new Point(-18, -32));
_local4.addFrame(new Rectangle(72, 111, 36, 44), new Point(-18, -31));
_local4.addFrame(new Rectangle(0, 111, 36, 43), new Point(-18, -30));
_local4.addFrame(new Rectangle(216, 68, 36, 42), new Point(-18, -29));
_local4.addFrame(new Rectangle(144, 68, 36, 41), new Point(-18, -28));
_local4.addFrame(new Rectangle(72, 68, 36, 39), new Point(-18, -26));
_local4.addFrame(new Rectangle(0, 68, 36, 37), new Point(-18, -24));
_local4.addFrame(new Rectangle(216, 31, 36, 36), new Point(-18, -23));
_local4.addFrame(new Rectangle(144, 31, 36, 34), new Point(-18, -21));
_local4.addFrame(new Rectangle(72, 31, 36, 32), new Point(-18, -19));
_local4.addFrame(new Rectangle(0, 31, 36, 31), new Point(-18, -18));
_local4.addFrame(new Rectangle(216, 0, 36, 30), new Point(-18, -17));
_local4.addFrame(new Rectangle(144, 0, 36, 29), new Point(-18, -16));
_local4.addFrame(new Rectangle(180, 0, 36, 29), new Point(-18, -16));
break;
case "ChargePack1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-8, -6));
break;
case "ChargePack2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-8, -8));
break;
case "ChargePack3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-9, -7));
break;
case "ChargePack4":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-7, -7));
break;
case "AirstrikeBeacon":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-9, -8));
break;
case "AirstrikeBeaconLight1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-5, -5));
break;
case "AirstrikeBeaconLight2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-9, -9));
break;
case "Claymore":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-8, -7));
break;
case "ClaymoreLight1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-7, -5));
break;
case "ClaymoreLight2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-12, -10));
break;
case "Car1":
case "Car2":
case "Car3":
case "Car4":
case "Car5":
case "Car6":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-41, -38));
break;
case "Car7":
case "Car8":
case "Car9":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-22, -50));
break;
case "Car10":
case "Car11":
case "Car12":
case "Car13":
case "Car14":
case "Car15":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-40, -66));
break;
case "Car_Shadow1":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point((-41 + 2), (-38 + 21))));
break;
case "Car_Shadow7":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point((-22 + 3), (-50 + 2))));
break;
case "Car_Shadow10":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point((-40 + 3), (-66 + 64))));
break;
case "Car_Shadow13":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point((-40 + 4), (-66 + 66))));
break;
case "CastleWall1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-40, -112));
break;
case "CastleWall2":
case "CastleWall3":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -98));
break;
case "CastleWall4":
case "CastleWall5":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -98));
break;
case "CastleWall6":
case "CastleWall7":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -107));
break;
case "CastleWall8":
case "CastleWall9":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-35, -98));
break;
case "CastleWall_Shadow1":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-41, (-28 - 3))));
break;
case "CastleWall_Shadow2":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, (-14 - 3))));
break;
case "CastleWall_Shadow4":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, (-14 - 3))));
break;
case "CastleWall_Shadow6":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, ((-14 - 9) - 3))));
break;
case "CastleWall_Shadow8":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point((-21 - 15), (-14 - 3))));
break;
case "CastleWall_Shadow9":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(((-21 - 15) + 65), (-14 - 3))));
break;
case "StoreFrontSmall1":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-40, -70));
break;
case "StoreFrontSmall2":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -70));
break;
case "StoreFrontSmallRoof":
_local2 = new ThingSprite(AssetPool.pool["StoreFrontRoof"], new Point(-20, -70));
break;
case "StoreFrontSmall_Shadow1":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-41, (-14 - 3))));
break;
case "StoreFrontSmall_Shadow2":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, (-14 - 3))));
break;
case "StoreFrontLarge1":
case "StoreFrontLarge2":
case "StoreFrontLarge3":
case "StoreFrontLarge4":
_local2 = new ThingSprite(AssetPool.pool[_arg1], new Point(-20, -126));
break;
case "StoreFrontLargeRoof":
_local2 = new ThingSprite(AssetPool.pool["StoreFrontRoof"], new Point(-20, -126));
break;
case "StoreFrontLarge_Shadow":
_local2 = processShadow(new ThingSprite(AssetPool.pool[_arg1], new Point(-21, (-14 - 3))));
break;
};
if (((_local2) && ((((_arg1.lastIndexOf("Body") >= 0)) || ((_arg1.lastIndexOf("Head") >= 0)))))){
_local5 = _local2.bitmapData;
_local2.bitmapData.applyFilter(_local2.bitmapData, _local5.rect, new Point(0, 0), characterFilter);
};
storage[_arg1] = _local2;
return (_local2);
}
private static function fromAlpha(_arg1:String):BitmapData{
var _local2:BitmapData = AssetPool.pool[_arg1];
var _local3:BitmapData = new BitmapData(_local2.width, _local2.height, true, 4278190080);
_local3.copyChannel(_local2, _local2.rect, new Point(0, 0), BitmapDataChannel.RED, BitmapDataChannel.ALPHA);
return (_local3);
}
public static function prerender():void{
var _local1:Sprite;
var _local2:Sprite;
_local1 = (new CharacterSprite() as Sprite);
_local2 = (_local1.getChildAt(0) as Sprite);
characterFilter = _local2.filters[0];
_local1 = (new TreeSprite() as Sprite);
treeFilters = new Array();
var _local3:int;
while (_local3 < 4) {
_local2 = (_local1.getChildAt(_local3) as Sprite);
treeFilters[_local3] = _local2.filters[0];
_local3++;
};
}
private static function combine(_arg1:String, _arg2:String):BitmapData{
var _local3:BitmapData = AssetPool.pool[_arg1];
var _local4:BitmapData = AssetPool.pool[_arg2];
_local3.copyChannel(_local4, _local4.rect, new Point(0, 0), BitmapDataChannel.RED, BitmapDataChannel.ALPHA);
return (_local3);
}
}
}//package boxhead.assets
Section 11
//Assets_CharacterSprite (boxhead.assets.Assets_CharacterSprite)
package boxhead.assets {
import flash.display.*;
import mx.core.*;
public class Assets_CharacterSprite extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.assets
Section 12
//Assets_TreeSprite (boxhead.assets.Assets_TreeSprite)
package boxhead.assets {
import flash.display.*;
import mx.core.*;
public class Assets_TreeSprite extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.assets
Section 13
//BodyParts (boxhead.assets.BodyParts)
package boxhead.assets {
import flash.geom.*;
import boxhead.game.*;
public class BodyParts {
public static const bodies:Array = ["Bond", "Bambo", "GI", "Ninja", "Swat", "Croft", "Bride", "Cop", "Mummy", "Zombie", "Vampire", "Devil"];
public static const redCT:ColorTransform = new ColorTransform(1, 0, 0);
public static const blueCT:ColorTransform = new ColorTransform(0, 0, 1);
public static const heads:Array = ["Bond", "Bambo", "GI", "Ninja", "Swat", "Croft", "Bride", "Cop", "Mummy", "Zombie", "Vampire", "Devil"];
public static const freeHeadModels:Array = ["Bond", "Bambo", "GI", "Ninja", "Swat", "Croft", "Bride", "Cop", "Mummy", "Zombie", "Vampire"];
public static const freeBodyModels:Array = ["Bond", "Bambo", "GI", "Ninja", "Swat", "Croft", "Bride", "Cop", "Mummy", "Zombie", "Vampire"];
public static function headTeamColor(_arg1:int, _arg2:int):ColorTransform{
return (teamColor((heads[_arg1] + "Head"), _arg2));
}
private static function ct(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0):ColorTransform{
return (new ColorTransform(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8));
}
public static function bodyColors(_arg1:int):Array{
return (colors((bodies[_arg1] + "Body")));
}
protected static function teamColor(_arg1:String, _arg2:int):ColorTransform{
switch (_arg1){
case "BamboHead":
case "GIHead":
case "GIBody":
case "SwatHead":
case "SwatBody":
case "NinjaHead":
case "NinjaBody":
case "CroftBody":
case "BrideBody":
case "CopHead":
case "CopBody":
case "DevilHead":
case "DevilBody":
default:
if (_arg2 == Player.RED_TEAM){
return (ct(1, 0, 0));
};
if (_arg2 == Player.BLUE_TEAM){
return (ct(0, 0, 1));
};
break;
case "BamboBody":
case "BondBody":
case "MummyHead":
case "MummyBody":
if (_arg2 == Player.RED_TEAM){
return (ct(0.8, 0.1, 0.1));
};
if (_arg2 == Player.BLUE_TEAM){
return (ct(0.1, 0.1, 0.8));
};
break;
case "BondHead":
case "CroftHead":
case "BrideHead":
if (_arg2 == Player.RED_TEAM){
return (ct(0.4, 0.2, 0.1));
};
if (_arg2 == Player.BLUE_TEAM){
return (ct(0, 0, 0));
};
break;
case "ZombieHead":
case "ZombieBody":
case "VampireHead":
case "VampireBody":
if (_arg2 == Player.RED_TEAM){
return (ct(0.8, 0.3, 0.3));
};
if (_arg2 == Player.BLUE_TEAM){
return (ct(0.3, 0.3, 0.8));
};
break;
};
return (ct(1, 1, 1));
}
public static function headColors(_arg1:int):Array{
return (colors((heads[_arg1] + "Head")));
}
public static function bodyTeamColor(_arg1:int, _arg2:int):ColorTransform{
return (teamColor((bodies[_arg1] + "Body"), _arg2));
}
protected static function colors(_arg1:String):Array{
switch (_arg1){
case "BamboHead":
return ([ct(1, 0, 0), ct(0, 1, 0), ct(0, 0, 1), ct(1, 1, 1)]);
case "BamboBody":
return ([ct(0, 0, 0), ct(0, 0.8, 0), ct(0, 0, 0.8), ct(1, 1, 1)]);
case "BondHead":
return ([ct(0, 0, 0), ct(0.35, 0.2, 0.1), ct(0.8, 0.4, 0.2), ct(0.8, 0.7, 0.3), ct(0.9, 0.9, 0.9)]);
case "BondBody":
return ([ct(0.2, 0.2, 0.2), ct(0.4, 0.25, 0.2), ct(0.1, 0.1, 0.5), ct(0.95, 0.9, 0.95), ct(0.9, 0.75, 0), ct(0.75, 0, 0.75)]);
case "GIHead":
case "GIBody":
return ([ct(0.2, 0.6, 0.2), ct(0.8, 0.7, 0.4), ct(0.4, 0.2, 0.5)]);
case "SwatHead":
case "SwatBody":
return ([ct(0, 0, 0.5), ct(0.1, 0.1, 0.8), ct(0.1, 0.1, 0.1), ct(0.8, 0.1, 0.1)]);
case "NinjaHead":
case "NinjaBody":
return ([ct(0.1, 0.1, 0.1), ct(0.9, 0.9, 0.9), ct(0.5, 0.1, 0.1), ct(0.1, 0.1, 0.5), ct(0.4, 0.4, 0.1), ct(0.4, 0.1, 0.4), ct(0.8, 0.2, 0.1)]);
case "CroftHead":
return ([ct(0.35, 0.2, 0.1), ct(0, 0, 0), ct(0.8, 0.4, 0.2), ct(0.8, 0.7, 0.3), ct(0.9, 0.9, 0.9)]);
case "CroftBody":
return ([ct(0.4, 0.6, 0.6), ct(0.6, 0.6, 0.4), ct(0.9, 0.9, 0.9), ct(0.2, 0.2, 0.2), ct(0.7, 0.4, 0.4)]);
case "BrideHead":
return ([ct(0.8, 0.7, 0.3), ct(0.35, 0.2, 0.1), ct(0, 0, 0), ct(0.8, 0.4, 0.2), ct(0.9, 0.9, 0.9)]);
case "BrideBody":
return ([ct(0.9, 0.75, 0), ct(0.2, 0.2, 0.2), ct(0.4, 0.25, 0.2), ct(0.1, 0.1, 0.5), ct(0.95, 0.9, 0.95), ct(0.9, 0, 0.9)]);
case "CopHead":
case "CopBody":
return ([ct(0.1, 0.1, 0.8), ct(0, 0, 0.5), ct(0.1, 0.1, 0.1), ct(0.8, 0.1, 0.1), ct(0.1, 0.8, 0.1), ct(0.9, 0.9, 0.9)]);
case "MummyHead":
case "MummyBody":
return ([ct(1, 1, 1), ct(1, 0.95, 0.8), ct(0.7, 0.7, 0.7)]);
case "ZombieHead":
case "ZombieBody":
return ([ct(0.8, 0.85, 0.825), ct(1, 0.825, 0.65), ct(0.6, 0.9, 0.6), ct(0.6, 0.5, 0.3), ct(0.45, 0.3, 0.15)]);
case "VampireHead":
case "VampireBody":
return ([ct(1, 1, 1), ct(1, 0.8, 0.6), ct(0.6, 0.9, 0.6), ct(0.6, 0.5, 0.3), ct(0.45, 0.3, 0.15)]);
case "DevilHead":
case "DevilBody":
return ([ct(0.9, 0.1, 0), ct(0.4, 0, 0), ct(1, 0.4, 0), ct(0.4, 0.55, 0.4), ct(0.5, 0.4, 0.5)]);
};
return ([ct(1, 1, 1)]);
}
}
}//package boxhead.assets
Section 14
//Prerender (boxhead.assets.Prerender)
package boxhead.assets {
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.*;
import boxhead.world.weapon.*;
import boxhead.world.thing.bounty.*;
import boxhead.world.decal.*;
import boxhead.world.thing.projectile.*;
import boxhead.world.thing.particle.*;
import boxhead.editor.*;
import boxhead.assets.render.*;
public class Prerender {
public static var finished:Boolean = false;
public static var classes:Array = [Assets, Character, BountyCrate, PlayerSpawnMarker, Barrel, Barricade, Claymore, ChargePack, TurretMG, TurretMortar, Minigun, Railgun, PlasmaCannon, AirstrikeBeacon, Grenade, LaunchGrenade, PlasmaBall, MortarShell, Blood, PlasmaBallExplosion, Explosion, Fire, ShellCasing, ShotgunShell, SmokePuff, Scorch, ScorchCell];
public static function advance():void{
var _local1:Class;
if (!ExplosionRenderer.finished){
ExplosionRenderer.advance();
return;
};
if (!FireRenderer.finished){
FireRenderer.advance();
return;
};
if (!SmokePuffRenderer.finished){
SmokePuffRenderer.advance();
return;
};
while (classes.length > 0) {
_local1 = classes.pop();
if (_local1["prerender"] != null){
var _local2 = _local1;
_local2["prerender"]();
} else {
Debug.error(("Failed to prerender " + _local1));
};
};
finished = true;
}
}
}//package boxhead.assets
Section 15
//Textures (boxhead.assets.Textures)
package boxhead.assets {
import flash.display.*;
public class Textures {
public static const CRACKS:BitmapData = new Cracks().bitmapData;
private static const Rocks:Class = Textures_Rocks;
public static const ROAD_LINES:BitmapData = new RoadLines().bitmapData;
private static const Pavement3:Class = Textures_Pavement3;
public static const GRASS:BitmapData = new Grass1().bitmapData;
private static const Pavement5:Class = Textures_Pavement5;
private static const Cracks:Class = Textures_Cracks;
public static const ROCKS:BitmapData = new Rocks().bitmapData;
public static const list:Array = [null, GRASS, ASPHALT1, ASPHALT2, TILES, WOOD, PAVEMENT3, PAVEMENT5, PAVERS, ROCKS, ROAD];
private static const RoadLines:Class = Textures_RoadLines;
public static const ROAD:BitmapData = new Road().bitmapData;
public static const PAVERS:BitmapData = new Pavers().bitmapData;
private static const Relief1:Class = Textures_Relief1;
private static const Relief2:Class = Textures_Relief2;
private static const Relief3:Class = Textures_Relief3;
public static const WOOD:BitmapData = new Wood().bitmapData;
public static const SIDEWALK:BitmapData = new Sidewalk().bitmapData;
public static const CURB:BitmapData = new Curb().bitmapData;
public static const PAVEMENT3:BitmapData = new Pavement3().bitmapData;
public static const PAVEMENT5:BitmapData = new Pavement5().bitmapData;
private static const Road:Class = Textures_Road;
private static const Pavers:Class = Textures_Pavers;
private static const GrassBits:Class = Textures_GrassBits;
public static const RELIEF2:BitmapData = new Relief2().bitmapData;
private static const Wood:Class = Textures_Wood;
public static const RELIEF1:BitmapData = new Relief1().bitmapData;
public static const GRASS_BITS:BitmapData = new GrassBits().bitmapData;
private static const Grass1:Class = Textures_Grass1;
private static const Sidewalk:Class = Textures_Sidewalk;
private static const Tiles:Class = Textures_Tiles;
public static const TILES:BitmapData = new Tiles().bitmapData;
public static const RELIEF3:BitmapData = new Relief3().bitmapData;
public static const ASPHALT1:BitmapData = new Asphalt1().bitmapData;
public static const ASPHALT2:BitmapData = new Asphalt2().bitmapData;
public static const GRASS_ROCK_EDGE:BitmapData = new GrassRockEdge().bitmapData;
private static const Asphalt1:Class = Textures_Asphalt1;
private static const Asphalt2:Class = Textures_Asphalt2;
private static const Curb:Class = Textures_Curb;
private static const GrassRockEdge:Class = Textures_GrassRockEdge;
}
}//package boxhead.assets
Section 16
//Textures_Asphalt1 (boxhead.assets.Textures_Asphalt1)
package boxhead.assets {
import mx.core.*;
public class Textures_Asphalt1 extends BitmapAsset {
}
}//package boxhead.assets
Section 17
//Textures_Asphalt2 (boxhead.assets.Textures_Asphalt2)
package boxhead.assets {
import mx.core.*;
public class Textures_Asphalt2 extends BitmapAsset {
}
}//package boxhead.assets
Section 18
//Textures_Cracks (boxhead.assets.Textures_Cracks)
package boxhead.assets {
import mx.core.*;
public class Textures_Cracks extends BitmapAsset {
}
}//package boxhead.assets
Section 19
//Textures_Curb (boxhead.assets.Textures_Curb)
package boxhead.assets {
import mx.core.*;
public class Textures_Curb extends BitmapAsset {
}
}//package boxhead.assets
Section 20
//Textures_Grass1 (boxhead.assets.Textures_Grass1)
package boxhead.assets {
import mx.core.*;
public class Textures_Grass1 extends BitmapAsset {
}
}//package boxhead.assets
Section 21
//Textures_GrassBits (boxhead.assets.Textures_GrassBits)
package boxhead.assets {
import mx.core.*;
public class Textures_GrassBits extends BitmapAsset {
}
}//package boxhead.assets
Section 22
//Textures_GrassRockEdge (boxhead.assets.Textures_GrassRockEdge)
package boxhead.assets {
import mx.core.*;
public class Textures_GrassRockEdge extends BitmapAsset {
}
}//package boxhead.assets
Section 23
//Textures_Pavement3 (boxhead.assets.Textures_Pavement3)
package boxhead.assets {
import mx.core.*;
public class Textures_Pavement3 extends BitmapAsset {
}
}//package boxhead.assets
Section 24
//Textures_Pavement5 (boxhead.assets.Textures_Pavement5)
package boxhead.assets {
import mx.core.*;
public class Textures_Pavement5 extends BitmapAsset {
}
}//package boxhead.assets
Section 25
//Textures_Pavers (boxhead.assets.Textures_Pavers)
package boxhead.assets {
import mx.core.*;
public class Textures_Pavers extends BitmapAsset {
}
}//package boxhead.assets
Section 26
//Textures_Relief1 (boxhead.assets.Textures_Relief1)
package boxhead.assets {
import mx.core.*;
public class Textures_Relief1 extends BitmapAsset {
}
}//package boxhead.assets
Section 27
//Textures_Relief2 (boxhead.assets.Textures_Relief2)
package boxhead.assets {
import mx.core.*;
public class Textures_Relief2 extends BitmapAsset {
}
}//package boxhead.assets
Section 28
//Textures_Relief3 (boxhead.assets.Textures_Relief3)
package boxhead.assets {
import mx.core.*;
public class Textures_Relief3 extends BitmapAsset {
}
}//package boxhead.assets
Section 29
//Textures_Road (boxhead.assets.Textures_Road)
package boxhead.assets {
import mx.core.*;
public class Textures_Road extends BitmapAsset {
}
}//package boxhead.assets
Section 30
//Textures_RoadLines (boxhead.assets.Textures_RoadLines)
package boxhead.assets {
import mx.core.*;
public class Textures_RoadLines extends BitmapAsset {
}
}//package boxhead.assets
Section 31
//Textures_Rocks (boxhead.assets.Textures_Rocks)
package boxhead.assets {
import mx.core.*;
public class Textures_Rocks extends BitmapAsset {
}
}//package boxhead.assets
Section 32
//Textures_Sidewalk (boxhead.assets.Textures_Sidewalk)
package boxhead.assets {
import mx.core.*;
public class Textures_Sidewalk extends BitmapAsset {
}
}//package boxhead.assets
Section 33
//Textures_Tiles (boxhead.assets.Textures_Tiles)
package boxhead.assets {
import mx.core.*;
public class Textures_Tiles extends BitmapAsset {
}
}//package boxhead.assets
Section 34
//Textures_Wood (boxhead.assets.Textures_Wood)
package boxhead.assets {
import mx.core.*;
public class Textures_Wood extends BitmapAsset {
}
}//package boxhead.assets
Section 35
//PlayerSpawnMarker (boxhead.editor.PlayerSpawnMarker)
package boxhead.editor {
import boxhead.world.*;
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.world.thing.display.*;
import flash.filters.*;
import boxhead.world.hit.*;
public class PlayerSpawnMarker extends Prop {
private static var displays:Array;
public function PlayerSpawnMarker(_arg1:int=1){
super(_arg1);
_hit = new HitCircle(pos, 0.5);
_height = 0;
_flat = true;
display = displays[_arg1];
}
public static function prerender():void{
var _local3:BitmapData;
var _local4:Rectangle;
var _local5:ThingSprite;
displays = new Array();
var _local1:Shape = new Shape();
var _local2 = 1;
while (_local2 <= 5) {
_local1.graphics.clear();
_local1.graphics.lineStyle(0, 0xFFFFFF, 0.1);
_local1.graphics.drawEllipse((-(Constants.CELL_WIDTH) / 2), (-(Constants.CELL_HEIGHT) / 2), Constants.CELL_WIDTH, Constants.CELL_HEIGHT);
_local3 = new BitmapData(Constants.CELL_WIDTH, Constants.CELL_HEIGHT, true, 4288716960);
_local4 = new Rectangle((Constants.CELL_WIDTH / 2), 0, (Constants.CELL_WIDTH / 2), Constants.CELL_HEIGHT);
if (_local2 == PlayerSpawn.RED){
_local3.fillRect(_local3.rect, 4294901760);
} else {
if ((_local2 & PlayerSpawn.RED)){
_local3.fillRect(_local4, 4294901760);
};
};
if (_local2 == PlayerSpawn.BLUE){
_local3.fillRect(_local3.rect, 4278190335);
} else {
if ((_local2 & PlayerSpawn.BLUE)){
_local3.fillRect(_local4, 4278190335);
};
};
_local3.draw(_local1, new Matrix(0.9, 0, 0, 0.9, (Constants.CELL_WIDTH / 2), (Constants.CELL_HEIGHT / 2)));
_local3.draw(_local1, new Matrix(0.5, 0, 0, 0.5, (Constants.CELL_WIDTH / 2), (Constants.CELL_HEIGHT / 2)));
_local3.floodFill(0, 0, 0);
_local3.floodFill((Constants.CELL_WIDTH - 1), 0, 0);
_local3.floodFill(0, (Constants.CELL_HEIGHT - 1), 0);
_local3.floodFill((Constants.CELL_WIDTH - 1), (Constants.CELL_HEIGHT - 1), 0);
_local3.floodFill(((Constants.CELL_WIDTH / 2) - 1), (Constants.CELL_HEIGHT / 2), 0);
_local3.floodFill(((Constants.CELL_WIDTH / 2) + 1), (Constants.CELL_HEIGHT / 2), 0);
_local3.applyFilter(_local3, _local3.rect, new Point(0, 0), new BlurFilter(1, 1, 1));
_local5 = new ThingSprite(_local3, new Point((-(Constants.CELL_WIDTH) / 2), (-(Constants.CELL_HEIGHT) / 2)));
displays[_local2] = _local5;
_local2++;
};
}
}
}//package boxhead.editor
Section 36
//CharacterEvent (boxhead.events.CharacterEvent)
package boxhead.events {
import flash.events.*;
import boxhead.world.thing.*;
public class CharacterEvent extends Event {
public var weaponID:int;
public var source:HasOwner;
public var damage:int;
public static const WEAPON_SWITCH:String = "weapon switch";
public static const RESPAWN:String = "respawn";
public static const HURT:String = "hurt";
public function CharacterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=0, _arg5:HasOwner=null, _arg6:int=0){
super(_arg1, _arg2, _arg3);
this.weaponID = _arg4;
this.source = _arg5;
this.damage = _arg6;
}
override public function toString():String{
return (formatToString("CharacterEvent", "type", "bubbles", "cancelable", "eventPhase", "weaponID", "source", "damage"));
}
override public function clone():Event{
return (new CharacterEvent(type, bubbles, cancelable, weaponID, source, damage));
}
}
}//package boxhead.events
Section 37
//ConsoleEvent (boxhead.events.ConsoleEvent)
package boxhead.events {
import flash.events.*;
public class ConsoleEvent extends Event {
public var params:Array;
public var command:String;
public static const INPUT:String = "Input";
public function ConsoleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){
super(_arg1, _arg2, _arg3);
this.command = _arg4;
this.params = _arg5;
}
override public function clone():Event{
return (new ConsoleEvent(type, bubbles, cancelable, command, params));
}
override public function toString():String{
return (formatToString("ConsoleEvent", "type", "bubbles", "cancelable", "eventPhase", "command", "params"));
}
}
}//package boxhead.events
Section 38
//DeployableEvent (boxhead.events.DeployableEvent)
package boxhead.events {
import flash.events.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.*;
public class DeployableEvent extends Event {
public var value:int;
public var deployable:Deployable;
public var source:HasOwner;
public static const ACTIVATE:String = "Activate";
public static const DAMAGE:String = "Damage";
public function DeployableEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Deployable=null, _arg5:int=0, _arg6:HasOwner=null){
super(_arg1, _arg2, _arg3);
this.deployable = _arg4;
this.value = _arg5;
this.source = _arg6;
}
override public function toString():String{
return (formatToString("DeployableEvent", "type", "bubbles", "cancelable", "eventPhase", "deployable", "value", "source"));
}
override public function clone():Event{
return (new DeployableEvent(type, bubbles, cancelable, deployable, value, source));
}
}
}//package boxhead.events
Section 39
//FireEvent (boxhead.events.FireEvent)
package boxhead.events {
import flash.events.*;
import boxhead.world.weapon.*;
public class FireEvent extends Event {
public var effects:ShotEffects;
public var shot:Shot;
public static const EFFECTS:String = "effects";
public static const FIRE:String = "fire";
public function FireEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Shot=null, _arg5:ShotEffects=null){
super(_arg1, _arg2, _arg3);
this.shot = _arg4;
this.effects = _arg5;
}
override public function toString():String{
return (formatToString("WeaponEvent", "type", "bubbles", "cancelable", "eventPhase", "shot", "effects"));
}
override public function clone():Event{
return (new FireEvent(type, bubbles, cancelable, shot, effects));
}
}
}//package boxhead.events
Section 40
//ProjectileEvent (boxhead.events.ProjectileEvent)
package boxhead.events {
import flash.events.*;
public class ProjectileEvent extends Event {
public static const PULSE:String = "pulse";
public static const EXPLODE:String = "explode";
public function ProjectileEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ProjectileEvent", "type", "bubbles", "cancelable", "eventPhase"));
}
override public function clone():Event{
return (new ProjectileEvent(type, bubbles, cancelable));
}
}
}//package boxhead.events
Section 41
//ScreenEvent (boxhead.events.ScreenEvent)
package boxhead.events {
import flash.events.*;
public class ScreenEvent extends Event {
public var data:Object;
public static const QUICK_PLAY:String = "Quick Play";
public static const CONNECT:String = "Connect";
public static const BUY:String = "Buy";
public static const QUIT:String = "Quit";
public static const JOIN:String = "Join";
public static const CLOSE:String = "Close";
public static const CHEAT:String = "Cheat";
public static const DISCONNECTED:String = "Disconnected";
public static const MENU:String = "Menu";
public function ScreenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.data = _arg4;
}
override public function clone():Event{
return (new ScreenEvent(type, bubbles, cancelable, data));
}
override public function toString():String{
return (formatToString("ScreenEvent", "type", "bubbles", "cancelable", "eventPhase", "data"));
}
}
}//package boxhead.events
Section 42
//ShopEvent (boxhead.events.ShopEvent)
package boxhead.events {
import flash.events.*;
import boxhead.world.weapon.*;
public class ShopEvent extends Event {
public var premium:Premium;
public var weapon:Weapon;
public static const CONFIRM:String = "Confirm";
public static const BUY:String = "Buy";
public static const UPGRADE1:String = "Upgrade 1";
public static const REFILL:String = "Refill";
public static const CLOSE:String = "Close";
public static const CANCEL:String = "Cancel";
public static const UPGRADE2:String = "Upgrade 2";
public function ShopEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Weapon=null, _arg5:Premium=null){
super(_arg1, _arg2, _arg3);
this.weapon = _arg4;
this.premium = _arg5;
}
override public function toString():String{
return (formatToString("ShopEvent", "type", "bubbles", "cancelable", "eventPhase", "weapon", "premium"));
}
override public function clone():Event{
return (new ShopEvent(type, bubbles, cancelable, weapon, premium));
}
}
}//package boxhead.events
Section 43
//WeaponSliderEvent (boxhead.events.WeaponSliderEvent)
package boxhead.events {
import flash.events.*;
import boxhead.world.weapon.*;
public class WeaponSliderEvent extends Event {
public var weapon:Weapon;
public static const SELECT:String = "Select";
public function WeaponSliderEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Weapon=null){
super(_arg1, _arg2, _arg3);
this.weapon = _arg4;
}
override public function clone():Event{
return (new WeaponSliderEvent(type, bubbles, cancelable, weapon));
}
override public function toString():String{
return (formatToString("WeaponSliderEvent", "type", "bubbles", "cancelable", "eventPhase", "weapon"));
}
}
}//package boxhead.events
Section 44
//BountyGame (boxhead.game.BountyGame)
package boxhead.game {
import MMOcha.server.*;
import boxhead.ui.*;
import boxhead.world.*;
import boxhead.ui.score.*;
public class BountyGame extends ShopGame {
public function BountyGame(_arg1:MMOchaUser, _arg2:QuickPlayProfile){
scoreBoard = new BountyScoreBoard();
super(_arg1, _arg2);
gui = new GUI(Constants.WINDOW.width, Constants.WINDOW.height);
gui.setMoney(localPlayer.money);
updateScores();
}
override protected function showInitUI():void{
openShop();
}
override protected function loadMap(_arg1:Map):void{
super.loadMap(_arg1);
localPlayer.team = 1;
connection.sendGameMessage("0k1");
}
}
}//package boxhead.game
Section 45
//Game (boxhead.game.Game)
package boxhead.game {
import flash.events.*;
import boxhead.events.*;
import MMOcha.server.*;
import boxhead.ui.screen.*;
import boxhead.ui.*;
import boxhead.world.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.*;
import boxhead.world.weapon.*;
import boxhead.world.thing.bounty.*;
import flash.display.*;
import flash.system.*;
import boxhead.ui.weaponSlider.*;
import flash.utils.*;
import boxhead.ui.score.*;
import MMOcha.utils.*;
import boxhead.sounds.*;
public class Game extends Sprite {
protected var scheduledProcess:int;
protected var weaponSlider:WeaponSlider;
protected var MAX_FLOOD:int;// = 3
protected var lastPing:int;// = 0
protected var interstitial:MovieClip;
protected var secondTimer:Timer;
protected var forcePositionUpdate:Boolean;// = false
protected var existingDeployablesString:String;
protected var gui:GUI;
protected var checkProcessTimer:Timer;
protected var gameMessageOutQueue:Array;
protected var participated:Boolean;// = false
protected var pingQueueIndex:int;// = 0
protected var localPlayer:LocalPlayer;
protected var gameSummary:GameSummary;
protected var map:Map;
protected var canvas:BitmapData;
protected var floodWarningGiven:Boolean;// = false
protected var scoreBoard:ScoreBoard;
protected var roundTime:int;// = -1
protected var sentMoveFlags:int;// = 0
protected var messageOutQueue:Array;
protected var FLOOD_TIME:int;// = 2000
protected var mapRequest:DatabaseRequest;
protected var remotePlayers:Array;
protected var existingPickupsString:String;
protected var frameCount:int;
protected var canvasBitmap:Bitmap;
protected var drawn:Boolean;
protected var quickPlayProfile:QuickPlayProfile;
protected var floodCount:int;// = 0
protected var guiVisible:Boolean;// = true
protected var disconnectionTimer:Timer;
protected var messageOutTimes:Array;
protected var forceRedraw:Boolean;
protected var mapLoadingScreen:MapLoadingScreen;
protected var mapIndex:int;
protected var inputStack:Array;
protected var processCount:int;
protected var connection:MMOchaServer;
protected var gameOver:Boolean;// = false
protected var floodTimer:Timer;
protected var messageInQueue:Array;
protected var sentMoveDirIndex:int;// = 0
protected var sentDirIndex:int;// = 0
protected static const ROUND_END_TIME:int = 30;
protected static const UPGRADE1_ACTION:String = "1";
protected static const M_CHAT:String = "c";
protected static const DELIM:String = ";";
protected static const M_PING_REQUEST:String = "?";
protected static const REFILL_ACTION:String = "0";
protected static const UPGRADE2_ACTION:String = "2";
protected static const ROUND_AD_TIME:int = 20;
protected static const ROUND_START_TIME:int = 620;
protected static const BUY_ACTION:String = "0";
protected static const M_PING_RESPONSE:String = "!";
protected static const M_DEPLOYABLE_ACTIVATE:String = "a";
private static var Interstitial:Class = Game_Interstitial;
public function Game(_arg1:MMOchaUser, _arg2:QuickPlayProfile){
inputStack = new Array();
canvas = new BitmapData(Constants.WINDOW.width, Constants.WINDOW.height, false, 0);
canvasBitmap = new Bitmap(canvas, "auto", true);
addChild(canvasBitmap);
checkProcessTimer = new Timer(10);
secondTimer = new Timer(1000);
disconnectionTimer = new Timer(5000);
floodTimer = new Timer(FLOOD_TIME);
checkProcessTimer.addEventListener(TimerEvent.TIMER, checkProcess);
secondTimer.addEventListener(TimerEvent.TIMER, second);
floodTimer.addEventListener(TimerEvent.TIMER, floodTick);
floodTimer.start();
localPlayer = new LocalPlayer();
localPlayer.user = _arg1;
this.quickPlayProfile = _arg2;
Console.dispatcher.addEventListener(ConsoleEvent.INPUT, consoleInput, false, 0, true);
remotePlayers = new Array();
gameMessageOutQueue = new Array();
messageOutQueue = new Array();
messageOutTimes = new Array();
messageInQueue = new Array();
addEventListener(Event.ENTER_FRAME, enterFrame);
weaponSlider = new WeaponSlider();
weaponSlider.addEventListener(WeaponSliderEvent.SELECT, handleWeaponSliderSelect);
addChild(weaponSlider);
if (!scoreBoard){
scoreBoard = new ScoreBoard();
};
var _local3:Loader = new Loader();
var _local4:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
_local3.loadBytes(new Interstitial(), _local4);
_local3.contentLoaderInfo.addEventListener(Event.COMPLETE, interstitialLoaded, false, 0, true);
}
protected function pickupBountyItem(_arg1:Player, _arg2:BountyItem, _arg3:int):void{
var _local4:int;
map.removeBountyItem(_arg2);
if (_arg1){
_arg1.bountyPoints = (_arg1.bountyPoints + _arg3);
_arg1.score = (_arg1.score + _arg2.bounty);
if (_arg1 == localPlayer){
SoundControl.playAreaSound(SoundList.KA_CHING, localPlayer.character.pos);
_local4 = localPlayer.pickupMoney(_arg2.bounty);
gui.setMoney(localPlayer.money);
gui.setBountyPoints(localPlayer.bountyPoints);
gui.addMoneyFloater(_local4, _arg2.renderOffset.add(map.cameraOffset));
};
updateScores();
};
}
protected function characterFire(_arg1:FireEvent):void{
var _local2:Shot = _arg1.shot;
var _local3:Character = (_local2.source as Character);
var _local4:Weapon = _local2.weapon;
if (((!(_local3)) || (!(_local4)))){
return;
};
map.executeShot(_local2);
var _local5:int = ((_local2.angle * 180) / Math.PI);
while (_local5 < 0) {
_local5 = (_local5 + 360);
};
while (_local5 > 360) {
_local5 = (_local5 - 360);
};
if (_local4.ammo){
if (_local4.ammo.count == 0){
gui.showWarning("OUT OF AMMO!", 2000);
} else {
if (((!(_local4.ammoWarningGiven)) && ((_local4.ammo.count <= Math.max(1, (_local4.ammo.max * 0.2)))))){
_local4.ammoWarningGiven = true;
gui.showWarning("LOW AMMO!", 3000);
};
};
};
forcePositionUpdate = true;
queueGameMessage((("4" + StringFunctions.padInt(_local5, 3)) + _local2.fireParam));
}
protected function showInitUI():void{
}
protected function applyPremium(_arg1:int):void{
var _local2:PlayerCharacter = localPlayer.character;
if (!_local2){
return;
};
var _local3:Premium = localPlayer.user.premiums[_arg1];
if (_local3.applied){
return;
};
_local3.applied = true;
switch (_arg1){
case Premium.PISTOLS_ID:
upgradeWeapon(WeaponInfo.PISTOL_ID, WeaponInfo.AKIMBO_PISTOLS_ID);
break;
case Premium.M16_ID:
upgradeWeapon(WeaponInfo.AK47_ID, WeaponInfo.M16_ID);
break;
case Premium.RAILGUN_ID:
upgradeWeapon(WeaponInfo.MAGNUM_ID, WeaponInfo.RAILGUN_ID);
break;
case Premium.ARMOR_ID:
_local2.armor = _local3.value;
break;
case Premium.SHOES_ID:
_local2.speedMultiplier = _local3.value;
break;
case Premium.WALLET_ID:
localPlayer.moneyMultiplier = _local3.value;
break;
case Premium.RADAR_ID:
gui.numPointers = (1 + _local3.value);
updateScores();
break;
case Premium.GRENADES_ID:
addPremiumEquipment(WeaponInfo.GRENADE_THROWER_ID, _local3.value);
break;
case Premium.CHARGE_PACKS_ID:
addPremiumEquipment(WeaponInfo.CHARGE_PACK_PLANTER_ID, _local3.value);
break;
case Premium.CLAYMORES_ID:
addPremiumEquipment(WeaponInfo.CLAYMORE_PLANTER_ID, _local3.value);
break;
case Premium.AIRSTRIKES_ID:
addPremiumEquipment(WeaponInfo.AIRSTRIKE_THROWER_ID, _local3.value);
break;
case Premium.BARRELS_ID:
addPremiumEquipment(WeaponInfo.BARREL_PLANTER_ID, _local3.value);
break;
case Premium.BARRICADES_ID:
addPremiumEquipment(WeaponInfo.BARRICADE_PLANTER_ID, _local3.value);
break;
case Premium.SPY_SATELLITE_ID:
addPremiumEquipment(WeaponInfo.SPY_ID, _local3.value);
break;
case Premium.MG_TURRET_ID:
addPremiumEquipment(WeaponInfo.TURRET_MG_PLANTER_ID, _local3.value);
break;
case Premium.MORTAR_TURRET_ID:
addPremiumEquipment(WeaponInfo.TURRET_MORTAR_PLANTER_ID, _local3.value);
break;
};
}
protected function getDeployableByIndex(_arg1:int):Deployable{
var _local3:Player;
var _local2:Deployable = localPlayer.getDeployableByID(_arg1);
if (_local2){
return (_local2);
};
for each (_local3 in remotePlayers) {
_local2 = _local3.getDeployableByID(_arg1);
if (_local2){
return (_local2);
};
};
return (null);
}
protected function showAdvertisement():void{
interstitial.gotoAndPlay(1);
addChild(interstitial);
interstitial.addEventListener(MouseEvent.CLICK, handleInterstitialClick, false, 0, true);
interstitial.buttonMode = true;
if (stage){
stage.frameRate = Constants.AD_FPS;
};
}
protected function handleKeyUp(_arg1:KeyboardEvent):void{
var _local2:String;
if ((currentInput is IngameMenuScreen)){
if (_arg1.keyCode == Input.ESCAPE){
toggleMenu();
};
} else {
if (currentInput == gui){
if (_arg1.keyCode == Input.ENTER){
_local2 = gui.getInput();
if (((((_local2) && (_local2.length))) && (!(floodWarningGiven)))){
if (floodCount >= MAX_FLOOD){
floodWarningGiven = true;
} else {
if (((connection.password) && ((_local2.toLowerCase().indexOf(connection.password.toLowerCase()) >= 0)))){
gui.addChatMessage(localPlayer, "You can not send chat messages containing your password");
} else {
floodCount++;
sendChatMessage(_local2);
gui.addChatMessage(localPlayer, _local2);
};
};
};
gui.closeInput();
freeInput(gui);
} else {
if (_arg1.keyCode == Input.ESCAPE){
gui.closeInput();
freeInput(gui);
};
};
} else {
if (currentInput == null){
if (_arg1.keyCode == Input.ESCAPE){
toggleMenu();
} else {
if (_arg1.keyCode == Input.ENTER){
captureInput(gui);
gui.openInput();
};
};
};
};
};
}
protected function handleMapReceived(_arg1:DatabaseEvent):void{
if (!mapRequest){
return;
};
mapRequest.removeEventListener(DatabaseEvent.GET_MAP, handleMapReceived);
mapRequest = null;
var _local2:MapInfo = MapInfo.mapList[mapIndex];
if (_arg1.error){
Debug.error((((("Could not retrieve map data. for map: " + _local2.name) + " (") + _local2.slot) + "). Retrying..."));
getMap();
return;
};
_local2.mapString = _arg1.data.map.data.toString();
var _local3:Map = _local2.create();
if (_local3){
loadMap(_local3);
} else {
Debug.error((((("Could not retrieve map data for map: " + _local2.name) + " (") + _local2.slot) + ")"));
};
}
protected function premiumsRefreshed(_arg1:ServerEvent):void{
if (localPlayer.character){
applyLocalPremiums();
};
}
public function dispose():void{
var _local1:RemotePlayer;
if (((localPlayer) && (localPlayer.character))){
localPlayer.character.removeEventListener(FireEvent.FIRE, characterFire);
localPlayer.character.removeEventListener(CharacterEvent.WEAPON_SWITCH, characterWeaponSwitch);
localPlayer.character.removeEventListener(CharacterEvent.HURT, characterHurt);
localPlayer.character.removeEventListener(CharacterEvent.RESPAWN, characterRespawn);
};
disableConnection();
localPlayer.dispose();
for each (_local1 in remotePlayers) {
_local1.dispose();
};
Console.dispatcher.removeEventListener(ConsoleEvent.INPUT, consoleInput);
disconnectionTimer.removeEventListener(TimerEvent.TIMER, disconnectionTimeUp);
disconnectionTimer.stop();
checkProcessTimer.removeEventListener(TimerEvent.TIMER, checkProcess);
checkProcessTimer.stop();
secondTimer.removeEventListener(TimerEvent.TIMER, second);
secondTimer.stop();
floodTimer.removeEventListener(TimerEvent.TIMER, floodTick);
floodTimer.stop();
if (scoreBoard){
scoreBoard.dispose();
};
weaponSlider.removeEventListener(WeaponSliderEvent.SELECT, handleWeaponSliderSelect);
removeEventListener(Event.ENTER_FRAME, enterFrame);
if (stage){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
};
if (map){
map.removeEventListener(DeployableEvent.DAMAGE, deployableDamage);
map.removeEventListener(DeployableEvent.ACTIVATE, deployableActivate);
map.dispose();
};
canvas.dispose();
hideAdvertisement();
gameOver = true;
}
protected function receiveServerMessage(_arg1:ServerEvent):void{
switch (_arg1.message.charAt(0)){
case "r":
existingDeployablesString = _arg1.message.substr(1);
break;
case "s":
existingPickupsString = _arg1.message.substr(1);
break;
default:
messageInQueue.push(new QueuedMessage(QueuedMessage.SERVER_MESSAGE, null, _arg1.message));
break;
};
}
protected function getPlayerWeaponDamage(_arg1:Player, _arg2:int):int{
var _local3:PlayerCharacter = _arg1.character;
if (!_local3){
return (0);
};
var _local4:Weapon = _local3.getWeaponByID(_arg2);
if (!_local4){
return (0);
};
return (_local4.damage);
}
public function captureInput(_arg1:Object):void{
if (inputStack.length == 0){
localPlayer.clearInput();
};
var _local2:int = inputStack.indexOf(_arg1);
if (_local2 == -1){
inputStack.push(_arg1);
};
}
protected function createDeployableFromString(_arg1:String, _arg2:Boolean=true):Deployable{
var _local3:Player = getPlayerByID(_arg1.substr(0, 3));
if (!_local3){
Debug.error("Error: Deployable owner not found");
return (null);
};
var _local4:PlayerCharacter = _local3.character;
if (!_local4){
Debug.error("Error: Deployable owner not active");
return (null);
};
var _local5:int = getWeaponIDFromDeployableCode(_arg1.charAt(3));
var _local6:WeaponPlanter = (_local4.getWeaponByID(_local5) as WeaponPlanter);
if (!_local6){
Debug.error("Error: Deployable owner does not own weapon");
return (null);
};
var _local7:Position = stringToCellPos(_arg1.substr(6));
var _local8:Cell = map.cellGrid.cellAtPos(_local7);
if (_local8.deployable){
map.removeDeployable(_local8.deployable);
};
var _local9:Deployable = _local6.createDeployable(_local7.x, _local7.y);
_local9.index = parseInt(_arg1.substr(4, 2));
_local4.owner.addDeployable(_local9);
map.plantDeployable(_local9, _arg2);
return (_local9);
}
protected function getPlayerByID(_arg1:String):Player{
var _local2:RemotePlayer;
if (localPlayer.id == _arg1){
return (localPlayer);
};
for each (_local2 in remotePlayers) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
protected function resetUI():void{
}
protected function getMap():void{
var _local1:MapInfo = MapInfo.mapList[mapIndex];
mapRequest = new DatabaseRequest(DatabaseRequest.GET_MAP, MapInfo.BOUNTY_ACCOUNT, null, null, ("" + _local1.slot));
mapRequest.addEventListener(DatabaseEvent.GET_MAP, handleMapReceived);
}
protected function applyQuickPlayProfile():void{
}
protected function processServerMessage(_arg1:String):void{
var _local3:Player;
var _local4:Deployable;
var _local5:HasOwner;
var _local6:int;
var _local2:String = _arg1.charAt(0);
_arg1 = _arg1.substr(1);
switch (_local2){
case "R":
endGame(_arg1);
break;
case "n":
_local4 = createDeployableFromString(_arg1);
break;
case "o":
_local4 = getDeployableByIndex(parseInt(_arg1.substr(0, 2)));
if (_local4){
if (_arg1.length >= 5){
_local5 = getPlayerByID(_arg1.substr(2, 3)).character;
_local6 = 0;
} else {
_local6 = parseInt(_arg1.substr(2));
};
if (_local6 > 0){
_local4.setHealth(_local6);
} else {
if (!_local5){
_local5 = _local4;
};
_local4.owner.removeDeployable(_local4);
map.deployableDeath(_local4, _local5);
};
} else {
Debug.error("Deployable index not found");
};
break;
};
}
protected function setRoundTime(_arg1:int):void{
roundTime = _arg1;
if (_arg1 > ROUND_END_TIME){
participated = true;
};
}
protected function processLocalPlayer():void{
localPlayer.process();
if (!currentInput){
localPlayer.processInput();
};
if (((((Constants.TEST_MODE) && (remotePlayers.length))) && (localPlayer.localCharacter))){
localPlayer.localCharacter.unlag(remotePlayers[0].ping);
Debug.drawCircle(localPlayer.localCharacter.fireHit.pos.x, localPlayer.localCharacter.fireHit.pos.y, localPlayer.localCharacter.fireHit.radius, 0xFFFF);
localPlayer.localCharacter.unlag(0);
};
}
protected function characterWeaponSwitch(_arg1:CharacterEvent):void{
queueWeapon(_arg1.weaponID);
}
protected function setupConnection():void{
connection.addEventListener(ServerEvent.HANDSHAKE, peerJoined);
connection.addEventListener(ServerEvent.DISCONNECTED, disconnected);
connection.addEventListener(ServerEvent.PEER_DISCONNECTED, peerDisconnected);
connection.addEventListener(ServerEvent.MESSAGE, receiveMessage);
connection.addEventListener(ServerEvent.PLAYER_MESSAGE, receivePlayerMessage);
connection.addEventListener(ServerEvent.SERVER_MESSAGE, receiveServerMessage);
connection.addEventListener(ServerEvent.GLOBAL_MESSAGE, receiveGlobalMessage);
connection.addEventListener(ServerEvent.ROOM_INFO, receiveRoomInfo);
connection.addEventListener(ServerEvent.ROUND_TIME, receiveRoundTime);
connection.addEventListener(ServerEvent.MOST_WANTED_CHANGE, receiveMostWantedStatus);
connection.addEventListener(ServerEvent.PEER_PREMIUMS, peerPremiums);
connection.addEventListener(ServerEvent.PREMIUMS_REFRESHED, premiumsRefreshed);
}
protected function checkProcess(_arg1:TimerEvent):void{
Time.current = getTimer();
if ((((Time.current >= scheduledProcess)) && (!(forceRedraw)))){
process();
scheduledProcess = (scheduledProcess + Constants.PROCESS_INTERVAL);
processCount++;
Time.lastProcess = Time.current;
} else {
if (!drawn){
draw();
frameCount++;
drawn = true;
Time.lastRender = Time.current;
};
forceRedraw = false;
};
}
protected function disconnected(_arg1:ServerEvent):void{
checkProcessTimer.stop();
disableConnection();
gui.showWarning("Connection Lost", 99999);
if (((map) && (canvas))){
draw();
};
disconnectionTimer.addEventListener(TimerEvent.TIMER, disconnectionTimeUp);
disconnectionTimer.start();
}
public function draw():void{
var camPosition:Position;
if (((((gameOver) || (!(canvas)))) || (!(map)))){
return;
};
Debug.clear();
canvas.lock();
try {
camPosition = localPlayer.getCameraPosition();
if (!camPosition){
camPosition = new Position((map.width / 2), (map.height / 2));
};
map.focus(camPosition);
map.draw(canvas);
if (localPlayer.spyMode){
localPlayer.spyCam.drawScanLines(canvas);
map.drawOutlines(canvas);
};
drawOverheads();
drawGUI();
} catch(e:Error) {
Debug.error(("Draw Error: " + e.message));
};
canvas.unlock();
}
protected function quit():void{
if (checkProcessTimer){
checkProcessTimer.stop();
};
disableConnection();
dispatchEvent(new ScreenEvent(ScreenEvent.CLOSE));
}
protected function interstitialLoaded(_arg1:Event):void{
_arg1.target.removeEventListener(Event.COMPLETE, interstitialLoaded);
interstitial = (_arg1.target.content as MovieClip);
interstitial.stop();
interstitial.addFrameScript((interstitial.totalFrames - 1), interstitial.stop);
}
protected function peerJoined(_arg1:ServerEvent):void{
var _local3:Object;
var _local4:Weapon;
var _local5:int;
var _local2:RemotePlayer = new RemotePlayer();
_local2.user = (_arg1.info as MMOchaUser);
if (((!(_local2.user.name)) || ((_local2.user.name.length == 0)))){
_local2.user.name = QuickPlayProfile.generateName(_local2.user);
};
remotePlayers.push(_local2);
gui.addMessage((_local2.name + " joined the game"), false, true);
_local2.score = _local2.user.handShake.score;
_local2.kills = _local2.user.handShake.kills;
_local2.deaths = _local2.user.handShake.deaths;
_local2.bountyPoints = _local2.user.handShake.bountyPoints;
_local2.team = _local2.user.handShake.team;
_local2.createCharacter();
_local2.character.active = false;
_local2.character.pickupRemoteWeapons();
_local2.character.selectWeaponByID(_local2.user.handShake.weaponID, false);
_local2.character.setHealth(_local2.user.handShake.hp, false);
if (map){
map.addCharacter(_local2.character);
};
for each (_local3 in _local2.user.handShake.upgrades) {
_local4 = _local2.character.getWeaponByID(_local3.weaponID);
_local5 = _local3.flags;
if (_local4){
if ((((((_local5 == 1)) || ((_local5 == 3)))) && (_local4.upgrade1))){
_local4.upgrade1.buy();
};
if ((((((_local5 == 2)) || ((_local5 == 3)))) && (_local4.upgrade2))){
_local4.upgrade2.buy();
};
};
};
pingPlayer(_local2);
_local2.user.handShake = null;
forcePositionUpdate = true;
updateScores();
}
protected function respawnLocalCharacter():void{
var _local1:PlayerCharacter = localPlayer.character;
if (!_local1){
return;
};
map.spawnCharacter(_local1);
queueGameMessage(("8" + cellPosToString(_local1.pos)));
}
protected function processRemotePlayers():void{
var _local2:Player;
var _local3:QueuedMessage;
var _local4:Player;
if (Time.current > (lastPing + Constants.PING_CYCLE_INTERVAL)){
_local2 = remotePlayers[pingQueueIndex];
if (_local2){
if ((Time.current - _local2.lastPing) > Constants.PING_INTERVAL){
pingPlayer(_local2);
pingQueueIndex = ((pingQueueIndex + 1) % remotePlayers.length);
};
} else {
pingQueueIndex = ((pingQueueIndex + 1) % remotePlayers.length);
};
};
var _local1:int;
while (_local1 < messageInQueue.length) {
_local3 = messageInQueue[_local1];
_local4 = getPlayerByID(_local3.source);
switch (_local3.type){
case QueuedMessage.CHAT_BUNDLE:
if (_local4){
processBundle(_local4, _local3.message);
};
break;
case QueuedMessage.PLAYER_MESSAGE:
if (_local4){
processPlayerMessage(_local4, _local3.message);
};
break;
case QueuedMessage.SERVER_MESSAGE:
processServerMessage(_local3.message);
break;
};
_local1++;
};
messageInQueue = [];
}
protected function drawGUI():void{
if (guiVisible){
if (!guiShouldBeVisible()){
hideGUI();
};
} else {
if (guiShouldBeVisible()){
showGUI();
};
};
if (!guiVisible){
return;
};
gui.draw(canvas, map.focusPosition);
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (currentInput == gui){
if (_arg1.keyCode == Input.BACKSPACE){
gui.deleteInput();
} else {
gui.appendInput(_arg1.charCode);
};
};
}
protected function disconnectionTimeUp(_arg1:TimerEvent):void{
disconnectionTimer.removeEventListener(TimerEvent.TIMER, disconnectionTimeUp);
disconnectionTimer.stop();
dispatchEvent(new ScreenEvent(ScreenEvent.DISCONNECTED));
}
protected function receiveRoomInfo(_arg1:ServerEvent):void{
var _local2:MapInfo;
var _local3:Map;
setRoundTime(_arg1.info.roundTime);
if (((!(map)) && (!(mapRequest)))){
mapIndex = _arg1.info.mapID;
_local2 = MapInfo.mapList[mapIndex];
if (!_local2){
Debug.error(("Bad map index: " + mapIndex));
} else {
_local3 = _local2.create();
if (_local3){
loadMap(_local3);
setRoundTime(_arg1.info.roundTime);
} else {
getMap();
};
};
};
}
protected function drawOverheads():void{
var _local3:Thing;
var _local4:int;
var _local5:Thing;
var _local6:PlayerCharacter;
var _local1:Array = map.characters.concat(map.turrets);
var _local2 = 1;
while (_local2 < _local1.length) {
_local3 = _local1[_local2];
_local4 = (_local2 - 1);
while (_local4 >= 0) {
_local5 = _local1[_local4];
if (_local3.depth < _local5.depth){
_local1[(_local4 + 1)] = _local5;
_local1[_local4] = _local3;
} else {
break;
};
_local4--;
};
_local2++;
};
for each (_local3 in _local1) {
_local6 = (_local3 as PlayerCharacter);
if (((_local6) && (((!(_local6.active)) || (_local6.dead))))){
} else {
_local3.drawOverhead(canvas, map.cameraOffset);
};
};
}
protected function updateScores():void{
gui.updateLeaderboard(remotePlayers.concat(localPlayer));
if (((scoreBoard) && (scoreBoard.parent))){
scoreBoard.update(remotePlayers.concat(localPlayer));
};
}
protected function processMap():void{
map.process();
}
protected function process():void{
var players:Array;
if (((mapLoadingScreen) && ((mapLoadingScreen.alpha < 1)))){
mapLoadingScreen.alpha = Math.max(0, (mapLoadingScreen.alpha - 0.05));
if (mapLoadingScreen.alpha == 0){
removeMapLoadingScreen();
};
};
if (!map){
return;
};
if (gameSummary){
players = remotePlayers.concat();
if (participated){
players.push(localPlayer);
};
gameSummary.refreshScores(players);
};
if (gameOver){
Input.update();
return;
};
if (localPlayer.localCharacter){
localPlayer.localCharacter.unlag(0);
};
try {
processLocalPlayer();
} catch(e:Error) {
Debug.error(("Local Player Error: " + e.message));
};
try {
processRemotePlayers();
} catch(e:Error) {
Debug.error(("Remote Player Error: " + e.message));
};
try {
processAI();
} catch(e:Error) {
Debug.error(("AI Error: " + e.message));
};
try {
processMap();
} catch(e:Error) {
Debug.error(("Map Error: " + e.message));
};
if (localPlayer.character){
weaponSlider.update(localPlayer.character.currentWeapon);
checkBountyCrates();
};
if (Input.isDown(Input.SCORES_KEY)){
if (Input.newPress(Input.SCORES_KEY)){
addChild(scoreBoard);
};
scoreBoard.update(remotePlayers.concat(localPlayer));
} else {
if (((scoreBoard.parent) && (localPlayer.team))){
scoreBoard.parent.removeChild(scoreBoard);
};
};
Input.update();
if (((localPlayer.character) && (localPlayer.character.active))){
sendUpdate();
};
}
public function start(_arg1:MMOchaServer):void{
this.connection = _arg1;
setupConnection();
Time.current = getTimer();
Time.lastRender = Time.current;
Time.lastProcess = Time.current;
scheduledProcess = Time.current;
processCount = 0;
frameCount = 0;
newGame();
}
protected function clearLocalPremiums():void{
var _local1:int;
var _local2:Premium;
for each (_local1 in Premium.VALID_PREMIUMS) {
_local2 = localPlayer.user.premiums[_local1];
_local2.applied = false;
};
}
protected function enterFrame(_arg1:Event):void{
drawn = false;
}
protected function sendUpdate():void{
var _local1:String;
var _local5:String;
var _local2:PlayerCharacter = localPlayer.character;
var _local3:int;
if (_local2.collided){
_local3 = (_local3 + 1);
};
var _local4:int;
if (_local2.moveDir){
_local4 = (_local2.moveDir.index + 1);
};
if (((((((((forcePositionUpdate) || (_local2.collided))) || (!((_local3 == sentMoveFlags))))) || (!((_local4 == sentMoveDirIndex))))) || (!((_local2.dir.index == sentDirIndex))))){
_local1 = (((((("1" + posToString(_local2.pos)) + _local4) + "") + _local2.dir.index) + "") + _local3);
connection.sendGameMessage(_local1);
sentMoveDirIndex = _local4;
sentDirIndex = _local2.dir.index;
sentMoveFlags = _local3;
};
while (gameMessageOutQueue.length > 0) {
_local5 = gameMessageOutQueue.shift();
connection.sendGameMessage(_local5);
};
if (messageOutQueue.length){
_local1 = "";
while (messageOutQueue.length) {
_local1 = (_local1 + (messageOutQueue.shift() + DELIM));
};
connection.sendMessage(_local1);
messageOutTimes.push({time:Time.current, message:_local1});
};
forcePositionUpdate = false;
}
protected function upgradeWeapon(_arg1:int, _arg2:int):void{
var _local3:PlayerCharacter = localPlayer.character;
var _local4:Weapon = _local3.getWeaponByID(_arg1);
if (!_local4){
return;
};
var _local5:Weapon = getPremiumWeapon(_arg2);
_local3.pickupWeapon(_local5);
if (((_local3.currentWeapon) && ((_local3.currentWeapon.weaponID == _arg1)))){
_local3.selectWeaponByID(_arg2, true);
};
_local3.dropWeaponByID(_arg1);
weaponSlider.updateWeaponList(_local3.getWeaponBanks());
}
protected function removeMapLoadingScreen():void{
if (!mapLoadingScreen){
return;
};
if (mapLoadingScreen.parent){
mapLoadingScreen.parent.removeChild(mapLoadingScreen);
};
mapLoadingScreen.removeEventListener(ScreenEvent.MENU, handleLoadingQuit);
mapLoadingScreen.dispose();
mapLoadingScreen = null;
}
protected function guiShouldBeVisible():Boolean{
if (((scoreBoard) && (scoreBoard.parent))){
return (false);
};
if (((gameSummary) && (gameSummary.parent))){
return (false);
};
return (true);
}
protected function second(_arg1:TimerEvent=null):void{
roundTime--;
if ((roundTime % 20) == 0){
connection.requestRoundTime();
};
if (roundTime == ROUND_START_TIME){
SoundControl.playUISound(SoundList.GAME_START);
};
if (gameOver){
if (roundTime == ROUND_AD_TIME){
showAdvertisement();
};
if (gameSummary){
gameSummary.setCountDown(Math.max(0, roundTime));
};
if ((((roundTime <= 0)) || ((roundTime > ROUND_END_TIME)))){
hideAdvertisement();
newGame();
};
return;
};
gui.updateFPS(frameCount);
gui.updateTime(Math.max(0, (roundTime - ROUND_END_TIME)));
forceRedraw = true;
frameCount = 0;
processCount = 0;
}
protected function peerPremiums(_arg1:ServerEvent):void{
var _local2:Player = getPlayerByID(_arg1.source);
var _local3:Premium = _local2.user.premiums[Premium.SHOES_ID];
_local3.owned = true;
if (_local2.character){
_local2.character.speedMultiplier = _local3.value;
};
}
protected function getRemotePlayerByID(_arg1:String):RemotePlayer{
var _local2:RemotePlayer;
if (localPlayer.id == _arg1){
return (null);
};
for each (_local2 in remotePlayers) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
protected function deployableDamage(_arg1:DeployableEvent):void{
queueGameMessage(((("o" + StringFunctions.padInt(_arg1.deployable.index, 2)) + _arg1.source.owner.id) + StringFunctions.padInt(_arg1.value, 2)));
}
protected function queueWeapon(_arg1:int):void{
queueGameMessage(("0q" + StringFunctions.padInt(_arg1, 2)));
}
protected function createBountyItemsFromString(_arg1:String, _arg2:Character=null):void{
var _local3:Position;
var _local4:Position;
var _local5:int;
var _local6:BountyItem;
if (_arg2){
_local3 = _arg2.pos.clone();
};
while (_arg1.length >= 13) {
_local4 = stringToPos(_arg1.substr(3, 10));
_local5 = parseInt(_arg1.charAt(0));
_local6 = new BountyCrate(_local5, _local4);
if (_local3){
_local6.animateFrom(_local3);
};
_local6.index = parseInt(_arg1.substr(1, 2));
map.removeBountyItemByIndex(_local6.index);
map.addBountyItem(_local6);
_arg1 = _arg1.substr(13);
};
}
protected function hideGUI():void{
guiVisible = false;
if (weaponSlider.parent){
weaponSlider.parent.removeChild(weaponSlider);
};
}
protected function endGame(_arg1:String):void{
if (gameOver){
return;
};
if (scoreBoard.parent){
scoreBoard.parent.removeChild(scoreBoard);
};
Links.milestone("Round Completed");
gameSummary = new GameSummary();
var _local2:Array = remotePlayers.concat();
if (participated){
_local2.push(localPlayer);
};
gameSummary.displaySummary(_local2, _arg1);
addChild(gameSummary);
hideGUI();
SoundControl.playUISound(SoundList.END_ROUND);
localPlayer.user.stats.kills = (localPlayer.user.stats.kills + localPlayer.kills);
localPlayer.user.stats.deaths = (localPlayer.user.stats.deaths + localPlayer.deaths);
localPlayer.user.stats.bountyPoints = (localPlayer.user.stats.bountyPoints + localPlayer.bountyPoints);
if (localPlayer == gameSummary.winner){
localPlayer.user.stats.wins++;
} else {
localPlayer.user.stats.losses++;
};
draw();
localPlayer.exitSpyMode();
SoundControl.stopAllAreaSounds();
gameOver = true;
}
protected function handleLoadingQuit(_arg1:ScreenEvent):void{
removeMapLoadingScreen();
quit();
}
protected function handleInterstitialClick(_arg1:MouseEvent):void{
Links.openLink(Links.PAGE_LINK);
}
protected function receiveMessage(_arg1:ServerEvent):void{
var _local2:Object;
var _local3:int;
var _local4:int;
var _local5:RemotePlayer;
if (_arg1.source == localPlayer.id){
if (messageOutTimes.length){
_local2 = messageOutTimes.shift();
_local3 = _local2.time;
_local4 = (getTimer() - _local3);
};
return;
};
if (_arg1.message == M_PING_REQUEST){
connection.sendPrivate(M_PING_RESPONSE, _arg1.source);
return;
};
if (_arg1.message == M_PING_RESPONSE){
_local5 = getRemotePlayerByID(_arg1.source);
if (_local5){
_local5.pingReceived();
};
return;
};
messageInQueue.push(new QueuedMessage(QueuedMessage.CHAT_BUNDLE, _arg1.source, _arg1.message));
}
protected function loadMap(_arg1:Map):void{
var _local2:int;
var _local3:PlayerCharacter;
var _local4:RemotePlayer;
var _local5:Premium;
var _local6:String;
var _local7:Deployable;
this.map = _arg1;
_arg1.addCamera(localPlayer.spyCam);
_arg1.addEventListener(DeployableEvent.DAMAGE, deployableDamage);
_arg1.addEventListener(DeployableEvent.ACTIVATE, deployableActivate);
resetUI();
for each (_local4 in remotePlayers) {
if (!_local4.character){
_local4.createCharacter();
_local3 = _local4.character;
_local4.character.active = false;
_local4.character.pickupRemoteWeapons();
_local5 = _local4.user.premiums[Premium.SHOES_ID];
if (_local5.owned){
_local4.character.speedMultiplier = _local5.value;
};
};
_arg1.addCharacter(_local4.character);
};
_local3 = localPlayer.character;
if (_local3){
_local3.removeEventListener(FireEvent.FIRE, characterFire);
_local3.removeEventListener(CharacterEvent.WEAPON_SWITCH, characterWeaponSwitch);
_local3.removeEventListener(CharacterEvent.HURT, characterHurt);
_local3.removeEventListener(CharacterEvent.RESPAWN, characterRespawn);
};
localPlayer.createCharacter();
_local3 = localPlayer.character;
_local3.addEventListener(FireEvent.FIRE, characterFire);
_local3.addEventListener(CharacterEvent.WEAPON_SWITCH, characterWeaponSwitch);
_local3.addEventListener(CharacterEvent.HURT, characterHurt);
_local3.addEventListener(CharacterEvent.RESPAWN, characterRespawn);
_local3.active = false;
applyQuickPlayProfile();
_arg1.addCharacter(_local3);
clearLocalPremiums();
applyLocalPremiums();
_local3.animate();
if (existingDeployablesString){
_local6 = existingDeployablesString;
while (_local6.length >= 14) {
_local7 = createDeployableFromString(_local6.substr(0, 12), false);
if (_local7){
_local7.setHealth(parseInt(_local6.substr(12, 2)));
};
_local6 = _local6.substr(14);
};
};
existingDeployablesString = null;
if (existingPickupsString){
createBountyItemsFromString(existingPickupsString);
};
existingPickupsString = null;
weaponSlider.clear();
weaponSlider.updateWeaponList(_local3.getWeaponBanks());
updateScores();
checkProcessTimer.start();
secondTimer.start();
if (stage){
stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, handleKeyUp, false, 0, true);
};
process();
draw();
if (mapLoadingScreen){
mapLoadingScreen.alpha = 0.95;
};
}
protected function receiveMostWantedStatus(_arg1:ServerEvent):void{
updateScores();
}
protected function newGame():void{
var _local1:RemotePlayer;
if (gameSummary){
gameSummary.dispose();
if (gameSummary.parent){
gameSummary.parent.removeChild(gameSummary);
};
gameSummary = null;
};
SoundControl.stopAllAreaSounds();
if (roundTime != -1){
gameOver = false;
};
for each (_local1 in remotePlayers) {
_local1.removeCharacter();
_local1.newRound();
};
localPlayer.newRound();
gui.setMoney(localPlayer.money);
gui.setBountyPoints(localPlayer.bountyPoints);
if (map){
map.removeEventListener(DeployableEvent.DAMAGE, deployableDamage);
map.removeEventListener(DeployableEvent.ACTIVATE, deployableActivate);
map.dispose();
map = null;
};
checkProcessTimer.stop();
secondTimer.stop();
if (stage){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
};
connection.requestRoomInfo(connection.room);
showInitUI();
if (mapLoadingScreen){
removeMapLoadingScreen();
};
mapLoadingScreen = new MapLoadingScreen();
mapLoadingScreen.addEventListener(ScreenEvent.MENU, handleLoadingQuit);
addChild(mapLoadingScreen);
}
protected function consoleInput(_arg1:ConsoleEvent):void{
if (!_arg1.command){
return;
};
switch (_arg1.command.toLowerCase()){
case "exit":
case "quit":
quit();
break;
};
}
protected function getPremiumWeapon(_arg1:int):Weapon{
return (WeaponInfo.lookup(_arg1).create());
}
protected function queueMessage(_arg1:String):void{
messageOutQueue.push(_arg1);
}
protected function floodTick(_arg1:TimerEvent):void{
if (floodCount > 0){
floodCount--;
if (floodCount == 0){
floodWarningGiven = false;
};
};
}
protected function peerDisconnected(_arg1:ServerEvent):void{
var _local3:int;
var _local4:Deployable;
var _local2:RemotePlayer = getRemotePlayerByID(_arg1.source);
if (!_local2){
return;
};
if (((map) && (_local2.character))){
map.removeCharacter(_local2.character);
};
for each (_local4 in _local2.getDeployables()) {
map.removeDeployable(_local4);
};
_local3 = (remotePlayers.length - 1);
while (_local3 >= 0) {
if (remotePlayers[_local3] == _local2){
gui.addMessage((_local2.name + " left the game"), false, true);
remotePlayers.splice(_local3, 1);
break;
};
_local3--;
};
updateScores();
}
public function freeInput(_arg1:Object):void{
var _local2:int = inputStack.indexOf(_arg1);
if (_local2 >= 0){
inputStack.splice(_local2, 1);
};
}
protected function handleWeaponSliderSelect(_arg1:WeaponSliderEvent):void{
var _local2:Weapon = _arg1.weapon;
var _local3:PlayerCharacter = localPlayer.character;
if (((((!(_local2)) || (!(_local3)))) || ((_local2 == _local3.currentWeapon)))){
return;
};
_local3.selectWeaponByID(_local2.weaponID);
}
public function getDeployable(_arg1:Player, _arg2:int):Deployable{
return (_arg1.getDeployableByID(_arg2));
}
protected function addPremiumEquipment(_arg1:int, _arg2:int):void{
var _local3:PlayerCharacter = localPlayer.character;
var _local4:Weapon = _local3.getWeaponByID(_arg1);
if (_local4){
if (_local4.ammo){
_local4.ammo.setCount(_arg2);
};
} else {
_local4 = getPremiumWeapon(_arg1);
if (_local4.ammo){
_local4.ammo.setCount(_arg2);
};
_local3.pickupWeapon(_local4);
};
weaponSlider.updateWeaponList(_local3.getWeaponBanks());
}
protected function receiveGlobalMessage(_arg1:ServerEvent):void{
var _local2:String = _arg1.message;
if (((_local2) && ((_local2.length > 0)))){
gui.showGlobal(_local2);
};
}
protected function characterDeath(_arg1:LocalCharacter, _arg2:HasOwner, _arg3:int):void{
gui.addKillMessage(_arg2.owner, _arg1.owner, _arg3);
gui.showWarning("You will respawn in: [seconds]", _arg1.respawnTime);
forcePositionUpdate = true;
}
protected function processPlayerMessage(_arg1:Player, _arg2:String):void{
var _local3:Position;
var _local4:Direction;
var _local5:int;
var _local6:Weapon;
var _local9:int;
var _local10:Direction;
var _local11:uint;
var _local12:Boolean;
var _local13:int;
var _local14:Player;
var _local15:int;
var _local16:int;
var _local17:BountyItem;
var _local18:Number;
var _local19:int;
var _local20:Shot;
var _local7:Boolean = _arg1.isLocal;
var _local8:PlayerCharacter = _arg1.character;
switch (_arg2.charAt(0)){
case "0":
switch (_arg2.charAt(1)){
case "k":
if (_local7){
break;
};
_arg1.team = parseInt(_arg2.substr(2));
updateScores();
break;
case "q":
if (_local7){
break;
};
_local8.selectWeaponByID(parseInt(_arg2.substr(2)));
break;
case "l":
if (_local7){
break;
};
_local5 = parseInt(_arg2.substr(2, 2));
_local6 = _local8.getWeaponByID(_local5);
if (_local6){
switch (_arg2.charAt(4)){
case BUY_ACTION:
break;
case UPGRADE1_ACTION:
_local6.upgrade1.buy();
break;
case UPGRADE2_ACTION:
_local6.upgrade2.buy();
break;
};
};
break;
};
break;
case "1":
if (_local7){
break;
};
_local3 = stringToPos(_arg2.substr(1, 10));
_local9 = parseInt(_arg2.charAt(11));
_local10 = null;
if (_local9 > 0){
_local10 = Direction.list[(_local9 - 1)];
};
_local4 = Direction.list[parseInt(_arg2.charAt(12))];
_local11 = parseInt(_arg2.charAt(13));
_local8.moving = !((_local10 == null));
_local8.strafing = true;
_local12 = ((_local11 & 1) > 0);
if (((((_local12) || (!(_local10)))) || (!((_local8.moveDir == _local10))))){
_local8.pos.copy(_local3);
};
if (((!((_local10 == null))) && (!((_local10 == _local8.moveDir))))){
_local8.applySmoothing();
};
_local8.moveDir = _local10;
_local8.dir = _local4;
_local8.firePos.copy(_local3);
_local8.updateWeapons();
if (!_local8.active){
_local8.active = true;
updateScores();
};
break;
case "4":
if (_local7){
break;
};
if (_local8.currentWeapon){
localPlayer.localCharacter.unlag(_arg1.ping);
_local18 = ((Math.PI / 180) * parseInt(_arg2.substr(1, 3)));
_local19 = parseInt(_arg2.substr(4));
_local20 = _local8.currentWeapon.shoot(_local18, _local19);
map.executeShot(_local20);
};
break;
case "6":
if (_local7){
break;
};
_local13 = parseInt(_arg2.substr(1));
if (_local13 > 0){
map.addBlood(_local8, (_local8.hp - _local13));
_local8.setHealth(_local13);
};
break;
case "7":
_local14 = getPlayerByID(_arg2.substr(1, 3));
if (((!(_local7)) || (!(_local8.dead)))){
map.addBlood(_local8, _local8.hp);
_local8.setHealth(0);
_local5 = parseInt(_arg2.substr(4, 2));
gui.addKillMessage(_local14, _arg1, _local5);
};
_arg1.deaths++;
if (_local14 != _arg1){
_local14.kills++;
};
updateScores();
createBountyItemsFromString(_arg2.substr(6), _arg1.character);
break;
case "8":
if (_local7){
break;
};
_local3 = stringToCellPos(_arg2.substr(1, 6));
_local3.x = (_local3.x + 0.5);
_local3.y = (_local3.y + 0.5);
_local8.pos.copy(_local3);
_local8.respawn();
_local8.moveDir = null;
if (!_local8.active){
_local8.active = true;
updateScores();
};
break;
case "m":
_local15 = parseInt(_arg2.substr(1, 2));
_local16 = parseInt(_arg2.substr(3));
_local17 = map.getBountyItemByIndex(_local15);
if (_local17){
pickupBountyItem(_arg1, _local17, _local16);
};
break;
};
}
protected function get currentInput():Object{
if (((!(inputStack)) || ((inputStack.length == 0)))){
return (null);
};
return (inputStack[(inputStack.length - 1)]);
}
protected function receivePlayerMessage(_arg1:ServerEvent):void{
messageInQueue.push(new QueuedMessage(QueuedMessage.PLAYER_MESSAGE, _arg1.source, _arg1.message));
}
protected function deployableActivate(_arg1:DeployableEvent):void{
var _local2:String = (M_DEPLOYABLE_ACTIVATE + _arg1.deployable.index);
queueMessage(_local2);
}
protected function processAI():void{
}
protected function receiveRoundTime(_arg1:ServerEvent):void{
setRoundTime(int(_arg1.info));
}
protected function toggleMenu():void{
dispatchEvent(new ScreenEvent(ScreenEvent.MENU));
}
protected function applyLocalPremiums():void{
var _local1:int;
for each (_local1 in Premium.VALID_PREMIUMS) {
if (localPlayer.premiumOwned(_local1)){
applyPremium(_local1);
};
};
}
protected function characterHurt(_arg1:CharacterEvent):void{
var _local2:LocalCharacter = (_arg1.target as LocalCharacter);
if (!_local2){
return;
};
map.addScreenShake(new ScreenShake(_local2.pos, 1.5, 200));
if (_local2.dead){
characterDeath(_local2, _arg1.source, _arg1.weaponID);
};
queueGameMessage(((("6" + _arg1.source.owner.id) + StringFunctions.padInt(_arg1.weaponID, 2)) + StringFunctions.padInt(_arg1.damage, 2)));
}
protected function characterRespawn(_arg1:CharacterEvent):void{
respawnLocalCharacter();
}
protected function hideAdvertisement():void{
if (interstitial){
if (interstitial.parent){
interstitial.parent.removeChild(interstitial);
};
interstitial.stop();
interstitial.removeEventListener(MouseEvent.CLICK, handleInterstitialClick);
if (stage){
stage.frameRate = Constants.GAME_FPS;
};
};
}
protected function queueGameMessage(_arg1:String):void{
gameMessageOutQueue.push(_arg1);
}
protected function processBundle(_arg1:Player, _arg2:String):void{
var _local3:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:int;
var _local10:Deployable;
var _local4:Array = _arg2.split(DELIM);
var _local5:Array = [];
for each (_local6 in _local4) {
_local8 = _local6.charAt(0);
switch (_local8){
case M_DEPLOYABLE_ACTIVATE:
_local5.push(_local6.substr(1));
break;
case M_CHAT:
gui.addChatMessage(_arg1, LanguageFilter.filter(_local6.substr(1)));
break;
};
};
for each (_local7 in _local5) {
_local9 = parseInt(_local7);
_local10 = getDeployable(_arg1, _local9);
if (_local10){
_local10.activate();
};
};
}
protected function disableConnection():void{
connection.removeEventListener(ServerEvent.HANDSHAKE, peerJoined);
connection.removeEventListener(ServerEvent.DISCONNECTED, disconnected);
connection.removeEventListener(ServerEvent.PEER_DISCONNECTED, peerDisconnected);
connection.removeEventListener(ServerEvent.MESSAGE, receiveMessage);
connection.removeEventListener(ServerEvent.PLAYER_MESSAGE, receivePlayerMessage);
connection.removeEventListener(ServerEvent.SERVER_MESSAGE, receiveServerMessage);
connection.removeEventListener(ServerEvent.GLOBAL_MESSAGE, receiveGlobalMessage);
connection.removeEventListener(ServerEvent.ROOM_INFO, receiveRoomInfo);
connection.removeEventListener(ServerEvent.ROUND_TIME, receiveRoundTime);
connection.removeEventListener(ServerEvent.MOST_WANTED_CHANGE, receiveMostWantedStatus);
connection.removeEventListener(ServerEvent.PEER_PREMIUMS, peerPremiums);
connection.removeEventListener(ServerEvent.PREMIUMS_REFRESHED, premiumsRefreshed);
}
protected function checkBountyCrates():void{
var _local3:BountyItem;
var _local1:PlayerCharacter = localPlayer.character;
if (((((!(_local1)) || (!(_local1.active)))) || (_local1.dead))){
return;
};
var _local2:int = (map.bountyItems.length - 1);
while (_local2 >= 0) {
_local3 = map.bountyItems[_local2];
if (_local3.checkRange(_local1)){
map.claimBountyItem(_local3);
queueGameMessage(("0m" + StringFunctions.padInt(_local3.index, 2)));
};
_local2--;
};
}
protected function pingPlayer(_arg1:Player):void{
lastPing = Time.current;
_arg1.pingSent();
connection.sendPrivate(M_PING_REQUEST, _arg1.id);
}
protected function showGUI():void{
guiVisible = true;
addChild(weaponSlider);
}
protected function sendChatMessage(_arg1:String):void{
queueMessage((M_CHAT + _arg1));
}
protected static function stringToCellPos(_arg1:String):Position{
return (new Position(parseInt(_arg1.substr(0, 3)), parseInt(_arg1.substr(3, 3))));
}
protected static function stringToPos(_arg1:String):Position{
return (new Position((parseInt(_arg1.substr(0, 5)) / 100), (parseInt(_arg1.substr(5, 5)) / 100)));
}
protected static function posToString(_arg1:Position):String{
return ((StringFunctions.padInt(int((_arg1.x * 100)), 5) + StringFunctions.padInt(int((_arg1.y * 100)), 5)));
}
protected static function getWeaponIDFromDeployableCode(_arg1:String):int{
switch (_arg1){
case "0":
default:
return (WeaponInfo.BARREL_PLANTER_ID);
case "1":
return (WeaponInfo.BARRICADE_PLANTER_ID);
case "2":
return (WeaponInfo.CHARGE_PACK_PLANTER_ID);
case "3":
return (WeaponInfo.CLAYMORE_PLANTER_ID);
case "4":
return (WeaponInfo.TURRET_MG_PLANTER_ID);
case "5":
return (WeaponInfo.TURRET_MORTAR_PLANTER_ID);
};
}
protected static function cellPosToString(_arg1:Position):String{
return ((StringFunctions.padInt(int(_arg1.x), 3) + StringFunctions.padInt(int(_arg1.y), 3)));
}
}
}//package boxhead.game
Section 46
//Game_Interstitial (boxhead.game.Game_Interstitial)
package boxhead.game {
import mx.core.*;
public class Game_Interstitial extends ByteArrayAsset {
}
}//package boxhead.game
Section 47
//LocalPlayer (boxhead.game.LocalPlayer)
package boxhead.game {
import boxhead.events.*;
import boxhead.ui.*;
import boxhead.world.*;
import boxhead.world.thing.character.*;
import boxhead.world.weapon.*;
import boxhead.sounds.*;
public class LocalPlayer extends Player {
public var autoPilot:Boolean;// = false
public var inputChanged:Boolean;// = true
private var _character:LocalCharacter;
public var spyCam:SpyCamera;
public var spyMode:Boolean;// = false
public function LocalPlayer(){
spyCam = new SpyCamera();
}
public function exitSpyMode():void{
if (spyMode){
spyMode = false;
SoundControl.stopAreaSound(SoundList.SATELLITE_LOOP);
SoundControl.playAreaSound(SoundList.SATELLITE_END, character.pos);
};
}
override public function removeCharacter():void{
if (character){
character.removeEventListener(CharacterEvent.HURT, characterHurt);
};
super.removeCharacter();
_character = null;
}
public function enterSpyMode():void{
if (!spyMode){
spyMode = true;
spyCam.x = character.x;
spyCam.y = character.y;
spyCam.active();
SoundControl.playAreaSound(SoundList.SATELLITE_START, spyCam.pos);
SoundControl.playDelayedAreaSound(SoundList.SATELLITE_LOOP, spyCam.pos, SoundList.SATELLITE_START.length, true);
};
}
override public function toggleSpyMode():void{
if (spyMode){
exitSpyMode();
} else {
enterSpyMode();
};
}
override public function createCharacter():void{
super.createCharacter();
_character = new LocalCharacter();
applyUserSettingsToCharacter();
_character.owner = this;
character.addEventListener(CharacterEvent.HURT, characterHurt);
}
public function get localCharacter():LocalCharacter{
return (_character);
}
protected function characterHurt(_arg1:CharacterEvent):void{
exitSpyMode();
}
override public function dispose():void{
if (character){
character.removeEventListener(CharacterEvent.HURT, characterHurt);
};
super.dispose();
}
override public function get isLocal():Boolean{
return (true);
}
public function processInput():void{
var _local1:Direction;
if (((character) && (!(character.dead)))){
_local1 = Direction.byVector(Input.horizontal, Input.vertical);
if (autoPilot){
spyCam.moveDir = null;
character.strafing = false;
character.moveDir = Direction.W;
} else {
if (spyMode){
spyCam.moveDir = _local1;
character.moveDir = null;
character.strafing = false;
} else {
spyCam.moveDir = null;
if (Input.isDown(Input.AUTO_RUN_KEY)){
if (_local1){
character.dir = _local1;
};
if (character.collided){
character.moveDir = null;
};
character.strafing = true;
} else {
character.moveDir = _local1;
character.strafing = Input.isDown(Input.STRAFE_KEY);
};
if (Input.newPress(Input.SPIN_KEY)){
character.spin();
};
};
};
if (Input.newPress(Input.WEAPON_DOWN_KEY)){
character.prevWeapon();
exitSpyMode();
};
if (Input.newPress(Input.WEAPON_UP_KEY)){
character.nextWeapon();
exitSpyMode();
};
if (Input.newPress(Input.WEAPON1_KEY)){
character.selectWeaponBank(1);
exitSpyMode();
};
if (Input.newPress(Input.WEAPON2_KEY)){
character.selectWeaponBank(2);
exitSpyMode();
};
if (Input.newPress(Input.WEAPON3_KEY)){
character.selectWeaponBank(3);
exitSpyMode();
};
if (Input.newPress(Input.WEAPON4_KEY)){
character.selectWeaponBank(4);
exitSpyMode();
};
if (Input.newPress(Input.WEAPON5_KEY)){
character.selectWeaponBank(5);
exitSpyMode();
};
if (Input.newPress(Input.WEAPON6_KEY)){
character.selectWeaponBank(6);
exitSpyMode();
};
if (Input.newPress(Input.WEAPON7_KEY)){
character.selectWeaponBank(7);
exitSpyMode();
};
if (Input.newPress(Input.WEAPON8_KEY)){
character.selectWeaponBank(8);
exitSpyMode();
};
character.firing = Input.isDown(Input.FIRE_KEY);
};
if (Input.newPress(Input.REFILL_KEY)){
dispatchEvent(new ShopEvent(ShopEvent.REFILL));
};
if (Constants.TEST_MODE){
if (Input.newPress(Input.RESET_KEY)){
character.reset();
money = 100000;
};
if (Input.newPress(Input.DEBUG_KEY)){
Debug.cycle();
};
if (Input.newPress(Input.AUTOPILOT_KEY)){
autoPilot = !(autoPilot);
};
if (Input.newPress(Input.SUICIDE_KEY)){
character.hurt(99, WeaponInfo.EXPLOSION_ID, character);
};
};
}
public function getCameraPosition():Position{
if (spyMode){
spyCam.animate();
return (spyCam.renderPos);
};
if (((character) && (character.active))){
character.animate();
return (character.renderPos);
};
return (null);
}
override public function get character():PlayerCharacter{
return (_character);
}
override public function get friendly():Boolean{
return (true);
}
override public function process():void{
super.process();
}
public function clearInput():void{
if (!character){
return;
};
character.strafing = false;
if (spyMode){
spyCam.moveDir = null;
} else {
character.moveDir = null;
};
character.firing = false;
}
}
}//package boxhead.game
Section 48
//Player (boxhead.game.Player)
package boxhead.game {
import flash.events.*;
import MMOcha.server.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.security.*;
import flash.utils.*;
public class Player extends EventDispatcher {
protected var storedDeaths:StoredInt;
public var placing:int;
public var lastPing:int;// = 0
protected var storedScore:StoredInt;
protected var storedBountyPoints:StoredInt;
protected var storedBonus:StoredInt;
public var user:MMOchaUser;
protected var deployables:Array;
protected var storedMoney:StoredInt;
public var team:int;// = 0
protected var storedKills:StoredInt;
public var recordedPings:Array;
public var ping:int;// = 0
protected var storedMoneyMultiplier:StoredNumber;
public static const BLUE_TEAM:int = 2;
public static const RED_TEAM:int = 3;
public function Player(){
storedKills = new StoredInt(0);
storedDeaths = new StoredInt(0);
storedBountyPoints = new StoredInt(0);
storedScore = new StoredInt(10000);
storedMoney = new StoredInt(10000);
storedBonus = new StoredInt(0);
storedMoneyMultiplier = new StoredNumber(1);
super();
deployables = new Array();
recordedPings = new Array();
}
public function set money(_arg1:int):void{
storedMoney.value = _arg1;
}
public function set deaths(_arg1:int):void{
storedDeaths.value = _arg1;
}
public function get deaths():int{
return (storedDeaths.value);
}
public function getDeployableByID(_arg1:int):Deployable{
var _local2:Deployable;
for each (_local2 in deployables) {
if (_local2.index == _arg1){
return (_local2);
};
};
return (null);
}
public function removeCharacter():void{
if (character){
character.dispose();
};
}
public function createCharacter():void{
removeCharacter();
}
public function premiumOwned(_arg1:int):Boolean{
if (!user.premiums[_arg1]){
return (false);
};
return (user.premiums[_arg1].owned);
}
public function set mtxCash(_arg1:int):void{
user.mtxCash = _arg1;
}
public function friendlyWith(_arg1:Player):Boolean{
return ((_arg1 == this));
}
public function get score():int{
return (storedScore.value);
}
public function get mtxCash():int{
return (user.mtxCash);
}
public function get active():Boolean{
return (!((character == null)));
}
public function get name():String{
return (user.name);
}
public function get id():String{
return (user.id);
}
public function getDeployables():Array{
return (deployables.concat());
}
public function dispose():void{
}
public function get moneyMultiplier():Number{
return (storedMoneyMultiplier.value);
}
public function toggleSpyMode():void{
}
public function get character():PlayerCharacter{
return (null);
}
public function set kills(_arg1:int):void{
storedKills.value = _arg1;
}
public function set score(_arg1:int):void{
storedScore.value = _arg1;
if (character){
character.updateScoreOverhead();
};
}
public function get roundBonus():int{
return (storedBonus.value);
}
protected function applyUserSettingsToCharacter():void{
if (((!(character)) || (!(user)))){
return;
};
character.headModelIndex = user.headModelIndex;
character.headColorIndex = user.headColorIndex;
character.bodyModelIndex = user.bodyModelIndex;
character.bodyColorIndex = user.bodyColorIndex;
switch (user.gender){
case Constants.MONSTER:
character.hurtSounds = SoundList.MONSTER_HURT;
break;
case Constants.MALE:
character.hurtSounds = SoundList.MALE_HURT;
break;
case Constants.FEMALE:
character.hurtSounds = SoundList.FEMALE_HURT;
break;
};
}
public function pingSent():void{
lastPing = getTimer();
}
public function get money():int{
return (storedMoney.value);
}
public function get gender():String{
return (user.gender);
}
public function set moneyMultiplier(_arg1:Number):void{
storedMoneyMultiplier.value = _arg1;
}
public function get friendly():Boolean{
return (false);
}
public function pickupMoney(_arg1:int):int{
var _local2:int = Math.ceil((_arg1 * moneyMultiplier));
money = (money + _local2);
return (_local2);
}
public function newRound():void{
score = 10000;
money = 10000;
kills = 0;
deaths = 0;
bountyPoints = 0;
money = (money + roundBonus);
roundBonus = 0;
}
public function addDeployable(_arg1:Deployable):void{
deployables.push(_arg1);
}
public function get kills():int{
return (storedKills.value);
}
public function set bountyPoints(_arg1:int):void{
storedBountyPoints.value = _arg1;
}
public function get isLocal():Boolean{
return (true);
}
public function set roundBonus(_arg1:int):void{
storedBonus.value = _arg1;
}
public function removeDeployable(_arg1:Deployable):void{
var _local2:int = deployables.indexOf(_arg1);
if (_local2 >= 0){
deployables.splice(_local2, 1);
};
}
public function get bountyPoints():int{
return (storedBountyPoints.value);
}
protected function get CharacterClass():Class{
return (PlayerCharacter);
}
public function pingReceived():void{
var _local2:int;
recordedPings.unshift((getTimer() - lastPing));
if (recordedPings.length > 3){
recordedPings.pop();
};
var _local1:int;
for each (_local2 in recordedPings) {
_local1 = (_local1 + _local2);
};
ping = (_local1 / recordedPings.length);
}
public function process():void{
}
}
}//package boxhead.game
Section 49
//QueuedMessage (boxhead.game.QueuedMessage)
package boxhead.game {
public class QueuedMessage {
public var message:String;
public var type:String;
public var source:String;
public static const CHAT_BUNDLE:String = "Chat Bundle";
public static const PLAYER_MESSAGE:String = "Player Message";
public static const SERVER_MESSAGE:String = "Server Message";
public function QueuedMessage(_arg1:String, _arg2:String, _arg3:String){
this.type = _arg1;
this.source = _arg2;
this.message = _arg3;
}
}
}//package boxhead.game
Section 50
//QuickPlayProfile (boxhead.game.QuickPlayProfile)
package boxhead.game {
import MMOcha.server.*;
import boxhead.world.weapon.*;
public class QuickPlayProfile {
public var gender:String;
public var bodyModelIndex:int;
public var headColorIndex:int;
public var headModelIndex:int;
public var bodyColorIndex:int;
public var weaponID:int;
public var name:String;
public static const list:Array = [new QuickPlayProfile("Bambo", Constants.MALE, 1, 0, 1, 0, WeaponInfo.M16_ID), new QuickPlayProfile("Bind", Constants.MALE, 0, 0, 0, 0, WeaponInfo.AKIMBO_PISTOLS_ID)];
public function QuickPlayProfile(_arg1:String, _arg2:String, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int){
this.name = _arg1;
this.gender = _arg2;
this.headModelIndex = _arg3;
this.headColorIndex = _arg4;
this.bodyModelIndex = _arg5;
this.bodyColorIndex = _arg6;
this.weaponID = _arg7;
}
public static function generateName(_arg1:MMOchaUser):String{
var _local2:QuickPlayProfile;
for each (_local2 in list) {
if ((((((((_local2.headModelIndex == _arg1.headModelIndex)) && ((_local2.headColorIndex == _arg1.headColorIndex)))) && ((_local2.bodyModelIndex == _arg1.bodyModelIndex)))) && ((_local2.bodyColorIndex == _arg1.bodyColorIndex)))){
return (_local2.name);
};
};
return ("QuickPlay");
}
}
}//package boxhead.game
Section 51
//RemotePlayer (boxhead.game.RemotePlayer)
package boxhead.game {
import boxhead.world.thing.character.*;
public class RemotePlayer extends Player {
private var _character:RemoteCharacter;
override public function get isLocal():Boolean{
return (false);
}
override public function removeCharacter():void{
super.removeCharacter();
_character = null;
}
override public function get character():PlayerCharacter{
return (_character);
}
override public function get friendly():Boolean{
return (false);
}
override public function createCharacter():void{
super.createCharacter();
_character = new RemoteCharacter();
applyUserSettingsToCharacter();
_character.owner = this;
}
override public function process():void{
super.process();
}
}
}//package boxhead.game
Section 52
//ShopGame (boxhead.game.ShopGame)
package boxhead.game {
import flash.events.*;
import boxhead.events.*;
import MMOcha.server.*;
import boxhead.ui.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.*;
import boxhead.world.weapon.*;
import flash.display.*;
import boxhead.ui.shop.*;
import MMOcha.utils.*;
import boxhead.options.*;
import boxhead.sounds.*;
public class ShopGame extends Game {
protected var autoShopTime:int;// = 0
protected var autoSelectWeapon:Weapon;
protected var preventShopClose:Boolean;
protected var openShopButton:SimpleButton;
protected var shop:Shop;
protected static const AUTO_SHOP_DELAY:int = 3000;
public function ShopGame(_arg1:MMOchaUser, _arg2:QuickPlayProfile){
super(_arg1, _arg2);
shop = new Shop(localPlayer);
shop.addEventListener(ShopEvent.BUY, handleBuyWeapon);
shop.addEventListener(ShopEvent.REFILL, handleRefillWeapon);
shop.addEventListener(ShopEvent.UPGRADE1, handleWeaponUpgrade1);
shop.addEventListener(ShopEvent.UPGRADE2, handleWeaponUpgrade2);
shop.addEventListener(ShopEvent.CLOSE, closeShop);
openShopButton = new OpenShopButton();
openShopButton.y = 62;
openShopButton.addEventListener(MouseEvent.CLICK, handleOpenShopClick);
localPlayer.addEventListener(ShopEvent.REFILL, refillCurrentWeapon);
}
protected function handleOpenShopClick(_arg1:MouseEvent):void{
openShop();
SoundControl.playUISound(SoundList.CLICK_SHORT);
}
protected function updateShopRespawnTime():void{
if (((((shop) && (shop.parent))) && (localPlayer.localCharacter))){
shop.updateRespawnTime(Math.max(0, Math.ceil((localPlayer.localCharacter.respawnTime / 1000))), localPlayer.character.active, localPlayer.character.dead);
};
}
override protected function guiShouldBeVisible():Boolean{
if (((shop) && (shop.parent))){
return (false);
};
return (super.guiShouldBeVisible());
}
protected function handleRefillWeapon(_arg1:ShopEvent):void{
connection.sendGameMessage((("0l" + StringFunctions.padInt(_arg1.weapon.weaponID, 2)) + REFILL_ACTION));
weaponSlider.update(localPlayer.character.currentWeapon, true);
gui.setMoney(localPlayer.money);
}
override protected function newGame():void{
super.newGame();
preventShopClose = true;
}
override protected function characterDeath(_arg1:LocalCharacter, _arg2:HasOwner, _arg3:int):void{
super.characterDeath(_arg1, _arg2, _arg3);
autoShopTime = (Time.current + AUTO_SHOP_DELAY);
}
override protected function handleKeyUp(_arg1:KeyboardEvent):void{
if (currentInput == shop){
if (((!(shop.popupOpen)) && ((_arg1.keyCode == Input.ESCAPE)))){
closeShop();
};
} else {
super.handleKeyUp(_arg1);
};
}
protected function closeShop(_arg1:ShopEvent=null):void{
var _local2:LocalCharacter;
var _local3:Array;
var _local4:Weapon;
if (((((shop) && (shop.parent))) && (!(preventShopClose)))){
shop.closed();
_local2 = localPlayer.localCharacter;
_local2.preventSpawn = false;
if (!_local2.active){
_local3 = _local2.getWeaponPool();
for each (_local4 in shop.getOwnedWeapons()) {
_local2.pickupWeapon(_local4);
};
respawnLocalCharacter();
_local2.selectStartWeapon(true);
_local2.active = true;
updateScores();
};
forcePositionUpdate = true;
weaponSlider.updateWeaponList(_local2.getWeaponBanks());
_local2.updateOverheads();
updateScores();
shop.parent.removeChild(shop);
if (autoSelectWeapon){
_local2.selectWeaponByID(autoSelectWeapon.weaponID);
};
autoSelectWeapon = null;
gui.setMoney(localPlayer.money);
};
freeInput(shop);
}
protected function handleWeaponUpgrade1(_arg1:ShopEvent):void{
connection.sendGameMessage((("0l" + StringFunctions.padInt(_arg1.weapon.weaponID, 2)) + UPGRADE1_ACTION));
weaponSlider.update(localPlayer.character.currentWeapon, true);
gui.setMoney(localPlayer.money);
}
protected function handleWeaponUpgrade2(_arg1:ShopEvent):void{
connection.sendGameMessage((("0l" + StringFunctions.padInt(_arg1.weapon.weaponID, 2)) + UPGRADE2_ACTION));
weaponSlider.update(localPlayer.character.currentWeapon, true);
gui.setMoney(localPlayer.money);
}
override protected function getPremiumWeapon(_arg1:int):Weapon{
return (shop.getFreeWeaponByID(_arg1));
}
override protected function premiumsRefreshed(_arg1:ServerEvent):void{
shop.checkWeaponPremiums();
super.premiumsRefreshed(_arg1);
}
protected function refillCurrentWeapon(_arg1:ShopEvent):void{
var _local2:PlayerCharacter = localPlayer.character;
if (((!(_local2)) || (!(_local2.currentWeapon)))){
return;
};
var _local3:Weapon = _local2.currentWeapon;
if (_local2.refillTarget){
_local3 = _local2.refillTarget;
};
shop.refillWeaponByID(_local3.weaponID, true);
if (((((((!((_local3 == _local2.currentWeapon))) && (_local3))) && (_local3.ammo))) && ((_local3.ammo.count > 0)))){
_local2.selectWeaponByID(_local3.weaponID);
};
gui.setMoney(localPlayer.money);
}
protected function openShop():void{
if (((gameSummary) && (gameSummary.parent))){
return;
};
if (((!(shop)) || (shop.parent))){
return;
};
autoShopTime = 0;
addChild(shop);
captureInput(shop);
if (localPlayer.localCharacter){
localPlayer.localCharacter.preventSpawn = true;
};
updateShopGameTime();
updateShopRespawnTime();
}
override public function start(_arg1:MMOchaServer):void{
super.start(_arg1);
shop.setServer(_arg1);
}
override protected function resetUI():void{
shop.reset();
updateShopRespawnTime();
}
protected function updateShopGameTime():void{
var _local1:int = Math.max(0, (roundTime - ROUND_START_TIME));
preventShopClose = (((_local1 > 0)) && (!(Constants.TEST_MODE)));
if (((((shop) && (shop.parent))) && ((roundTime >= 0)))){
shop.setCountDown(_local1);
};
}
override public function dispose():void{
shop.removeEventListener(ShopEvent.BUY, handleBuyWeapon);
shop.removeEventListener(ShopEvent.REFILL, handleRefillWeapon);
shop.removeEventListener(ShopEvent.UPGRADE1, handleWeaponUpgrade1);
shop.removeEventListener(ShopEvent.UPGRADE2, handleWeaponUpgrade2);
shop.removeEventListener(ShopEvent.CLOSE, closeShop);
shop.dispose();
localPlayer.removeEventListener(ShopEvent.REFILL, refillCurrentWeapon);
openShopButton.removeEventListener(MouseEvent.CLICK, handleOpenShopClick);
super.dispose();
}
override protected function hideGUI():void{
super.hideGUI();
if (openShopButton.parent){
openShopButton.parent.removeChild(openShopButton);
};
}
override protected function endGame(_arg1:String):void{
if (shop){
if (shop.parent){
shop.parent.removeChild(shop);
};
freeInput(shop);
};
super.endGame(_arg1);
}
override protected function process():void{
if (Input.newPress(Input.SHOP_KEY)){
if (currentInput == shop){
closeShop();
} else {
if (currentInput == null){
openShop();
};
};
};
if (((((Preferences.autoShop) && (!((autoShopTime == 0))))) && ((Time.current >= autoShopTime)))){
autoShopTime = 0;
openShop();
};
super.process();
updateShopRespawnTime();
}
override protected function second(_arg1:TimerEvent=null):void{
super.second(_arg1);
updateShopGameTime();
}
override protected function applyQuickPlayProfile():void{
if (!quickPlayProfile){
return;
};
super.applyQuickPlayProfile();
}
override protected function applyLocalPremiums():void{
shop.checkWeaponPremiums();
super.applyLocalPremiums();
shop.updateEquipmentButtons();
shop.updateEquipmentInfo();
shop.updateWeaponButtons();
shop.updateWeaponInfo();
}
protected function handleBuyWeapon(_arg1:ShopEvent):void{
var _local2:PlayerCharacter = localPlayer.character;
var _local3:Weapon = _local2.getWeaponByID(_arg1.weapon.weaponID);
if (!_local3){
_local2.pickupWeapon(_arg1.weapon);
connection.sendGameMessage((("0l" + StringFunctions.padInt(_arg1.weapon.weaponID, 2)) + BUY_ACTION));
weaponSlider.update(localPlayer.character.currentWeapon);
autoSelectWeapon = _arg1.weapon;
};
gui.setMoney(localPlayer.money);
}
override protected function disconnected(_arg1:ServerEvent):void{
closeShop();
super.disconnected(_arg1);
}
override protected function showGUI():void{
super.showGUI();
addChild(openShopButton);
}
}
}//package boxhead.game
Section 53
//Team (boxhead.game.Team)
package boxhead.game {
import flash.geom.*;
public class Team {
public static const ENEMY_LIGHT_CT:ColorTransform = new ColorTransform(1, 0, 0, 1, 50, 0, 0, 0);
public static const ENEMY_TURRET_CT:ColorTransform = new ColorTransform(0.4, 0, 0);
public static const FRIENDLY_TURRET_CT:ColorTransform = new ColorTransform(0, 0.3, 0.3);
public static const FRIENDLY_LIGHT_CT:ColorTransform = new ColorTransform(0.2, 0.8, 0, 1, 0, 50, 0, 0);
}
}//package boxhead.game
Section 54
//Preferences (boxhead.options.Preferences)
package boxhead.options {
import flash.net.*;
public class Preferences {
public static const OFF:String = "Off";
public static const ON:String = "On";
public static const PLAYER:String = "Player Only";
public static const HIGH:String = "High";
public static const MEDIUM:String = "Medium";
public static const LOW:String = "Low";
public static var shells:Boolean;
public static var autoShop:Boolean;
public static var shake:Boolean;
public static var shadows:Boolean;
public static var volume:Number;
protected static var cookie:SharedObject;
public static var showFPS:Boolean;
public static var smoke:Boolean;
public static var footsteps:String;
public static var blood:Boolean;
public static function init(_arg1:SharedObject=null):void{
var _local2:int;
var _local3:int;
cookie = _arg1;
optionDefaults();
load();
}
public static function optionDefaults():void{
volume = 0.7;
shadows = true;
blood = true;
shells = true;
smoke = true;
shake = true;
showFPS = false;
footsteps = ON;
autoShop = true;
}
public static function load():void{
if (!cookie){
return;
};
if (!cookie.data.preferences){
return;
};
var _local1:Object = cookie.data.preferences;
if (_local1.volume != undefined){
volume = _local1.volume;
};
if (_local1.shadows != undefined){
shadows = _local1.shadows;
};
if (_local1.blood != undefined){
blood = _local1.blood;
};
if (_local1.shells != undefined){
shells = _local1.shells;
};
if (_local1.smoke != undefined){
smoke = _local1.smoke;
};
if (_local1.shake != undefined){
shake = _local1.shake;
};
if (_local1.showFPS != undefined){
showFPS = _local1.showFPS;
};
if (_local1.footsteps != undefined){
footsteps = _local1.footsteps;
};
if (_local1.autoShop != undefined){
autoShop = _local1.autoShop;
};
}
public static function save():void{
if (!cookie){
return;
};
var _local1:Object = (cookie.data.preferences = new Object());
_local1.volume = volume;
_local1.shadows = shadows;
_local1.blood = blood;
_local1.shells = shells;
_local1.smoke = smoke;
_local1.shake = shake;
_local1.showFPS = showFPS;
_local1.footsteps = footsteps;
_local1.autoShop = autoShop;
cookie.flush();
}
}
}//package boxhead.options
Section 55
//Cheat (boxhead.security.Cheat)
package boxhead.security {
import flash.events.*;
import boxhead.events.*;
public class Cheat {
public static const notifier:EventDispatcher = new EventDispatcher();
public static function found():void{
Debug.output("Cheat found");
notifier.dispatchEvent(new ScreenEvent(ScreenEvent.CHEAT));
}
}
}//package boxhead.security
Section 56
//IntUtil (boxhead.security.IntUtil)
package boxhead.security {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package boxhead.security
Section 57
//MD5 (boxhead.security.MD5)
package boxhead.security {
import flash.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package boxhead.security
Section 58
//StoredInt (boxhead.security.StoredInt)
package boxhead.security {
public class StoredInt {
protected var o1:int;
protected var o2:int;
protected var m1:int;
protected var m2:int;
protected var stored1:int;
protected var stored2:int;
public function StoredInt(_arg1:int=0){
o1 = randomize();
m1 = randomize();
o2 = randomize();
m2 = randomize();
value = _arg1;
}
public function set value(_arg1:int):void{
stored1 = ((_arg1 * m1) + o1);
stored2 = ((_arg1 * m2) + o2);
}
protected function randomize():int{
var _local1:int = int((3 + (Math.random() * 20)));
if (Math.random() > 0.5){
return (_local1);
};
return (-(_local1));
}
public function get value():int{
var _local1:int = (Math.round((stored1 - o1)) / m1);
var _local2:int = (Math.round((stored2 - o2)) / m2);
if (_local1 != _local2){
Cheat.found();
};
return (_local1);
}
}
}//package boxhead.security
Section 59
//StoredNumber (boxhead.security.StoredNumber)
package boxhead.security {
public class StoredNumber {
protected var o1:int;
protected var o2:int;
protected var m1:int;
protected var m2:int;
protected var stored1:int;
protected var stored2:int;
public static const MIN_VALUE:Number = 0;
public static const RESOLUTION:int = 0x0800;
public function StoredNumber(_arg1:Number=0){
o1 = randomize();
m1 = randomize();
o2 = randomize();
m2 = randomize();
value = _arg1;
}
public function set value(_arg1:Number):void{
var _local2:int = int((_arg1 * RESOLUTION));
stored1 = ((_local2 * m1) + o1);
stored2 = ((_local2 * m2) + o2);
}
protected function randomize():int{
var _local1:int = int((3 + (Math.random() * 20)));
if (Math.random() > 0.5){
return (_local1);
};
return (-(_local1));
}
public function get value():Number{
var _local1:int = (Math.round((stored1 - o1)) / m1);
var _local2:int = (Math.round((stored2 - o2)) / m2);
if (_local1 != _local2){
Cheat.found();
};
return ((_local1 / RESOLUTION));
}
}
}//package boxhead.security
Section 60
//VersionCheck (boxhead.security.VersionCheck)
package boxhead.security {
import flash.events.*;
import flash.net.*;
public class VersionCheck extends EventDispatcher {
protected var version:int;
protected var loader:URLLoader;
protected function handleIOError(_arg1:IOErrorEvent):void{
loader.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
loader.removeEventListener(Event.COMPLETE, handleResult);
Debug.error("IO Error");
dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, "Could not complete version check"));
}
protected function handleResult(_arg1:Event):void{
var _local2:String;
loader.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
loader.removeEventListener(Event.COMPLETE, handleResult);
if (loader.data == "result=success"){
dispatchEvent(new Event(Event.COMPLETE));
} else {
_local2 = (("Version " + versionString(version)) + " is out of date");
Debug.error(_local2);
dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, _local2));
};
}
public function check(_arg1:int):void{
var url:URLRequest;
var variables:URLVariables;
var version = _arg1;
this.version = version;
try {
url = new URLRequest("http://api.xgenstudios.com/xgen.boxhead.lite.version.php");
url.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.ver = version;
url.data = variables;
loader = new URLLoader(url);
loader.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
loader.addEventListener(Event.COMPLETE, handleResult);
} catch(error:Error) {
Debug.error("Error checking version");
dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, "Error checking version"));
};
}
public static function versionString(_arg1:int):String{
var _local2:String = ("" + _arg1);
while (_local2.length < 3) {
_local2 = (_local2 + "0");
};
return (((_local2.charAt(0) + ".") + _local2.substr(1)));
}
}
}//package boxhead.security
Section 61
//XGenAPIFunctions (boxhead.security.XGenAPIFunctions)
package boxhead.security {
import flash.net.*;
import flash.display.*;
public class XGenAPIFunctions {
public static function APIGameLogin(_arg1:String, _arg2:String, _arg3:Function, _arg4:DisplayObject):void{
var _local5:String = MD5.hash(_arg2);
var _local6 = (((("javascript:GameLogin('" + _arg1) + "','") + _local5) + "');");
Debug.output("JS URL:", _local6);
navigateToURL(new URLRequest(_local6), "_self");
_arg3(true);
}
}
}//package boxhead.security
Section 62
//AreaSound (boxhead.sounds.AreaSound)
package boxhead.sounds {
import flash.events.*;
import boxhead.world.*;
import flash.media.*;
import boxhead.options.*;
public class AreaSound {
protected var channel:SoundChannel;
protected var position:Position;
public var complete:Boolean;// = false
protected var source:Sound;
protected var looping:Boolean;
protected static const VOLUME_RANGE:Number = 10;
protected static const PAN_RANGE:Number = 5;
protected static const VOLUME_MIN:Number = 0.25;
public function AreaSound(_arg1:Sound, _arg2:Position, _arg3:Boolean=false, _arg4:Boolean=true){
source = _arg1;
this.position = _arg2;
this.looping = _arg3;
if (_arg4){
begin();
};
}
public function stop():void{
if (channel){
channel.stop();
channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
};
complete = true;
}
protected function soundComplete(_arg1:Event):void{
channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
complete = true;
}
public function begin():void{
if (complete){
return;
};
if (looping){
channel = source.play(0, int.MAX_VALUE);
} else {
channel = source.play();
};
if (channel){
complete = false;
channel.addEventListener(Event.SOUND_COMPLETE, soundComplete, false, 0, true);
} else {
complete = true;
};
}
public function basedOn(_arg1:Sound):Boolean{
return ((source == _arg1));
}
public function reposition(_arg1:Position):void{
position.x = _arg1.x;
position.y = _arg1.y;
}
public function restart():void{
stop();
channel = source.play();
if (channel){
complete = false;
channel.addEventListener(Event.SOUND_COMPLETE, soundComplete, false, 0, true);
} else {
complete = true;
};
}
public function update(_arg1:Position):void{
var _local2:Number = Position.distance(position, _arg1);
var _local3:Number = (((VOLUME_MIN + (Math.max(0, Math.min(1, ((VOLUME_RANGE - _local2) / VOLUME_RANGE))) * (1 - VOLUME_MIN))) * SoundControl.GAME_VOLUME) * Preferences.volume);
var _local4:Number = Math.max(-1, Math.min(1, ((position.x - _arg1.x) / PAN_RANGE)));
channel.soundTransform = new SoundTransform(_local3, _local4);
}
}
}//package boxhead.sounds
Section 63
//DelayedSound (boxhead.sounds.DelayedSound)
package boxhead.sounds {
import flash.media.*;
public class DelayedSound {
public var areaSound:AreaSound;
public var startTime:int;
public var sound:Sound;
public function DelayedSound(_arg1:int, _arg2:AreaSound, _arg3:Sound){
this.startTime = _arg1;
this.areaSound = _arg2;
this.sound = _arg3;
}
}
}//package boxhead.sounds
Section 64
//SoundControl (boxhead.sounds.SoundControl)
package boxhead.sounds {
import flash.events.*;
import boxhead.world.*;
import flash.media.*;
import flash.utils.*;
import boxhead.options.*;
public class SoundControl {
protected static const FADE_STEPS:int = 10;
protected static var delayedSounds:Array = new Array();
public static var GAME_VOLUME:Number = 0.7;
public static var MUSIC_VOLUME:Number = 0.7;
protected static var focus:Position = new Position(0, 0);
protected static var musicChannel:SoundChannel;
public static var UI_VOLUME:Number = 0.7;
protected static var musicSound:Sound;
protected static var areaSounds:Array = new Array();
protected static var musicFadeRemaining:int = 0;
protected static function handleMusicFade(_arg1:TimerEvent):void{
if (musicFadeRemaining == 0){
_arg1.target.removeEventListener(TimerEvent.TIMER, handleMusicFade);
return;
};
musicFadeRemaining--;
if (musicFadeRemaining == 0){
_arg1.target.removeEventListener(TimerEvent.TIMER, handleMusicFade);
stopMusic();
} else {
musicChannel.soundTransform = new SoundTransform((((MUSIC_VOLUME * Preferences.volume) * musicFadeRemaining) / FADE_STEPS));
};
}
public static function updateVolume():void{
if (musicChannel){
if (musicFadeRemaining > 0){
musicChannel.soundTransform = new SoundTransform((((MUSIC_VOLUME * Preferences.volume) * musicFadeRemaining) / FADE_STEPS));
} else {
musicChannel.soundTransform = new SoundTransform((MUSIC_VOLUME * Preferences.volume));
};
};
}
public static function fadeMusic(_arg1:int=300):void{
musicFadeRemaining = FADE_STEPS;
var _local2:Timer = new Timer((_arg1 / FADE_STEPS));
_local2.addEventListener(TimerEvent.TIMER, handleMusicFade, false, 0, true);
_local2.start();
}
public static function stopAllAreaSounds():void{
var _local1:AreaSound;
while (areaSounds.length > 0) {
_local1 = areaSounds.pop();
_local1.stop();
};
while (delayedSounds.length > 0) {
delayedSounds.pop();
};
}
public static function playMusic(_arg1:Sound, _arg2:int=0):void{
var _local3:Timer;
var _local4:SoundTransform;
stopMusic();
musicSound = _arg1;
if (!musicSound){
return;
};
if (_arg2){
_local3 = new Timer(_arg2, 1);
_local3.addEventListener(TimerEvent.TIMER_COMPLETE, handleMusicDelay, false, 0, true);
_local3.start();
} else {
_local4 = new SoundTransform((MUSIC_VOLUME * Preferences.volume));
musicChannel = _arg1.play(0, int.MAX_VALUE, _local4);
};
}
public static function stopMusic():void{
musicSound = null;
if (musicChannel){
musicChannel.stop();
};
musicChannel = null;
musicFadeRemaining = 0;
}
public static function setFocus(_arg1:Position):void{
focus.x = _arg1.x;
focus.y = _arg1.y;
}
public static function stopAreaSound(_arg1:Sound):void{
var _local2:int;
var _local3:AreaSound;
var _local4:DelayedSound;
_local2 = (areaSounds.length - 1);
while (_local2 >= 0) {
_local3 = areaSounds[_local2];
if (_local3.basedOn(_arg1)){
_local3.stop();
areaSounds[_local2] = areaSounds[(areaSounds.length - 1)];
areaSounds.pop();
};
_local2--;
};
_local2 = (delayedSounds.length - 1);
while (_local2 >= 0) {
_local4 = delayedSounds[_local2];
if (_local4.sound == _arg1){
delayedSounds.splice(_local2, 1);
};
_local2--;
};
}
public static function playDelayedAreaSound(_arg1:Sound, _arg2:Position, _arg3:int, _arg4:Boolean=false):AreaSound{
var _local5:AreaSound = new AreaSound(_arg1, _arg2, _arg4, false);
delayedSounds.push(new DelayedSound((Time.current + _arg3), _local5, _arg1));
return (_local5);
}
protected static function handleMusicDelay(_arg1:TimerEvent):void{
_arg1.target.removeEventListener(TimerEvent.TIMER_COMPLETE, handleMusicDelay);
playMusic(musicSound);
}
public static function playUISound(_arg1:Sound):void{
var _local2:SoundTransform = new SoundTransform((UI_VOLUME * Preferences.volume));
var _local3:SoundChannel = _arg1.play(0, 0, _local2);
}
public static function playAreaSound(_arg1:Sound, _arg2:Position, _arg3:Boolean=false):AreaSound{
var _local4:AreaSound = new AreaSound(_arg1, _arg2, _arg3);
if (!_local4.complete){
areaSounds.push(_local4);
_local4.update(focus);
};
return (_local4);
}
public static function process():void{
var _local1:int;
var _local2:AreaSound;
var _local4:DelayedSound;
_local1 = (areaSounds.length - 1);
while (_local1 >= 0) {
_local2 = areaSounds[_local1];
if (_local2.complete){
areaSounds[_local1] = areaSounds[(areaSounds.length - 1)];
areaSounds.pop();
} else {
_local2.update(focus);
};
_local1--;
};
var _local3:int = Time.current;
_local1 = (delayedSounds.length - 1);
while (_local1 >= 0) {
_local4 = delayedSounds[_local1];
if (_local3 >= _local4.startTime){
_local2 = _local4.areaSound;
if (!_local2.complete){
_local2.begin();
if (!_local2.complete){
areaSounds.push(_local2);
_local2.update(focus);
};
};
delayedSounds.splice(_local1, 1);
};
_local1--;
};
}
}
}//package boxhead.sounds
Section 65
//SoundList (boxhead.sounds.SoundList)
package boxhead.sounds {
import flash.media.*;
public class SoundList {
public static const TURRET_MG_SHOT1:Sound = (new Turret_MG_Shot_1() as Sound);
protected static const S_PlasmaCannonFire01:Sound = (new PlasmaCannonFire01() as Sound);
protected static const S_PlasmaCannonFire02:Sound = (new PlasmaCannonFire02() as Sound);
public static const CHANGE_WEAPON1:Sound = (new ChangeWeapon1() as Sound);
public static const CHANGE_WEAPON2:Sound = (new ChangeWeapon2() as Sound);
public static const CHANGE_WEAPON3:Sound = (new ChangeWeapon3() as Sound);
public static const CHANGE_WEAPON4:Sound = (new ChangeWeapon4() as Sound);
public static const CHANGE_WEAPON5:Sound = (new ChangeWeapon5() as Sound);
public static const CHANGE_WEAPON6:Sound = (new ChangeWeapon6() as Sound);
public static const CHANGE_WEAPON7:Sound = (new ChangeWeapon7() as Sound);
public static const SATELLITE_START:Sound = (new SatelliteStart() as Sound);
public static const FLAMER_END:Sound = (new FlamerEnd() as Sound);
public static const TURRET_MG_SHOT2:Sound = (new Turret_MG_Shot_2() as Sound);
public static const TURRET_MG_SHOT3:Sound = (new Turret_MG_Shot_3() as Sound);
public static const RIFLE_FIRE_LIST:Array = [S_RifleFire01, S_RifleFire02, S_RifleFire03];
protected static const S_PlasmaCannonFire03:Sound = (new PlasmaCannonFire03() as Sound);
public static const PISTOL_FIRE_LIST:Array = [S_PistolFire01, S_PistolFire02, S_PistolFire03];
public static const M16_FIRE_LIST:Array = [S_M16Fire01, S_M16Fire02, S_M16Fire03];
public static const PLASMA_CANNON_HIT:Sound = (new PlasmaCannonHit() as Sound);
protected static const S_GrenadeLauncherFire01:Sound = (new GrenadeLauncherFire01() as Sound);
protected static const S_GrenadeLauncherFire02:Sound = (new GrenadeLauncherFire02() as Sound);
protected static const S_GrenadeLauncherFire03:Sound = (new GrenadeLauncherFire03() as Sound);
public static const EXPLOSION_ARTILLERY:Sound = (new ExplosionArtillery() as Sound);
public static const CANT_AFFORD:Sound = (new CantAfford() as Sound);
public static const GRENADE_PULL_PIN:Sound = (new GrenadePullPin() as Sound);
protected static const S_AK47Fire01:Sound = (new AK47Fire01() as Sound);
protected static const S_AK47Fire02:Sound = (new AK47Fire02() as Sound);
protected static const S_AK47Fire03:Sound = (new AK47Fire03() as Sound);
public static const UZI_FIRE_LIST:Array = [S_UziFire01, S_UziFire02, S_UziFire03];
public static const TURRET_PLACE:Sound = (new Turret_Place() as Sound);
public static const END_ROUND:Sound = (new EndRound() as Sound);
public static const FOOTSTEPS_GRASS_L:Array = [new FootstepGrass1L(), new FootstepGrass2L(), new FootstepGrass3L()];
public static const FOOTSTEPS_GRASS_R:Array = [new FootstepGrass1R(), new FootstepGrass2R(), new FootstepGrass3R()];
public static const KA_CHING:Sound = (new Ka_ching() as Sound);
public static const MINIGUN_STOP:Sound = (new Minigun_Stop() as Sound);
public static const MAGNUM_FIRE_LIST:Array = [S_MagnumFire01, S_MagnumFire02, S_MagnumFire03];
public static const FEMALE_HURT:Array = [new FemaleHurtA1(), new FemaleHurtA2(), new FemaleHurtA3(), new FemaleHurtB1(), new FemaleHurtB2(), new FemaleHurtB3(), new FemaleHurtC1(), new FemaleHurtC2(), new FemaleHurtC3(), new FemaleHurtD1(), new FemaleHurtD2(), new FemaleHurtD3()];
protected static const S_UziFire01:Sound = (new UziFire01() as Sound);
protected static const S_UziFire02:Sound = (new UziFire02() as Sound);
protected static const S_UziFire03:Sound = (new UziFire03() as Sound);
public static const CHARGE_PACK_EXPLOSION:Sound = (new ChargePackExplosion() as Sound);
public static const TITLE_MUSIC:Sound = (new TitleScreenMusic() as Sound);
public static const PISTOL_RELOAD:Sound = (new PistolReload() as Sound);
public static const AIRSTRIKE:Sound = (new Airstrike() as Sound);
public static const UZI_RELOAD_LEFT:Sound = (new UziReloadLeft() as Sound);
public static const MONSTER_HURT:Array = [new MonsterHurtA1(), new MonsterHurtA2(), new MonsterHurtA3(), new MonsterHurtB1(), new MonsterHurtB2(), new MonsterHurtB3(), new MonsterHurtC1(), new MonsterHurtC2(), new MonsterHurtC3(), new MonsterHurtD1(), new MonsterHurtD2(), new MonsterHurtD3()];
public static const CHANGE_WEAPON:Sound = (new ChangeWeaponTone() as Sound);
protected static const S_RifleFire01:Sound = (new RifleFire01() as Sound);
protected static const S_RifleFire02:Sound = (new RifleFire02() as Sound);
protected static const S_RifleFire03:Sound = (new RifleFire03() as Sound);
public static const TURRET_MORTAR_SHOT:Sound = (new Turret_Mortar_Shot() as Sound);
public static const PLASMA_CANNON_FIRE_LIST:Array = [S_PlasmaCannonFire01, S_PlasmaCannonFire02, S_PlasmaCannonFire03];
public static const SHOGUN_RELOAD:Sound = (new ShotgunReload() as Sound);
public static const GAME_START:Sound = (new GameStart() as Sound);
public static const FOOTSTEPS_CONCRETE_L:Array = [new FootstepConcrete1L(), new FootstepConcrete2L(), new FootstepConcrete3L()];
protected static const S_RailgunFire01:Sound = (new RailgunFire01() as Sound);
protected static const S_RailgunFire02:Sound = (new RailgunFire02() as Sound);
protected static const S_RailgunFire03:Sound = (new RailgunFire03() as Sound);
public static const FOOTSTEPS_CONCRETE_R:Array = [new FootstepConcrete1R(), new FootstepConcrete2R(), new FootstepConcrete3R()];
public static const EXPLOSION_HUGE:Sound = (new ExplosionHuge() as Sound);
public static const CHARACTER_RESPAWN:Sound = (new CharacterRespawn() as Sound);
public static const GRENADE_LAUNCHER_FIRE_LIST:Array = [S_GrenadeLauncherFire01, S_GrenadeLauncherFire02, S_GrenadeLauncherFire03];
public static const CLAYMORE_ACTIVATE:Sound = (new ClaymoreActivate() as Sound);
public static const EXPLOSION_GRENADE:Sound = (new ExplosionGrenade() as Sound);
public static const AK47_RELOAD:Sound = (new AK47Reload() as Sound);
public static const UZI_RELOAD_RIGHT:Sound = (new UziReloadRight() as Sound);
public static const CLAYMORE_PLANT:Sound = (new ClaymorePlant() as Sound);
public static const MAGNUM_RELOAD:Sound = (new MagnumReload() as Sound);
public static const GRENADE_LAUNCHER_RELOAD:Sound = (new GrenadeLauncherReload() as Sound);
public static const CHARGE_PACK_ACTIVATE:Sound = (new ChargePackActivate() as Sound);
public static const EXPLOSION_ELECTRICITY_SHOCKWAVE:Sound = (new ExplosionElectricityShockwave() as Sound);
public static const RAILGUN_FIRE_LIST:Array = [S_RailgunFire01, S_RailgunFire02, S_RailgunFire03];
protected static const S_MagnumFire01:Sound = (new MagnumFire01() as Sound);
protected static const S_MagnumFire02:Sound = (new MagnumFire02() as Sound);
protected static const S_MagnumFire03:Sound = (new MagnumFire03() as Sound);
public static const OFFSCREEN_CHAT:Sound = CHARACTER_RESPAWN;
public static const RAILGUN_RELOAD:Sound = (new RailgunReload() as Sound);
public static const GRENADE_BOUNCE:Sound = (new Grenade_Bounce() as Sound);
public static const CLICK_SHORT:Sound = (new ClickShort() as Sound);
public static const PLASMA_CANNON_RELOAD:Sound = (new PlasmaCannonReload() as Sound);
public static const CORPSE_THUD:Sound = (new CorpseThud() as Sound);
public static const FOOTSTEPS_WOOD_L:Array = [new FootstepWood1L(), new FootstepWood2L(), new FootstepWood3L()];
public static const BARRICADE_PLACE:Sound = BARREL_PLACE;
public static const CLICK_LONG:Sound = (new ClickLong() as Sound);
public static const EXPLOSION:Sound = (new Explosion_0() as Sound);
public static const MALE_HURT:Array = [new MaleHurtA1(), new MaleHurtA2(), new MaleHurtA3(), new MaleHurtB1(), new MaleHurtB2(), new MaleHurtB3(), new MaleHurtC1(), new MaleHurtC2(), new MaleHurtC3(), new MaleHurtD1(), new MaleHurtD2(), new MaleHurtD3()];
public static const RIFLE_RELOAD:Sound = (new RifleReload() as Sound);
public static const FOOTSTEPS_WOOD_R:Array = [new FootstepWood1R(), new FootstepWood2R(), new FootstepWood3R()];
public static const BARREL_PLACE:Sound = (new Barrel_Place() as Sound);
public static const CHARGE_PACK_PLANT:Sound = (new ChargePackPlant() as Sound);
public static const CLAYMORE_EXPLOSION:Sound = (new ClaymoreExplosion() as Sound);
public static const M16_RELOAD:Sound = (new M16Reload() as Sound);
public static const SATELLITE_LOOP:Sound = (new SatelliteLoop() as Sound);
protected static const S_ShotgunFire01:Sound = (new ShotgunFire01() as Sound);
protected static const S_ShotgunFire03:Sound = (new ShotgunFire03() as Sound);
public static const FOOTSTEPS_GRAVEL_R:Array = [new FootstepGravel1R(), new FootstepGravel2R(), new FootstepGravel3R()];
protected static const S_ShotgunFire02:Sound = (new ShotgunFire02() as Sound);
public static const FOOTSTEPS_GRAVEL_L:Array = [new FootstepGravel1L(), new FootstepGravel2L(), new FootstepGravel3L()];
public static const AK47_FIRE_LIST:Array = [S_AK47Fire01, S_AK47Fire02, S_AK47Fire03];
public static const PRE_DEPLOY_HEAVY:Sound = (new PreDeployHeavy() as Sound);
public static const SATELLITE_END:Sound = (new SatelliteEnd() as Sound);
protected static const S_PistolFire01:Sound = (new PistolFire01() as Sound);
protected static const S_PistolFire02:Sound = (new PistolFire02() as Sound);
protected static const S_PistolFire03:Sound = (new PistolFire03() as Sound);
protected static const S_M16Fire01:Sound = (new M16Fire01() as Sound);
protected static const S_M16Fire02:Sound = (new M16Fire02() as Sound);
protected static const S_M16Fire03:Sound = (new M16Fire03() as Sound);
public static const FLAMER_START:Sound = (new FlamerStart() as Sound);
public static const EXPLOSION_FIERY:Sound = (new ExplosionFiery() as Sound);
public static const PRE_DEPLOY_LIGHT:Sound = (new PreDeployLight() as Sound);
public static const SHOTGUN_FIRE_LIST:Array = [S_ShotgunFire01, S_ShotgunFire02, S_ShotgunFire03];
private static var ClickLong:Class = SoundList_ClickLong;
private static var AK47Reload:Class = SoundList_AK47Reload;
private static var SatelliteStart:Class = SoundList_SatelliteStart;
private static var GrenadePullPin:Class = SoundList_GrenadePullPin;
private static var ClaymoreActivate:Class = SoundList_ClaymoreActivate;
private static var M16Fire01:Class = SoundList_M16Fire01;
private static var M16Fire02:Class = SoundList_M16Fire02;
private static var M16Fire03:Class = SoundList_M16Fire03;
private static var PlasmaCannonFire01:Class = SoundList_PlasmaCannonFire01;
private static var PlasmaCannonFire02:Class = SoundList_PlasmaCannonFire02;
private static var PlasmaCannonFire03:Class = SoundList_PlasmaCannonFire03;
private static var ExplosionGrenade:Class = SoundList_ExplosionGrenade;
private static var FlamerEnd:Class = SoundList_FlamerEnd;
private static var RailgunFire01:Class = SoundList_RailgunFire01;
private static var RailgunFire02:Class = SoundList_RailgunFire02;
private static var RailgunFire03:Class = SoundList_RailgunFire03;
private static var FootstepGrass1L:Class = SoundList_FootstepGrass1L;
private static var MonsterHurtA2:Class = SoundList_MonsterHurtA2;
private static var MonsterHurtA3:Class = SoundList_MonsterHurtA3;
private static var FootstepGrass1R:Class = SoundList_FootstepGrass1R;
private static var MonsterHurtA1:Class = SoundList_MonsterHurtA1;
private static var FootstepGrass2L:Class = SoundList_FootstepGrass2L;
private static var MonsterHurtB2:Class = SoundList_MonsterHurtB2;
private static var MonsterHurtB3:Class = SoundList_MonsterHurtB3;
private static var FootstepGrass2R:Class = SoundList_FootstepGrass2R;
private static var MonsterHurtB1:Class = SoundList_MonsterHurtB1;
private static var MaleHurtA2:Class = SoundList_MaleHurtA2;
private static var MagnumReload:Class = SoundList_MagnumReload;
private static var MaleHurtA3:Class = SoundList_MaleHurtA3;
private static var MonsterHurtC1:Class = SoundList_MonsterHurtC1;
private static var Turret_Place:Class = SoundList_Turret_Place;
private static var MonsterHurtC3:Class = SoundList_MonsterHurtC3;
private static var MaleHurtA1:Class = SoundList_MaleHurtA1;
private static var FootstepGrass3L:Class = SoundList_FootstepGrass3L;
private static var MonsterHurtC2:Class = SoundList_MonsterHurtC2;
private static var FootstepGrass3R:Class = SoundList_FootstepGrass3R;
private static var MaleHurtB1:Class = SoundList_MaleHurtB1;
private static var MaleHurtB2:Class = SoundList_MaleHurtB2;
private static var MaleHurtB3:Class = SoundList_MaleHurtB3;
private static var MonsterHurtD2:Class = SoundList_MonsterHurtD2;
private static var MonsterHurtD1:Class = SoundList_MonsterHurtD1;
private static var ShotgunReload:Class = SoundList_ShotgunReload;
private static var MonsterHurtD3:Class = SoundList_MonsterHurtD3;
private static var MaleHurtC1:Class = SoundList_MaleHurtC1;
private static var MaleHurtC2:Class = SoundList_MaleHurtC2;
private static var MaleHurtC3:Class = SoundList_MaleHurtC3;
private static var Minigun_Stop:Class = SoundList_Minigun_Stop;
private static var AK47Fire01:Class = SoundList_AK47Fire01;
private static var AK47Fire02:Class = SoundList_AK47Fire02;
private static var AK47Fire03:Class = SoundList_AK47Fire03;
private static var MaleHurtD1:Class = SoundList_MaleHurtD1;
private static var MaleHurtD3:Class = SoundList_MaleHurtD3;
private static var MaleHurtD2:Class = SoundList_MaleHurtD2;
private static var Ka_ching:Class = SoundList_Ka_ching;
private static var Airstrike:Class = SoundList_Airstrike;
private static var Explosion_0:Class = SoundList_Explosion_0;
private static var EndRound:Class = SoundList_EndRound;
private static var PreDeployHeavy:Class = SoundList_PreDeployHeavy;
private static var ChangeWeaponTone:Class = SoundList_ChangeWeaponTone;
private static var CorpseThud:Class = SoundList_CorpseThud;
private static var SatelliteEnd:Class = SoundList_SatelliteEnd;
private static var Turret_Mortar_Shot:Class = SoundList_Turret_Mortar_Shot;
private static var ExplosionArtillery:Class = SoundList_ExplosionArtillery;
private static var CharacterRespawn:Class = SoundList_CharacterRespawn;
private static var PreDeployLight:Class = SoundList_PreDeployLight;
private static var FootstepGravel1L:Class = SoundList_FootstepGravel1L;
private static var MagnumFire01:Class = SoundList_MagnumFire01;
private static var MagnumFire02:Class = SoundList_MagnumFire02;
private static var MagnumFire03:Class = SoundList_MagnumFire03;
private static var PistolReload:Class = SoundList_PistolReload;
private static var FootstepGravel1R:Class = SoundList_FootstepGravel1R;
private static var PlasmaCannonHit:Class = SoundList_PlasmaCannonHit;
private static var UziFire01:Class = SoundList_UziFire01;
private static var UziFire02:Class = SoundList_UziFire02;
private static var UziFire03:Class = SoundList_UziFire03;
private static var FootstepGravel2R:Class = SoundList_FootstepGravel2R;
private static var Turret_MG_Shot_1:Class = SoundList_Turret_MG_Shot_1;
private static var Turret_MG_Shot_2:Class = SoundList_Turret_MG_Shot_2;
private static var Turret_MG_Shot_3:Class = SoundList_Turret_MG_Shot_3;
private static var GrenadeLauncherReload:Class = SoundList_GrenadeLauncherReload;
private static var FootstepGravel2L:Class = SoundList_FootstepGravel2L;
private static var FootstepGravel3L:Class = SoundList_FootstepGravel3L;
private static var ShotgunFire01:Class = SoundList_ShotgunFire01;
private static var ShotgunFire02:Class = SoundList_ShotgunFire02;
private static var ShotgunFire03:Class = SoundList_ShotgunFire03;
private static var FootstepGravel3R:Class = SoundList_FootstepGravel3R;
private static var CantAfford:Class = SoundList_CantAfford;
private static var ClaymoreExplosion:Class = SoundList_ClaymoreExplosion;
private static var RifleReload:Class = SoundList_RifleReload;
private static var SatelliteLoop:Class = SoundList_SatelliteLoop;
private static var ChargePackExplosion:Class = SoundList_ChargePackExplosion;
private static var FootstepWood1L:Class = SoundList_FootstepWood1L;
private static var UziReloadLeft:Class = SoundList_UziReloadLeft;
private static var FootstepWood1R:Class = SoundList_FootstepWood1R;
private static var ClaymorePlant:Class = SoundList_ClaymorePlant;
private static var FootstepWood2L:Class = SoundList_FootstepWood2L;
private static var FootstepWood2R:Class = SoundList_FootstepWood2R;
private static var Grenade_Bounce:Class = SoundList_Grenade_Bounce;
private static var FootstepWood3L:Class = SoundList_FootstepWood3L;
private static var FemaleHurtA1:Class = SoundList_FemaleHurtA1;
private static var FemaleHurtA2:Class = SoundList_FemaleHurtA2;
private static var FemaleHurtA3:Class = SoundList_FemaleHurtA3;
private static var FlamerLoop:Class = SoundList_FlamerLoop;
private static var FootstepWood3R:Class = SoundList_FootstepWood3R;
private static var FemaleHurtB1:Class = SoundList_FemaleHurtB1;
private static var FemaleHurtB2:Class = SoundList_FemaleHurtB2;
private static var FemaleHurtB3:Class = SoundList_FemaleHurtB3;
private static var UziReloadRight:Class = SoundList_UziReloadRight;
private static var ChargePackActivate:Class = SoundList_ChargePackActivate;
private static var FemaleHurtC1:Class = SoundList_FemaleHurtC1;
private static var FemaleHurtC3:Class = SoundList_FemaleHurtC3;
private static var PistolFire01:Class = SoundList_PistolFire01;
private static var PistolFire02:Class = SoundList_PistolFire02;
private static var PistolFire03:Class = SoundList_PistolFire03;
private static var Barrel_Place:Class = SoundList_Barrel_Place;
private static var FemaleHurtC2:Class = SoundList_FemaleHurtC2;
private static var ExplosionHuge:Class = SoundList_ExplosionHuge;
private static var GrenadeLauncherFire01:Class = SoundList_GrenadeLauncherFire01;
private static var GrenadeLauncherFire03:Class = SoundList_GrenadeLauncherFire03;
private static var FemaleHurtD2:Class = SoundList_FemaleHurtD2;
private static var GrenadeLauncherFire02:Class = SoundList_GrenadeLauncherFire02;
private static var FemaleHurtD1:Class = SoundList_FemaleHurtD1;
private static var ChargePackPlant:Class = SoundList_ChargePackPlant;
private static var FemaleHurtD3:Class = SoundList_FemaleHurtD3;
private static var M16Reload:Class = SoundList_M16Reload;
private static var GameStart:Class = SoundList_GameStart;
private static var PlasmaCannonReload:Class = SoundList_PlasmaCannonReload;
private static var FootstepConcrete1L:Class = SoundList_FootstepConcrete1L;
private static var RifleFire01:Class = SoundList_RifleFire01;
private static var RifleFire02:Class = SoundList_RifleFire02;
private static var RifleFire03:Class = SoundList_RifleFire03;
private static var RailgunReload:Class = SoundList_RailgunReload;
private static var FootstepConcrete1R:Class = SoundList_FootstepConcrete1R;
private static var FootstepConcrete2L:Class = SoundList_FootstepConcrete2L;
private static var ChangeWeapon1:Class = SoundList_ChangeWeapon1;
private static var ChangeWeapon2:Class = SoundList_ChangeWeapon2;
private static var ChangeWeapon3:Class = SoundList_ChangeWeapon3;
private static var ChangeWeapon4:Class = SoundList_ChangeWeapon4;
private static var ChangeWeapon5:Class = SoundList_ChangeWeapon5;
private static var ChangeWeapon6:Class = SoundList_ChangeWeapon6;
private static var ChangeWeapon7:Class = SoundList_ChangeWeapon7;
private static var FootstepConcrete2R:Class = SoundList_FootstepConcrete2R;
private static var ExplosionElectricityShockwave:Class = SoundList_ExplosionElectricityShockwave;
private static var TitleScreenMusic:Class = SoundList_TitleScreenMusic;
private static var FootstepConcrete3L:Class = SoundList_FootstepConcrete3L;
private static var FootstepConcrete3R:Class = SoundList_FootstepConcrete3R;
private static var ExplosionFiery:Class = SoundList_ExplosionFiery;
private static var Minigun_Loop:Class = SoundList_Minigun_Loop;
private static var FlamerStart:Class = SoundList_FlamerStart;
private static var ClickShort:Class = SoundList_ClickShort;
public static function get FLAMER_LOOP():Sound{
return ((new FlamerLoop() as Sound));
}
public static function get MINIGUN_LOOP():Sound{
return ((new Minigun_Loop() as Sound));
}
}
}//package boxhead.sounds
Section 66
//SoundList_Airstrike (boxhead.sounds.SoundList_Airstrike)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Airstrike extends SoundAsset {
}
}//package boxhead.sounds
Section 67
//SoundList_AK47Fire01 (boxhead.sounds.SoundList_AK47Fire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_AK47Fire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 68
//SoundList_AK47Fire02 (boxhead.sounds.SoundList_AK47Fire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_AK47Fire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 69
//SoundList_AK47Fire03 (boxhead.sounds.SoundList_AK47Fire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_AK47Fire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 70
//SoundList_AK47Reload (boxhead.sounds.SoundList_AK47Reload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_AK47Reload extends SoundAsset {
}
}//package boxhead.sounds
Section 71
//SoundList_Barrel_Place (boxhead.sounds.SoundList_Barrel_Place)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Barrel_Place extends SoundAsset {
}
}//package boxhead.sounds
Section 72
//SoundList_CantAfford (boxhead.sounds.SoundList_CantAfford)
package boxhead.sounds {
import mx.core.*;
public class SoundList_CantAfford extends SoundAsset {
}
}//package boxhead.sounds
Section 73
//SoundList_ChangeWeapon1 (boxhead.sounds.SoundList_ChangeWeapon1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeapon1 extends SoundAsset {
}
}//package boxhead.sounds
Section 74
//SoundList_ChangeWeapon2 (boxhead.sounds.SoundList_ChangeWeapon2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeapon2 extends SoundAsset {
}
}//package boxhead.sounds
Section 75
//SoundList_ChangeWeapon3 (boxhead.sounds.SoundList_ChangeWeapon3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeapon3 extends SoundAsset {
}
}//package boxhead.sounds
Section 76
//SoundList_ChangeWeapon4 (boxhead.sounds.SoundList_ChangeWeapon4)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeapon4 extends SoundAsset {
}
}//package boxhead.sounds
Section 77
//SoundList_ChangeWeapon5 (boxhead.sounds.SoundList_ChangeWeapon5)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeapon5 extends SoundAsset {
}
}//package boxhead.sounds
Section 78
//SoundList_ChangeWeapon6 (boxhead.sounds.SoundList_ChangeWeapon6)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeapon6 extends SoundAsset {
}
}//package boxhead.sounds
Section 79
//SoundList_ChangeWeapon7 (boxhead.sounds.SoundList_ChangeWeapon7)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeapon7 extends SoundAsset {
}
}//package boxhead.sounds
Section 80
//SoundList_ChangeWeaponTone (boxhead.sounds.SoundList_ChangeWeaponTone)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChangeWeaponTone extends SoundAsset {
}
}//package boxhead.sounds
Section 81
//SoundList_CharacterRespawn (boxhead.sounds.SoundList_CharacterRespawn)
package boxhead.sounds {
import mx.core.*;
public class SoundList_CharacterRespawn extends SoundAsset {
}
}//package boxhead.sounds
Section 82
//SoundList_ChargePackActivate (boxhead.sounds.SoundList_ChargePackActivate)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChargePackActivate extends SoundAsset {
}
}//package boxhead.sounds
Section 83
//SoundList_ChargePackExplosion (boxhead.sounds.SoundList_ChargePackExplosion)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChargePackExplosion extends SoundAsset {
}
}//package boxhead.sounds
Section 84
//SoundList_ChargePackPlant (boxhead.sounds.SoundList_ChargePackPlant)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ChargePackPlant extends SoundAsset {
}
}//package boxhead.sounds
Section 85
//SoundList_ClaymoreActivate (boxhead.sounds.SoundList_ClaymoreActivate)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ClaymoreActivate extends SoundAsset {
}
}//package boxhead.sounds
Section 86
//SoundList_ClaymoreExplosion (boxhead.sounds.SoundList_ClaymoreExplosion)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ClaymoreExplosion extends SoundAsset {
}
}//package boxhead.sounds
Section 87
//SoundList_ClaymorePlant (boxhead.sounds.SoundList_ClaymorePlant)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ClaymorePlant extends SoundAsset {
}
}//package boxhead.sounds
Section 88
//SoundList_ClickLong (boxhead.sounds.SoundList_ClickLong)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ClickLong extends SoundAsset {
}
}//package boxhead.sounds
Section 89
//SoundList_ClickShort (boxhead.sounds.SoundList_ClickShort)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ClickShort extends SoundAsset {
}
}//package boxhead.sounds
Section 90
//SoundList_CorpseThud (boxhead.sounds.SoundList_CorpseThud)
package boxhead.sounds {
import mx.core.*;
public class SoundList_CorpseThud extends SoundAsset {
}
}//package boxhead.sounds
Section 91
//SoundList_EndRound (boxhead.sounds.SoundList_EndRound)
package boxhead.sounds {
import mx.core.*;
public class SoundList_EndRound extends SoundAsset {
}
}//package boxhead.sounds
Section 92
//SoundList_Explosion_0 (boxhead.sounds.SoundList_Explosion_0)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Explosion_0 extends SoundAsset {
}
}//package boxhead.sounds
Section 93
//SoundList_ExplosionArtillery (boxhead.sounds.SoundList_ExplosionArtillery)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ExplosionArtillery extends SoundAsset {
}
}//package boxhead.sounds
Section 94
//SoundList_ExplosionElectricityShockwave (boxhead.sounds.SoundList_ExplosionElectricityShockwave)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ExplosionElectricityShockwave extends SoundAsset {
}
}//package boxhead.sounds
Section 95
//SoundList_ExplosionFiery (boxhead.sounds.SoundList_ExplosionFiery)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ExplosionFiery extends SoundAsset {
}
}//package boxhead.sounds
Section 96
//SoundList_ExplosionGrenade (boxhead.sounds.SoundList_ExplosionGrenade)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ExplosionGrenade extends SoundAsset {
}
}//package boxhead.sounds
Section 97
//SoundList_ExplosionHuge (boxhead.sounds.SoundList_ExplosionHuge)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ExplosionHuge extends SoundAsset {
}
}//package boxhead.sounds
Section 98
//SoundList_FemaleHurtA1 (boxhead.sounds.SoundList_FemaleHurtA1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtA1 extends SoundAsset {
}
}//package boxhead.sounds
Section 99
//SoundList_FemaleHurtA2 (boxhead.sounds.SoundList_FemaleHurtA2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtA2 extends SoundAsset {
}
}//package boxhead.sounds
Section 100
//SoundList_FemaleHurtA3 (boxhead.sounds.SoundList_FemaleHurtA3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtA3 extends SoundAsset {
}
}//package boxhead.sounds
Section 101
//SoundList_FemaleHurtB1 (boxhead.sounds.SoundList_FemaleHurtB1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtB1 extends SoundAsset {
}
}//package boxhead.sounds
Section 102
//SoundList_FemaleHurtB2 (boxhead.sounds.SoundList_FemaleHurtB2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtB2 extends SoundAsset {
}
}//package boxhead.sounds
Section 103
//SoundList_FemaleHurtB3 (boxhead.sounds.SoundList_FemaleHurtB3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtB3 extends SoundAsset {
}
}//package boxhead.sounds
Section 104
//SoundList_FemaleHurtC1 (boxhead.sounds.SoundList_FemaleHurtC1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtC1 extends SoundAsset {
}
}//package boxhead.sounds
Section 105
//SoundList_FemaleHurtC2 (boxhead.sounds.SoundList_FemaleHurtC2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtC2 extends SoundAsset {
}
}//package boxhead.sounds
Section 106
//SoundList_FemaleHurtC3 (boxhead.sounds.SoundList_FemaleHurtC3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtC3 extends SoundAsset {
}
}//package boxhead.sounds
Section 107
//SoundList_FemaleHurtD1 (boxhead.sounds.SoundList_FemaleHurtD1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtD1 extends SoundAsset {
}
}//package boxhead.sounds
Section 108
//SoundList_FemaleHurtD2 (boxhead.sounds.SoundList_FemaleHurtD2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtD2 extends SoundAsset {
}
}//package boxhead.sounds
Section 109
//SoundList_FemaleHurtD3 (boxhead.sounds.SoundList_FemaleHurtD3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FemaleHurtD3 extends SoundAsset {
}
}//package boxhead.sounds
Section 110
//SoundList_FlamerEnd (boxhead.sounds.SoundList_FlamerEnd)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FlamerEnd extends SoundAsset {
}
}//package boxhead.sounds
Section 111
//SoundList_FlamerLoop (boxhead.sounds.SoundList_FlamerLoop)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FlamerLoop extends SoundAsset {
}
}//package boxhead.sounds
Section 112
//SoundList_FlamerStart (boxhead.sounds.SoundList_FlamerStart)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FlamerStart extends SoundAsset {
}
}//package boxhead.sounds
Section 113
//SoundList_FootstepConcrete1L (boxhead.sounds.SoundList_FootstepConcrete1L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepConcrete1L extends SoundAsset {
}
}//package boxhead.sounds
Section 114
//SoundList_FootstepConcrete1R (boxhead.sounds.SoundList_FootstepConcrete1R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepConcrete1R extends SoundAsset {
}
}//package boxhead.sounds
Section 115
//SoundList_FootstepConcrete2L (boxhead.sounds.SoundList_FootstepConcrete2L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepConcrete2L extends SoundAsset {
}
}//package boxhead.sounds
Section 116
//SoundList_FootstepConcrete2R (boxhead.sounds.SoundList_FootstepConcrete2R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepConcrete2R extends SoundAsset {
}
}//package boxhead.sounds
Section 117
//SoundList_FootstepConcrete3L (boxhead.sounds.SoundList_FootstepConcrete3L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepConcrete3L extends SoundAsset {
}
}//package boxhead.sounds
Section 118
//SoundList_FootstepConcrete3R (boxhead.sounds.SoundList_FootstepConcrete3R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepConcrete3R extends SoundAsset {
}
}//package boxhead.sounds
Section 119
//SoundList_FootstepGrass1L (boxhead.sounds.SoundList_FootstepGrass1L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGrass1L extends SoundAsset {
}
}//package boxhead.sounds
Section 120
//SoundList_FootstepGrass1R (boxhead.sounds.SoundList_FootstepGrass1R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGrass1R extends SoundAsset {
}
}//package boxhead.sounds
Section 121
//SoundList_FootstepGrass2L (boxhead.sounds.SoundList_FootstepGrass2L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGrass2L extends SoundAsset {
}
}//package boxhead.sounds
Section 122
//SoundList_FootstepGrass2R (boxhead.sounds.SoundList_FootstepGrass2R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGrass2R extends SoundAsset {
}
}//package boxhead.sounds
Section 123
//SoundList_FootstepGrass3L (boxhead.sounds.SoundList_FootstepGrass3L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGrass3L extends SoundAsset {
}
}//package boxhead.sounds
Section 124
//SoundList_FootstepGrass3R (boxhead.sounds.SoundList_FootstepGrass3R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGrass3R extends SoundAsset {
}
}//package boxhead.sounds
Section 125
//SoundList_FootstepGravel1L (boxhead.sounds.SoundList_FootstepGravel1L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGravel1L extends SoundAsset {
}
}//package boxhead.sounds
Section 126
//SoundList_FootstepGravel1R (boxhead.sounds.SoundList_FootstepGravel1R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGravel1R extends SoundAsset {
}
}//package boxhead.sounds
Section 127
//SoundList_FootstepGravel2L (boxhead.sounds.SoundList_FootstepGravel2L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGravel2L extends SoundAsset {
}
}//package boxhead.sounds
Section 128
//SoundList_FootstepGravel2R (boxhead.sounds.SoundList_FootstepGravel2R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGravel2R extends SoundAsset {
}
}//package boxhead.sounds
Section 129
//SoundList_FootstepGravel3L (boxhead.sounds.SoundList_FootstepGravel3L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGravel3L extends SoundAsset {
}
}//package boxhead.sounds
Section 130
//SoundList_FootstepGravel3R (boxhead.sounds.SoundList_FootstepGravel3R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepGravel3R extends SoundAsset {
}
}//package boxhead.sounds
Section 131
//SoundList_FootstepWood1L (boxhead.sounds.SoundList_FootstepWood1L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepWood1L extends SoundAsset {
}
}//package boxhead.sounds
Section 132
//SoundList_FootstepWood1R (boxhead.sounds.SoundList_FootstepWood1R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepWood1R extends SoundAsset {
}
}//package boxhead.sounds
Section 133
//SoundList_FootstepWood2L (boxhead.sounds.SoundList_FootstepWood2L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepWood2L extends SoundAsset {
}
}//package boxhead.sounds
Section 134
//SoundList_FootstepWood2R (boxhead.sounds.SoundList_FootstepWood2R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepWood2R extends SoundAsset {
}
}//package boxhead.sounds
Section 135
//SoundList_FootstepWood3L (boxhead.sounds.SoundList_FootstepWood3L)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepWood3L extends SoundAsset {
}
}//package boxhead.sounds
Section 136
//SoundList_FootstepWood3R (boxhead.sounds.SoundList_FootstepWood3R)
package boxhead.sounds {
import mx.core.*;
public class SoundList_FootstepWood3R extends SoundAsset {
}
}//package boxhead.sounds
Section 137
//SoundList_GameStart (boxhead.sounds.SoundList_GameStart)
package boxhead.sounds {
import mx.core.*;
public class SoundList_GameStart extends SoundAsset {
}
}//package boxhead.sounds
Section 138
//SoundList_Grenade_Bounce (boxhead.sounds.SoundList_Grenade_Bounce)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Grenade_Bounce extends SoundAsset {
}
}//package boxhead.sounds
Section 139
//SoundList_GrenadeLauncherFire01 (boxhead.sounds.SoundList_GrenadeLauncherFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_GrenadeLauncherFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 140
//SoundList_GrenadeLauncherFire02 (boxhead.sounds.SoundList_GrenadeLauncherFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_GrenadeLauncherFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 141
//SoundList_GrenadeLauncherFire03 (boxhead.sounds.SoundList_GrenadeLauncherFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_GrenadeLauncherFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 142
//SoundList_GrenadeLauncherReload (boxhead.sounds.SoundList_GrenadeLauncherReload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_GrenadeLauncherReload extends SoundAsset {
}
}//package boxhead.sounds
Section 143
//SoundList_GrenadePullPin (boxhead.sounds.SoundList_GrenadePullPin)
package boxhead.sounds {
import mx.core.*;
public class SoundList_GrenadePullPin extends SoundAsset {
}
}//package boxhead.sounds
Section 144
//SoundList_Ka_ching (boxhead.sounds.SoundList_Ka_ching)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Ka_ching extends SoundAsset {
}
}//package boxhead.sounds
Section 145
//SoundList_M16Fire01 (boxhead.sounds.SoundList_M16Fire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_M16Fire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 146
//SoundList_M16Fire02 (boxhead.sounds.SoundList_M16Fire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_M16Fire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 147
//SoundList_M16Fire03 (boxhead.sounds.SoundList_M16Fire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_M16Fire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 148
//SoundList_M16Reload (boxhead.sounds.SoundList_M16Reload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_M16Reload extends SoundAsset {
}
}//package boxhead.sounds
Section 149
//SoundList_MagnumFire01 (boxhead.sounds.SoundList_MagnumFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MagnumFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 150
//SoundList_MagnumFire02 (boxhead.sounds.SoundList_MagnumFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MagnumFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 151
//SoundList_MagnumFire03 (boxhead.sounds.SoundList_MagnumFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MagnumFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 152
//SoundList_MagnumReload (boxhead.sounds.SoundList_MagnumReload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MagnumReload extends SoundAsset {
}
}//package boxhead.sounds
Section 153
//SoundList_MaleHurtA1 (boxhead.sounds.SoundList_MaleHurtA1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtA1 extends SoundAsset {
}
}//package boxhead.sounds
Section 154
//SoundList_MaleHurtA2 (boxhead.sounds.SoundList_MaleHurtA2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtA2 extends SoundAsset {
}
}//package boxhead.sounds
Section 155
//SoundList_MaleHurtA3 (boxhead.sounds.SoundList_MaleHurtA3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtA3 extends SoundAsset {
}
}//package boxhead.sounds
Section 156
//SoundList_MaleHurtB1 (boxhead.sounds.SoundList_MaleHurtB1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtB1 extends SoundAsset {
}
}//package boxhead.sounds
Section 157
//SoundList_MaleHurtB2 (boxhead.sounds.SoundList_MaleHurtB2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtB2 extends SoundAsset {
}
}//package boxhead.sounds
Section 158
//SoundList_MaleHurtB3 (boxhead.sounds.SoundList_MaleHurtB3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtB3 extends SoundAsset {
}
}//package boxhead.sounds
Section 159
//SoundList_MaleHurtC1 (boxhead.sounds.SoundList_MaleHurtC1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtC1 extends SoundAsset {
}
}//package boxhead.sounds
Section 160
//SoundList_MaleHurtC2 (boxhead.sounds.SoundList_MaleHurtC2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtC2 extends SoundAsset {
}
}//package boxhead.sounds
Section 161
//SoundList_MaleHurtC3 (boxhead.sounds.SoundList_MaleHurtC3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtC3 extends SoundAsset {
}
}//package boxhead.sounds
Section 162
//SoundList_MaleHurtD1 (boxhead.sounds.SoundList_MaleHurtD1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtD1 extends SoundAsset {
}
}//package boxhead.sounds
Section 163
//SoundList_MaleHurtD2 (boxhead.sounds.SoundList_MaleHurtD2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtD2 extends SoundAsset {
}
}//package boxhead.sounds
Section 164
//SoundList_MaleHurtD3 (boxhead.sounds.SoundList_MaleHurtD3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MaleHurtD3 extends SoundAsset {
}
}//package boxhead.sounds
Section 165
//SoundList_Minigun_Loop (boxhead.sounds.SoundList_Minigun_Loop)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Minigun_Loop extends SoundAsset {
}
}//package boxhead.sounds
Section 166
//SoundList_Minigun_Stop (boxhead.sounds.SoundList_Minigun_Stop)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Minigun_Stop extends SoundAsset {
}
}//package boxhead.sounds
Section 167
//SoundList_MonsterHurtA1 (boxhead.sounds.SoundList_MonsterHurtA1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtA1 extends SoundAsset {
}
}//package boxhead.sounds
Section 168
//SoundList_MonsterHurtA2 (boxhead.sounds.SoundList_MonsterHurtA2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtA2 extends SoundAsset {
}
}//package boxhead.sounds
Section 169
//SoundList_MonsterHurtA3 (boxhead.sounds.SoundList_MonsterHurtA3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtA3 extends SoundAsset {
}
}//package boxhead.sounds
Section 170
//SoundList_MonsterHurtB1 (boxhead.sounds.SoundList_MonsterHurtB1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtB1 extends SoundAsset {
}
}//package boxhead.sounds
Section 171
//SoundList_MonsterHurtB2 (boxhead.sounds.SoundList_MonsterHurtB2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtB2 extends SoundAsset {
}
}//package boxhead.sounds
Section 172
//SoundList_MonsterHurtB3 (boxhead.sounds.SoundList_MonsterHurtB3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtB3 extends SoundAsset {
}
}//package boxhead.sounds
Section 173
//SoundList_MonsterHurtC1 (boxhead.sounds.SoundList_MonsterHurtC1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtC1 extends SoundAsset {
}
}//package boxhead.sounds
Section 174
//SoundList_MonsterHurtC2 (boxhead.sounds.SoundList_MonsterHurtC2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtC2 extends SoundAsset {
}
}//package boxhead.sounds
Section 175
//SoundList_MonsterHurtC3 (boxhead.sounds.SoundList_MonsterHurtC3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtC3 extends SoundAsset {
}
}//package boxhead.sounds
Section 176
//SoundList_MonsterHurtD1 (boxhead.sounds.SoundList_MonsterHurtD1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtD1 extends SoundAsset {
}
}//package boxhead.sounds
Section 177
//SoundList_MonsterHurtD2 (boxhead.sounds.SoundList_MonsterHurtD2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtD2 extends SoundAsset {
}
}//package boxhead.sounds
Section 178
//SoundList_MonsterHurtD3 (boxhead.sounds.SoundList_MonsterHurtD3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_MonsterHurtD3 extends SoundAsset {
}
}//package boxhead.sounds
Section 179
//SoundList_PistolFire01 (boxhead.sounds.SoundList_PistolFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PistolFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 180
//SoundList_PistolFire02 (boxhead.sounds.SoundList_PistolFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PistolFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 181
//SoundList_PistolFire03 (boxhead.sounds.SoundList_PistolFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PistolFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 182
//SoundList_PistolReload (boxhead.sounds.SoundList_PistolReload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PistolReload extends SoundAsset {
}
}//package boxhead.sounds
Section 183
//SoundList_PlasmaCannonFire01 (boxhead.sounds.SoundList_PlasmaCannonFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PlasmaCannonFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 184
//SoundList_PlasmaCannonFire02 (boxhead.sounds.SoundList_PlasmaCannonFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PlasmaCannonFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 185
//SoundList_PlasmaCannonFire03 (boxhead.sounds.SoundList_PlasmaCannonFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PlasmaCannonFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 186
//SoundList_PlasmaCannonHit (boxhead.sounds.SoundList_PlasmaCannonHit)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PlasmaCannonHit extends SoundAsset {
}
}//package boxhead.sounds
Section 187
//SoundList_PlasmaCannonReload (boxhead.sounds.SoundList_PlasmaCannonReload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PlasmaCannonReload extends SoundAsset {
}
}//package boxhead.sounds
Section 188
//SoundList_PreDeployHeavy (boxhead.sounds.SoundList_PreDeployHeavy)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PreDeployHeavy extends SoundAsset {
}
}//package boxhead.sounds
Section 189
//SoundList_PreDeployLight (boxhead.sounds.SoundList_PreDeployLight)
package boxhead.sounds {
import mx.core.*;
public class SoundList_PreDeployLight extends SoundAsset {
}
}//package boxhead.sounds
Section 190
//SoundList_RailgunFire01 (boxhead.sounds.SoundList_RailgunFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RailgunFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 191
//SoundList_RailgunFire02 (boxhead.sounds.SoundList_RailgunFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RailgunFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 192
//SoundList_RailgunFire03 (boxhead.sounds.SoundList_RailgunFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RailgunFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 193
//SoundList_RailgunReload (boxhead.sounds.SoundList_RailgunReload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RailgunReload extends SoundAsset {
}
}//package boxhead.sounds
Section 194
//SoundList_RifleFire01 (boxhead.sounds.SoundList_RifleFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RifleFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 195
//SoundList_RifleFire02 (boxhead.sounds.SoundList_RifleFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RifleFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 196
//SoundList_RifleFire03 (boxhead.sounds.SoundList_RifleFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RifleFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 197
//SoundList_RifleReload (boxhead.sounds.SoundList_RifleReload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_RifleReload extends SoundAsset {
}
}//package boxhead.sounds
Section 198
//SoundList_SatelliteEnd (boxhead.sounds.SoundList_SatelliteEnd)
package boxhead.sounds {
import mx.core.*;
public class SoundList_SatelliteEnd extends SoundAsset {
}
}//package boxhead.sounds
Section 199
//SoundList_SatelliteLoop (boxhead.sounds.SoundList_SatelliteLoop)
package boxhead.sounds {
import mx.core.*;
public class SoundList_SatelliteLoop extends SoundAsset {
}
}//package boxhead.sounds
Section 200
//SoundList_SatelliteStart (boxhead.sounds.SoundList_SatelliteStart)
package boxhead.sounds {
import mx.core.*;
public class SoundList_SatelliteStart extends SoundAsset {
}
}//package boxhead.sounds
Section 201
//SoundList_ShotgunFire01 (boxhead.sounds.SoundList_ShotgunFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ShotgunFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 202
//SoundList_ShotgunFire02 (boxhead.sounds.SoundList_ShotgunFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ShotgunFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 203
//SoundList_ShotgunFire03 (boxhead.sounds.SoundList_ShotgunFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ShotgunFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 204
//SoundList_ShotgunReload (boxhead.sounds.SoundList_ShotgunReload)
package boxhead.sounds {
import mx.core.*;
public class SoundList_ShotgunReload extends SoundAsset {
}
}//package boxhead.sounds
Section 205
//SoundList_TitleScreenMusic (boxhead.sounds.SoundList_TitleScreenMusic)
package boxhead.sounds {
import mx.core.*;
public class SoundList_TitleScreenMusic extends SoundAsset {
}
}//package boxhead.sounds
Section 206
//SoundList_Turret_MG_Shot_1 (boxhead.sounds.SoundList_Turret_MG_Shot_1)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Turret_MG_Shot_1 extends SoundAsset {
}
}//package boxhead.sounds
Section 207
//SoundList_Turret_MG_Shot_2 (boxhead.sounds.SoundList_Turret_MG_Shot_2)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Turret_MG_Shot_2 extends SoundAsset {
}
}//package boxhead.sounds
Section 208
//SoundList_Turret_MG_Shot_3 (boxhead.sounds.SoundList_Turret_MG_Shot_3)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Turret_MG_Shot_3 extends SoundAsset {
}
}//package boxhead.sounds
Section 209
//SoundList_Turret_Mortar_Shot (boxhead.sounds.SoundList_Turret_Mortar_Shot)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Turret_Mortar_Shot extends SoundAsset {
}
}//package boxhead.sounds
Section 210
//SoundList_Turret_Place (boxhead.sounds.SoundList_Turret_Place)
package boxhead.sounds {
import mx.core.*;
public class SoundList_Turret_Place extends SoundAsset {
}
}//package boxhead.sounds
Section 211
//SoundList_UziFire01 (boxhead.sounds.SoundList_UziFire01)
package boxhead.sounds {
import mx.core.*;
public class SoundList_UziFire01 extends SoundAsset {
}
}//package boxhead.sounds
Section 212
//SoundList_UziFire02 (boxhead.sounds.SoundList_UziFire02)
package boxhead.sounds {
import mx.core.*;
public class SoundList_UziFire02 extends SoundAsset {
}
}//package boxhead.sounds
Section 213
//SoundList_UziFire03 (boxhead.sounds.SoundList_UziFire03)
package boxhead.sounds {
import mx.core.*;
public class SoundList_UziFire03 extends SoundAsset {
}
}//package boxhead.sounds
Section 214
//SoundList_UziReloadLeft (boxhead.sounds.SoundList_UziReloadLeft)
package boxhead.sounds {
import mx.core.*;
public class SoundList_UziReloadLeft extends SoundAsset {
}
}//package boxhead.sounds
Section 215
//SoundList_UziReloadRight (boxhead.sounds.SoundList_UziReloadRight)
package boxhead.sounds {
import mx.core.*;
public class SoundList_UziReloadRight extends SoundAsset {
}
}//package boxhead.sounds
Section 216
//AwardEntry (boxhead.ui.score.AwardEntry)
package boxhead.ui.score {
import MMOcha.server.*;
import boxhead.ui.*;
import boxhead.game.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.text.*;
public class AwardEntry extends Sprite {
public var characterBox:CharacterBox;
public var scoreField:TextField;
public var nameField:TextField;
public var bonusField:TextField;
public var awardField:TextField;
public function AwardEntry(){
clear();
}
public function update(_arg1:String, _arg2:uint, _arg3:int, _arg4:Player, _arg5:String, _arg6:Boolean=false):void{
var _local7:MMOchaUser;
var _local8:int;
awardField.htmlText = (("<U>" + _arg1) + "</U>");
awardField.textColor = _arg2;
bonusField.text = ("$" + _arg3);
scoreField.text = _arg5;
if (_arg6){
nameField.text = "";
characterBox.unknown();
} else {
if (_arg4){
nameField.text = _arg4.name;
_local7 = _arg4.user;
_local8 = WeaponInfo.PISTOL_ID;
if (((_arg4.character) && (_arg4.character.currentWeapon))){
_local8 = _arg4.character.currentWeapon.weaponID;
};
characterBox.drawCharacter(_local7.headModelIndex, _local7.headColorIndex, _local7.bodyModelIndex, _local7.bodyColorIndex, _local8);
} else {
nameField.text = "";
characterBox.clear();
};
};
}
public function largeTextMode():void{
awardField.scaleX = (awardField.scaleX + 0.15);
awardField.scaleY = (awardField.scaleY + 0.15);
awardField.y = (awardField.y - 3);
}
public function clear():void{
awardField.text = "";
bonusField.text = "";
nameField.text = "";
scoreField.text = "";
characterBox.clear();
}
public function dispose():void{
}
}
}//package boxhead.ui.score
Section 217
//BountyScoreBoard (boxhead.ui.score.BountyScoreBoard)
package boxhead.ui.score {
import boxhead.game.*;
public class BountyScoreBoard extends ScoreBoard {
public var entry2:ScoreBoardEntry;
public var entry3:ScoreBoardEntry;
public var entry5:ScoreBoardEntry;
public var entry7:ScoreBoardEntry;
public var entry4:ScoreBoardEntry;
public var entry6:ScoreBoardEntry;
public var entry8:ScoreBoardEntry;
public var entry9:ScoreBoardEntry;
protected var entries:Array;
public var entry10:ScoreBoardEntry;
public var entry11:ScoreBoardEntry;
public var entry12:ScoreBoardEntry;
public var entry13:ScoreBoardEntry;
public var entry0:ScoreBoardEntry;
public var entry14:ScoreBoardEntry;
public var entry15:ScoreBoardEntry;
public var entry1:ScoreBoardEntry;
public function BountyScoreBoard(){
entries = [entry0, entry1, entry2, entry3, entry4, entry5, entry6, entry7, entry8, entry9, entry10, entry11, entry12, entry13, entry14, entry15];
}
override public function update(_arg1:Array):void{
var _local2:int;
var _local5:int;
var _local6:Player;
var _local7:Player;
var _local8:ScoreBoardEntry;
var _local9:Player;
var _local3:Array = _arg1.concat();
var _local4:Array = new Array();
while (_local3.length > 0) {
_local5 = 0;
_local6 = _local3[0];
_local2 = 1;
while (_local2 < _local3.length) {
_local7 = _local3[_local2];
if (_local7.score > _local6.score){
_local6 = _local7;
_local5 = _local2;
};
_local2++;
};
_local3.splice(_local5, 1);
_local4.push(_local6);
};
_local2 = 0;
while (_local2 < entries.length) {
_local8 = entries[_local2];
if (_local2 >= _local4.length){
_local8.clear();
} else {
_local9 = _local4[_local2];
_local8.update((_local2 + 1), _local9);
};
_local2++;
};
}
override public function dispose():void{
var _local1:ScoreBoardEntry;
for each (_local1 in entries) {
_local1.dispose();
};
super.dispose();
}
}
}//package boxhead.ui.score
Section 218
//GameSummary (boxhead.ui.score.GameSummary)
package boxhead.ui.score {
import boxhead.game.*;
import flash.display.*;
import flash.text.*;
public class GameSummary extends Sprite {
public var entry2:ScoreBoardEntry;
public var entry3:ScoreBoardEntry;
public var entry5:ScoreBoardEntry;
public var entry7:ScoreBoardEntry;
public var entry4:ScoreBoardEntry;
public var entry6:ScoreBoardEntry;
public var entry8:ScoreBoardEntry;
public var entry9:ScoreBoardEntry;
protected var entries:Array;
public var entry10:ScoreBoardEntry;
public var entry11:ScoreBoardEntry;
public var entry12:ScoreBoardEntry;
public var entry13:ScoreBoardEntry;
public var entry15:ScoreBoardEntry;
public var targetDummyAwardEntry:AwardEntry;
public var entry14:ScoreBoardEntry;
public var scroogeAwardEntry:AwardEntry;
public var dominatorAwardEntry:AwardEntry;
public var winnerAwardEntry:AwardEntry;
public var hunterAwardEntry:AwardEntry;
public var winner:Player;
public var upsell:Sprite;
public var nextGameField:TextField;
public var entry0:ScoreBoardEntry;
public var entry1:ScoreBoardEntry;
protected static const UNKNOWN:Player = new Player();
protected static const NO_WINNER:Player = new Player();
public function GameSummary(){
entries = [entry0, entry1, entry2, entry3, entry4, entry5, entry6, entry7, entry8, entry9, entry10, entry11, entry12, entry13, entry14, entry15];
nextGameField.text = "";
}
public function setCountDown(_arg1:int):void{
nextGameField.text = (("Next Game begins in " + _arg1) + " seconds...");
}
public function dispose():void{
var _local1:ScoreBoardEntry;
for each (_local1 in entries) {
_local1.dispose();
};
}
public function displaySummary(_arg1:Array, _arg2:String):void{
winner = UNKNOWN;
var _local3:Player = UNKNOWN;
var _local4:Player = UNKNOWN;
var _local5:Player = UNKNOWN;
var _local6:Player = UNKNOWN;
refreshScores(_arg1);
}
public function refreshScores(_arg1:Array):void{
var _local2:int;
var _local5:int;
var _local6:Player;
var _local7:Player;
var _local8:ScoreBoardEntry;
var _local9:Player;
var _local3:Array = _arg1.concat();
var _local4:Array = new Array();
while (_local3.length > 0) {
_local5 = 0;
_local6 = _local3[0];
_local2 = 1;
while (_local2 < _local3.length) {
_local7 = _local3[_local2];
if (_local7.score > _local6.score){
_local6 = _local7;
_local5 = _local2;
};
_local2++;
};
_local3.splice(_local5, 1);
_local4.push(_local6);
};
_local2 = 0;
while (_local2 < entries.length) {
_local8 = entries[_local2];
if (_local2 >= _local4.length){
_local8.clear();
} else {
_local9 = _local4[_local2];
_local8.update((_local2 + 1), _local9);
};
_local2++;
};
}
protected function findPlayer(_arg1:Array, _arg2:String):Player{
var _local3:Player;
if (_arg2 == "000"){
return (NO_WINNER);
};
for each (_local3 in _arg1) {
if (_local3.id == _arg2){
return (_local3);
};
};
return (UNKNOWN);
}
}
}//package boxhead.ui.score
Section 219
//ScoreBoard (boxhead.ui.score.ScoreBoard)
package boxhead.ui.score {
import flash.display.*;
public class ScoreBoard extends Sprite {
public function update(_arg1:Array):void{
}
public function dispose():void{
}
}
}//package boxhead.ui.score
Section 220
//ScoreBoardEntry (boxhead.ui.score.ScoreBoardEntry)
package boxhead.ui.score {
import MMOcha.server.*;
import boxhead.game.*;
import flash.display.*;
import flash.text.*;
public class ScoreBoardEntry extends Sprite {
public var killsField:TextField;
public var scoreField:TextField;
public var deathsField:TextField;
public var nameField:TextField;
public function ScoreBoardEntry(){
clear();
}
public function dispose():void{
}
public function update(_arg1:int, _arg2:Player):void{
nameField.text = ((("" + _arg1) + ") ") + _arg2.name);
if (_arg2.isLocal){
nameField.textColor = MMOchaUser.LOCAL_COLOR;
scoreField.textColor = MMOchaUser.LOCAL_COLOR;
} else {
if (_arg2.user.wanted){
nameField.textColor = MMOchaUser.WANTED_COLOR;
} else {
nameField.textColor = 0xFFFFFF;
};
scoreField.textColor = 0xFFFFFF;
};
killsField.text = ("" + _arg2.kills);
deathsField.text = ("" + _arg2.deaths);
scoreField.text = ("$" + _arg2.score);
}
public function clear():void{
nameField.text = "";
killsField.text = "";
deathsField.text = "";
scoreField.text = "";
}
}
}//package boxhead.ui.score
Section 221
//BanScreen (boxhead.ui.screen.BanScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.events.*;
import flash.text.*;
import MMOcha.lobby.*;
public class BanScreen extends Screen {
protected var buttons:Array;
public var messageField:TextField;
public var closeButton:TextButton;
public var banField:TextField;
public function BanScreen(_arg1:String, _arg2:String){
var _local3:TextButton;
super();
Debug.output("Ban screen");
banField.text = _arg1;
messageField.text = _arg2;
buttons = [closeButton];
closeButton.text = "close";
for each (_local3 in buttons) {
_local3.addEventListener(MouseEvent.CLICK, buttonClick);
};
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case closeButton:
close();
dispatchEvent(new ScreenEvent(ScreenEvent.MENU));
break;
};
}
override public function dispose():void{
var _local1:TextButton;
super.dispose();
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
}
}
}//package boxhead.ui.screen
Section 222
//ConfirmQuitScreen (boxhead.ui.screen.ConfirmQuitScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.events.*;
import MMOcha.lobby.*;
public class ConfirmQuitScreen extends Screen {
protected var buttons:Array;
public var quitButton:TextButton;
public var closeButton:TextButton;
public function ConfirmQuitScreen(){
var _local1:TextButton;
super();
buttons = [quitButton, closeButton];
quitButton.text = "quit";
closeButton.text = "cancel";
for each (_local1 in buttons) {
_local1.addEventListener(MouseEvent.CLICK, buttonClick);
};
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case quitButton:
dispatchEvent(new ScreenEvent(ScreenEvent.QUIT));
close();
break;
case closeButton:
close();
break;
};
}
override public function dispose():void{
var _local1:TextButton;
super.dispose();
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
}
}
}//package boxhead.ui.screen
Section 223
//ConnectingScreen (boxhead.ui.screen.ConnectingScreen)
package boxhead.ui.screen {
import flash.events.*;
import flash.display.*;
import MMOcha.lobby.*;
public class ConnectingScreen extends Screen {
protected var buttons:Array;
public var status:MovieClip;
public var closeButton:TextButton;
public function ConnectingScreen(){
var _local1:TextButton;
super();
buttons = [closeButton];
closeButton.text = "cancel";
for each (_local1 in buttons) {
_local1.addEventListener(MouseEvent.CLICK, buttonClick);
};
status.gotoAndStop("Connecting");
}
public function authenticationFailed():void{
status.gotoAndStop("AuthenticationFailed");
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case closeButton:
close();
break;
};
}
public function connectionFailed():void{
status.gotoAndStop("ConnectionFailed");
}
override public function dispose():void{
var _local1:TextButton;
super.dispose();
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
}
}
}//package boxhead.ui.screen
Section 224
//ControlsScreen (boxhead.ui.screen.ControlsScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.ui.*;
import flash.display.*;
import flash.geom.*;
import MMOcha.lobby.*;
public class ControlsScreen extends Screen {
protected var contentHeight:Number;
public var resetButton:TextButton;
public var scrollBar:ScrollBar;
protected var buttons:Array;
public var closeButton:TextButton;
public var scrollPane:Sprite;
protected var keyEntries:Array;
protected static const SPACING:Number = 14;
protected static const paneRect:Rectangle = new Rectangle(0, 0, 250, 295);
public function ControlsScreen(){
var _local1:TextButton;
var _local2:int;
var _local3:Boolean;
var _local4:int;
var _local5:Number;
var _local6:Number;
super();
buttons = [resetButton, closeButton];
resetButton.text = "reset";
resetButton.align("left");
closeButton.text = "close";
closeButton.align("right");
for each (_local1 in buttons) {
_local1.addEventListener(MouseEvent.CLICK, buttonClick);
};
keyEntries = new Array();
_local4 = 0;
while (_local4 < 2) {
_local3 = (_local4 == 0);
_local5 = (100 + (_local4 * 65));
_local6 = 0;
_local2 = 0;
while (_local2 <= (Input.SPIN_KEY / 2)) {
addEntry(_local2, _local3, _local5, _local6);
_local6 = (_local6 + SPACING);
_local2++;
};
_local6 = 103;
_local2 = (Input.FIRE_KEY / 2);
while (_local2 <= (Input.WEAPON8_KEY / 2)) {
addEntry(_local2, _local3, _local5, _local6);
_local6 = (_local6 + SPACING);
_local2++;
};
_local6 = 261;
_local2 = (Input.SHOP_KEY / 2);
while (_local2 <= (Input.SCORES_KEY / 2)) {
addEntry(_local2, _local3, _local5, _local6);
_local6 = (_local6 + SPACING);
_local2++;
};
_local4++;
};
contentHeight = scrollPane.height;
scrollPane.cacheAsBitmap = true;
scrollPane.scrollRect = paneRect;
scrollBar.handleSize = ((paneRect.height - 20) / contentHeight);
scrollBar.addEventListener(ScrollEvent.DRAG, scrollBarDrag);
scrollBar.addEventListener(ScrollEvent.STEP_UP, scrollBarStepUp);
scrollBar.addEventListener(ScrollEvent.STEP_DOWN, scrollBarStepDown);
}
protected function updateBarPosition():void{
scrollBar.scrollValue = (paneRect.y / Math.max(1, (contentHeight - paneRect.height)));
}
protected function scrollBarStepUp(_arg1:ScrollEvent):void{
paneRect.y = Math.max(0, (paneRect.y - SPACING));
scrollPane.scrollRect = paneRect;
updateBarPosition();
}
protected function keyChange(_arg1:Event):void{
var _local3:KeyEntry;
var _local2:KeyEntry = (_arg1.target as KeyEntry);
if (!_local2){
return;
};
if (!_local2.bind){
return;
};
for each (_local3 in keyEntries) {
if (_local3 == _local2){
} else {
if (_local3.bind == _local2.bind){
_local3.clearBind();
};
};
};
}
protected function scrollBarDrag(_arg1:ScrollEvent):void{
paneRect.y = (_arg1.value * (contentHeight - paneRect.height));
scrollPane.scrollRect = paneRect;
}
protected function buttonClick(_arg1:MouseEvent):void{
var _local2:KeyEntry;
switch (_arg1.target){
case resetButton:
Input.defaults();
for each (_local2 in keyEntries) {
_local2.reset();
};
break;
case closeButton:
Input.save();
close();
break;
};
}
protected function scrollBarStepDown(_arg1:ScrollEvent):void{
paneRect.y = Math.min((contentHeight - paneRect.height), (paneRect.y + SPACING));
scrollPane.scrollRect = paneRect;
updateBarPosition();
}
protected function addEntry(_arg1:uint, _arg2:Boolean, _arg3:Number, _arg4:Number):void{
var _local5:KeyEntry = new KeyEntry((_arg1 * 2), _arg2);
_local5.x = _arg3;
_local5.y = _arg4;
scrollPane.addChild(_local5);
_local5.addEventListener(Event.CHANGE, keyChange);
keyEntries.push(_local5);
}
override public function dispose():void{
var _local1:TextButton;
var _local2:KeyEntry;
super.dispose();
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
for each (_local2 in keyEntries) {
_local2.removeEventListener(Event.CHANGE, keyChange);
_local2.dispose();
};
}
}
}//package boxhead.ui.screen
Section 225
//ErrorScreen (boxhead.ui.screen.ErrorScreen)
package boxhead.ui.screen {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class ErrorScreen extends Screen {
public var errorField:TextField;
public var instructionsField:TextField;
public var button:SimpleButton;
protected var url:String;
public function ErrorScreen(_arg1:String, _arg2:String, _arg3:String=null){
errorField.text = _arg1;
instructionsField.text = _arg2;
url = _arg3;
if (_arg3){
button.addEventListener(MouseEvent.CLICK, handleButtonClick, false, 0, true);
} else {
button.visible = false;
};
}
protected function handleButtonClick(_arg1:MouseEvent):void{
Links.openLink(url);
}
}
}//package boxhead.ui.screen
Section 226
//HowToPlayScreen (boxhead.ui.screen.HowToPlayScreen)
package boxhead.ui.screen {
import flash.events.*;
import flash.display.*;
import boxhead.sounds.*;
public class HowToPlayScreen extends Screen {
public var clickToSkip:Sprite;
public var slides:MovieClip;
public function HowToPlayScreen(){
clickToSkip.mouseEnabled = (clickToSkip.mouseChildren = false);
slides.stop();
slides.addEventListener(MouseEvent.CLICK, handleClick, false, 0, true);
}
protected function handleClick(_arg1:MouseEvent):void{
SoundControl.playUISound(SoundList.CLICK_SHORT);
if (slides.currentFrame == slides.totalFrames){
close();
} else {
slides.nextFrame();
};
}
}
}//package boxhead.ui.screen
Section 227
//IngameMenuScreen (boxhead.ui.screen.IngameMenuScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.events.*;
import MMOcha.lobby.*;
public class IngameMenuScreen extends Screen {
public var quitButton:TextButton;
protected var buttons:Array;
protected var optionsScreen:OptionsScreen;
protected var confirmScreen:ConfirmQuitScreen;
public var optionsButton:TextButton;
public var closeButton:TextButton;
public function IngameMenuScreen(){
var _local1:TextButton;
super();
buttons = [optionsButton, quitButton, closeButton];
optionsButton.text = "options";
quitButton.text = "quit";
closeButton.text = "close";
for each (_local1 in buttons) {
_local1.addEventListener(MouseEvent.CLICK, buttonClick);
};
}
protected function closeConfirmScreen(_arg1:ScreenEvent=null):void{
if (!confirmScreen){
return;
};
confirmScreen.removeEventListener(ScreenEvent.CLOSE, closeConfirmScreen);
confirmScreen.removeEventListener(ScreenEvent.QUIT, confirmQuit);
if (confirmScreen.parent){
confirmScreen.parent.removeChild(confirmScreen);
};
confirmScreen.dispose();
confirmScreen = null;
}
protected function confirmQuit(_arg1:ScreenEvent):void{
closeConfirmScreen();
dispatchEvent(_arg1);
}
protected function closeOptionsScreen(_arg1:ScreenEvent=null):void{
if (!optionsScreen){
return;
};
optionsScreen.removeEventListener(ScreenEvent.CLOSE, closeConfirmScreen);
if (optionsScreen.parent){
optionsScreen.parent.removeChild(optionsScreen);
};
optionsScreen.dispose();
optionsScreen = null;
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case optionsButton:
if (optionsScreen){
break;
};
showSubscreen((optionsScreen = new OptionsScreen()));
optionsScreen.addEventListener(ScreenEvent.CLOSE, closeOptionsScreen);
break;
case quitButton:
if (confirmScreen){
break;
};
showSubscreen((confirmScreen = new ConfirmQuitScreen()));
confirmScreen.addEventListener(ScreenEvent.CLOSE, closeConfirmScreen);
confirmScreen.addEventListener(ScreenEvent.QUIT, confirmQuit);
break;
case closeButton:
close();
break;
};
}
override public function dispose():void{
var _local1:TextButton;
super.dispose();
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
closeConfirmScreen();
closeOptionsScreen();
}
}
}//package boxhead.ui.screen
Section 228
//MainMenuScreen (boxhead.ui.screen.MainMenuScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.events.*;
import boxhead.ui.*;
import flash.net.*;
import boxhead.assets.*;
import flash.display.*;
import boxhead.sounds.*;
public class MainMenuScreen extends Screen {
protected var buttons:Array;
public var buttonsPanel:Sprite;
protected var sharedObject:SharedObject;
public var howToPlayButton:SimpleButton;
public var quickPlayButton:SimpleButton;
protected var backdrop:Backdrop;
protected var assetLoader:AssetLoader;
protected var fadeTime:int;
public var optionsButton:SimpleButton;
protected static const PRE_FADE:int = 5;
protected static const FADE_BACKDROP:int = 55;
protected static const FADE_BUTTONS:int = 120;
protected static const FADE_WAIT:int = 80;
public function MainMenuScreen(_arg1:Backdrop, _arg2:SharedObject, _arg3:AssetLoader){
var _local4:SimpleButton;
super();
this.backdrop = _arg1;
this.sharedObject = _arg2;
this.assetLoader = _arg3;
quickPlayButton = (buttonsPanel.getChildByName("quickPlayButton") as SimpleButton);
howToPlayButton = (buttonsPanel.getChildByName("howToPlayButton") as SimpleButton);
optionsButton = (buttonsPanel.getChildByName("optionsButton") as SimpleButton);
buttons = [quickPlayButton, howToPlayButton, optionsButton];
for each (_local4 in buttons) {
_local4.addEventListener(MouseEvent.CLICK, buttonClick);
};
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage, false, 0, true);
}
protected function handleFade(_arg1:Event):void{
fadeTime++;
if (fadeTime >= FADE_BUTTONS){
endFade();
} else {
if (fadeTime > FADE_WAIT){
buttonsPanel.alpha = Math.pow(((fadeTime - FADE_WAIT) / (FADE_BUTTONS - FADE_WAIT)), 1.5);
} else {
if (fadeTime == FADE_WAIT){
buttonsPanel.mouseEnabled = (buttonsPanel.mouseChildren = true);
} else {
if (fadeTime > FADE_BACKDROP){
} else {
if (fadeTime == FADE_BACKDROP){
backdrop.alpha = 1;
} else {
if (fadeTime > PRE_FADE){
backdrop.alpha = Math.pow(((fadeTime - PRE_FADE) / (FADE_BACKDROP - PRE_FADE)), 2.5);
};
};
};
};
};
};
}
public function fadeIn():void{
backdrop.alpha = 0;
buttonsPanel.alpha = 0;
buttonsPanel.mouseEnabled = (buttonsPanel.mouseChildren = false);
fadeTime = 0;
addEventListener(Event.ENTER_FRAME, handleFade, false, 0, true);
backdrop.addEventListener(MouseEvent.CLICK, handleSkipFade, false, 0, true);
}
public function authenticationFailed():void{
var _local1:ConnectingScreen = (subscreen as ConnectingScreen);
if (_local1){
_local1.authenticationFailed();
};
}
public function showBanScreen(_arg1:String, _arg2:String):void{
if ((subscreen as BanScreen) == null){
showSubscreen(new BanScreen(_arg1, _arg2));
};
}
override public function dispose():void{
var _local1:SimpleButton;
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
super.dispose();
if (subscreen){
subscreen.close();
};
}
public function showConnectingScreen():void{
if ((subscreen as ConnectingScreen) == null){
showSubscreen(new ConnectingScreen());
};
}
public function showQuickPlayLoadingScreen():void{
if ((subscreen as QuickPlayLoadingScreen) == null){
showSubscreen(new QuickPlayLoadingScreen(assetLoader));
};
}
protected function handleSkipFade(_arg1:MouseEvent):void{
endFade();
}
protected function connect(_arg1:ScreenEvent):void{
if (!subscreen){
return;
};
subscreen.removeEventListener(ScreenEvent.CONNECT, connect);
showConnectingScreen();
dispatchEvent(_arg1);
}
public function showQuickPlaySelectionScreen():void{
if ((subscreen as QuickPlaySelectionScreen) == null){
showSubscreen(new QuickPlaySelectionScreen());
};
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case quickPlayButton:
SoundControl.playUISound(SoundList.CLICK_SHORT);
dispatchEvent(new ScreenEvent(ScreenEvent.QUICK_PLAY));
break;
case howToPlayButton:
SoundControl.playUISound(SoundList.CLICK_SHORT);
showSubscreen(new HowToPlayScreen());
break;
case optionsButton:
SoundControl.playUISound(SoundList.CLICK_SHORT);
showSubscreen(new OptionsScreen());
break;
};
}
protected function endFade():void{
backdrop.alpha = 1;
buttonsPanel.alpha = 1;
buttonsPanel.mouseEnabled = (buttonsPanel.mouseChildren = true);
fadeTime = 0;
removeEventListener(Event.ENTER_FRAME, handleFade);
backdrop.removeEventListener(MouseEvent.CLICK, handleSkipFade);
}
public function connectionFailed():void{
var _local1:ConnectingScreen = (subscreen as ConnectingScreen);
if (_local1){
_local1.connectionFailed();
};
}
protected function handleRemovedFromStage(_arg1:Event):void{
if (backdrop){
backdrop.alpha = 1;
};
}
}
}//package boxhead.ui.screen
Section 229
//MapLoadingScreen (boxhead.ui.screen.MapLoadingScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.events.*;
import MMOcha.lobby.*;
public class MapLoadingScreen extends Screen {
protected var buttons:Array;
public var closeButton:TextButton;
public function MapLoadingScreen(){
var _local1:TextButton;
super();
buttons = [closeButton];
closeButton.text = "cancel";
for each (_local1 in buttons) {
_local1.addEventListener(MouseEvent.CLICK, buttonClick);
};
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case closeButton:
close();
dispatchEvent(new ScreenEvent(ScreenEvent.MENU));
break;
};
}
override public function dispose():void{
var _local1:TextButton;
super.dispose();
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
}
}
}//package boxhead.ui.screen
Section 230
//OptionsScreen (boxhead.ui.screen.OptionsScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.events.*;
import flash.display.*;
import MMOcha.lobby.*;
import boxhead.options.*;
import boxhead.sounds.*;
public class OptionsScreen extends Screen {
protected var buttons:Array;
public var controlsButton:TextButton;
public var closeButton:TextButton;
public var shakeTickBox:OptionTickBox;
protected var controlsScreen:ControlsScreen;
public var bloodTickBox:OptionTickBox;
public var volumeSlider:OptionSlider;
protected var options:Array;
public var resetButton:TextButton;
public var showFPSTickBox:OptionTickBox;
public var weaponsButton:TextButton;
protected var weaponsScreen:WeaponBanksScreen;
public var shellsTickBox:OptionTickBox;
public var shadowTickBox:OptionTickBox;
public var autoShopTickBox:OptionTickBox;
public var footstepsSelector:OptionSelector;
public var smokeTickBox:OptionTickBox;
public function OptionsScreen(){
var _local1:TextButton;
var _local2:Sprite;
super();
buttons = [controlsButton, weaponsButton, resetButton, closeButton];
controlsButton.text = "configure controls";
controlsButton.align("left");
weaponsButton.text = "configure weapon banks";
weaponsButton.align("left");
resetButton.text = "reset";
resetButton.align("left");
closeButton.text = "close";
closeButton.align("right");
for each (_local1 in buttons) {
_local1.addEventListener(MouseEvent.CLICK, buttonClick);
};
options = [volumeSlider, autoShopTickBox, shadowTickBox, bloodTickBox, shellsTickBox, smokeTickBox, shakeTickBox, showFPSTickBox, footstepsSelector];
volumeSlider.displayOptions("Volume", Preferences.volume);
autoShopTickBox.displayOption("Open shop on death", Preferences.autoShop);
shadowTickBox.displayOption("Shadows", Preferences.shadows);
bloodTickBox.displayOption("Blood", Preferences.blood);
shellsTickBox.displayOption("Shell Casings", Preferences.shells);
smokeTickBox.displayOption("Smoke", Preferences.smoke);
shakeTickBox.displayOption("Screen Shake", Preferences.shake);
showFPSTickBox.displayOption("Show FPS", Preferences.showFPS);
footstepsSelector.displayOptions("Footstep Sounds", [Preferences.OFF, Preferences.PLAYER, Preferences.ON], Preferences.footsteps);
for each (_local2 in options) {
_local2.addEventListener(Event.CHANGE, optionChange);
};
resetDisplays();
}
protected function optionChange(_arg1:Event):void{
switch (_arg1.target){
case volumeSlider:
Preferences.volume = volumeSlider.value;
SoundControl.updateVolume();
break;
case autoShopTickBox:
Preferences.autoShop = autoShopTickBox.ticked;
break;
case shadowTickBox:
Preferences.shadows = shadowTickBox.ticked;
break;
case bloodTickBox:
Preferences.blood = bloodTickBox.ticked;
break;
case shellsTickBox:
Preferences.shells = shellsTickBox.ticked;
break;
case smokeTickBox:
Preferences.smoke = smokeTickBox.ticked;
break;
case shakeTickBox:
Preferences.shake = shakeTickBox.ticked;
break;
case showFPSTickBox:
Preferences.showFPS = showFPSTickBox.ticked;
break;
case footstepsSelector:
Preferences.footsteps = (footstepsSelector.selectedOption as String);
break;
};
}
override public function dispose():void{
var _local1:Sprite;
var _local2:TextButton;
super.dispose();
for each (_local1 in options) {
_local1.removeEventListener(Event.CHANGE, optionChange);
};
for each (_local2 in buttons) {
_local2.removeEventListener(MouseEvent.CLICK, buttonClick);
};
if (controlsScreen){
controlsScreen.close();
};
if (weaponsScreen){
weaponsScreen.close();
};
}
protected function resetDisplays():void{
volumeSlider.value = Preferences.volume;
autoShopTickBox.ticked = Preferences.autoShop;
shadowTickBox.ticked = Preferences.shadows;
bloodTickBox.ticked = Preferences.blood;
shellsTickBox.ticked = Preferences.shells;
smokeTickBox.ticked = Preferences.smoke;
shakeTickBox.ticked = Preferences.shake;
showFPSTickBox.ticked = Preferences.showFPS;
footstepsSelector.selectedOption = Preferences.footsteps;
}
protected function reset():void{
Preferences.optionDefaults();
resetDisplays();
}
protected function closeSubscreen(_arg1:ScreenEvent):void{
switch (_arg1.target){
case controlsScreen:
controlsScreen.removeEventListener(ScreenEvent.CLOSE, closeSubscreen);
controlsScreen = null;
break;
case weaponsScreen:
weaponsScreen.removeEventListener(ScreenEvent.CLOSE, closeSubscreen);
weaponsScreen = null;
break;
};
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case controlsButton:
if (controlsScreen){
break;
};
showSubscreen((controlsScreen = new ControlsScreen()));
controlsScreen.addEventListener(ScreenEvent.CLOSE, closeSubscreen);
break;
case weaponsButton:
if (weaponsScreen){
break;
};
showSubscreen((weaponsScreen = new WeaponBanksScreen()));
weaponsScreen.addEventListener(ScreenEvent.CLOSE, closeSubscreen);
break;
case resetButton:
reset();
break;
case closeButton:
Preferences.save();
close();
break;
};
}
}
}//package boxhead.ui.screen
Section 231
//QuickPlayLoadingScreen (boxhead.ui.screen.QuickPlayLoadingScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.assets.*;
import flash.display.*;
import MMOcha.lobby.*;
public class QuickPlayLoadingScreen extends Screen {
protected var buttons:Array;
public var bar:Sprite;
public var closeButton:TextButton;
protected var assetLoader:AssetLoader;
public function QuickPlayLoadingScreen(_arg1:AssetLoader){
var _local2:TextButton;
super();
this.assetLoader = _arg1;
_arg1.addEventListener(ProgressEvent.PROGRESS, handleLoadProgress);
bar.scaleX = _arg1.progress;
buttons = [closeButton];
closeButton.text = "cancel";
for each (_local2 in buttons) {
_local2.addEventListener(MouseEvent.CLICK, buttonClick);
};
}
protected function handleLoadProgress(_arg1:ProgressEvent):void{
bar.scaleX = assetLoader.progress;
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case closeButton:
close();
break;
};
}
override public function dispose():void{
var _local1:TextButton;
assetLoader.removeEventListener(ProgressEvent.PROGRESS, handleLoadProgress);
super.dispose();
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
}
}
}//package boxhead.ui.screen
Section 232
//QuickPlaySelectionScreen (boxhead.ui.screen.QuickPlaySelectionScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.events.*;
import boxhead.ui.*;
import boxhead.game.*;
import flash.display.*;
public class QuickPlaySelectionScreen extends Screen {
protected var buttons:Array;
public var button0:SimpleButton;
public var closeButton:SimpleButton;
public var display0:QuickPlayCharacterDisplay;
public var display1:QuickPlayCharacterDisplay;
protected var displays:Array;
public var button1:SimpleButton;
public function QuickPlaySelectionScreen(){
var _local2:SimpleButton;
var _local3:QuickPlayCharacterDisplay;
var _local4:QuickPlayProfile;
super();
displays = [display0, display1];
buttons = [button0, button1];
var _local1:int;
while (_local1 < 2) {
_local2 = buttons[_local1];
_local2.addEventListener(MouseEvent.CLICK, buttonClick, false, 0, true);
_local3 = displays[_local1];
_local4 = QuickPlayProfile.list[_local1];
_local3.display(_local4);
_local1++;
};
closeButton.addEventListener(MouseEvent.CLICK, closeClick, false, 0, true);
}
protected function closeClick(_arg1:MouseEvent):void{
close();
}
protected function buttonClick(_arg1:MouseEvent):void{
var _local2:int = buttons.indexOf(_arg1.target);
if (_local2 < 0){
return;
};
dispatchEvent(new ScreenEvent(ScreenEvent.QUICK_PLAY, false, false, QuickPlayProfile.list[_local2]));
}
}
}//package boxhead.ui.screen
Section 233
//Screen (boxhead.ui.screen.Screen)
package boxhead.ui.screen {
import boxhead.events.*;
import flash.display.*;
public class Screen extends Sprite {
public var subscreen:Screen;
public function dispose():void{
}
public function close():void{
dispose();
if (parent){
parent.removeChild(this);
};
if (subscreen){
subscreen.close();
};
dispatchEvent(new ScreenEvent(ScreenEvent.CLOSE));
}
protected function subscreenClose(_arg1:ScreenEvent):void{
_arg1.target.removeEventListener(ScreenEvent.CLOSE, subscreenClose);
visible = true;
subscreen = null;
}
protected function showSubscreen(_arg1:Screen):void{
if (subscreen){
subscreen.close();
};
visible = false;
subscreen = _arg1;
if (parent){
parent.addChild(subscreen);
};
subscreen.addEventListener(ScreenEvent.CLOSE, subscreenClose);
}
}
}//package boxhead.ui.screen
Section 234
//WeaponBanksScreen (boxhead.ui.screen.WeaponBanksScreen)
package boxhead.ui.screen {
import flash.events.*;
import boxhead.ui.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.geom.*;
import MMOcha.lobby.*;
public class WeaponBanksScreen extends Screen {
protected var buttons:Array;
public var area1:Sprite;
public var area2:Sprite;
public var area3:Sprite;
public var area4:Sprite;
public var area6:Sprite;
public var area8:Sprite;
protected var areas:Array;
public var area5:Sprite;
public var closeButton:TextButton;
protected var weaponEntries:Array;
protected var bankPositions:Array;
public var area7:Sprite;
public var resetButton:TextButton;
protected var banks:Array;
protected var currentEntry:WeaponEntry;
protected var entryLayer:Sprite;
protected static const SPACING:Number = 14;
public function WeaponBanksScreen(){
var _local1:TextButton;
var _local2:int;
var _local3:WeaponInfo;
var _local4:WeaponEntry;
super();
buttons = [resetButton, closeButton];
resetButton.text = "reset";
resetButton.align("left");
closeButton.text = "close";
closeButton.align("right");
for each (_local1 in buttons) {
_local1.addEventListener(MouseEvent.CLICK, buttonClick);
};
areas = [null, area1, area2, area3, area4, area5, area6, area7, area8];
banks = new Array();
bankPositions = new Array();
_local2 = 1;
while (_local2 <= 8) {
banks[_local2] = new Array();
bankPositions[_local2] = new Point(areas[_local2].x, areas[_local2].y);
_local2++;
};
entryLayer = new Sprite();
addChild(entryLayer);
weaponEntries = new Array();
for each (_local3 in WeaponInfo.getList()) {
if (((!(_local3)) || (!(_local3.available)))){
} else {
_local4 = new WeaponEntry(_local3);
entryLayer.addChild(_local4);
weaponEntries.push(_local4);
_local4.addEventListener(MouseEvent.MOUSE_DOWN, pickupEntry);
};
};
arrange();
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
}
protected function dropEntry(_arg1:MouseEvent):void{
var _local3:Sprite;
var _local4:Point;
var _local5:int;
var _local6:Array;
var _local7:WeaponEntry;
var _local8:Boolean;
var _local9:int;
var _local10:int;
var _local11:Boolean;
var _local12:int;
if (!currentEntry){
return;
};
currentEntry.alpha = 1;
var _local2:Sprite;
for each (_local3 in areas) {
if (!_local3){
} else {
if (_local3.hitTestPoint(mouseX, mouseY)){
_local2 = _local3;
break;
};
};
};
_local8 = false;
if (_local2){
_local9 = currentEntry.info.bankID;
_local10 = areas.indexOf(_local2);
if (banks[_local10].length < 3){
_local6 = banks[_local9];
_local5 = (_local6.length - 1);
while (_local5 >= 0) {
_local7 = _local6[_local5];
if (_local7 == currentEntry){
_local6.splice(_local5, 1);
break;
};
_local5--;
};
currentEntry.info.bankID = _local10;
if (currentEntry.info.upgradeTo){
currentEntry.info.upgradeTo.bankID = _local10;
};
if (currentEntry.info.upgradeFrom){
currentEntry.info.upgradeFrom.bankID = _local10;
};
_local6 = banks[_local10];
_local11 = false;
_local5 = 0;
while (_local5 < _local6.length) {
_local7 = _local6[_local5];
if (mouseY < (_local7.y + (SPACING / 2))){
_local11 = true;
_local6.splice(_local5, 0, currentEntry);
break;
};
_local5++;
};
if (!_local11){
_local6.push(currentEntry);
};
arrangeBank(_local9);
if (_local9 != _local10){
arrangeBank(_local10);
};
_local8 = true;
};
};
if (!_local8){
_local12 = currentEntry.info.bankID;
_local4 = position(_local12, banks[_local12].indexOf(currentEntry));
currentEntry.x = _local4.x;
currentEntry.y = _local4.y;
};
currentEntry = null;
}
protected function arrangeBank(_arg1:int):void{
var _local5:WeaponEntry;
var _local2:Point = bankPositions[_arg1].clone();
var _local3:Array = banks[_arg1];
var _local4:int;
while (_local4 < _local3.length) {
_local5 = _local3[_local4];
_local5.x = _local2.x;
_local5.y = _local2.y;
_local2.y = (_local2.y + SPACING);
_local4++;
};
}
protected function pickupEntry(_arg1:MouseEvent):void{
if (currentEntry){
return;
};
currentEntry = (_arg1.target as WeaponEntry);
if (!currentEntry){
return;
};
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveEntry);
stage.addEventListener(MouseEvent.MOUSE_UP, dropEntry);
currentEntry.alpha = 0.5;
entryLayer.setChildIndex(currentEntry, (entryLayer.numChildren - 1));
}
override public function dispose():void{
var _local1:TextButton;
var _local2:WeaponEntry;
super.dispose();
removedFromStage();
removeEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
for each (_local1 in buttons) {
_local1.removeEventListener(MouseEvent.CLICK, buttonClick);
};
for each (_local2 in weaponEntries) {
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, pickupEntry);
};
}
protected function bake():void{
var _local2:Array;
var _local3:int;
var _local4:WeaponEntry;
var _local1 = 1;
while (_local1 <= 8) {
_local2 = banks[_local1];
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
_local4.info.bankID = _local1;
_local4.info.bankPriority = _local3;
_local3++;
};
_local1++;
};
}
protected function position(_arg1:int, _arg2:int):Point{
var _local3:Point = bankPositions[_arg1].clone();
_local3.y = (_local3.y + (SPACING * _arg2));
return (_local3);
}
protected function arrange():void{
var _local1:Array;
var _local3:WeaponEntry;
var _local4:WeaponInfo;
var _local5:Point;
var _local6:Boolean;
var _local7:WeaponEntry;
var _local2 = 1;
while (_local2 <= 8) {
_local1 = banks[_local2];
while (_local1.length > 0) {
_local1.pop();
};
_local2++;
};
for each (_local3 in weaponEntries) {
_local4 = _local3.info;
_local1 = banks[_local4.bankID];
_local5 = bankPositions[_local4.bankID];
_local3.x = _local5.x;
_local6 = false;
_local2 = 0;
while (_local2 < _local1.length) {
_local7 = _local1[_local2];
if (_local6){
_local7.y = (_local7.y + SPACING);
} else {
if (_local3.info.bankPriority < _local7.info.bankPriority){
_local6 = true;
_local1.splice(_local2, 0, _local3);
_local3.y = position(_local4.bankID, _local2).y;
};
};
_local2++;
};
if (!_local6){
_local3.y = position(_local4.bankID, _local1.length).y;
_local1.push(_local3);
};
};
}
protected function moveEntry(_arg1:MouseEvent):void{
if (!currentEntry){
return;
};
currentEntry.x = (mouseX - (currentEntry.width / 2));
currentEntry.y = (mouseY - (currentEntry.height / 2));
if (stage){
stage.invalidate();
};
}
protected function removedFromStage(_arg1:Event=null):void{
if (!stage){
return;
};
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveEntry);
stage.removeEventListener(MouseEvent.MOUSE_UP, dropEntry);
}
protected function buttonClick(_arg1:MouseEvent):void{
switch (_arg1.target){
case resetButton:
WeaponInfo.defaultBanks();
arrange();
break;
case closeButton:
bake();
WeaponInfo.saveBanks();
close();
break;
};
}
}
}//package boxhead.ui.screen
Section 235
//VersionScreen (boxhead.ui.screen.VersionScreen)
package boxhead.ui.screen {
import flash.display.*;
public class VersionScreen extends Sprite {
}
}//package boxhead.ui.screen
Section 236
//EquipmentDisplay (boxhead.ui.shop.EquipmentDisplay)
package boxhead.ui.shop {
import boxhead.ui.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.text.*;
public class EquipmentDisplay extends Sprite {
protected var nameFormat:TextFormat;
public var descriptionField:TextField;
public var selectionOverlay:Sprite;
public var costField:TextField;
protected var nameY:Number;
public var nameField:TextField;
public var buyDisplay:MovieClip;
public var portraits:WeaponPortraits;
public var buyButton:SimpleButton;
public function EquipmentDisplay(){
nameY = nameField.y;
nameFormat = (nameField.defaultTextFormat = nameField.getTextFormat());
descriptionField.defaultTextFormat = descriptionField.getTextFormat();
costField = (buyDisplay.getChildByName("costField") as TextField);
buyButton = (buyDisplay.getChildByName("button") as SimpleButton);
selectionOverlay = (buyDisplay.getChildByName("selectionOverlay") as Sprite);
selectionOverlay.visible = false;
}
public function displayInfo(_arg1:WeaponInfo, _arg2:Weapon, _arg3:Boolean, _arg4:int):void{
nameField.text = _arg1.name;
nameField.y = nameY;
var _local5:Object = nameFormat.size;
while (nameField.textWidth > nameField.width) {
nameFormat.size = (Number(nameFormat.size) - 1);
nameField.setTextFormat(nameFormat, 0, nameField.text.length);
nameField.y++;
};
nameFormat.size = _local5;
var _local6:int;
portraits.display(_arg2.weaponID);
if (_arg3){
if (_arg2.ammo){
if (!_arg2.ammo.full){
_local6 = (_arg2.ammo.buyCount * _arg1.price.ammoCost);
costField.text = ("$" + _local6);
if (_arg4 >= _local6){
buyDisplay.gotoAndStop("Buy");
} else {
buyDisplay.gotoAndStop("CannotBuy");
};
} else {
costField.text = "";
buyDisplay.gotoAndStop("FullAmmo");
};
} else {
costField.text = "";
buyDisplay.gotoAndStop("Purchased");
};
} else {
_local6 = _arg1.price.cost;
costField.text = ("$" + _local6);
if (_arg4 >= _local6){
buyDisplay.gotoAndStop("Buy");
} else {
buyDisplay.gotoAndStop("CannotBuy");
};
};
buyButton.useHandCursor = (((_local6 > 0)) && ((_arg4 >= _local6)));
if (_arg2.info.description){
descriptionField.text = _arg2.info.description;
} else {
descriptionField.text = "";
};
}
}
}//package boxhead.ui.shop
Section 237
//PremiumBar (boxhead.ui.shop.PremiumBar)
package boxhead.ui.shop {
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class PremiumBar extends MovieClip {
public var selectionOverlay:Sprite;
public var costField:TextField;
public var nameField:TextField;
public var cost:int;
public var premium:Premium;
public var icon:MovieClip;
public var descriptionField:TextField;
public function PremiumBar(){
gotoAndStop("NotOwned");
selectionOverlay.visible = false;
icon.gotoAndStop(1);
nameField.autoSize = TextFieldAutoSize.CENTER;
buttonMode = true;
mouseChildren = false;
}
public function display(_arg1:Premium, _arg2:int):void{
this.premium = _arg1;
icon.gotoAndStop((_arg1.index + 1));
var _local3:Number = nameField.height;
nameField.text = _arg1.name;
nameField.y = Math.round((nameField.y - ((nameField.height - _local3) / 2)));
descriptionField.text = _arg1.description;
update(_arg2);
}
public function update(_arg1:int):void{
if (premium.owned){
gotoAndStop("Owned");
cost = 0;
costField.text = remainingTimeString(premium);
mouseEnabled = false;
setTextAlpha(0.5);
} else {
cost = premium.cost;
costField.text = (("" + cost) + " XCash");
setTextAlpha(1);
if (_arg1 >= cost){
costField.alpha = 1;
gotoAndStop("NotOwned");
mouseEnabled = true;
} else {
costField.alpha = 0.5;
gotoAndStop("CannotBuy");
mouseEnabled = false;
};
};
}
public function setTextAlpha(_arg1:Number):void{
costField.alpha = _arg1;
nameField.alpha = _arg1;
descriptionField.alpha = _arg1;
icon.alpha = _arg1;
}
public function dispose():void{
}
protected static function remainingTimeString(_arg1:Premium):String{
if (_arg1.remainingHours > 9999){
return ("Purchased!");
};
var _local2:int = int(((getTimer() - _arg1.timeReceived) / ((1000 * 60) * 60)));
var _local3:int = Math.max(0, (_arg1.remainingHours - _local2));
var _local4:int = int((_local3 / 24));
if (_local4 > 0){
_local3 = (_local3 - (_local4 * 24));
if (_local3 > 0){
return ((((("" + _local4) + " days, ") + _local3) + " hours remaining."));
};
return ((("" + _local4) + " days remaining."));
} else {
};
return (!NULL!);
}
}
}//package boxhead.ui.shop
Section 238
//PremiumsPage (boxhead.ui.shop.PremiumsPage)
package boxhead.ui.shop {
import flash.events.*;
import boxhead.events.*;
import MMOcha.server.*;
import boxhead.ui.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import MMOcha.lobby.*;
import boxhead.security.*;
import boxhead.sounds.*;
public class PremiumsPage extends Sprite {
public var scrollBar:ShopScrollBar;
public var premiumsPopup:PremiumsPopup;
protected var previousXCash:int;// = -1
public var popupOpen:Boolean;// = false
protected var apiTimeoutTimer:Timer;
public var xCashPopup:XCashPopup;
protected var selectedPremiumBar:PremiumBar;
protected var xCashTimer:Timer;
protected var scrollAreaHeight:Number;
protected var server:MMOchaServer;
public var mtxField:TextField;
protected var user:MMOchaUser;
protected var premiumBars:Array;
public var scrollPane:Sprite;
public var fundButton:SimpleButton;
public var blurbField:TextField;
protected var buyReleased:Boolean;// = true
protected var keySelection:Boolean;// = false
public var scrollArea:Sprite;
protected var scrollAreaRect:Rectangle;
protected static const XCASH_REFRESH_TIME:int = 5000;
protected static const API_TIMEOUT:int = 65000;
protected static const SCROLL_STEP:Number = 50;
public function PremiumsPage(){
scrollAreaRect = scrollArea.getBounds(this);
scrollAreaRect.x = 0;
scrollAreaRect.y = 0;
removeChild(scrollArea);
scrollPane.cacheAsBitmap = true;
scrollAreaHeight = (scrollPane.height + 10);
scrollPane.scrollRect = scrollAreaRect;
scrollBar.addEventListener(ScrollEvent.DRAG, handleScrollPremiums, false, 0, true);
scrollBar.addEventListener(ScrollEvent.STEP_DOWN, handleScrollStepDown, false, 0, true);
scrollBar.addEventListener(ScrollEvent.STEP_UP, handleScrollStepUp, false, 0, true);
premiumBars = new Array();
premiumsPopup = new PremiumsPopup();
premiumsPopup.addEventListener(ShopEvent.CONFIRM, confirmBuyPremium, false, 0, true);
premiumsPopup.addEventListener(ShopEvent.CANCEL, cancelBuyPremium, false, 0, true);
xCashPopup = new XCashPopup();
xCashPopup.addEventListener(ShopEvent.CANCEL, closeXCashPopup, false, 0, true);
xCashTimer = new Timer(XCASH_REFRESH_TIME);
xCashTimer.addEventListener(TimerEvent.TIMER, handleXCashRefresh, false, 0, true);
apiTimeoutTimer = new Timer(API_TIMEOUT, 1);
apiTimeoutTimer.addEventListener(TimerEvent.TIMER_COMPLETE, handleApiTimeout, false, 0, true);
blurbField.addEventListener(TextEvent.LINK, handleBlurbLink, false, 0, true);
fundButton.addEventListener(MouseEvent.CLICK, handleFundClick, false, 0, true);
addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
blurbField.visible = (fundButton.visible = (mtxField.visible = false));
}
protected function handleXCashReceived(_arg1:DatabaseEvent):void{
if (!server){
return;
};
if (previousXCash == server.localUser.mtxCash){
return;
};
closeXCashPopup();
updateMtxField();
updatePremiumBars();
}
protected function showXCashPopup():void{
addChild(xCashPopup);
popupOpen = true;
}
protected function handleScrollStepUp(_arg1:ScrollEvent):void{
scrollAreaRect.y = Math.max(0, (scrollAreaRect.y - SCROLL_STEP));
scrollPane.scrollRect = scrollAreaRect;
updateBarPosition();
}
protected function openXCashURL():void{
Links.openLink(((((Links.PREMIUMS_LINK + "?username=") + server.username) + "&key=") + MD5.hash(server.password)));
showXCashPopup();
xCashTimer.start();
}
protected function handleKeyUp(_arg1:KeyboardEvent):void{
popupOpen = ((!((premiumsPopup.parent == null))) || (!((xCashPopup.parent == null))));
switch (_arg1.keyCode){
case Input.ENTER:
case Input.getBind(Input.FIRE_KEY, true):
case Input.getBind(Input.FIRE_KEY, false):
buyReleased = true;
break;
};
}
protected function handleBuyPremiumResponse(_arg1:DatabaseEvent):void{
var _local2:Premium;
apiTimeoutTimer.stop();
if (_arg1.error){
if (premiumsPopup.parent){
premiumsPopup.displayError(_arg1.error);
};
SoundControl.playUISound(SoundList.CANT_AFFORD);
} else {
_local2 = user.premiums[int(_arg1.data)];
user.mtxCash = (user.mtxCash - _local2.cost);
updateMtxField();
server.updatePremiumsFromDB();
server.getXCash();
updatePremiumBars();
};
}
public function dispose():void{
var _local1:PremiumBar;
for each (_local1 in premiumBars) {
_local1.removeEventListener(MouseEvent.CLICK, handlePremiumBarClick);
_local1.dispose();
};
premiumsPopup.removeEventListener(ShopEvent.CONFIRM, confirmBuyPremium);
premiumsPopup.removeEventListener(ShopEvent.CANCEL, cancelBuyPremium);
xCashPopup.removeEventListener(ShopEvent.CANCEL, closeXCashPopup);
xCashTimer.removeEventListener(TimerEvent.TIMER, handleXCashRefresh);
apiTimeoutTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, handleApiTimeout);
if (server){
server.removeEventListener(DatabaseEvent.XCASH, handleXCashReceived);
server.removeEventListener(DatabaseEvent.GET_PREMIUMS, handlePremiumsReceived);
server.removeEventListener(DatabaseEvent.BUY_PREMIUM, handleBuyPremiumResponse);
server.removeEventListener(ServerEvent.PREMIUMS_REFRESHED, handlePremiumsRefreshed);
};
}
protected function cancelBuyPremium(_arg1:ShopEvent):void{
closePremiumsPopup();
}
protected function handleBlurbLink(_arg1:TextEvent):void{
openXCashURL();
}
protected function handleApiTimeout(_arg1:TimerEvent):void{
premiumsPopup.displayError("Request timed out");
}
protected function setupPremiumBar(_arg1:String, _arg2:int):void{
var _local3:PremiumBar = (scrollPane.getChildByName(_arg1) as PremiumBar);
_local3.display(user.premiums[_arg2], user.mtxCash);
_local3.addEventListener(MouseEvent.CLICK, handlePremiumBarClick);
premiumBars.push(_local3);
}
protected function updateMtxField():void{
if (((!(server)) || ((server.localUser.mtxCash == Premium.RETRIEVING_XCASH)))){
mtxField.text = "Retrieving XCash...";
} else {
if (server.localUser.mtxCash == Premium.XCASH_ERROR){
mtxField.text = "XCash Error";
} else {
mtxField.text = ("XCash: " + server.localUser.mtxCash);
};
};
}
protected function updatePremiumBars():void{
var _local1:PremiumBar;
for each (_local1 in premiumBars) {
_local1.update(user.mtxCash);
};
}
protected function handleScrollPremiums(_arg1:ScrollEvent):void{
scrollAreaRect.y = Math.round((_arg1.value * (scrollAreaHeight - scrollAreaRect.height)));
scrollPane.scrollRect = scrollAreaRect;
}
protected function closeXCashPopup(_arg1:ShopEvent=null):void{
if (xCashPopup.parent){
xCashPopup.parent.removeChild(xCashPopup);
};
xCashTimer.stop();
}
protected function checkPremiumsKeySelection():void{
if (!selectedPremiumBar){
keySelection = false;
} else {
selectedPremiumBar.selectionOverlay.visible = !(selectedPremiumBar.premium.owned);
if (((!(selectedPremiumBar.premium.owned)) && ((user.mtxCash >= selectedPremiumBar.cost)))){
keySelection = true;
} else {
keySelection = false;
};
};
}
public function setServer(_arg1:MMOchaServer):void{
server = _arg1;
user = server.localUser;
setupPremiumBar("pistolsBar", Premium.PISTOLS_ID);
setupPremiumBar("m16Bar", Premium.M16_ID);
setupPremiumBar("railgunBar", Premium.RAILGUN_ID);
setupPremiumBar("armorBar", Premium.ARMOR_ID);
setupPremiumBar("shoesBar", Premium.SHOES_ID);
setupPremiumBar("walletBar", Premium.WALLET_ID);
setupPremiumBar("radarBar", Premium.RADAR_ID);
setupPremiumBar("grenadesBar", Premium.GRENADES_ID);
setupPremiumBar("chargePacksBar", Premium.CHARGE_PACKS_ID);
setupPremiumBar("claymoresBar", Premium.CLAYMORES_ID);
setupPremiumBar("airstrikesBar", Premium.AIRSTRIKES_ID);
setupPremiumBar("barrelsBar", Premium.BARRELS_ID);
setupPremiumBar("barricadesBar", Premium.BARRICADES_ID);
setupPremiumBar("satelliteBar", Premium.SPY_SATELLITE_ID);
setupPremiumBar("devilBar", Premium.DEVIL_ID);
server.addEventListener(DatabaseEvent.XCASH, handleXCashReceived, false, 0, true);
server.addEventListener(DatabaseEvent.GET_PREMIUMS, handlePremiumsReceived, false, 0, true);
server.addEventListener(DatabaseEvent.BUY_PREMIUM, handleBuyPremiumResponse, false, 0, true);
server.addEventListener(ServerEvent.PREMIUMS_REFRESHED, handlePremiumsRefreshed, false, 0, true);
updateMtxField();
updatePremiumBars();
server.getXCash();
}
protected function handleScrollStepDown(_arg1:ScrollEvent):void{
scrollAreaRect.y = Math.min((scrollAreaHeight - scrollAreaRect.height), (scrollAreaRect.y + SCROLL_STEP));
scrollPane.scrollRect = scrollAreaRect;
updateBarPosition();
}
protected function handlePremiumsReceived(_arg1:DatabaseEvent):void{
updatePremiumBars();
}
protected function confirmBuyPremium(_arg1:ShopEvent):void{
server.buyPremium(premiumsPopup.premium.index);
apiTimeoutTimer.reset();
apiTimeoutTimer.start();
}
protected function updateBarPosition():void{
scrollBar.scrollValue = (scrollAreaRect.y / Math.max(1, (scrollAreaHeight - scrollAreaRect.height)));
}
protected function handleRemovedFromStage(_arg1:Event):void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
closePremiumsPopup();
}
protected function handlePremiumsRefreshed(_arg1:ServerEvent):void{
closePremiumsPopup();
SoundControl.playUISound(SoundList.KA_CHING);
}
protected function handleXCashRefresh(_arg1:TimerEvent):void{
if (server){
previousXCash = server.localUser.mtxCash;
server.getXCash();
};
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
switch (_arg1.keyCode){
case Input.ENTER:
case Input.getBind(Input.FIRE_KEY, true):
case Input.getBind(Input.FIRE_KEY, false):
_local7 = buyReleased;
buyReleased = false;
break;
case Input.getBind(Input.UP_KEY, true):
case Input.getBind(Input.UP_KEY, false):
_local5 = true;
break;
case Input.getBind(Input.DOWN_KEY, true):
case Input.getBind(Input.DOWN_KEY, false):
_local6 = true;
break;
case Input.getBind(Input.LEFT_KEY, true):
case Input.getBind(Input.LEFT_KEY, false):
_local3 = true;
break;
case Input.getBind(Input.RIGHT_KEY, true):
case Input.getBind(Input.RIGHT_KEY, false):
_local4 = true;
break;
case Input.getBind(Input.WEAPON_DOWN_KEY, true):
case Input.getBind(Input.WEAPON_DOWN_KEY, false):
_local9 = true;
break;
case Input.getBind(Input.WEAPON_UP_KEY, true):
case Input.getBind(Input.WEAPON_UP_KEY, false):
_local10 = true;
break;
case Input.getBind(Input.WEAPON_UP_KEY, false):
_local10 = true;
break;
case Input.ESCAPE:
_local8 = true;
break;
};
if (((((((((((((((!(_local3)) && (!(_local4)))) && (!(_local5)))) && (!(_local6)))) && (!(_local7)))) && (!(_local8)))) && (!(_local9)))) && (!(_local10)))){
return;
};
if (premiumsPopup.parent){
} else {
if (_local5){
_local2 = premiumBars.indexOf(selectedPremiumBar);
_local2 = (((_local2 + premiumBars.length) - 1) % premiumBars.length);
selectPremiumBar(premiumBars[_local2]);
SoundControl.playUISound(SoundList.CLICK_SHORT);
} else {
if (_local6){
_local2 = premiumBars.indexOf(selectedPremiumBar);
_local2 = (((_local2 + premiumBars.length) + 1) % premiumBars.length);
selectPremiumBar(premiumBars[_local2]);
SoundControl.playUISound(SoundList.CLICK_SHORT);
} else {
if (_local7){
if (keySelection){
buySelectedPremium();
};
};
};
};
};
}
protected function buySelectedPremium():void{
if (((!(selectedPremiumBar)) || (!(keySelection)))){
return;
};
showPremiumPopup();
}
protected function handlePremiumBarClick(_arg1:MouseEvent):void{
var _local2:PremiumBar = (_arg1.currentTarget as PremiumBar);
if (!_local2){
return;
};
if (selectedPremiumBar){
selectedPremiumBar.selectionOverlay.visible = false;
};
selectedPremiumBar = _local2;
selectedPremiumBar.selectionOverlay.visible = true;
SoundControl.playUISound(SoundList.CLICK_SHORT);
showPremiumPopup();
}
protected function selectPremiumBar(_arg1:PremiumBar):void{
if (selectedPremiumBar){
selectedPremiumBar.selectionOverlay.visible = false;
};
selectedPremiumBar = _arg1;
checkPremiumsKeySelection();
}
protected function handleAddedToStage(_arg1:Event):void{
}
protected function showPremiumPopup():void{
if (!selectedPremiumBar){
return;
};
premiumsPopup.display(selectedPremiumBar.premium);
addChild(premiumsPopup);
popupOpen = true;
}
protected function handleFundClick(_arg1:MouseEvent):void{
openXCashURL();
}
protected function closePremiumsPopup():void{
if (premiumsPopup.parent){
premiumsPopup.parent.removeChild(premiumsPopup);
};
}
}
}//package boxhead.ui.shop
Section 239
//PremiumsPopup (boxhead.ui.shop.PremiumsPopup)
package boxhead.ui.shop {
import flash.events.*;
import boxhead.events.*;
import flash.display.*;
import flash.text.*;
import MMOcha.lobby.*;
public class PremiumsPopup extends Sprite {
public var waitingBar:Sprite;
public var cancelButton:TextButton;
public var costField:TextField;
public var nameField:TextField;
public var premium:Premium;
public var icon:MovieClip;
public var buyButton:TextButton;
public function PremiumsPopup(){
buyButton.text = "Buy";
buyButton.useLongClick();
buyButton.addEventListener(MouseEvent.CLICK, handleBuyClick, false, 0, true);
waitingBar.visible = false;
cancelButton.text = "Cancel";
cancelButton.addEventListener(MouseEvent.CLICK, handleCancelClick, false, 0, true);
}
public function handleCancelClick(_arg1:MouseEvent):void{
dispatchEvent(new ShopEvent(ShopEvent.CANCEL, false, false, null, premium));
}
public function display(_arg1:Premium):void{
this.premium = _arg1;
var _local2:Number = nameField.height;
icon.gotoAndStop((_arg1.index + 1));
nameField.text = _arg1.name;
nameField.y = Math.round((nameField.y - ((nameField.height - _local2) / 2)));
costField.text = (("" + _arg1.cost) + " XCash");
waitingBar.visible = false;
costField.visible = true;
buyButton.visible = true;
cancelButton.visible = true;
}
public function handleBuyClick(_arg1:MouseEvent):void{
waitingBar.visible = true;
costField.text = "Please wait...";
buyButton.visible = false;
cancelButton.visible = false;
dispatchEvent(new ShopEvent(ShopEvent.CONFIRM, false, false, null, premium));
}
public function displayError(_arg1:String):void{
waitingBar.visible = false;
costField.visible = true;
costField.text = _arg1;
cancelButton.visible = true;
}
}
}//package boxhead.ui.shop
Section 240
//Shop (boxhead.ui.shop.Shop)
package boxhead.ui.shop {
import flash.events.*;
import boxhead.events.*;
import MMOcha.server.*;
import boxhead.ui.*;
import boxhead.game.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import MMOcha.lobby.*;
import boxhead.sounds.*;
public class Shop extends Sprite {
public var weaponDisplay:WeaponDisplay;
public var weaponsPage:Sprite;
public var moneyField:TextField;
protected var equipmentButtons:Array;
protected var respawnSounded:Boolean;// = true
public var equipmentTab:SimpleButton;
public var weaponUpsell:Sprite;
public var premiumsPage:PremiumsPage;
protected var localPlayer:LocalPlayer;
public var background:MovieClip;
protected var gameStarted:Boolean;// = false
protected var selectedWeaponButton:ShopWeaponButton;
public var enterGameButton:TextButton;
public var equipmentPage:Sprite;
public var weaponsTab:SimpleButton;
protected var weaponButtons:Array;
public var equipmentDisplay:EquipmentDisplay;
protected var selectedEquipmentButton:ShopEquipmentButton;
public var gameBeginField:TextField;
protected var buyReleased:Boolean;// = true
protected var keySelection:String;
public var upsell:Sprite;
public var premiumsTab:SimpleButton;
protected static const UPGRADE1:String = "Upgrade1";
protected static const UPGRADE2:String = "Upgrade2";
protected static const WEAPON:String = "Weapon";
public function Shop(_arg1:LocalPlayer){
this.localPlayer = _arg1;
enterGameButton.text = "Enter Game";
enterGameButton.addEventListener(MouseEvent.CLICK, enterGameClick);
enterGameButton.disable();
enterGameButton.upState.alpha = 0.8;
weaponButtons = new Array();
setupWeaponButton("pistolButton", WeaponInfo.PISTOL_ID, true);
setupWeaponButton("uzisButton", WeaponInfo.AKIMBO_UZIS_ID);
setupWeaponButton("shotgunButton", WeaponInfo.SHOTGUN_ID);
setupWeaponButton("rifleButton", WeaponInfo.RIFLE_ID);
setupWeaponButton("flamerButton", WeaponInfo.FLAMER_ID);
setupWeaponButton("ak47Button", WeaponInfo.AK47_ID);
setupWeaponButton("grenadeLauncherButton", WeaponInfo.GRENADE_LAUNCHER_ID);
setupWeaponButton("plasmaCannonButton", WeaponInfo.PLASMA_CANNON_ID);
setupWeaponButton("minigunButton", WeaponInfo.MINIGUN_ID);
setupWeaponButton("magnumButton", WeaponInfo.MAGNUM_ID);
checkWeaponPremiums();
weaponDisplay = (weaponsPage.getChildByName("weaponDisplay") as WeaponDisplay);
weaponDisplay.buyButton.addEventListener(MouseEvent.CLICK, handleBuyWeaponClick);
weaponDisplay.upgrade1Display.button.addEventListener(MouseEvent.CLICK, handleBuyUpgradeClick);
weaponDisplay.upgrade2Display.button.addEventListener(MouseEvent.CLICK, handleBuyUpgradeClick);
weaponUpsell = (weaponsPage.getChildByName("upsell") as Sprite);
weaponUpsell.visible = false;
equipmentDisplay = (equipmentPage.getChildByName("equipmentDisplay") as EquipmentDisplay);
disableLiteElement(equipmentPage);
disableLiteElement(premiumsPage);
equipmentButtons = new Array();
setupEquipmentButton("grenadesButton", WeaponInfo.GRENADE_THROWER_ID);
setupEquipmentButton("chargePacksButton", WeaponInfo.CHARGE_PACK_PLANTER_ID);
setupEquipmentButton("minesButton", WeaponInfo.CLAYMORE_PLANTER_ID);
setupEquipmentButton("airstrikesButton", WeaponInfo.AIRSTRIKE_THROWER_ID);
setupEquipmentButton("barrelsButton", WeaponInfo.BARREL_PLANTER_ID);
setupEquipmentButton("barricadesButton", WeaponInfo.BARRICADE_PLANTER_ID);
setupEquipmentButton("spySatelliteButton", WeaponInfo.SPY_ID);
background.stop();
weaponsTab.addEventListener(MouseEvent.CLICK, tabClick);
premiumsTab.addEventListener(MouseEvent.CLICK, tabClick);
equipmentTab.addEventListener(MouseEvent.CLICK, tabClick);
removeChild(premiumsPage);
removeChild(equipmentPage);
updateWeaponButtons();
updateEquipmentButtons();
selectWeaponButton(weaponButtons[0]);
addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
showTab(weaponsTab, false);
}
protected function set money(_arg1:int):void{
localPlayer.money = _arg1;
}
protected function checkEquipmentKeySelection():void{
equipmentDisplay.selectionOverlay.visible = false;
keySelection = null;
if (selectedEquipmentButton.fillCost > 0){
equipmentDisplay.selectionOverlay.visible = true;
keySelection = WEAPON;
};
}
protected function handleAddedToStage(_arg1:Event):void{
updateMoneyField();
if (weaponsPage.parent){
updateWeaponButtons();
updateWeaponInfo();
} else {
if (equipmentPage.parent){
updateEquipmentButtons();
updateEquipmentInfo();
};
};
stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
}
protected function handleWeaponClick(_arg1:MouseEvent):void{
var _local2:ShopWeaponButton = (_arg1.target as ShopWeaponButton);
if (!_local2){
return;
};
selectWeaponButton(_local2);
updateWeaponButtons();
SoundControl.playUISound(SoundList.CLICK_SHORT);
}
protected function setupWeaponButton(_arg1:String, _arg2:int, _arg3:Boolean=false):void{
var _local4 = (LiteConstants.WEAPONS.indexOf(_arg2) >= 0);
var _local5:ShopWeaponButton = (weaponsPage.getChildByName(_arg1) as ShopWeaponButton);
_local5.display(WeaponInfo.lookup(_arg2), money, _arg3);
_local5.addEventListener(MouseEvent.CLICK, handleWeaponClick);
_local5.addEventListener(MouseEvent.DOUBLE_CLICK, handleWeaponDoubleClick);
if (!_local4){
_local5.disable();
_local5.update(money);
};
if (weaponButtons.indexOf(_local5) == -1){
weaponButtons.push(_local5);
};
if (_local5 == selectedWeaponButton){
_local5.select();
};
}
public function setCountDown(_arg1:int):void{
if (!gameStarted){
gameBeginField.text = (("Game begins in " + _arg1) + " seconds...");
if (_arg1 <= 0){
gameStarted = true;
gameBeginField.text = "Game has begun!";
enterGameButton.enable();
};
};
}
protected function handleKeyUp(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Input.ENTER:
case Input.getBind(Input.FIRE_KEY, true):
case Input.getBind(Input.FIRE_KEY, false):
buyReleased = true;
break;
};
}
public function buyWeaponByID(_arg1:int, _arg2:Boolean=false):void{
var _local3:ShopEquipmentButton;
var _local4:ShopWeaponButton;
updateWeaponButtons();
updateEquipmentButtons();
for each (_local3 in equipmentButtons) {
if (_local3.weapon.weaponID == _arg1){
selectEquipmentButton(_local3);
buySelectedEquipment(_arg2);
return;
};
};
for each (_local4 in weaponButtons) {
if (_local4.weapon.weaponID == _arg1){
selectWeaponButton(_local4);
buySelectedWeapon(_arg2);
return;
};
};
}
public function get popupOpen():Boolean{
return (premiumsPage.popupOpen);
}
protected function handleEquipmentDoubleClick(_arg1:MouseEvent):void{
buySelectedEquipment();
}
protected function selectWeaponButton(_arg1:ShopWeaponButton):void{
if (selectedWeaponButton){
selectedWeaponButton.deselect();
};
selectedWeaponButton = _arg1;
selectedWeaponButton.select();
updateWeaponInfo();
checkWeaponKeySelection();
}
public function updateRespawnTime(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{
if (((gameStarted) && (_arg2))){
if (_arg3){
if (_arg1 <= 0){
if (!respawnSounded){
SoundControl.playUISound(SoundList.CHARACTER_RESPAWN);
respawnSounded = true;
};
gameBeginField.text = "You are ready to respawn!";
} else {
gameBeginField.text = (("Respawn in " + _arg1) + " seconds...");
};
} else {
gameBeginField.text = "Game is in progress!";
};
};
}
public function updateWeaponButtons():void{
var _local1:ShopWeaponButton;
for each (_local1 in weaponButtons) {
_local1.update(money);
};
}
public function dispose():void{
var _local1:ShopWeaponButton;
var _local2:ShopEquipmentButton;
removeEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);
removeEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
weaponsTab.removeEventListener(MouseEvent.CLICK, tabClick);
premiumsTab.removeEventListener(MouseEvent.CLICK, tabClick);
equipmentTab.removeEventListener(MouseEvent.CLICK, tabClick);
if (stage){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
};
for each (_local1 in weaponButtons) {
_local1.removeEventListener(MouseEvent.CLICK, handleWeaponClick);
_local1.removeEventListener(MouseEvent.DOUBLE_CLICK, handleWeaponDoubleClick);
_local1.dispose();
};
for each (_local2 in equipmentButtons) {
_local2.removeEventListener(MouseEvent.CLICK, handleEquipmentClick);
_local2.removeEventListener(MouseEvent.DOUBLE_CLICK, handleEquipmentDoubleClick);
_local2.dispose();
};
premiumsPage.dispose();
weaponDisplay.buyButton.removeEventListener(MouseEvent.CLICK, handleBuyWeaponClick);
weaponDisplay.upgrade1Display.button.removeEventListener(MouseEvent.CLICK, handleBuyUpgradeClick);
weaponDisplay.upgrade2Display.button.removeEventListener(MouseEvent.CLICK, handleBuyUpgradeClick);
equipmentDisplay.buyButton.removeEventListener(MouseEvent.CLICK, handleBuyEquipmentClick);
}
protected function setupEquipmentButton(_arg1:String, _arg2:int):void{
var _local3:ShopEquipmentButton = (equipmentPage.getChildByName(_arg1) as ShopEquipmentButton);
_local3.display(WeaponInfo.lookup(_arg2), money);
_local3.addEventListener(MouseEvent.CLICK, handleEquipmentClick);
_local3.addEventListener(MouseEvent.DOUBLE_CLICK, handleEquipmentDoubleClick);
equipmentButtons.push(_local3);
}
public function upgradeWeaponByID(_arg1:int, _arg2:int, _arg3:Boolean=false):void{
var _local4:ShopWeaponButton;
for each (_local4 in weaponButtons) {
if (_local4.weapon.weaponID == _arg1){
selectWeaponButton(_local4);
buyUpgrade(_arg2, _arg3);
return;
};
};
}
protected function handleBuyUpgradeClick(_arg1:MouseEvent):void{
if (!selectedWeaponButton){
return;
};
if (!selectedWeaponButton.weaponOwned){
return;
};
if (weaponDisplay.upgrade1Display.contains((_arg1.target as DisplayObject))){
buyUpgrade(1);
} else {
if (weaponDisplay.upgrade2Display.contains((_arg1.target as DisplayObject))){
buyUpgrade(2);
};
};
}
public function updateWeaponInfo():void{
if (!selectedWeaponButton){
return;
};
weaponDisplay.displayInfo(selectedWeaponButton.info, selectedWeaponButton.weapon, selectedWeaponButton.weaponOwned, money);
if (selectedWeaponButton.available){
enableLiteElement(weaponDisplay);
weaponUpsell.visible = false;
} else {
disableLiteElement(weaponDisplay);
weaponUpsell.visible = true;
};
}
protected function buyUpgrade(_arg1:int, _arg2:Boolean=true):void{
var _local3:WeaponUpgrade;
if (!selectedWeaponButton){
return;
};
if (_arg1 == 1){
_local3 = selectedWeaponButton.weapon.upgrade1;
} else {
if (_arg1 == 2){
_local3 = selectedWeaponButton.weapon.upgrade2;
};
};
if (!_local3){
return;
};
if (!_local3.owned){
if (money >= _local3.cost){
money = (money - _local3.cost);
updateMoneyField();
_local3.buy();
updateWeaponButtons();
updateWeaponInfo();
if (_arg2){
SoundControl.playUISound(SoundList.CLICK_LONG);
};
checkWeaponKeySelection();
if (_arg1 == 1){
dispatchEvent(new ShopEvent(ShopEvent.UPGRADE1, false, false, selectedWeaponButton.weapon));
} else {
if (_arg1 == 2){
dispatchEvent(new ShopEvent(ShopEvent.UPGRADE2, false, false, selectedWeaponButton.weapon));
};
};
} else {
if (_arg2){
SoundControl.playUISound(SoundList.CANT_AFFORD);
};
};
};
}
protected function handleWeaponDoubleClick(_arg1:MouseEvent):void{
buySelectedWeapon();
}
protected function get money():int{
return (localPlayer.money);
}
public function updateEquipmentButtons():void{
var _local1:ShopEquipmentButton;
for each (_local1 in equipmentButtons) {
_local1.update(money);
};
}
protected function handleRemovedFromStage(_arg1:Event):void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
}
public function refillWeaponByID(_arg1:int, _arg2:Boolean=false):void{
buyWeaponByID(_arg1, _arg2);
}
protected function updateMoneyField():void{
moneyField.text = ("Your Cash: $" + money);
}
protected function selectEquipmentButton(_arg1:ShopEquipmentButton):void{
if (selectedEquipmentButton){
selectedEquipmentButton.deselect();
};
selectedEquipmentButton = _arg1;
selectedEquipmentButton.select();
updateEquipmentInfo();
checkEquipmentKeySelection();
}
public function reset():void{
var _local1:Weapon;
var _local2:ShopWeaponButton;
var _local3:ShopEquipmentButton;
for each (_local2 in weaponButtons) {
_local1 = _local2.weapon;
_local2.weaponOwned = (((_local1.weaponID == WeaponInfo.PISTOL_ID)) || ((_local1.weaponID == WeaponInfo.AKIMBO_PISTOLS_ID)));
_local2.weapon = _local2.weapon.info.create();
};
for each (_local3 in equipmentButtons) {
_local1 = _local3.weapon;
_local3.weaponOwned = false;
_local3.weapon = _local3.weapon.info.create();
};
selectWeaponButton(weaponButtons[0]);
selectEquipmentButton(equipmentButtons[0]);
showTab(weaponsTab, false);
checkWeaponKeySelection();
gameStarted = false;
gameBeginField.text = "Game will begin shortly...";
enterGameButton.disable();
}
protected function handleBuyWeaponClick(_arg1:MouseEvent):void{
buySelectedWeapon();
}
protected function checkWeaponKeySelection():void{
weaponDisplay.upgrade1Display.selectionOverlay.visible = false;
weaponDisplay.upgrade2Display.selectionOverlay.visible = false;
weaponDisplay.selectionOverlay.visible = false;
keySelection = null;
if (selectedWeaponButton.fillCost > 0){
weaponDisplay.selectionOverlay.visible = true;
keySelection = WEAPON;
} else {
if (selectedWeaponButton.weaponOwned){
if (((selectedWeaponButton.weapon.upgrade1) && (!(selectedWeaponButton.weapon.upgrade1.owned)))){
weaponDisplay.upgrade1Display.selectionOverlay.visible = true;
keySelection = UPGRADE1;
} else {
if (((selectedWeaponButton.weapon.upgrade2) && (!(selectedWeaponButton.weapon.upgrade2.owned)))){
weaponDisplay.upgrade2Display.selectionOverlay.visible = true;
keySelection = UPGRADE2;
};
};
};
};
}
protected function buySelectedWeapon(_arg1:Boolean=true):void{
var _local2:Boolean;
if (!selectedWeaponButton){
return;
};
if (((selectedWeaponButton.available) && ((selectedWeaponButton.fillCost > 0)))){
if (money >= selectedWeaponButton.fillCost){
_local2 = selectedWeaponButton.weaponOwned;
money = (money - selectedWeaponButton.fillCost);
updateMoneyField();
selectedWeaponButton.fill(money);
updateWeaponButtons();
updateWeaponInfo();
if (_arg1){
SoundControl.playUISound(SoundList.CLICK_LONG);
};
checkWeaponKeySelection();
if (_local2){
dispatchEvent(new ShopEvent(ShopEvent.REFILL, false, false, selectedWeaponButton.weapon));
} else {
dispatchEvent(new ShopEvent(ShopEvent.BUY, false, false, selectedWeaponButton.weapon));
};
} else {
if (_arg1){
SoundControl.playUISound(SoundList.CANT_AFFORD);
};
};
};
}
protected function weaponIDOwned(_arg1:int):Boolean{
var _local2:ShopWeaponButton;
for each (_local2 in weaponButtons) {
if (_local2.weapon.weaponID == _arg1){
return (_local2.weaponOwned);
};
};
return (false);
}
protected function showTab(_arg1:Object, _arg2:Boolean=true):void{
if (_arg2){
SoundControl.playUISound(SoundList.CLICK_SHORT);
};
weaponsTab.mouseEnabled = !((_arg1 == weaponsTab));
premiumsTab.mouseEnabled = !((_arg1 == premiumsTab));
equipmentTab.mouseEnabled = !((_arg1 == equipmentTab));
switch (_arg1){
case weaponsTab:
background.gotoAndStop(1);
addChild(weaponsPage);
if (upsell.parent){
upsell.parent.removeChild(upsell);
};
if (premiumsPage.parent){
premiumsPage.parent.removeChild(premiumsPage);
};
if (equipmentPage.parent){
equipmentPage.parent.removeChild(equipmentPage);
};
enterGameButton.visible = (gameBeginField.visible = (moneyField.visible = true));
updateWeaponButtons();
updateWeaponInfo();
break;
case premiumsTab:
background.gotoAndStop(2);
addChild(premiumsPage);
if (weaponsPage.parent){
weaponsPage.parent.removeChild(weaponsPage);
};
if (equipmentPage.parent){
equipmentPage.parent.removeChild(equipmentPage);
};
if (upsell.parent == this){
setChildIndex(upsell, (numChildren - 1));
} else {
addChild(upsell);
};
break;
case equipmentTab:
background.gotoAndStop(3);
addChild(equipmentPage);
if (weaponsPage.parent){
weaponsPage.parent.removeChild(weaponsPage);
};
if (premiumsPage.parent){
premiumsPage.parent.removeChild(premiumsPage);
};
if (upsell.parent == this){
setChildIndex(upsell, (numChildren - 1));
} else {
addChild(upsell);
};
enterGameButton.visible = (gameBeginField.visible = (moneyField.visible = true));
updateEquipmentButtons();
updateEquipmentInfo();
break;
};
}
public function checkWeaponPremiums():void{
if (!localPlayer){
return;
};
if (localPlayer.premiumOwned(Premium.PISTOLS_ID)){
setupWeaponButton("pistolButton", WeaponInfo.AKIMBO_PISTOLS_ID, true);
};
if (localPlayer.premiumOwned(Premium.M16_ID)){
setupWeaponButton("ak47Button", WeaponInfo.M16_ID, ((weaponIDOwned(WeaponInfo.AK47_ID)) || (weaponIDOwned(WeaponInfo.M16_ID))));
};
if (localPlayer.premiumOwned(Premium.RAILGUN_ID)){
setupWeaponButton("magnumButton", WeaponInfo.RAILGUN_ID, ((weaponIDOwned(WeaponInfo.MAGNUM_ID)) || (weaponIDOwned(WeaponInfo.RAILGUN_ID))));
};
updateWeaponInfo();
updateWeaponButtons();
}
protected function handleEquipmentClick(_arg1:MouseEvent):void{
var _local2:ShopEquipmentButton = (_arg1.target as ShopEquipmentButton);
if (!_local2){
return;
};
selectEquipmentButton(_local2);
updateEquipmentButtons();
SoundControl.playUISound(SoundList.CLICK_SHORT);
}
protected function get hidePremiums():Boolean{
return (((Constants.HIDE_PREMIUMS) || (localPlayer.user.quickPlay)));
}
protected function disableLiteElement(_arg1:Sprite):void{
_arg1.mouseChildren = false;
_arg1.mouseEnabled = false;
_arg1.transform.colorTransform = new ColorTransform(0.1, 0.1, 0.1);
_arg1.blendMode = BlendMode.LAYER;
_arg1.cacheAsBitmap = true;
}
public function setServer(_arg1:MMOchaServer):void{
premiumsPage.setServer(_arg1);
}
public function getOwnedWeapons():Array{
var _local2:ShopWeaponButton;
var _local3:ShopEquipmentButton;
var _local1:Array = new Array();
for each (_local2 in weaponButtons) {
if (_local2.weaponOwned){
_local1.push(_local2.weapon);
};
};
for each (_local3 in equipmentButtons) {
if (_local3.weaponOwned){
_local1.push(_local3.weapon);
};
};
return (_local1);
}
protected function enableLiteElement(_arg1:Sprite):void{
_arg1.mouseChildren = true;
_arg1.mouseEnabled = true;
_arg1.transform.colorTransform = new ColorTransform();
_arg1.blendMode = BlendMode.NORMAL;
_arg1.cacheAsBitmap = false;
}
public function closed():void{
respawnSounded = false;
}
protected function buySelectedEquipment(_arg1:Boolean=true):void{
var _local2:Boolean;
}
public function getFreeWeaponByID(_arg1:int):Weapon{
var _local2:int;
var _local3:ShopWeaponButton;
var _local4:ShopEquipmentButton;
_local2 = 0;
while (_local2 < weaponButtons.length) {
_local3 = weaponButtons[_local2];
if (_local3.weapon.weaponID == _arg1){
_local3.weaponOwned = true;
return (_local3.weapon);
};
_local2++;
};
_local2 = 0;
while (_local2 < equipmentButtons.length) {
_local4 = equipmentButtons[_local2];
if (_local4.weapon.weaponID == _arg1){
_local4.weaponOwned = true;
return (_local4.weapon);
};
_local2++;
};
Debug.error((("Weapon " + WeaponInfo.lookup(_arg1).name) + " not found in shop."));
return (WeaponInfo.lookup(_arg1).create());
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
if (!selectedWeaponButton){
return;
};
switch (_arg1.keyCode){
case Input.ENTER:
case Input.getBind(Input.FIRE_KEY, true):
case Input.getBind(Input.FIRE_KEY, false):
_local7 = buyReleased;
buyReleased = false;
break;
case Input.getBind(Input.UP_KEY, true):
case Input.getBind(Input.UP_KEY, false):
_local5 = true;
break;
case Input.getBind(Input.DOWN_KEY, true):
case Input.getBind(Input.DOWN_KEY, false):
_local6 = true;
break;
case Input.getBind(Input.LEFT_KEY, true):
case Input.getBind(Input.LEFT_KEY, false):
_local3 = true;
break;
case Input.getBind(Input.RIGHT_KEY, true):
case Input.getBind(Input.RIGHT_KEY, false):
_local4 = true;
break;
case Input.getBind(Input.WEAPON_DOWN_KEY, true):
case Input.getBind(Input.WEAPON_DOWN_KEY, false):
_local9 = true;
break;
case Input.getBind(Input.WEAPON_UP_KEY, true):
case Input.getBind(Input.WEAPON_UP_KEY, false):
_local10 = true;
break;
case Input.getBind(Input.WEAPON_UP_KEY, false):
_local10 = true;
break;
case Input.ESCAPE:
_local8 = true;
break;
};
if (((((((((((((((!(_local3)) && (!(_local4)))) && (!(_local5)))) && (!(_local6)))) && (!(_local7)))) && (!(_local8)))) && (!(_local9)))) && (!(_local10)))){
return;
};
if (popupOpen){
return;
};
if (premiumsPage.parent){
if (_local10){
showTab(equipmentTab);
} else {
if (_local9){
showTab(weaponsTab);
};
};
} else {
if (weaponsPage.parent){
if (_local10){
showTab(premiumsTab);
} else {
if (_local5){
_local2 = weaponButtons.indexOf(selectedWeaponButton);
_local2 = (((_local2 + weaponButtons.length) - 1) % weaponButtons.length);
selectWeaponButton(weaponButtons[_local2]);
updateWeaponButtons();
SoundControl.playUISound(SoundList.CLICK_SHORT);
} else {
if (_local6){
_local2 = weaponButtons.indexOf(selectedWeaponButton);
_local2 = (((_local2 + weaponButtons.length) + 1) % weaponButtons.length);
selectWeaponButton(weaponButtons[_local2]);
updateWeaponButtons();
SoundControl.playUISound(SoundList.CLICK_SHORT);
} else {
if (_local3){
if (keySelection == UPGRADE2){
keySelection = UPGRADE1;
weaponDisplay.upgrade2Display.selectionOverlay.visible = false;
weaponDisplay.upgrade1Display.selectionOverlay.visible = true;
SoundControl.playUISound(SoundList.CLICK_SHORT);
} else {
if (keySelection == UPGRADE1){
keySelection = WEAPON;
weaponDisplay.upgrade1Display.selectionOverlay.visible = false;
weaponDisplay.selectionOverlay.visible = true;
SoundControl.playUISound(SoundList.CLICK_SHORT);
};
};
} else {
if (_local4){
if (keySelection == WEAPON){
keySelection = UPGRADE1;
weaponDisplay.selectionOverlay.visible = false;
weaponDisplay.upgrade1Display.selectionOverlay.visible = true;
SoundControl.playUISound(SoundList.CLICK_SHORT);
} else {
if (keySelection == UPGRADE1){
keySelection = UPGRADE2;
weaponDisplay.upgrade1Display.selectionOverlay.visible = false;
weaponDisplay.upgrade2Display.selectionOverlay.visible = true;
SoundControl.playUISound(SoundList.CLICK_SHORT);
};
};
} else {
if (_local7){
switch (keySelection){
case WEAPON:
buySelectedWeapon();
break;
case UPGRADE1:
buyUpgrade(1);
break;
case UPGRADE2:
buyUpgrade(2);
break;
};
};
};
};
};
};
};
} else {
if (equipmentPage.parent){
if (_local9){
showTab(premiumsTab);
};
};
};
};
}
protected function tabClick(_arg1:MouseEvent):void{
showTab(_arg1.target);
}
public function updateEquipmentInfo():void{
if (!selectedEquipmentButton){
return;
};
equipmentDisplay.displayInfo(selectedEquipmentButton.info, selectedEquipmentButton.weapon, selectedEquipmentButton.weaponOwned, money);
}
protected function enterGameClick(_arg1:MouseEvent):void{
dispatchEvent(new ShopEvent(ShopEvent.CLOSE));
}
protected function handleBuyEquipmentClick(_arg1:MouseEvent):void{
buySelectedEquipment();
}
}
}//package boxhead.ui.shop
Section 241
//ShopEquipmentButton (boxhead.ui.shop.ShopEquipmentButton)
package boxhead.ui.shop {
import boxhead.world.weapon.*;
import flash.display.*;
import flash.text.*;
public class ShopEquipmentButton extends MovieClip {
public var weapon:Weapon;
public var selectionOverlay:Sprite;
public var weaponOwned:Boolean;// = false
public var ammoField:TextField;
public var info:WeaponInfo;
public var nameField:TextField;
public var fillCost:int;// = 0
public static const HEIGHT:Number = 17;
public function update(_arg1:int):void{
var _local2:WeaponPrice = info.price;
var _local3:Boolean;
if (weapon.ammo){
if (weapon.ammo.max > 1){
if (weapon.ammo.count > 0){
ammoField.text = ("x" + weapon.ammo.count);
} else {
ammoField.text = "";
};
} else {
if (weapon.ammo.count > 0){
ammoField.text = "Purchased";
} else {
ammoField.text = "";
};
};
} else {
ammoField.text = "";
};
if (((weaponOwned) && (((!(weapon.ammo)) || ((weapon.ammo.count > 0)))))){
gotoAndStop("Owned");
if (weapon.ammo){
_local3 = weapon.ammo.full;
fillCost = (weapon.ammo.buyCount * _local2.ammoCost);
ammoField.text = ("x" + weapon.ammo.count);
} else {
_local3 = true;
fillCost = 0;
ammoField.text = "Purchased";
};
} else {
gotoAndStop("NotOwned");
ammoField.text = "";
fillCost = _local2.cost;
};
}
public function display(_arg1:WeaponInfo, _arg2:int):void{
nameField.mouseEnabled = false;
nameField.defaultTextFormat = nameField.getTextFormat();
nameField.text = _arg1.name;
ammoField.mouseEnabled = false;
ammoField.defaultTextFormat = ammoField.getTextFormat();
buttonMode = true;
mouseChildren = false;
this.info = _arg1;
weapon = _arg1.create();
doubleClickEnabled = true;
selectionOverlay.visible = false;
}
public function dispose():void{
}
public function fill(_arg1:int):void{
var _local2:Ammo;
if (!weaponOwned){
weaponOwned = true;
update(_arg1);
} else {
_local2 = weapon.ammo;
if (_local2){
weapon.ammo.add(_local2.buyCount);
weapon.ammoWarningGiven = false;
update(_arg1);
};
};
}
public function select():void{
selectionOverlay.visible = true;
}
public function deselect():void{
selectionOverlay.visible = false;
}
}
}//package boxhead.ui.shop
Section 242
//ShopScrollBar (boxhead.ui.shop.ShopScrollBar)
package boxhead.ui.shop {
import flash.events.*;
import flash.display.*;
import MMOcha.lobby.*;
public class ShopScrollBar extends Sprite {
public var upButton:Sprite;
public var background:Sprite;
protected var value:Number;// = 0
public var downButton:Sprite;
public var handle:Sprite;
protected static const STEP:Number = 0.1;
public function ShopScrollBar(){
var _local1:Sprite;
super();
for each (_local1 in [background, handle, upButton, downButton]) {
_local1.buttonMode = true;
};
upButton.addEventListener(MouseEvent.CLICK, handleUpClick, false, 0, true);
downButton.addEventListener(MouseEvent.CLICK, handleDownClick, false, 0, true);
background.addEventListener(MouseEvent.MOUSE_DOWN, handleStartDrag, false, 0, true);
handle.addEventListener(MouseEvent.MOUSE_DOWN, handleStartDrag, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
}
protected function handleRemovedFromStage(_arg1:Event):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleMove);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleStopDrag);
}
protected function handleUpClick(_arg1:MouseEvent):void{
value = Math.max(0, (value - STEP));
moveHandleToValue();
dispatchEvent(new ScrollEvent(ScrollEvent.STEP_UP, false, false, value));
}
public function set scrollValue(_arg1:Number):void{
this.value = _arg1;
moveHandleToValue();
}
protected function handleStartDrag(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleMove, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, handleStopDrag, false, 0, true);
}
protected function handleStopDrag(_arg1:MouseEvent):void{
handleMove(_arg1);
if (stage){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleMove);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleStopDrag);
};
}
protected function handleMove(_arg1:MouseEvent):void{
handle.y = Math.max(background.y, Math.min(((background.y + background.height) - handle.height), (mouseY - (handle.height / 2))));
value = ((handle.y - background.y) / (background.height - handle.height));
dispatchEvent(new ScrollEvent(ScrollEvent.DRAG, false, false, value));
}
protected function moveHandleToValue():void{
handle.y = (background.y + Math.round((value * (background.height - handle.height))));
}
protected function handleDownClick(_arg1:MouseEvent):void{
value = Math.min(1, (value + STEP));
moveHandleToValue();
dispatchEvent(new ScrollEvent(ScrollEvent.STEP_DOWN, false, false, value));
}
}
}//package boxhead.ui.shop
Section 243
//ShopWeaponButton (boxhead.ui.shop.ShopWeaponButton)
package boxhead.ui.shop {
import boxhead.world.weapon.*;
import flash.display.*;
import flash.text.*;
public class ShopWeaponButton extends MovieClip {
public var available:Boolean;// = true
public var upgrade2Display:MovieClip;
public var ammoDisplay:MovieClip;
public var weapon:Weapon;
public var selectionOverlay:Sprite;
public var weaponOwned:Boolean;// = false
public var upgrade1Display:MovieClip;
public var info:WeaponInfo;
public var nameField:TextField;
public var fillCost:int;// = 0
public static const HEIGHT:Number = 17;
public function display(_arg1:WeaponInfo, _arg2:int, _arg3:Boolean=false):void{
nameField.mouseEnabled = false;
nameField.defaultTextFormat = nameField.getTextFormat();
nameField.text = _arg1.name;
buttonMode = true;
mouseChildren = false;
this.info = _arg1;
weapon = _arg1.create();
weaponOwned = _arg3;
doubleClickEnabled = true;
selectionOverlay.visible = false;
}
public function fill(_arg1:int):void{
var _local2:Ammo;
if (!weaponOwned){
weaponOwned = true;
update(_arg1);
} else {
_local2 = weapon.ammo;
if (_local2){
weapon.ammo.add(_local2.buyCount);
weapon.ammoWarningGiven = false;
update(_arg1);
};
};
}
public function update(_arg1:int):void{
var _local2:WeaponPrice = info.price;
var _local3:Boolean;
if (!available){
gotoAndStop("Unavailable");
} else {
if (weaponOwned){
gotoAndStop("Owned");
if (weapon.ammo){
ammoDisplay.gotoAndStop((1 + Math.round(((weapon.ammo.count / weapon.ammo.max) * (ammoDisplay.totalFrames - 1)))));
_local3 = weapon.ammo.full;
fillCost = (weapon.ammo.buyCount * _local2.ammoCost);
} else {
_local3 = true;
fillCost = 0;
ammoDisplay.gotoAndStop(ammoDisplay.totalFrames);
};
if (weapon.upgrade1){
if (weapon.upgrade1.owned){
upgrade1Display.gotoAndStop("Owned");
} else {
upgrade1Display.gotoAndStop("NotOwned");
};
} else {
upgrade1Display.gotoAndStop("Unavailable");
};
if (weapon.upgrade2){
if (weapon.upgrade2.owned){
upgrade2Display.gotoAndStop("Owned");
} else {
upgrade2Display.gotoAndStop("NotOwned");
};
} else {
upgrade2Display.gotoAndStop("Unavailable");
};
} else {
gotoAndStop("NotOwned");
upgrade1Display.gotoAndStop("Unavailable");
upgrade2Display.gotoAndStop("Unavailable");
ammoDisplay.gotoAndStop(1);
fillCost = _local2.cost;
};
};
}
public function dispose():void{
}
public function disable():void{
nameField.textColor = 0x808080;
nameField.alpha = 0.6;
available = false;
}
public function select():void{
selectionOverlay.visible = true;
}
public function deselect():void{
selectionOverlay.visible = false;
}
}
}//package boxhead.ui.shop
Section 244
//UpgradeDisplay (boxhead.ui.shop.UpgradeDisplay)
package boxhead.ui.shop {
import boxhead.world.weapon.*;
import flash.display.*;
import flash.text.*;
public class UpgradeDisplay extends MovieClip {
public var descriptionField:TextField;
public var selectionOverlay:Sprite;
public var costField:TextField;
public var button:SimpleButton;
public var upgradeField:TextField;
public function UpgradeDisplay(){
selectionOverlay.visible = false;
}
public function display(_arg1:int, _arg2:WeaponUpgrade, _arg3:Boolean, _arg4:int):void{
if (!_arg2){
visible = false;
return;
};
visible = true;
upgradeField.text = ("Upgrade " + _arg1);
upgradeField.mouseEnabled = false;
descriptionField.mouseEnabled = false;
costField.mouseEnabled = false;
descriptionField.text = _arg2.toString();
if (_arg2.owned){
gotoAndStop("Owned");
costField.text = "Purchased!";
setTextAlpha(0.5);
} else {
costField.text = ("$" + _arg2.cost);
if (((_arg3) && ((_arg4 >= _arg2.cost)))){
gotoAndStop("Buy");
} else {
gotoAndStop("CannotBuy");
};
setTextAlpha(1);
};
button.useHandCursor = ((((_arg3) && (!(_arg2.owned)))) && ((_arg4 >= _arg2.cost)));
}
public function setTextAlpha(_arg1:Number):void{
costField.alpha = _arg1;
upgradeField.alpha = _arg1;
descriptionField.alpha = _arg1;
}
}
}//package boxhead.ui.shop
Section 245
//WeaponDisplay (boxhead.ui.shop.WeaponDisplay)
package boxhead.ui.shop {
import boxhead.ui.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.text.*;
public class WeaponDisplay extends Sprite {
protected var nameFormat:TextFormat;
public var buyDisplay:MovieClip;
public var selectionOverlay:Sprite;
public var upgrade2Display:UpgradeDisplay;
public var costField:TextField;
protected var nameY:Number;
public var nameField:TextField;
public var upgrade1Display:UpgradeDisplay;
public var portraits:WeaponPortraits;
public var statsField:TextField;
public var buyButton:SimpleButton;
public function WeaponDisplay(){
nameY = nameField.y;
nameFormat = (nameField.defaultTextFormat = nameField.getTextFormat());
statsField.defaultTextFormat = statsField.getTextFormat();
costField = (buyDisplay.getChildByName("costField") as TextField);
buyButton = (buyDisplay.getChildByName("button") as SimpleButton);
selectionOverlay = (buyDisplay.getChildByName("selectionOverlay") as Sprite);
selectionOverlay.visible = false;
}
public function displayInfo(_arg1:WeaponInfo, _arg2:Weapon, _arg3:Boolean, _arg4:int):void{
nameField.text = _arg1.name;
nameField.y = nameY;
var _local5:Object = nameFormat.size;
while (nameField.textWidth > nameField.width) {
nameFormat.size = (Number(nameFormat.size) - 1);
nameField.setTextFormat(nameFormat, 0, nameField.text.length);
nameField.y++;
};
nameFormat.size = _local5;
var _local6:int;
portraits.display(_arg2.weaponID);
if (_arg3){
if (((_arg2.ammo) && (!(_arg2.ammo.full)))){
_local6 = (_arg2.ammo.buyCount * _arg1.price.ammoCost);
costField.text = ("$" + _local6);
if (_arg4 >= _local6){
buyDisplay.gotoAndStop("Refill");
} else {
buyDisplay.gotoAndStop("CannotRefill");
};
} else {
costField.text = "";
buyDisplay.gotoAndStop("FullAmmo");
};
} else {
_local6 = _arg1.price.cost;
costField.text = ("$" + _local6);
if (_arg4 >= _local6){
buyDisplay.gotoAndStop("Buy");
} else {
buyDisplay.gotoAndStop("CannotBuy");
};
};
buyButton.useHandCursor = (((_local6 > 0)) && ((_arg4 >= _local6)));
upgrade1Display.display(1, _arg2.upgrade1, _arg3, _arg4);
upgrade2Display.display(2, _arg2.upgrade2, _arg3, _arg4);
statsField.text = ((((("Damage: " + _arg2.damageDescription) + "\nRate of Fire: ") + _arg2.rateOfFireDescription) + "\nMax Ammo: ") + _arg2.maxAmmoDescription);
}
}
}//package boxhead.ui.shop
Section 246
//XCashPopup (boxhead.ui.shop.XCashPopup)
package boxhead.ui.shop {
import flash.events.*;
import boxhead.events.*;
import flash.display.*;
import MMOcha.lobby.*;
public class XCashPopup extends Sprite {
public var cancelButton:TextButton;
public function XCashPopup(){
cancelButton.text = "Close";
cancelButton.addEventListener(MouseEvent.CLICK, handleCancelClick, false, 0, true);
}
public function handleCancelClick(_arg1:MouseEvent):void{
dispatchEvent(new ShopEvent(ShopEvent.CANCEL));
}
}
}//package boxhead.ui.shop
Section 247
//WeaponSlider (boxhead.ui.weaponSlider.WeaponSlider)
package boxhead.ui.weaponSlider {
import flash.events.*;
import boxhead.events.*;
import boxhead.world.weapon.*;
import flash.display.*;
public class WeaponSlider extends Sprite {
protected var openPiece:WeaponSliderPiece;
protected var currentDisplay:WeaponSliderDisplay;
protected var bankDisplays:Array;
protected var currentBank:int;// = 1
protected var expandedUntil:Number;// = 0
protected var weaponDisplays:Array;
protected var currentWeapon:Weapon;
protected var expanded:Boolean;// = false
protected var weaponBanks:Array;
public static const DISABLED_ALPHA:Number = 0.4;
public function WeaponSlider(){
var _local2:WeaponSliderDisplay;
super();
bankDisplays = new Array(9);
openPiece = new WeaponSliderPiece();
openPiece.removeChild(openPiece.textField);
openPiece.gotoAndStop("Mid");
addChild(openPiece);
weaponDisplays = new Array();
var _local1:int;
while (_local1 < 3) {
_local2 = (weaponDisplays[_local1] = new WeaponSliderDisplay());
_local2.addEventListener(MouseEvent.CLICK, handleDisplayClick, false, 0, true);
_local1++;
};
}
protected function handlePieceClick(_arg1:MouseEvent):void{
var _local2:WeaponSliderPiece = (_arg1.currentTarget as WeaponSliderPiece);
var _local3:int = bankDisplays.indexOf(_local2);
if (_local3 >= 0){
expanded = true;
expandedUntil = (Time.current + 5000);
expandBank(_local3);
};
}
public function updateWeaponList(_arg1:Array):void{
var _local3:Array;
var _local4:WeaponSliderPiece;
weaponBanks = _arg1;
var _local2 = 1;
while (_local2 <= 8) {
_local3 = weaponBanks[_local2];
if (!_local3){
} else {
_local4 = bankDisplays[_local2];
if (!_local4){
_local4 = (bankDisplays[_local2] = new WeaponSliderPiece());
_local4.addEventListener(MouseEvent.CLICK, handlePieceClick, false, 0, true);
_local4.textField.text = ("" + _local2);
addChildAt(_local4, 0);
};
};
_local2++;
};
arrange();
updateTabs();
}
protected function showDisplay(_arg1:WeaponSliderDisplay, _arg2:Weapon, _arg3:int):void{
addChild(_arg1);
_arg1.x = (openPiece.x + ((_arg3 - 0.5) * WeaponSliderDisplay.SPACING));
_arg1.display(_arg2);
if (_arg2 == currentWeapon){
currentDisplay = _arg1;
_arg1.highlighted = true;
} else {
_arg1.highlighted = false;
};
}
public function update(_arg1:Weapon, _arg2:Boolean=false):void{
if (!weaponBanks){
return;
};
if (((_arg1) && (!((_arg1 == currentWeapon))))){
currentWeapon = _arg1;
expanded = true;
expandedUntil = (Time.current + 5000);
expandBank(currentWeapon.bankID);
} else {
if (currentWeapon){
if (((expanded) && (((currentWeapon.firedRecently) || ((Time.current > expandedUntil)))))){
expanded = false;
collapseBank();
};
};
};
if (currentWeapon){
currentDisplay.update(_arg2);
};
}
public function clear():void{
var _local1:WeaponSliderPiece;
weaponBanks = null;
while (bankDisplays.length) {
_local1 = bankDisplays.pop();
if (_local1){
_local1.removeEventListener(MouseEvent.CLICK, handlePieceClick);
if (_local1.parent){
_local1.parent.removeChild(_local1);
};
};
};
}
protected function collapseBank():void{
if (((!(weaponBanks)) || (!(currentWeapon)))){
return;
};
currentBank = currentWeapon.bankID;
var _local1:WeaponSliderDisplay = weaponDisplays[0];
addChild(_local1);
_local1.display(currentWeapon);
currentDisplay = _local1;
_local1.highlighted = true;
arrange();
}
protected function updateTabs():void{
var _local2:Array;
var _local3:WeaponSliderPiece;
var _local4:Boolean;
var _local5:Weapon;
if (!weaponBanks){
return;
};
var _local1 = 1;
while (_local1 <= 8) {
_local2 = weaponBanks[_local1];
if (!_local2){
} else {
_local3 = bankDisplays[_local1];
_local4 = false;
for each (_local5 in _local2) {
if (_local5.available){
_local4 = true;
break;
};
};
if (_local4){
_local3.textField.alpha = 1;
} else {
_local3.textField.alpha = DISABLED_ALPHA;
};
_local3.mouseEnabled = _local4;
};
_local1++;
};
}
protected function arrange():void{
var _local1:int;
var _local3:WeaponSliderPiece;
var _local5:WeaponSliderPiece;
var _local6:WeaponSliderDisplay;
var _local7:Weapon;
if (((!(weaponBanks)) || (!(currentWeapon)))){
return;
};
var _local2:int;
_local1 = 1;
while (_local1 <= 8) {
_local5 = bankDisplays[_local1];
if (!_local5){
} else {
if (currentBank == _local1){
openPiece.x = _local2;
if (expanded){
openPiece.width = (weaponBanks[_local1].length * WeaponSliderDisplay.SPACING);
} else {
openPiece.width = WeaponSliderDisplay.SPACING;
};
_local2 = (_local2 + openPiece.width);
};
_local5.x = _local2;
_local5.gotoAndStop("Bank");
_local2 = (_local2 + _local5.width);
_local3 = _local5;
};
_local1++;
};
if (_local3){
_local3.gotoAndStop("End");
};
var _local4:Array = weaponBanks[currentBank];
if (!_local4){
return;
};
_local1 = 0;
while (_local1 < 3) {
_local6 = weaponDisplays[_local1];
if (expanded){
if (_local1 >= _local4.length){
if (_local6.parent){
_local6.parent.removeChild(_local6);
};
} else {
_local7 = _local4[_local1];
showDisplay(_local6, _local7, (_local4.length - _local1));
};
} else {
if (_local1 == 0){
showDisplay(_local6, currentWeapon, 1);
} else {
if (_local6.parent){
_local6.parent.removeChild(_local6);
};
};
};
_local1++;
};
}
protected function handleDisplayClick(_arg1:MouseEvent):void{
var _local2:WeaponSliderDisplay = (_arg1.currentTarget as WeaponSliderDisplay);
if (!_local2){
return;
};
dispatchEvent(new WeaponSliderEvent(WeaponSliderEvent.SELECT, false, false, _local2.weapon));
}
protected function expandBank(_arg1:int):void{
if (((!(weaponBanks)) || (!(currentWeapon)))){
return;
};
var _local2:Array = weaponBanks[_arg1];
if (!_local2){
return;
};
currentBank = _arg1;
arrange();
updateTabs();
}
}
}//package boxhead.ui.weaponSlider
Section 248
//WeaponSliderDisplay (boxhead.ui.weaponSlider.WeaponSliderDisplay)
package boxhead.ui.weaponSlider {
import boxhead.ui.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.filters.*;
public class WeaponSliderDisplay extends Sprite {
protected var previousAmmo:int;// = -1
public var hitButton:SimpleButton;
public var nameField:TextField;
public var ammoField:TextField;
protected var _highlighted:Boolean;// = false
public var portrait:WeaponPortraits;
public var weapon:Weapon;
public static const SPACING:Number = 50;
protected static const ammoTick:BitmapData = new AMMO_TICK().bitmapData;
protected static const GLOW:GlowFilter = new GlowFilter(11579456, 1, 6, 6, 4);
protected static const AMMO_TICK:Class = WeaponSliderDisplay_AMMO_TICK;
public function WeaponSliderDisplay(){
ammoField.autoSize = TextFieldAutoSize.LEFT;
hitArea = (hitButton.hitTestState as Sprite);
buttonMode = true;
mouseChildren = false;
}
public function display(_arg1:Weapon):void{
this.weapon = _arg1;
portrait.display(_arg1.weaponID);
nameField.text = _arg1.info.abbreviatedName;
previousAmmo = -1;
update();
}
public function set highlighted(_arg1:Boolean):void{
if (_arg1 == _highlighted){
return;
};
_highlighted = _arg1;
if (_arg1){
portrait.filters = [GLOW];
} else {
portrait.filters = [];
};
}
public function update(_arg1:Boolean=false):void{
var _local2:int;
if (weapon.ammo){
_local2 = weapon.ammo.count;
};
if ((((_local2 == previousAmmo)) && (!(_arg1)))){
return;
};
if (((weapon.ammo) && ((_local2 == 0)))){
nameField.alpha = (ammoField.alpha = WeaponSlider.DISABLED_ALPHA);
} else {
nameField.alpha = (ammoField.alpha = 1);
};
if (weapon.ammo){
ammoField.text = ("" + _local2);
} else {
ammoField.text = "INF";
};
previousAmmo = _local2;
var _local3:Rectangle = ammoField.getBounds(this);
var _local4:Number = ((SPACING / 2) - 1);
var _local5:Number = (Math.ceil((_local3.right / 4)) * 4);
var _local6:int = int(((_local4 - _local5) / ammoTick.width));
_local5 = (_local4 - (_local6 * ammoTick.width));
if (weapon.ammo){
_local6 = Math.round(((_local6 * weapon.ammo.count) / weapon.ammo.max));
};
_local4 = (_local5 + (_local6 * ammoTick.width));
var _local7:int = (ammoField.y + 4);
graphics.clear();
graphics.beginBitmapFill(ammoTick, new Matrix(1, 0, 0, 1, _local5, _local7));
graphics.drawRect(_local5, _local7, (_local4 - _local5), ammoTick.height);
}
}
}//package boxhead.ui.weaponSlider
Section 249
//WeaponSliderDisplay_AMMO_TICK (boxhead.ui.weaponSlider.WeaponSliderDisplay_AMMO_TICK)
package boxhead.ui.weaponSlider {
import mx.core.*;
public class WeaponSliderDisplay_AMMO_TICK extends BitmapAsset {
}
}//package boxhead.ui.weaponSlider
Section 250
//WeaponSliderPiece (boxhead.ui.weaponSlider.WeaponSliderPiece)
package boxhead.ui.weaponSlider {
import flash.display.*;
import flash.text.*;
public class WeaponSliderPiece extends MovieClip {
public var hitButton:SimpleButton;
public var textField:TextField;
public function WeaponSliderPiece(){
stop();
hitArea = (hitButton.hitTestState as Sprite);
buttonMode = true;
mouseChildren = false;
mouseEnabled = true;
}
}
}//package boxhead.ui.weaponSlider
Section 251
//Backdrop (boxhead.ui.Backdrop)
package boxhead.ui {
import flash.display.*;
public class Backdrop extends Sprite {
}
}//package boxhead.ui
Section 252
//CharacterBox (boxhead.ui.CharacterBox)
package boxhead.ui {
import boxhead.world.*;
import boxhead.world.thing.character.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.geom.*;
public class CharacterBox extends Sprite {
public var outline:MovieClip;
public var background:Sprite;
public var offset:Sprite;
protected var bitmapData:BitmapData;
public var unknownAnim:Sprite;
public var stencil:Sprite;
public var waitingAnim:MovieClip;
public function CharacterBox(){
outline.stop();
removeChild(stencil);
removeChild(background);
removeChild(outline);
removeChild(offset);
removeChild(unknownAnim);
bitmapData = new BitmapData(stencil.width, stencil.height, true, 0);
bitmapData.draw(background);
bitmapData.draw(outline);
addChildAt(new Bitmap(bitmapData), 0);
}
protected function removeWaitingAnim():void{
if (waitingAnim){
if (waitingAnim.parent){
waitingAnim.parent.removeChild(waitingAnim);
};
waitingAnim.stop();
waitingAnim = null;
};
}
public function drawCharacter(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int=0):void{
removeWaitingAnim();
removeUnknownAnim();
var _local6:PlayerCharacter = new PlayerCharacter();
_local6.active = true;
_local6.pickupWeapon(WeaponInfo.lookup(_arg5).create());
_local6.selectStartWeapon(false);
_local6.dir = Direction.SW;
_local6.animator.idle();
_local6.overhead1.alpha = 0;
_local6.overhead2.alpha = 0;
_local6.healthBar.alpha = 0;
_local6.headModelIndex = _arg1;
_local6.headColorIndex = _arg2;
_local6.bodyModelIndex = _arg3;
_local6.bodyColorIndex = _arg4;
var _local7:Point = new Point(offset.x, offset.y);
var _local8:BitmapData = new BitmapData(bitmapData.width, bitmapData.height, false, 0);
var _local9:BitmapData = new BitmapData(bitmapData.width, bitmapData.height, true, 0);
_local8.draw(background);
_local6.drawShadow(_local9, _local7);
_local9.colorTransform(_local9.rect, new ColorTransform(1, 1, 1, Constants.SHADOW_ALPHA));
_local8.copyPixels(_local9, _local8.rect, new Point(0, 0), null, null, true);
_local6.draw(_local8, _local7);
bitmapData.copyPixels(_local8, _local8.rect, new Point(0, 0));
bitmapData.draw(stencil, null, null, BlendMode.ERASE);
bitmapData.draw(outline);
}
public function useGoldOutline():void{
outline.gotoAndStop(2);
bitmapData.fillRect(bitmapData.rect, 0);
bitmapData.draw(background);
bitmapData.draw(outline);
}
public function clear():void{
removeWaitingAnim();
removeUnknownAnim();
bitmapData.fillRect(bitmapData.rect, 0);
bitmapData.draw(background);
bitmapData.draw(outline);
}
public function unknown():void{
removeWaitingAnim();
bitmapData.fillRect(bitmapData.rect, 0);
bitmapData.draw(background);
bitmapData.draw(outline);
addChild(unknownAnim);
}
protected function removeUnknownAnim():void{
if (unknownAnim.parent){
unknownAnim.parent.removeChild(unknownAnim);
};
}
}
}//package boxhead.ui
Section 253
//CharacterPointer (boxhead.ui.CharacterPointer)
package boxhead.ui {
import boxhead.world.*;
import boxhead.world.thing.character.*;
import flash.display.*;
public class CharacterPointer extends NavPointer {
protected var character:Character;
public function targetCharacter(_arg1:Character, _arg2:String, _arg3:uint, _arg4:String):void{
thing = (character = _arg1);
caption1.setColor(_arg3);
caption1.update(_arg2);
caption2.update(_arg4);
}
override public function draw(_arg1:BitmapData, _arg2:Position):void{
if (((!(character)) || (!(thing)))){
return;
};
if (((!(character.active)) || (character.dead))){
return;
};
super.draw(_arg1, _arg2);
}
}
}//package boxhead.ui
Section 254
//ChatMessage (boxhead.ui.ChatMessage)
package boxhead.ui {
import boxhead.game.*;
public class ChatMessage extends HudMessage {
public static const HEIGHT:int = 16;
public function ChatMessage(_arg1:Player, _arg2:String){
if (((_arg1) && (_arg1.name))){
_arg2 = ((_arg1.name + ": ") + _arg2);
};
super(_arg2, ((_arg1) && (_arg1.isLocal)), true);
}
override protected function get FADE_LENGTH():int{
return (200);
}
override protected function createStoredText():void{
storedText = new StoredText(StoredText.ChatText);
}
override protected function get LENGTH():int{
return (8000);
}
}
}//package boxhead.ui
Section 255
//Console (boxhead.ui.Console)
package boxhead.ui {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import MMOcha.server.*;
import MMOcha.lobby.*;
import boxhead.events.*;
import flash.text.*;
import flash.ui.*;
public class Console extends Sprite {
public var scrollBar:ScrollBar;
protected var pingMatrix:Matrix;
public var inField:TextField;
public var outField:TextField;
public var pingField:TextField;
protected var inIndex:int;// = 0
public var pingDisplay:Sprite;
protected var pingTimes:Array;
protected static const MAX_MESSAGES_IN:int = 20;
protected static const Y_MARGIN:Number = 5;
protected static const MAX_MESSAGES_OUT:int = 200;
protected static const X_MARGIN:Number = 5;
protected static const CONSOLE_HEIGHT:Number = 270;
private static var _display:Console;
protected static var messagesIn:Array = new Array();
private static var _pingEnabled:Boolean = true;
protected static var messagesOut:Array = new Array();
protected static var _connection:MMOchaServer;
public function Console(){
scrollBar.arrange();
scrollBar.handleSize = 1;
pingMatrix = new Matrix();
pingMatrix.createGradientBox(10, 10, (Math.PI / 2), 0, -10);
outField.addEventListener(Event.SCROLL, onScrollOutField, false, 0, true);
scrollBar.addEventListener(ScrollEvent.DRAG, onBarDrag, false, 0, true);
scrollBar.addEventListener(ScrollEvent.STEP_UP, onBarStepUp, false, 0, true);
scrollBar.addEventListener(ScrollEvent.STEP_DOWN, onBarStepDown, false, 0, true);
addEventListener(Event.ADDED_TO_STAGE, addedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
}
protected function onBarDrag(_arg1:ScrollEvent):void{
outField.removeEventListener(Event.SCROLL, onScrollOutField, false);
outField.scrollV = (outField.maxScrollV * _arg1.value);
outField.addEventListener(Event.SCROLL, onScrollOutField, false, 0, true);
regainFocus();
}
protected function regainFocus():void{
if (stage){
stage.focus = inField;
inField.setSelection(inField.text.length, inField.text.length);
};
}
protected function onBarStepUp(_arg1:ScrollEvent):void{
outField.scrollV--;
updateBarPosition();
regainFocus();
}
protected function updateBarPosition():void{
scrollBar.scrollValue = ((outField.scrollV - 1) / Math.max(1, (outField.maxScrollV - 1)));
}
protected function keyDown(_arg1:KeyboardEvent):void{
var _local2:String;
if (Input.isConsoleKey(_arg1.keyCode)){
if (stage){
stage.focus = stage;
};
return;
};
switch (_arg1.keyCode){
case Keyboard.ENTER:
_local2 = inField.text;
inField.text = "";
inField.setSelection(0, 0);
if (((((_local2) && (_local2.length))) && (!((_local2 == "/"))))){
processInput(_local2);
};
break;
case Keyboard.UP:
inIndex = Math.max(0, (inIndex - 1));
showInIndex();
break;
case Keyboard.DOWN:
inIndex = Math.min(messagesIn.length, (inIndex + 1));
showInIndex();
break;
};
}
protected function processInput(_arg1:String):void{
var _local4:int;
messagesIn.push(_arg1);
while (messagesIn.length > MAX_MESSAGES_IN) {
messagesIn.shift();
};
inIndex = messagesIn.length;
if (_arg1.charAt(0) == "/"){
_arg1 = _arg1.substr(1);
};
var _local2:Array = _arg1.toLowerCase().split(" ");
var _local3:String = _local2.shift();
switch (_local3){
case "ping":
if (((connection) && (connection.connected))){
print(("Ping: " + connection.ping));
} else {
print("Not COnnected");
};
break;
case "flood":
_local4 = ((parseInt(_local2[0])) || (20));
while (_local4 > 0) {
print("flood");
_local4--;
};
break;
default:
break;
};
dispatchEvent(new ConsoleEvent(ConsoleEvent.INPUT, false, false, _local3, _local2));
}
protected function addedToStage(_arg1:Event):void{
regainFocus();
refresh();
updatePingDisplay();
addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
Input.pause();
}
protected function updatePingDisplay():void{
var _local3:int;
var _local4:Number;
if (!stage){
return;
};
pingDisplay.graphics.clear();
if (((((((!(connection)) || (!(pingTimes)))) || (!(pingTimes.length)))) || (!(pingEnabled)))){
pingField.text = "";
return;
};
pingDisplay.graphics.lineStyle(2, 0xFF);
pingDisplay.graphics.lineGradientStyle(GradientType.LINEAR, [0xFF0000, 0xFFFF00], [100, 100], [0, 0xFF], pingMatrix);
var _local1:int;
var _local2:int;
while (_local2 < pingTimes.length) {
_local3 = pingTimes[_local2];
_local1 = (_local1 + _local3);
_local4 = (Math.min(_local3, 1000) / 10);
if (_local2 == 0){
pingDisplay.graphics.moveTo(-50, -(_local4));
} else {
if (_local2 < 5){
pingDisplay.graphics.lineTo((-50 + (_local2 * 12.5)), -(_local4));
};
};
_local2++;
};
pingField.text = (("" + int((_local1 / pingTimes.length))) + "ms");
}
protected function updateBarSize():void{
scrollBar.handleSize = ((outField.bottomScrollV - (outField.scrollV - 1)) / outField.numLines);
}
protected function onBarStepDown(_arg1:ScrollEvent):void{
outField.scrollV++;
updateBarPosition();
regainFocus();
}
protected function showInIndex():void{
if (inIndex >= messagesIn.length){
inField.text = "";
} else {
inField.text = messagesIn[inIndex];
};
inField.setSelection(inField.text.length, inField.text.length);
}
protected function onScrollOutField(_arg1:Event):void{
scrollBar.scrollValue = ((outField.scrollV - 1) / (outField.maxScrollV - 1));
regainFocus();
}
protected function pingReceived(_arg1:ServerEvent):void{
pingTimes = connection.getPingTimes();
updatePingDisplay();
}
protected function removedFromStage(_arg1:Event):void{
removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
Input.resume();
}
protected function refresh():void{
if (!stage){
return;
};
if (!messagesOut.length){
outField.text = "";
return;
};
var _local1 = (outField.scrollV == outField.maxScrollV);
var _local2:String = messagesOut[0];
var _local3 = 1;
while (_local3 < messagesOut.length) {
_local2 = (_local2 + ("\n" + messagesOut[_local3]));
_local3++;
};
outField.text = _local2;
if (_local1){
outField.scrollV = outField.maxScrollV;
};
updateBarSize();
updateBarPosition();
}
public static function get display():Console{
if (!_display){
_display = new (Console);
};
return (_display);
}
public static function set pingEnabled(_arg1:Boolean):void{
_pingEnabled = _arg1;
display.updatePingDisplay();
}
public static function get connection():MMOchaServer{
return (_connection);
}
public static function get dispatcher():EventDispatcher{
return (display);
}
public static function get pingEnabled():Boolean{
return (_pingEnabled);
}
public static function print(_arg1:String):void{
if (((_arg1) && (_arg1.length))){
messagesOut.push(_arg1);
while (messagesOut.length > MAX_MESSAGES_OUT) {
messagesOut.shift();
};
if (_display){
display.refresh();
};
};
}
public static function set connection(_arg1:MMOchaServer):void{
if (_arg1 == _connection){
return;
};
if (_connection){
connection.removeEventListener(ServerEvent.PING, display.pingReceived);
};
_connection = _arg1;
if (_connection){
connection.addEventListener(ServerEvent.PING, display.pingReceived, false, 0, true);
};
}
}
}//package boxhead.ui
Section 256
//GUI (boxhead.ui.GUI)
package boxhead.ui {
import MMOcha.server.*;
import boxhead.world.*;
import boxhead.game.*;
import flash.display.*;
import flash.geom.*;
import boxhead.options.*;
public class GUI {
protected var warningDisplay:StoredText;
protected var bountyIconBmd:BitmapData;
protected var bountyDisplay:StoredText;
protected var fpsDisplay:StoredText;
protected var placingDisplay:StoredText;
protected var inputDisplay:StoredText;
protected var bountyPoint:Point;
protected var inputText:String;
protected var height:int;
protected var moneyPoint:Point;
protected var inputOpen:Boolean;// = false
protected var moneyDestination:Point;
protected var fpsPoint:Point;
protected var timeDisplay:StoredText;
protected var money:int;
protected var timePoint:Point;
protected var width:int;
protected var messages:Array;
protected var warningPoint:Point;
protected var warnings:Array;
protected var _numPointers:int;// = 0
protected var moneyDisplay:StoredText;
protected var placingPoint:Point;
protected var bountyPoints:int;
protected var moneyFloaters:Array;
protected var leaderboard:Array;
protected var leaderPointers:Array;
protected static const MESSAGES_OFFSET:Point = new Point(5, (Constants.WINDOW.height - 40));
protected static const BountyPointsIcon:Class = GUI_BountyPointsIcon;
protected static const CHAT_INPUT_OFFSET:Point = new Point(5, (Constants.WINDOW.height - 20));
protected static const LEADERBOARD_SLOTS:int = 3;
protected static const VALID_INPUT:String = "1234567890-=!@#$%^&*()_+`~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]\{}|':",./<>? ";
protected static var MAX_MESSAGES:int = 6;
public function GUI(_arg1:int, _arg2:int){
width = _arg1;
height = _arg2;
moneyPoint = new Point((width - 2), -1);
placingPoint = new Point((width / 2), -1);
bountyPoint = new Point((width - 4), 42);
timePoint = new Point((width - 4), 62);
fpsPoint = new Point((width - 5), 82);
warningPoint = new Point((width * 0.5), (height * 0.8));
moneyDestination = new Point((width - 100), 25);
bountyIconBmd = new BountyPointsIcon().bitmapData;
moneyDisplay = new StoredText(StoredText.ScoreText);
placingDisplay = new StoredText(StoredText.ScoreText);
bountyDisplay = new StoredText(StoredText.BountyText, 15780645);
timeDisplay = new StoredText(StoredText.TimeText);
fpsDisplay = new StoredText(StoredText.FPSText);
warningDisplay = new StoredText(StoredText.WarningText);
inputDisplay = new StoredText(StoredText.ChatText);
placingDisplay.changeAlign(StoredText.CENTER);
moneyDisplay.alpha = 0.8;
placingDisplay.alpha = 0.8;
bountyDisplay.alpha = 0.8;
timeDisplay.alpha = 0.8;
fpsDisplay.alpha = 0.8;
moneyFloaters = new Array();
warnings = new Array();
messages = new Array();
leaderboard = new Array();
leaderPointers = new Array();
numPointers = 1;
setMoney(0);
setBountyPoints(0);
}
public function updateFPS(_arg1:Number):void{
fpsDisplay.update((("" + _arg1) + "fps"));
}
public function setMoney(_arg1:int):void{
money = _arg1;
}
public function showGlobal(_arg1:String):void{
Console.print(("**Server**: " + _arg1));
showWarning((("** " + _arg1) + " **"), 8000);
}
protected function updateInputDisplay():void{
inputDisplay.update(("> " + inputText), true);
}
protected function insertMessage(_arg1:HudMessage):void{
messages.unshift(_arg1);
if (messages.length > MAX_MESSAGES){
messages.pop();
};
}
public function getInput():String{
return (inputText);
}
public function openInput():void{
inputOpen = true;
inputText = "";
updateInputDisplay();
}
public function addMessage(_arg1:String, _arg2:Boolean, _arg3:Boolean):void{
var _local4:HudMessage = new HudMessage(_arg1, _arg2, _arg3);
Console.print(_arg1);
insertMessage(_local4);
}
public function closeInput():void{
inputOpen = false;
inputText = "";
}
public function dispose():void{
var _local1:HudMessage;
timeDisplay.dispose();
fpsDisplay.dispose();
warningDisplay.dispose();
for each (_local1 in messages) {
_local1.dispose();
};
}
public function updateTime(_arg1:int):void{
var _local2:int = int((_arg1 / 60));
var _local3:int = int((_arg1 % 60));
var _local4:String = ("" + _local3);
while (_local4.length < 2) {
_local4 = ("0" + _local4);
};
timeDisplay.update(((("" + _local2) + ":") + _local4));
}
public function draw(_arg1:BitmapData, _arg2:Position):void{
var _local3:int;
var _local4:int;
var _local5:Point;
var _local6:HudMessage;
var _local9:CharacterPointer;
var _local10:Warning;
var _local11:String;
var _local12:int;
var _local13:int;
var _local14:String;
var _local15:ScoreFloater;
if (warnings.length){
_local3 = (warnings.length - 1);
while (_local3 >= 0) {
_local10 = warnings[_local3];
_local4 = (Time.current - _local10.startTime);
if (_local4 > _local10.time){
warnings.pop();
} else {
_local11 = _local10.message;
_local12 = _local11.indexOf("[seconds]");
if (_local12 >= 0){
_local13 = Math.ceil(((_local10.time - _local4) / 1000));
_local14 = ("" + _local13);
if (_local13 == 1){
_local14 = (_local14 + " second");
} else {
_local14 = (_local14 + " seconds");
};
_local11 = ((_local11.substr(0, _local12) + _local14) + _local11.substr((_local12 + 9)));
};
warningDisplay.update(((" " + _local11) + " "));
warningDisplay.draw(_arg1, warningPoint);
break;
};
_local3--;
};
};
_local5 = MESSAGES_OFFSET.clone();
_local3 = 0;
while (_local3 < messages.length) {
_local6 = messages[_local3];
_local6.fade();
if (_local6.finished){
messages.splice(_local3, 1);
} else {
_local6.storedText.draw(_arg1, _local5);
_local5.y = (_local5.y - ChatMessage.HEIGHT);
};
_local3++;
};
if (inputOpen){
inputDisplay.draw(_arg1, CHAT_INPUT_OFFSET);
};
var _local7:int = money;
_local3 = (moneyFloaters.length - 1);
while (_local3 >= 0) {
_local15 = moneyFloaters[_local3];
_local15.update();
if (_local15.finished){
moneyFloaters.splice(_local3, 1);
} else {
_local7 = (_local7 - _local15.score);
_local15.draw(_arg1);
};
_local3--;
};
moneyDisplay.update(("$" + _local7));
moneyDisplay.draw(_arg1, moneyPoint);
placingDisplay.draw(_arg1, placingPoint);
bountyDisplay.draw(_arg1, bountyPoint);
timeDisplay.draw(_arg1, timePoint);
if (Preferences.showFPS){
fpsDisplay.draw(_arg1, fpsPoint);
};
var _local8:Point = new Point(((bountyPoint.x - bountyDisplay.getTextWidth()) - 22), (bountyPoint.y + 2));
_arg1.copyPixels(bountyIconBmd, bountyIconBmd.rect, _local8, null, null, true);
for each (_local9 in leaderPointers) {
_local9.draw(_arg1, _arg2);
};
}
public function showWarning(_arg1:String, _arg2:int):void{
warnings.push(new Warning(_arg1, Time.current, _arg2));
}
public function addChatMessage(_arg1:Player, _arg2:String):void{
var _local3:ChatMessage = new ChatMessage(_arg1, _arg2);
Console.print(_local3.consoleMessage);
insertMessage(_local3);
}
public function addKillMessage(_arg1:Player, _arg2:Player, _arg3:int):void{
var _local4:KillMessage = new KillMessage(_arg1, _arg2, _arg3);
Console.print(_local4.consoleMessage);
insertMessage(_local4);
}
public function setBountyPoints(_arg1:int):void{
bountyPoints = _arg1;
bountyDisplay.update(("BountyPoints " + bountyPoints));
}
public function appendInput(_arg1:uint):void{
if (!inputOpen){
return;
};
var _local2:String = String.fromCharCode(_arg1);
var _local3 = (VALID_INPUT.indexOf(_local2) >= 0);
if (_local3){
inputText = (inputText + _local2);
updateInputDisplay();
};
}
public function updateLeaderboard(_arg1:Array):void{
var _local2:int;
var _local3:Player;
var _local4:CharacterPointer;
var _local5:int;
var _local6:Player;
var _local7:int;
var _local8:uint;
leaderboard = _arg1.concat();
_local2 = (leaderboard.length - 1);
while (_local2 >= 0) {
_local3 = leaderboard[_local2];
if (((!(_local3.character)) || (!(_local3.character.active)))){
leaderboard.splice(_local2, 1);
};
_local2--;
};
_local2 = 1;
while (_local2 < leaderboard.length) {
_local3 = leaderboard[_local2];
_local5 = (_local2 - 1);
while (_local5 >= 0) {
_local6 = leaderboard[_local5];
if ((((_local3.score > _local6.score)) || ((((_local3.score == _local6.score)) && (_local6.isLocal))))){
leaderboard[(_local5 + 1)] = _local6;
leaderboard[_local5] = _local3;
} else {
break;
};
_local5--;
};
_local2++;
};
_local2 = 0;
while (_local2 < leaderboard.length) {
_local3 = leaderboard[_local2];
_local3.placing = (_local2 + 1);
if (_local3.character){
_local3.character.updateOverheads();
};
_local2++;
};
if (leaderboard.length <= 1){
for each (_local4 in leaderPointers) {
_local4.target(null, "", "");
};
} else {
_local7 = 0;
_local2 = 0;
while (_local2 < leaderPointers.length) {
_local4 = leaderPointers[_local2];
if (_local7 >= leaderboard.length){
_local4.target(null, "", "");
} else {
_local3 = leaderboard[_local7];
if (_local3.isLocal){
_local2--;
} else {
_local8 = 0xFFFFFF;
if (_local3.user.wanted){
_local8 = MMOchaUser.WANTED_COLOR;
};
_local4.targetCharacter(_local3.character, _local3.name, _local8, placingString((_local7 + 1)));
};
};
_local7++;
_local2++;
};
};
_local2 = 0;
while (_local2 < leaderboard.length) {
_local3 = leaderboard[_local2];
if (_local3.isLocal){
placingDisplay.update(placingString((_local2 + 1)));
break;
};
_local2++;
};
}
public function deleteInput(_arg1:int=1):void{
inputText = inputText.substr(0, Math.max(0, (inputText.length - _arg1)));
updateInputDisplay();
}
public function set numPointers(_arg1:int):void{
_numPointers = _arg1;
while (leaderPointers.length < _arg1) {
leaderPointers.push(new CharacterPointer());
};
while (leaderPointers.length > _arg1) {
leaderPointers.pop();
};
}
public function addMoneyFloater(_arg1:int, _arg2:Point):void{
moneyFloaters.push(new ScoreFloater(_arg1, _arg2, moneyDestination));
}
protected static function placingString(_arg1:int):String{
switch (_arg1){
case 1:
return ("1st");
case 2:
return ("2nd");
case 3:
return ("3rd");
};
return ((_arg1 + "th"));
}
}
}//package boxhead.ui
Section 257
//GUI_BountyPointsIcon (boxhead.ui.GUI_BountyPointsIcon)
package boxhead.ui {
import mx.core.*;
public class GUI_BountyPointsIcon extends BitmapAsset {
}
}//package boxhead.ui
Section 258
//HealthBar (boxhead.ui.HealthBar)
package boxhead.ui {
import flash.display.*;
import flash.geom.*;
public class HealthBar {
private var bmd:BitmapData;
private var _health:Number;// = 1
private var _alpha:Number;// = 1
private static const bmdOffset:Point = new Point(-17, -4);
private static const barOffset:Point = new Point(1, 1);
private static const borderOffset:Point = new Point(0, 0);
private static var green:BitmapData;
private static var white:BitmapData = (new Bar() as Bitmap).bitmapData;
private static var border:BitmapData = (new BarBorder() as Bitmap).bitmapData;
private static var orange:BitmapData;
private static var red:BitmapData;
private static var Bar:Class = HealthBar_Bar;
private static var BarBorder:Class = HealthBar_BarBorder;
public function HealthBar(){
if (!green){
green = white.clone();
green.colorTransform(green.rect, new ColorTransform(0, 1, 0));
orange = white.clone();
orange.colorTransform(green.rect, new ColorTransform(0.8, 0.4, 0));
red = white.clone();
red.colorTransform(green.rect, new ColorTransform(0.8, 0, 0));
};
bmd = new BitmapData(border.width, border.height, true, 0);
redraw();
}
public function update(_arg1:Number):void{
if (_arg1 != _health){
_health = _arg1;
redraw();
};
}
public function draw(_arg1:BitmapData, _arg2:Point):void{
_arg1.copyPixels(bmd, bmd.rect, _arg2.add(bmdOffset));
}
protected function redraw():void{
var _local1:Rectangle;
bmd.fillRect(bmd.rect, 0);
if (_alpha){
bmd.copyPixels(border, border.rect, borderOffset);
_local1 = white.rect.clone();
_local1.width = (_local1.width * _health);
if (_health >= 0.5){
bmd.copyPixels(green, _local1, barOffset);
} else {
if (_health >= 0.25){
bmd.copyPixels(orange, _local1, barOffset);
} else {
bmd.copyPixels(red, _local1, barOffset);
};
};
if (_alpha < 1){
bmd.colorTransform(bmd.rect, new ColorTransform(1, 1, 1, _alpha));
};
};
}
public function set alpha(_arg1:Number):void{
if (_arg1 != _alpha){
_alpha = _arg1;
redraw();
};
}
}
}//package boxhead.ui
Section 259
//HealthBar_Bar (boxhead.ui.HealthBar_Bar)
package boxhead.ui {
import mx.core.*;
public class HealthBar_Bar extends BitmapAsset {
}
}//package boxhead.ui
Section 260
//HealthBar_BarBorder (boxhead.ui.HealthBar_BarBorder)
package boxhead.ui {
import mx.core.*;
public class HealthBar_BarBorder extends BitmapAsset {
}
}//package boxhead.ui
Section 261
//HudMessage (boxhead.ui.HudMessage)
package boxhead.ui {
public class HudMessage {
protected var fadeTime:int;
protected var message:String;
protected var endTime:int;
public var local:Boolean;
protected var startTime:int;
public var storedText:StoredText;
public var chat:Boolean;
public var finished:Boolean;// = false
public static const HEIGHT:int = 16;
protected static const REMOTE_COLOR:uint = 0xC0C0C0;
protected static const CHAT_COLOR:uint = 0xFFFFFF;
protected static const LOCAL_COLOR:uint = 14207176;
public function HudMessage(_arg1:String, _arg2:Boolean, _arg3:Boolean){
this.message = _arg1;
this.local = _arg2;
createStoredText();
storedText.update(_arg1);
startTime = Time.current;
fadeTime = (startTime + LENGTH);
endTime = (fadeTime + FADE_LENGTH);
}
public function dispose():void{
storedText.dispose();
}
protected function get LENGTH():int{
return (5000);
}
protected function get FADE_LENGTH():int{
return (500);
}
protected function createStoredText():void{
var _local1:uint = REMOTE_COLOR;
if (local){
_local1 = LOCAL_COLOR;
};
if (chat){
_local1 = CHAT_COLOR;
};
storedText = new StoredText(StoredText.KillText, _local1);
}
public function fade():void{
if (Time.current > endTime){
finished = true;
} else {
if (Time.current > fadeTime){
storedText.alpha = ((Math.floor((((endTime - Time.current) / (endTime - fadeTime)) * 3)) / 4) + 0.25);
};
};
}
public function get consoleMessage():String{
return (("> " + message));
}
}
}//package boxhead.ui
Section 262
//Input (boxhead.ui.Input)
package boxhead.ui {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Input {
public static const LEFT_KEY:uint = (keyCount++ * 2);
public static const WEAPON2_KEY:uint = (keyCount++ * 2);
public static const WEAPON6_KEY:uint = (keyCount++ * 2);
public static const LEFT:uint = 37;
public static const WEAPON_UP_KEY:uint = (keyCount++ * 2);
public static const NO_KEYCODE:uint = 258;
public static const DEBUG_KEY:uint = (keyCount++ * 2);
public static const A:uint = 65;
public static const C:uint = 67;
public static const E:uint = 69;
public static const F:uint = 70;
public static const G:uint = 71;
public static const H:uint = 72;
public static const B:uint = 66;
public static const J:uint = 74;
public static const D:uint = 68;
public static const L:uint = 76;
public static const N:uint = 78;
public static const O:uint = 79;
public static const P:uint = 80;
public static const Q:uint = 81;
public static const K:uint = 75;
public static const S:uint = 83;
public static const M:uint = 77;
public static const U:uint = 85;
public static const V:uint = 86;
public static const W:uint = 87;
public static const I:uint = 73;
public static const R:uint = 82;
public static const T:uint = 84;
public static const X:uint = 88;
public static const Y:uint = 89;
public static const Z:uint = 90;
public static const SHIFT:uint = 16;
public static const BACKSPACE:uint = 8;
public static const ESCAPE:uint = 27;
public static const SUICIDE_KEY:uint = (keyCount++ * 2);
public static const WEAPON1_KEY:uint = (keyCount++ * 2);
public static const WEAPON5_KEY:uint = (keyCount++ * 2);
public static const UP_KEY:uint = (keyCount++ * 2);
public static const DOWN:uint = 40;
public static const UP:uint = 38;
public static const FIRE_KEY:uint = (keyCount++ * 2);
public static const ENTER:uint = 13;
public static const INSERT:uint = 45;
public static const REFILL_KEY:uint = (keyCount++ * 2);
public static const SPIN_KEY:uint = (keyCount++ * 2);
public static const SPACE:uint = 32;
public static const MOUSE_KEYCODE:uint = 0x0101;
public static const STRAFE_KEY:uint = (keyCount++ * 2);
public static const WEAPON4_KEY:uint = (keyCount++ * 2);
public static const WEAPON8_KEY:uint = (keyCount++ * 2);
public static const SCORES_KEY:uint = (keyCount++ * 2);
public static const DOWN_KEY:uint = (keyCount++ * 2);
public static const NUM_KEYS:int = (keyCount * 2);
public static const RESET_KEY:uint = (keyCount++ * 2);
public static const CONSOLE_KEY:uint = (keyCount++ * 2);
public static const TILDE:uint = 192;
public static const CONFIGURABLE_KEYS:int = keyCount;
public static const AUTOPILOT_KEY:uint = (keyCount++ * 2);
public static const CONTROL:uint = 17;
private static const KEYS_VERSION:int = 5;
public static const TAB:uint = 9;
public static const SHOP_KEY:uint = (keyCount++ * 2);
public static const RIGHT_KEY:uint = (keyCount++ * 2);
public static const WEAPON3_KEY:uint = (keyCount++ * 2);
public static const WEAPON7_KEY:uint = (keyCount++ * 2);
public static const N0:uint = 48;
public static const N1:uint = 49;
public static const N2:uint = 50;
public static const N3:uint = 51;
public static const N4:uint = 52;
public static const N5:uint = 53;
public static const N6:uint = 54;
public static const N7:uint = 55;
public static const N8:uint = 56;
public static const N9:uint = 57;
public static const DELETE:uint = 46;
public static const AUTO_RUN_KEY:uint = (keyCount++ * 2);
public static const WEAPON_DOWN_KEY:uint = (keyCount++ * 2);
public static const RIGHT:uint = 39;
public static var wheelScroll:int = 0;
private static var _paused:int = 0;
public static var cookie:SharedObject;
private static var down:Array = new Array();
private static var stage:Stage;
private static var released:Array = new Array();
private static var keyCount:uint = 0;
private static var keys:Array = new Array();
public static function getSecondaryBindString(_arg1:uint):String{
return (getCharString(keys[(_arg1 + 1)]));
}
private static function removeListeners():void{
if (!stage){
return;
};
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUp);
stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.removeEventListener(Event.DEACTIVATE, deactivate);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUp);
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, wheel);
}
private static function mouseUp(_arg1:MouseEvent):void{
down[MOUSE_KEYCODE] = false;
released[MOUSE_KEYCODE] = true;
}
public static function get horizontal():int{
return ((int(isDown(RIGHT_KEY)) - int(isDown(LEFT_KEY))));
}
public static function resume():void{
_paused--;
if (_paused == 0){
addListeners();
};
}
public static function isConsoleKey(_arg1:uint):Boolean{
return ((((_arg1 == keys[CONSOLE_KEY])) || ((_arg1 == keys[(CONSOLE_KEY + 1)]))));
}
private static function deactivate(_arg1:Event):void{
flush();
}
public static function defaults():void{
var _local1:uint;
while (_local1 < NUM_KEYS) {
keys[_local1] = NO_KEYCODE;
_local1++;
};
keys[LEFT_KEY] = LEFT;
keys[(LEFT_KEY + 1)] = A;
keys[RIGHT_KEY] = RIGHT;
keys[(RIGHT_KEY + 1)] = D;
keys[UP_KEY] = UP;
keys[(UP_KEY + 1)] = W;
keys[DOWN_KEY] = DOWN;
keys[(DOWN_KEY + 1)] = S;
keys[STRAFE_KEY] = SHIFT;
keys[(STRAFE_KEY + 1)] = K;
keys[AUTO_RUN_KEY] = CONTROL;
keys[(AUTO_RUN_KEY + 1)] = I;
keys[SPIN_KEY] = C;
keys[(SPIN_KEY + 1)] = L;
keys[FIRE_KEY] = SPACE;
keys[(FIRE_KEY + 1)] = J;
keys[WEAPON_DOWN_KEY] = Q;
keys[WEAPON_UP_KEY] = E;
keys[WEAPON1_KEY] = 49;
keys[WEAPON2_KEY] = 50;
keys[WEAPON3_KEY] = 51;
keys[WEAPON4_KEY] = 52;
keys[WEAPON5_KEY] = 53;
keys[WEAPON6_KEY] = 54;
keys[WEAPON7_KEY] = 55;
keys[WEAPON8_KEY] = 56;
keys[SHOP_KEY] = B;
keys[(SHOP_KEY + 1)] = N;
keys[REFILL_KEY] = R;
keys[(REFILL_KEY + 1)] = DELETE;
keys[SCORES_KEY] = TAB;
keys[RESET_KEY] = X;
keys[DEBUG_KEY] = T;
keys[AUTOPILOT_KEY] = P;
keys[SUICIDE_KEY] = 57;
keys[CONSOLE_KEY] = TILDE;
}
public static function newPress(_arg1:int):Boolean{
return (((((down[keys[_arg1]]) && (released[keys[_arg1]]))) || (((down[keys[(_arg1 + 1)]]) && (released[keys[(_arg1 + 1)]])))));
}
private static function addListeners():void{
if (!stage){
return;
};
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
stage.addEventListener(Event.DEACTIVATE, deactivate);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, wheel);
}
public static function bindString(_arg1:uint):String{
var _local2:String = getPrimaryBindString(_arg1);
if (_local2 != ""){
return (_local2);
};
_local2 = getSecondaryBindString(_arg1);
if (_local2 != ""){
return (_local2);
};
return ("No-Key-Set");
}
public static function getBind(_arg1:int, _arg2:Boolean):uint{
if (_arg2){
return (keys[_arg1]);
};
return (keys[(_arg1 + 1)]);
}
public static function update():void{
var _local1:int;
while (_local1 < NUM_KEYS) {
released[keys[_local1]] = !(down[keys[_local1]]);
_local1++;
};
wheelScroll = 0;
}
private static function mouseDown(_arg1:MouseEvent):void{
down[MOUSE_KEYCODE] = true;
}
public static function load():void{
if (((!(cookie)) || (!(cookie.data.bindings)))){
return;
};
if ((((cookie.data.keysVersion == undefined)) || ((cookie.data.keysVersion < KEYS_VERSION)))){
return;
};
var _local1:Array = cookie.data.bindings;
var _local2:int;
while (_local2 < _local1.length) {
keys[_local2] = _local1[_local2];
_local2++;
};
}
public static function isDown(_arg1:int):Boolean{
return (((down[keys[_arg1]]) || (down[keys[(_arg1 + 1)]])));
}
public static function getCharString(_arg1:uint):String{
switch (_arg1){
case NO_KEYCODE:
return ("");
case MOUSE_KEYCODE:
return ("Mouse Button");
case 65:
return ("A");
case 66:
return ("B");
case 67:
return ("C");
case 68:
return ("D");
case 69:
return ("E");
case 70:
return ("F");
case 71:
return ("G");
case 72:
return ("H");
case 73:
return ("I");
case 74:
return ("J");
case 75:
return ("K");
case 76:
return ("L");
case 77:
return ("M");
case 78:
return ("N");
case 79:
return ("O");
case 80:
return ("P");
case 81:
return ("Q");
case 82:
return ("R");
case 83:
return ("S");
case 84:
return ("T");
case 85:
return ("U");
case 86:
return ("V");
case 87:
return ("W");
case 88:
return ("X");
case 89:
return ("Y");
case 90:
return ("Z");
case 27:
return ("Esc");
case 112:
return ("F1");
case 113:
return ("F2");
case 114:
return ("F3");
case 115:
return ("F4");
case 116:
return ("F5");
case 117:
return ("F6");
case 118:
return ("F7");
case 119:
return ("F8");
case 120:
return ("F9");
case 122:
return ("F11");
case 123:
return ("F12");
case 145:
return ("Scroll Lock");
case 19:
return ("Pause");
case 192:
return ("`");
case 49:
return ("1");
case 50:
return ("2");
case 51:
return ("3");
case 52:
return ("4");
case 53:
return ("5");
case 54:
return ("6");
case 55:
return ("7");
case 56:
return ("8");
case 57:
return ("9");
case 48:
return ("0");
case 189:
return ("-");
case 187:
return ("=");
case 8:
return ("Backspace");
case 9:
return ("Tab");
case 20:
return ("Caps Lock");
case 16:
return ("Shift");
case 17:
return ("Control");
case 32:
return ("Space");
case 13:
return ("Enter");
case 220:
return ("\\");
case 37:
return ("Left");
case 39:
return ("Right");
case 38:
return ("Up");
case 40:
return ("Down");
case 45:
return ("Insert");
case 46:
return ("Del");
case 36:
return ("Home");
case 35:
return ("End");
case 33:
return ("Page Up");
case 34:
return ("Page Down");
case 144:
return ("Num Lock");
case 96:
return ("Numpad Ins");
case 97:
return ("Numpad 1");
case 98:
return ("Numpad 2");
case 99:
return ("Numpad 3");
case 100:
return ("Numpad 4");
case 101:
return ("Numpad 5");
case 102:
return ("Numpad 6");
case 103:
return ("Numpad 7");
case 104:
return ("Numpad 8");
case 105:
return ("Numpad 9");
case 106:
return ("Numpad *");
case 107:
return ("Numpad +");
case 109:
return ("Numpad -");
case 110:
return ("Numpad Del");
case 111:
return ("Numpad /");
case 219:
return ("[");
case 221:
return ("]");
case 186:
return (";");
case 222:
return ("'");
case 188:
return ("<");
case 190:
return (">");
case 191:
return ("/");
};
return ("");
}
public static function flush():void{
var _local1:int;
while (_local1 < NUM_KEYS) {
down[keys[_local1]] = false;
released[keys[_local1]] = true;
_local1++;
};
}
public static function init(_arg1:Stage, _arg2:SharedObject=null):Boolean{
_slot1.stage = _arg1;
cookie = _arg2;
defaults();
load();
flush();
if (!_arg1){
return (false);
};
addListeners();
return (true);
}
private static function mouseLeave(_arg1:Event):void{
}
private static function keyUp(_arg1:KeyboardEvent):void{
var _local2:uint = _arg1.keyCode;
down[_local2] = false;
released[_local2] = true;
}
private static function wheel(_arg1:MouseEvent):void{
if (_arg1.delta < 0){
wheelScroll--;
} else {
if (_arg1.delta > 0){
wheelScroll++;
};
};
}
public static function get vertical():int{
return ((int(isDown(DOWN_KEY)) - int(isDown(UP_KEY))));
}
public static function save():void{
if (!cookie){
return;
};
var _local1:Array = new Array();
var _local2:int;
while (_local2 < keys.length) {
_local1[_local2] = keys[_local2];
_local2++;
};
cookie.data.keysVersion = KEYS_VERSION;
cookie.data.bindings = _local1;
cookie.flush();
}
public static function getPrimaryBindString(_arg1:uint):String{
return (getCharString(keys[_arg1]));
}
private static function keyDown(_arg1:KeyboardEvent):void{
var _local2:uint = _arg1.keyCode;
down[_local2] = true;
}
public static function setBind(_arg1:int, _arg2:Boolean, _arg3:uint):void{
if (_arg2){
keys[_arg1] = _arg3;
} else {
keys[(_arg1 + 1)] = _arg3;
};
}
public static function pause():void{
if (_paused == 0){
removeListeners();
flush();
};
_paused++;
}
}
}//package boxhead.ui
Section 263
//Intros (boxhead.ui.Intros)
package boxhead.ui {
import flash.events.*;
import boxhead.events.*;
import flash.display.*;
import flash.filters.*;
public class Intros extends MovieClip {
protected var stc:MovieClip;
protected var xgs:MovieClip;
private var bl:BlurFilter;
private var blurVel:Number;// = -10
private var blurReverse:Number;// = -137
private var blurVel2:Number;// = 1
private var blurAmount:Number;// = 180
private static var XGSIntro:Class = Intros_XGSIntro;
private static var STCLogo:Class = Intros_STCLogo;
public function Intros(){
var _local1:FrameLabel;
bl = new BlurFilter(0, 0, 2);
super();
stop();
for each (_local1 in currentLabels) {
if (_local1.name == "Black"){
addFrameScript((_local1.frame - 1), black);
};
};
addFrameScript((totalFrames - 1), complete);
}
protected function stcFinished():void{
stc.removeEventListener(MouseEvent.CLICK, stcClick);
stc.stop();
removeChild(stc);
xgs = (new XGSIntro() as MovieClip);
xgs.x = Constants.CENTER_X;
xgs.y = Constants.CENTER_Y;
addChild(xgs);
xgs.cacheAsBitmap = true;
xgs.scaleX = (xgs.scaleY = 0.0001);
xgs.addFrameScript((xgs.totalFrames - 1), xgsFinished);
addEventListener(Event.ENTER_FRAME, xgsBlur, false, 0, true);
xgs.helvian.addFrameScript((xgs.helvian.totalFrames - 1), xgs.helvian.stop);
xgs.XGenStudiosComMC.addFrameScript((xgs.XGenStudiosComMC.totalFrames - 1), xgs.XGenStudiosComMC.stop);
xgs.linkButton.addEventListener(MouseEvent.CLICK, xgsClick);
}
protected function xgsFinished():void{
removeEventListener(Event.ENTER_FRAME, xgsBlur);
xgs.filters = [];
xgs.stop();
removeChild(xgs);
complete();
}
protected function black():void{
stop();
dispatchEvent(new ScreenEvent(ScreenEvent.MENU));
stc = (new STCLogo() as MovieClip);
addChild(stc);
stc.addFrameScript((stc.totalFrames - 1), stcFinished);
stc.linkButton.addEventListener(MouseEvent.CLICK, stcClick);
}
protected function stcClick(_arg1:MouseEvent):void{
Links.milestone("Intro Sean T Cooper Clicked");
Links.openLink(Links.STC);
}
protected function xgsClick(_arg1:MouseEvent):void{
Links.milestone("Intro XGen Clicked");
Links.openLink(Links.XGEN);
}
protected function xgsBlur(_arg1:Event):void{
blurAmount = (blurAmount + blurVel);
if (blurAmount <= blurReverse){
blurVel = blurVel2;
};
if ((((blurAmount > 0)) && ((blurVel > 0)))){
blurVel = (blurVel * 1.8);
xgs.scaleX = (xgs.scaleY = (Math.max(1.5, ((xgs.scaleY * 100) - (blurVel * 1.3))) / 100));
xgs.XGenStudiosComMC.alpha = (xgs.XGenStudiosComMC.alpha - 25);
} else {
xgs.scaleX = (xgs.scaleY = Math.min(1.5, ((xgs.scaleY * 100) * 1.7)));
};
bl.blurX = blurAmount;
bl.blurY = blurAmount;
xgs.filters = [bl];
}
protected function complete():void{
stop();
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package boxhead.ui
Section 264
//Intros_STCLogo (boxhead.ui.Intros_STCLogo)
package boxhead.ui {
import mx.core.*;
import flash.display.*;
public class Intros_STCLogo extends MovieClipAsset {
public var linkButton:DisplayObject;
}
}//package boxhead.ui
Section 265
//Intros_XGSIntro (boxhead.ui.Intros_XGSIntro)
package boxhead.ui {
import mx.core.*;
import flash.display.*;
public class Intros_XGSIntro extends MovieClipAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 266
//KeyEntry (boxhead.ui.KeyEntry)
package boxhead.ui {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class KeyEntry extends Sprite {
public var primary:Boolean;
public var textField:TextField;
public var keyIndex:int;
public var bind:uint;
public function KeyEntry(_arg1:int, _arg2:Boolean){
this.keyIndex = _arg1;
this.primary = _arg2;
buttonMode = true;
focusRect = false;
textField.mouseEnabled = false;
addEventListener(MouseEvent.CLICK, select);
reset();
}
protected function loseFocus(_arg1:FocusEvent):void{
removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
removeEventListener(FocusEvent.FOCUS_OUT, loseFocus);
update();
}
protected function keyDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Input.TILDE:
case Input.ESCAPE:
case Input.ENTER:
break;
default:
bind = _arg1.keyCode;
Input.setBind(keyIndex, primary, bind);
break;
};
update();
dispatchEvent(new Event(Event.CHANGE));
}
public function update():void{
if (primary){
textField.text = Input.getPrimaryBindString(keyIndex);
} else {
textField.text = Input.getSecondaryBindString(keyIndex);
};
}
public function clearBind():void{
Input.setBind(keyIndex, primary, Input.NO_KEYCODE);
update();
}
public function reset():void{
bind = Input.getBind(keyIndex, primary);
update();
}
protected function select(_arg1:MouseEvent):void{
stage.focus = this;
textField.text = "<Press Key>";
addEventListener(FocusEvent.FOCUS_OUT, loseFocus);
addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
}
public function dispose():void{
removeEventListener(MouseEvent.CLICK, select);
removeEventListener(KeyboardEvent.KEY_DOWN, keyDown);
removeEventListener(FocusEvent.FOCUS_OUT, loseFocus);
}
}
}//package boxhead.ui
Section 267
//KillMessage (boxhead.ui.KillMessage)
package boxhead.ui {
import boxhead.game.*;
import boxhead.world.weapon.*;
public class KillMessage extends HudMessage {
public function KillMessage(_arg1:Player, _arg2:Player, _arg3:int){
var _local5:String;
var _local4:WeaponInfo = WeaponInfo.lookup(_arg3);
if (_arg1 == _arg2){
if (((_local4) && (_local4.suicideMessage))){
_local5 = parseMessage(_local4.suicideMessage, _arg1, _arg2);
} else {
_local5 = ((name(_arg1) + " killed ") + himself(_arg1));
};
} else {
if (((_local4) && (_local4.killMessage))){
_local5 = parseMessage(_local4.killMessage, _arg1, _arg2);
} else {
_local5 = ((name(_arg1) + " killed ") + name(_arg2));
};
};
super(_local5, ((_arg1.isLocal) || (_arg2.isLocal)), false);
}
override public function get consoleMessage():String{
return (("Kill: " + message));
}
private static function was(_arg1:Player):String{
if (_arg1.isLocal){
return ("were");
};
if (_arg1.gender == Constants.MALE){
return ("was");
};
if (_arg1.gender == Constants.FEMALE){
return ("was");
};
return ("were");
}
private static function his(_arg1:Player):String{
if (_arg1.isLocal){
return ("your");
};
if (_arg1.gender == Constants.MALE){
return ("his");
};
if (_arg1.gender == Constants.FEMALE){
return ("her");
};
return ("their");
}
private static function parseMessage(_arg1:String, _arg2:Player, _arg3:Player):String{
_arg1 = _arg1.replace("#source", name(_arg2));
_arg1 = _arg1.replace("#source-he", he(_arg2));
_arg1 = _arg1.replace("#source-his", his(_arg2));
_arg1 = _arg1.replace("#source-himself", himself(_arg2));
_arg1 = _arg1.replace("#source-was", was(_arg2));
_arg1 = _arg1.replace("#target", name(_arg3));
_arg1 = _arg1.replace("#target-he", he(_arg3));
_arg1 = _arg1.replace("#target-his", his(_arg3));
_arg1 = _arg1.replace("#target-himself", himself(_arg3));
_arg1 = _arg1.replace("#target-was", was(_arg3));
return (_arg1);
}
private static function himself(_arg1:Player):String{
if (_arg1.isLocal){
return ("yourself");
};
if (_arg1.gender == Constants.MALE){
return ("himself");
};
if (_arg1.gender == Constants.FEMALE){
return ("herself");
};
return ("themself");
}
private static function name(_arg1:Player):String{
if (_arg1.isLocal){
return ("You");
};
return (_arg1.name);
}
private static function he(_arg1:Player):String{
if (_arg1.isLocal){
return ("you");
};
if (_arg1.gender == Constants.MALE){
return ("he");
};
if (_arg1.gender == Constants.FEMALE){
return ("she");
};
return ("they");
}
}
}//package boxhead.ui
Section 268
//NavPointer (boxhead.ui.NavPointer)
package boxhead.ui {
import boxhead.world.*;
import boxhead.world.thing.*;
import flash.display.*;
import flash.geom.*;
public class NavPointer {
protected var container:Sprite;
protected var caption1:StoredText;
protected var caption2:StoredText;
protected var thing:Thing;
protected var pointer:Sprite;
protected static const EDGE_BUFFER:Number = 0.12;
protected static const POINTER_ALPHA:Number = 0.75;
protected static var Pointer:Class = NavPointer_Pointer;
public function NavPointer(){
caption1 = new StoredText(StoredText.OverheadText);
caption2 = new StoredText(StoredText.OverheadText);
container = new Sprite();
pointer = new Pointer();
container.addChild(pointer);
var _local1:DisplayObject = pointer.getChildByName("bountySymbol");
if (_local1){
container.addChild(_local1);
};
}
public function draw(_arg1:BitmapData, _arg2:Position):void{
if (!thing){
return;
};
thing.animate();
var _local3:Point = thing.renderOffset.subtract(_arg2.renderOffset);
var _local4:Point = _local3.add(new Point(Constants.CENTER_X, Constants.CENTER_Y));
if (Constants.WINDOW.containsPoint(_local4)){
return;
};
var _local5:Number = (_local3.y / _local3.x);
var _local6:Number = (Constants.WINDOW.height / Constants.WINDOW.width);
if ((((_local5 > _local6)) || ((_local5 < -(_local6))))){
_local3.normalize(((_local3.length * Math.abs((Constants.CENTER_Y / _local3.y))) * (1 - EDGE_BUFFER)));
} else {
_local3.normalize(((_local3.length * Math.abs((Constants.CENTER_X / _local3.x))) * (1 - EDGE_BUFFER)));
};
pointer.rotation = ((Math.atan2((_local3.y / 0.7), _local3.x) * 180) / Math.PI);
_local3.offset(Constants.CENTER_X, Constants.CENTER_Y);
_local3.x = Math.round(_local3.x);
_local3.y = Math.round(_local3.y);
_arg1.draw(container, new Matrix(1, 0, 0, 1, _local3.x, _local3.y));
_local3.y = (_local3.y - 1);
caption2.draw(_arg1, _local3);
_local3.y = (_local3.y - 12);
caption1.draw(_arg1, _local3);
}
public function target(_arg1:Thing, _arg2:String, _arg3:String):void{
thing = _arg1;
caption1.update(_arg2);
caption2.update(_arg3);
}
}
}//package boxhead.ui
Section 269
//NavPointer_Pointer (boxhead.ui.NavPointer_Pointer)
package boxhead.ui {
import mx.core.*;
import flash.display.*;
public class NavPointer_Pointer extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var bountySymbol:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 270
//OpenShopButton (boxhead.ui.OpenShopButton)
package boxhead.ui {
import flash.display.*;
public class OpenShopButton extends SimpleButton {
}
}//package boxhead.ui
Section 271
//QuickPlayCharacterDisplay (boxhead.ui.QuickPlayCharacterDisplay)
package boxhead.ui {
import boxhead.game.*;
import flash.display.*;
import flash.text.*;
public class QuickPlayCharacterDisplay extends Sprite {
public var characterBox:CharacterBox;
public var profile:QuickPlayProfile;
public var nameField:TextField;
public function QuickPlayCharacterDisplay(){
nameField.text = "";
}
public function display(_arg1:QuickPlayProfile):void{
this.profile = _arg1;
nameField.text = _arg1.name;
characterBox.drawCharacter(_arg1.headModelIndex, _arg1.headColorIndex, _arg1.bodyModelIndex, _arg1.bodyColorIndex, _arg1.weaponID);
}
}
}//package boxhead.ui
Section 272
//ScoreFloater (boxhead.ui.ScoreFloater)
package boxhead.ui {
import flash.display.*;
import flash.geom.*;
public class ScoreFloater {
public var score:int;
protected var display:StoredText;
protected var position:Point;
protected var move:Point;
public var finished:Boolean;// = false
protected var startTime:int;
protected var start:Point;
protected static const SPEED:Number = 600;
public function ScoreFloater(_arg1:int, _arg2:Point, _arg3:Point){
this.score = _arg1;
display = new StoredText(StoredText.FloatingText);
display.alpha = 0.7;
display.update(("" + _arg1));
start = _arg2.clone();
move = _arg3.subtract(_arg2);
position = _arg2.clone();
startTime = Time.current;
}
public function draw(_arg1:BitmapData):void{
display.draw(_arg1, position);
}
public function update():void{
var _local1:Number = (((Time.current - startTime) / 1000) * SPEED);
if (_local1 >= move.length){
finished = true;
} else {
position.x = move.x;
position.y = move.y;
position.normalize(_local1);
position.x = (position.x + start.x);
position.y = (position.y + start.y);
};
}
}
}//package boxhead.ui
Section 273
//StoredText (boxhead.ui.StoredText)
package boxhead.ui {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class StoredText {
private var caret:Boolean;// = false
private var sprite:Sprite;
private var align:String;
private var autoSize:Boolean;
private var textField:TextField;
private var width:int;
private var _alpha:Number;// = 1
private var color:uint;
private var height:int;
private var value:String;
private var bmd:BitmapData;
public static const OverheadText:Class = StoredText_OverheadText;
public static const ChatText:Class = StoredText_ChatText;
public static const LEFT:String = "left";
public static const KillText:Class = StoredText_KillText;
public static const WarningText:Class = StoredText_WarningText;
public static const FloatingText:Class = StoredText_FloatingText;
public static const CENTER:String = "center";
public static const FPSText:Class = StoredText_FPSText;
public static const BountyText:Class = StoredText_BountyText;
public static const TimeText:Class = StoredText_TimeText;
public static const RIGHT:String = "right";
public static const ScoreText:Class = StoredText_ScoreText;
public function StoredText(_arg1:Class, _arg2:uint=0xFFFFFF){
switch (_arg1){
default:
autoSize = false;
break;
case KillText:
case ChatText:
case WarningText:
autoSize = true;
break;
};
sprite = (new (_arg1) as Sprite);
textField = (sprite.getChildByName("textField") as TextField);
setColor(_arg2);
width = Math.ceil(textField.width);
height = Math.ceil(textField.height);
align = textField.getTextFormat().align;
if (autoSize){
textField.autoSize = align;
};
bmd = new BitmapData(width, height, true, 0);
var _local3:TextFormat = textField.getTextFormat();
textField.setTextFormat(_local3, 0, textField.text.length);
textField.defaultTextFormat = _local3;
update(value);
}
public function draw(_arg1:BitmapData, _arg2:Point):void{
_arg2 = _arg2.clone();
if (align == CENTER){
_arg2.x = (_arg2.x - int((width / 2)));
} else {
if (align == RIGHT){
_arg2.x = (_arg2.x - width);
};
};
_arg1.copyPixels(bmd, bmd.rect, _arg2);
}
public function update(_arg1:String, _arg2:Boolean=false):void{
if ((((value == _arg1)) && ((caret == _arg2)))){
return;
};
value = _arg1;
caret = _arg2;
if (((!(value)) || ((value == "")))){
return;
};
textField.text = value;
var _local3 = 2;
var _local4:int = (Math.ceil(textField.width) + _local3);
var _local5:int = (Math.ceil(textField.height) + _local3);
if (caret){
_local4 = (_local4 + 3);
};
if (((autoSize) && (((!((width == _local4))) || (!((height == _local5))))))){
textField.x = 0;
bmd.dispose();
width = _local4;
height = _local5;
bmd = new BitmapData(width, height, true, 0);
};
redraw();
}
public function setColor(_arg1:uint):void{
this.color = (textField.textColor = _arg1);
}
public function dispose():void{
bmd.dispose();
}
public function getTextWidth():int{
return (textField.textWidth);
}
public function changeAlign(_arg1:String):void{
var _local2:TextFormat = textField.getTextFormat();
align = (_local2.align = _arg1);
textField.setTextFormat(_local2, 0, textField.text.length);
textField.defaultTextFormat = _local2;
}
protected function redraw():void{
var _local1:Rectangle;
bmd.fillRect(bmd.rect, 0);
if (_alpha){
bmd.draw(sprite);
if (caret){
_local1 = sprite.getBounds(sprite);
_local1.x = (_local1.right - 1);
_local1.width = 1;
_local1.y = (_local1.y + (_local1.height * 0.2));
_local1.height = (_local1.height * 0.6);
bmd.fillRect(_local1, (4278190080 | color));
};
};
}
public function set alpha(_arg1:Number):void{
if (_arg1 != _alpha){
textField.alpha = (_alpha = _arg1);
redraw();
};
}
}
}//package boxhead.ui
Section 274
//StoredText_BountyText (boxhead.ui.StoredText_BountyText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_BountyText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 275
//StoredText_ChatText (boxhead.ui.StoredText_ChatText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_ChatText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 276
//StoredText_FloatingText (boxhead.ui.StoredText_FloatingText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_FloatingText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 277
//StoredText_FPSText (boxhead.ui.StoredText_FPSText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_FPSText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 278
//StoredText_KillText (boxhead.ui.StoredText_KillText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_KillText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 279
//StoredText_OverheadText (boxhead.ui.StoredText_OverheadText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_OverheadText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 280
//StoredText_ScoreText (boxhead.ui.StoredText_ScoreText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_ScoreText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 281
//StoredText_TimeText (boxhead.ui.StoredText_TimeText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_TimeText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 282
//StoredText_WarningText (boxhead.ui.StoredText_WarningText)
package boxhead.ui {
import flash.display.*;
import mx.core.*;
public class StoredText_WarningText extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.ui
Section 283
//Warning (boxhead.ui.Warning)
package boxhead.ui {
public class Warning {
public var message:String;
public var time:int;
public var startTime:int;
public function Warning(_arg1:String, _arg2:int, _arg3:int){
this.message = _arg1;
this.startTime = _arg2;
this.time = _arg3;
}
}
}//package boxhead.ui
Section 284
//WeaponEntry (boxhead.ui.WeaponEntry)
package boxhead.ui {
import boxhead.world.weapon.*;
import flash.display.*;
import flash.text.*;
public class WeaponEntry extends Sprite {
public var textField:TextField;
public var info:WeaponInfo;
public function WeaponEntry(_arg1:WeaponInfo){
this.info = _arg1;
textField.text = _arg1.abbreviatedName;
buttonMode = true;
focusRect = false;
mouseChildren = false;
}
}
}//package boxhead.ui
Section 285
//WeaponPortraits (boxhead.ui.WeaponPortraits)
package boxhead.ui {
import flash.display.*;
public class WeaponPortraits extends MovieClip {
public function WeaponPortraits(){
stop();
}
public function display(_arg1:int):void{
gotoAndStop((_arg1 + 1));
}
}
}//package boxhead.ui
Section 286
//Cracks (boxhead.world.decal.Cracks)
package boxhead.world.decal {
import boxhead.assets.*;
import flash.display.*;
public class Cracks extends SheetDecal {
public function Cracks(_arg1:int=0){
super(_arg1);
}
override protected function get texture():BitmapData{
return (Textures.CRACKS);
}
override protected function get sheetHeight():int{
return (4);
}
override protected function get sheetWidth():int{
return (4);
}
}
}//package boxhead.world.decal
Section 287
//Curb (boxhead.world.decal.Curb)
package boxhead.world.decal {
import boxhead.assets.*;
import flash.display.*;
import boxhead.sounds.*;
public class Curb extends SheetDecal {
public function Curb(_arg1:int=0){
super(_arg1);
footstepsL = SoundList.FOOTSTEPS_CONCRETE_L;
footstepsR = SoundList.FOOTSTEPS_CONCRETE_R;
}
override protected function get texture():BitmapData{
return (Textures.CURB);
}
override protected function get sheetHeight():int{
return (2);
}
override protected function get sheetWidth():int{
return (6);
}
}
}//package boxhead.world.decal
Section 288
//Decal (boxhead.world.decal.Decal)
package boxhead.world.decal {
import boxhead.world.*;
import flash.display.*;
import flash.geom.*;
public class Decal {
public var footstepsL:Array;
public var pos:Position;
protected var _variant:int;// = 0
public var footstepsR:Array;
public function Decal(_arg1:int){
this.variant = _arg1;
pos = new Position();
}
public function get y():Number{
return (pos.y);
}
public function intersects(_arg1:Decal):Boolean{
if (_arg1.x >= (x + width)){
return (false);
};
if (_arg1.y >= (y + height)){
return (false);
};
if (x >= (_arg1.x + _arg1.width)){
return (false);
};
if (y >= (_arg1.y + _arg1.height)){
return (false);
};
return (true);
}
public function draw(_arg1:BitmapData, _arg2:Point):void{
_arg1.copyPixels(texture, new Rectangle(0, 0, (width * Constants.CELL_WIDTH), (height * Constants.CELL_HEIGHT)), _arg2.add(pos.renderOffset));
}
public function get variant():int{
return (_variant);
}
public function get width():int{
return (1);
}
public function get height():int{
return (1);
}
public function drawAlpha(_arg1:BitmapData, _arg2:Point, _arg3:Number):void{
var _local4:BitmapData = new BitmapData((width * Constants.CELL_WIDTH), (height * Constants.CELL_HEIGHT), true, 0);
var _local5:Point = new Point(0, 0).subtract(pos.renderOffset);
draw(_local4, _local5);
_local4.colorTransform(_local4.rect, new ColorTransform(1, 1, 1, _arg3));
_arg1.copyPixels(_local4, _local4.rect, _arg2.add(pos.renderOffset));
_local4.dispose();
}
public function set variant(_arg1:int):void{
_variant = _arg1;
}
protected function get variants():int{
return (1);
}
public function set x(_arg1:Number):void{
pos.x = _arg1;
}
public function randomize(_arg1:Array=null):void{
var _local2:int;
if (_arg1){
_local2 = int((Math.random() * _arg1.length));
variant = _arg1[_local2];
} else {
variant = int((Math.random() * variants));
};
}
public function set y(_arg1:Number):void{
pos.y = _arg1;
}
public function get x():Number{
return (pos.x);
}
protected function get texture():BitmapData{
return (null);
}
public function clone():Decal{
var _local1:Decal = (new Object(this).constructor(variant) as Decal);
if (!_local1){
return (null);
};
_local1.x = x;
_local1.y = y;
return (_local1);
}
public function contains(_arg1:int, _arg2:int):Boolean{
return ((((((((_arg1 >= x)) && ((_arg1 < (x + width))))) && ((_arg2 >= y)))) && ((_arg2 < (y + height)))));
}
}
}//package boxhead.world.decal
Section 289
//FloorDamage (boxhead.world.decal.FloorDamage)
package boxhead.world.decal {
import flash.display.*;
public class FloorDamage extends VectorDecal {
protected static const DISPLAY:Sprite = (new DISPLAY_CLASS() as Sprite);
protected static const DISPLAY_CLASS:Class = FloorDamage_DISPLAY_CLASS;
public function FloorDamage(_arg1:int){
super(_arg1);
}
override protected function get display():Sprite{
return (DISPLAY);
}
override public function get width():int{
return (6);
}
override public function get height():int{
return (25);
}
}
}//package boxhead.world.decal
Section 290
//FloorDamage_DISPLAY_CLASS (boxhead.world.decal.FloorDamage_DISPLAY_CLASS)
package boxhead.world.decal {
import mx.core.*;
import flash.display.*;
public class FloorDamage_DISPLAY_CLASS extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.world.decal
Section 291
//GrassBits (boxhead.world.decal.GrassBits)
package boxhead.world.decal {
import boxhead.assets.*;
import flash.display.*;
public class GrassBits extends SheetDecal {
public function GrassBits(_arg1:int=0){
super(_arg1);
}
override protected function get texture():BitmapData{
return (Textures.GRASS_BITS);
}
override protected function get sheetHeight():int{
return (4);
}
override protected function get sheetWidth():int{
return (4);
}
}
}//package boxhead.world.decal
Section 292
//GrassRockEdge (boxhead.world.decal.GrassRockEdge)
package boxhead.world.decal {
import boxhead.assets.*;
import flash.display.*;
import boxhead.sounds.*;
public class GrassRockEdge extends SheetDecal {
public function GrassRockEdge(_arg1:int=0){
super(_arg1);
footstepsL = SoundList.FOOTSTEPS_GRAVEL_L;
footstepsR = SoundList.FOOTSTEPS_GRAVEL_R;
}
override protected function get texture():BitmapData{
return (Textures.GRASS_ROCK_EDGE);
}
override protected function get sheetHeight():int{
return (12);
}
override protected function get sheetWidth():int{
return (1);
}
}
}//package boxhead.world.decal
Section 293
//RoadLines (boxhead.world.decal.RoadLines)
package boxhead.world.decal {
import boxhead.assets.*;
import flash.display.*;
public class RoadLines extends SheetDecal {
public function RoadLines(_arg1:int=0){
super(_arg1);
}
override protected function get texture():BitmapData{
return (Textures.ROAD_LINES);
}
override protected function get sheetHeight():int{
return (1);
}
override protected function get sheetWidth():int{
return (5);
}
}
}//package boxhead.world.decal
Section 294
//SheetDecal (boxhead.world.decal.SheetDecal)
package boxhead.world.decal {
import flash.display.*;
import flash.geom.*;
public class SheetDecal extends Decal {
public function SheetDecal(_arg1:int=0){
super(_arg1);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
var _local3:int = (variant % sheetWidth);
var _local4:int = int((variant / sheetWidth));
_arg1.copyPixels(texture, new Rectangle((_local3 * Constants.CELL_WIDTH), (_local4 * Constants.CELL_HEIGHT), Constants.CELL_WIDTH, Constants.CELL_HEIGHT), _arg2.add(pos.renderOffset));
}
override protected function get variants():int{
return ((sheetWidth * sheetHeight));
}
protected function get sheetHeight():int{
return (1);
}
protected function get sheetWidth():int{
return (1);
}
}
}//package boxhead.world.decal
Section 295
//Sidewalk (boxhead.world.decal.Sidewalk)
package boxhead.world.decal {
import boxhead.assets.*;
import flash.display.*;
import boxhead.sounds.*;
public class Sidewalk extends SheetDecal {
public function Sidewalk(_arg1:int=0){
super(_arg1);
footstepsL = SoundList.FOOTSTEPS_CONCRETE_L;
footstepsR = SoundList.FOOTSTEPS_CONCRETE_R;
}
override protected function get texture():BitmapData{
return (Textures.SIDEWALK);
}
override protected function get sheetHeight():int{
return (4);
}
override protected function get sheetWidth():int{
return (4);
}
}
}//package boxhead.world.decal
Section 296
//VectorDecal (boxhead.world.decal.VectorDecal)
package boxhead.world.decal {
import flash.display.*;
import flash.geom.*;
public class VectorDecal extends Decal {
public function VectorDecal(_arg1:int){
super(_arg1);
}
protected function get display():Sprite{
return (null);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
_arg2 = _arg2.add(pos.renderOffset);
_arg1.draw(display, new Matrix(1, 0, 0, 1, _arg2.x, _arg2.y));
}
}
}//package boxhead.world.decal
Section 297
//HitCircle (boxhead.world.hit.HitCircle)
package boxhead.world.hit {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
public class HitCircle extends HitShape {
public var radius:Number;
public function HitCircle(_arg1:Position, _arg2:Number){
super(_arg1);
this.radius = _arg2;
}
override public function ejectCircle(_arg1:HitCircle):Point{
var _local2:Number = (_arg1.x - x);
var _local3:Number = (_arg1.y - y);
var _local4:Number = (_arg1.radius + radius);
if (((_local2 * _local2) + (_local3 * _local3)) > (_local4 * _local4)){
return (null);
};
var _local5:Point = _arg1.pos.difference(pos);
_local5.normalize((_local4 - _local5.length));
return (_local5);
}
override public function intersects(_arg1:HitCircle):Boolean{
var _local2:Number = (_arg1.x - x);
var _local3:Number = (_arg1.y - y);
var _local4:Number = (_arg1.radius + radius);
return ((((_local2 * _local2) + (_local3 * _local3)) <= (_local4 * _local4)));
}
override public function traceLine(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:Number):TraceCollision{
var _local5:Point = rotatedVector(new Point((x - _arg1.x), (y - _arg1.y)), -(_arg2));
if (Math.abs(_local5.y) > radius){
return (null);
};
var _local6:Number = Math.sqrt(((radius * radius) - (_local5.y * _local5.y)));
var _local7:Number = (_local5.x + _local6);
if (_local7 < 0){
return (null);
};
var _local8:Number = (_local5.x - _local6);
if ((((_local8 <= 0)) && ((_local7 >= 0)))){
return (new TraceCollision(_arg1.clone(), 0));
};
return (new TraceCollision(_arg1.add(rotatedVector(new Point(_local8, 0), _arg2)), _local8));
}
override public function getBounds():Rectangle{
return (new Rectangle((x - radius), (y - radius), (radius * 2), (radius * 2)));
}
override public function draw(_arg1:Graphics):void{
_arg1.drawCircle(x, y, radius);
}
}
}//package boxhead.world.hit
Section 298
//HitRect (boxhead.world.hit.HitRect)
package boxhead.world.hit {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
public class HitRect extends HitShape {
public var yRad:Number;
public var xRad:Number;
public function HitRect(_arg1:Position, _arg2:Number, _arg3:Number){
super(_arg1);
this.xRad = _arg2;
this.yRad = _arg3;
}
override public function ejectCircle(_arg1:HitCircle):Point{
var _local12:Point;
var _local13:Number;
var _local2:Number = (x - xRad);
var _local3:Number = ((_arg1.x + _arg1.radius) - _local2);
if (_local3 <= 0){
return (null);
};
var _local4:Number = (x + xRad);
var _local5:Number = (_local4 - (_arg1.x - _arg1.radius));
if (_local5 <= 0){
return (null);
};
var _local6:Number = (y - yRad);
var _local7:Number = ((_arg1.y + _arg1.radius) - _local6);
if (_local7 <= 0){
return (null);
};
var _local8:Number = (y + yRad);
var _local9:Number = (_local8 - (_arg1.y - _arg1.radius));
if (_local9 <= 0){
return (null);
};
var _local10:int;
var _local11:int;
if (_arg1.x < _local2){
_local10 = -1;
} else {
if (_arg1.x > _local4){
_local10 = 1;
};
};
if (_arg1.y < _local6){
_local11 = -1;
} else {
if (_arg1.y > _local8){
_local11 = 1;
};
};
if ((((_local10 == 0)) && ((_local11 == 0)))){
if (_arg1.x < x){
if (_arg1.y < 0){
if (_local3 < _local7){
return (new Point(-(_local3), 0));
};
return (new Point(0, -(_local7)));
} else {
if (_local3 < _local9){
return (new Point(-(_local3), 0));
};
return (new Point(0, _local9));
};
} else {
if (_arg1.y < 0){
if (_local5 < _local7){
return (new Point(_local5, 0));
};
return (new Point(0, -(_local7)));
} else {
if (_local5 < _local9){
return (new Point(_local5, 0));
};
return (new Point(0, _local9));
};
};
//unresolved jump
};
if (((_local10) && (_local11))){
_local12 = new Point(((_arg1.x - x) - (xRad * _local10)), ((_arg1.y - y) - (yRad * _local11)));
_local13 = (_arg1.radius - _local12.length);
if (_local13 < 0){
return (null);
};
_local12.normalize(_local13);
return (_local12);
//unresolved jump
};
if (_local10 < 0){
return (new Point(-(_local3), 0));
};
if (_local10 > 0){
return (new Point(_local5, 0));
};
if (_local11 < 0){
return (new Point(0, -(_local7)));
};
return (new Point(0, _local9));
}
override public function draw(_arg1:Graphics):void{
_arg1.drawRect((x - xRad), (y - yRad), (xRad * 2), (yRad * 2));
}
override public function intersects(_arg1:HitCircle):Boolean{
var _local12:Point;
var _local13:Number;
var _local2:Number = (x - xRad);
var _local3:Number = ((_arg1.x + _arg1.radius) - _local2);
if (_local3 <= 0){
return (false);
};
var _local4:Number = (x + xRad);
var _local5:Number = (_local4 - (_arg1.x - _arg1.radius));
if (_local5 <= 0){
return (false);
};
var _local6:Number = (y - yRad);
var _local7:Number = ((_arg1.y + _arg1.radius) - _local6);
if (_local7 <= 0){
return (false);
};
var _local8:Number = (y + yRad);
var _local9:Number = (_local8 - (_arg1.y - _arg1.radius));
if (_local9 <= 0){
return (false);
};
var _local10:int;
var _local11:int;
if (_arg1.x < _local2){
_local10 = -1;
} else {
if (_arg1.x > _local4){
_local10 = 1;
};
};
if (_arg1.y < _local6){
_local11 = -1;
} else {
if (_arg1.y > _local8){
_local11 = 1;
};
};
if (((_local10) || (_local11))){
_local12 = new Point(((_arg1.x - x) - (xRad * _local10)), ((_arg1.y - y) - (yRad * _local11)));
_local13 = (_arg1.radius - _local12.length);
return ((_local13 >= 0));
};
return (true);
}
override public function traceLine(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:Number):TraceCollision{
var _local5:Point;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local6:Number = (x - xRad);
var _local7:Number = (x + xRad);
var _local8:Number = (y - yRad);
var _local9:Number = (y + yRad);
if ((((((((_arg1.x >= _local6)) && ((_arg1.x <= _local7)))) && ((_arg1.y >= _local8)))) && ((_arg1.y <= _local9)))){
return (new TraceCollision(_arg1, 0));
};
var _local10:Number = (_arg4 / _arg3);
var _local11:Number = (_arg1.y - (_local10 * _arg1.x));
if (_arg3 > 0){
if (_arg1.x > _local7){
return (null);
};
if (_arg1.x < _local6){
_local12 = ((_local10 * _local6) + _local11);
if ((((_local12 <= _local9)) && ((_local12 >= _local8)))){
_local5 = new Point(_local6, _local12);
return (new TraceCollision(_local5, Point.distance(_arg1, _local5)));
};
};
} else {
if (_arg3 < 0){
if (_arg1.x < _local6){
return (null);
};
if (_arg1.x > _local7){
_local13 = ((_local10 * _local7) + _local11);
if ((((_local13 <= _local9)) && ((_local13 >= _local8)))){
_local5 = new Point(_local7, _local13);
return (new TraceCollision(_local5, Point.distance(_arg1, _local5)));
};
};
};
};
if (_arg4 < 0){
if (_arg1.y < _local8){
return (null);
};
if (_arg1.y > _local9){
_local14 = ((_local9 - _local11) / _local10);
if ((((_local14 <= _local7)) && ((_local14 >= _local6)))){
_local5 = new Point(_local14, _local9);
return (new TraceCollision(_local5, Point.distance(_arg1, _local5)));
};
};
};
if (_arg4 > 0){
if (_arg1.y > _local9){
return (null);
};
if (_arg1.y < _local8){
_local15 = ((_local8 - _local11) / _local10);
if ((((_local15 <= _local7)) && ((_local15 >= _local6)))){
_local5 = new Point(_local15, _local8);
return (new TraceCollision(_local5, Point.distance(_arg1, _local5)));
};
};
};
return (null);
}
override public function getBounds():Rectangle{
return (new Rectangle((x - xRad), (y - yRad), (xRad * 2), (yRad * 2)));
}
}
}//package boxhead.world.hit
Section 299
//HitShape (boxhead.world.hit.HitShape)
package boxhead.world.hit {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
public class HitShape {
public var next:HitShape;// = null
public var pos:Position;
protected static const BUFFER:Number = 0;
public function HitShape(_arg1:Position){
this.pos = _arg1;
}
public function traceLine(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:Number):TraceCollision{
return (null);
}
public function ejectCircle(_arg1:HitCircle):Point{
return (null);
}
public function get y():Number{
return (pos.y);
}
public function getBounds():Rectangle{
return (new Rectangle(x, y, 0, 0));
}
public function intersects(_arg1:HitCircle):Boolean{
return (false);
}
public function draw(_arg1:Graphics):void{
}
public function get x():Number{
return (pos.x);
}
protected static function rotatedVector(_arg1:Point, _arg2:Number):Point{
var _local3:Number = Math.cos(_arg2);
var _local4:Number = Math.sin(_arg2);
return (new Point(((_local3 * _arg1.x) - (_local4 * _arg1.y)), ((_local4 * _arg1.x) + (_local3 * _arg1.y))));
}
}
}//package boxhead.world.hit
Section 300
//TraceCollision (boxhead.world.hit.TraceCollision)
package boxhead.world.hit {
import flash.geom.*;
public class TraceCollision {
public var distance:Number;
public var impact:Point;
public function TraceCollision(_arg1:Point, _arg2:Number){
this.impact = _arg1;
this.distance = _arg2;
}
}
}//package boxhead.world.hit
Section 301
//BountyCrate (boxhead.world.thing.bounty.BountyCrate)
package boxhead.world.thing.bounty {
import boxhead.assets.*;
import boxhead.world.*;
import flash.display.*;
import flash.geom.*;
public class BountyCrate extends BountyItem {
protected var type:int;
protected var start:Position;
protected var rotationSpan:Number;
protected var startFrame:int;
protected var frame:int;
protected var startTime:int;
protected var jumpHeight:Number;
protected var end:Position;
protected static const JUMP_HEIGHT:Number = 30;
protected static const ANIM_TIME:int = 400;
protected static var displays:Array;
public function BountyCrate(_arg1:int, _arg2:Position){
this.end = _arg2;
x = _arg2.x;
y = _arg2.y;
jumpHeight = (JUMP_HEIGHT * (0.8 + (Math.random() * 0.4)));
rotationSpan = ((Math.random() - 0.5) * 8);
startFrame = (frame = 0);
this.type = _arg1;
display = displays[_arg1];
shadow = displays[3];
}
override public function animateFrom(_arg1:Position):void{
this.start = _arg1;
x = _arg1.x;
y = _arg1.y;
startTime = Time.current;
}
override public function animate():void{
var _local1:Number;
var _local2:Position;
super.animate();
_local1 = ((Time.current - startTime) / ANIM_TIME);
if (((!(start)) || ((_local1 >= 1)))){
altitude = 0;
x = end.x;
y = end.y;
frame = ((startFrame + (rotationSpan * 8)) % 8);
while (frame < 0) {
frame = (frame + 8);
};
} else {
altitude = (jumpHeight * (1 - Math.pow((Math.abs((_local1 - 0.4)) / 0.6), 2)));
_local2 = Position.interpolate(end, start, _local1);
x = _local2.x;
y = _local2.y;
frame = ((startFrame + ((_local1 * rotationSpan) * 8)) % 8);
while (frame < 0) {
frame = (frame + 8);
};
};
}
override public function get bounty():int{
switch (type){
default:
return (0);
case 0:
return (250);
case 1:
return (500);
case 2:
return (1000);
};
}
override protected function get hitPos():Position{
return (end);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
Debug.drawCircle(pos.x, pos.y, hit.radius, 0xFF00FF);
_arg2 = _arg2.add(renderOffset);
_arg2.y = (_arg2.y - altitude);
display.draw(_arg1, _arg2, frame);
}
public static function prerender():void{
displays = [Assets.lookup("BountyCrate"), Assets.lookup("RedBountyCrate"), Assets.lookup("GoldBountyCrate"), Assets.lookup("BountyCrate_Shadow")];
}
}
}//package boxhead.world.thing.bounty
Section 302
//BountyItem (boxhead.world.thing.bounty.BountyItem)
package boxhead.world.thing.bounty {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.*;
import boxhead.world.thing.display.*;
public class BountyItem extends Thing {
public var shadow:ThingDisplay;
public var display:ThingDisplay;
protected var altitude:int;// = 0
public var index:int;
private var _hit:HitCircle;
public function BountyItem(){
_hit = new HitCircle(pos, 0.2);
}
protected function get hitPos():Position{
return (pos);
}
public function animateFrom(_arg1:Position):void{
_renderPos.copy(_arg1);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
_arg2 = _arg2.add(renderOffset);
_arg2.y = (_arg2.y - altitude);
display.draw(_arg1, _arg2);
}
public function checkRange(_arg1:Character):Boolean{
return ((Position.distance(hitPos, _arg1.pos) <= (hit.radius + _arg1.moveHit.radius)));
}
override public function drawShadow(_arg1:BitmapData, _arg2:Point):void{
if (shadow){
shadow.draw(_arg1, _arg2.add(renderOffset));
};
}
public function get hit():HitCircle{
return (_hit);
}
public function get bounty():int{
return (0);
}
override public function get showInfraRed():Boolean{
return (true);
}
}
}//package boxhead.world.thing.bounty
Section 303
//Character (boxhead.world.thing.character.Character)
package boxhead.world.thing.character {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.game.*;
import boxhead.world.thing.*;
import boxhead.world.thing.display.*;
import boxhead.events.*;
import boxhead.world.thing.obstacle.*;
import boxhead.security.*;
import boxhead.assets.*;
public class Character extends Mover implements HasOwner {
protected var flashHeadCustom:ThingDisplay;
public var collided:Boolean;// = false
protected var storedHp:StoredInt;
public var strafing:Boolean;// = false
public var dir:Direction;
public var bloodWaiting:int;// = 0
protected var storedHurtWaiting:StoredNumber;
public var active:Boolean;// = true
protected var storedMaxHp:StoredInt;
protected var body:ThingDisplay;
protected var flashBody:ThingDisplay;
protected var _owner:Player;
protected var bodyCustom:ThingDisplay;
public var maxSpeed:Number;
protected var _fireHit:HitCircle;
public var speed:Number;// = 0
public var moving:Boolean;// = false
protected var _moveHit:HitCircle;
protected var shadows:ThingDisplay;
protected var flashBodyCustom:ThingDisplay;
protected var head:ThingDisplay;
protected var storedArmor:StoredNumber;
public var animator:CharacterAnimator;
protected var flashHead:ThingDisplay;
protected var headCustom:ThingDisplay;
public var firing:Boolean;// = false
public var obstacleExemption:Obstacle;
protected var _firePos:Position;
public static const HEIGHT:Number = 35;
public function Character(){
maxSpeed = (4 / SECOND);
storedMaxHp = new StoredInt(100);
storedHp = new StoredInt(100);
storedHurtWaiting = new StoredNumber(0);
storedArmor = new StoredNumber(1);
super();
_firePos = pos;
_moveHit = new HitCircle(pos, 0.42);
_fireHit = new HitCircle(pos, 0.55);
dir = Direction.S;
shadows = Assets.lookup("Character_Shadow");
animator = new CharacterAnimator();
animator.idle();
}
public function die(_arg1:Boolean=true):void{
hp = 0;
hurtWaiting = 0;
animator.die();
}
public function get moveHit():HitCircle{
return (_moveHit);
}
public function set hurtWaiting(_arg1:Number):void{
storedHurtWaiting.value = _arg1;
}
override public function drawShadow(_arg1:BitmapData, _arg2:Point):void{
_arg2 = _arg2.add(renderOffset);
if (dead){
shadows.draw(_arg1, _arg2, animator.deadFrame(dir), true);
} else {
shadows.draw(_arg1, _arg2, animator.shadowFrame(dir), true);
};
}
public function set armor(_arg1:Number):void{
storedArmor.value = _arg1;
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
}
public function get hp():int{
return (storedHp.value);
}
public function set hp(_arg1:int):void{
storedHp.value = _arg1;
}
public function getSpeed():Number{
return (maxSpeed);
}
public function get doTeamDamage():Boolean{
return (true);
}
public function get maxHp():int{
return (storedMaxHp.value);
}
public function get dead():Boolean{
return ((hp <= 0));
}
public function set maxHp(_arg1:int):void{
storedMaxHp.value = _arg1;
}
public function get height():Number{
return (HEIGHT);
}
public function getBounds():Rectangle{
return (moveHit.getBounds());
}
public function dispose():void{
}
public function respawn():void{
setHealth(maxHp);
}
override public function getRenderArea():Rectangle{
var _local1:int = animator.headFrame(dir);
var _local2:int = animator.bodyFrame(dir);
var _local3:Rectangle = head.getRenderArea(_local1).union(headCustom.getRenderArea(_local1));
_local3 = _local3.union(body.getRenderArea(_local2).union(bodyCustom.getRenderArea(_local2)));
return (_local3);
}
public function get owner():Player{
return (_owner);
}
public function hurt(_arg1:int, _arg2:int, _arg3:HasOwner):void{
if (hp <= 0){
return;
};
var _local4:Number = Math.max(0, Math.min((hp - hurtWaiting), (_arg1 / armor)));
hurtWaiting = (hurtWaiting + (_local4 + 0.0001));
_arg1 = int(hurtWaiting);
hurtWaiting = (hurtWaiting - _arg1);
if (_arg1 <= 0){
return;
};
setHealth((hp - _arg1));
dispatchEvent(new CharacterEvent(CharacterEvent.HURT, false, false, _arg2, _arg3, _arg1));
}
override public function get showInfraRed():Boolean{
return (true);
}
public function get armor():Number{
return (storedArmor.value);
}
override public function get depth():Number{
if (((dead) && (animator.animFinished))){
return (0);
};
return (renderPos.y);
}
public function get firePos():Position{
return (_firePos);
}
public function reset():void{
}
override protected function get debugColor():uint{
return (0xFF00);
}
public function spin():void{
dir = Direction.list[((dir.index + 4) % 8)];
}
public function get allowTeamDamage():Boolean{
return (true);
}
public function get hurtWaiting():Number{
return (storedHurtWaiting.value);
}
public function move(_arg1:CellGrid):void{
var _local3:Rectangle;
var _local4:Position;
var _local5:Point;
var _local6:Array;
var _local7:Cell;
var _local8:Array;
var _local9:Array;
var _local10:Boolean;
var _local11:Array;
var _local12:Array;
var _local13:Point;
collided = false;
var _local2:Position = recordPreviousPos();
if (dead){
} else {
if (moveDir){
animator.walk();
_local3 = getBounds();
_local4 = pos.clone();
_local5 = new Point(moveDir.dx, moveDir.dy);
_local5.normalize(getSpeed());
_local5.x = (int((_local5.x * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
_local5.y = (int((_local5.y * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
pos.x = (pos.x + _local5.x);
pos.y = (pos.y + _local5.y);
if (!strafing){
dir = moveDir;
};
_local3 = _local3.union(getBounds());
_local3.inflate(1, 1);
_local6 = _arg1.getCellsIntersecting(_local3);
_local8 = _arg1.borderObstacles.concat();
for each (_local7 in _local6) {
if (((_local7.obstacle) && (_local7.obstacle.solid))){
if (_local8.lastIndexOf(_local7.obstacle) < 0){
_local8.push(_local7.obstacle);
};
};
};
_local9 = getCollisions(_local8);
collided = (_local9.length > 0);
_local10 = false;
if (_local9.length > 1){
_local10 = true;
} else {
if (_local9.length == 1){
_local13 = _local9[0];
_local9[0].normalize((_local13.length + StoredNumber.MIN_VALUE));
if (_local13.x < 0){
_local13.x = (Math.floor((_local13.x * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
} else {
_local13.x = (Math.ceil((_local13.x * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
};
if (_local13.y < 0){
_local13.y = (Math.floor((_local13.y * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
} else {
_local13.y = (Math.ceil((_local13.y * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
};
pos.x = (pos.x + _local13.x);
pos.y = (pos.y + _local13.y);
_local9 = getCollisions(_local8);
if (_local9.length > 0){
_local10 = true;
};
};
};
if (_local10){
pos.copy(_local4);
pos.x = (pos.x + _local5.x);
_local11 = getCollisions(_local8);
pos.copy(_local4);
pos.y = (pos.y + _local5.y);
_local12 = getCollisions(_local8);
pos.copy(_local4);
if ((((_local11.length == 0)) && ((_local12.length == 0)))){
if (Math.abs(_local5.x) > Math.abs(_local5.y)){
pos.x = (pos.x + _local5.x);
} else {
pos.y = (pos.y + _local5.y);
};
} else {
if (_local11.length == 0){
pos.x = (pos.x + _local5.x);
} else {
if (_local12.length == 0){
pos.y = (pos.y + _local5.y);
};
};
};
};
if (((obstacleExemption) && (!(obstacleExemption.intersects(moveHit))))){
obstacleExemption = null;
};
} else {
animator.idle();
};
};
speed = Math.min(getSpeed(), Position.distance(pos, _local2));
moving = (speed > 0);
x = (Math.round((x * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
y = (Math.round((y * Constants.POSITION_RESOLUTION)) / Constants.POSITION_RESOLUTION);
if (!moving){
clearPreviousPos();
};
}
public function setHealth(_arg1:int, _arg2:Boolean=true):void{
hp = _arg1;
if (hp <= 0){
die(_arg2);
};
}
override public function animate():void{
super.animate();
animator.advance();
}
public function process():void{
}
public function get local():Boolean{
return (((owner) && (owner.isLocal)));
}
public function set owner(_arg1:Player):void{
_owner = _arg1;
}
protected function getCollisions(_arg1:Array):Array{
var _local3:Obstacle;
var _local4:HitShape;
var _local5:Point;
var _local2:Array = [];
for each (_local3 in _arg1) {
if (_local3 == obstacleExemption){
} else {
_local4 = _local3.hit;
while (_local4 != null) {
_local5 = _local4.ejectCircle(moveHit);
if (_local5){
_local2.push(_local5);
};
_local4 = _local4.next;
};
};
};
return (_local2);
}
public function updateCell(_arg1:CellGrid):void{
var _local2:Cell = _arg1.cellAtPos(pos);
if (_local2 == cell){
return;
};
if (cell){
cell.removeCharacter(this);
};
_local2.addCharacter(this);
cell = _local2;
}
public function get fireHit():HitCircle{
return (_fireHit);
}
public static function prerender():void{
Assets.lookup("Character_Shadow");
}
}
}//package boxhead.world.thing.character
Section 304
//CharacterAnimator (boxhead.world.thing.character.CharacterAnimator)
package boxhead.world.thing.character {
import boxhead.world.*;
public class CharacterAnimator {
private const weaponFrames:int = 9;
private const bodyFrames:int = 42;
private var animName:String;
private var animOffset:int;// = 0
private var walkSpeed:Number;// = 1
private var repeat:Boolean;// = true
private var frames:int;// = 0
private var progress:Number;// = 0
private var animSpeed:Number;// = 1
private var lastUpdate:int;
protected static const WALK:String = "Walk";
protected static const IDLE:String = "Idle";
protected static const DIE:String = "Die";
public static const FPS:int = 20;
public function CharacterAnimator(){
lastUpdate = Time.current;
}
public function die():void{
if (animName == DIE){
return;
};
animName = DIE;
progress = 0;
repeat = false;
frames = 6;
animOffset = (weaponFrames * 4);
animSpeed = 1;
}
public function advance():void{
var _local1:int = (Time.current - lastUpdate);
lastUpdate = Time.current;
progress = (progress + (((_local1 / 1000) * CharacterAnimator.FPS) * animSpeed));
if (repeat){
while (progress >= frames) {
progress = (progress - frames);
};
} else {
progress = Math.min(progress, (frames - 1));
};
}
public function walk():void{
if (animName == WALK){
return;
};
animName = WALK;
progress = 0;
repeat = true;
frames = 8;
animOffset = 1;
animSpeed = walkSpeed;
}
public function shadowFrame(_arg1:Direction, _arg2:int=0):int{
return (bodyFrame(_arg1, _arg2));
}
public function idle():void{
if (animName == IDLE){
return;
};
animName = IDLE;
progress = 0;
repeat = false;
frames = 1;
animOffset = 0;
animSpeed = 0;
}
public function get animLength():int{
return (frames);
}
public function get animProgress():int{
return (int(progress));
}
public function get animFinished():Boolean{
return (((!(repeat)) && ((progress == (frames - 1)))));
}
public function deadFrame(_arg1:Direction):int{
return ((((bodyFrames * _arg1.index) + animOffset) + int(progress)));
}
public function bodyFrame(_arg1:Direction, _arg2:int=0):int{
return (((((bodyFrames * _arg1.index) + (weaponFrames * _arg2)) + animOffset) + int(progress)));
}
public function set moveSpeed(_arg1:Number):void{
walkSpeed = _arg1;
if (animName == WALK){
animSpeed = _arg1;
};
}
public function weaponFrame(_arg1:Direction, _arg2:int=0):int{
return ((((weaponFrames * _arg1.index) + animOffset) + int(progress)));
}
public function headFrame(_arg1:Direction, _arg2:int=0):int{
return (bodyFrame(_arg1, _arg2));
}
}
}//package boxhead.world.thing.character
Section 305
//Enemy (boxhead.world.thing.character.Enemy)
package boxhead.world.thing.character {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
public class Enemy extends Character {
public function Enemy(){
maxSpeed = (0.0015 * Constants.PROCESS_INTERVAL);
}
public function runAI():void{
if (!cell){
return;
};
var _local1:Cell = cell.next;
if (_local1){
followPath();
} else {
if (cell.prop){
escapeCell();
};
};
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
var _local3:int;
var _local4:Boolean;
var _local5:int;
var _local6:int;
Debug.drawCircle(pos.x, pos.y, moveHit.radius, debugColor);
_arg2 = _arg2.add(renderOffset);
if (dead){
_local3 = animator.deadFrame(dir);
_local4 = (((dir.dy > 0)) && (animator.animFinished));
if (_local4){
headCustom.draw(_arg1, _arg2, _local3);
head.draw(_arg1, _arg2, _local3);
};
bodyCustom.draw(_arg1, _arg2, _local3);
body.draw(_arg1, _arg2, _local3);
if (!_local4){
headCustom.draw(_arg1, _arg2, _local3);
head.draw(_arg1, _arg2, _local3);
};
} else {
_local5 = animator.headFrame(dir);
_local6 = animator.bodyFrame(dir);
if (bodyCustom){
bodyCustom.draw(_arg1, _arg2, _local6);
};
if (body){
body.draw(_arg1, _arg2, _local6);
};
if (headCustom){
headCustom.draw(_arg1, _arg2, _local5);
};
if (head){
head.draw(_arg1, _arg2, _local5);
};
};
}
protected function escapeCell():void{
var _local1:Point = new Point(0, 0);
if (x < cell.x){
_local1.x = -1;
} else {
if (x > cell.x){
_local1.x = 1;
};
};
if (y < cell.y){
_local1.y = -1;
} else {
if (y > cell.y){
_local1.y = 1;
};
};
}
protected function followPath():void{
var _local1:Position = cell.next.mid;
var _local2:Point = new Point((_local1.x - cell.mid.x), (_local1.y - cell.mid.y));
}
}
}//package boxhead.world.thing.character
Section 306
//LocalCharacter (boxhead.world.thing.character.LocalCharacter)
package boxhead.world.thing.character {
import boxhead.events.*;
import boxhead.world.*;
public class LocalCharacter extends PlayerCharacter {
public var preventSpawn:Boolean;// = true
protected var _respawnTime:int;
protected var storedPositions:Array;
public function LocalCharacter(){
storedPositions = new Array();
}
override public function die(_arg1:Boolean=true):void{
super.die(_arg1);
_respawnTime = RESPAWN_TIME;
storedPositions = new Array();
}
public function get respawnTime():int{
return (_respawnTime);
}
public function unlag(_arg1:int):void{
var _local2:int;
var _local3:Position;
if ((((_arg1 == 0)) || ((storedPositions.length == 0)))){
fireHit.pos = pos;
} else {
_local2 = Math.max(0, Math.min((storedPositions.length - 1), int((_arg1 / Constants.PROCESS_INTERVAL))));
_local3 = storedPositions[_local2];
fireHit.pos = _local3;
};
}
override public function process():void{
super.process();
if (dead){
_respawnTime = (_respawnTime - Constants.PROCESS_INTERVAL);
if ((((_respawnTime <= 0)) && (!(preventSpawn)))){
dispatchEvent(new CharacterEvent(CharacterEvent.RESPAWN));
respawn();
};
currentWeapon.fireRelease();
} else {
if (firing){
currentWeapon.fireDown();
} else {
currentWeapon.fireRelease();
};
storedPositions.unshift(pos.clone());
if (storedPositions.length > Constants.MAX_STORED_POSITIONS){
storedPositions.pop();
};
};
updateWeapons();
}
protected static function get RESPAWN_TIME():int{
return (5000);
}
}
}//package boxhead.world.thing.character
Section 307
//PlayerCharacter (boxhead.world.thing.character.PlayerCharacter)
package boxhead.world.thing.character {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.ui.*;
import boxhead.sounds.*;
import boxhead.game.*;
import boxhead.world.thing.display.*;
import boxhead.world.weapon.*;
import boxhead.events.*;
import boxhead.security.*;
import boxhead.assets.*;
import boxhead.options.*;
public class PlayerCharacter extends Character {
protected var currentFoot:int;// = 1
public var healthBar:HealthBar;
protected var _bodyModelIndex:int;// = -1
protected var _bodyColorIndex:int;// = -1
protected var bodyColors:Array;
protected var hurtSound:AreaSound;
public var hurtSounds:Array;
private var storedSpeedMultiplier:StoredNumber;
protected var _headModelIndex:int;// = -1
private var weaponPool:Array;
protected var _headColorIndex:int;// = -1
protected var flashTime:int;// = 0
public var refillTarget:Weapon;
private var _currentWeapon:Weapon;
protected var headColors:Array;
private var weaponBanks:Array;
public var overhead1:StoredText;
public var overhead2:StoredText;
protected static const FLASH_CT:ColorTransform = new ColorTransform(0.5, 0.2, 0.2, 1, 110, 0, 0, 0);
protected static const RIGHT_FOOT:int = 1;
protected static const FLASH_TIME:int = (0.3 * SECOND);
protected static const LEFT_FOOT:int = 0;
public static const DEFAULT_HEALTH:StoredInt = new StoredInt(100);
public function PlayerCharacter(){
storedSpeedMultiplier = new StoredNumber(1);
super();
hp = (maxHp = DEFAULT_HEALTH.value);
active = false;
healthBar = new HealthBar();
overhead1 = new StoredText(StoredText.OverheadText);
overhead2 = new StoredText(StoredText.OverheadText);
headModelIndex = 0;
bodyModelIndex = 0;
weaponBanks = new Array();
weaponPool = new Array();
}
public function selectStartWeapon(_arg1:Boolean=false):void{
if (weaponPool.length == 0){
return;
};
selectWeaponByID(WeaponInfo.AKIMBO_PISTOLS_ID, _arg1);
if (currentWeapon != null){
return;
};
selectWeaponByID(WeaponInfo.PISTOL_ID, _arg1);
if (currentWeapon != null){
return;
};
selectWeapon(weaponPool[0], _arg1);
}
override public function drawShadow(_arg1:BitmapData, _arg2:Point):void{
if (!active){
return;
};
_arg2 = _arg2.add(renderOffset);
if (dead){
shadows.draw(_arg1, _arg2, animator.deadFrame(dir), true);
} else {
shadows.draw(_arg1, _arg2, animator.shadowFrame(dir, currentWeapon.animID), true);
};
}
protected function drawBody(_arg1:BitmapData, _arg2:Point, _arg3:int):void{
if (flashTime > 0){
if (flashBodyCustom){
flashBodyCustom.draw(_arg1, _arg2, _arg3);
};
if (flashBody){
flashBody.draw(_arg1, _arg2, _arg3);
};
} else {
if (bodyCustom){
bodyCustom.draw(_arg1, _arg2, _arg3);
};
if (body){
body.draw(_arg1, _arg2, _arg3);
};
};
}
public function updateAmmoOverhead():void{
}
protected function playRightFootstepSound():void{
var _local1:Array;
if (cell){
_local1 = cell.footstepsR;
if (_local1){
SoundControl.playAreaSound(_local1[int((_local1.length * Math.random()))], pos);
};
};
currentFoot = LEFT_FOOT;
}
override public function die(_arg1:Boolean=true):void{
super.die();
if (_arg1){
SoundControl.playDelayedAreaSound(SoundList.CORPSE_THUD, pos.clone(), 280);
if (((hurtSounds) && (((!(hurtSound)) || (hurtSound.complete))))){
hurtSound = SoundControl.playAreaSound(hurtSounds[(9 + int((Math.random() * 3)))], pos);
};
};
healthBar.update(0);
}
override public function getSpeed():Number{
return (((maxSpeed * currentWeapon.moveSpeed) * speedMultiplier));
}
public function pickupRemoteWeapons():void{
var _local1:WeaponInfo;
var _local2:Weapon;
for each (_local1 in WeaponInfo.getList()) {
_local2 = _local1.create();
if (_local2){
_local2.ammo = null;
pickupWeapon(_local2);
};
};
selectStartWeapon(false);
}
public function nextHeadModel():void{
headModelIndex = ((_headModelIndex + 1) % BodyParts.heads.length);
}
public function useTeamColors(_arg1:int):void{
var _local2:ThingDisplay;
if (((!((_arg1 == Player.RED_TEAM))) && (!((_arg1 == Player.BLUE_TEAM))))){
return;
};
_local2 = bodyCustom;
if (bodyCustom.master){
_local2 = bodyCustom.master;
bodyCustom.dispose();
};
bodyCustom = _local2.clone();
bodyCustom.tint(BodyParts.bodyTeamColor(bodyModelIndex, _arg1));
_local2 = headCustom;
if (headCustom.master){
_local2 = headCustom.master;
headCustom.dispose();
};
headCustom = _local2.clone();
headCustom.tint(BodyParts.headTeamColor(headModelIndex, _arg1));
}
public function updateScoreOverhead():void{
if (!local){
switch (owner.placing){
case 0:
overhead2.update("");
break;
case 1:
overhead2.update("1st");
break;
case 2:
overhead2.update("2nd");
break;
case 3:
overhead2.update("3rd");
break;
default:
overhead2.update((owner.placing + "th"));
break;
};
};
}
override public function dispose():void{
var _local1:Weapon;
for each (_local1 in weaponPool) {
_local1.removeEventListener(FireEvent.FIRE, fireWeapon, false);
_local1.removeEventListener(FireEvent.EFFECTS, weaponEffects, false);
};
super.dispose();
}
public function selectWeaponByID(_arg1:int, _arg2:Boolean=true):void{
var _local3:Weapon = getWeaponByID(_arg1);
if (_local3){
selectWeapon(_local3, _arg2);
};
}
public function selectWeaponBank(_arg1:int):void{
var _local3:int;
var _local4:int;
var _local5:Weapon;
var _local2:Array = weaponBanks[_arg1];
if (((!(_local2)) || (!(_local2.length)))){
return;
};
if (_arg1 != currentWeapon.bankID){
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
if (_local5.available){
if (selectWeapon(_local5)){
};
return;
};
_local4++;
};
return;
};
_local3 = 0;
while (_local3 < _local2.length) {
if (_local2[_local3] == currentWeapon){
_local4 = ((_local3 + 1) % _local2.length);
while (_local4 != _local3) {
_local5 = _local2[_local4];
if (_local5.available){
if (selectWeapon(_local5)){
};
return;
};
_local4 = ((_local4 + 1) % _local2.length);
};
return;
};
_local3++;
};
}
public function checkAutoSwitch():void{
var _local1:Weapon;
if (((local) && (!(currentWeapon.available)))){
_local1 = currentWeapon;
prevWeapon();
if ((((((((currentWeapon.weaponID == WeaponInfo.PISTOL_ID)) || ((currentWeapon.weaponID == WeaponInfo.PISTOL_ID)))) && (_local1.ammo))) && ((_local1.ammo.count == 0)))){
refillTarget = _local1;
};
};
}
override public function drawOverhead(_arg1:BitmapData, _arg2:Point):void{
if (hp <= 0){
return;
};
animate();
_arg2 = _arg2.add(renderOffset);
_arg2.y = (_arg2.y - 55);
healthBar.draw(_arg1, _arg2);
if (!local){
_arg2.y = (_arg2.y - 20);
overhead2.draw(_arg1, _arg2);
_arg2.y = (_arg2.y - 12);
overhead1.draw(_arg1, _arg2);
};
}
public function get headModelIndex():int{
return (_headModelIndex);
}
public function get headColorIndex():int{
return (_headColorIndex);
}
public function nextBodyColor():void{
bodyColorIndex = ((_bodyColorIndex + 1) % bodyColors.length);
}
public function prevWeapon():void{
var _local1:int;
var _local2:Weapon;
var _local3:int = weaponPool.indexOf(currentWeapon);
_local1 = (_local3 - 1);
while (_local1 >= 0) {
_local2 = weaponPool[_local1];
if (_local2.available){
selectWeapon(_local2);
return;
};
_local1--;
};
_local1 = (weaponPool.length - 1);
while (_local1 > _local3) {
_local2 = weaponPool[_local1];
if (_local2.available){
selectWeapon(_local2);
return;
};
_local1--;
};
}
public function nextHeadColor():void{
headColorIndex = ((_headColorIndex + 1) % headColors.length);
}
public function pickupWeapon(_arg1:Weapon):void{
var _local2:Weapon;
var _local3:Boolean;
var _local4:int;
var _local5:int = _arg1.weaponID;
var _local6:Array = weaponBanks[_arg1.bankID];
if (!_local6){
_local6 = (weaponBanks[_arg1.bankID] = new Array());
};
for each (_local2 in _local6) {
if (_local2 == _arg1){
return;
};
if (_local2.weaponID == _local5){
if (_local2.ammo){
_local2.ammo.combine(_arg1.ammo);
};
return;
};
};
_arg1.character = this;
_local3 = false;
_local4 = 0;
while (_local4 < _local6.length) {
_local2 = _local6[_local4];
if (_arg1.bankPriority < _local2.bankPriority){
_local6.splice(_local4, 0, _arg1);
_local3 = true;
break;
};
_local4++;
};
if (!_local3){
_local6.push(_arg1);
};
_local3 = false;
_local4 = (weaponPool.length - 1);
while (_local4 >= 0) {
_local2 = weaponPool[_local4];
if ((((_arg1.bankID > _local2.bankID)) || ((((_arg1.bankID == _local2.bankID)) && ((_arg1.bankPriority < _local2.bankPriority)))))){
weaponPool.splice((_local4 + 1), 0, _arg1);
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
weaponPool.unshift(_arg1);
};
_arg1.addEventListener(FireEvent.FIRE, fireWeapon, false, 0, true);
_arg1.addEventListener(FireEvent.EFFECTS, weaponEffects, false, 0, true);
}
override public function getRenderArea():Rectangle{
var _local1:int = animator.headFrame(dir, currentWeapon.animID);
var _local2:int = animator.bodyFrame(dir, currentWeapon.animID);
var _local3:int = animator.weaponFrame(dir, currentWeapon.animID);
var _local4:Rectangle = head.getRenderArea(_local1).union(headCustom.getRenderArea(_local1));
_local4 = _local4.union(body.getRenderArea(_local2).union(bodyCustom.getRenderArea(_local2)));
if (currentWeapon.display){
_local4 = _local4.union(currentWeapon.display.getRenderArea(_local3));
};
return (_local4);
}
public function selectBestWeapon(_arg1:Boolean=false):void{
var _local2:Weapon;
var _local3:WeaponInfo;
var _local4:Weapon;
var _local5:WeaponInfo;
for each (_local4 in weaponPool) {
_local5 = WeaponInfo.lookup(_local4.weaponID);
if (((!(_local2)) || ((_local5.price.cost > _local3.price.cost)))){
_local2 = _local4;
_local3 = _local5;
};
};
if (_local2){
selectWeapon(_local2, _arg1);
};
}
public function dropWeaponByID(_arg1:int):void{
var _local6:Weapon;
var _local2:Boolean;
var _local3:int = (weaponPool.length - 1);
while (_local3 >= 0) {
_local6 = weaponPool[_local3];
if (_local6.weaponID == _arg1){
weaponPool.splice(_local3, 1);
_local2 = true;
break;
};
_local3--;
};
if (!_local2){
return;
};
_local6.removeEventListener(FireEvent.FIRE, fireWeapon);
_local6.removeEventListener(FireEvent.EFFECTS, weaponEffects);
var _local4:Array = weaponBanks[_local6.bankID];
var _local5:int = _local4.indexOf(_local6);
if (_local5 >= 0){
_local4.splice(_local5, 1);
};
}
private function selectWeapon(_arg1:Weapon, _arg2:Boolean=true):void{
if (_arg1 == _currentWeapon){
return;
};
refillTarget = null;
if (_currentWeapon){
_arg1.remainingReloadTime = Math.max(_arg1.remainingReloadTime, _currentWeapon.remainingReloadTime);
};
_currentWeapon = _arg1;
if (_arg2){
_arg1.playChangeWeaponSound();
};
animator.moveSpeed = _arg1.moveSpeed;
updateAmmoOverhead();
dispatchEvent(new CharacterEvent(CharacterEvent.WEAPON_SWITCH, false, false, _arg1.weaponID));
}
protected function damageFlash():void{
flashTime = FLASH_TIME;
}
public function nextWeapon():void{
var _local1:int;
var _local2:Weapon;
var _local3:int = weaponPool.indexOf(currentWeapon);
_local1 = (_local3 + 1);
while (_local1 < weaponPool.length) {
_local2 = weaponPool[_local1];
if (_local2.available){
selectWeapon(_local2);
return;
};
_local1++;
};
_local1 = 0;
while (_local1 < _local3) {
_local2 = weaponPool[_local1];
if (_local2.available){
selectWeapon(_local2);
return;
};
_local1++;
};
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
var _local3:int;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:int;
var _local9:int;
var _local10:int;
if (!active){
return;
};
Debug.drawCircle(pos.x, pos.y, moveHit.radius, debugColor);
_arg2 = _arg2.add(renderOffset);
if (dead){
_local3 = animator.deadFrame(dir);
_local4 = (((dir.dy > 0)) && (animator.animFinished));
if (_local4){
headCustom.draw(_arg1, _arg2, _local3);
head.draw(_arg1, _arg2, _local3);
};
bodyCustom.draw(_arg1, _arg2, _local3);
body.draw(_arg1, _arg2, _local3);
if (!_local4){
headCustom.draw(_arg1, _arg2, _local3);
head.draw(_arg1, _arg2, _local3);
};
} else {
_local5 = (dir.dy < 0);
_local6 = currentWeapon.drawFirst(dir);
_local7 = (((dir.index <= Direction.SW.index)) || ((dir.index >= Direction.E.index)));
_local8 = animator.headFrame(dir, currentWeapon.animID);
_local9 = animator.bodyFrame(dir, currentWeapon.animID);
_local10 = animator.weaponFrame(dir, currentWeapon.animID);
if (((_local7) && (currentWeapon.backpack))){
currentWeapon.backpack.draw(_arg1, _arg2, _local10);
};
drawBody(_arg1, _arg2, _local9);
if (((((_local5) && (currentWeapon.muzzleFlash))) && (currentWeapon.flashVisible))){
currentWeapon.muzzleFlash.draw(_arg1, _arg2.add(currentWeapon.getMuzzleOffset(_local10)), dir.index);
};
if (((_local6) && (currentWeapon.display))){
currentWeapon.display.draw(_arg1, _arg2, _local10);
};
drawHead(_arg1, _arg2, _local8);
if (((!(_local6)) && (currentWeapon.display))){
currentWeapon.display.draw(_arg1, _arg2, _local10);
};
if (((((!(_local5)) && (currentWeapon.muzzleFlash))) && (currentWeapon.flashVisible))){
currentWeapon.muzzleFlash.draw(_arg1, _arg2.add(currentWeapon.getMuzzleOffset(_local10)), dir.index);
};
if (((!(_local7)) && (currentWeapon.backpack))){
currentWeapon.backpack.draw(_arg1, _arg2, _local10);
};
};
}
private function weaponEffects(_arg1:FireEvent):void{
var _local2:Weapon = (_arg1.target as Weapon);
if (_local2 != currentWeapon){
return;
};
dispatchEvent(_arg1);
}
public function updateOverheads():void{
if (local){
overhead1.update("");
updateAmmoOverhead();
} else {
if (owner){
overhead1.update(owner.name);
updateScoreOverhead();
} else {
overhead1.update("");
overhead2.update("");
};
};
}
protected function drawHead(_arg1:BitmapData, _arg2:Point, _arg3:int):void{
if (flashTime > 0){
if (flashHeadCustom){
flashHeadCustom.draw(_arg1, _arg2, _arg3);
};
if (flashHead){
flashHead.draw(_arg1, _arg2, _arg3);
};
} else {
if (headCustom){
headCustom.draw(_arg1, _arg2, _arg3);
};
if (head){
head.draw(_arg1, _arg2, _arg3);
};
};
}
public function getWeaponBanks():Array{
return (weaponBanks);
}
public function getWeaponPool():Array{
return (weaponPool.concat());
}
override public function reset():void{
var _local1:Weapon;
super.reset();
for each (_local1 in weaponPool) {
if (_local1.ammo){
_local1.ammo.add(100);
};
};
updateOverheads();
}
public function set speedMultiplier(_arg1:Number):void{
storedSpeedMultiplier.value = _arg1;
}
override public function move(_arg1:CellGrid):void{
super.move(_arg1);
if ((((Preferences.footsteps == Preferences.ON)) || (((local) && ((Preferences.footsteps == Preferences.PLAYER)))))){
if (moving){
if (currentFoot == LEFT_FOOT){
if ((animator.animProgress / animator.animLength) < 0.5){
playLeftFootstepSound();
};
} else {
if ((animator.animProgress / animator.animLength) > 0.5){
playRightFootstepSound();
};
};
} else {
currentFoot = LEFT_FOOT;
};
};
}
public function set headModelIndex(_arg1:int):void{
if (((headCustom) && (headCustom.master))){
headCustom.dispose();
};
if (flashHead){
flashHead.dispose();
};
_headModelIndex = Math.max(0, Math.min((BodyParts.heads.length - 1), _arg1));
var _local2:String = BodyParts.heads[_headModelIndex];
head = Assets.lookup((_local2 + "Head"));
headCustom = Assets.lookup((_local2 + "HeadCustom"));
headColors = BodyParts.headColors(headModelIndex);
flashHead = flashThingDisplay(head);
headColorIndex = 0;
}
public function set bodyModelIndex(_arg1:int):void{
if (((bodyCustom) && (bodyCustom.master))){
bodyCustom.dispose();
};
if (flashBody){
flashBody.dispose();
};
_bodyModelIndex = Math.max(0, Math.min((BodyParts.bodies.length - 1), _arg1));
var _local2:String = BodyParts.bodies[_bodyModelIndex];
body = Assets.lookup((_local2 + "Body"));
bodyCustom = Assets.lookup((_local2 + "BodyCustom"));
bodyColors = BodyParts.bodyColors(_bodyModelIndex);
flashBody = flashThingDisplay(body);
bodyColorIndex = 0;
}
protected function playLeftFootstepSound():void{
var _local1:Array;
if (cell){
_local1 = cell.footstepsL;
if (_local1){
SoundControl.playAreaSound(_local1[int((_local1.length * Math.random()))], pos);
};
};
currentFoot = RIGHT_FOOT;
}
public function set headColorIndex(_arg1:int):void{
if (!headCustom){
return;
};
if (flashHeadCustom){
flashHeadCustom.dispose();
};
_arg1 = Math.max(0, Math.min((headColors.length - 1), _arg1));
_headColorIndex = _arg1;
var _local2:ThingDisplay = headCustom;
if (headCustom.master){
_local2 = headCustom.master;
headCustom.dispose();
};
headCustom = _local2.clone();
headCustom.tint(headColors[_headColorIndex]);
flashHeadCustom = flashThingDisplay(headCustom);
}
public function set bodyColorIndex(_arg1:int):void{
if (!bodyCustom){
return;
};
if (flashBodyCustom){
flashBodyCustom.dispose();
};
_arg1 = Math.max(0, Math.min((bodyColors.length - 1), _arg1));
_bodyColorIndex = _arg1;
var _local2:ThingDisplay = bodyCustom;
if (bodyCustom.master){
_local2 = bodyCustom.master;
bodyCustom.dispose();
};
bodyCustom = _local2.clone();
bodyCustom.tint(bodyColors[_bodyColorIndex]);
flashBodyCustom = flashThingDisplay(bodyCustom);
}
override public function setHealth(_arg1:int, _arg2:Boolean=true):void{
if ((((_arg1 > 0)) && ((_arg1 < hp)))){
damageFlash();
if (((((_arg2) && (hurtSounds))) && (((!(hurtSound)) || (hurtSound.complete))))){
hurtSound = SoundControl.playAreaSound(hurtSounds[int((Math.random() * 9))], pos);
};
};
super.setHealth(_arg1, _arg2);
healthBar.update((hp / maxHp));
}
public function get speedMultiplier():Number{
return (storedSpeedMultiplier.value);
}
override public function process():void{
super.process();
if (flashTime > 0){
flashTime--;
};
}
public function updateWeapons():void{
var _local1:Weapon;
for each (_local1 in weaponPool) {
_local1.process((_local1 == currentWeapon));
};
}
public function get bodyColorIndex():int{
return (_bodyColorIndex);
}
public function get bodyModelIndex():int{
return (_bodyModelIndex);
}
public function getWeaponByID(_arg1:int):Weapon{
var _local2:Weapon;
for each (_local2 in weaponPool) {
if (_local2.weaponID == _arg1){
return (_local2);
};
};
return (null);
}
public function nextBodyModel():void{
bodyModelIndex = ((_bodyModelIndex + 1) % BodyParts.bodies.length);
}
override public function set owner(_arg1:Player):void{
super.owner = _arg1;
updateOverheads();
if (_arg1.isLocal){
_firePos = pos;
} else {
_firePos = pos.clone();
};
}
private function fireWeapon(_arg1:FireEvent):void{
var _local2:Weapon = (_arg1.target as Weapon);
if (_local2 != currentWeapon){
return;
};
dispatchEvent(_arg1);
updateAmmoOverhead();
}
public function get currentWeapon():Weapon{
return (_currentWeapon);
}
protected static function flashThingDisplay(_arg1:ThingDisplay):ThingDisplay{
var _local2:ThingDisplay = _arg1.clone();
_local2.tint(FLASH_CT);
return (_local2);
}
}
}//package boxhead.world.thing.character
Section 308
//RemoteCharacter (boxhead.world.thing.character.RemoteCharacter)
package boxhead.world.thing.character {
import boxhead.world.thing.*;
public class RemoteCharacter extends PlayerCharacter {
override public function hurt(_arg1:int, _arg2:int, _arg3:HasOwner):void{
}
override public function process():void{
super.process();
updateWeapons();
}
}
}//package boxhead.world.thing.character
Section 309
//SpyCamera (boxhead.world.thing.character.SpyCamera)
package boxhead.world.thing.character {
import boxhead.world.*;
import boxhead.world.thing.*;
import flash.display.*;
import flash.geom.*;
public class SpyCamera extends Mover {
protected const speed:Number = 0.8;
protected const ACTIVATION_TIME:int = 200;
protected var activationTime:int;
public function drawScanLines(_arg1:BitmapData):void{
var _local2:Number = Math.min(1, ((Time.current - activationTime) / ACTIVATION_TIME));
var _local3:int = (Math.round(((_arg1.height * (0.5 - (_local2 / 2))) / 2)) * 2);
var _local4:int = (Math.round(((_arg1.height * (0.5 + (_local2 / 2))) / 2)) * 2);
if (_local2 < 1){
_arg1.fillRect(new Rectangle(0, 0, _arg1.width, _local3), 0);
_arg1.fillRect(new Rectangle(0, _local4, _arg1.width, (_arg1.height - _local4)), 0);
};
var _local5:Rectangle = new Rectangle(0, 0, _arg1.width, 1);
var _local6:int = _local3;
while (_local6 <= _local4) {
_local5.y = _local6;
_arg1.fillRect(_local5, 0x8000);
_local6 = (_local6 + 2);
};
}
public function move(_arg1:CellGrid, _arg2:Number):void{
var _local3:Point;
var _local4:Number;
var _local5:Number;
recordPreviousPos();
if (moveDir){
_local3 = new Point(moveDir.dx, moveDir.dy);
_local3.normalize(speed);
_local4 = (Constants.CAMERA_CELL_X_RADIUS * _arg2);
_local5 = (Constants.CAMERA_CELL_Y_RADIUS * _arg2);
x = Math.max(_local4, Math.min((_arg1.width - _local4), (x + _local3.x)));
y = Math.max(_local5, Math.min((_arg1.height - _local5), (y + _local3.y)));
};
}
public function active():void{
activationTime = Time.current;
}
}
}//package boxhead.world.thing.character
Section 310
//ThingClip (boxhead.world.thing.display.ThingClip)
package boxhead.world.thing.display {
import flash.display.*;
import flash.geom.*;
public class ThingClip extends ThingDisplay {
private var frames:Array;
public function ThingClip(_arg1:BitmapData){
super(_arg1);
frames = new Array();
}
override public function getRenderArea(_arg1:int=0):Rectangle{
var _local2:ThingClipFrame = frames[_arg1];
return (_local2.getRenderArea());
}
override public function draw(_arg1:BitmapData, _arg2:Point, _arg3:int=0, _arg4:Boolean=true):void{
if ((((_arg3 < 0)) || ((_arg3 >= numFrames)))){
return;
};
var _local5:ThingClipFrame = frames[_arg3];
_arg1.copyPixels(bitmapData, _local5.bounds, _arg2.add(_local5.offset), null, null, _arg4);
}
override public function flip(_arg1:Boolean, _arg2:Boolean):void{
var _local6:ThingClipFrame;
var _local7:ThingClipFrame;
if (((!(_arg1)) && (!(_arg2)))){
return;
};
super.flip(_arg1, _arg2);
var _local3:Array = new Array();
frames = new Array();
var _local4:int = bitmapData.width;
var _local5:int = bitmapData.height;
for each (_local6 in _local3) {
_local7 = _local6.clone();
_local7.flip(_arg1, _arg2, _local4, _local5);
frames.push(_local7);
};
}
public function setFrames(_arg1:Array):void{
frames = _arg1;
}
override public function getOffset(_arg1:int=0):Point{
return (frames[_arg1].offset);
}
public function get numFrames():int{
return (frames.length);
}
override public function clone():ThingDisplay{
var _local1:ThingClip = new ThingClip(bitmapData.clone());
_local1.master = this;
_local1.setFrames(frames);
return (_local1);
}
public function addFrame(_arg1:Rectangle, _arg2:Point):void{
frames.push(new ThingClipFrame(_arg1, _arg2));
}
}
}//package boxhead.world.thing.display
Section 311
//ThingClipFrame (boxhead.world.thing.display.ThingClipFrame)
package boxhead.world.thing.display {
import flash.geom.*;
public class ThingClipFrame {
public var offset:Point;
public var bounds:Rectangle;
public function ThingClipFrame(_arg1:Rectangle, _arg2:Point){
bounds = _arg1;
offset = _arg2;
}
public function flip(_arg1:Boolean, _arg2:Boolean, _arg3:int, _arg4:int):void{
offset = offset.clone();
if (((_arg1) && (_arg2))){
bounds = new Rectangle((_arg3 - bounds.right), (_arg4 - bounds.bottom), bounds.width, bounds.height);
offset.x = (-(_arg3) - offset.x);
offset.y = (-(_arg4) - offset.y);
} else {
if (_arg1){
bounds = new Rectangle((_arg3 - bounds.right), bounds.y, bounds.width, bounds.height);
offset.x = (-(_arg3) - offset.x);
} else {
if (_arg2){
bounds = new Rectangle(bounds.x, (_arg4 - bounds.bottom), bounds.width, bounds.height);
offset.y = (-(_arg4) - offset.y);
};
};
};
}
public function getRenderArea():Rectangle{
return (new Rectangle(offset.x, offset.y, bounds.width, bounds.height));
}
public function clone():ThingClipFrame{
return (new ThingClipFrame(bounds.clone(), offset.clone()));
}
}
}//package boxhead.world.thing.display
Section 312
//ThingDisplay (boxhead.world.thing.display.ThingDisplay)
package boxhead.world.thing.display {
import flash.display.*;
import flash.geom.*;
public class ThingDisplay {
public var master:ThingDisplay;
public var bitmapData:BitmapData;
public function ThingDisplay(_arg1:BitmapData){
master = null;
bitmapData = _arg1;
}
public function getRenderArea(_arg1:int=0):Rectangle{
return (new Rectangle(0, 0, 0, 0));
}
public function get width():int{
return (bitmapData.width);
}
public function get height():int{
return (bitmapData.height);
}
public function getOffset(_arg1:int=0):Point{
return (new Point(0, 0));
}
public function draw(_arg1:BitmapData, _arg2:Point, _arg3:int=0, _arg4:Boolean=true):void{
}
public function flip(_arg1:Boolean, _arg2:Boolean):void{
var _local3:Number = 1;
var _local4:Number = 1;
var _local5:Number = 0;
var _local6:Number = 0;
if (_arg1){
_local3 = -1;
_local5 = bitmapData.width;
};
if (_arg2){
_local4 = -1;
_local6 = bitmapData.height;
};
var _local7:BitmapData = bitmapData.clone();
bitmapData.fillRect(bitmapData.rect, 0);
bitmapData.draw(_local7, new Matrix(_local3, 0, 0, _local4, _local5, _local6));
}
public function tint(_arg1:ColorTransform):void{
bitmapData.colorTransform(bitmapData.rect, _arg1);
}
public function clone():ThingDisplay{
var _local1:ThingDisplay = new ThingDisplay(bitmapData.clone());
_local1.master = this;
return (_local1);
}
public function dispose():void{
if (bitmapData){
bitmapData.dispose();
};
}
}
}//package boxhead.world.thing.display
Section 313
//ThingSprite (boxhead.world.thing.display.ThingSprite)
package boxhead.world.thing.display {
import flash.display.*;
import flash.geom.*;
public class ThingSprite extends ThingDisplay {
private var offset:Point;
public function ThingSprite(_arg1:BitmapData, _arg2:Point){
super(_arg1);
this.offset = _arg2.clone();
}
override public function getRenderArea(_arg1:int=0):Rectangle{
return (new Rectangle(offset.x, offset.y, bitmapData.width, bitmapData.height));
}
override public function draw(_arg1:BitmapData, _arg2:Point, _arg3:int=0, _arg4:Boolean=true):void{
_arg1.copyPixels(bitmapData, bitmapData.rect, this.offset.add(_arg2), null, null, _arg4);
}
override public function getOffset(_arg1:int=0):Point{
return (offset);
}
override public function clone():ThingDisplay{
var _local1:ThingSprite = new ThingSprite(bitmapData.clone(), offset.clone());
_local1.master = this;
return (_local1);
}
override public function flip(_arg1:Boolean, _arg2:Boolean):void{
super.flip(_arg1, _arg2);
offset = offset.clone();
if (_arg1){
offset.x = (-(bitmapData.width) - offset.x);
};
if (_arg2){
offset.y = (-(bitmapData.height) - offset.y);
};
}
}
}//package boxhead.world.thing.display
Section 314
//Barrel (boxhead.world.thing.obstacle.deployable.Barrel)
package boxhead.world.thing.obstacle.deployable {
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.thing.particle.*;
import boxhead.world.weapon.*;
import boxhead.security.*;
import boxhead.assets.*;
import boxhead.options.*;
public class Barrel extends Deployable {
public var variant:int;
public static const DEFAULT_HEALTH:StoredInt = new StoredInt(20);
public static const VARIANTS:int = 3;
private static var displays:Array;
public function Barrel(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:int=0){
super(_arg1, _arg2, _arg3, _arg4);
this.variant = _arg5;
if (!_arg5){
_arg5 = int((1 + (Math.random() * VARIANTS)));
};
_hit = new HitCircle(pos, 0.3);
explodeWeaponID = WeaponInfo.EXPLOSION_ID;
deploySound = SoundList.BARREL_PLACE;
_flat = true;
display = displays[_arg5];
shadow = displays[0];
_height = CRATE_HEIGHT;
_hp = (_maxHp = DEFAULT_HEALTH.value);
}
override public function get explodes():Boolean{
return (true);
}
override public function get explosionInnerRadius():Number{
return ((explosionRadius * 0.8));
}
override public function playDeathSounds():void{
SoundControl.playAreaSound(SoundList.EXPLOSION_FIERY, pos);
}
override public function get explosionRadius():Number{
return (3);
}
override public function get allowTeamDamage():Boolean{
return (true);
}
override public function clone():Deployable{
return (new Barrel(owner, explosionDamage, x, y, variant));
}
override public function getDeathScreenShake():ScreenShake{
return (smallScreenShake());
}
override public function getDeathParticles():Array{
var _local2:int;
var _local3:int;
var _local1:Array = [new Explosion(x, y, 0, null, 0), new Scorch(x, y, 0), new ScorchCell(x, y, 0)];
if (Preferences.smoke){
_local2 = (0.7 + ((Math.random() * Math.random()) * 3));
_local3 = 0;
while (_local3 < _local2) {
_local1.push(new Debris(x, y, new Direction(((Math.random() * Math.PI) * 2)), ((Math.random() * 0.3) + 0.2), 10, (17 + (Math.random() * 5)), (30 + (Math.random() * 50))));
_local3++;
};
};
return (_local1);
}
public static function prerender():void{
displays = [Assets.lookup("Barrel_Shadow"), Assets.lookup("Barrel1"), Assets.lookup("Barrel2"), Assets.lookup("Barrel3")];
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 315
//Barricade (boxhead.world.thing.obstacle.deployable.Barricade)
package boxhead.world.thing.obstacle.deployable {
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.security.*;
import boxhead.assets.*;
public class Barricade extends Deployable {
public var variant:int;
public static const DEFAULT_HEALTH:StoredInt = new StoredInt(40);
public static const VARIANTS:int = 3;
private static var displays:Array;
public function Barricade(_arg1:Player, _arg2:Number, _arg3:Number, _arg4:int=0){
super(_arg1, 0, _arg2, _arg3);
if (!_arg4){
_arg4 = int((1 + (Math.random() * VARIANTS)));
};
this.variant = _arg4;
_hit = new HitCircle(pos, 0.5);
deploySound = SoundList.BARRICADE_PLACE;
display = displays[_arg4];
shadow = displays[0];
_height = LOW_HEIGHT;
_hp = (_maxHp = DEFAULT_HEALTH.value);
}
override public function clone():Deployable{
return (new Barricade(owner, x, y, variant));
}
public static function prerender():void{
displays = [Assets.lookup("Barricade_Shadow"), Assets.lookup("Barricade1"), Assets.lookup("Barricade2"), Assets.lookup("Barricade3")];
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 316
//ChargePack (boxhead.world.thing.obstacle.deployable.ChargePack)
package boxhead.world.thing.obstacle.deployable {
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.thing.*;
import boxhead.world.weapon.*;
import boxhead.events.*;
import boxhead.security.*;
import boxhead.assets.*;
public class ChargePack extends Deployable {
public var variant:int;
public static const DEFAULT_HEALTH:StoredInt = new StoredInt(1);
public static const VARIANTS:int = 4;
private static var displays:Array;
public function ChargePack(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:int=0){
super(_arg1, _arg2, _arg3, _arg4);
this.variant = _arg5;
if (!_arg5){
_arg5 = int((Math.random() * VARIANTS));
};
_hit = new HitCircle(pos, 0);
explodeWeaponID = WeaponInfo.CHARGE_PACK_PLANTER_ID;
deploySound = SoundList.CHARGE_PACK_PLANT;
_flat = true;
display = displays[_arg5];
_height = 0;
_hp = (_maxHp = DEFAULT_HEALTH.value);
}
override public function die(_arg1:HasOwner):void{
if (hp <= 0){
return;
};
setHealth(0);
dispatchEvent(new DeployableEvent(DeployableEvent.DAMAGE, false, false, this, 1, this));
}
override public function playDeathSounds():void{
if (((owner) && (owner.character))){
SoundControl.playAreaSound(SoundList.CHARGE_PACK_ACTIVATE, owner.character.pos);
};
SoundControl.playAreaSound(SoundList.CHARGE_PACK_EXPLOSION, pos);
}
override public function get explosionRadius():Number{
return (3);
}
override public function get solid():Boolean{
return (false);
}
override public function hurt(_arg1:int, _arg2:HasOwner):void{
}
override public function get explodes():Boolean{
return (true);
}
override public function getDeathParticles():Array{
return (explosionCluster());
}
override public function get explosionInnerRadius():Number{
return (1.5);
}
override public function getDeathScreenShake():ScreenShake{
return (smallScreenShake());
}
override public function clone():Deployable{
return (new ChargePack(owner, explosionDamage, x, y, variant));
}
public static function prerender():void{
displays = [Assets.lookup("ChargePack1"), Assets.lookup("ChargePack2"), Assets.lookup("ChargePack3"), Assets.lookup("ChargePack4")];
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 317
//Claymore (boxhead.world.thing.obstacle.deployable.Claymore)
package boxhead.world.thing.obstacle.deployable {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.thing.*;
import boxhead.world.thing.display.*;
import boxhead.world.weapon.*;
import boxhead.events.*;
import boxhead.security.*;
import boxhead.assets.*;
public class Claymore extends SmartDeployable {
protected var lightOff:ThingDisplay;
protected var triggeredBy:Character;
protected var lightOn:ThingDisplay;
protected var light:ThingDisplay;
protected var triggered:Boolean;// = false
protected var triggerTime:int;
public static const DEFAULT_HEALTH:StoredInt = new StoredInt(1);
protected static const TRIGGER_TIME:int = (1 * SECOND);
protected static var displays:Array;
public function Claymore(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:int=0){
var _local6:ColorTransform;
super(_arg1, _arg2, _arg3, _arg4);
_hit = new HitCircle(pos, 0.4);
explodeWeaponID = WeaponInfo.CLAYMORE_PLANTER_ID;
deploySound = SoundList.CLAYMORE_PLANT;
_flat = true;
depthOffset = -0.5;
display = displays[0];
lightOff = displays[1].clone();
lightOn = displays[2].clone();
light = lightOff;
if (_arg1.friendly){
_local6 = Team.FRIENDLY_LIGHT_CT;
} else {
_local6 = Team.ENEMY_LIGHT_CT;
};
lightOff.tint(_local6);
lightOn.tint(_local6);
_height = 0;
_hp = (_maxHp = DEFAULT_HEALTH.value);
}
override public function die(_arg1:HasOwner):void{
if (hp <= 0){
return;
};
setHealth(0);
dispatchEvent(new DeployableEvent(DeployableEvent.DAMAGE, false, false, this, 1, this));
}
override public function playDeathSounds():void{
SoundControl.playAreaSound(SoundList.CLAYMORE_EXPLOSION, pos);
}
override public function get explosionRadius():Number{
return (3);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
Debug.drawHit(_hit, debugColor);
_arg2 = _arg2.add(renderOffset);
display.draw(_arg1, _arg2, 0);
light.draw(_arg1, _arg2, 0);
}
override public function getDeathParticles():Array{
return (explosionCluster());
}
override public function clone():Deployable{
return (new ChargePack(owner, explosionDamage, x, y, 0));
}
override public function hurt(_arg1:int, _arg2:HasOwner):void{
}
override public function getDeathScreenShake():ScreenShake{
return (smallScreenShake());
}
override public function get solid():Boolean{
return (false);
}
override public function process(_arg1:CellGrid, _arg2:Array):void{
var _local3:Character;
if (triggered){
triggerTime--;
if (triggerTime <= 0){
die(triggeredBy);
};
} else {
if (local){
for each (_local3 in _arg2) {
if (!_local3.owner.friendlyWith(owner)){
if (_hit.intersects(_local3.moveHit)){
trigger(_local3);
break;
};
};
};
};
};
}
override public function get explodes():Boolean{
return (true);
}
override public function activate():void{
light = lightOn;
SoundControl.playAreaSound(SoundList.CLAYMORE_ACTIVATE, pos);
}
protected function trigger(_arg1:Character):void{
triggered = true;
triggerTime = TRIGGER_TIME;
triggeredBy = _arg1;
activate();
dispatchEvent(new DeployableEvent(DeployableEvent.ACTIVATE, false, false, this, 1, this));
}
override public function get explosionInnerRadius():Number{
return (1.5);
}
public static function prerender():void{
displays = [Assets.lookup("Claymore"), Assets.lookup("ClaymoreLight1"), Assets.lookup("ClaymoreLight2")];
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 318
//Deployable (boxhead.world.thing.obstacle.deployable.Deployable)
package boxhead.world.thing.obstacle.deployable {
import boxhead.world.*;
import boxhead.ui.*;
import flash.media.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.*;
import boxhead.events.*;
import boxhead.world.thing.obstacle.*;
public class Deployable extends Obstacle implements HasOwner {
protected var _maxHp:int;
public var index:int;
protected var _explosionDamage:int;
protected var _hp:int;
protected var deploySound:Sound;
protected var _owner:Player;
public var explodeWeaponID:int;
protected var healthBar:HealthBar;
protected var overhead:StoredText;
public function Deployable(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number){
_owner = _arg1;
_explosionDamage = _arg2;
this.x = _arg3;
this.y = _arg4;
_maxHp = (_hp = 1);
}
public function die(_arg1:HasOwner):void{
hurt(hp, _arg1);
}
public function get explodes():Boolean{
return (false);
}
public function get explosionInnerRadius():Number{
return ((explosionRadius * 0.8));
}
public function playDeathSounds():void{
}
public function get explosionRadius():Number{
return (3);
}
public function get hp():int{
return (_hp);
}
protected function smallScreenShake():ScreenShake{
return (ScreenShake.generateSmall(pos));
}
public function get maxHp():int{
return (_maxHp);
}
public function hurt(_arg1:int, _arg2:HasOwner):void{
setHealth(Math.max(0, (_hp - _arg1)));
dispatchEvent(new DeployableEvent(DeployableEvent.DAMAGE, false, false, this, _arg1, _arg2));
}
public function setHealth(_arg1:int):void{
_hp = _arg1;
if (healthBar){
healthBar.update((_hp / _maxHp));
};
}
public function playDeploySound():void{
if (deploySound){
SoundControl.playAreaSound(deploySound, pos);
};
}
public function get allowTeamDamage():Boolean{
return (false);
}
public function getDeathParticles():Array{
return (null);
}
public function get doTeamDamage():Boolean{
return (true);
}
public function clone():Deployable{
return (new Object(this).constructor(x, y, owner));
}
override protected function get debugColor():uint{
if (tall){
return (0xFFFF);
};
return (0x4040);
}
public function activate():void{
}
public function getDeathScreenShake():ScreenShake{
return (null);
}
protected function explosionCluster():Array{
var _local1:Array = [new Explosion(x, y, 0, null, 0), new Explosion((x - 1), (y - 1), 0, null, (50 + (Math.random() * 100))), new Explosion((x + 1), (y - 1), 0, null, (50 + (Math.random() * 100))), new Explosion((x - 1), (y + 1), 0, null, (50 + (Math.random() * 100))), new Explosion((x + 1), (y + 1), 0, null, (50 + (Math.random() * 100)))];
_local1.push(new Scorch(x, y, 0));
return (_local1);
}
public function set owner(_arg1:Player):void{
_owner = _arg1;
}
public function get local():Boolean{
return (((owner) && (owner.isLocal)));
}
public function snapToCell():void{
x = (int(x) + 0.5);
y = (int(y) + 0.5);
}
public function get owner():Player{
return (_owner);
}
public function get explosionDamage():Number{
return (_explosionDamage);
}
override public function get showInfraRed():Boolean{
return (true);
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 319
//SmartDeployable (boxhead.world.thing.obstacle.deployable.SmartDeployable)
package boxhead.world.thing.obstacle.deployable {
import boxhead.world.*;
import boxhead.game.*;
public class SmartDeployable extends Deployable {
public function SmartDeployable(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number){
super(_arg1, _arg2, _arg3, _arg4);
}
public function process(_arg1:CellGrid, _arg2:Array):void{
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 320
//Turret (boxhead.world.thing.obstacle.deployable.Turret)
package boxhead.world.thing.obstacle.deployable {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.ui.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.display.*;
import boxhead.world.weapon.*;
import boxhead.events.*;
import boxhead.world.thing.projectile.*;
import boxhead.options.*;
public class Turret extends SmartDeployable {
protected var _flashRemaining:int;// = 0
protected var dir:Direction;
protected var customDisplay:ThingDisplay;
protected var target:Character;
protected var muzzleOffsets:Array;
protected var fireSounds:Array;
protected var muzzleShake:Point;
protected var muzzlePosition:Position;
private var _reloadTime:int;
public var cameraFocus:Position;
protected var muzzleFlashes:Array;
public var weaponID:int;
public var range:Number;// = 10
protected var _flashLength:int;
protected var timeSinceFire:int;// = 999
protected var turnSpeed:Number;// = 0.05
public var ammo:Ammo;
public var damage:int;
private var _fireDelay:Number;// = 0.5
protected var muzzleFlashVariant:int;
public function Turret(_arg1:Player, _arg2:Number, _arg3:Number){
var _local4:ThingDisplay;
muzzlePosition = new Position();
_flashLength = (0.1 * SECOND);
_reloadTime = (_fireDelay * SECOND);
super(_arg1, 0, _arg2, _arg3);
if (((_arg1) && (_arg1.character))){
dir = _arg1.character.dir;
} else {
dir = Direction.S;
};
muzzleOffsets = getMuzzleOffsets();
deploySound = SoundList.TURRET_PLACE;
if (_arg1){
_local4 = customDisplay;
if (((customDisplay) && (customDisplay.master))){
customDisplay.dispose();
};
if (_local4){
customDisplay = _local4.clone();
if (_arg1.friendly){
customDisplay.tint(Team.FRIENDLY_TURRET_CT);
} else {
customDisplay.tint(Team.ENEMY_TURRET_CT);
};
};
};
explodeWeaponID = WeaponInfo.EXPLOSION_ID;
healthBar = new HealthBar();
}
protected function get smokeDistance():Number{
return (0.55);
}
public function get reloadTime():int{
return (_reloadTime);
}
override public function playDeathSounds():void{
SoundControl.playAreaSound(SoundList.EXPLOSION_ELECTRICITY_SHOCKWAVE, pos);
}
public function set reloadTime(_arg1:int):void{
_reloadTime = _arg1;
_fireDelay = (_reloadTime / SECOND);
}
public function get muzzleFlash():ThingDisplay{
return (muzzleFlashes[muzzleFlashVariant]);
}
protected function get smokeSize():Number{
return (1.5);
}
override public function getDeathParticles():Array{
var _local2:int;
var _local3:int;
var _local1:Array = [new Explosion(x, y, 0, null, 0), new Scorch(x, y, 0), new ScorchCell(x, y, 0)];
if (Preferences.smoke){
_local2 = (0.7 + ((Math.random() * Math.random()) * 3));
_local3 = 0;
while (_local3 < _local2) {
_local1.push(new Debris(x, y, new Direction(((Math.random() * Math.PI) * 2)), ((Math.random() * 0.3) + 0.2), 10, (17 + (Math.random() * 5)), (30 + (Math.random() * 50))));
_local3++;
};
};
return (_local1);
}
public function getTracers():Array{
return ([new Tracer(x, y, dir, barrelAltitude, range)]);
}
protected function updateOverhead():void{
if (!overhead){
return;
};
var _local1 = "";
if (ammo){
_local1 = (_local1 + ammo.count);
} else {
_local1 = (_local1 + "INF");
};
overhead.update(_local1);
}
protected function smokeParticle(_arg1:Tracer, _arg2:Number, _arg3:Boolean, _arg4:Number=0, _arg5:Number=0.05):Particle{
if (!Preferences.smoke){
return (null);
};
return (new Smoke((_arg1.startX + (_arg1.dx * smokeDistance)), (_arg1.startY + (_arg1.dy * smokeDistance)), ((_arg1.dir.radians + _arg4) + ((Math.random() - 0.5) * _arg5)), smokeSize, _arg1.distance, _arg2));
}
override public function drawOverhead(_arg1:BitmapData, _arg2:Point):void{
_arg2 = _arg2.add(renderOffset);
var _local3:Number = 0;
_local3 = Position.distance(pos, cameraFocus);
var _local4:Number = Math.max(0, Math.min(1, (1 - (int(((_local3 - 2) * 4)) / 10))));
_arg2.y = (_arg2.y - 55);
if (healthBar){
healthBar.alpha = _local4;
healthBar.draw(_arg1, _arg2);
};
_arg2.y = (_arg2.y - 19);
if (overhead){
overhead.alpha = _local4;
overhead.draw(_arg1, _arg2);
};
}
protected function get barrelDistance():Number{
return (0.5);
}
protected function shellCasing(_arg1:Tracer, _arg2:Number, _arg3:Number):Particle{
if (!Preferences.shells){
return (null);
};
return (new ShellCasing((_arg1.startX + (_arg1.dx * shellDistance)), (_arg1.startY + (_arg1.dy * shellDistance)), (((Math.PI + _arg1.dir.radians) - 0.5) + Math.random()), _arg2, _arg3));
}
protected function get shellDistance():Number{
return (-0.4);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
Debug.drawHit(hit, debugColor);
_arg2 = _arg2.add(renderOffset);
var _local3:int = int(((((dir.degrees + 270) + 5.625) % 360) / 11.25));
var _local4 = (dir.dy < 0);
if (((_local4) && (((flashRemaining) && (muzzleFlash))))){
muzzleFlash.draw(_arg1, _arg2.add(getMuzzleOffset(_local3)), _local3);
};
if (customDisplay){
customDisplay.draw(_arg1, _arg2, _local3);
};
display.draw(_arg1, _arg2, _local3);
if (((!(_local4)) && (((flashRemaining) && (muzzleFlash))))){
muzzleFlash.draw(_arg1, _arg2.add(getMuzzleOffset(_local3)), _local3);
};
}
protected function aim(_arg1:CellGrid, _arg2:Array):Boolean{
var _local3:Character;
var _local5:Character;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
target = null;
var _local4:Array = [];
for each (_local3 in _arg2) {
if (((_local3.owner.friendlyWith(owner)) || (_local3.dead))){
} else {
_local7 = (_local3.pos.x - pos.x);
_local8 = (_local3.pos.y - pos.y);
if (((_local7 * _local7) + (_local8 * _local8)) <= (range * range)){
_local4.push(_local3);
};
};
};
if (!_local4.length){
return (false);
};
var _local6:Number = 180;
for each (_local3 in _local4) {
_local9 = Position.atan(pos, _local3.pos);
_local10 = (_local9 - dir.radians);
while (_local10 < -(Math.PI)) {
_local10 = (_local10 + (Math.PI * 2));
};
while (_local10 > Math.PI) {
_local10 = (_local10 - (Math.PI * 2));
};
if (Math.abs(_local10) <= Math.abs(_local6)){
_local5 = _local3;
_local6 = _local10;
};
};
if (_local5){
target = _local5;
_local9 = (dir.radians + Math.max(-(turnSpeed), Math.min(turnSpeed, _local6)));
while (_local9 < -(Math.PI)) {
_local9 = (_local9 + (Math.PI * 2));
};
while (_local9 > Math.PI) {
_local9 = (_local9 - (Math.PI * 2));
};
dir = new Direction(_local9);
return ((Math.abs(_local6) <= turnSpeed));
};
return (false);
}
protected function updateHealthBar():void{
if (!healthBar){
return;
};
healthBar.update(1);
}
protected function fire():void{
timeSinceFire = 0;
if (ammo){
ammo.decrement();
};
updateOverhead();
if (muzzleFlashes){
muzzleFlashVariant = int((Math.random() * muzzleFlashes.length));
};
muzzlePosition.x = (x + (dir.dx * barrelDistance));
muzzlePosition.y = (y + (dir.dy * barrelDistance));
if (fireSounds){
SoundControl.playAreaSound(fireSounds[int((Math.random() * fireSounds.length))], muzzlePosition);
};
dispatchEvent(new FireEvent(FireEvent.FIRE, false, false, getShot()));
}
public function set fireDelay(_arg1:Number):void{
_fireDelay = _arg1;
_reloadTime = (_fireDelay * SECOND);
}
public function getProjectile():Projectile{
return (null);
}
public function getMuzzleOffset(_arg1:int):Point{
return (muzzleOffsets[_arg1]);
}
protected function get barrelAltitude():Number{
return (20);
}
protected function getMuzzleOffsets():Array{
return ([]);
}
public function get flashRemaining():int{
return (_flashRemaining);
}
protected function getShot():Shot{
return (new Shot(this));
}
public function get fireDelay():Number{
return (_fireDelay);
}
public function get flashLength():int{
return (_flashLength);
}
public function getParticles(_arg1:Tracer):Array{
return (null);
}
override public function process(_arg1:CellGrid, _arg2:Array):void{
timeSinceFire++;
if (((((((!(ammo)) || (ammo.count))) && (aim(_arg1, _arg2)))) && ((timeSinceFire >= reloadTime)))){
fire();
};
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 321
//TurretMG (boxhead.world.thing.obstacle.deployable.TurretMG)
package boxhead.world.thing.obstacle.deployable {
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.weapon.*;
import boxhead.security.*;
import boxhead.assets.*;
public class TurretMG extends Turret {
public static const DEFAULT_HEALTH:StoredInt = new StoredInt(50);
public static const DEFAULT_DAMAGE:StoredInt = new StoredInt(5);
private static const ALTITUDE_MG:Number = 15;
public static const DEFAULT_FIRE_DELAY:StoredNumber = new StoredNumber(0.5);
private static var _muzzleOffsets:Array;
private static var displays:Array;
public function TurretMG(_arg1:Player, _arg2:Number, _arg3:Number){
customDisplay = displays[2];
super(_arg1, _arg2, _arg3);
weaponID = WeaponInfo.TURRET_MG_PLANTER_ID;
_hit = new HitCircle(pos, 0.5);
_hp = (_maxHp = DEFAULT_HEALTH.value);
damage = DEFAULT_DAMAGE.value;
fireDelay = DEFAULT_FIRE_DELAY.value;
display = displays[1];
shadow = displays[0];
_height = 23;
range = 6;
fireSounds = [SoundList.TURRET_MG_SHOT1, SoundList.TURRET_MG_SHOT2, SoundList.TURRET_MG_SHOT3];
muzzleFlashes = [Assets.lookup("MuzzleFlashTurret1")];
updateOverhead();
updateHealthBar();
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(0, -3));
_muzzleOffsets.push(new Point(-3, -3));
_muzzleOffsets.push(new Point(-6, -4));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-12, -7));
_muzzleOffsets.push(new Point(-14, -9));
_muzzleOffsets.push(new Point(-16, -11));
_muzzleOffsets.push(new Point(-17, -13));
_muzzleOffsets.push(new Point(-17, -16));
_muzzleOffsets.push(new Point(-17, -18));
_muzzleOffsets.push(new Point(-16, -21));
_muzzleOffsets.push(new Point(-14, -23));
_muzzleOffsets.push(new Point(-12, -25));
_muzzleOffsets.push(new Point(-10, -26));
_muzzleOffsets.push(new Point(-6, -27));
_muzzleOffsets.push(new Point(-3, -28));
_muzzleOffsets.push(new Point(0, -28));
_muzzleOffsets.push(new Point(4, -28));
_muzzleOffsets.push(new Point(7, -27));
_muzzleOffsets.push(new Point(10, -26));
_muzzleOffsets.push(new Point(13, -25));
_muzzleOffsets.push(new Point(15, -23));
_muzzleOffsets.push(new Point(17, -21));
_muzzleOffsets.push(new Point(18, -18));
_muzzleOffsets.push(new Point(18, -16));
_muzzleOffsets.push(new Point(18, -13));
_muzzleOffsets.push(new Point(17, -11));
_muzzleOffsets.push(new Point(15, -9));
_muzzleOffsets.push(new Point(13, -7));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(7, -4));
_muzzleOffsets.push(new Point(4, -3));
return (_muzzleOffsets);
}
override public function getParticles(_arg1:Tracer):Array{
return ([smokeParticle(_arg1, ALTITUDE_MG, false), shellCasing(_arg1, ALTITUDE_MG, 10)]);
}
public static function prerender():void{
displays = [Assets.lookup("Turret_Shadow"), Assets.lookup("TurretMG"), Assets.lookup("TurretMGCustom")];
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 322
//TurretMortar (boxhead.world.thing.obstacle.deployable.TurretMortar)
package boxhead.world.thing.obstacle.deployable {
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.weapon.*;
import boxhead.world.thing.projectile.*;
import boxhead.security.*;
import boxhead.assets.*;
public class TurretMortar extends Turret {
public static const DEFAULT_FIRE_DELAY:StoredNumber = new StoredNumber(2);
private static const ALTITUDE_MORTAR:Number = 21;
public static const DEFAULT_HEALTH:StoredInt = new StoredInt(50);
public static const DEFAULT_DAMAGE:StoredInt = new StoredInt(5);
private static var displays:Array;
public function TurretMortar(_arg1:Player, _arg2:Number, _arg3:Number){
customDisplay = displays[2];
super(_arg1, _arg2, _arg3);
weaponID = WeaponInfo.TURRET_MORTAR_PLANTER_ID;
_hit = new HitCircle(pos, 0.5);
_hp = (_maxHp = DEFAULT_HEALTH.value);
damage = DEFAULT_DAMAGE.value;
fireDelay = DEFAULT_FIRE_DELAY.value;
muzzleFlashes = [];
display = displays[1];
shadow = displays[0];
_height = 23;
range = 6;
fireSounds = [SoundList.TURRET_MORTAR_SHOT];
updateOverhead();
updateHealthBar();
_flashLength = 0;
}
override protected function get barrelDistance():Number{
return (0.4);
}
override protected function get smokeDistance():Number{
return (0.4);
}
override protected function get shellDistance():Number{
return (0.4);
}
override public function getProjectile():Projectile{
return (new MortarShell(owner, damage, muzzlePosition.x, muzzlePosition.y, target.pos));
}
public static function prerender():void{
displays = [Assets.lookup("Turret_Shadow"), Assets.lookup("TurretMortar"), Assets.lookup("TurretMortarCustom")];
}
}
}//package boxhead.world.thing.obstacle.deployable
Section 323
//BrickWall (boxhead.world.thing.obstacle.prop.BrickWall)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class BrickWall extends Prop {
private var _depthOffset:Number;// = 1
public function BrickWall(_arg1:int=0){
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
switch (_arg1){
case 1:
_hit = new HitRect(_renderPos, 1, 0.5);
_depthOffset = 0.5;
footprint.x = 2;
footprint.y = 1;
display = Assets.lookup("BrickWall1");
shadow = Assets.lookup("BrickWall_Shadow1");
break;
case 2:
_hit = new HitRect(_renderPos, 0.5, 1);
_depthOffset = 1;
footprint.x = 1;
footprint.y = 2;
display = Assets.lookup("BrickWall2");
shadow = Assets.lookup("BrickWall_Shadow2");
break;
case 3:
_hit = new HitRect(_renderPos, 0.5, 0.5);
_depthOffset = 0.5;
footprint.x = 1;
footprint.y = 1;
display = Assets.lookup("BrickWall3");
shadow = Assets.lookup("BrickWall_Shadow3");
break;
};
_height = 69;
_flat = true;
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 324
//Car (boxhead.world.thing.obstacle.prop.Car)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class Car extends Prop {
private var _depthOffset:Number;// = 1
public function Car(_arg1:int=0){
var _local2:HitRect;
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
display = Assets.lookup(("Car" + _arg1));
switch (_arg1){
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
_local2 = new HitRect(_renderPos, (41 / 40), (18 / 28));
_height = 24;
footprint.x = 3;
footprint.y = 2;
shadow = Assets.lookup("Car_Shadow1");
break;
case 7:
case 8:
case 9:
_local2 = new HitRect(_renderPos, (22 / 40), (30 / 28));
_height = 24;
footprint.x = 2;
footprint.y = 3;
shadow = Assets.lookup("Car_Shadow7");
break;
case 10:
case 11:
case 12:
shadow = Assets.lookup("Car_Shadow10");
case 13:
case 14:
case 15:
_local2 = new HitRect(_renderPos, 1, 0.5);
_height = 66;
footprint.x = 2;
footprint.y = 1;
if (!shadow){
shadow = Assets.lookup("Car_Shadow13");
};
break;
};
_depthOffset = _local2.yRad;
_hit = _local2;
_flat = true;
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 325
//CastleWall (boxhead.world.thing.obstacle.prop.CastleWall)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class CastleWall extends Prop {
private var _depthOffset:Number;// = 0.5
public function CastleWall(_arg1:int=0){
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
display = Assets.lookup(("CastleWall" + _arg1));
switch (_arg1){
case 1:
_hit = new HitRect(_renderPos, 1, 1);
_depthOffset = 1;
footprint.x = 2;
footprint.y = 2;
shadow = Assets.lookup("CastleWall_Shadow1");
break;
case 2:
case 3:
_hit = new HitRect(_renderPos, 0.5, 0.5);
_depthOffset = 0.5;
footprint.x = 1;
footprint.y = 1;
shadow = Assets.lookup("CastleWall_Shadow2");
break;
case 4:
case 5:
_hit = new HitRect(_renderPos, 0.5, 0.5);
_depthOffset = 0.5;
footprint.x = 1;
footprint.y = 1;
shadow = Assets.lookup("CastleWall_Shadow4");
break;
case 6:
case 7:
_hit = new HitRect(_renderPos, 0.5, (7 / 8));
_depthOffset = (7 / 8);
footprint.x = 1;
footprint.y = 2;
shadow = Assets.lookup("CastleWall_Shadow6");
break;
case 8:
case 9:
_hit = new HitRect(_renderPos, (7 / 8), 0.5);
_depthOffset = 0.5;
footprint.x = 2;
footprint.y = 1;
shadow = Assets.lookup(("CastleWall_Shadow" + _arg1));
break;
};
_height = 64;
_flat = true;
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 326
//Crate (boxhead.world.thing.obstacle.prop.Crate)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class Crate extends Prop {
public static const VARIANTS:int = 2;
public function Crate(_arg1:int=0){
if (!_arg1){
_arg1 = int((1 + (Math.random() * VARIANTS)));
};
super(_arg1);
switch (_arg1){
case 1:
default:
_hit = new HitRect(_renderPos, 0.5, 0.5);
_height = CRATE_HEIGHT;
_flat = true;
break;
};
display = Assets.lookup(("Crate" + _arg1));
shadow = Assets.lookup("Crate_Shadow");
}
override public function get depth():Number{
return ((super.depth + 0.5));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 327
//Factory (boxhead.world.thing.obstacle.prop.Factory)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class Factory extends Prop {
private var _depthOffset:Number;// = 1
public function Factory(_arg1:int=0){
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
_depthOffset = 0.5;
switch (_arg1){
case 1:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("Factory1");
shadow = Assets.lookup("Factory_Shadow1");
break;
case 2:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("Factory2");
shadow = Assets.lookup("Factory_Shadow1");
break;
case 3:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("Factory3");
shadow = Assets.lookup("Factory_Shadow1");
break;
case 4:
_hit = new HitRect(_renderPos, 1, 0.5);
footprint.x = 2;
display = Assets.lookup("Factory4");
shadow = Assets.lookup("Factory_Shadow2");
break;
case 5:
_hit = new HitRect(_renderPos, 1.5, 0.5);
footprint.x = 3;
display = Assets.lookup("Factory5");
shadow = Assets.lookup("Factory_Shadow3");
break;
case 6:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("Factory6");
shadow = Assets.lookup("Factory_Shadow1");
break;
case 7:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("Factory6");
break;
};
_height = 126;
_flat = true;
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 328
//Fence (boxhead.world.thing.obstacle.prop.Fence)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.*;
import flash.geom.*;
import boxhead.world.hit.*;
public class Fence extends MultiHitProp {
private var _depthOffset:Number;// = 1
public function Fence(_arg1:int=0){
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
_depthOffset = 0.07;
switch (_arg1){
case 2:
case 8:
_hit = new HitRect(_renderPos, 0.5, 0.07);
shadow = Assets.lookup("Fence_Shadow2");
break;
case 4:
case 6:
_hit = new HitRect(_renderPos, 0.07, 0.5);
_depthOffset = 0.5;
shadow = Assets.lookup("Fence_Shadow4");
break;
case 1:
hitOffsets.push(new Point(0.25, 0));
hitOffsets.push(new Point(0, -0.25));
break;
case 3:
hitOffsets.push(new Point(-0.25, 0));
hitOffsets.push(new Point(0, -0.25));
break;
case 7:
hitOffsets.push(new Point(0.25, 0));
hitOffsets.push(new Point(0, 0.25));
break;
case 9:
hitOffsets.push(new Point(-0.25, 0));
hitOffsets.push(new Point(0, 0.25));
break;
};
if (!_hit){
hitPositions.push(new Position());
hitPositions.push(new Position());
_hit = new HitRect(hitPositions[0], 0.25, 0.07);
_hit.next = new HitRect(hitPositions[1], 0.07, 0.25);
};
display = Assets.lookup(("Fence" + _arg1));
if (!shadow){
shadow = Assets.lookup(("Fence_Shadow" + _arg1));
};
_height = 53;
_flat = true;
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 329
//FireHydrant (boxhead.world.thing.obstacle.prop.FireHydrant)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class FireHydrant extends Prop {
public static const VARIANTS:int = 2;
public function FireHydrant(_arg1:int=0){
if (!_arg1){
_arg1 = int((1 + (Math.random() * VARIANTS)));
};
super(_arg1);
switch (_arg1){
case 1:
default:
_hit = new HitCircle(_renderPos, 0.3);
_height = 30;
_flat = true;
break;
};
display = Assets.lookup(("FireHydrant" + (_arg1 - 1)));
shadow = Assets.lookup("FireHydrant_Shadow");
}
}
}//package boxhead.world.thing.obstacle.prop
Section 330
//InvisibleWall (boxhead.world.thing.obstacle.prop.InvisibleWall)
package boxhead.world.thing.obstacle.prop {
import boxhead.world.*;
import boxhead.world.hit.*;
public class InvisibleWall extends Prop {
public function InvisibleWall(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
_hit = new HitRect(new Position(_arg1, _arg2), _arg3, _arg4);
}
}
}//package boxhead.world.thing.obstacle.prop
Section 331
//Mailbox (boxhead.world.thing.obstacle.prop.Mailbox)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class Mailbox extends Prop {
public static const VARIANTS:int = 4;
public function Mailbox(_arg1:int=0){
if (!_arg1){
_arg1 = int((1 + (Math.random() * VARIANTS)));
};
super(_arg1);
switch ((_arg1 % 2)){
case 1:
default:
_hit = new HitRect(_renderPos, (18 / Constants.CELL_WIDTH), (8 / Constants.CELL_HEIGHT));
depthOffset = (8 / Constants.CELL_HEIGHT);
break;
case 0:
_hit = new HitRect(_renderPos, (16 / Constants.CELL_WIDTH), (12 / Constants.CELL_HEIGHT));
depthOffset = (12 / Constants.CELL_HEIGHT);
break;
};
_height = 35;
_flat = false;
display = Assets.lookup(("Mailbox" + (_arg1 - 1)));
shadow = Assets.lookup(("Mailbox_Shadow" + ((_arg1 + 1) % 2)));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 332
//MultiHitProp (boxhead.world.thing.obstacle.prop.MultiHitProp)
package boxhead.world.thing.obstacle.prop {
import boxhead.world.*;
import flash.geom.*;
public class MultiHitProp extends Prop {
protected var hitPositions:Array;
protected var hitOffsets:Array;
public function MultiHitProp(_arg1:int=0){
super(_arg1);
hitPositions = new Array();
hitOffsets = new Array();
}
override public function set x(_arg1:Number):void{
var _local3:Position;
var _local4:Point;
super.x = _arg1;
var _local2:int = (hitPositions.length - 1);
while (_local2 >= 0) {
_local3 = hitPositions[_local2];
_local4 = hitOffsets[_local2];
_local3.x = (_arg1 + (footprint.x / 2));
if (_local4){
_local3.x = (_local3.x + _local4.x);
};
_local2--;
};
}
override public function set y(_arg1:Number):void{
var _local3:Position;
var _local4:Point;
super.y = _arg1;
var _local2:int = (hitPositions.length - 1);
while (_local2 >= 0) {
_local3 = hitPositions[_local2];
_local4 = hitOffsets[_local2];
_local3.y = (_arg1 + (footprint.y / 2));
if (_local4){
_local3.y = (_local3.y + _local4.y);
};
_local2--;
};
}
}
}//package boxhead.world.thing.obstacle.prop
Section 333
//Prop (boxhead.world.thing.obstacle.prop.Prop)
package boxhead.world.thing.obstacle.prop {
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.thing.obstacle.*;
public class Prop extends Obstacle {
private var _footprint:Point;
public var variant:int;
public function Prop(_arg1:int=0){
_renderPos = new Position();
_footprint = new Point(1, 1);
this.variant = _arg1;
}
override public function set y(_arg1:Number):void{
pos.y = _arg1;
_renderPos.y = (_arg1 + (_footprint.y / 2));
_renderOffset = _renderPos.renderOffset;
}
public function clone():Prop{
var _local1:Prop = new Object(this).constructor(variant);
_local1.x = x;
_local1.y = y;
return (_local1);
}
public function get footprint():Point{
return (_footprint);
}
override public function set x(_arg1:Number):void{
pos.x = _arg1;
_renderPos.x = (_arg1 + (_footprint.x / 2));
_renderOffset = _renderPos.renderOffset;
}
override protected function get debugColor():uint{
if (tall){
return (0xFF);
};
return (64);
}
override public function get renderPos():Position{
return (_renderPos);
}
override public function get centerPos():Position{
return (_renderPos);
}
}
}//package boxhead.world.thing.obstacle.prop
Section 334
//Rock (boxhead.world.thing.obstacle.prop.Rock)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class Rock extends Prop {
public static const VARIANTS:int = 2;
public function Rock(_arg1:int=0){
if (!_arg1){
_arg1 = int((1 + (Math.random() * VARIANTS)));
};
super(_arg1);
switch (_arg1){
case 1:
default:
_hit = new HitCircle(_renderPos, 0.5);
_height = 47;
break;
case 2:
_hit = new HitCircle(_renderPos, 0.5);
_height = LOW_HEIGHT;
break;
};
display = Assets.lookup(("Rock" + _arg1));
shadow = Assets.lookup((("Rock" + _arg1) + "_Shadow"));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 335
//StoreFrontLarge (boxhead.world.thing.obstacle.prop.StoreFrontLarge)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class StoreFrontLarge extends Prop {
private var _depthOffset:Number;// = 1
public function StoreFrontLarge(_arg1:int=0){
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
_depthOffset = 0.5;
switch (_arg1){
case 1:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontLarge1");
shadow = Assets.lookup("StoreFrontLarge_Shadow");
break;
case 2:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontLarge2");
shadow = Assets.lookup("StoreFrontLarge_Shadow");
break;
case 3:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontLarge3");
shadow = Assets.lookup("StoreFrontLarge_Shadow");
break;
case 4:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontLarge4");
shadow = Assets.lookup("StoreFrontLarge_Shadow");
break;
case 5:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontLargeRoof");
shadow = Assets.lookup("StoreFrontLarge_Shadow");
break;
case 6:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontLargeRoof");
break;
};
_height = 112;
_flat = true;
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 336
//StoreFrontSmall (boxhead.world.thing.obstacle.prop.StoreFrontSmall)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class StoreFrontSmall extends Prop {
private var _depthOffset:Number;// = 1
public function StoreFrontSmall(_arg1:int=0){
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
_depthOffset = 0.5;
switch (_arg1){
case 1:
_hit = new HitRect(_renderPos, 1, 0.5);
footprint.x = 2;
display = Assets.lookup("StoreFrontSmall1");
shadow = Assets.lookup("StoreFrontSmall_Shadow1");
break;
case 2:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontSmall2");
shadow = Assets.lookup("StoreFrontSmall_Shadow2");
break;
case 3:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontSmallRoof");
shadow = Assets.lookup("StoreFrontSmall_Shadow2");
break;
case 4:
_hit = new HitRect(_renderPos, 0.5, 0.5);
display = Assets.lookup("StoreFrontSmallRoof");
break;
};
_height = 56;
_flat = true;
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 337
//TrashCan (boxhead.world.thing.obstacle.prop.TrashCan)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class TrashCan extends Prop {
public static const VARIANTS:int = 3;
public function TrashCan(_arg1:int=0){
if (!_arg1){
_arg1 = int((1 + (Math.random() * VARIANTS)));
};
super(_arg1);
switch (_arg1){
case 1:
default:
_hit = new HitCircle(_renderPos, 0.42);
break;
};
_height = 35;
_flat = false;
display = Assets.lookup(("TrashCan" + (_arg1 - 1)));
shadow = Assets.lookup("TrashCan_Shadow");
}
}
}//package boxhead.world.thing.obstacle.prop
Section 338
//Tree (boxhead.world.thing.obstacle.prop.Tree)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import flash.display.*;
import flash.geom.*;
import boxhead.world.hit.*;
public class Tree extends Prop {
public function Tree(_arg1:int=1){
var _local2:int;
var _local3:int;
var _local4:BitmapData;
super(_arg1);
_local2 = (int((_arg1 / 2)) - 1);
_local3 = (((_arg1 - 1) % 2) + 1);
switch ((_arg1 % 2)){
case 1:
default:
_hit = new HitCircle(_renderPos, 0.5);
_height = 93;
break;
case 0:
_hit = new HitCircle(_renderPos, 1);
_height = 65;
break;
};
footprint.x = _local3;
footprint.y = _local3;
depthOffset = 0.05;
display = Assets.lookup(("Tree" + _local3));
if (_local2 > 0){
display = display.clone();
display.master = null;
_local4 = display.bitmapData;
display.bitmapData.applyFilter(display.bitmapData, _local4.rect, new Point(0, 0), Assets.treeFilters[(_local2 - 1)]);
};
shadow = Assets.lookup((("Tree" + _local3) + "_Shadow"));
}
override public function set x(_arg1:Number):void{
super.x = _arg1;
depthOffset = (0.05 + ((_arg1 % (footprint.x + 1)) * 0.02));
}
override public function get depth():Number{
return ((super.depth + depthOffset));
}
override public function get bounce():Number{
return (0.3);
}
}
}//package boxhead.world.thing.obstacle.prop
Section 339
//Wall (boxhead.world.thing.obstacle.prop.Wall)
package boxhead.world.thing.obstacle.prop {
import boxhead.assets.*;
import boxhead.world.hit.*;
public class Wall extends Prop {
private var _depthOffset:Number;// = 1
public function Wall(_arg1:int=0){
if (!_arg1){
_arg1 = 1;
};
super(_arg1);
switch (_arg1){
case 1:
_hit = new HitRect(_renderPos, 1, 1);
_depthOffset = 1;
footprint.x = 2;
footprint.y = 2;
_height = 56;
_flat = false;
display = Assets.lookup("WallPost");
shadow = Assets.lookup("WallPost_Shadow");
break;
case 2:
_hit = new HitRect(_renderPos, 3, 0.75);
_depthOffset = 0.75;
footprint.x = 6;
footprint.y = 2;
_height = 48;
_flat = true;
display = Assets.lookup("WallHorizontal");
shadow = Assets.lookup("WallHorizontal_Shadow");
break;
case 3:
_hit = new HitRect(_renderPos, 0.75, 3);
_depthOffset = 3;
footprint.x = 2;
footprint.y = 6;
_height = 48;
_flat = true;
display = Assets.lookup("WallVertical");
shadow = Assets.lookup("WallVertical_Shadow");
break;
};
}
override public function get depth():Number{
return ((super.depth + _depthOffset));
}
}
}//package boxhead.world.thing.obstacle.prop
Section 340
//Obstacle (boxhead.world.thing.obstacle.Obstacle)
package boxhead.world.thing.obstacle {
import flash.display.*;
import flash.geom.*;
import boxhead.world.hit.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.*;
import boxhead.world.thing.display.*;
public class Obstacle extends Thing {
protected var display:ThingDisplay;
protected var _height:Number;// = 0
protected var _hit:HitShape;
protected var _flat:Boolean;// = false
protected var shadow:ThingDisplay;
protected var depthOffset:Number;// = 0
public static const LOW_HEIGHT:Number = 20;
public static const CRATE_HEIGHT:Number = 27;
public static const HEAD_HEIGHT:Number = 35;
override public function get depth():Number{
return ((super.depth + depthOffset));
}
public function stain(_arg1:Particle):void{
if (_arg1.depth < depth){
return;
};
if (!display.master){
display = display.clone();
};
var _local2:BitmapData = display.bitmapData;
var _local3:ThingDisplay = _arg1.decal;
var _local4:Point = new Point(0, 0);
var _local5:Point = _arg1.renderOffset.subtract(renderOffset);
var _local6:Point = _local5.add(_local3.getOffset().subtract(display.getOffset()));
var _local7:Number = 0.7;
var _local8:BitmapData = new BitmapData(_local2.width, _local2.height, true, 0);
var _local9:Matrix = new Matrix(1, 0, 0, -(_local7), _local6.x, (_local6.y + (_local3.height * (1 - (0.5 * (1 - _local7))))));
new Matrix(1, 0, 0, -(_local7), _local6.x, (_local6.y + (_local3.height * (1 - (0.5 * (1 - _local7)))))).ty = (_local9.ty + (Math.abs((_local5.y * _local7)) - _local5.y));
_local8.draw(_local3.bitmapData, _local9);
_local8.threshold(_local2, _local2.rect, _local4, "<", 4278190080, 0, 4278190080);
_local8.colorTransform(_local8.rect, new ColorTransform(1, 1, 1, 0.75));
_local2.copyPixels(_local8, _local8.rect, _local4, _local8, _local4, true);
_local8.dispose();
}
public function get bounce():Number{
return (1);
}
public function colorTransform(_arg1:ColorTransform):void{
var _local3:ThingDisplay;
if (!display){
return;
};
if (display.master){
_local3 = display;
display = display.master;
_local3.dispose();
};
display = display.clone();
var _local2:BitmapData = display.bitmapData;
_local2.colorTransform(_local2.rect, _arg1);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
var _local3:HitShape = _hit;
while (_local3 != null) {
Debug.drawHit(_local3, debugColor);
_local3 = _local3.next;
};
_arg2 = _arg2.add(renderOffset);
display.draw(_arg1, _arg2, 0);
}
public function get flat():Boolean{
return (_flat);
}
public function get hit():HitShape{
return (_hit);
}
override public function drawShadow(_arg1:BitmapData, _arg2:Point):void{
if (!shadow){
return;
};
_arg2 = _arg2.add(renderOffset);
shadow.draw(_arg1, _arg2, 0, true);
}
public function get height():Number{
return (_height);
}
public function get solid():Boolean{
return (true);
}
protected function get tall():Boolean{
return ((_height > LOW_HEIGHT));
}
public function intersects(_arg1:HitCircle):Boolean{
return (_hit.intersects(_arg1));
}
override public function getRenderArea():Rectangle{
return (display.getRenderArea(0));
}
}
}//package boxhead.world.thing.obstacle
Section 341
//Blood (boxhead.world.thing.particle.Blood)
package boxhead.world.thing.particle {
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.display.*;
public class Blood extends Particle {
protected var splats:int;
protected static const COLOR:uint = 4287627780;
protected static const WIDTH:int = 48;
protected static const HEIGHT:int = 34;
protected static const OFFSET:Point = new Point((-(WIDTH) / 2), (-(HEIGHT) / 2));
public static const DAMAGE_PER_SPLAT:int = 5;
protected static const ALPHA:Number = 0.1;
protected static var BloodMC:Class = Blood_BloodMC;
protected static var displays:Array;
protected static var debug:int = 0;
public function Blood(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int=0){
super(_arg1, _arg2);
this.splats = _arg3;
decal = displays[0];
startTime = (startTime + _arg4);
lifeSpan = 0;
}
override public function drawDecal(_arg1:BitmapData, _arg2:Point):void{
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:ThingSprite;
_arg2 = _arg2.add(renderOffset);
var _local3:int = (splats - 1);
while (_local3 >= 0) {
_local4 = 15;
_local5 = 10;
_local6 = _arg2.add(new Point(Math.round(((Math.random() - 0.5) * _local4)), Math.round(((Math.random() - 0.5) * _local5))));
_local7 = displays[int((Math.random() * displays.length))];
_local7.draw(_arg1, _local6);
debug++;
_local3--;
};
}
public static function prerender():void{
var _local3:BitmapData;
var _local4:BitmapData;
var _local5:ThingSprite;
var _local1:MovieClip = (new BloodMC() as MovieClip);
displays = new Array();
var _local2 = 1;
while (_local2 <= _local1.totalFrames) {
_local1.gotoAndStop(_local2);
_local3 = new BitmapData(WIDTH, HEIGHT, false, 0);
_local3.perlinNoise(4, 4, 3, (Math.random() * 100), false, true, 7, true);
_local3.draw(_local1);
_local4 = new BitmapData(WIDTH, HEIGHT, true, COLOR);
_local4.copyChannel(_local3, _local4.rect, new Point(0, 0), BitmapDataChannel.BLUE, BitmapDataChannel.ALPHA);
_local4.colorTransform(_local4.rect, new ColorTransform(1, 1, 1, ALPHA));
_local3.dispose();
_local5 = new ThingSprite(_local4, OFFSET);
displays.push(_local5);
_local2++;
};
}
}
}//package boxhead.world.thing.particle
Section 342
//Blood_BloodMC (boxhead.world.thing.particle.Blood_BloodMC)
package boxhead.world.thing.particle {
import mx.core.*;
import flash.display.*;
public class Blood_BloodMC extends MovieClipAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.world.thing.particle
Section 343
//Debris (boxhead.world.thing.particle.Debris)
package boxhead.world.thing.particle {
import boxhead.world.*;
public class Debris extends SmokeTrail {
protected var headAltitude:int;
protected var dAltitude:int;
protected var headSpeed:Number;
protected var headDir:Direction;
protected var headPos:Position;
protected var addTime:int;
protected static const ADDITION_INTERVAL:int = 200;
public function Debris(_arg1:Number, _arg2:Number, _arg3:Direction, _arg4:Number=0.5, _arg5:int=0, _arg6:Number=20, _arg7:int=0){
super(_arg1, _arg2, _arg5, 0.6, 3);
headPos = pos.clone();
headDir = _arg3;
headSpeed = _arg4;
headAltitude = _arg5;
this.dAltitude = _arg6;
removeTime = (removeTime + _arg7);
addTime = _arg7;
}
override public function animate():void{
super.animate();
while (time > addTime) {
addTime = (addTime + REMOVE_TIME);
move();
};
}
protected function move():void{
if ((((headAltitude <= 0)) && ((dAltitude <= 0)))){
return;
};
var _local1:Number = 1;
if ((headAltitude + dAltitude) < 0){
_local1 = Math.abs((headAltitude / dAltitude));
headAltitude = 0;
} else {
headAltitude = (headAltitude + dAltitude);
};
headPos.x = (headPos.x + ((headDir.dx * headSpeed) * _local1));
headPos.y = (headPos.y + ((headDir.dy * headSpeed) * _local1));
dAltitude = (dAltitude - Constants.GRAVITY);
addPosition(headPos.x, headPos.y, headAltitude);
}
}
}//package boxhead.world.thing.particle
Section 344
//Explosion (boxhead.world.thing.particle.Explosion)
package boxhead.world.thing.particle {
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.obstacle.*;
import boxhead.assets.render.*;
public class Explosion extends Particle {
protected var over:Obstacle;
protected var frames:Array;
protected var startAltitude:Number;
protected static const FRAME_RATE:int = 50;
protected static var displays:Array;
public function Explosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Obstacle=null, _arg5:int=0){
super(_arg1, _arg2);
startAltitude = _arg3;
this.over = _arg4;
startTime = (startTime + _arg5);
frames = displays[int((Math.random() * displays.length))];
display = frames[0];
lifeSpan = 20000;
}
override public function animate():void{
super.animate();
if (time < 0){
return;
};
altitude = (startAltitude + (time / 100));
frame = (time / (1000 / FRAME_RATE));
display = frames[Math.min(frame, (frames.length - 1))];
if (frame >= frames.length){
lifeSpan = 0;
};
}
override public function get depth():Number{
if (over){
return ((over.depth + 0.01));
};
return (y);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
if (time < 0){
return;
};
super.draw(_arg1, _arg2);
}
public static function prerender():void{
displays = ExplosionRenderer.displays;
}
}
}//package boxhead.world.thing.particle
Section 345
//Fire (boxhead.world.thing.particle.Fire)
package boxhead.world.thing.particle {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.thing.obstacle.*;
import boxhead.assets.render.*;
public class Fire extends Particle {
protected var startAltitude:Number;
protected var frames:Array;
protected var speed:Number;
protected var maxDist:Number;
protected var dir:Direction;
protected var over:Obstacle;
protected static const FRAME_RATE:int = 50;
public static const MEDIUM:int = 1;
public static const SMALL:int = 0;
public static const LARGE:int = 2;
protected static var displays:Array;
public function Fire(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Direction, _arg5:Number, _arg6:Number, _arg7:int, _arg8:Obstacle=null, _arg9:int=0){
super(_arg1, _arg2);
startAltitude = _arg3;
this.dir = _arg4;
this.speed = _arg5;
this.maxDist = _arg6;
this.over = _arg8;
frames = displays[_arg7][int((Math.random() * displays[_arg7].length))];
display = frames[0];
startTime = (startTime + _arg9);
}
override public function animate():void{
super.animate();
if (time < 0){
return;
};
altitude = (startAltitude + (time / -20));
var _local1:Number = (((time / 1000) * SECOND) * speed);
_renderPos.x = (x + (dir.dx * _local1));
_renderPos.y = (y + (dir.dy * _local1));
if (_local1 > maxDist){
lifeSpan = 0;
};
frame = (time / (1000 / FRAME_RATE));
if (frame >= frames.length){
lifeSpan = 0;
};
display = frames[Math.min(frame, (frames.length - 1))];
}
override public function get depth():Number{
if (over){
return ((over.depth + 0.01));
};
return (super.depth);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
if (time < 0){
return;
};
super.draw(_arg1, _arg2);
}
public static function prerender():void{
displays = FireRenderer.displays;
}
}
}//package boxhead.world.thing.particle
Section 346
//Particle (boxhead.world.thing.particle.Particle)
package boxhead.world.thing.particle {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.thing.*;
import boxhead.world.thing.display.*;
public class Particle extends Thing {
public var display:ThingDisplay;
protected var startTime:int;
public var splashRadius:Number;// = 0
protected var altitude:Number;// = 0
public var dead:Boolean;// = false
protected var lifeSpan:int;// = 1000
protected var frame:int;// = 0
public var decal:ThingDisplay;
public static const MAX_RENDER_RADIUS:Number = 50;
public function Particle(_arg1:Number, _arg2:Number){
_renderPos = new Position(_arg1, _arg2);
this.x = _arg1;
this.y = _arg2;
startTime = Time.current;
}
override public function get renderOffset():Point{
return (_renderPos.renderOffset);
}
protected function get time():int{
return ((Time.current - startTime));
}
public function drawDecal(_arg1:BitmapData, _arg2:Point):void{
if (!decal){
return;
};
_arg2 = _arg2.add(renderOffset);
decal.draw(_arg1, _arg2, frame);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
if (((!(display)) || (dead))){
return;
};
_arg2 = _arg2.add(renderOffset);
_arg2.y = (_arg2.y - int(altitude));
display.draw(_arg1, _arg2, frame);
}
override public function drawShadow(_arg1:BitmapData, _arg2:Point):void{
if (dead){
return;
};
super.drawShadow(_arg1, _arg2);
}
public function get splash():Boolean{
return (false);
}
protected function get progress():Number{
return ((time / lifeSpan));
}
public function remove():void{
cell.removeParticle(this);
}
public function checkTime():void{
if (time > lifeSpan){
dead = true;
};
}
override public function getRenderArea():Rectangle{
return (display.getRenderArea(frame));
}
}
}//package boxhead.world.thing.particle
Section 347
//PlasmaBallExplosion (boxhead.world.thing.particle.PlasmaBallExplosion)
package boxhead.world.thing.particle {
import boxhead.sounds.*;
import boxhead.world.thing.obstacle.*;
import boxhead.assets.*;
public class PlasmaBallExplosion extends Particle {
protected var over:Obstacle;
protected static const FRAME_RATE:int = 25;
protected static var displays:Array;
public function PlasmaBallExplosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Obstacle=null, _arg5:Boolean=true){
super(_arg1, _arg2);
this.altitude = _arg3;
this.over = _arg4;
display = displays[0];
lifeSpan = (FRAME_RATE * 8);
}
override public function animate():void{
super.animate();
if (time < 0){
return;
};
frame = Math.min(7, (time / (1000 / FRAME_RATE)));
}
override public function get depth():Number{
if (over){
return ((over.depth + 0.01));
};
return (y);
}
public static function prerender():void{
displays = [Assets.lookup("PlasmaBallExplosion")];
}
}
}//package boxhead.world.thing.particle
Section 348
//Scorch (boxhead.world.thing.particle.Scorch)
package boxhead.world.thing.particle {
import boxhead.sounds.*;
import boxhead.assets.*;
public class Scorch extends Particle {
private static var displays:Array;
public function Scorch(_arg1:Number, _arg2:Number, _arg3:int=0){
super(_arg1, _arg2);
startTime = (startTime + _arg3);
decal = displays[int((Math.random() * displays.length))];
splashRadius = 2;
lifeSpan = 80;
}
override public function get splash():Boolean{
return (true);
}
public static function prerender():void{
displays = [Assets.lookup("Scorch1"), Assets.lookup("Scorch2"), Assets.lookup("Scorch3")];
}
}
}//package boxhead.world.thing.particle
Section 349
//ScorchCell (boxhead.world.thing.particle.ScorchCell)
package boxhead.world.thing.particle {
import boxhead.sounds.*;
import boxhead.assets.*;
public class ScorchCell extends Particle {
private static var displays:Array;
public function ScorchCell(_arg1:Number, _arg2:Number, _arg3:int=0){
super(_arg1, _arg2);
startTime = (startTime + _arg3);
decal = displays[int((Math.random() * displays.length))];
splashRadius = 0.5;
lifeSpan = 80;
}
override public function get splash():Boolean{
return (true);
}
public static function prerender():void{
displays = [Assets.lookup("ScorchCell1"), Assets.lookup("ScorchCell2"), Assets.lookup("ScorchCell3")];
}
}
}//package boxhead.world.thing.particle
Section 350
//ShellCasing (boxhead.world.thing.particle.ShellCasing)
package boxhead.world.thing.particle {
import boxhead.assets.*;
public class ShellCasing extends Particle {
protected var variant:int;// = 0
protected var maxAltitude:Number;
protected var startFrame:int;// = 0
protected var dx:Number;
protected var dy:Number;
protected var velocity:Number;
protected static const SPEED_MULTIPLIER:Number = 5E-5;
protected static const FRAMES:int = 6;
protected static const VARIANTS:int = 1;
protected static var displays:Array;
public function ShellCasing(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
super(_arg1, _arg2);
variant = int((Math.random() * VARIANTS));
decal = (display = displays[variant]);
dx = ((((Math.cos(_arg3) + 0.2) - (0.4 * Math.random())) * _arg5) * SPEED_MULTIPLIER);
dy = ((((Math.sin(_arg3) + 0.2) - (0.4 * Math.random())) * _arg5) * SPEED_MULTIPLIER);
startTime = (startTime - 25);
startFrame = (frame = int((Math.random() * FRAMES)));
lifeSpan = Number.POSITIVE_INFINITY;
this.altitude = _arg4;
this.velocity = _arg5;
maxAltitude = (_arg4 + _arg5);
}
override public function animate():void{
var _local1:int;
var _local2:Number;
super.animate();
if (altitude > 0){
_renderPos.x = (pos.x + (dx * time));
_renderPos.y = (pos.y + (dy * time));
frame = ((startFrame + int((time / 100))) % FRAMES);
_local1 = 200;
_local2 = (Math.abs((time - _local1)) / _local1);
altitude = Math.max(0, (maxAltitude - ((_local2 * _local2) * velocity)));
if (altitude <= 0){
lifeSpan = 0;
};
};
}
public static function prerender():void{
displays = new Array();
var _local1:int;
while (_local1 < VARIANTS) {
displays[_local1] = Assets.lookup(("ShellCasing" + (_local1 + 1)));
_local1++;
};
}
}
}//package boxhead.world.thing.particle
Section 351
//ShotgunShell (boxhead.world.thing.particle.ShotgunShell)
package boxhead.world.thing.particle {
import boxhead.assets.*;
public class ShotgunShell extends Particle {
protected var variant:int;// = 0
protected var maxAltitude:Number;
protected var startFrame:int;// = 0
protected var dx:Number;
protected var dy:Number;
protected var velocity:Number;
protected static const SPEED_MULTIPLIER:Number = 5E-5;
protected static const FRAMES:int = 8;
protected static const VARIANTS:int = 1;
protected static var displays:Array;
public function ShotgunShell(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
super(_arg1, _arg2);
variant = int((Math.random() * VARIANTS));
decal = (display = displays[variant]);
dx = ((((Math.cos(_arg3) + 0.2) - (0.4 * Math.random())) * _arg5) * SPEED_MULTIPLIER);
dy = ((((Math.sin(_arg3) + 0.2) - (0.4 * Math.random())) * _arg5) * SPEED_MULTIPLIER);
startTime = (startTime - 25);
startFrame = (frame = int((Math.random() * FRAMES)));
lifeSpan = Number.POSITIVE_INFINITY;
this.altitude = _arg4;
this.velocity = _arg5;
maxAltitude = (_arg4 + _arg5);
}
override public function animate():void{
var _local1:int;
var _local2:Number;
super.animate();
if (altitude > 0){
_renderPos.x = (pos.x + (dx * time));
_renderPos.y = (pos.y + (dy * time));
frame = ((startFrame + int((time / 100))) % FRAMES);
_local1 = 200;
_local2 = (Math.abs((time - _local1)) / _local1);
altitude = Math.max(0, (maxAltitude - ((_local2 * _local2) * velocity)));
if (altitude <= 0){
lifeSpan = 0;
};
};
}
public static function prerender():void{
displays = new Array();
var _local1:int;
while (_local1 < VARIANTS) {
displays[_local1] = Assets.lookup("ShotgunShell");
_local1++;
};
}
}
}//package boxhead.world.thing.particle
Section 352
//Smoke (boxhead.world.thing.particle.Smoke)
package boxhead.world.thing.particle {
import flash.display.*;
import flash.geom.*;
public class Smoke extends Particle {
protected var graphicWidth:Number;
protected var _depth:Number;
protected var scale:Number;// = 1
protected var d:Number;
protected var graphicHeight:Number;
protected var smokeShape:MovieClip;
protected var startAltitude:Number;
protected var smokeGraphics:Sprite;
protected var smokeTransform:Sprite;
protected static var SmokeGraphics:Class = Smoke_SmokeGraphics;
public function Smoke(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
super(_arg1, _arg2);
_arg5 = Math.min(_arg4, _arg5);
smokeGraphics = (new SmokeGraphics() as Sprite);
smokeTransform = (smokeGraphics.getChildAt(0) as Sprite);
smokeShape = (smokeTransform.getChildAt(0) as MovieClip);
smokeShape.gotoAndStop(int((1 + (Math.random() * smokeShape.totalFrames))));
graphicWidth = smokeShape.width;
graphicHeight = smokeShape.height;
scale = ((_arg4 * Constants.CELL_WIDTH) / graphicWidth);
smokeTransform.rotation = ((_arg3 * 180) / Math.PI);
smokeTransform.scaleX = (smokeTransform.scaleY = scale);
var _local7:Shape = new Shape();
_local7.graphics.beginFill(0xFFFFFF);
_local7.graphics.drawRect(0, (-(graphicHeight) / 2), Math.min((((_arg5 / _arg4) * graphicWidth) + 5), graphicWidth), graphicHeight);
_local7.graphics.endFill();
smokeTransform.addChild(_local7);
smokeShape.mask = _local7;
lifeSpan = 450;
var _local8:Number = Math.sin(_arg3);
_depth = Math.max(_arg2, (_arg2 + (_local8 * _arg5)));
this.altitude = (startAltitude = _arg6);
if (Math.abs(_local8) < 0.1){
d = 1;
} else {
d = (Constants.CELL_HEIGHT / Constants.CELL_WIDTH);
};
}
override public function get depth():Number{
return (_depth);
}
override public function animate():void{
super.animate();
altitude = (startAltitude + (time * Math.max(0.02, (((scale * scale) - 1) * 0.05))));
smokeShape.x = ((progress * 0.1) * graphicWidth);
smokeTransform.scaleX = (scale * (1 - (progress * 0.3)));
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
if (dead){
return;
};
_arg2 = _arg2.add(renderOffset);
_arg2.y = (_arg2.y - altitude);
_arg1.draw(smokeGraphics, new Matrix(1, 0, 0, d, _arg2.x, _arg2.y), new ColorTransform(1, 1, 1, ((1 - progress) * (1 - progress))));
}
}
}//package boxhead.world.thing.particle
Section 353
//Smoke_SmokeGraphics (boxhead.world.thing.particle.Smoke_SmokeGraphics)
package boxhead.world.thing.particle {
import flash.display.*;
import mx.core.*;
public class Smoke_SmokeGraphics extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var linkButton:DisplayObject;
public var helvian:DisplayObject;
}
}//package boxhead.world.thing.particle
Section 354
//SmokePuff (boxhead.world.thing.particle.SmokePuff)
package boxhead.world.thing.particle {
import boxhead.world.thing.obstacle.*;
import flash.display.*;
import flash.geom.*;
import boxhead.assets.render.*;
import boxhead.sounds.*;
public class SmokePuff extends Particle {
protected var over:Obstacle;
protected var frames:Array;
protected var startAltitude:Number;
protected static const FRAME_RATE:int = 50;
protected static var displays:Array;
public function SmokePuff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Obstacle=null, _arg5:int=0){
super(_arg1, _arg2);
startAltitude = _arg3;
this.over = _arg4;
startTime = (startTime + _arg5);
frames = displays[int((Math.random() * displays.length))];
display = frames[0];
lifeSpan = 20000;
}
override public function animate():void{
super.animate();
if (time < 0){
return;
};
altitude = (startAltitude + (time / 100));
frame = (time / (1000 / FRAME_RATE));
display = frames[Math.min(frame, (frames.length - 1))];
if (frame >= frames.length){
lifeSpan = 0;
};
}
override public function get depth():Number{
if (over){
return ((over.depth + 0.01));
};
return (y);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
if (time < 0){
return;
};
super.draw(_arg1, _arg2);
}
public static function prerender():void{
displays = SmokePuffRenderer.displays;
}
}
}//package boxhead.world.thing.particle
Section 355
//SmokeTrail (boxhead.world.thing.particle.SmokeTrail)
package boxhead.world.thing.particle {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import flash.filters.*;
public class SmokeTrail extends Particle {
protected var shape:Sprite;
protected var container:Sprite;
protected var maxNodes:int;
protected var nodes:Array;
protected var thickness:Number;
protected var removeTime:int;
protected static const REMOVE_TIME:int = 50;
public function SmokeTrail(_arg1:Number, _arg2:Number, _arg3:int=0, _arg4:Number=2.5, _arg5:int=8){
super(_arg1, _arg2);
this.thickness = _arg4;
this.maxNodes = _arg5;
nodes = new Array();
removeTime = (_arg5 * REMOVE_TIME);
lifeSpan = 10000;
container = new Sprite();
shape = new Sprite();
container.addChild(shape);
shape.filters = [new BlurFilter(8, 8, 1)];
}
public function addPosition(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Node;
for each (_local4 in nodes) {
_local4.jitter();
};
nodes.push(new Node(Position.getRenderOffset(_arg1, _arg2), _arg3));
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
var _local6:Number;
if ((((nodes.length < 2)) || (dead))){
return;
};
var _local3:Graphics = shape.graphics;
_local3.clear();
var _local4:Node = nodes[0];
_local3.moveTo((_arg2.x + _local4.x), (_arg2.y + _local4.y));
var _local5 = 1;
while (_local5 < nodes.length) {
_local4 = nodes[_local5];
_local6 = ((_local5 + (maxNodes - nodes.length)) / maxNodes);
_local3.lineStyle(((0.2 + _local6) * thickness), 0xFFFFFF, (0.5 * _local6));
_local3.lineTo((_arg2.x + _local4.x), (_arg2.y + _local4.y));
_local5++;
};
_arg1.draw(container);
}
override public function animate():void{
super.animate();
while (time > removeTime) {
if (!nodes.length){
lifeSpan = 0;
break;
};
nodes.shift();
removeTime = (removeTime + REMOVE_TIME);
};
}
}
}//package boxhead.world.thing.particle
import flash.geom.*;
class Node {
public var x:Number;
public var y:Number;
private function Node(_arg1:Point, _arg2:Number){
this.x = _arg1.x;
this.y = ((_arg1.y - _arg2) - 1);
}
public function jitter():void{
x = (x + ((Math.random() * 2) - 1));
y = (y + ((Math.random() * -1) - 1));
}
}
Section 356
//AirstrikeBeacon (boxhead.world.thing.projectile.AirstrikeBeacon)
package boxhead.world.thing.projectile {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.display.*;
import boxhead.world.weapon.*;
import boxhead.assets.*;
import boxhead.options.*;
public class AirstrikeBeacon extends Projectile {
protected var processesRemaining:int;
protected var dir:Direction;
protected var startTime:int;
protected var lightOn:ThingDisplay;
protected var light:ThingDisplay;
protected var lightOff:ThingDisplay;
protected static const SECONDS_DELAY:Number = 2.5;
protected static var displays:Array;
public function AirstrikeBeacon(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Direction){
var _local6:ColorTransform;
dir = Direction.S;
super(_arg1, _arg2, WeaponInfo.AIRSTRIKE_THROWER_ID, _arg3, _arg4, 0);
_hit = new HitCircle(pos, 0.03);
this.dir = _arg5;
display = displays[0];
lightOff = displays[1].clone();
lightOn = displays[2].clone();
if (_arg1.friendly){
_local6 = Team.FRIENDLY_LIGHT_CT;
} else {
_local6 = Team.ENEMY_LIGHT_CT;
};
lightOff.tint(_local6);
lightOn.tint(_local6);
light = lightOff;
processesRemaining = (SECONDS_DELAY * SECOND);
startTime = Time.current;
}
override public function getScreenShake():ScreenShake{
return (new ScreenShake(pos, 5, 1500));
}
override public function playExplosionSounds():void{
var _local3:Number;
var _local4:Number;
var _local5:int;
SoundControl.playAreaSound(SoundList.EXPLOSION_HUGE, pos);
var _local1:Number = 5;
var _local2:int;
while (_local2 < 6) {
_local3 = ((_local2 / 12) * _local1);
_local4 = (_local2 * 2);
_local5 = ((_local2 * 50) + (50 * Math.random()));
SoundControl.playDelayedAreaSound(SoundList.EXPLOSION, new Position((x + (Math.cos(_local4) * _local3)), (y + (Math.sin(_local4) * _local3))), _local5);
_local2++;
};
}
override public function get explosionRadius():Number{
return (6);
}
override public function animate():void{
super.animate();
var _local1:int = ((Time.current - startTime) % 1000);
if (_local1 < 50){
light = lightOn;
} else {
light = lightOff;
};
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
Debug.drawCircle(pos.x, pos.y, hitCircle.radius, 0xFFFF00);
_arg2 = _arg2.add(renderOffset);
display.draw(_arg1, _arg2, 0);
light.draw(_arg1, _arg2, 0);
}
override public function getTrail():Array{
return (null);
}
override public function process(_arg1:CellGrid, _arg2:Array):void{
super.process(_arg1, _arg2);
if (processesRemaining > 0){
processesRemaining--;
} else {
explode(_arg1, _arg2);
};
}
override public function get explosionInnerRadius():Number{
return (4.5);
}
override public function getParticles():Array{
var _local2:int;
var _local7:Number;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:Point;
var _local1:Array = [new Explosion(x, y, 0, null, 0)];
var _local3 = 12;
var _local4 = 3;
var _local5:Number = 5;
_local2 = 0;
while (_local2 < _local3) {
_local7 = (((_local2 / _local3) * Math.PI) * 2);
_local8 = 1;
while (_local8 <= _local4) {
_local9 = ((_local8 / _local4) * _local5);
_local1.push(new Explosion((x + (Math.cos(_local7) * _local9)), (y + (Math.sin(_local7) * _local9)), 0, null, ((_local8 * 100) - (Math.random() * 100))));
_local8++;
};
_local2++;
};
var _local6:Number = (explosionRadius * 0.5);
_local1.push(new Scorch(x, y, 0));
_local3 = 8;
_local2 = 0;
while (_local2 < _local3) {
_local7 = (((_local2 / _local3) * Math.PI) * 2);
_local1.push(new Scorch((x + (Math.cos(_local7) * _local6)), (y + (Math.sin(_local7) * _local6)), 100));
_local2++;
};
if (Preferences.smoke){
_local10 = (2 + (Math.random() * 3));
_local2 = 0;
while (_local2 < _local10) {
_local11 = Point.polar(((Math.random() * explosionInnerRadius) * 0.8), ((Math.random() * Math.PI) * 2));
_local1.push(new Debris((x + _local11.x), (y + _local11.y), new Direction(((Math.random() * Math.PI) * 2)), ((Math.random() * 0.3) + 0.2), 10, (22 + (Math.random() * 13)), (150 + (Math.random() * 100))));
_local2++;
};
};
return (_local1);
}
public static function prerender():void{
displays = [Assets.lookup("AirstrikeBeacon"), Assets.lookup("AirstrikeBeaconLight1"), Assets.lookup("AirstrikeBeaconLight2")];
}
}
}//package boxhead.world.thing.projectile
Section 357
//Grenade (boxhead.world.thing.projectile.Grenade)
package boxhead.world.thing.projectile {
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.weapon.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.world.thing.obstacle.*;
import boxhead.assets.*;
public class Grenade extends Projectile {
protected var displayVariant:int;
protected var initDistance:Number;
protected var speed:Number;
protected var timeRemaining:int;
protected var dir:Direction;
protected static const Y_BOUNCE:Number = 0.4;
protected static const X_BOUNCE:Number = 0.7;
protected static var displays:Array;
public function Grenade(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Direction, _arg6:Number, _arg7:Number, _arg8:Number){
dir = Direction.S;
super(_arg1, _arg2, WeaponInfo.GRENADE_THROWER_ID, _arg3, _arg4, (Obstacle.LOW_HEIGHT + 1));
_hit = new HitCircle(pos, 0.02);
this.dir = _arg5;
this.speed = _arg6;
this.dAltitude = _arg7;
this.initDistance = _arg8;
bounceSound = SoundList.GRENADE_BOUNCE;
displayVariant = int((Math.random() * 2));
display = displays[displayVariant];
shadow = displays[2];
timeRemaining = (1.5 * SECOND);
}
override public function getScreenShake():ScreenShake{
return (smallScreenShake());
}
override public function playExplosionSounds():void{
SoundControl.playAreaSound(SoundList.EXPLOSION_GRENADE, pos);
}
override public function process(_arg1:CellGrid, _arg2:Array):void{
super.process(_arg1, _arg2);
if (bounces){
if ((dir.dx * speed) != 0){
spin();
};
move(_arg1);
initDistance = 0;
};
if (timeRemaining > 0){
timeRemaining--;
} else {
explode(_arg1, _arg2);
};
}
override protected function spin():void{
displayVariant = (1 - displayVariant);
}
override public function get explosionInnerRadius():Number{
return (1.5);
}
override public function get explosionRadius():Number{
return (3);
}
override public function getParticles():Array{
return (explosionCluster());
}
protected function move(_arg1:CellGrid):void{
var _local3:Prop;
var _local6:Point;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Boolean;
var _local11:Number;
var _local2:Tracer = new Tracer(x, y, dir, altitude, ((speed + initDistance) + 1));
_local2.checkCollisions(_arg1, []);
if (_local2.propHit){
_local3 = (_local2.propHit.thing as Prop);
};
if (((_local3) && ((_local2.distance <= ((speed + initDistance) + hitCircle.radius))))){
_local6 = new Point(x, y);
pos.copyPoint(_local2.propHit.impact);
x = (x - ((dir.dx * hitCircle.radius) * 1.5));
y = (y - ((dir.dy * hitCircle.radius) * 1.5));
_local7 = dir.radians;
_local8 = Math.atan2((y - _local6.y), (x - _local6.x));
_local9 = (((_local8 * 2) - _local7) + Math.PI);
while (_local9 > Math.PI) {
_local9 = (_local9 - (Math.PI * 2));
};
while (_local9 < -(Math.PI)) {
_local9 = (_local9 + (Math.PI * 2));
};
dir = new Direction(_local9);
speed = (speed * (0.4 * _local3.bounce));
} else {
x = (x + (dir.dx * (speed + initDistance)));
y = (y + (dir.dy * (speed + initDistance)));
};
updateCell(_arg1);
var _local4:Prop = cell.prop;
if (((((_local4) && ((altitude >= _local4.height)))) && (_local4.hit.intersects(hitCircle)))){
over = _local4;
} else {
over = null;
};
var _local5:Number = 0;
if (over){
_local5 = over.height;
};
altitude = (altitude + dAltitude);
if (altitude <= _local5){
bounces--;
_local10 = true;
_local11 = 0.8;
if (over){
_local10 = over.flat;
_local11 = over.bounce;
if (!_local10){
dir = new Direction(Math.atan2((y - over.centerPos.y), (x - over.centerPos.x)));
speed = (speed * (over.bounce * 0.8));
};
};
if (bounces){
if (_local10){
speed = (speed * X_BOUNCE);
};
dAltitude = (dAltitude * (-(Y_BOUNCE) * _local11));
altitude = ((_local5 + ((_local5 - altitude) * Y_BOUNCE)) + 0.01);
} else {
altitude = (_local5 + 0.01);
speed = 0;
};
if (bounceSound){
SoundControl.playAreaSound(bounceSound, new Position(x, y));
};
};
dAltitude = (dAltitude - Constants.GRAVITY);
}
public static function prerender():void{
displays = new Array();
displays[0] = Assets.lookup("Grenade_Projectile1");
displays[1] = Assets.lookup("Grenade_Projectile2");
displays[2] = Assets.lookup("Grenade_Shadow");
}
}
}//package boxhead.world.thing.projectile
Section 358
//LaunchGrenade (boxhead.world.thing.projectile.LaunchGrenade)
package boxhead.world.thing.projectile {
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.weapon.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.world.thing.obstacle.*;
import boxhead.assets.*;
public class LaunchGrenade extends Projectile {
protected var initDistance:Number;
protected var dir:Direction;
protected var speed:Number;
protected static var displays:Array;
public function LaunchGrenade(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Direction, _arg6:Number, _arg7:Number, _arg8:Number){
dir = Direction.S;
super(_arg1, _arg2, WeaponInfo.GRENADE_LAUNCHER_ID, _arg3, _arg4, (Obstacle.LOW_HEIGHT + 10));
_hit = new HitCircle(pos, 0.02);
this.dir = _arg5;
this.speed = _arg6;
this.dAltitude = _arg7;
this.initDistance = _arg8;
display = displays[0];
shadow = displays[1];
}
override public function getScreenShake():ScreenShake{
return (smallScreenShake());
}
override public function get explosionRadius():Number{
return (3);
}
override public function playExplosionSounds():void{
SoundControl.playAreaSound(SoundList.EXPLOSION_GRENADE, pos);
}
override public function process(_arg1:CellGrid, _arg2:Array):void{
super.process(_arg1, _arg2);
var _local3:Tracer = new Tracer(x, y, dir, altitude, (speed + initDistance));
_local3.checkCollisions(_arg1, []);
if (_local3.propHit){
pos.copyPoint(_local3.propHit.impact);
x = (x - ((dir.dx * hitCircle.radius) * 0.7));
y = (y - ((dir.dy * hitCircle.radius) * 0.7));
explode(_arg1, _arg2);
return;
};
x = (x + (dir.dx * (speed + initDistance)));
y = (y + (dir.dy * (speed + initDistance)));
initDistance = 0;
updateCell(_arg1);
var _local4:Prop = this.cell.prop;
if (((((_local4) && ((altitude >= _local4.height)))) && (_local4.hit.intersects(hitCircle)))){
over = _local4;
} else {
over = null;
};
var _local5:Number = 0;
if (over){
_local5 = over.height;
};
altitude = (altitude + dAltitude);
if (altitude <= _local5){
explode(_arg1, _arg2);
return;
};
dAltitude = (dAltitude - Constants.GRAVITY);
updateCell(_arg1);
}
override public function getParticles():Array{
return (explosionCluster());
}
override public function get explosionInnerRadius():Number{
return (1.5);
}
public static function prerender():void{
displays = new Array();
displays[0] = Assets.lookup("LaunchGrenade");
displays[1] = Assets.lookup("Grenade_Shadow");
}
}
}//package boxhead.world.thing.projectile
Section 359
//MortarShell (boxhead.world.thing.projectile.MortarShell)
package boxhead.world.thing.projectile {
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.game.*;
import boxhead.world.thing.particle.*;
import boxhead.world.weapon.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.assets.*;
public class MortarShell extends Projectile {
protected var trail:SmokeTrail;
protected var speed:Number;
protected var timeRemaining:int;
protected var dir:Direction;
protected static var displays:Array;
public function MortarShell(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Position){
super(_arg1, _arg2, WeaponInfo.TURRET_MORTAR_PLANTER_ID, _arg3, _arg4, 20);
_hit = new HitCircle(pos, 0.02);
var _local6:Position = Position.interpolate(_arg5, pos, 0.5);
trail = new SmokeTrail(_local6.x, _local6.y, altitude, 2.5, 8);
trail.addPosition(_arg3, _arg4, altitude);
var _local7:Point = _arg5.difference(pos);
timeRemaining = Math.max(1, (_local7.length * 2));
speed = (_local7.length / timeRemaining);
dir = new Direction(Math.atan2(_local7.y, _local7.x));
dAltitude = (Constants.GRAVITY * ((timeRemaining / 2) - 1));
display = displays[0];
shadow = displays[1];
}
override protected function spin():void{
}
override public function getScreenShake():ScreenShake{
return (smallScreenShake());
}
override public function playExplosionSounds():void{
SoundControl.playAreaSound(SoundList.EXPLOSION_ARTILLERY, pos);
}
override public function process(_arg1:CellGrid, _arg2:Array):void{
super.process(_arg1, _arg2);
trail.addPosition(x, y, altitude);
timeRemaining--;
var _local3:Tracer = new Tracer(x, y, dir, altitude, speed);
_local3.checkCollisions(_arg1, []);
if (_local3.propHit){
pos.copyPoint(_local3.propHit.impact);
x = (x - ((dir.dx * hitCircle.radius) * 0.7));
y = (y - ((dir.dy * hitCircle.radius) * 0.7));
explode(_arg1, _arg2);
return;
};
x = (x + (dir.dx * speed));
y = (y + (dir.dy * speed));
updateCell(_arg1);
var _local4:Prop = this.cell.prop;
if (((((_local4) && ((altitude >= _local4.height)))) && (_local4.hit.intersects(hitCircle)))){
over = _local4;
} else {
over = null;
};
altitude = Math.max(0, (altitude + (dAltitude / 2)));
dAltitude = (dAltitude - Constants.GRAVITY);
if (((((over) && ((altitude <= over.height)))) || ((timeRemaining <= 0)))){
if ((((timeRemaining <= 0)) && (!(over)))){
altitude = 0;
};
explode(_arg1, _arg2);
};
updateCell(_arg1);
}
override public function getTrail():Array{
return ([trail]);
}
override public function getParticles():Array{
return (explosionCluster());
}
public static function prerender():void{
displays = new Array();
displays[0] = Assets.lookup("MortarShell");
displays[1] = Assets.lookup("Grenade_Shadow");
}
}
}//package boxhead.world.thing.projectile
Section 360
//PlasmaBall (boxhead.world.thing.projectile.PlasmaBall)
package boxhead.world.thing.projectile {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.sounds.*;
import boxhead.game.*;
import boxhead.world.thing.particle.*;
import boxhead.world.weapon.*;
import boxhead.events.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.assets.*;
public class PlasmaBall extends Projectile {
protected var initDistance:Number;// = 0
protected var dir:Direction;
protected var startTime:int;
protected var frame:int;
protected var _field:HitCircle;
protected static const SPEED:Number = 1.2;
private static var displays:Array;
public function PlasmaBall(_arg1:Player, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Direction, _arg6:Number, _arg7:Number){
super(_arg1, _arg2, WeaponInfo.PLASMA_CANNON_ID, _arg3, _arg4, _arg6);
_hit = new HitCircle(pos, 0.1);
_field = new HitCircle(pos, 0.6);
this.dir = _arg5;
this.initDistance = _arg7;
damaged = new Array();
display = displays[0];
shadow = displays[1];
startTime = Time.current;
frame = 0;
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
Debug.drawCircle(pos.x, pos.y, hitCircle.radius, 0xFFFF00);
_arg2 = _arg2.add(renderOffset);
_arg2.y = (_arg2.y - int(interpolatedAltitude));
display.draw(_arg1, _arg2, frame);
}
override public function process(_arg1:CellGrid, _arg2:Array):void{
super.process(_arg1, _arg2);
var _local3:Boolean;
var _local4:Tracer = new Tracer(x, y, dir, altitude, (SPEED + initDistance));
_local4.checkCollisions(_arg1, []);
if (_local4.propHit){
pos.copyPoint(_local4.propHit.impact);
x = (x - ((dir.dx * hitCircle.radius) * 0.7));
y = (y - ((dir.dy * hitCircle.radius) * 0.7));
_local3 = true;
} else {
x = (x + (dir.dx * (SPEED + initDistance)));
y = (y + (dir.dy * (SPEED + initDistance)));
};
initDistance = 0;
updateCell(_arg1);
var _local5:Prop = this.cell.prop;
if (((((_local5) && ((altitude >= _local5.height)))) && (_local5.hit.intersects(hitCircle)))){
over = _local5;
} else {
over = null;
};
dispatchEvent(new ProjectileEvent(ProjectileEvent.PULSE));
if (((_local3) || (!(_arg1.containsPos(pos, 5))))){
explode(_arg1, _arg2);
};
}
override public function animate():void{
super.animate();
frame = (int(((Time.current - startTime) / 100)) % 8);
}
override public function get field():HitCircle{
return (_field);
}
override public function playExplosionSounds():void{
SoundControl.playAreaSound(SoundList.PLASMA_CANNON_HIT, pos);
}
override public function get explodes():Boolean{
return (false);
}
override public function getParticles():Array{
return ([new PlasmaBallExplosion(x, y, altitude, over)]);
}
public static function prerender():void{
displays = [Assets.lookup("PlasmaBall"), Assets.lookup("PlasmaBall_Shadow")];
}
}
}//package boxhead.world.thing.projectile
Section 361
//Projectile (boxhead.world.thing.projectile.Projectile)
package boxhead.world.thing.projectile {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import flash.media.*;
import boxhead.game.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.*;
import boxhead.world.thing.display.*;
import boxhead.events.*;
import boxhead.world.thing.obstacle.*;
public class Projectile extends Mover implements HasOwner {
protected var shadow:ThingDisplay;
public var altitude:Number;
protected var _explosionDamage:int;
protected var dAltitude:Number;
protected var _owner:Player;
public var weaponID:int;
protected var previousAltitude:Number;
protected var display:ThingDisplay;
protected var interpolatedAltitude:Number;
protected var _hit:HitCircle;
public var damaged:Array;
public var over:Obstacle;
protected var bounceSound:Sound;
protected var bounces:int;// = 3
public function Projectile(_arg1:Player, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number, _arg6:Number=15){
_owner = _arg1;
_explosionDamage = _arg2;
this.weaponID = _arg3;
this.x = _arg4;
this.y = _arg5;
this.altitude = (previousAltitude = (interpolatedAltitude = _arg6));
}
public function get field():HitCircle{
return (null);
}
protected function smallScreenShake():ScreenShake{
return (ScreenShake.generateSmall(pos));
}
public function get local():Boolean{
return (((owner) && (owner.isLocal)));
}
public function get explosionRadius():Number{
return (3);
}
override public function drawShadow(_arg1:BitmapData, _arg2:Point):void{
if (!shadow){
return;
};
_arg2 = _arg2.add(renderOffset);
shadow.draw(_arg1, _arg2, 0, true);
}
public function get hit():HitShape{
return (_hit);
}
public function get doTeamDamage():Boolean{
return (true);
}
public function getBounds():Rectangle{
return (hit.getBounds());
}
protected function explosionCluster():Array{
var _local1:Array = [new Explosion(x, y, altitude, over, 0), new Explosion((x - 1), (y - 1), Math.max(0, (altitude - 10)), null, (50 + (Math.random() * 100))), new Explosion((x + 1), (y - 1), Math.max(0, (altitude - 10)), null, (50 + (Math.random() * 100))), new Explosion((x - 1), (y + 1), Math.max(0, (altitude - 10)), null, (50 + (Math.random() * 100))), new Explosion((x + 1), (y + 1), Math.max(0, (altitude - 10)), null, (50 + (Math.random() * 100)))];
if (!over){
_local1.push(new Scorch(x, y, 0));
};
return (_local1);
}
public function get explodes():Boolean{
return (true);
}
public function get owner():Player{
return (_owner);
}
override public function get showInfraRed():Boolean{
return (true);
}
public function get hitCircle():HitCircle{
return (_hit);
}
override public function getRenderArea():Rectangle{
return (display.getRenderArea(0));
}
protected function spin():void{
}
public function get explosionInnerRadius():Number{
return ((explosionRadius * 0.8));
}
public function getTrail():Array{
return (null);
}
override public function get depth():Number{
if (over){
return ((over.depth + 0.01));
};
return (pos.y);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
Debug.drawCircle(pos.x, pos.y, hitCircle.radius, 0xFFFF00);
if (!display){
return;
};
_arg2 = _arg2.add(renderOffset);
_arg2.y = (_arg2.y - int(interpolatedAltitude));
display.draw(_arg1, _arg2, 0);
}
public function updateCell(_arg1:CellGrid):void{
var _local2:Cell = _arg1.cellAtPos(pos);
if (_local2 == cell){
return;
};
if (cell){
cell.removeProjectile(this);
};
_local2.addProjectile(this);
cell = _local2;
}
public function get allowTeamDamage():Boolean{
return (false);
}
protected function explode(_arg1:CellGrid, _arg2:Array):void{
dispatchEvent(new ProjectileEvent(ProjectileEvent.EXPLODE));
}
public function playExplosionSounds():void{
}
public function set owner(_arg1:Player):void{
_owner = _arg1;
}
public function process(_arg1:CellGrid, _arg2:Array):void{
recordPreviousPos();
previousAltitude = altitude;
}
override public function animate():void{
super.animate();
interpolatedAltitude = (previousAltitude + ((altitude - previousAltitude) * interpolationProgress));
}
public function getScreenShake():ScreenShake{
return (null);
}
public function get explosionDamage():Number{
return (_explosionDamage);
}
public function getParticles():Array{
return (null);
}
}
}//package boxhead.world.thing.projectile
Section 362
//HasOwner (boxhead.world.thing.HasOwner)
package boxhead.world.thing {
import boxhead.game.*;
public interface HasOwner {
function get allowTeamDamage():Boolean;
function set owner(_arg1:Player):void;
function get doTeamDamage():Boolean;
function get owner():Player;
function get local():Boolean;
}
}//package boxhead.world.thing
Section 363
//Mover (boxhead.world.thing.Mover)
package boxhead.world.thing {
import flash.geom.*;
import boxhead.world.*;
public class Mover extends Thing {
protected var smoothingError:Point;
protected var previousPosTime:int;
protected var interpolationProgress:Number;
protected var smoothStart:int;
public var moveDir:Direction;
protected var previousPos:Position;
protected static const SMOOTH_TIME:int = 200;
public function Mover(){
previousPosTime = Time.current;
previousPos = new Position(x, y);
interpolationProgress = 0;
_renderPos = new Position(x, y);
}
override public function animate():void{
var _local1:Position;
var _local2:Number;
super.animate();
interpolationProgress = ((Time.current - previousPosTime) / Constants.PROCESS_INTERVAL);
if (previousPos){
_local1 = Position.interpolate(pos, previousPos, interpolationProgress);
} else {
_local1 = pos.clone();
};
if (smoothingError){
_local2 = Math.max(0, Math.min(1, (1 - ((Time.current - smoothStart) / SMOOTH_TIME))));
_local1.x = (_local1.x + (smoothingError.x * _local2));
_local1.y = (_local1.y + (smoothingError.y * _local2));
if (_local2 == 0){
clearSmoothing();
};
};
_renderPos.copy(_local1);
}
public function applySmoothing():void{
smoothStart = Time.current;
smoothingError = new Point((_renderPos.x - pos.x), (_renderPos.y - pos.y));
}
public function clearSmoothing():void{
smoothingError = null;
}
override public function get renderOffset():Point{
return (_renderPos.renderOffset);
}
protected function recordPreviousPos():Position{
if (previousPos){
previousPos.copy(pos);
} else {
previousPos = pos.clone();
};
previousPosTime = Time.current;
return (previousPos);
}
protected function clearPreviousPos():void{
previousPos = null;
_renderPos.copy(pos);
}
}
}//package boxhead.world.thing
Section 364
//Thing (boxhead.world.thing.Thing)
package boxhead.world.thing {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
public class Thing extends EventDispatcher {
public var cell:Cell;
protected var _renderPos:Position;
protected var _renderOffset:Point;
private var _pos:Position;
public function Thing(){
_pos = new Position();
_renderPos = _pos;
_renderOffset = _pos.renderOffset;
}
public function getRenderArea():Rectangle{
return (new Rectangle(0, 0, 0, 0));
}
public function animate():void{
}
public function get depth():Number{
return (renderPos.y);
}
public function drawOverhead(_arg1:BitmapData, _arg2:Point):void{
}
public function get renderOffset():Point{
return (_renderOffset);
}
public function draw(_arg1:BitmapData, _arg2:Point):void{
}
public function get showInfraRed():Boolean{
return (false);
}
public function set y(_arg1:Number):void{
pos.y = _arg1;
_renderOffset = _pos.renderOffset;
}
public function get pos():Position{
return (_pos);
}
public function set x(_arg1:Number):void{
pos.x = _arg1;
_renderOffset = _pos.renderOffset;
}
public function get x():Number{
return (pos.x);
}
public function get y():Number{
return (pos.y);
}
public function drawShadow(_arg1:BitmapData, _arg2:Point):void{
}
protected function get debugColor():uint{
return (0xFF);
}
public function get renderPos():Position{
return (_renderPos);
}
public function get centerPos():Position{
return (_pos);
}
public static function get SECOND():Number{
return ((1000 / Constants.PROCESS_INTERVAL));
}
}
}//package boxhead.world.thing
Section 365
//TracerHit (boxhead.world.thing.TracerHit)
package boxhead.world.thing {
import flash.geom.*;
public class TracerHit {
public var distance:Number;
public var impact:Point;
public var thing:Thing;
public function TracerHit(_arg1:Point, _arg2:Number, _arg3:Thing){
this.impact = _arg1;
this.distance = _arg2;
this.thing = _arg3;
}
}
}//package boxhead.world.thing
Section 366
//TracerLine (boxhead.world.thing.TracerLine)
package boxhead.world.thing {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
public class TracerLine extends Thing {
protected var altitude:Number;
public var endTime:int;
protected var end:Position;
protected var lineShape:Shape;
protected static const TIME:int = 80;
public function TracerLine(_arg1:Position, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:Number){
endTime = (Time.current + TIME);
pos.copy(_arg1);
_renderOffset = pos.renderOffset;
end = new Position((pos.x + (_arg2 * _arg4)), (pos.y + (_arg3 * _arg4)));
var _local8:Point = end.renderOffset.subtract(pos.renderOffset);
this.altitude = _arg5;
lineShape = new Shape();
var _local9:Graphics = lineShape.graphics;
_local9.lineStyle(0.7, _arg6, _arg7);
_local9.lineTo(_local8.x, _local8.y);
}
override public function draw(_arg1:BitmapData, _arg2:Point):void{
var _local3:Point = _arg2.add(renderOffset);
var _local4:Number = ((endTime - Time.current) / TIME);
_local4 = (1 - Math.pow((1 - _local4), 1.5));
_arg1.draw(lineShape, new Matrix(1, 0, 0, 1, _local3.x, (_local3.y - altitude)), new ColorTransform(1, 1, 1, _local4));
}
}
}//package boxhead.world.thing
Section 367
//AirstrikeThrower (boxhead.world.weapon.AirstrikeThrower)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.projectile.*;
import boxhead.assets.*;
public class AirstrikeThrower extends WeaponThrown {
public function AirstrikeThrower(){
super(WeaponInfo.AIRSTRIKE_THROWER_ID);
animID = UNARMED;
fireSound = SoundList.AIRSTRIKE;
changeWeaponSound = SoundList.CHANGE_WEAPON7;
display = Assets.lookup("AirstrikeBeaconHeld");
flashTime = 0;
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
return (new Shot(character, this, _arg1, _arg2, null, new AirstrikeBeacon(character.owner, damage, muzzlePosition.x, muzzlePosition.y, character.dir)));
}
override protected function get barrelDistance():Number{
return (0.1);
}
override protected function get sideDistance():Number{
return (0.2);
}
override protected function get shellDistance():Number{
return (0);
}
override protected function get smokeDistance():Number{
return (0);
}
}
}//package boxhead.world.weapon
Section 368
//AK47 (boxhead.world.weapon.AK47)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class AK47 extends Weapon2h {
private static var _muzzleOffsets:Array;
public function AK47(){
super(WeaponInfo.AK47_ID);
animID = TWO_HAND;
fireSoundList = SoundList.AK47_FIRE_LIST;
reloadSound = SoundList.AK47_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON2;
reloadSoundDelay = 100;
display = Assets.lookup("AK47");
muzzleFlashes = [Assets.lookup("MuzzleFlashLarge1"), Assets.lookup("MuzzleFlashLarge2")];
flashTime = (0.1 * SECOND);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-10, 5));
_muzzleOffsets.push(new Point(-9, 5));
_muzzleOffsets.push(new Point(-9, 5));
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-30, -6));
_muzzleOffsets.push(new Point(-31, -6));
_muzzleOffsets.push(new Point(-30, -6));
_muzzleOffsets.push(new Point(-30, -6));
_muzzleOffsets.push(new Point(-29, -6));
_muzzleOffsets.push(new Point(-29, -7));
_muzzleOffsets.push(new Point(-29, -6));
_muzzleOffsets.push(new Point(-30, -6));
_muzzleOffsets.push(new Point(-30, -6));
_muzzleOffsets.push(new Point(-32, -25));
_muzzleOffsets.push(new Point(-33, -25));
_muzzleOffsets.push(new Point(-33, -24));
_muzzleOffsets.push(new Point(-32, -24));
_muzzleOffsets.push(new Point(-31, -24));
_muzzleOffsets.push(new Point(-31, -24));
_muzzleOffsets.push(new Point(-32, -24));
_muzzleOffsets.push(new Point(-32, -24));
_muzzleOffsets.push(new Point(-33, -24));
_muzzleOffsets.push(new Point(-15, -39));
_muzzleOffsets.push(new Point(-16, -39));
_muzzleOffsets.push(new Point(-16, -39));
_muzzleOffsets.push(new Point(-15, -38));
_muzzleOffsets.push(new Point(-15, -38));
_muzzleOffsets.push(new Point(-15, -38));
_muzzleOffsets.push(new Point(-15, -38));
_muzzleOffsets.push(new Point(-15, -38));
_muzzleOffsets.push(new Point(-16, -39));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -41));
_muzzleOffsets.push(new Point(11, -41));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(31, -29));
_muzzleOffsets.push(new Point(31, -29));
_muzzleOffsets.push(new Point(31, -28));
_muzzleOffsets.push(new Point(31, -28));
_muzzleOffsets.push(new Point(30, -28));
_muzzleOffsets.push(new Point(30, -28));
_muzzleOffsets.push(new Point(30, -28));
_muzzleOffsets.push(new Point(30, -28));
_muzzleOffsets.push(new Point(31, -29));
_muzzleOffsets.push(new Point(33, -10));
_muzzleOffsets.push(new Point(34, -10));
_muzzleOffsets.push(new Point(34, -10));
_muzzleOffsets.push(new Point(33, -10));
_muzzleOffsets.push(new Point(32, -10));
_muzzleOffsets.push(new Point(32, -11));
_muzzleOffsets.push(new Point(32, -10));
_muzzleOffsets.push(new Point(33, -10));
_muzzleOffsets.push(new Point(33, -10));
_muzzleOffsets.push(new Point(16, 4));
_muzzleOffsets.push(new Point(17, 5));
_muzzleOffsets.push(new Point(16, 5));
_muzzleOffsets.push(new Point(16, 4));
_muzzleOffsets.push(new Point(16, 4));
_muzzleOffsets.push(new Point(16, 3));
_muzzleOffsets.push(new Point(16, 4));
_muzzleOffsets.push(new Point(16, 4));
_muzzleOffsets.push(new Point(16, 5));
return (_muzzleOffsets);
}
override protected function get barrelDistance():Number{
return (0.8);
}
override protected function get smokeDistance():Number{
return (0.85);
}
override protected function get shellDistance():Number{
return (0.15);
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 30));
}
}
}//package boxhead.world.weapon
Section 369
//AkimboPistols (boxhead.world.weapon.AkimboPistols)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class AkimboPistols extends WeaponAkimbo {
private static var _muzzleOffsets:Array;
public function AkimboPistols(){
super(WeaponInfo.AKIMBO_PISTOLS_ID);
animID = Akimbo;
fireSoundList = SoundList.PISTOL_FIRE_LIST;
reloadSound = (reloadSound2 = SoundList.PISTOL_RELOAD);
changeWeaponSound = SoundList.CHANGE_WEAPON1;
reloadSoundDelay2 = 300;
display = Assets.lookup("AkimboPistols");
muzzleFlashes = [Assets.lookup("MuzzleFlashSmall1"), Assets.lookup("MuzzleFlashSmall2")];
flashTime = (0.1 * SECOND);
}
override protected function get smokeSize():Number{
return (2);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
var _local1:Array = new Array();
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(11, -5));
_muzzleOffsets.push(new Point(10, -4));
_muzzleOffsets.push(new Point(10, -4));
_muzzleOffsets.push(new Point(10, -4));
_muzzleOffsets.push(new Point(10, -4));
_muzzleOffsets.push(new Point(10, -4));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-24, -29));
_muzzleOffsets.push(new Point(-24, -30));
_muzzleOffsets.push(new Point(-24, -29));
_muzzleOffsets.push(new Point(-24, -29));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-24, -29));
_muzzleOffsets.push(new Point(-24, -30));
_muzzleOffsets.push(new Point(-10, -39));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -39));
_muzzleOffsets.push(new Point(-9, -40));
_muzzleOffsets.push(new Point(-9, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-9, -40));
_muzzleOffsets.push(new Point(-9, -40));
_muzzleOffsets.push(new Point(10, -39));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(24, -29));
_muzzleOffsets.push(new Point(25, -30));
_muzzleOffsets.push(new Point(25, -29));
_muzzleOffsets.push(new Point(26, -29));
_muzzleOffsets.push(new Point(26, -29));
_muzzleOffsets.push(new Point(26, -30));
_muzzleOffsets.push(new Point(26, -29));
_muzzleOffsets.push(new Point(26, -29));
_muzzleOffsets.push(new Point(25, -29));
_muzzleOffsets.push(new Point(25, -15));
_muzzleOffsets.push(new Point(25, -15));
_muzzleOffsets.push(new Point(25, -15));
_muzzleOffsets.push(new Point(25, -14));
_muzzleOffsets.push(new Point(25, -14));
_muzzleOffsets.push(new Point(26, -15));
_muzzleOffsets.push(new Point(26, -14));
_muzzleOffsets.push(new Point(25, -14));
_muzzleOffsets.push(new Point(25, -15));
_local1[0] = _muzzleOffsets;
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-11, -6));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -6));
_muzzleOffsets.push(new Point(-11, -6));
_muzzleOffsets.push(new Point(-11, -6));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-25, -16));
_muzzleOffsets.push(new Point(-26, -16));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -16));
_muzzleOffsets.push(new Point(-25, -16));
_muzzleOffsets.push(new Point(-25, -16));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-26, -31));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -31));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-11, -40));
_muzzleOffsets.push(new Point(-12, -41));
_muzzleOffsets.push(new Point(-11, -41));
_muzzleOffsets.push(new Point(-11, -41));
_muzzleOffsets.push(new Point(-11, -40));
_muzzleOffsets.push(new Point(-75, -75));
_muzzleOffsets.push(new Point(-11, -40));
_muzzleOffsets.push(new Point(-11, -41));
_muzzleOffsets.push(new Point(-11, -41));
_muzzleOffsets.push(new Point(9, -40));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(24, -30));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(24, -30));
_muzzleOffsets.push(new Point(24, -30));
_muzzleOffsets.push(new Point(24, -31));
_muzzleOffsets.push(new Point(24, -30));
_muzzleOffsets.push(new Point(24, -30));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(23, -16));
_muzzleOffsets.push(new Point(25, -16));
_muzzleOffsets.push(new Point(25, -16));
_muzzleOffsets.push(new Point(24, -15));
_muzzleOffsets.push(new Point(24, -16));
_muzzleOffsets.push(new Point(24, -16));
_muzzleOffsets.push(new Point(24, -16));
_muzzleOffsets.push(new Point(24, -16));
_muzzleOffsets.push(new Point(25, -16));
_muzzleOffsets.push(new Point(9, -6));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(10, -6));
_muzzleOffsets.push(new Point(9, -6));
_muzzleOffsets.push(new Point(10, -6));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(10, -5));
_local1[1] = _muzzleOffsets;
_muzzleOffsets = _local1;
return (_muzzleOffsets);
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 10));
}
}
}//package boxhead.world.weapon
Section 370
//AkimboUzis (boxhead.world.weapon.AkimboUzis)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class AkimboUzis extends WeaponAkimbo {
private static var _muzzleOffsets:Array;
public function AkimboUzis(){
super(WeaponInfo.AKIMBO_UZIS_ID);
animID = Akimbo;
fireSoundList = SoundList.UZI_FIRE_LIST;
reloadSound = SoundList.UZI_RELOAD_LEFT;
reloadSound2 = SoundList.UZI_RELOAD_RIGHT;
changeWeaponSound = SoundList.CHANGE_WEAPON1;
reloadSoundDelay = 100;
reloadSoundDelay2 = 550;
display = Assets.lookup("AkimboUzis");
muzzleFlashes = [Assets.lookup("MuzzleFlashSmall1"), Assets.lookup("MuzzleFlashSmall2")];
flashTime = (0.1 * SECOND);
}
override protected function get smokeSize():Number{
return (2.5);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
var _local1:Array = new Array();
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(10, -4));
_muzzleOffsets.push(new Point(11, -4));
_muzzleOffsets.push(new Point(11, -4));
_muzzleOffsets.push(new Point(10, -3));
_muzzleOffsets.push(new Point(10, -3));
_muzzleOffsets.push(new Point(10, -3));
_muzzleOffsets.push(new Point(10, -3));
_muzzleOffsets.push(new Point(10, -3));
_muzzleOffsets.push(new Point(10, -4));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-12, -4));
_muzzleOffsets.push(new Point(-12, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -29));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -31));
_muzzleOffsets.push(new Point(-26, -31));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-9, -41));
_muzzleOffsets.push(new Point(-10, -41));
_muzzleOffsets.push(new Point(-10, -41));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-9, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(12, -40));
_muzzleOffsets.push(new Point(12, -40));
_muzzleOffsets.push(new Point(12, -41));
_muzzleOffsets.push(new Point(12, -40));
_muzzleOffsets.push(new Point(12, -40));
_muzzleOffsets.push(new Point(12, -40));
_muzzleOffsets.push(new Point(26, -29));
_muzzleOffsets.push(new Point(26, -30));
_muzzleOffsets.push(new Point(26, -29));
_muzzleOffsets.push(new Point(27, -29));
_muzzleOffsets.push(new Point(27, -29));
_muzzleOffsets.push(new Point(27, -29));
_muzzleOffsets.push(new Point(27, -29));
_muzzleOffsets.push(new Point(27, -29));
_muzzleOffsets.push(new Point(26, -29));
_muzzleOffsets.push(new Point(25, -14));
_muzzleOffsets.push(new Point(26, -15));
_muzzleOffsets.push(new Point(26, -14));
_muzzleOffsets.push(new Point(26, -14));
_muzzleOffsets.push(new Point(26, -14));
_muzzleOffsets.push(new Point(26, -14));
_muzzleOffsets.push(new Point(26, -14));
_muzzleOffsets.push(new Point(26, -14));
_muzzleOffsets.push(new Point(26, -14));
_local1[0] = _muzzleOffsets;
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -5));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-11, -4));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-27, -15));
_muzzleOffsets.push(new Point(-27, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-26, -16));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-26, -15));
_muzzleOffsets.push(new Point(-27, -15));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-27, -30));
_muzzleOffsets.push(new Point(-27, -30));
_muzzleOffsets.push(new Point(-27, -30));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-26, -31));
_muzzleOffsets.push(new Point(-26, -30));
_muzzleOffsets.push(new Point(-27, -30));
_muzzleOffsets.push(new Point(-27, -30));
_muzzleOffsets.push(new Point(-11, -41));
_muzzleOffsets.push(new Point(-12, -42));
_muzzleOffsets.push(new Point(-12, -41));
_muzzleOffsets.push(new Point(-12, -41));
_muzzleOffsets.push(new Point(-12, -41));
_muzzleOffsets.push(new Point(-11, -41));
_muzzleOffsets.push(new Point(-12, -41));
_muzzleOffsets.push(new Point(-12, -41));
_muzzleOffsets.push(new Point(-12, -41));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(9, -42));
_muzzleOffsets.push(new Point(10, -42));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(9, -41));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -41));
_muzzleOffsets.push(new Point(10, -42));
_muzzleOffsets.push(new Point(24, -30));
_muzzleOffsets.push(new Point(26, -32));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(24, -31));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(25, -31));
_muzzleOffsets.push(new Point(25, -16));
_muzzleOffsets.push(new Point(26, -16));
_muzzleOffsets.push(new Point(26, -16));
_muzzleOffsets.push(new Point(26, -15));
_muzzleOffsets.push(new Point(25, -16));
_muzzleOffsets.push(new Point(25, -16));
_muzzleOffsets.push(new Point(25, -16));
_muzzleOffsets.push(new Point(26, -16));
_muzzleOffsets.push(new Point(26, -16));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(11, -5));
_muzzleOffsets.push(new Point(11, -5));
_muzzleOffsets.push(new Point(11, -5));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(10, -6));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(11, -5));
_muzzleOffsets.push(new Point(11, -5));
_local1[1] = _muzzleOffsets;
_muzzleOffsets = _local1;
return (_muzzleOffsets);
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 10));
}
}
}//package boxhead.world.weapon
Section 371
//Ammo (boxhead.world.weapon.Ammo)
package boxhead.world.weapon {
import boxhead.security.*;
public class Ammo {
private var storedMax:StoredInt;
private var storedCount:StoredInt;
private var increment:int;
public function Ammo(_arg1:int, _arg2:int){
storedCount = new StoredInt();
storedMax = new StoredInt();
super();
this.increment = _arg2;
storedCount.value = _arg2;
storedMax.value = _arg1;
}
public function get max():int{
return (storedMax.value);
}
public function get count():int{
return (storedCount.value);
}
public function set max(_arg1:int):void{
storedMax.value = _arg1;
}
public function get buyCount():int{
return (Math.min(increment, (storedMax.value - storedCount.value)));
}
public function setCount(_arg1:int):void{
storedCount.value = Math.min(_arg1, max);
}
public function get full():Boolean{
return ((storedCount.value == storedMax.value));
}
public function add(_arg1:int):void{
storedCount.value = Math.min((count + _arg1), max);
}
public function decrement():void{
storedCount.value--;
}
public function reset():void{
storedCount.value = increment;
}
public function combine(_arg1:Ammo):void{
if (!_arg1){
return;
};
storedCount.value = Math.min((count + _arg1.count), max);
}
}
}//package boxhead.world.weapon
Section 372
//BarrelPlanter (boxhead.world.weapon.BarrelPlanter)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.obstacle.deployable.*;
public class BarrelPlanter extends WeaponPlanter {
public function BarrelPlanter(){
super(WeaponInfo.BARREL_PLANTER_ID);
animID = UNARMED;
changeWeaponSound = SoundList.CHANGE_WEAPON6;
fireSound = SoundList.PRE_DEPLOY_HEAVY;
flashTime = 0;
}
override public function createDeployable(_arg1:int, _arg2:int):Deployable{
useDeployableAmmo();
return (new Barrel(character.owner, damage, _arg1, _arg2));
}
}
}//package boxhead.world.weapon
Section 373
//BarricadePlanter (boxhead.world.weapon.BarricadePlanter)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.obstacle.deployable.*;
public class BarricadePlanter extends WeaponPlanter {
public function BarricadePlanter(){
super(WeaponInfo.BARRICADE_PLANTER_ID);
animID = UNARMED;
changeWeaponSound = SoundList.CHANGE_WEAPON6;
fireSound = SoundList.PRE_DEPLOY_HEAVY;
flashTime = 0;
}
override public function createDeployable(_arg1:int, _arg2:int):Deployable{
useDeployableAmmo();
return (new Barricade(character.owner, _arg1, _arg2));
}
}
}//package boxhead.world.weapon
Section 374
//ChargePackPlanter (boxhead.world.weapon.ChargePackPlanter)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.display.*;
import boxhead.assets.*;
public class ChargePackPlanter extends WeaponPlanter {
protected var chargePack:ChargePack;
protected var released:Boolean;// = true
protected static var packDisplay:ThingDisplay;
protected static var detonatorDisplay:ThingDisplay;
public function ChargePackPlanter(){
super(WeaponInfo.CHARGE_PACK_PLANTER_ID);
animID = UNARMED;
changeWeaponSound = SoundList.CHANGE_WEAPON7;
fireSound = SoundList.PRE_DEPLOY_LIGHT;
if (!packDisplay){
packDisplay = Assets.lookup("ChargePackHeld");
detonatorDisplay = Assets.lookup("Detonator");
};
display = packDisplay;
flashTime = 0;
}
override public function fireRelease():void{
released = true;
}
override protected function fire():void{
if (chargePack){
timeSinceFire = 0;
chargePack.die(character);
chargePack = null;
display = packDisplay;
} else {
super.fire();
display = detonatorDisplay;
};
}
override protected function canFire():Boolean{
if (character.local){
return (((chargePack) || (super.canFire())));
};
return (((!(chargePack)) && (super.canFire())));
}
override public function fireDown():void{
if (released){
if (canFire()){
fire();
released = false;
};
};
}
override public function get available():Boolean{
return (((super.available) || (chargePack)));
}
override public function createDeployable(_arg1:int, _arg2:int):Deployable{
useDeployableAmmo();
chargePack = new ChargePack(character.owner, damage, _arg1, _arg2);
return (chargePack);
}
}
}//package boxhead.world.weapon
Section 375
//ClaymorePlanter (boxhead.world.weapon.ClaymorePlanter)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.assets.*;
public class ClaymorePlanter extends WeaponPlanter {
public function ClaymorePlanter(){
super(WeaponInfo.CLAYMORE_PLANTER_ID);
animID = UNARMED;
changeWeaponSound = SoundList.CHANGE_WEAPON7;
fireSound = SoundList.PRE_DEPLOY_LIGHT;
display = Assets.lookup("ClaymoreHeld");
flashTime = 0;
}
override public function createDeployable(_arg1:int, _arg2:int):Deployable{
useDeployableAmmo();
return (new Claymore(character.owner, damage, _arg1, _arg2));
}
}
}//package boxhead.world.weapon
Section 376
//Flamer (boxhead.world.weapon.Flamer)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.world.*;
import boxhead.sounds.*;
import boxhead.world.thing.particle.*;
import boxhead.assets.*;
public class Flamer extends Weapon2h {
protected var particleWait:int;// = 0
protected static const PARTICLE_WAIT:int = 2;
private static var _muzzleOffsets:Array;
public function Flamer(){
super(WeaponInfo.FLAMER_ID);
animID = TWO_HAND;
range = 5;
fireSound = SoundList.FLAMER_START;
loopSound = SoundList.FLAMER_LOOP;
stopSound = SoundList.FLAMER_END;
changeWeaponSound = SoundList.CHANGE_WEAPON5;
display = Assets.lookup("Flamer");
backpack = Assets.lookup("FlamerBackpack");
flashTime = 0;
loopFadeTime = (0.3 * SECOND);
}
override protected function get barrelDistance():Number{
return (1);
}
override protected function get smokeDistance():Number{
return (1);
}
override protected function get shellDistance():Number{
return (1);
}
override protected function getParticles(_arg1:Shot):Array{
var _local8:Number;
var _local9:int;
var _local10:Number;
if ((((particleWait > 0)) || ((_arg1.tracers.length < 5)))){
return (null);
};
particleWait = PARTICLE_WAIT;
var _local2:Tracer = _arg1.tracers[2];
var _local3:Number = (range - barrelDistance);
var _local4:Number = Math.max(0, Math.min(_local3, (_local2.distance - barrelDistance)));
var _local5:Array = [];
var _local6 = 10;
var _local7:int;
while (_local7 < _local6) {
_local8 = (((_local7 + 0.5) * _local3) / _local6);
_local9 = Fire.LARGE;
if ((((_local7 <= (_local6 * 0.2))) || ((_local7 >= (_local6 * 0.9))))){
_local9 = Fire.SMALL;
} else {
if ((((_local7 <= (_local6 * 0.3))) || ((_local7 >= (_local6 * 0.7))))){
_local9 = Fire.MEDIUM;
};
};
_local10 = ((character.speed * (((_local6 - _local7) - 1) / _local6)) * 0.8);
_local5.push(new Fire((muzzlePosition.x + (character.dir.dx * _local8)), (muzzlePosition.y + (character.dir.dy * _local8)), (20 - (_local9 * 2)), character.dir, _local10, _local4, _local9));
if (_local8 > _local4){
break;
};
_local7++;
};
return (_local5);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-10, 7));
_muzzleOffsets.push(new Point(-10, 7));
_muzzleOffsets.push(new Point(-10, 7));
_muzzleOffsets.push(new Point(-10, 6));
_muzzleOffsets.push(new Point(-9, 6));
_muzzleOffsets.push(new Point(-9, 6));
_muzzleOffsets.push(new Point(-10, 7));
_muzzleOffsets.push(new Point(-10, 7));
_muzzleOffsets.push(new Point(-30, -6));
_muzzleOffsets.push(new Point(-31, -5));
_muzzleOffsets.push(new Point(-31, -5));
_muzzleOffsets.push(new Point(-31, -5));
_muzzleOffsets.push(new Point(-30, -6));
_muzzleOffsets.push(new Point(-29, -6));
_muzzleOffsets.push(new Point(-30, -5));
_muzzleOffsets.push(new Point(-30, -5));
_muzzleOffsets.push(new Point(-31, -5));
_muzzleOffsets.push(new Point(-33, -25));
_muzzleOffsets.push(new Point(-34, -25));
_muzzleOffsets.push(new Point(-34, -24));
_muzzleOffsets.push(new Point(-33, -24));
_muzzleOffsets.push(new Point(-32, -24));
_muzzleOffsets.push(new Point(-32, -24));
_muzzleOffsets.push(new Point(-32, -24));
_muzzleOffsets.push(new Point(-33, -24));
_muzzleOffsets.push(new Point(-33, -24));
_muzzleOffsets.push(new Point(-16, -39));
_muzzleOffsets.push(new Point(-17, -39));
_muzzleOffsets.push(new Point(-16, -39));
_muzzleOffsets.push(new Point(-16, -39));
_muzzleOffsets.push(new Point(-16, -38));
_muzzleOffsets.push(new Point(-16, -38));
_muzzleOffsets.push(new Point(-16, -38));
_muzzleOffsets.push(new Point(-16, -38));
_muzzleOffsets.push(new Point(-16, -39));
_muzzleOffsets.push(new Point(11, -41));
_muzzleOffsets.push(new Point(11, -42));
_muzzleOffsets.push(new Point(11, -41));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(10, -40));
_muzzleOffsets.push(new Point(11, -41));
_muzzleOffsets.push(new Point(31, -29));
_muzzleOffsets.push(new Point(32, -29));
_muzzleOffsets.push(new Point(32, -29));
_muzzleOffsets.push(new Point(31, -28));
_muzzleOffsets.push(new Point(31, -28));
_muzzleOffsets.push(new Point(30, -29));
_muzzleOffsets.push(new Point(31, -28));
_muzzleOffsets.push(new Point(31, -28));
_muzzleOffsets.push(new Point(32, -29));
_muzzleOffsets.push(new Point(34, -10));
_muzzleOffsets.push(new Point(35, -10));
_muzzleOffsets.push(new Point(34, -10));
_muzzleOffsets.push(new Point(34, -10));
_muzzleOffsets.push(new Point(33, -10));
_muzzleOffsets.push(new Point(33, -11));
_muzzleOffsets.push(new Point(33, -10));
_muzzleOffsets.push(new Point(34, -9));
_muzzleOffsets.push(new Point(34, -10));
_muzzleOffsets.push(new Point(17, 5));
_muzzleOffsets.push(new Point(17, 5));
_muzzleOffsets.push(new Point(17, 5));
_muzzleOffsets.push(new Point(17, 5));
_muzzleOffsets.push(new Point(17, 4));
_muzzleOffsets.push(new Point(16, 4));
_muzzleOffsets.push(new Point(17, 4));
_muzzleOffsets.push(new Point(17, 5));
_muzzleOffsets.push(new Point(17, 5));
return (_muzzleOffsets);
}
override protected function getTracerLines(_arg1:Shot):Array{
return (null);
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
var _local3:Array = new Array();
_arg1 = (character.dir.radians + ((Math.random() - 0.5) * spread));
var _local4:Number = 0.3;
var _local5 = -2;
while (_local5 <= 2) {
_local3.push(new Tracer(shoulderPosition.x, shoulderPosition.y, new Direction((_arg1 + ((_local5 * 0.25) * _local4))), barrelAltitude, ((range * 0.9) - (Math.abs(_local5) * 0.7))));
_local5++;
};
return (new Shot(character, this, _arg1, _arg2, _local3));
}
override public function process(_arg1:Boolean):void{
if (particleWait > 0){
particleWait--;
};
super.process(_arg1);
}
}
}//package boxhead.world.weapon
Section 377
//GrenadeLauncher (boxhead.world.weapon.GrenadeLauncher)
package boxhead.world.weapon {
import boxhead.world.*;
import boxhead.sounds.*;
import boxhead.world.thing.projectile.*;
import boxhead.assets.*;
public class GrenadeLauncher extends WeaponThrown {
public function GrenadeLauncher(){
super(WeaponInfo.GRENADE_LAUNCHER_ID);
animID = TWO_HAND;
fireSoundList = SoundList.GRENADE_LAUNCHER_FIRE_LIST;
reloadSound = SoundList.GRENADE_LAUNCHER_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON3;
display = Assets.lookup("GrenadeLauncher");
flashTime = 0;
}
override protected function getFireParam():int{
var _local1:Number = ((Math.min(0.9, (0.4 + (0.02 * charge))) * range) / 10);
return (((character.speed + _local1) * 100));
}
override protected function get smokeDistance():Number{
return (0.85);
}
override protected function get shellDistance():Number{
return (0.8);
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
_arg1 = (character.dir.radians + ((Math.random() - 0.5) * spread));
return (new Shot(character, this, _arg1, _arg2, null, new LaunchGrenade(character.owner, damage, shoulderPosition.x, shoulderPosition.y, new Direction(_arg1), (_arg2 / 100), ((_arg2 + 20) * 0.2), barrelDistance)));
}
override protected function get barrelDistance():Number{
return (0.8);
}
override protected function get sideDistance():Number{
return (0.3);
}
override protected function getScreenShake():ScreenShake{
return (new ScreenShake(muzzlePosition, 0.4, 400));
}
}
}//package boxhead.world.weapon
Section 378
//GrenadeThrower (boxhead.world.weapon.GrenadeThrower)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.projectile.*;
import boxhead.assets.*;
public class GrenadeThrower extends WeaponThrown {
public function GrenadeThrower(){
super(WeaponInfo.GRENADE_THROWER_ID);
animID = UNARMED;
fireSound = SoundList.GRENADE_PULL_PIN;
changeWeaponSound = SoundList.CHANGE_WEAPON4;
display = Assets.lookup("Grenade");
flashTime = 0;
}
override protected function getFireParam():int{
var _local1:Number = ((Math.min(0.5, (0.2 + (0.02 * charge))) * range) / 5);
return (((character.speed + _local1) * 100));
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
return (new Shot(character, this, _arg1, _arg2, null, new Grenade(character.owner, damage, shoulderPosition.x, shoulderPosition.y, character.dir, (_arg2 / 100), ((_arg2 + 20) * 0.2), barrelDistance)));
}
}
}//package boxhead.world.weapon
Section 379
//M16 (boxhead.world.weapon.M16)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class M16 extends Weapon2h {
private static var _muzzleOffsets:Array;
public function M16(){
super(WeaponInfo.M16_ID);
animID = TWO_HAND;
fireSoundList = SoundList.M16_FIRE_LIST;
reloadSound = SoundList.M16_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON2;
display = Assets.lookup("M16");
muzzleFlashes = [Assets.lookup("MuzzleFlashLarge1"), Assets.lookup("MuzzleFlashLarge2")];
flashTime = (0.1 * SECOND);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, 9));
_muzzleOffsets.push(new Point(-10, 10));
_muzzleOffsets.push(new Point(-10, 10));
_muzzleOffsets.push(new Point(-10, 9));
_muzzleOffsets.push(new Point(-9, 8));
_muzzleOffsets.push(new Point(-9, 8));
_muzzleOffsets.push(new Point(-9, 9));
_muzzleOffsets.push(new Point(-9, 9));
_muzzleOffsets.push(new Point(-10, 9));
_muzzleOffsets.push(new Point(-33, -4));
_muzzleOffsets.push(new Point(-34, -3));
_muzzleOffsets.push(new Point(-34, -3));
_muzzleOffsets.push(new Point(-33, -4));
_muzzleOffsets.push(new Point(-33, -4));
_muzzleOffsets.push(new Point(-32, -4));
_muzzleOffsets.push(new Point(-32, -4));
_muzzleOffsets.push(new Point(-33, -3));
_muzzleOffsets.push(new Point(-33, -3));
_muzzleOffsets.push(new Point(-37, -25));
_muzzleOffsets.push(new Point(-38, -25));
_muzzleOffsets.push(new Point(-37, -24));
_muzzleOffsets.push(new Point(-37, -24));
_muzzleOffsets.push(new Point(-36, -25));
_muzzleOffsets.push(new Point(-36, -24));
_muzzleOffsets.push(new Point(-36, -24));
_muzzleOffsets.push(new Point(-37, -24));
_muzzleOffsets.push(new Point(-37, -24));
_muzzleOffsets.push(new Point(-19, -41));
_muzzleOffsets.push(new Point(-19, -42));
_muzzleOffsets.push(new Point(-19, -41));
_muzzleOffsets.push(new Point(-19, -41));
_muzzleOffsets.push(new Point(-19, -41));
_muzzleOffsets.push(new Point(-19, -40));
_muzzleOffsets.push(new Point(-19, -40));
_muzzleOffsets.push(new Point(-19, -41));
_muzzleOffsets.push(new Point(-19, -41));
_muzzleOffsets.push(new Point(11, -44));
_muzzleOffsets.push(new Point(11, -45));
_muzzleOffsets.push(new Point(11, -44));
_muzzleOffsets.push(new Point(11, -43));
_muzzleOffsets.push(new Point(10, -43));
_muzzleOffsets.push(new Point(10, -43));
_muzzleOffsets.push(new Point(10, -43));
_muzzleOffsets.push(new Point(10, -43));
_muzzleOffsets.push(new Point(10, -44));
_muzzleOffsets.push(new Point(34, -31));
_muzzleOffsets.push(new Point(35, -32));
_muzzleOffsets.push(new Point(34, -31));
_muzzleOffsets.push(new Point(34, -31));
_muzzleOffsets.push(new Point(33, -31));
_muzzleOffsets.push(new Point(33, -31));
_muzzleOffsets.push(new Point(33, -31));
_muzzleOffsets.push(new Point(34, -31));
_muzzleOffsets.push(new Point(34, -31));
_muzzleOffsets.push(new Point(38, -10));
_muzzleOffsets.push(new Point(39, -10));
_muzzleOffsets.push(new Point(38, -10));
_muzzleOffsets.push(new Point(38, -10));
_muzzleOffsets.push(new Point(37, -11));
_muzzleOffsets.push(new Point(37, -11));
_muzzleOffsets.push(new Point(37, -11));
_muzzleOffsets.push(new Point(38, -10));
_muzzleOffsets.push(new Point(38, -10));
_muzzleOffsets.push(new Point(20, 6));
_muzzleOffsets.push(new Point(20, 7));
_muzzleOffsets.push(new Point(20, 7));
_muzzleOffsets.push(new Point(20, 7));
_muzzleOffsets.push(new Point(19, 6));
_muzzleOffsets.push(new Point(19, 5));
_muzzleOffsets.push(new Point(19, 6));
_muzzleOffsets.push(new Point(20, 7));
_muzzleOffsets.push(new Point(20, 7));
return (_muzzleOffsets);
}
override protected function get barrelDistance():Number{
return (0.9);
}
override protected function get smokeDistance():Number{
return (0.95);
}
override protected function get shellDistance():Number{
return (0.15);
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 30));
}
}
}//package boxhead.world.weapon
Section 380
//Magnum (boxhead.world.weapon.Magnum)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class Magnum extends Weapon1h {
private static var _muzzleOffsets:Array;
public function Magnum(){
super(WeaponInfo.MAGNUM_ID);
animID = ONE_HAND;
fireSoundList = SoundList.MAGNUM_FIRE_LIST;
reloadSound = SoundList.MAGNUM_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON1;
display = Assets.lookup("Magnum");
muzzleFlashes = [Assets.lookup("MuzzleFlashSmall1"), Assets.lookup("MuzzleFlashSmall2")];
flashTime = (0.1 * SECOND);
}
override protected function get smokeSize():Number{
return (2);
}
override protected function get smokeDistance():Number{
return (1.05);
}
override protected function get shellDistance():Number{
return (0.5);
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 10));
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, 4));
_muzzleOffsets.push(new Point(-10, 5));
_muzzleOffsets.push(new Point(-10, 5));
_muzzleOffsets.push(new Point(-10, 5));
_muzzleOffsets.push(new Point(-10, 4));
_muzzleOffsets.push(new Point(-10, 4));
_muzzleOffsets.push(new Point(-10, 4));
_muzzleOffsets.push(new Point(-10, 5));
_muzzleOffsets.push(new Point(-10, 5));
_muzzleOffsets.push(new Point(-35, -9));
_muzzleOffsets.push(new Point(-36, -8));
_muzzleOffsets.push(new Point(-36, -8));
_muzzleOffsets.push(new Point(-35, -8));
_muzzleOffsets.push(new Point(-35, -9));
_muzzleOffsets.push(new Point(-35, -9));
_muzzleOffsets.push(new Point(-35, -9));
_muzzleOffsets.push(new Point(-35, -8));
_muzzleOffsets.push(new Point(-36, -8));
_muzzleOffsets.push(new Point(-39, -31));
_muzzleOffsets.push(new Point(-41, -31));
_muzzleOffsets.push(new Point(-40, -31));
_muzzleOffsets.push(new Point(-40, -31));
_muzzleOffsets.push(new Point(-39, -31));
_muzzleOffsets.push(new Point(-39, -31));
_muzzleOffsets.push(new Point(-39, -31));
_muzzleOffsets.push(new Point(-40, -31));
_muzzleOffsets.push(new Point(-40, -31));
_muzzleOffsets.push(new Point(-20, -48));
_muzzleOffsets.push(new Point(-21, -49));
_muzzleOffsets.push(new Point(-21, -49));
_muzzleOffsets.push(new Point(-21, -49));
_muzzleOffsets.push(new Point(-20, -49));
_muzzleOffsets.push(new Point(-20, -49));
_muzzleOffsets.push(new Point(-20, -49));
_muzzleOffsets.push(new Point(-21, -49));
_muzzleOffsets.push(new Point(-21, -49));
_muzzleOffsets.push(new Point(11, -51));
_muzzleOffsets.push(new Point(10, -53));
_muzzleOffsets.push(new Point(11, -52));
_muzzleOffsets.push(new Point(11, -52));
_muzzleOffsets.push(new Point(11, -52));
_muzzleOffsets.push(new Point(11, -52));
_muzzleOffsets.push(new Point(11, -52));
_muzzleOffsets.push(new Point(11, -52));
_muzzleOffsets.push(new Point(11, -52));
_muzzleOffsets.push(new Point(35, -38));
_muzzleOffsets.push(new Point(36, -39));
_muzzleOffsets.push(new Point(36, -39));
_muzzleOffsets.push(new Point(36, -38));
_muzzleOffsets.push(new Point(36, -39));
_muzzleOffsets.push(new Point(36, -39));
_muzzleOffsets.push(new Point(36, -39));
_muzzleOffsets.push(new Point(36, -38));
_muzzleOffsets.push(new Point(36, -39));
_muzzleOffsets.push(new Point(40, -16));
_muzzleOffsets.push(new Point(41, -17));
_muzzleOffsets.push(new Point(41, -16));
_muzzleOffsets.push(new Point(41, -16));
_muzzleOffsets.push(new Point(40, -16));
_muzzleOffsets.push(new Point(40, -17));
_muzzleOffsets.push(new Point(40, -16));
_muzzleOffsets.push(new Point(41, -16));
_muzzleOffsets.push(new Point(41, -16));
_muzzleOffsets.push(new Point(21, 1));
_muzzleOffsets.push(new Point(22, 2));
_muzzleOffsets.push(new Point(22, 2));
_muzzleOffsets.push(new Point(21, 2));
_muzzleOffsets.push(new Point(21, 1));
_muzzleOffsets.push(new Point(21, 1));
_muzzleOffsets.push(new Point(21, 1));
_muzzleOffsets.push(new Point(21, 2));
_muzzleOffsets.push(new Point(22, 2));
return (_muzzleOffsets);
}
override protected function get barrelDistance():Number{
return (1);
}
}
}//package boxhead.world.weapon
Section 381
//Minigun (boxhead.world.weapon.Minigun)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.world.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class Minigun extends Weapon2h {
protected var spin:Number;// = 0
protected var spinSpeed:Number;// = 0
protected var chamber:int;
private static var _muzzleOffsets:Array;
protected static var displays:Array;
protected static var chamberOffsets:Array;
public function Minigun(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
super(WeaponInfo.MINIGUN_ID);
animID = TWO_HAND;
loopSound = SoundList.MINIGUN_LOOP;
stopSound = SoundList.MINIGUN_STOP;
changeWeaponSound = SoundList.CHANGE_WEAPON4;
display = displays[0];
muzzleFlashes = [Assets.lookup("MuzzleFlashLarge1"), Assets.lookup("MuzzleFlashLarge2")];
flashTime = (0.1 * SECOND);
chamber = 0;
if (!chamberOffsets){
chamberOffsets = new Array();
_local1 = 2;
_local2 = 1;
_local3 = int((_local1 * 0.86));
_local4 = int(((_local1 * 0.5) * 0.86));
chamberOffsets[Direction.S.index] = [new Point(0, -(_local1)), new Point(_local3, -(_local4)), new Point(_local3, _local4), new Point(0, _local1), new Point(-(_local3), _local4), new Point(-(_local3), -(_local4))];
chamberOffsets[Direction.N.index] = [new Point(0, -(_local1)), new Point(-(_local3), -(_local4)), new Point(-(_local3), _local4), new Point(0, _local1), new Point(_local3, _local4), new Point(_local3, -(_local4))];
_local4 = int((_local1 * 0.5));
chamberOffsets[Direction.E.index] = [new Point(0, -(_local1)), new Point(0, -(_local4)), new Point(0, _local4), new Point(0, _local1), new Point(0, _local4), new Point(0, -(_local4))];
chamberOffsets[Direction.W.index] = [new Point(0, -(_local1)), new Point(0, -(_local4)), new Point(0, _local4), new Point(0, _local1), new Point(0, _local4), new Point(0, -(_local4))];
_local3 = int(((_local1 * 0.86) * Math.sqrt(0.5)));
_local4 = int(((_local1 * 0.5) * 0.86));
chamberOffsets[Direction.SW.index] = [new Point(0, -(_local1)), new Point(_local3, (-(_local4) + _local2)), new Point(_local3, (_local4 + _local2)), new Point(0, _local1), new Point(-(_local3), (_local4 - _local2)), new Point(-(_local3), (-(_local4) - _local2))];
chamberOffsets[Direction.SE.index] = [new Point(0, -(_local1)), new Point(_local3, (-(_local4) - _local2)), new Point(_local3, (_local4 - _local2)), new Point(0, _local1), new Point(-(_local3), (_local4 + _local2)), new Point(-(_local3), (-(_local4) + _local2))];
chamberOffsets[Direction.NW.index] = [new Point(0, -(_local1)), new Point(-(_local3), (-(_local4) + _local2)), new Point(-(_local3), (_local4 + _local2)), new Point(0, _local1), new Point(_local3, (_local4 - _local2)), new Point(_local3, (-(_local4) - _local2))];
chamberOffsets[Direction.NE.index] = [new Point(0, -(_local1)), new Point(-(_local3), (-(_local4) - _local2)), new Point(-(_local3), (_local4 - _local2)), new Point(0, _local1), new Point(_local3, (_local4 + _local2)), new Point(_local3, (-(_local4) + _local2))];
};
}
override protected function get barrelAltitude():Number{
return (20);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, 0));
_muzzleOffsets.push(new Point(-10, 1));
_muzzleOffsets.push(new Point(-10, 1));
_muzzleOffsets.push(new Point(-10, 0));
_muzzleOffsets.push(new Point(-10, 0));
_muzzleOffsets.push(new Point(-10, -1));
_muzzleOffsets.push(new Point(-10, 0));
_muzzleOffsets.push(new Point(-10, 1));
_muzzleOffsets.push(new Point(-10, 1));
_muzzleOffsets.push(new Point(-26, -11));
_muzzleOffsets.push(new Point(-27, -10));
_muzzleOffsets.push(new Point(-27, -10));
_muzzleOffsets.push(new Point(-26, -11));
_muzzleOffsets.push(new Point(-26, -11));
_muzzleOffsets.push(new Point(-25, -11));
_muzzleOffsets.push(new Point(-25, -11));
_muzzleOffsets.push(new Point(-26, -10));
_muzzleOffsets.push(new Point(-26, -10));
_muzzleOffsets.push(new Point(-27, -27));
_muzzleOffsets.push(new Point(-28, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-26, -26));
_muzzleOffsets.push(new Point(-26, -26));
_muzzleOffsets.push(new Point(-26, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-11, -38));
_muzzleOffsets.push(new Point(-12, -38));
_muzzleOffsets.push(new Point(-12, -38));
_muzzleOffsets.push(new Point(-11, -37));
_muzzleOffsets.push(new Point(-11, -37));
_muzzleOffsets.push(new Point(-11, -37));
_muzzleOffsets.push(new Point(-11, -37));
_muzzleOffsets.push(new Point(-11, -37));
_muzzleOffsets.push(new Point(-12, -38));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(11, -38));
_muzzleOffsets.push(new Point(27, -27));
_muzzleOffsets.push(new Point(28, -28));
_muzzleOffsets.push(new Point(27, -27));
_muzzleOffsets.push(new Point(27, -27));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(27, -27));
_muzzleOffsets.push(new Point(27, -27));
_muzzleOffsets.push(new Point(28, -12));
_muzzleOffsets.push(new Point(29, -12));
_muzzleOffsets.push(new Point(28, -11));
_muzzleOffsets.push(new Point(27, -11));
_muzzleOffsets.push(new Point(27, -12));
_muzzleOffsets.push(new Point(26, -12));
_muzzleOffsets.push(new Point(27, -12));
_muzzleOffsets.push(new Point(27, -11));
_muzzleOffsets.push(new Point(28, -12));
_muzzleOffsets.push(new Point(12, 0));
_muzzleOffsets.push(new Point(13, 0));
_muzzleOffsets.push(new Point(13, 0));
_muzzleOffsets.push(new Point(12, 0));
_muzzleOffsets.push(new Point(12, -1));
_muzzleOffsets.push(new Point(12, -1));
_muzzleOffsets.push(new Point(12, -1));
_muzzleOffsets.push(new Point(12, 0));
_muzzleOffsets.push(new Point(12, 0));
return (_muzzleOffsets);
}
override protected function get shellDistance():Number{
return (0.1);
}
override public function process(_arg1:Boolean):void{
super.process(_arg1);
spin = ((spin + spinSpeed) % 2);
spinSpeed = Math.max(0, (spinSpeed - 0.2));
display = displays[int(spin)];
}
override protected function get smokeSize():Number{
return (4);
}
override public function getMuzzleOffset(_arg1:int):Point{
var _local2:int = int((_arg1 / 9));
return (chamberOffsets[_local2][chamber].add(muzzleOffsets[_arg1]));
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 30));
}
override protected function reload():void{
super.reload();
chamber = (((chamber + 2) + (chamber % 2)) % 6);
spinSpeed = 1;
}
public static function prerender():void{
displays = [Assets.lookup("Minigun"), Assets.lookup("MinigunSpin")];
}
}
}//package boxhead.world.weapon
Section 382
//Pistol (boxhead.world.weapon.Pistol)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class Pistol extends Weapon1h {
private static var _muzzleOffsets:Array;
public function Pistol(){
super(WeaponInfo.PISTOL_ID);
animID = ONE_HAND;
fireSoundList = SoundList.PISTOL_FIRE_LIST;
reloadSound = SoundList.PISTOL_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON1;
reloadSoundDelay = 200;
display = Assets.lookup("Pistol");
muzzleFlashes = [Assets.lookup("MuzzleFlashSmall1"), Assets.lookup("MuzzleFlashSmall2")];
flashTime = (0.1 * SECOND);
}
override protected function get smokeSize():Number{
return (2);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-10, -5));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-10, -4));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-25, -15));
_muzzleOffsets.push(new Point(-25, -14));
_muzzleOffsets.push(new Point(-24, -14));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-24, -15));
_muzzleOffsets.push(new Point(-24, -14));
_muzzleOffsets.push(new Point(-25, -14));
_muzzleOffsets.push(new Point(-24, -29));
_muzzleOffsets.push(new Point(-25, -30));
_muzzleOffsets.push(new Point(-25, -29));
_muzzleOffsets.push(new Point(-25, -29));
_muzzleOffsets.push(new Point(-24, -29));
_muzzleOffsets.push(new Point(-24, -30));
_muzzleOffsets.push(new Point(-24, -29));
_muzzleOffsets.push(new Point(-25, -29));
_muzzleOffsets.push(new Point(-25, -29));
_muzzleOffsets.push(new Point(-10, -39));
_muzzleOffsets.push(new Point(-11, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -39));
_muzzleOffsets.push(new Point(-10, -39));
_muzzleOffsets.push(new Point(-10, -39));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(-10, -40));
_muzzleOffsets.push(new Point(10, -39));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -39));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(11, -40));
_muzzleOffsets.push(new Point(25, -29));
_muzzleOffsets.push(new Point(26, -30));
_muzzleOffsets.push(new Point(26, -30));
_muzzleOffsets.push(new Point(25, -29));
_muzzleOffsets.push(new Point(25, -29));
_muzzleOffsets.push(new Point(25, -30));
_muzzleOffsets.push(new Point(25, -29));
_muzzleOffsets.push(new Point(25, -29));
_muzzleOffsets.push(new Point(26, -30));
_muzzleOffsets.push(new Point(24, -15));
_muzzleOffsets.push(new Point(26, -15));
_muzzleOffsets.push(new Point(26, -15));
_muzzleOffsets.push(new Point(25, -14));
_muzzleOffsets.push(new Point(25, -15));
_muzzleOffsets.push(new Point(25, -15));
_muzzleOffsets.push(new Point(25, -15));
_muzzleOffsets.push(new Point(25, -15));
_muzzleOffsets.push(new Point(26, -15));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(11, -4));
_muzzleOffsets.push(new Point(11, -4));
_muzzleOffsets.push(new Point(11, -4));
_muzzleOffsets.push(new Point(11, -5));
_muzzleOffsets.push(new Point(10, -5));
_muzzleOffsets.push(new Point(11, -5));
_muzzleOffsets.push(new Point(11, -4));
_muzzleOffsets.push(new Point(11, -4));
return (_muzzleOffsets);
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 10));
}
}
}//package boxhead.world.weapon
Section 383
//PlasmaCannon (boxhead.world.weapon.PlasmaCannon)
package boxhead.world.weapon {
import boxhead.world.*;
import boxhead.sounds.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.projectile.*;
import boxhead.assets.*;
import boxhead.options.*;
public class PlasmaCannon extends Weapon2h {
protected var lightTime:int;// = 0
protected static var displays:Array;
public function PlasmaCannon(){
super(WeaponInfo.PLASMA_CANNON_ID);
animID = TWO_HAND;
fireSoundList = SoundList.PLASMA_CANNON_FIRE_LIST;
reloadSound = SoundList.PLASMA_CANNON_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON3;
display = Assets.lookup("PlasmaCannon");
flashTime = (0.1 * SECOND);
}
override protected function get smokeDistance():Number{
return (0);
}
override protected function get shellDistance():Number{
return (0.35);
}
override protected function getScreenShake():ScreenShake{
return (new ScreenShake(muzzlePosition, 0.5, 400));
}
override public function process(_arg1:Boolean):void{
super.process(_arg1);
if (lightTime > 0){
lightTime--;
if (lightTime <= 0){
display = displays[0];
};
};
}
override protected function get smokeSize():Number{
return (1.6);
}
override protected function fire():void{
display = displays[1];
lightTime = (flashTime - 1);
super.fire();
}
override protected function getParticles(_arg1:Shot):Array{
if (!Preferences.smoke){
return (null);
};
return ([new Smoke((shoulderPosition.x + (character.dir.dx * smokeDistance)), (shoulderPosition.y + (character.dir.dy * smokeDistance)), character.dir.radians, smokeSize, smokeSize, (barrelAltitude + 7))]);
}
override protected function reload():void{
display = displays[1];
}
override protected function get barrelDistance():Number{
return (0.7);
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
_arg1 = (character.dir.radians + ((Math.random() - 0.5) * spread));
return (new Shot(character, this, _arg1, _arg2, null, new PlasmaBall(character.owner, damage, shoulderPosition.x, shoulderPosition.y, new Direction(_arg1), barrelAltitude, barrelDistance)));
}
public static function prerender():void{
displays = [Assets.lookup("PlasmaCannon"), Assets.lookup("PlasmaCannonLit")];
}
}
}//package boxhead.world.weapon
Section 384
//Railgun (boxhead.world.weapon.Railgun)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.world.*;
import boxhead.sounds.*;
import boxhead.world.thing.*;
import boxhead.assets.*;
public class Railgun extends Weapon1h {
protected var lightTime:int;// = 0
protected static var displays:Array;
private static var _muzzleOffsets:Array;
public function Railgun(){
super(WeaponInfo.RAILGUN_ID);
animID = ONE_HAND;
fireSoundList = SoundList.RAILGUN_FIRE_LIST;
reloadSound = SoundList.RAILGUN_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON1;
display = displays[1];
muzzleFlashes = [Assets.lookup("MuzzleFlashRailgun")];
flashTime = (0.1 * SECOND);
}
override protected function get smokeSize():Number{
return (3);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, 2));
_muzzleOffsets.push(new Point(-10, 3));
_muzzleOffsets.push(new Point(-10, 3));
_muzzleOffsets.push(new Point(-10, 3));
_muzzleOffsets.push(new Point(-10, 3));
_muzzleOffsets.push(new Point(-10, 2));
_muzzleOffsets.push(new Point(-10, 3));
_muzzleOffsets.push(new Point(-10, 3));
_muzzleOffsets.push(new Point(-10, 3));
_muzzleOffsets.push(new Point(-32, -10));
_muzzleOffsets.push(new Point(-33, -10));
_muzzleOffsets.push(new Point(-33, -10));
_muzzleOffsets.push(new Point(-33, -10));
_muzzleOffsets.push(new Point(-33, -10));
_muzzleOffsets.push(new Point(-32, -10));
_muzzleOffsets.push(new Point(-33, -10));
_muzzleOffsets.push(new Point(-33, -10));
_muzzleOffsets.push(new Point(-33, -10));
_muzzleOffsets.push(new Point(-36, -30));
_muzzleOffsets.push(new Point(-37, -31));
_muzzleOffsets.push(new Point(-37, -30));
_muzzleOffsets.push(new Point(-37, -30));
_muzzleOffsets.push(new Point(-36, -31));
_muzzleOffsets.push(new Point(-36, -31));
_muzzleOffsets.push(new Point(-36, -31));
_muzzleOffsets.push(new Point(-37, -30));
_muzzleOffsets.push(new Point(-37, -30));
_muzzleOffsets.push(new Point(-18, -46));
_muzzleOffsets.push(new Point(-19, -47));
_muzzleOffsets.push(new Point(-19, -47));
_muzzleOffsets.push(new Point(-18, -47));
_muzzleOffsets.push(new Point(-18, -47));
_muzzleOffsets.push(new Point(-18, -47));
_muzzleOffsets.push(new Point(-18, -47));
_muzzleOffsets.push(new Point(-18, -47));
_muzzleOffsets.push(new Point(-19, -47));
_muzzleOffsets.push(new Point(11, -49));
_muzzleOffsets.push(new Point(10, -50));
_muzzleOffsets.push(new Point(11, -50));
_muzzleOffsets.push(new Point(11, -49));
_muzzleOffsets.push(new Point(11, -49));
_muzzleOffsets.push(new Point(11, -49));
_muzzleOffsets.push(new Point(11, -49));
_muzzleOffsets.push(new Point(11, -49));
_muzzleOffsets.push(new Point(11, -50));
_muzzleOffsets.push(new Point(33, -36));
_muzzleOffsets.push(new Point(34, -37));
_muzzleOffsets.push(new Point(34, -37));
_muzzleOffsets.push(new Point(34, -36));
_muzzleOffsets.push(new Point(33, -36));
_muzzleOffsets.push(new Point(33, -37));
_muzzleOffsets.push(new Point(33, -36));
_muzzleOffsets.push(new Point(34, -36));
_muzzleOffsets.push(new Point(34, -37));
_muzzleOffsets.push(new Point(36, -16));
_muzzleOffsets.push(new Point(38, -17));
_muzzleOffsets.push(new Point(38, -16));
_muzzleOffsets.push(new Point(37, -16));
_muzzleOffsets.push(new Point(37, -16));
_muzzleOffsets.push(new Point(37, -16));
_muzzleOffsets.push(new Point(37, -16));
_muzzleOffsets.push(new Point(37, -16));
_muzzleOffsets.push(new Point(38, -16));
_muzzleOffsets.push(new Point(19, 0));
_muzzleOffsets.push(new Point(20, 0));
_muzzleOffsets.push(new Point(20, 1));
_muzzleOffsets.push(new Point(19, 1));
_muzzleOffsets.push(new Point(19, 0));
_muzzleOffsets.push(new Point(19, 0));
_muzzleOffsets.push(new Point(19, 0));
_muzzleOffsets.push(new Point(19, 1));
_muzzleOffsets.push(new Point(20, 1));
return (_muzzleOffsets);
}
override protected function lineFromTracer(_arg1:Tracer, _arg2:uint=0xFFFFFF, _arg3:Number=0.4):TracerLine{
return (super.lineFromTracer(_arg1, 7812095, 1));
}
override protected function getParticles(_arg1:Shot):Array{
if (_arg1.tracers.length == 0){
return (null);
};
return (smokeTrail(_arg1.tracers[0], (barrelAltitude + 2)));
}
override protected function get barrelAltitude():Number{
return (23);
}
override protected function reload():void{
display = displays[1];
}
override public function get penetrates():Boolean{
return (true);
}
override protected function fire():void{
display = displays[1];
lightTime = (flashTime - 1);
super.fire();
}
override public function process(_arg1:Boolean):void{
super.process(_arg1);
if (lightTime > 0){
lightTime--;
if (lightTime <= 0){
display = displays[0];
};
};
}
public static function prerender():void{
displays = [Assets.lookup("Railgun"), Assets.lookup("RailgunLit")];
}
}
}//package boxhead.world.weapon
Section 385
//Rifle (boxhead.world.weapon.Rifle)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class Rifle extends Weapon2h {
private static var _muzzleOffsets:Array;
public function Rifle(){
super(WeaponInfo.RIFLE_ID);
animID = TWO_HAND;
fireSoundList = SoundList.RIFLE_FIRE_LIST;
reloadSound = SoundList.RIFLE_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON2;
display = Assets.lookup("Rifle");
muzzleFlashes = [Assets.lookup("MuzzleFlashLarge1"), Assets.lookup("MuzzleFlashLarge2")];
flashTime = (0.1 * SECOND);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-10, 12));
_muzzleOffsets.push(new Point(-10, 13));
_muzzleOffsets.push(new Point(-10, 12));
_muzzleOffsets.push(new Point(-10, 12));
_muzzleOffsets.push(new Point(-9, 11));
_muzzleOffsets.push(new Point(-9, 11));
_muzzleOffsets.push(new Point(-9, 11));
_muzzleOffsets.push(new Point(-9, 12));
_muzzleOffsets.push(new Point(-9, 12));
_muzzleOffsets.push(new Point(-36, -2));
_muzzleOffsets.push(new Point(-37, -1));
_muzzleOffsets.push(new Point(-36, -1));
_muzzleOffsets.push(new Point(-36, -2));
_muzzleOffsets.push(new Point(-35, -2));
_muzzleOffsets.push(new Point(-35, -2));
_muzzleOffsets.push(new Point(-35, -2));
_muzzleOffsets.push(new Point(-36, -1));
_muzzleOffsets.push(new Point(-36, -1));
_muzzleOffsets.push(new Point(-41, -25));
_muzzleOffsets.push(new Point(-42, -25));
_muzzleOffsets.push(new Point(-42, -24));
_muzzleOffsets.push(new Point(-41, -24));
_muzzleOffsets.push(new Point(-40, -24));
_muzzleOffsets.push(new Point(-40, -24));
_muzzleOffsets.push(new Point(-40, -24));
_muzzleOffsets.push(new Point(-41, -24));
_muzzleOffsets.push(new Point(-41, -24));
_muzzleOffsets.push(new Point(-22, -43));
_muzzleOffsets.push(new Point(-22, -44));
_muzzleOffsets.push(new Point(-22, -43));
_muzzleOffsets.push(new Point(-22, -43));
_muzzleOffsets.push(new Point(-21, -43));
_muzzleOffsets.push(new Point(-22, -42));
_muzzleOffsets.push(new Point(-22, -42));
_muzzleOffsets.push(new Point(-22, -42));
_muzzleOffsets.push(new Point(-22, -43));
_muzzleOffsets.push(new Point(10, -47));
_muzzleOffsets.push(new Point(10, -47));
_muzzleOffsets.push(new Point(10, -47));
_muzzleOffsets.push(new Point(10, -46));
_muzzleOffsets.push(new Point(10, -46));
_muzzleOffsets.push(new Point(10, -46));
_muzzleOffsets.push(new Point(10, -46));
_muzzleOffsets.push(new Point(10, -46));
_muzzleOffsets.push(new Point(10, -47));
_muzzleOffsets.push(new Point(37, -33));
_muzzleOffsets.push(new Point(38, -34));
_muzzleOffsets.push(new Point(37, -33));
_muzzleOffsets.push(new Point(37, -33));
_muzzleOffsets.push(new Point(36, -33));
_muzzleOffsets.push(new Point(35, -33));
_muzzleOffsets.push(new Point(36, -33));
_muzzleOffsets.push(new Point(37, -33));
_muzzleOffsets.push(new Point(37, -33));
_muzzleOffsets.push(new Point(42, -11));
_muzzleOffsets.push(new Point(43, -10));
_muzzleOffsets.push(new Point(42, -10));
_muzzleOffsets.push(new Point(42, -10));
_muzzleOffsets.push(new Point(41, -11));
_muzzleOffsets.push(new Point(41, -11));
_muzzleOffsets.push(new Point(41, -11));
_muzzleOffsets.push(new Point(42, -10));
_muzzleOffsets.push(new Point(42, -10));
_muzzleOffsets.push(new Point(23, 8));
_muzzleOffsets.push(new Point(23, 9));
_muzzleOffsets.push(new Point(23, 9));
_muzzleOffsets.push(new Point(23, 8));
_muzzleOffsets.push(new Point(22, 8));
_muzzleOffsets.push(new Point(22, 7));
_muzzleOffsets.push(new Point(22, 8));
_muzzleOffsets.push(new Point(23, 9));
_muzzleOffsets.push(new Point(23, 8));
return (_muzzleOffsets);
}
override protected function get barrelDistance():Number{
return (1);
}
override protected function get smokeDistance():Number{
return (1.05);
}
override protected function get shellDistance():Number{
return (0.2);
}
override protected function getParticles(_arg1:Shot):Array{
return (smokeAndShell(_arg1, 30));
}
}
}//package boxhead.world.weapon
Section 386
//Shot (boxhead.world.weapon.Shot)
package boxhead.world.weapon {
import boxhead.world.thing.*;
import boxhead.world.thing.projectile.*;
public class Shot {
public var tracers:Array;
public var projectile:Projectile;
public var angle:Number;
public var particles:Array;
public var fireParam:int;
public var tracerLines:Array;
public var source:HasOwner;
public var weapon:Weapon;
public function Shot(_arg1:HasOwner, _arg2:Weapon=null, _arg3:Number=0, _arg4:int=0, _arg5:Array=null, _arg6:Projectile=null){
this.source = _arg1;
this.weapon = _arg2;
this.angle = _arg3;
this.fireParam = _arg4;
this.tracers = ((_arg5) || ([]));
this.projectile = _arg6;
}
}
}//package boxhead.world.weapon
Section 387
//ShotEffects (boxhead.world.weapon.ShotEffects)
package boxhead.world.weapon {
import boxhead.world.*;
public class ShotEffects {
public var tracerLines:Array;
public var screenShake:ScreenShake;
public var shot:Shot;
public var particles:Array;
public function ShotEffects(_arg1:Shot){
this.shot = _arg1;
}
}
}//package boxhead.world.weapon
Section 388
//Shotgun (boxhead.world.weapon.Shotgun)
package boxhead.world.weapon {
import flash.geom.*;
import boxhead.world.*;
import boxhead.sounds.*;
import boxhead.assets.*;
public class Shotgun extends Weapon2h {
private static var _muzzleOffsets:Array;
public function Shotgun(){
super(WeaponInfo.SHOTGUN_ID);
animID = TWO_HAND;
fireSoundList = SoundList.SHOTGUN_FIRE_LIST;
reloadSound = SoundList.SHOGUN_RELOAD;
changeWeaponSound = SoundList.CHANGE_WEAPON2;
display = Assets.lookup("Shotgun");
muzzleFlashes = [Assets.lookup("MuzzleFlashLarge1"), Assets.lookup("MuzzleFlashLarge2")];
flashTime = (0.1 * SECOND);
}
override protected function getMuzzleOffsets():Array{
if (_muzzleOffsets){
return (_muzzleOffsets);
};
_muzzleOffsets = new Array();
_muzzleOffsets.push(new Point(-11, 0));
_muzzleOffsets.push(new Point(-11, 0));
_muzzleOffsets.push(new Point(-11, 0));
_muzzleOffsets.push(new Point(-11, 0));
_muzzleOffsets.push(new Point(-11, -1));
_muzzleOffsets.push(new Point(-11, -1));
_muzzleOffsets.push(new Point(-11, 0));
_muzzleOffsets.push(new Point(-11, 0));
_muzzleOffsets.push(new Point(-11, 0));
_muzzleOffsets.push(new Point(-27, -11));
_muzzleOffsets.push(new Point(-28, -10));
_muzzleOffsets.push(new Point(-27, -10));
_muzzleOffsets.push(new Point(-27, -11));
_muzzleOffsets.push(new Point(-26, -11));
_muzzleOffsets.push(new Point(-26, -11));
_muzzleOffsets.push(new Point(-26, -11));
_muzzleOffsets.push(new Point(-27, -10));
_muzzleOffsets.push(new Point(-27, -11));
_muzzleOffsets.push(new Point(-27, -27));
_muzzleOffsets.push(new Point(-28, -27));
_muzzleOffsets.push(new Point(-28, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-26, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-27, -26));
_muzzleOffsets.push(new Point(-28, -26));
_muzzleOffsets.push(new Point(-12, -38));
_muzzleOffsets.push(new Point(-13, -38));
_muzzleOffsets.push(new Point(-12, -38));
_muzzleOffsets.push(new Point(-12, -37));
_muzzleOffsets.push(new Point(-12, -37));
_muzzleOffsets.push(new Point(-12, -37));
_muzzleOffsets.push(new Point(-12, -37));
_muzzleOffsets.push(new Point(-12, -37));
_muzzleOffsets.push(new Point(-12, -37));
_muzzleOffsets.push(new Point(10, -38));
_muzzleOffsets.push(new Point(10, -39));
_muzzleOffsets.push(new Point(10, -38));
_muzzleOffsets.push(new Point(10, -37));
_muzzleOffsets.push(new Point(10, -37));
_muzzleOffsets.push(new Point(9, -37));
_muzzleOffsets.push(new Point(10, -37));
_muzzleOffsets.push(new Point(10, -37));
_muzzleOffsets.push(new Point(10, -38));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(25, -27));
_muzzleOffsets.push(new Point(25, -27));
_muzzleOffsets.push(new Point(25, -27));
_muzzleOffsets.push(new Point(26, -26));
_muzzleOffsets.push(new Point(26, -27));
_muzzleOffsets.push(new Point(26, -12));
_muzzleOffsets.push(new Point(27, -12));
_muzzleOffsets.push(new Point(27, -11));
_muzzleOffsets.push(new Point(26, -11));
_muzzleOffsets.push(new Point(25, -12));
_muzzleOffsets.push(new Point(25, -12));
_muzzleOffsets.push(new Point(25, -11));
_muzzleOffsets.push(new Point(26, -11));
_muzzleOffsets.push(new Point(26, -11));
_muzzleOffsets.push(new Point(11, 0));
_muzzleOffsets.push(new Point(11, 0));
_muzzleOffsets.push(new Point(11, 0));
_muzzleOffsets.push(new Point(11, 0));
_muzzleOffsets.push(new Point(10, -1));
_muzzleOffsets.push(new Point(10, -1));
_muzzleOffsets.push(new Point(11, -1));
_muzzleOffsets.push(new Point(11, 0));
_muzzleOffsets.push(new Point(11, 0));
return (_muzzleOffsets);
}
override protected function getFireParam():int{
var _local4:int;
var _local1:int;
var _local2:Array = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var _local3 = 1;
while (_local3 <= 10000) {
_local4 = int((Math.random() * _local2.length));
_local1 = (_local1 + (_local3 * _local2[_local4]));
_local2.splice(_local3, 1);
_local3 = (_local3 * 10);
};
return (_local1);
}
override protected function get shellDistance():Number{
return (0.05);
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
var _local6:String;
var _local7:Number;
var _local3:Array = new Array();
var _local4:String = ("" + _arg2);
var _local5:int;
while (_local5 < 5) {
_local6 = _local4.charAt(_local5);
_local7 = ((parseInt(_local6) - 4) / 8);
_local3.push(new Tracer(shoulderPosition.x, shoulderPosition.y, new Direction((character.dir.radians + (_local7 * spread))), barrelAltitude, range));
_local5++;
};
return (new Shot(character, this, _arg1, _arg2, _local3));
}
override protected function getParticles(_arg1:Shot):Array{
var _local3:Tracer;
if (_arg1.tracers.length < 5){
return (null);
};
var _local2:Array = new Array();
_local2.push(shotgunShell(_arg1.tracers[2], barrelAltitude, 10));
for each (_local3 in _arg1.tracers) {
_local2.push(smokeParticle(_local3, barrelAltitude, 0, 0.2));
};
return (_local2);
}
}
}//package boxhead.world.weapon
Section 389
//Spy (boxhead.world.weapon.Spy)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.assets.*;
public class Spy extends WeaponGadget {
protected var released:Boolean;// = true
public function Spy(){
super(WeaponInfo.SPY_ID);
animID = UNARMED;
changeWeaponSound = SoundList.CHANGE_WEAPON6;
display = Assets.lookup("PDA");
}
override public function fireRelease():void{
released = true;
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
return (new Shot(character, this, _arg1, 0));
}
override protected function fire():void{
character.owner.toggleSpyMode();
super.fire();
}
override public function fireDown():void{
if (released){
if (canFire()){
fire();
released = false;
};
};
}
}
}//package boxhead.world.weapon
Section 390
//TurretMGPlanter (boxhead.world.weapon.TurretMGPlanter)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.obstacle.deployable.*;
public class TurretMGPlanter extends WeaponPlanter {
public function TurretMGPlanter(){
super(WeaponInfo.TURRET_MG_PLANTER_ID);
animID = UNARMED;
changeWeaponSound = SoundList.CHANGE_WEAPON7;
fireSound = SoundList.PRE_DEPLOY_HEAVY;
flashTime = 0;
}
override public function createDeployable(_arg1:int, _arg2:int):Deployable{
useDeployableAmmo();
return (new TurretMG(character.owner, _arg1, _arg2));
}
}
}//package boxhead.world.weapon
Section 391
//TurretMortarPlanter (boxhead.world.weapon.TurretMortarPlanter)
package boxhead.world.weapon {
import boxhead.sounds.*;
import boxhead.world.thing.obstacle.deployable.*;
public class TurretMortarPlanter extends WeaponPlanter {
public function TurretMortarPlanter(){
super(WeaponInfo.TURRET_MORTAR_PLANTER_ID);
animID = UNARMED;
changeWeaponSound = SoundList.CHANGE_WEAPON7;
fireSound = SoundList.PRE_DEPLOY_HEAVY;
flashTime = 0;
}
override public function createDeployable(_arg1:int, _arg2:int):Deployable{
useDeployableAmmo();
return (new TurretMortar(character.owner, _arg1, _arg2));
}
}
}//package boxhead.world.weapon
Section 392
//Weapon (boxhead.world.weapon.Weapon)
package boxhead.world.weapon {
import flash.events.*;
import flash.geom.*;
import boxhead.world.*;
import flash.media.*;
import boxhead.sounds.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.*;
import boxhead.world.thing.display.*;
import boxhead.events.*;
import boxhead.options.*;
public class Weapon extends EventDispatcher {
public var reloadSound:Sound;
public var animID:int;// = 0
public var changeWeaponAreaSound:AreaSound;
public var character:PlayerCharacter;
public var stopSound:Sound;
public var ammoWarningGiven:Boolean;// = false
public var reloadSoundDelay:int;// = 0
public var weaponID:int;// = 0
protected var loopFadeTime:int;
public var range:Number;// = 100
protected var effectsQueue:Array;
protected var timeSinceFire:int;// = 999
public var loopAreaSound:AreaSound;
private var _fireDelay:Number;// = 0.5
public var damage:int;// = 5
public var spread:Number;// = 0.2
protected var muzzleFlashVariant:int;
public var fireSound:Sound;
public var backpack:ThingDisplay;
public var changeWeaponSound:Sound;
public var upgrade1:WeaponUpgrade;
public var upgrade2:WeaponUpgrade;
protected var muzzleOffsets:Array;
private var _reloadTime:int;
protected var muzzlePosition:Position;
public var info:WeaponInfo;
public var fireSoundList:Array;
public var display:ThingDisplay;
public var loopSound:Sound;
public var ammo:Ammo;// = null
protected var timeSinceEffects:int;// = 999
protected var flashTime:int;
public var reloadAreaSound:AreaSound;
protected var shoulderPosition:Position;
public var moveSpeed:Number;// = 1
protected var muzzleFlashes:Array;
public static const TWO_HAND:int = 2;
public static const UNARMED:int = 0;
public static const ONE_HAND:int = 1;
public static const Akimbo:int = 3;
public function Weapon(_arg1:int){
shoulderPosition = new Position();
muzzlePosition = new Position();
_reloadTime = (_fireDelay * SECOND);
flashTime = (0.1 * SECOND);
loopFadeTime = (0.15 * SECOND);
super();
this.weaponID = _arg1;
info = WeaponInfo.lookup(_arg1);
muzzleFlashes = [null];
muzzleOffsets = getMuzzleOffsets();
effectsQueue = new Array();
}
public function get bankPriority():int{
return (info.bankPriority);
}
public function get penetrates():Boolean{
return (false);
}
public function set reloadTime(_arg1:int):void{
_reloadTime = _arg1;
_fireDelay = (_reloadTime / SECOND);
}
public function get reloadTime():int{
return (_reloadTime);
}
public function get muzzleFlash():ThingDisplay{
return (muzzleFlashes[muzzleFlashVariant]);
}
protected function get smokeSize():Number{
return (3);
}
protected function updatePosition():void{
var _local1:Direction = Direction.list[((character.dir.index + 2) % 8)];
shoulderPosition.x = (character.firePos.x + (_local1.dx * sideDistance));
shoulderPosition.y = (character.firePos.y + (_local1.dy * sideDistance));
muzzlePosition.x = (shoulderPosition.x + (character.dir.dx * barrelDistance));
muzzlePosition.y = (shoulderPosition.y + (character.dir.dy * barrelDistance));
}
public function get damageDescription():String{
if (weaponID == WeaponInfo.FLAMER_ID){
return ("High");
};
if (damage >= 25){
return ("High");
};
if (damage >= 8){
return ("Medium");
};
return ("Low");
}
protected function smokeParticle(_arg1:Tracer, _arg2:Number, _arg3:Number=0, _arg4:Number=0.05):Particle{
if (!Preferences.smoke){
return (null);
};
return (new Smoke((_arg1.startX + (_arg1.dx * smokeDistance)), (_arg1.startY + (_arg1.dy * smokeDistance)), ((_arg1.dir.radians + _arg3) + ((Math.random() - 0.5) * _arg4)), smokeSize, _arg1.distance, _arg2));
}
public function get rateOfFireDescription():String{
if (fireDelay <= 0.2){
return ("Fast");
};
if (fireDelay <= 1){
return ("Medium");
};
return ("Slow");
}
protected function createShot(_arg1:Number, _arg2:int):Shot{
return (new Shot(character, this, _arg1, _arg2, [new Tracer(shoulderPosition.x, shoulderPosition.y, new Direction(_arg1), barrelAltitude, range)]));
}
public function shoot(_arg1:Number, _arg2:int):Shot{
updatePosition();
timeSinceFire = 0;
return (createShot(_arg1, _arg2));
}
protected function playReloadSound(_arg1:int=0):void{
if (((reloadAreaSound) && (!(reloadAreaSound.complete)))){
return;
};
if (((((character.local) && (reloadSound))) && (hasAmmo))){
if (_arg1){
reloadAreaSound = SoundControl.playDelayedAreaSound(reloadSound, muzzlePosition, _arg1);
} else {
reloadAreaSound = SoundControl.playAreaSound(reloadSound, muzzlePosition);
};
};
}
protected function canFire():Boolean{
return (((hasAmmo) && (isLoaded)));
}
protected function smokeAndShell(_arg1:Shot, _arg2:Number):Array{
if (_arg1.tracers.length == 0){
return (null);
};
var _local3:Tracer = _arg1.tracers[0];
return ([smokeParticle(_local3, barrelAltitude), shellCasing(_local3, barrelAltitude, 10)]);
}
protected function lineFromTracer(_arg1:Tracer, _arg2:uint=0xFFFFFF, _arg3:Number=0.4):TracerLine{
return (new TracerLine(muzzlePosition, _arg1.dx, _arg1.dy, (_arg1.distance - barrelDistance), barrelAltitude, _arg2, _arg3));
}
public function get firedRecently():Boolean{
return ((timeSinceFire < 4));
}
public function set remainingReloadTime(_arg1:int):void{
timeSinceFire = (reloadTime - _arg1);
}
protected function getFireParam():int{
return (0);
}
protected function shellCasing(_arg1:Tracer, _arg2:Number, _arg3:Number):Particle{
if (!Preferences.shells){
return (null);
};
return (new ShellCasing((_arg1.startX + (_arg1.dx * shellDistance)), (_arg1.startY + (_arg1.dy * shellDistance)), ((Math.PI + _arg1.dir.radians) - (handMultiplier * 0.5)), _arg2, _arg3));
}
protected function get shellDistance():Number{
return (0.35);
}
protected function fire():void{
useFireAmmo();
var _local1:Shot = shoot(getFireAngle(), getFireParam());
dispatchEvent(new FireEvent(FireEvent.FIRE, false, false, _local1));
}
public function get maxAmmoDescription():String{
if (ammo){
return (("" + ammo.max));
};
return ("Unlimited");
}
public function get bankID():int{
return (info.bankID);
}
public function get flashVisible():Boolean{
return ((timeSinceEffects <= flashTime));
}
protected function get barrelAltitude():Number{
return (18);
}
protected function get sideDistance():Number{
return ((0.25 * handMultiplier));
}
public function process(_arg1:Boolean):void{
var _local2:ShotEffects;
if (!_arg1){
while (effectsQueue.length > 0) {
effectsQueue.pop();
};
};
timeSinceFire++;
timeSinceEffects++;
if ((((effectsQueue.length > 0)) && ((timeSinceEffects >= (flashTime - 1))))){
_local2 = effectsQueue.shift();
executeEffects(_local2);
} else {
if (((loopAreaSound) && ((timeSinceEffects >= loopFadeTime)))){
loopAreaSound.stop();
loopAreaSound = null;
if (stopSound){
SoundControl.playAreaSound(stopSound, muzzlePosition);
};
};
};
if (timeSinceFire == reloadTime){
reload();
if (_arg1){
playReloadSound(reloadSoundDelay);
};
character.checkAutoSwitch();
};
}
protected function getFireAngle():Number{
return ((character.dir.radians + ((Math.random() - 0.5) * spread)));
}
protected function get hasAmmo():Boolean{
return (((!(ammo)) || ((ammo.count > 0))));
}
public function get name():String{
return (info.name);
}
protected function get handMultiplier():int{
return (1);
}
protected function get smokeDistance():Number{
return (0.85);
}
protected function stopReloadSound():void{
if (reloadAreaSound){
reloadAreaSound.stop();
};
}
protected function reload():void{
}
public function get remainingReloadTime():int{
return ((reloadTime - timeSinceFire));
}
public function playChangeWeaponSound():void{
updatePosition();
if (changeWeaponSound){
changeWeaponAreaSound = SoundControl.playAreaSound(changeWeaponSound, muzzlePosition);
};
}
public function get displayAmmo():Boolean{
return (true);
}
protected function get barrelDistance():Number{
return (0.8);
}
protected function getScreenShake():ScreenShake{
return (null);
}
public function get available():Boolean{
return (hasAmmo);
}
public function getMuzzleOffset(_arg1:int):Point{
return (muzzleOffsets[_arg1]);
}
public function drawFirst(_arg1:Direction):Boolean{
return (true);
}
protected function executeEffects(_arg1:ShotEffects):void{
if (character.local){
if (changeWeaponAreaSound){
changeWeaponAreaSound.stop();
};
stopReloadSound();
};
if (fireSoundList){
fireSound = fireSoundList[int((Math.random() * fireSoundList.length))];
};
if (loopSound){
if (!loopAreaSound){
if (fireSound){
SoundControl.playAreaSound(fireSound, muzzlePosition);
loopAreaSound = SoundControl.playDelayedAreaSound(loopSound, muzzlePosition, fireSound.length, true);
} else {
loopAreaSound = SoundControl.playAreaSound(loopSound, muzzlePosition, true);
};
};
} else {
if (fireSound){
SoundControl.playAreaSound(fireSound, muzzlePosition);
};
};
if (muzzleFlashes){
muzzleFlashVariant = int((Math.random() * muzzleFlashes.length));
};
timeSinceEffects = 0;
dispatchEvent(new FireEvent(FireEvent.EFFECTS, false, false, null, _arg1));
}
protected function get isLoaded():Boolean{
return ((timeSinceFire >= reloadTime));
}
protected function shotgunShell(_arg1:Tracer, _arg2:Number, _arg3:Number):Particle{
if (!Preferences.shells){
return (null);
};
return (new ShotgunShell((_arg1.startX + (_arg1.dx * shellDistance)), (_arg1.startY + (_arg1.dy * shellDistance)), ((Math.PI + _arg1.dir.radians) - (handMultiplier * 0.5)), _arg2, _arg3));
}
public function queueShotEffects(_arg1:Shot):void{
var _local2:ShotEffects = new ShotEffects(_arg1);
_local2.tracerLines = getTracerLines(_arg1);
_local2.particles = getParticles(_arg1);
_local2.screenShake = getScreenShake();
effectsQueue.push(_local2);
}
public function set fireDelay(_arg1:Number):void{
_fireDelay = _arg1;
_reloadTime = (_fireDelay * SECOND);
}
protected function useFireAmmo():void{
if (ammo){
ammo.decrement();
};
}
public function get fireDelay():Number{
return (_fireDelay);
}
protected function smokeTrail(_arg1:Tracer, _arg2:Number, _arg3:Number=0, _arg4:Number=0.05, _arg5:Number=3):Array{
if (!Preferences.smoke){
return (null);
};
var _local6:Array = [];
var _local7:Number = smokeDistance;
while (_local7 < _arg1.distance) {
_local6.push(new Smoke((_arg1.startX + (_arg1.dx * _local7)), (_arg1.startY + (_arg1.dy * _local7)), ((_arg1.dir.radians + _arg3) + ((Math.random() - 0.5) * _arg4)), smokeSize, (_arg1.distance - _local7), _arg2));
_local7 = (_local7 + _arg5);
};
return (_local6);
}
public function fireRelease():void{
}
protected function getParticles(_arg1:Shot):Array{
return (null);
}
protected function getMuzzleOffsets():Array{
return ([]);
}
protected function getTracerLines(_arg1:Shot):Array{
var _local3:Tracer;
var _local2:Array = new Array();
for each (_local3 in _arg1.tracers) {
_local2.push(lineFromTracer(_local3));
};
return (_local2);
}
public function fireDown():void{
if (canFire()){
fire();
};
}
public static function get SECOND():Number{
return ((1000 / Constants.PROCESS_INTERVAL));
}
}
}//package boxhead.world.weapon
Section 393
//Weapon1h (boxhead.world.weapon.Weapon1h)
package boxhead.world.weapon {
public class Weapon1h extends Weapon {
public function Weapon1h(_arg1:int){
super(_arg1);
}
override protected function get barrelAltitude():Number{
return (22);
}
}
}//package boxhead.world.weapon
Section 394
//Weapon2h (boxhead.world.weapon.Weapon2h)
package boxhead.world.weapon {
public class Weapon2h extends Weapon {
public function Weapon2h(_arg1:int){
super(_arg1);
}
override protected function get sideDistance():Number{
return (0.3);
}
}
}//package boxhead.world.weapon
Section 395
//WeaponAkimbo (boxhead.world.weapon.WeaponAkimbo)
package boxhead.world.weapon {
import flash.geom.*;
import flash.media.*;
import boxhead.sounds.*;
public class WeaponAkimbo extends Weapon {
protected var fireHand:int;// = 0
protected var reloadAreaSound2:AreaSound;
protected var reloadSoundDelay2:int;// = 0
protected var reloadSound2:Sound;
protected var flashHand:int;// = 0
public function WeaponAkimbo(_arg1:int){
super(_arg1);
}
override protected function getFireParam():int{
return ((1 - fireHand));
}
override protected function playReloadSound(_arg1:int=0):void{
if (((character.local) && (hasAmmo))){
if (reloadSound){
if (_arg1){
reloadAreaSound = SoundControl.playDelayedAreaSound(reloadSound, muzzlePosition, _arg1);
} else {
reloadAreaSound = SoundControl.playAreaSound(reloadSound, muzzlePosition);
};
};
if (reloadSound2){
reloadAreaSound2 = SoundControl.playDelayedAreaSound(reloadSound2, muzzlePosition, (_arg1 + (reloadSoundDelay2 - reloadSoundDelay)));
};
};
}
override public function shoot(_arg1:Number, _arg2:int):Shot{
fireHand = _arg2;
var _local3:Shot = super.shoot(_arg1, _arg2);
return (_local3);
}
override protected function get barrelAltitude():Number{
return (22);
}
override protected function executeEffects(_arg1:ShotEffects):void{
flashHand = (1 - _arg1.shot.fireParam);
super.executeEffects(_arg1);
}
override protected function get handMultiplier():int{
if (fireHand){
return (-1);
};
return (1);
}
override protected function stopReloadSound():void{
if (reloadAreaSound){
reloadAreaSound.stop();
};
if (reloadAreaSound2){
reloadAreaSound2.stop();
};
}
override public function getMuzzleOffset(_arg1:int):Point{
return (muzzleOffsets[flashHand][_arg1]);
}
}
}//package boxhead.world.weapon
Section 396
//WeaponGadget (boxhead.world.weapon.WeaponGadget)
package boxhead.world.weapon {
public class WeaponGadget extends Weapon {
public function WeaponGadget(_arg1:int){
super(_arg1);
}
override public function get displayAmmo():Boolean{
return (false);
}
}
}//package boxhead.world.weapon
Section 397
//WeaponInfo (boxhead.world.weapon.WeaponInfo)
package boxhead.world.weapon {
import flash.net.*;
public class WeaponInfo {
public var bankPriority:int;
public var moveSpeed:Number;
public var name:String;
public var defaultBankID:int;
public var upgrade1:WeaponUpgrade;
public var upgrade2:WeaponUpgrade;
public var upgradeID:int;
public var weaponClass:Class;
public var range:Number;
public var weaponID:int;
public var ammoIncrement:int;
public var abbreviatedName:String;
public var upgradeTo:WeaponInfo;
public var price:WeaponPrice;
public var ammo:int;
public var killMessage:String;
public var bankID:int;
public var defaultBankPriority:int;
public var upgradeFrom:WeaponInfo;
public var damage:int;
public var spread:Number;
public var fireDelay:Number;
public var suicideMessage:String;
public var description:String;
public static const PISTOL_BANK:int = 1;
public static const MAGNUM_ID:int = NUM_WEAPONS++;
public static const GRENADE_LAUNCHER_ID:int = NUM_WEAPONS++;
public static const RIFLE_ID:int = NUM_WEAPONS++;
public static const SHOTGUN_ID:int = NUM_WEAPONS++;
public static const GRENADE_THROWER_ID:int = NUM_WEAPONS++;
public static const SPY_ID:int = NUM_WEAPONS++;
public static const AKIMBO_UZIS_ID:int = NUM_WEAPONS++;
public static const AKIMBO_PISTOLS_ID:int = NUM_WEAPONS++;
public static const AIRSTRIKE_THROWER_ID:int = NUM_WEAPONS++;
public static const TURRET_BANK:int = 7;
public static const RAILGUN_ID:int = NUM_WEAPONS++;
public static const GRENADE_BANK:int = 4;
public static const MINIGUN_ID:int = NUM_WEAPONS++;
public static const CLAYMORE_PLANTER_ID:int = NUM_WEAPONS++;
public static const EXPLOSIVES_BANK:int = 5;
public static const BARRICADE_PLANTER_ID:int = NUM_WEAPONS++;
public static const TWO_HAND_BANK:int = 2;
public static const BARREL_PLANTER_ID:int = NUM_WEAPONS++;
public static const EXPLOSION_ID:int = 99;
public static const TURRET_MG_PLANTER_ID:int = NUM_WEAPONS++;
public static const FLAMER_ID:int = NUM_WEAPONS++;
public static const M16_ID:int = NUM_WEAPONS++;
public static const GADGET_BANK:int = 8;
public static const HEAVY_BANK:int = 3;
public static const TURRET_MORTAR_PLANTER_ID:int = NUM_WEAPONS++;
public static const PLASMA_CANNON_ID:int = NUM_WEAPONS++;
public static const PISTOL_ID:int = NUM_WEAPONS++;
public static const CHARGE_PACK_PLANTER_ID:int = NUM_WEAPONS++;
public static const OBSTACLE_BANK:int = 6;
public static const AK47_ID:int = NUM_WEAPONS++;
public static const NO_BANK:int = 0;
private static var list:Array = [];
public static var NUM_WEAPONS:int = 0;
private static var cookie:SharedObject;
public function WeaponInfo(_arg1:Class, _arg2:String, _arg3:String, _arg4:int, _arg5:int){
this.weaponClass = _arg1;
this.name = _arg2;
this.abbreviatedName = _arg3;
this.bankID = (defaultBankID = _arg4);
this.bankPriority = (defaultBankPriority = _arg5);
price = new WeaponPrice(0, 0);
}
public function create():Weapon{
var _local1:Weapon = (new weaponClass() as Weapon);
if (!_local1){
return (null);
};
if (ammo){
_local1.ammo = new Ammo(ammo, ammoIncrement);
} else {
_local1.ammo = null;
};
_local1.damage = damage;
if (range){
_local1.range = range;
} else {
_local1.range = 100;
};
_local1.spread = spread;
_local1.moveSpeed = moveSpeed;
_local1.fireDelay = fireDelay;
if (upgrade1){
_local1.upgrade1 = upgrade1.clone();
_local1.upgrade1.weapon = _local1;
};
if (upgrade2){
_local1.upgrade2 = upgrade2.clone();
_local1.upgrade2.weapon = _local1;
};
return (_local1);
}
public function set cost(_arg1:int):void{
price.cost = _arg1;
}
public function get available():Boolean{
return (true);
}
public function set ammoCost(_arg1:int):void{
price.ammoCost = _arg1;
}
public static function lookup(_arg1:int):WeaponInfo{
return (list[_arg1]);
}
public static function defaultBanks():void{
var _local1:WeaponInfo;
for each (_local1 in list) {
if (!_local1){
} else {
_local1.bankID = _local1.defaultBankID;
_local1.bankPriority = _local1.defaultBankPriority;
};
};
}
public static function init(_arg1:SharedObject=null):void{
var _local2:int;
var _local3:int;
var _local5:WeaponInfo;
cookie = _arg1;
_local2 = 0;
_local3 = PISTOL_BANK;
var _temp1 = _local2;
_local2 = (_local2 + 1);
list[RAILGUN_ID] = new WeaponInfo(Railgun, "Railgun", "Railgun", _local3, _temp1);
var _temp2 = _local2;
_local2 = (_local2 + 1);
list[MAGNUM_ID] = new WeaponInfo(Magnum, "Magnum", "Magnum", _local3, _temp2);
var _temp3 = _local2;
_local2 = (_local2 + 1);
list[AKIMBO_UZIS_ID] = new WeaponInfo(AkimboUzis, "Dual UZIs", "Dual Uzis", _local3, _temp3);
var _temp4 = _local2;
_local2 = (_local2 + 1);
list[AKIMBO_PISTOLS_ID] = new WeaponInfo(AkimboPistols, "Dual Pistols", "Dual Pistols", _local3, _temp4);
var _temp5 = _local2;
_local2 = (_local2 + 1);
list[PISTOL_ID] = new WeaponInfo(Pistol, "Pistol", "Pistol", _local3, _temp5);
_local2 = 0;
_local3 = TWO_HAND_BANK;
var _temp6 = _local2;
_local2 = (_local2 + 1);
list[M16_ID] = new WeaponInfo(M16, "M16", "M16", _local3, _temp6);
var _temp7 = _local2;
_local2 = (_local2 + 1);
list[AK47_ID] = new WeaponInfo(AK47, "AK47", "AK47", _local3, _temp7);
var _temp8 = _local2;
_local2 = (_local2 + 1);
list[SHOTGUN_ID] = new WeaponInfo(Shotgun, "Shotgun", "Shotgun", _local3, _temp8);
var _temp9 = _local2;
_local2 = (_local2 + 1);
list[RIFLE_ID] = new WeaponInfo(Rifle, "Rifle", "Rifle", _local3, _temp9);
_local2 = 0;
_local3 = HEAVY_BANK;
var _temp10 = _local2;
_local2 = (_local2 + 1);
list[PLASMA_CANNON_ID] = new WeaponInfo(PlasmaCannon, "Plasma Cannon", "Plas. Cannon", _local3, _temp10);
var _temp11 = _local2;
_local2 = (_local2 + 1);
list[MINIGUN_ID] = new WeaponInfo(Minigun, "Minigun", "Minigun", _local3, _temp11);
var _temp12 = _local2;
_local2 = (_local2 + 1);
list[FLAMER_ID] = new WeaponInfo(Flamer, "Flamer", "Flamer", _local3, _temp12);
_local2 = 0;
_local3 = GRENADE_BANK;
var _temp13 = _local2;
_local2 = (_local2 + 1);
list[GRENADE_LAUNCHER_ID] = new WeaponInfo(GrenadeLauncher, "Grenade Launcher", "Gren. Launcher", _local3, _temp13);
var _temp14 = _local2;
_local2 = (_local2 + 1);
list[GRENADE_THROWER_ID] = new WeaponInfo(GrenadeThrower, "Grenades", "Grenades", _local3, _temp14);
_local2 = 0;
_local3 = EXPLOSIVES_BANK;
var _temp15 = _local2;
_local2 = (_local2 + 1);
list[AIRSTRIKE_THROWER_ID] = new WeaponInfo(AirstrikeThrower, "Airstrike", "Airstrike", _local3, _temp15);
var _temp16 = _local2;
_local2 = (_local2 + 1);
list[CLAYMORE_PLANTER_ID] = new WeaponInfo(ClaymorePlanter, "Claymores", "Claymores", _local3, _temp16);
var _temp17 = _local2;
_local2 = (_local2 + 1);
list[CHARGE_PACK_PLANTER_ID] = new WeaponInfo(ChargePackPlanter, "Charge Packs", "C. Packs", _local3, _temp17);
_local2 = 0;
_local3 = OBSTACLE_BANK;
var _temp18 = _local2;
_local2 = (_local2 + 1);
list[BARREL_PLANTER_ID] = new WeaponInfo(BarrelPlanter, "Barrels", "Barrels", _local3, _temp18);
var _temp19 = _local2;
_local2 = (_local2 + 1);
list[BARRICADE_PLANTER_ID] = new WeaponInfo(BarricadePlanter, "Barricades", "Barricades", _local3, _temp19);
_local2 = 0;
_local3 = TURRET_BANK;
var _temp20 = _local2;
_local2 = (_local2 + 1);
list[TURRET_MG_PLANTER_ID] = new WeaponInfo(TurretMGPlanter, "MG Turret", "MG Tur.", _local3, _temp20);
var _temp21 = _local2;
_local2 = (_local2 + 1);
list[TURRET_MORTAR_PLANTER_ID] = new WeaponInfo(TurretMortarPlanter, "Mortar Turret", "Mortar Tur.", _local3, _temp21);
_local2 = 0;
_local3 = GADGET_BANK;
var _temp22 = _local2;
_local2 = (_local2 + 1);
list[SPY_ID] = new WeaponInfo(Spy, "Spy Satellite", "Spy Sat.", _local3, _temp22);
linkUpgrade(PISTOL_ID, AKIMBO_PISTOLS_ID, Premium.PISTOLS_ID);
linkUpgrade(AK47_ID, M16_ID, Premium.M16_ID);
linkUpgrade(MAGNUM_ID, RAILGUN_ID, Premium.RAILGUN_ID);
var _local4:int;
while (_local4 < list.length) {
_local5 = list[_local4];
if (_local5){
_local5.weaponID = _local4;
};
_local4++;
};
loadBanks();
}
public static function getList():Array{
return (list.concat());
}
private static function linkUpgrade(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:WeaponInfo = list[_arg1];
var _local5:WeaponInfo = list[_arg2];
_local4.upgradeTo = _local5;
_local4.upgradeID = _arg3;
_local5.upgradeFrom = _local4;
_local5.upgradeID = _arg3;
}
public static function saveBanks():void{
var _local4:WeaponInfo;
if (!cookie){
return;
};
var _local1:Array = new Array();
var _local2:Array = new Array();
var _local3:int;
while (_local3 < list.length) {
_local4 = list[_local3];
if (!_local4){
} else {
_local1[_local3] = _local4.bankID;
_local2[_local3] = _local4.bankPriority;
};
_local3++;
};
cookie.data.bankIDs = _local1;
cookie.data.bankPriorities = _local2;
cookie.flush();
}
public static function loadBanks():void{
var _local4:WeaponInfo;
if (!cookie){
return;
};
if (!cookie.data.bankIDs){
return;
};
var _local1:Array = cookie.data.bankIDs;
var _local2:Array = cookie.data.bankPriorities;
var _local3:int;
while (_local3 < list.length) {
_local4 = list[_local3];
if (!_local4){
} else {
if (_local1[_local3] != undefined){
_local4.bankID = _local1[_local3];
};
if (_local2[_local3] != undefined){
_local4.bankPriority = _local2[_local3];
};
};
_local3++;
};
}
}
}//package boxhead.world.weapon
Section 398
//WeaponPlanter (boxhead.world.weapon.WeaponPlanter)
package boxhead.world.weapon {
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.assets.*;
public class WeaponPlanter extends Weapon {
public function WeaponPlanter(_arg1:int){
super(_arg1);
display = Assets.lookup("Wrench");
}
override protected function updatePosition():void{
shoulderPosition.copy(character.firePos);
muzzlePosition.copy(character.firePos);
}
override protected function get smokeDistance():Number{
return (0);
}
override protected function get shellDistance():Number{
return (0);
}
override protected function canFire():Boolean{
return (((super.canFire()) && (!(character.cell.obstacle))));
}
override protected function useFireAmmo():void{
}
override protected function get barrelDistance():Number{
return (0);
}
override protected function get sideDistance():Number{
return (0);
}
protected function useDeployableAmmo():void{
if (((character.local) && (ammo))){
ammo.decrement();
};
}
override protected function createShot(_arg1:Number, _arg2:int):Shot{
return (new Shot(character, this, _arg1, _arg2));
}
public function createDeployable(_arg1:int, _arg2:int):Deployable{
return (null);
}
}
}//package boxhead.world.weapon
Section 399
//WeaponPrice (boxhead.world.weapon.WeaponPrice)
package boxhead.world.weapon {
public class WeaponPrice {
public var ammoCost:int;
public var cost:int;
public function WeaponPrice(_arg1:int, _arg2:int){
this.cost = _arg1;
this.ammoCost = _arg2;
}
}
}//package boxhead.world.weapon
Section 400
//WeaponThrown (boxhead.world.weapon.WeaponThrown)
package boxhead.world.weapon {
public class WeaponThrown extends Weapon {
protected var charge:int;// = 0
public function WeaponThrown(_arg1:int){
super(_arg1);
}
override public function fireRelease():void{
if (((canFire()) && ((charge > 0)))){
fire();
};
charge = 0;
}
override protected function get smokeDistance():Number{
return (0);
}
override protected function get shellDistance():Number{
return (0);
}
override public function process(_arg1:Boolean):void{
if (!_arg1){
charge = 0;
};
super.process(_arg1);
}
override protected function get barrelDistance():Number{
return (0.4);
}
override protected function get sideDistance():Number{
return (0);
}
override public function fireDown():void{
charge++;
}
}
}//package boxhead.world.weapon
Section 401
//WeaponUpgrade (boxhead.world.weapon.WeaponUpgrade)
package boxhead.world.weapon {
public class WeaponUpgrade {
public var owned:Boolean;// = false
public var cost:int;
public var value:Number;
public var type:String;
public var weapon:Weapon;
public static const AMMO:String = "ammo";
public static const DAMAGE:String = "damage";
public static const SPREAD:String = "spread";
public static const MOVE_SPEED:String = "moveSpeed";
public static const FIRE_DELAY:String = "fireDelay";
public static const RANGE:String = "range";
public function WeaponUpgrade(_arg1:Weapon, _arg2:String, _arg3:Number, _arg4:int){
this.weapon = _arg1;
this.type = _arg2;
this.value = _arg3;
this.cost = _arg4;
}
public function buy():void{
if (owned){
return;
};
owned = true;
if (!weapon){
return;
};
switch (type){
case AMMO:
if (weapon.ammo){
weapon.ammo.max = value;
};
break;
case DAMAGE:
weapon.damage = value;
break;
case RANGE:
weapon.range = value;
break;
case SPREAD:
weapon.spread = value;
break;
case MOVE_SPEED:
weapon.moveSpeed = value;
break;
case FIRE_DELAY:
weapon.fireDelay = value;
break;
};
}
public function toString():String{
switch (type){
default:
return ("Unknown");
case AMMO:
return ("Max. Ammo increased");
case DAMAGE:
return ("Damage increased");
case RANGE:
return ("Range increased");
case SPREAD:
return ("Improved accuracy");
case MOVE_SPEED:
return ("Move speed increased");
case FIRE_DELAY:
return ("Rate of Fire increased");
};
}
public function clone():WeaponUpgrade{
return (new WeaponUpgrade(weapon, type, value, cost));
}
}
}//package boxhead.world.weapon
Section 402
//Cell (boxhead.world.Cell)
package boxhead.world {
import boxhead.world.thing.character.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.world.thing.obstacle.*;
import boxhead.world.thing.projectile.*;
import boxhead.world.thing.bounty.*;
public class Cell {
public var footstepsR:Array;
public var s:Cell;
private var _mid:Position;
private var _characters:Array;
private var _x:int;
private var _bountyItems:Array;
private var _y:int;
private var _particles:Array;
public var pathDistance:Number;
private var _prop:Prop;
private var _deployable:Deployable;
public var e:Cell;
private var _enemies:Array;
private var _projectiles:Array;
public var footstepsL:Array;
public var textureID:int;// = 1
public var w:Cell;
public var next:Cell;
public var n:Cell;
public function Cell(_arg1:int, _arg2:int){
_x = _arg1;
_y = _arg2;
_mid = new Position((_arg1 + 0.5), (_arg2 + 0.5));
_characters = new Array();
_enemies = new Array();
_projectiles = new Array();
_particles = new Array();
_bountyItems = new Array();
}
public function removeCharacter(_arg1:Character):void{
var _local2:int = _characters.lastIndexOf(_arg1);
if (_local2 >= 0){
_characters.splice(_local2, 1);
};
}
public function plantProp(_arg1:Prop):void{
var _local2:Character;
_prop = _arg1;
_prop.cell = this;
for each (_local2 in _characters) {
_local2.obstacleExemption = _arg1;
};
}
public function removeProp(_arg1:Prop):void{
if (_prop == _arg1){
_prop.cell = null;
_prop = null;
};
}
public function addCharacter(_arg1:Character):void{
_characters.push(_arg1);
}
public function pathDistanceFrom(_arg1:Cell):Number{
var _local2:Number = 0;
if (deployable){
_local2 = (deployable.hp / 20);
};
if ((Math.abs((_arg1.x - x)) + Math.abs((_arg1.y - y))) <= 1.1){
return ((1 + _local2));
};
return ((1.4 + _local2));
}
public function plantDeployable(_arg1:Deployable):void{
var _local2:Character;
_deployable = _arg1;
_deployable.cell = this;
for each (_local2 in _characters) {
_local2.obstacleExemption = _arg1;
};
}
public function removeProjectile(_arg1:Projectile):void{
var _local2:int = _projectiles.lastIndexOf(_arg1);
if (_local2 >= 0){
_projectiles.splice(_local2, 1);
};
}
public function get obstacle():Obstacle{
if (_prop){
return (_prop);
};
return (_deployable);
}
public function removeBountyItem(_arg1:BountyItem):void{
var _local2:int = _bountyItems.lastIndexOf(_arg1);
if (_local2 >= 0){
_bountyItems[_local2] = _bountyItems[(_bountyItems.length - 1)];
_bountyItems.pop();
};
}
public function removeDeployable(_arg1:Deployable):void{
if (_deployable == _arg1){
_deployable.cell = null;
_deployable = null;
};
}
public function get enemies():Array{
return (_enemies);
}
public function get projectiles():Array{
return (_projectiles);
}
public function get particles():Array{
return (_particles);
}
public function removeParticle(_arg1:Particle):void{
var _local2:int = _particles.lastIndexOf(_arg1);
if (_local2 >= 0){
_particles[_local2] = _particles[(_particles.length - 1)];
_particles.pop();
};
}
public function get deployable():Deployable{
return (_deployable);
}
public function addParticle(_arg1:Particle):void{
_particles.push(_arg1);
_arg1.cell = this;
}
public function get mid():Position{
return (_mid);
}
public function get bountyItems():Array{
return (_bountyItems);
}
public function addBountyItem(_arg1:BountyItem):void{
_bountyItems.push(_arg1);
_arg1.cell = this;
}
public function get prop():Prop{
return (_prop);
}
public function removeEnemy(_arg1:Enemy):void{
var _local2:int = _enemies.lastIndexOf(_arg1);
if (_local2 >= 0){
_enemies.splice(_local2, 1);
};
}
public function get characters():Array{
return (_characters);
}
public function addProjectile(_arg1:Projectile):void{
_projectiles.push(_arg1);
}
public function get x():Number{
return (_x);
}
public function get y():Number{
return (_y);
}
public function addEnemy(_arg1:Enemy):void{
_enemies.push(_arg1);
}
}
}//package boxhead.world
Section 403
//CellGrid (boxhead.world.CellGrid)
package boxhead.world {
import flash.geom.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.particle.*;
import boxhead.world.thing.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.world.thing.bounty.*;
import flash.utils.*;
public class CellGrid {
private var _height:int;
private var _width:int;
private var _border:int;
private var cells:Array;
public var borderRect:Rectangle;
public var borderObstacles:Array;
public function CellGrid(_arg1:int, _arg2:int){
var _local4:int;
var _local5:Cell;
super();
_width = _arg1;
_height = _arg2;
setBorder(0);
cells = new Array((_arg1 * _arg2));
var _local3:int = (_arg1 - 1);
while (_local3 >= 0) {
_local4 = (_arg2 - 1);
while (_local4 >= 0) {
_local5 = new Cell(_local3, _local4);
cells[(_local3 + (_local4 * width))] = _local5;
if (_local3 < (_arg1 - 1)){
_local5.e = cells[((_local3 + 1) + (_local4 * width))];
_local5.e.w = _local5;
};
if (_local4 < (_arg2 - 1)){
_local5.s = cells[(_local3 + ((_local4 + 1) * width))];
_local5.s.n = _local5;
};
_local4--;
};
_local3--;
};
}
public function calculateAIPaths(_arg1:Array):void{
var _local2:int;
var _local7:Cell;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Cell;
var _local13:Number;
var _local14:Boolean;
var _local15:int;
var _local16:Cell;
clearPaths();
var _local3:Dictionary = new Dictionary();
var _local4:Dictionary = new Dictionary();
var _local5:Array = _arg1.concat();
var _local6:Array = [];
while (_local5.length > 0) {
_local7 = _local5.pop();
_local4[_local7] = true;
delete _local3[_local7];
if (_local7.prop){
} else {
_local8 = ((_local7.n) && (!(_local7.n.prop)));
_local9 = ((_local7.s) && (!(_local7.s.prop)));
_local10 = ((_local7.w) && (!(_local7.w.prop)));
_local11 = ((_local7.e) && (!(_local7.e.prop)));
if (_local8){
_local6.push(_local7.n);
};
if (_local9){
_local6.push(_local7.s);
};
if (_local10){
_local6.push(_local7.w);
};
if (_local11){
_local6.push(_local7.e);
};
if (((_local8) && (((_local7.n.w) && (!(_local7.n.w.prop)))))){
_local6.push(_local7.n.w);
} else {
if (((_local10) && (((_local7.w.n) && (!(_local7.w.n.prop)))))){
_local6.push(_local7.w.n);
};
};
if (((_local9) && (((_local7.s.w) && (!(_local7.s.w.prop)))))){
_local6.push(_local7.s.w);
} else {
if (((_local10) && (((_local7.w.s) && (!(_local7.w.s.prop)))))){
_local6.push(_local7.w.s);
};
};
if (((_local8) && (((_local7.n.e) && (!(_local7.n.e.prop)))))){
_local6.push(_local7.n.e);
} else {
if (((_local11) && (((_local7.e.n) && (!(_local7.e.n.prop)))))){
_local6.push(_local7.e.n);
};
};
if (((_local9) && (((_local7.s.e) && (!(_local7.s.e.prop)))))){
_local6.push(_local7.s.e);
} else {
if (((_local11) && (((_local7.e.s) && (!(_local7.e.s.prop)))))){
_local6.push(_local7.e.s);
};
};
while (_local6.length) {
_local12 = _local6.pop();
if (_local4[_local12]){
} else {
_local13 = (_local7.pathDistance + _local12.pathDistanceFrom(_local7));
if (_local3[_local12]){
if (_local13 >= _local12.pathDistance){
continue;
};
_local15 = _local5.indexOf(_local12);
if (_local15 >= 0){
_local5.splice(_local15, 1);
};
};
_local12.pathDistance = _local13;
_local12.next = _local7;
_local3[_local12] = true;
_local14 = false;
_local2 = (_local5.length - 1);
while (_local2 >= 0) {
_local16 = _local5[_local2];
if (_local12.pathDistance <= _local16.pathDistance){
_local5.splice((_local2 + 1), 0, _local12);
_local14 = true;
break;
};
_local2--;
};
if (!_local14){
_local5.unshift(_local12);
};
};
};
};
};
}
public function removeBountyItem(_arg1:BountyItem):void{
if (((!(_arg1)) || (!(_arg1.cell)))){
return;
};
_arg1.cell.removeBountyItem(_arg1);
}
public function getCellList():Array{
return (cells.concat());
}
public function cellAt(_arg1:int, _arg2:int):Cell{
return (cells[(Math.max(0, Math.min((width - 1), _arg1)) + (Math.max(0, Math.min((height - 1), _arg2)) * width))]);
}
public function plantDeployable(_arg1:Deployable):Boolean{
_arg1.snapToCell();
var _local2:Cell = cellAtPos(_arg1.pos);
if (_local2.obstacle){
return (false);
};
_local2.plantDeployable(_arg1);
return (true);
}
public function get width():int{
return (_width);
}
public function removeProp(_arg1:Prop):void{
var _local3:int;
var _local4:int;
var _local5:Cell;
if (((!(_arg1)) || (!(_arg1.cell)))){
return;
};
var _local2:Point = _arg1.footprint;
_local3 = 0;
while (_local3 < _local2.x) {
_local4 = 0;
while (_local4 < _local2.y) {
_local5 = cellAt((_arg1.x + _local3), (_arg1.y + _local4));
if (_local5.prop == _arg1){
_local5.removeProp(_arg1);
};
_local4++;
};
_local3++;
};
}
public function addParticle(_arg1:Particle):void{
cellAt(_arg1.pos.x, _arg1.pos.y).addParticle(_arg1);
}
public function findAISpawns(_arg1:Array):Array{
var _local3:int;
var _local8:Cell;
var _local9:int;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Cell;
var _local15:Number;
var _local16:Boolean;
var _local17:int;
var _local18:Cell;
clearPaths();
var _local2:Array = [];
var _local4:Dictionary = new Dictionary();
var _local5:Dictionary = new Dictionary();
var _local6:Array = _arg1.concat();
var _local7:Array = [];
while (_local6.length > 0) {
_local8 = _local6.pop();
_local5[_local8] = true;
delete _local4[_local8];
if (_local8.prop){
} else {
_local9 = 1;
if (!_local8.n){
_local2.push(new Position(_local8.mid.x, (_local8.mid.y - _local9)));
};
if (!_local8.s){
_local2.push(new Position(_local8.mid.x, (_local8.mid.y + _local9)));
};
if (!_local8.w){
_local2.push(new Position((_local8.mid.x - _local9), _local8.mid.y));
};
if (!_local8.e){
_local2.push(new Position((_local8.mid.x + _local9), _local8.mid.y));
};
_local10 = ((_local8.n) && (!(_local8.n.prop)));
_local11 = ((_local8.s) && (!(_local8.s.prop)));
_local12 = ((_local8.w) && (!(_local8.w.prop)));
_local13 = ((_local8.e) && (!(_local8.e.prop)));
if (_local10){
_local7.push(_local8.n);
};
if (_local11){
_local7.push(_local8.s);
};
if (_local12){
_local7.push(_local8.w);
};
if (_local13){
_local7.push(_local8.e);
};
if (((_local10) && (((_local8.n.w) && (!(_local8.n.w.prop)))))){
_local7.push(_local8.n.w);
} else {
if (((_local12) && (((_local8.w.n) && (!(_local8.w.n.prop)))))){
_local7.push(_local8.w.n);
};
};
if (((_local11) && (((_local8.s.w) && (!(_local8.s.w.prop)))))){
_local7.push(_local8.s.w);
} else {
if (((_local12) && (((_local8.w.s) && (!(_local8.w.s.prop)))))){
_local7.push(_local8.w.s);
};
};
if (((_local10) && (((_local8.n.e) && (!(_local8.n.e.prop)))))){
_local7.push(_local8.n.e);
} else {
if (((_local13) && (((_local8.e.n) && (!(_local8.e.n.prop)))))){
_local7.push(_local8.e.n);
};
};
if (((_local11) && (((_local8.s.e) && (!(_local8.s.e.prop)))))){
_local7.push(_local8.s.e);
} else {
if (((_local13) && (((_local8.e.s) && (!(_local8.e.s.prop)))))){
_local7.push(_local8.e.s);
};
};
while (_local7.length) {
_local14 = _local7.pop();
if (_local5[_local14]){
} else {
_local15 = (_local8.pathDistance + _local14.pathDistanceFrom(_local8));
if (_local4[_local14]){
if (_local15 >= _local14.pathDistance){
continue;
};
_local17 = _local6.indexOf(_local14);
if (_local17 >= 0){
_local6.splice(_local17, 1);
};
};
_local14.pathDistance = _local15;
_local14.next = _local8;
_local4[_local14] = true;
_local16 = false;
_local3 = (_local6.length - 1);
while (_local3 >= 0) {
_local18 = _local6[_local3];
if (_local14.pathDistance <= _local18.pathDistance){
_local6.splice((_local3 + 1), 0, _local14);
_local16 = true;
break;
};
_local3--;
};
if (!_local16){
_local6.unshift(_local14);
};
};
};
};
};
return (_local2);
}
public function getCellsIntersecting(_arg1:Rectangle):Array{
var _local8:int;
var _local2:Array = new Array();
var _local3:int = Math.max(0, _arg1.left);
var _local4:int = Math.min((width - 1), _arg1.right);
var _local5:int = Math.max(0, _arg1.top);
var _local6:int = Math.min((height - 1), _arg1.bottom);
var _local7:int = _local3;
while (_local7 <= _local4) {
_local8 = _local5;
while (_local8 <= _local6) {
_local2.push(cells[(_local7 + (_local8 * width))]);
_local8++;
};
_local7++;
};
return (_local2);
}
public function addBountyItem(_arg1:BountyItem):void{
cellAt(_arg1.pos.x, _arg1.pos.y).addBountyItem(_arg1);
}
protected function clearPaths():void{
var _local1:Cell;
for each (_local1 in cells) {
_local1.pathDistance = 0;
_local1.next = null;
};
}
public function removeDeployable(_arg1:Deployable):void{
if (((!(_arg1)) || (!(_arg1.cell)))){
return;
};
if (((_arg1) && (_arg1.cell))){
_arg1.cell.removeDeployable(_arg1);
};
}
public function cellAtPos(_arg1:Position):Cell{
return (cellAt(_arg1.x, _arg1.y));
}
public function get height():int{
return (_height);
}
public function get border():int{
return (_border);
}
public function setBorder(_arg1:int):void{
_border = Math.max(0, Math.min(9, _arg1));
if (!borderRect){
borderRect = new Rectangle();
};
borderRect.x = (borderRect.y = border);
borderRect.width = (width - (border * 2));
borderRect.height = (height - (border * 2));
borderObstacles = new Array();
borderObstacles.push(new InvisibleWall((width / 2), -0.5, ((width / 2) + 1), 0.5));
borderObstacles.push(new InvisibleWall(-0.5, (height / 2), 0.5, ((height / 2) + 1)));
borderObstacles.push(new InvisibleWall((width / 2), (height + 0.5), ((width / 2) + 1), 0.5));
borderObstacles.push(new InvisibleWall((width + 0.5), (height / 2), 0.5, ((height / 2) + 1)));
}
public function resize(_arg1:int, _arg2:int):void{
var _local5:int;
var _local6:Cell;
var _local3:Array = cells;
cells = new Array((_arg1 * _arg2));
var _local4:int = (_arg1 - 1);
while (_local4 >= 0) {
_local5 = (_arg2 - 1);
while (_local5 >= 0) {
if ((((_local4 < width)) && ((_local5 < height)))){
_local6 = _local3[(_local4 + (_local5 * width))];
} else {
_local6 = new Cell(_local4, _local5);
};
cells[(_local4 + (_local5 * _arg1))] = _local6;
if (_local4 < (_arg1 - 1)){
_local6.e = cells[((_local4 + 1) + (_local5 * _arg1))];
_local6.e.w = _local6;
} else {
_local6.e = null;
};
if (_local5 < (_arg2 - 1)){
_local6.s = cells[(_local4 + ((_local5 + 1) * _arg1))];
_local6.s.n = _local6;
} else {
_local6.s = null;
};
_local5--;
};
_local4--;
};
_width = _arg1;
_height = _arg2;
}
public function plantProp(_arg1:Prop):Boolean{
var _local3:int;
var _local4:int;
var _local2:Point = _arg1.footprint;
_local3 = 0;
while (_local3 < _local2.x) {
_local4 = 0;
while (_local4 < _local2.y) {
if (cellAt((_arg1.x + _local3), (_arg1.y + _local4)).obstacle){
return (false);
};
_local4++;
};
_local3++;
};
_local3 = 0;
while (_local3 < _local2.x) {
_local4 = 0;
while (_local4 < _local2.y) {
cellAt((_arg1.x + _local3), (_arg1.y + _local4)).plantProp(_arg1);
_local4++;
};
_local3++;
};
return (true);
}
public function containsPos(_arg1:Position, _arg2:Number=0):Boolean{
return ((((((((_arg1.x >= (0 - _arg2))) && ((_arg1.y >= (0 - _arg2))))) && ((_arg1.x <= (width + _arg2))))) && ((_arg1.y <= (height + _arg2)))));
}
public function getThingsIntersecting(_arg1:Rectangle):Array{
var _local2:Thing;
var _local10:int;
var _local11:Cell;
var _local3:Array = new Array();
var _local4:Array = new Array();
var _local5:int = Math.max(0, _arg1.left);
var _local6:int = Math.min((width - 1), _arg1.right);
var _local7:int = Math.max(0, _arg1.top);
var _local8:int = Math.min((height - 1), _arg1.bottom);
var _local9:int = _local5;
while (_local9 <= _local6) {
_local10 = _local7;
while (_local10 <= _local8) {
_local11 = cells[(_local9 + (_local10 * width))];
for each (_local2 in _local11.characters) {
_local3.push(_local2);
};
for each (_local2 in _local11.projectiles) {
_local3.push(_local2);
};
for each (_local2 in _local11.particles) {
_local3.push(_local2);
};
for each (_local2 in _local11.bountyItems) {
_local3.push(_local2);
};
_local2 = _local11.obstacle;
if (((_local2) && ((_local4.lastIndexOf(_local2) < 0)))){
_local4.push(_local2);
};
_local10++;
};
_local9++;
};
for each (_local2 in _local4) {
_local3.push(_local2);
};
return (_local3);
}
}
}//package boxhead.world
Section 404
//Direction (boxhead.world.Direction)
package boxhead.world {
public class Direction {
public var index:int;
public var dy:Number;
public var degrees:Number;
public var radians:Number;
public var dx:Number;
public static const E:Direction = new Direction(0, 6);
;
public static const NW:Direction = new Direction((Math.PI * 1.25), 3);
;
private static const hor:Number = 0.414213562373095;
public static const N:Direction = new Direction((Math.PI * 1.5), 4);
;
public static const S:Direction = new Direction((Math.PI * 0.5), 0);
;
public static const W:Direction = new Direction((Math.PI * 1), 2);
;
public static const SE:Direction = new Direction((Math.PI * 0.25), 7);
;
public static const list:Array = [S, SW, W, NW, N, NE, E, SE];
private static const ver:Number = 2.41421356237309;
public static const SW:Direction = new Direction((Math.PI * 0.75), 1);
;
private static const DIAGONAL:Number = Math.sqrt(0.5);
public static const NE:Direction = new Direction((Math.PI * 1.75), 5);
;
public function Direction(_arg1:Number, _arg2:int=0){
this.index = _arg2;
this.radians = _arg1;
degrees = ((_arg1 * 180) / Math.PI);
dx = Math.cos(_arg1);
dy = Math.sin(_arg1);
}
public static function byVector(_arg1:Number, _arg2:Number):Direction{
var _local3:Number;
if (_arg1 == 0){
if (_arg2 > 0){
return (S);
};
if (_arg2 < 0){
return (N);
};
return (null);
//unresolved jump
};
_local3 = (_arg2 / _arg1);
if (_arg1 > 0){
if (_local3 > ver){
return (S);
};
if (_local3 > hor){
return (SE);
};
if (_local3 > -(hor)){
return (E);
};
if (_local3 > -(ver)){
return (NE);
};
return (N);
//unresolved jump
};
if (_local3 > ver){
return (N);
};
if (_local3 > hor){
return (NW);
};
if (_local3 > -(hor)){
return (W);
};
if (_local3 > -(ver)){
return (SW);
};
return (S);
}
}
}//package boxhead.world
Section 405
//Map (boxhead.world.Map)
package boxhead.world {
import flash.events.*;
import boxhead.events.*;
import boxhead.assets.*;
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.*;
import boxhead.world.weapon.*;
import boxhead.world.thing.bounty.*;
import boxhead.world.thing.obstacle.*;
import boxhead.world.decal.*;
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.world.thing.projectile.*;
import boxhead.world.thing.particle.*;
import boxhead.options.*;
import boxhead.sounds.*;
import boxhead.world.hit.*;
public class Map extends EventDispatcher {
public var enemySpawns:Array;
public var turrets:Array;
public var clearCanvas:BitmapData;
public var neutralDeployables:Array;
public var cameraOffset:Point;
public var playerSpawns:Array;
public var shadowCanvas:BitmapData;
public var focusPosition:Position;
public var viewScale:Number;// = 1
public var enemies:Array;
public var particles:Array;
public var projectiles:Array;
public var terrain:Terrain;
public var screenShakes:Array;
public var focusThings:Array;
public var tracerLines:Array;
public var cellGrid:CellGrid;
public var smartDeployables:Array;
public var bountyItems:Array;
public var characters:Array;
public var cameras:Array;
public var gridGraphics:Shape;
public var claimedBountyItems:Array;
public function Map(_arg1:int, _arg2:int){
characters = new Array();
enemies = new Array();
smartDeployables = new Array();
turrets = new Array();
cameras = new Array();
projectiles = new Array();
particles = new Array();
tracerLines = new Array();
screenShakes = new Array();
playerSpawns = new Array();
enemySpawns = new Array();
bountyItems = new Array();
claimedBountyItems = new Array();
neutralDeployables = new Array();
cellGrid = new CellGrid(_arg1, _arg2);
terrain = new Terrain((_arg1 * Constants.CELL_WIDTH), (_arg2 * Constants.CELL_HEIGHT));
terrain.render(cellGrid, true, true);
}
public function removeBountyItem(_arg1:BountyItem):void{
if (!_arg1){
return;
};
var _local2:int = bountyItems.lastIndexOf(_arg1);
if (_local2 >= 0){
bountyItems.splice(_local2, 1);
};
_local2 = claimedBountyItems.lastIndexOf(_arg1);
if (_local2 >= 0){
claimedBountyItems.splice(_local2, 1);
};
if (_arg1.cell){
_arg1.cell.removeBountyItem(_arg1);
};
}
public function addCharacter(_arg1:Character):void{
characters.push(_arg1);
_arg1.updateCell(cellGrid);
_arg1.addEventListener(FireEvent.EFFECTS, weaponEffects);
}
public function plantDeployable(_arg1:Deployable, _arg2:Boolean=true):void{
if (!_arg1.owner){
_arg1.index = neutralDeployables.length;
neutralDeployables.push(_arg1);
};
cellGrid.plantDeployable(_arg1);
if (_arg2){
_arg1.playDeploySound();
};
_arg1.addEventListener(DeployableEvent.DAMAGE, deployableDamage, false, 0, true);
_arg1.addEventListener(DeployableEvent.ACTIVATE, deployableActivate, false, 0, true);
if ((_arg1 is SmartDeployable)){
smartDeployables.push(_arg1);
if ((_arg1 is Turret)){
turrets.push(_arg1);
_arg1.addEventListener(FireEvent.FIRE, turretFire, false, 0, true);
};
};
}
public function removeProjectile(_arg1:Projectile):void{
var _local2:int = projectiles.lastIndexOf(_arg1);
if (_local2 >= 0){
projectiles[_local2] = projectiles[(projectiles.length - 1)];
projectiles.pop();
};
_arg1.cell.removeProjectile(_arg1);
_arg1.removeEventListener(ProjectileEvent.PULSE, projectilePulse, false);
_arg1.removeEventListener(ProjectileEvent.EXPLODE, projectileExplode, false);
}
public function removeProp(_arg1:Prop):void{
cellGrid.removeProp(_arg1);
}
public function calculateAIPaths(_arg1:Array):void{
cellGrid.calculateAIPaths(_arg1);
}
public function addParticles(_arg1:Array):void{
var _local2:Particle;
if (_arg1){
for each (_local2 in _arg1) {
if (_local2){
cellGrid.addParticle(_local2);
particles.push(_local2);
};
};
};
}
public function removeCharacter(_arg1:Character):void{
var _local2:int = characters.lastIndexOf(_arg1);
if (_local2 >= 0){
characters.splice(_local2, 1);
};
_arg1.cell.removeCharacter(_arg1);
_arg1.removeEventListener(FireEvent.EFFECTS, weaponEffects);
}
public function calculateAISpawns():void{
var _local2:PlayerSpawn;
var _local1:Array = [];
for each (_local2 in playerSpawns) {
_local1.push(_local2.cell);
};
enemySpawns = cellGrid.findAISpawns(_local1);
}
private function deployableDamage(_arg1:DeployableEvent):void{
if (_arg1.deployable.local){
dispatchEvent(_arg1);
};
}
public function plantObstacle(_arg1:Obstacle):void{
if ((_arg1 is Prop)){
plantProp((_arg1 as Prop));
} else {
if ((_arg1 is Deployable)){
plantDeployable((_arg1 as Deployable));
};
};
}
protected function sortThings(_arg1:Array):void{
var _local3:Thing;
var _local4:int;
var _local5:Thing;
var _local2 = 1;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
_local4 = (_local2 - 1);
while (_local4 >= 0) {
_local5 = _arg1[_local4];
if (_local3.depth < _local5.depth){
_arg1[(_local4 + 1)] = _local5;
_arg1[_local4] = _local3;
} else {
break;
};
_local4--;
};
_local2++;
};
}
public function executeShot(_arg1:Shot):void{
var _local4:TracerHit;
var _local5:Tracer;
var _local6:Number;
var _local7:Deployable;
var _local8:Character;
var _local9:int;
var _local10:TracerHit;
var _local11:TracerHit;
var _local2:Weapon = _arg1.weapon;
var _local3:Character = (_arg1.source as Character);
if (!_local3){
return;
};
if (_arg1.projectile){
addProjectile(_arg1.projectile);
};
if (_arg1.tracers){
for each (_local5 in _arg1.tracers) {
_local5.checkCollisions(cellGrid, characters, _local3);
_local5.drawDebug();
_local6 = _local5.distance;
if (_local2.penetrates){
for each (_local4 in _local5.deployablesHit) {
_local7 = (_local4.thing as Deployable);
if (((((_local7) && (_local7.local))) && (canDamage(_local3, _local7)))){
_local9 = Math.min(_local7.hp, _local2.damage);
_local7.hurt(_local9, _local3);
};
};
for each (_local4 in _local5.charactersHit) {
if (_local4.distance <= _local6){
_local8 = (_local4.thing as Character);
if (((((((_local8) && (_local8.local))) && ((_local8.hp > 0)))) && (canDamage(_local3, _local8)))){
_local9 = Math.min(_local8.hp, _local2.damage);
_local8.hurt(_local9, _local2.weaponID, _local3);
addBlood(_local8, _local9);
};
};
};
} else {
for each (_local4 in _local5.charactersHit) {
_local8 = (_local4.thing as Character);
if (((((((_local8) && (_local8.local))) && ((_local8.hp > 0)))) && (canDamage(_local3, _local8)))){
if (_local4.distance <= _local6){
_local10 = _local4;
};
break;
};
};
if (_local5.deployablesHit.length){
_local4 = _local5.deployablesHit[0];
if (_local4.distance <= _local6){
_local11 = _local4;
};
};
if (((_local10) && (((!(_local11)) || ((_local10.distance < _local11.distance)))))){
_local8 = (_local10.thing as Character);
_local9 = Math.min(_local8.hp, _local2.damage);
_local8.hurt(_local9, _local2.weaponID, _local3);
addBlood(_local8, _local9);
} else {
if (_local11){
_local7 = (_local11.thing as Deployable);
if (((((_local7) && (_local7.local))) && (canDamage(_local3, _local7)))){
_local9 = Math.min(_local7.hp, _local2.damage);
_local7.hurt(_local9, _local3);
};
};
};
};
};
};
_local2.queueShotEffects(_arg1);
}
public function bakeFootsteps():void{
var _local1:Cell;
var _local2:Decal;
var _local3:int;
var _local4:int;
for each (_local1 in cellGrid.getCellList()) {
switch (Textures.list[_local1.textureID]){
default:
_local1.footstepsL = SoundList.FOOTSTEPS_CONCRETE_L;
_local1.footstepsR = SoundList.FOOTSTEPS_CONCRETE_R;
break;
case Textures.GRASS:
_local1.footstepsL = SoundList.FOOTSTEPS_GRASS_L;
_local1.footstepsR = SoundList.FOOTSTEPS_GRASS_R;
break;
case Textures.WOOD:
_local1.footstepsL = SoundList.FOOTSTEPS_WOOD_L;
_local1.footstepsR = SoundList.FOOTSTEPS_WOOD_R;
break;
case Textures.ROCKS:
_local1.footstepsL = SoundList.FOOTSTEPS_GRAVEL_L;
_local1.footstepsR = SoundList.FOOTSTEPS_GRAVEL_R;
break;
};
};
for each (_local2 in terrain.decals) {
if (((_local2.footstepsL) && (_local2.footstepsR))){
_local3 = (_local2.width - 1);
while (_local3 >= 0) {
_local4 = (_local2.height - 1);
while (_local4 >= 0) {
_local1 = cellGrid.cellAt((_local2.x + _local3), (_local2.y + _local4));
if (_local1){
_local1.footstepsL = _local2.footstepsL;
_local1.footstepsR = _local2.footstepsR;
};
_local4--;
};
_local3--;
};
};
};
}
protected function falloffDamage(_arg1:Position, _arg2:Position, _arg3:int, _arg4:Number, _arg5:Number):int{
var _local6:Number = Position.distance(_arg1, _arg2);
if (_local6 < _arg5){
return (_arg3);
};
var _local7:Number = (_arg4 - _arg5);
var _local8:Number = ((_local6 - _arg5) / _local7);
var _local9:Number = 1.4;
return ((0.5 + ((0.5 * _arg3) * (1 - Math.pow(_local8, _local9)))));
}
public function get height():int{
return (cellGrid.height);
}
public function addScreenShake(_arg1:ScreenShake):void{
if (((!(Preferences.shake)) || (!(_arg1)))){
return;
};
if (_arg1){
screenShakes.push(_arg1);
};
}
public function get border():int{
return (cellGrid.border);
}
public function dispose():void{
var _local1:Character;
var _local2:Enemy;
for each (_local1 in characters) {
_local1.dispose();
};
for each (_local2 in enemies) {
_local2.dispose();
};
}
public function resize(_arg1:int, _arg2:int):void{
cellGrid.resize(_arg1, _arg2);
terrain.resize((_arg1 * Constants.CELL_WIDTH), (_arg2 * Constants.CELL_HEIGHT));
terrain.render(cellGrid, true, true);
setBorder(border);
if (gridGraphics){
renderGrid();
};
}
private function projectileExplode(_arg1:ProjectileEvent):void{
var _local3:Number;
var _local2:Projectile = (_arg1.target as Projectile);
if (!_local2){
return;
};
if (_local2.explodes){
_local3 = _local2.altitude;
if ((((_local3 > Character.HEIGHT)) && ((_local3 < (Character.HEIGHT + (_local2.explosionInnerRadius * 0.5)))))){
_local3 = (Character.HEIGHT - 1);
};
doRadialDamage(_local2.explosionDamage, _local2.pos, _local3, _local2.explosionRadius, _local2.explosionInnerRadius, _local2.weaponID, _local2);
};
addParticles(_local2.getParticles());
addScreenShake(_local2.getScreenShake());
_local2.playExplosionSounds();
removeProjectile(_local2);
}
public function claimBountyItem(_arg1:BountyItem):void{
if (!_arg1){
return;
};
removeBountyItem(_arg1);
claimedBountyItems.push(_arg1);
}
protected function doRadialDamage(_arg1:Number, _arg2:Position, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int, _arg7:HasOwner):void{
var _local8:Tracer;
var _local9:TracerHit;
var _local10:Number;
var _local11:Number;
var _local13:Cell;
var _local14:Character;
var _local15:Deployable;
var _local16:int;
var _local12:Number = (_arg4 * _arg4);
for each (_local13 in cellGrid.getCellsIntersecting(new Rectangle((_arg2.x - _arg4), (_arg2.y - _arg4), (_arg4 * 2), (_arg4 * 2)))) {
_local15 = _local13.deployable;
if (((((!(_local15)) || (!(_local15.hp)))) || (!(_local15.local)))){
} else {
if (canDamage(_arg7, _local15)){
_local10 = (_local15.x - _arg2.x);
_local11 = (_local15.y - _arg2.y);
if (((_local10 * _local10) + (_local11 * _local11)) < _local12){
_local8 = new Tracer(_arg2.x, _arg2.y, new Direction(Math.atan2(_local11, _local10)), _arg3, _arg4);
_local8.checkCollisions(cellGrid, characters);
for each (_local9 in _local8.deployablesHit) {
if (_local9.thing == _local15){
_local15.hurt(falloffDamage(_arg2, _local15.pos, _arg1, _arg4, _arg5), _arg7);
break;
};
};
};
};
};
};
for each (_local14 in characters) {
if (_local14.dead){
} else {
if (canDamage(_arg7, _local14)){
_local10 = (_local14.x - _arg2.x);
_local11 = (_local14.y - _arg2.y);
if (((_local10 * _local10) + (_local11 * _local11)) < _local12){
_local8 = new Tracer(_arg2.x, _arg2.y, new Direction(Math.atan2(_local11, _local10)), _arg3, _arg4);
_local8.checkCollisions(cellGrid, characters);
for each (_local9 in _local8.charactersHit) {
if (_local9.thing == _local14){
_local16 = Math.min(_local14.hp, falloffDamage(_arg2, _local14.pos, _arg1, _arg4, _arg5));
_local14.hurt(_local16, _arg6, _arg7);
addBlood(_local14, _local16);
break;
};
};
};
};
};
};
}
public function addCamera(_arg1:SpyCamera):void{
cameras.push(_arg1);
}
public function get borderRect():Rectangle{
return (cellGrid.borderRect);
}
protected function calculateScreenShake(_arg1:Position):Point{
var _local4:ScreenShake;
var _local5:Point;
var _local2:Point = new Point(0, 0);
var _local3:int = (screenShakes.length - 1);
while (_local3 >= 0) {
_local4 = screenShakes[_local3];
_local5 = _local4.calculateShake(_arg1);
_local2.x = (_local2.x + _local5.x);
_local2.y = (_local2.y + _local5.y);
if (_local4.dead){
screenShakes.splice(_local3, 1);
};
_local3--;
};
return (_local2);
}
public function draw(_arg1:BitmapData, _arg2:Boolean=false):void{
var _local5:Thing;
var _local3:Number = (Constants.WINDOW.width * viewScale);
var _local4:Number = (Constants.WINDOW.height * viewScale);
for each (_local5 in focusThings) {
_local5.animate();
};
terrain.draw(_arg1, cameraOffset, new Rectangle(0, 0, _local3, _local4));
if (Preferences.shadows){
if (shadowCanvas){
shadowCanvas.fillRect(shadowCanvas.rect, 0);
} else {
shadowCanvas = new BitmapData(_arg1.width, _arg1.height, true, 0);
};
for each (_local5 in focusThings) {
_local5.drawShadow(shadowCanvas, cameraOffset);
};
shadowCanvas.colorTransform(shadowCanvas.rect, new ColorTransform(0, 0, 0, Constants.SHADOW_ALPHA, 0, 0, 0, 0));
_arg1.copyPixels(shadowCanvas, _arg1.rect, new Point(0, 0));
};
if (_arg2){
if (!gridGraphics){
renderGrid();
};
_arg1.draw(gridGraphics, new Matrix(1, 0, 0, 1, cameraOffset.x, cameraOffset.y));
};
for each (_local5 in focusThings) {
_local5.draw(_arg1, cameraOffset);
};
}
public function get width():int{
return (cellGrid.width);
}
public function getBountyItemByIndex(_arg1:int):BountyItem{
var _local2:BountyItem;
for each (_local2 in bountyItems) {
if (_local2.index == _arg1){
return (_local2);
};
};
for each (_local2 in claimedBountyItems) {
if (_local2.index == _arg1){
return (_local2);
};
};
return (null);
}
public function removeObstacle(_arg1:Obstacle):void{
if ((_arg1 is Prop)){
removeProp((_arg1 as Prop));
} else {
if ((_arg1 is Deployable)){
removeDeployable((_arg1 as Deployable));
};
};
}
protected function weaponEffects(_arg1:FireEvent):void{
var _local2:ShotEffects = _arg1.effects;
if (!_local2){
return;
};
addTracerLines(_local2.tracerLines);
addParticles(_local2.particles);
addScreenShake(_local2.screenShake);
}
protected function evaluateSpawnPoint(_arg1:PlayerSpawn, _arg2:Character):Number{
var _local5:Character;
var _local3:Cell = _arg1.cell;
if (_local3.deployable){
return (Number.POSITIVE_INFINITY);
};
var _local4:Number = 0;
for each (_local5 in characters) {
if (canDamage(_local5, _arg2)){
_local4 = (_local4 + (1 / Math.min(999, Math.max(1, Position.distance(_local5.pos, _arg1.pos)))));
};
};
return (_local4);
}
public function setBorder(_arg1:int):void{
cellGrid.setBorder(_arg1);
}
public function addTracerLines(_arg1:Array):void{
var _local2:TracerLine;
if (_arg1){
for each (_local2 in _arg1) {
tracerLines.push(_local2);
};
};
}
private function projectilePulse(_arg1:ProjectileEvent):void{
var _local7:Cell;
var _local9:Character;
var _local10:Deployable;
var _local2:Projectile = (_arg1.target as Projectile);
if (!_local2){
return;
};
var _local3:HitCircle = _local2.field;
var _local4:Array = _local2.damaged;
if (((!(_local3)) || (!(_local4)))){
return;
};
var _local5:Rectangle = _local3.getBounds();
_local5.inflate(1, 1);
var _local6:Array = cellGrid.getCellsIntersecting(_local5);
var _local8:Array = new Array();
for each (_local7 in _local6) {
if (_local7.deployable){
_local8.push(_local7.deployable);
};
};
for each (_local9 in characters) {
if (_local9.owner == _local2.owner){
} else {
if (!canDamage(_local2, _local9)){
} else {
if (_local9.moveHit.intersects(_local3)){
if (_local4.indexOf(_local9) == -1){
_local9.hurt(_local2.explosionDamage, _local2.weaponID, _local2);
_local4.push(_local9);
};
};
};
};
};
for each (_local10 in _local8) {
if (!canDamage(_local2, _local10)){
} else {
if (_local10.hit.intersects(_local3)){
if (_local4.indexOf(_local10) == -1){
_local10.hurt(_local2.explosionDamage, _local2);
_local4.push(_local10);
};
};
};
};
}
public function removeCamera(_arg1:SpyCamera):void{
var _local2:int = cameras.lastIndexOf(_arg1);
if (_local2 >= 0){
cameras.splice(_local2, 1);
};
}
public function removeBountyItemByIndex(_arg1:int):void{
var _local2:BountyItem = getBountyItemByIndex(_arg1);
if (_local2){
removeBountyItem(_local2);
};
}
private function turretFire(_arg1:FireEvent):void{
var _local6:TracerHit;
var _local7:Tracer;
var _local8:Number;
var _local9:Character;
var _local10:int;
var _local2:Shot = _arg1.shot;
var _local3:Turret = (_local2.source as Turret);
var _local4:Projectile = _local3.getProjectile();
if (_local4){
addProjectile(_local4);
return;
};
var _local5:Array = _local3.getTracers();
if (_local5){
for each (_local7 in _local5) {
_local7.checkCollisions(cellGrid, characters, _local3);
_local7.drawDebug();
_local8 = _local7.distance;
for each (_local6 in _local7.charactersHit) {
if (_local6.distance <= _local8){
_local9 = (_local6.thing as Character);
if (((((_local9) && (_local9.local))) && ((_local9.hp > 0)))){
_local10 = Math.min(_local9.hp, _local3.damage);
_local9.hurt(_local10, _local3.weaponID, _local3);
addBlood(_local9, _local10);
};
};
};
addParticles(_local3.getParticles(_local7));
};
};
}
public function addBountyItem(_arg1:BountyItem):void{
cellGrid.addBountyItem(_arg1);
bountyItems.push(_arg1);
}
public function addBlood(_arg1:Character, _arg2:int):void{
if (!Preferences.blood){
return;
};
_arg2 = (_arg2 + _arg1.bloodWaiting);
var _local3:int = Math.floor((_arg2 / Blood.DAMAGE_PER_SPLAT));
_arg2 = (_arg2 - (_local3 * Blood.DAMAGE_PER_SPLAT));
_arg1.bloodWaiting = _arg2;
var _local4:Blood = new Blood(_arg1.x, _arg1.y, _local3);
cellGrid.addParticle(_local4);
particles.push(_local4);
}
public function addSpawn(_arg1:PlayerSpawn):void{
_arg1.cell = cellGrid.cellAtPos(_arg1.pos);
playerSpawns.push(_arg1);
}
private function deployableActivate(_arg1:DeployableEvent):void{
dispatchEvent(_arg1);
}
public function removeDeployable(_arg1:Deployable):void{
var _local2:int;
cellGrid.removeDeployable(_arg1);
_arg1.removeEventListener(DeployableEvent.DAMAGE, deployableDamage, false);
_arg1.removeEventListener(DeployableEvent.ACTIVATE, deployableActivate, false);
if ((_arg1 is SmartDeployable)){
_local2 = smartDeployables.indexOf(_arg1);
if (_local2 >= 0){
smartDeployables.splice(_local2, 1);
};
if ((_arg1 is Turret)){
_local2 = turrets.indexOf(_arg1);
if (_local2 >= 0){
turrets.splice(_local2, 1);
};
_arg1.removeEventListener(FireEvent.FIRE, turretFire, false);
};
};
}
protected function canDamage(_arg1:HasOwner, _arg2:HasOwner):Boolean{
if (((!(_arg1)) || (!(_arg2)))){
return (true);
};
if (_arg1.owner == _arg2.owner){
return (((_arg1.doTeamDamage) && (_arg2.allowTeamDamage)));
};
if (_arg1.owner.team == 1){
return (true);
};
if (_arg2.owner.team == 1){
return (true);
};
return (!((_arg1.owner.team == _arg2.owner.team)));
}
public function addEnemy(_arg1:Enemy):void{
enemies.push(_arg1);
_arg1.updateCell(cellGrid);
}
public function removeEnemy(_arg1:Enemy):void{
var _local2:int = enemies.lastIndexOf(_arg1);
if (_local2 >= 0){
enemies.splice(_local2, 1);
};
_arg1.cell.removeEnemy(_arg1);
}
public function deployableDeath(_arg1:Deployable, _arg2:HasOwner):void{
if (!_arg2){
_arg2 = _arg1;
};
if (_arg1.explodes){
doRadialDamage(_arg1.explosionDamage, _arg1.pos, 0, _arg1.explosionRadius, _arg1.explosionInnerRadius, _arg1.explodeWeaponID, _arg2);
};
addParticles(_arg1.getDeathParticles());
addScreenShake(_arg1.getDeathScreenShake());
_arg1.playDeathSounds();
removeDeployable(_arg1);
}
public function drawOutlines(_arg1:BitmapData, _arg2:Boolean=false):void{
var _local3:Thing;
for each (_local3 in focusThings) {
if (_local3.showInfraRed){
_local3.draw(_arg1, cameraOffset);
};
};
}
public function process():void{
var _local1:int;
var _local2:SpyCamera;
var _local3:Character;
var _local4:Enemy;
var _local5:SmartDeployable;
var _local6:Projectile;
var _local7:Particle;
var _local8:HitCircle;
var _local9:Array;
var _local10:Cell;
var _local11:Obstacle;
_local1 = (characters.length - 1);
while (_local1 >= 0) {
_local3 = characters[_local1];
if (_local3.active){
_local3.move(cellGrid);
_local3.updateCell(cellGrid);
_local3.process();
};
_local1--;
};
_local1 = (enemies.length - 1);
while (_local1 >= 0) {
_local4 = enemies[_local1];
if (_local4.local){
_local4.move(cellGrid);
};
_local4.updateCell(cellGrid);
_local4.process();
_local1--;
};
_local1 = (smartDeployables.length - 1);
while (_local1 >= 0) {
_local5 = smartDeployables[_local1];
_local5.process(cellGrid, characters);
_local1--;
};
for each (_local2 in cameras) {
_local2.move(cellGrid, viewScale);
};
_local1 = (projectiles.length - 1);
while (_local1 >= 0) {
_local6 = projectiles[_local1];
_local6.process(cellGrid, characters);
_local1--;
};
_local1 = (particles.length - 1);
while (_local1 >= 0) {
_local7 = particles[_local1];
_local7.checkTime();
if (_local7.dead){
if (_local7.decal){
terrain.drawParticle(_local7);
if (_local7.splash){
_local8 = new HitCircle(_local7.pos, _local7.splashRadius);
_local9 = cellGrid.getCellsIntersecting(_local8.getBounds());
for each (_local10 in _local9) {
_local11 = _local10.obstacle;
if (((_local11) && (_local11.hit.intersects(_local8)))){
_local11.stain(_local7);
};
};
};
};
_local7.remove();
particles.splice(_local1, 1);
};
_local1--;
};
}
public function focus(_arg1:Position):void{
var _local7:Turret;
var _local8:Rectangle;
var _local9:int;
var _local10:TracerLine;
_arg1 = _arg1.clone();
this.focusPosition = _arg1;
var _local2:Point = calculateScreenShake(_arg1);
_arg1.x = (_arg1.x + (_local2.x / Constants.CELL_WIDTH));
_arg1.y = (_arg1.y + (_local2.y / Constants.CELL_HEIGHT));
var _local3:Number = (Constants.CAMERA_CELL_X_RADIUS * viewScale);
var _local4:Number = (Constants.CAMERA_CELL_Y_RADIUS * viewScale);
var _local5:Number = (Constants.WINDOW.width * viewScale);
var _local6:Number = (Constants.WINDOW.height * viewScale);
for each (_local7 in turrets) {
_local7.cameraFocus = _arg1.clone();
};
SoundControl.setFocus(_arg1);
SoundControl.process();
_arg1.x = Math.max((borderRect.left + _local3), Math.min((borderRect.right - _local3), _arg1.x));
_arg1.y = Math.max((borderRect.top + _local4), Math.min((borderRect.bottom - _local4), _arg1.y));
Debug.focus(_arg1);
cameraOffset = new Point(Math.round(((-(_arg1.x) * Constants.CELL_WIDTH) + (_local5 / 2))), Math.round(((-(_arg1.y) * Constants.CELL_HEIGHT) + (_local6 / 2))));
_local8 = new Rectangle((_arg1.x - _local3), (_arg1.y - _local4), (_local3 * 2), (_local4 * 2));
_local8.inflate(4, 4);
_local8.height = (_local8.height + 1);
focusThings = cellGrid.getThingsIntersecting(_local8);
_local9 = (tracerLines.length - 1);
while (_local9 >= 0) {
_local10 = tracerLines[_local9];
if (Time.current > _local10.endTime){
tracerLines.splice(_local9, 1);
} else {
focusThings.push(_local10);
};
_local9--;
};
sortThings(focusThings);
}
public function plantProp(_arg1:Prop):Boolean{
return (cellGrid.plantProp(_arg1));
}
public function addProjectile(_arg1:Projectile):void{
projectiles.push(_arg1);
_arg1.updateCell(cellGrid);
_arg1.addEventListener(ProjectileEvent.PULSE, projectilePulse, false, 0, true);
_arg1.addEventListener(ProjectileEvent.EXPLODE, projectileExplode, false, 0, true);
var _local2:Array = _arg1.getTrail();
if (_local2){
addParticles(_local2);
};
}
public function renderGrid():void{
gridGraphics = new Shape();
var _local1:Graphics = gridGraphics.graphics;
_local1.lineStyle(0, 0xFFFF00, 0.1);
var _local2:int = (cellGrid.width - 1);
while (_local2 >= 1) {
_local1.moveTo((_local2 * Constants.CELL_WIDTH), 0);
_local1.lineTo((_local2 * Constants.CELL_WIDTH), (cellGrid.height * Constants.CELL_HEIGHT));
_local2--;
};
var _local3:int = (cellGrid.height - 1);
while (_local3 >= 1) {
_local1.moveTo(0, (_local3 * Constants.CELL_HEIGHT));
_local1.lineTo((cellGrid.width * Constants.CELL_WIDTH), (_local3 * Constants.CELL_HEIGHT));
_local3--;
};
}
public function spawnCharacter(_arg1:Character):void{
var _local2:PlayerSpawn;
var _local6:Number;
if (!playerSpawns.length){
return;
};
var _local3:Array = [];
var _local4:Number = Number.POSITIVE_INFINITY;
var _local5:int;
for (;_local5 < playerSpawns.length;_local5++) {
_local2 = playerSpawns[_local5];
_local6 = evaluateSpawnPoint(_local2, _arg1);
if (_local6 == Number.POSITIVE_INFINITY){
continue;
} else {
if (_local6 < _local4){
if ((_local6 * 2) < _local4){
_local3 = [_local2];
} else {
_local3.push(_local2);
if (_local3.length > 3){
_local3.shift();
};
};
_local4 = _local6;
} else {
if (_local6 == _local4){
_local3.push(_local2);
};
};
};
};
if (!_local3.length){
return;
};
_local2 = _local3[int((Math.random() * _local3.length))];
_arg1.pos.copy(_local2.pos);
_arg1.updateCell(cellGrid);
}
}
}//package boxhead.world
Section 406
//MapInfo (boxhead.world.MapInfo)
package boxhead.world {
import boxhead.world.thing.obstacle.*;
import boxhead.world.decal.*;
import boxhead.world.thing.obstacle.prop.*;
import boxhead.editor.*;
import MMOcha.utils.*;
public class MapInfo {
public var name:String;
public var mapString:String;
public var slot:int;
private static const DELIM:String = ";";
public static const BOUNTY_ACCOUNT:String = "BBHLITEMAPS";
private static const currentMapFormat:String = "1";
private static const SPAWN:String = "s";
public static var mapList:Array = new Array();
public function MapInfo(_arg1:int, _arg2:String, _arg3:String=null):void{
this.slot = _arg1;
this.name = _arg2;
this.mapString = _arg3;
}
public function create():Map{
if (mapString){
return (load(mapString));
};
return (null);
}
public static function load(_arg1:String, _arg2:Boolean=false):Map{
var _local4:Map;
var _local3:String = _arg1.charAt(0);
switch (_local3){
case "1":
default:
_local4 = load1(_arg1.substr(1), _arg2);
};
return (_local4);
}
private static function decalFromString(_arg1:int, _arg2:int, _arg3:String):Decal{
var _local5:Decal;
var _local4:int = StringFunctions.fromAlphaNumericCharacter(_arg3.charAt(1));
switch (_arg3.charAt(0)){
default:
return (null);
case "a":
_local5 = new Cracks(_local4);
break;
case "b":
_local5 = new Curb(_local4);
break;
case "c":
_local5 = new RoadLines(_local4);
break;
case "d":
_local5 = new FloorDamage(_local4);
break;
case "e":
_local5 = new GrassBits(_local4);
break;
case "f":
_local5 = new GrassRockEdge(_local4);
break;
case "g":
_local5 = new Sidewalk(_local4);
break;
};
_local5.x = _arg1;
_local5.y = _arg2;
return (_local5);
}
private static function stringFromObstacle(_arg1:Object):String{
var _local2:int = Prop(_arg1).variant;
var _local3:String = StringFunctions.toAlphaNumericCharacter(_local2);
switch (_arg1.constructor){
case PlayerSpawnMarker:
default:
return ((SPAWN + _local3));
case Wall:
return (("w" + _local3));
case Tree:
return (("t" + _local3));
case Rock:
return (("r" + _local3));
case Crate:
return (("c" + _local3));
case TrashCan:
return (("u" + StringFunctions.toAlphaNumericCharacter((_local2 + 0))));
case FireHydrant:
return (("u" + StringFunctions.toAlphaNumericCharacter((_local2 + 10))));
case Mailbox:
return (("u" + StringFunctions.toAlphaNumericCharacter((_local2 + 20))));
case Fence:
return (("f" + StringFunctions.toAlphaNumericCharacter((_local2 + 0))));
case BrickWall:
return (("f" + StringFunctions.toAlphaNumericCharacter((_local2 + 10))));
case CastleWall:
return (("f" + StringFunctions.toAlphaNumericCharacter((_local2 + 20))));
case Factory:
return (("b" + StringFunctions.toAlphaNumericCharacter(_local2)));
case StoreFrontSmall:
return (("b" + StringFunctions.toAlphaNumericCharacter((_local2 + 10))));
case StoreFrontLarge:
return (("b" + StringFunctions.toAlphaNumericCharacter((_local2 + 20))));
case Car:
return (("a" + _local3));
};
}
private static function load1(_arg1:String, _arg2:Boolean):Map{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:Cell;
var _local9:Array = _arg1.split(DELIM);
var _local10:int = parseInt(_local9.shift());
var _local11:int = parseInt(_local9.shift());
if (((!(_local10)) || (!(_local11)))){
return (errorMap("Invalid dimensions"));
};
var _local12:Map = new Map(_local10, _local11);
_arg1 = _local9.shift();
_local3 = 0;
_local4 = 0;
_local6 = "";
while (_arg1.length > 0) {
_local7 = _arg1.charAt(0);
if (isNaN(parseInt(_local7))){
_local5 = parseInt(_local6);
if (_local5 > 0){
_local3 = (_local3 + _local5);
};
_local6 = "";
while (_local3 >= _local10) {
_local3 = (_local3 - _local10);
_local4++;
};
if (((!(_arg2)) && ((_local7 == SPAWN)))){
_local12.addSpawn(new PlayerSpawn(new Position((_local3 + 0.5), (_local4 + 0.5)), parseInt(_arg1.charAt(1))));
} else {
_local12.plantObstacle(obstacleFromString(_local3, _local4, _arg1.substr(0, 2)));
};
_arg1 = _arg1.substr(2);
_local3++;
} else {
_local6 = (_local6 + _local7);
_arg1 = _arg1.substr(1);
};
};
_arg1 = _local9.shift();
var _local13:uint = uint(("0x" + _arg1.substr(0, 6)));
var _local14:int = (StringFunctions.fromAlphaNumericCharacter(_arg1.charAt(6)) - 1);
if (_local14 >= Terrain.reliefs.length){
return (errorMap("Invalid texture"));
};
_local12.terrain.backgroundColor = _local13;
_local12.terrain.relief = Terrain.reliefs[_local14];
_arg1 = _arg1.substr(7);
_local3 = 0;
_local4 = 0;
_local6 = "";
var _local15:int;
while (_arg1.length > 0) {
_local7 = _arg1.charAt(0);
if (isNaN(parseInt(_local7))){
_local5 = parseInt(_local6);
while (_local5 > 0) {
_local8 = _local12.cellGrid.cellAt(_local3, _local4);
_local8.textureID = _local15;
_local3++;
if (_local3 >= _local10){
_local3 = (_local3 - _local10);
_local4++;
};
_local5--;
};
_local6 = "";
_local15 = StringFunctions.fromAlphaCharacter(_local7);
_local8 = _local12.cellGrid.cellAt(_local3, _local4);
_local8.textureID = _local15;
_local3++;
_arg1 = _arg1.substr(1);
} else {
_local6 = (_local6 + _local7);
_arg1 = _arg1.substr(1);
};
};
while (_local4 < _local11) {
_local8 = _local12.cellGrid.cellAt(_local3, _local4);
_local8.textureID = _local15;
_local3++;
if (_local3 >= _local10){
_local3 = (_local3 - _local10);
_local4++;
};
};
_arg1 = _local9.shift();
_local3 = 0;
_local4 = 0;
_local6 = "";
while (_arg1.length > 0) {
_local7 = _arg1.charAt(0);
if (isNaN(parseInt(_local7))){
_local5 = parseInt(_local6);
if (_local5 > 0){
_local3 = (_local3 + _local5);
};
_local6 = "";
while (_local3 >= _local10) {
_local3 = (_local3 - _local10);
_local4++;
};
_local12.terrain.decals.push(decalFromString(_local3, _local4, _arg1.substr(0, 2)));
_arg1 = _arg1.substr(2);
_local3++;
} else {
_local6 = (_local6 + _local7);
_arg1 = _arg1.substr(1);
};
};
_arg1 = _local9.shift();
if (((_arg1) && ((_arg1.length > 0)))){
_local12.setBorder(parseInt(_arg1.charAt(0)));
} else {
_local12.setBorder(0);
};
_local12.terrain.render(_local12.cellGrid, true, true);
_local12.bakeFootsteps();
return (_local12);
}
private static function errorMap(_arg1:String):Map{
Debug.error(("Error loading map: " + _arg1));
return (null);
}
private static function obstacleFromString(_arg1:int, _arg2:int, _arg3:String):Obstacle{
var _local5:Obstacle;
var _local4:int = StringFunctions.fromAlphaNumericCharacter(_arg3.charAt(1));
switch (_arg3.charAt(0)){
default:
return (null);
case SPAWN:
_local5 = new PlayerSpawnMarker(_local4);
break;
case "w":
_local5 = new Wall(_local4);
break;
case "t":
_local5 = new Tree(_local4);
break;
case "r":
_local5 = new Rock(_local4);
break;
case "c":
_local5 = new Crate(_local4);
break;
case "u":
if (_local4 >= 20){
_local5 = new Mailbox((_local4 - 20));
} else {
if (_local4 >= 10){
_local5 = new FireHydrant((_local4 - 10));
} else {
_local5 = new TrashCan(_local4);
};
};
break;
case "f":
if (_local4 >= 20){
_local5 = new CastleWall((_local4 - 20));
} else {
if (_local4 >= 10){
_local5 = new BrickWall((_local4 - 10));
} else {
_local5 = new Fence(_local4);
};
};
break;
case "b":
if (_local4 >= 20){
_local5 = new StoreFrontLarge((_local4 - 20));
} else {
if (_local4 >= 10){
_local5 = new StoreFrontSmall((_local4 - 10));
} else {
_local5 = new Factory(_local4);
};
};
break;
case "a":
_local5 = new Car(_local4);
break;
};
_local5.x = _arg1;
_local5.y = _arg2;
return (_local5);
}
public static function save(_arg1:Map):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Cell;
var _local11:Decal;
var _local12:Decal;
var _local13:int;
var _local6:String = ((((("" + currentMapFormat) + _arg1.width) + DELIM) + _arg1.height) + DELIM);
_local4 = 0;
_local3 = 0;
while (_local3 < _arg1.height) {
_local2 = 0;
while (_local2 < _arg1.width) {
_local5 = _arg1.cellGrid.cellAt(_local2, _local3);
if (_local5.obstacle){
if (_local4){
_local6 = (_local6 + _local4);
};
_local4 = 0;
_local6 = (_local6 + stringFromObstacle(_local5.obstacle));
} else {
_local4++;
};
_local2++;
};
_local3++;
};
_local6 = (_local6 + DELIM);
var _local7:String = _arg1.terrain.backgroundColor.toString(16).substr(0, 6);
while (_local7.length < 6) {
_local7 = ("0" + _local7);
};
_local6 = (_local6 + _local7);
_local6 = (_local6 + StringFunctions.toAlphaNumericCharacter((Terrain.reliefs.indexOf(_arg1.terrain.relief) + 1)));
_local4 = 0;
var _local8 = -1;
_local3 = 0;
while (_local3 < _arg1.height) {
_local2 = 0;
while (_local2 < _arg1.width) {
_local5 = _arg1.cellGrid.cellAt(_local2, _local3);
if (_local5.textureID == _local8){
_local4++;
} else {
if (_local4){
_local6 = (_local6 + _local4);
};
_local4 = 0;
_local8 = _local5.textureID;
_local6 = (_local6 + StringFunctions.toAlphaCharacter(_local8));
};
_local2++;
};
_local3++;
};
_local6 = (_local6 + DELIM);
var _local9:Array = _arg1.terrain.decals.concat();
_local2 = 0;
while (_local2 < _local9.length) {
_local11 = _local9[_local2];
_local3 = (_local2 + 1);
while (_local3 < _local9.length) {
_local12 = _local9[_local3];
if ((((_local12.y < _local11.y)) || ((((_local12.y == _local11.y)) && ((_local12.x < _local11.x)))))){
_local9[_local3] = _local11;
_local9[_local2] = _local12;
_local11 = _local12;
};
_local3++;
};
_local2++;
};
var _local10 = -1;
_local2 = 0;
while (_local2 < _local9.length) {
_local11 = _local9[_local2];
_local13 = ((_local11.y * _arg1.width) + _local11.x);
_local4 = ((_local13 - _local10) - 1);
if (_local4 > 0){
_local6 = (_local6 + _local4);
};
_local6 = (_local6 + stringFromDecal(_local11));
_local10 = _local13;
_local2++;
};
_local6 = (_local6 + DELIM);
_local6 = (_local6 + _arg1.border);
return (_local6);
}
private static function stringFromDecal(_arg1:Decal):String{
var _local2:String = StringFunctions.toAlphaNumericCharacter(_arg1.variant);
switch (Object(_arg1).constructor){
case Cracks:
default:
return (("a" + _local2));
case Curb:
return (("b" + _local2));
case RoadLines:
return (("c" + _local2));
case FloorDamage:
return (("d" + _local2));
case GrassBits:
return (("e" + _local2));
case GrassRockEdge:
return (("f" + _local2));
case Sidewalk:
return (("g" + _local2));
};
}
}
}//package boxhead.world
Section 407
//PlayerSpawn (boxhead.world.PlayerSpawn)
package boxhead.world {
public class PlayerSpawn {
public var cell:Cell;
public var variant:int;
public var pos:Position;
public static const RED:uint = 2;
public static const NEUTRAL:uint = 1;
public static const BLUE:uint = 4;
public function PlayerSpawn(_arg1:Position, _arg2:int){
this.pos = _arg1.clone();
this.variant = _arg2;
}
}
}//package boxhead.world
Section 408
//Position (boxhead.world.Position)
package boxhead.world {
import flash.geom.*;
import boxhead.security.*;
public class Position {
private var storedX:StoredNumber;
private var storedY:StoredNumber;
public function Position(_arg1:Number=0, _arg2:Number=0){
storedX = new StoredNumber();
storedY = new StoredNumber();
super();
this.x = _arg1;
this.y = _arg2;
}
public function add(_arg1:Position):Position{
return (new Position((x + _arg1.x), (y + _arg1.y)));
}
public function subtractPoint(_arg1:Point):Position{
return (new Position((x - _arg1.x), (y - _arg1.y)));
}
public function difference(_arg1:Position):Point{
return (new Point((x - _arg1.x), (y - _arg1.y)));
}
public function get renderOffset():Point{
return (new Point(Math.round((x * Constants.CELL_WIDTH)), Math.round((y * Constants.CELL_HEIGHT))));
}
public function toString():String{
return (((("x=" + x) + ", y=") + y));
}
public function addPoint(_arg1:Point):Position{
return (new Position((x + _arg1.x), (y + _arg1.y)));
}
public function set x(_arg1:Number):void{
storedX.value = _arg1;
}
public function set y(_arg1:Number):void{
storedY.value = _arg1;
}
public function subtract(_arg1:Position):Position{
return (new Position((x - _arg1.x), (y - _arg1.y)));
}
public function get x():Number{
return (storedX.value);
}
public function get y():Number{
return (storedY.value);
}
public function getPoint():Point{
return (new Point(x, y));
}
public function copyPoint(_arg1:Point):void{
x = _arg1.x;
y = _arg1.y;
}
public function copy(_arg1:Position):void{
x = _arg1.x;
y = _arg1.y;
}
public function clone():Position{
return (new Position(x, y));
}
public static function atan(_arg1:Position, _arg2:Position):Number{
return (Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)));
}
public static function interpolate(_arg1:Position, _arg2:Position, _arg3:Number):Position{
return (new Position((_arg2.x + ((_arg1.x - _arg2.x) * _arg3)), (_arg2.y + ((_arg1.y - _arg2.y) * _arg3))));
}
public static function distance(_arg1:Position, _arg2:Position):Number{
var _local3:Number = (_arg2.x - _arg1.x);
var _local4:Number = (_arg2.y - _arg1.y);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
public static function getRenderOffset(_arg1:Number, _arg2:Number):Point{
return (new Point(Math.round((_arg1 * Constants.CELL_WIDTH)), Math.round((_arg2 * Constants.CELL_HEIGHT))));
}
}
}//package boxhead.world
Section 409
//ScreenShake (boxhead.world.ScreenShake)
package boxhead.world {
import flash.geom.*;
public class ScreenShake {
protected var start:int;
protected var sx:Number;
protected var length:int;
public var dead:Boolean;// = false
protected var sy:Number;
protected var pos:Position;
protected var waveLength:Number;
protected static const SHAKE_MIN:Number = 0.1;
protected static const SHAKE_RANGE:Number = 12;
public function ScreenShake(_arg1:Position, _arg2:Number=2, _arg3:int=1000){
start = Time.current;
this.pos = _arg1.clone();
this.length = _arg3;
waveLength = 100;
var _local4:Number = ((Math.random() * Math.PI) * 2);
sx = (Math.cos(_local4) * _arg2);
sy = (Math.sin(_local4) * _arg2);
}
public function calculateShake(_arg1:Position):Point{
var _local2:int = (Time.current - start);
var _local3:Number = Math.max(0, ((length - _local2) / length));
if (_local3 <= 0){
dead = true;
};
var _local4:Number = (SHAKE_MIN + (Math.max(0, ((SHAKE_RANGE - Position.distance(pos, _arg1)) / SHAKE_RANGE)) * (1 - SHAKE_MIN)));
var _local5:Number = ((Math.sin((((_local2 / waveLength) * Math.PI) * 2)) * _local3) * _local4);
return (new Point((sx * _local5), (sy * _local5)));
}
public static function generateSmall(_arg1:Position):ScreenShake{
return (new ScreenShake(_arg1, 1.5, 400));
}
}
}//package boxhead.world
Section 410
//Terrain (boxhead.world.Terrain)
package boxhead.world {
import boxhead.assets.*;
import boxhead.world.decal.*;
import flash.display.*;
import flash.geom.*;
import boxhead.world.thing.particle.*;
public class Terrain {
private var _height:int;
private var _width:int;
public var relief:BitmapData;
public var backgroundColor:uint;
private var plates:Array;
public var decals:Array;
private var xPlates:int;
private var yPlates:int;
protected static const RELIEF_ALPHA:Number = 0.55;
public static const reliefs:Array = [Textures.RELIEF1, Textures.RELIEF2, Textures.RELIEF3];
public static const DEFAULT_BG_COLOR:uint = 15457479;
private static var PLATE_SIZE:int = 2880;
public function Terrain(_arg1:int, _arg2:int){
backgroundColor = DEFAULT_BG_COLOR;
relief = Textures.RELIEF1;
decals = new Array();
resize(_arg1, _arg2);
}
public function draw(_arg1:BitmapData, _arg2:Point, _arg3:Rectangle):void{
var _local13:int;
var _local14:BitmapData;
var _local4:int = -(_arg2.x);
var _local5:int = -(_arg2.y);
var _local6:int = int((_local4 / PLATE_SIZE));
var _local7:int = int((_local5 / PLATE_SIZE));
var _local8:int = int(((_local4 + _arg3.width) / PLATE_SIZE));
var _local9:int = int(((_local5 + _arg3.height) / PLATE_SIZE));
var _local10:Rectangle = _arg3.clone();
var _local11:Point = new Point(0, 0);
var _local12:int = _local7;
while (_local12 <= _local9) {
_local13 = _local6;
while (_local13 <= _local8) {
_local14 = plates[_local13][_local12];
_local10.x = (_local4 - (_local13 * PLATE_SIZE));
_local10.y = (_local5 - (_local12 * PLATE_SIZE));
_arg1.copyPixels(_local14, _local10, _local11);
_local13++;
};
_local12++;
};
}
public function get width():int{
return (_width);
}
public function render(_arg1:CellGrid, _arg2:Boolean, _arg3:Boolean):void{
var _local4:int;
var _local5:int;
var _local6:BitmapData;
var _local7:Graphics;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:Cell;
var _local17:BitmapData;
var _local18:Sprite;
_local4 = 0;
while (_local4 < xPlates) {
_local5 = 0;
while (_local5 < yPlates) {
_local6 = plates[_local4][_local5];
plates[_local4][_local5].fillRect(_local6.rect, backgroundColor);
_local5++;
};
_local4++;
};
var _local8:Rectangle = new Rectangle(0, 0, Constants.CELL_WIDTH, Constants.CELL_HEIGHT);
var _local9:Point = new Point();
_local4 = 0;
while (_local4 < xPlates) {
_local5 = 0;
while (_local5 < yPlates) {
_local6 = plates[_local4][_local5];
_local10 = int(((_local4 * PLATE_SIZE) / Constants.CELL_WIDTH));
_local11 = int(((_local5 * PLATE_SIZE) / Constants.CELL_HEIGHT));
_local12 = int((((_local4 + 1) * PLATE_SIZE) / Constants.CELL_WIDTH));
_local13 = int((((_local5 + 1) * PLATE_SIZE) / Constants.CELL_HEIGHT));
_local14 = _local10;
while (_local14 <= _local12) {
_local15 = _local11;
while (_local15 <= _local13) {
_local16 = _arg1.cellAt(_local14, _local15);
_local17 = Textures.list[_local16.textureID];
if (!_local17){
} else {
_local8.x = ((_local14 * Constants.CELL_WIDTH) % _local17.width);
_local8.y = ((_local15 * Constants.CELL_HEIGHT) % _local17.height);
_local9.x = ((_local14 * Constants.CELL_WIDTH) - (_local4 * PLATE_SIZE));
_local9.y = ((_local15 * Constants.CELL_HEIGHT) - (_local5 * PLATE_SIZE));
_local6.copyPixels(_local17, _local8, _local9);
};
_local15++;
};
_local14++;
};
_local5++;
};
_local4++;
};
if (_arg2){
renderDecals(decals);
};
if (((_arg3) && (relief))){
_local18 = new Sprite();
_local7 = _local18.graphics;
_local7.beginBitmapFill(relief, new Matrix((_width / relief.width), 0, 0, (_height / relief.height)));
_local7.drawRect(0, 0, _width, _height);
_local7.endFill();
_local4 = 0;
while (_local4 < xPlates) {
_local5 = 0;
while (_local5 < yPlates) {
_local6 = plates[_local4][_local5];
_local6.draw(_local18, new Matrix(1, 0, 0, 1, (-(_local4) * PLATE_SIZE), (-(_local5) * PLATE_SIZE)), new ColorTransform(1, 1, 1, RELIEF_ALPHA), BlendMode.OVERLAY);
_local5++;
};
_local4++;
};
};
}
public function renderCell(_arg1:Cell):void{
var _local10:int;
var _local11:BitmapData;
var _local12:Rectangle;
var _local13:Point;
var _local2:BitmapData = Textures.list[_arg1.textureID];
var _local3:int = (_arg1.x * Constants.CELL_WIDTH);
var _local4:int = (_arg1.y * Constants.CELL_HEIGHT);
var _local5:int = int((_local3 / PLATE_SIZE));
var _local6:int = int((_local4 / PLATE_SIZE));
var _local7:int = int(((_local3 + Constants.CELL_WIDTH) / PLATE_SIZE));
var _local8:int = int(((_local4 + Constants.CELL_HEIGHT) / PLATE_SIZE));
var _local9:int = _local6;
while (_local9 <= _local8) {
_local10 = _local5;
while (_local10 <= _local7) {
_local11 = plates[_local10][_local9];
_local12 = new Rectangle(0, 0, Constants.CELL_WIDTH, Constants.CELL_HEIGHT);
_local13 = new Point(((_arg1.x * Constants.CELL_WIDTH) - (_local10 * PLATE_SIZE)), ((_arg1.y * Constants.CELL_HEIGHT) - (_local9 * PLATE_SIZE)));
if (_local2){
_local12.x = ((_arg1.x * Constants.CELL_WIDTH) % _local2.width);
_local12.y = ((_arg1.y * Constants.CELL_HEIGHT) % _local2.height);
_local11.copyPixels(_local2, _local12, _local13);
} else {
_local12.x = _local13.x;
_local12.y = _local13.y;
_local11.fillRect(_local12, backgroundColor);
};
_local10++;
};
_local9++;
};
}
public function renderDecals(_arg1:Array):void{
var _local2:Decal;
if (!_arg1){
return;
};
for each (_local2 in _arg1) {
renderDecal(_local2);
};
}
public function get height():int{
return (_height);
}
public function resize(_arg1:int, _arg2:int):void{
var _local4:Array;
var _local5:BitmapData;
var _local6:int;
if (plates){
while (plates.length) {
_local4 = plates.pop();
while (_local4.length) {
_local5 = _local4.pop();
_local5.dispose();
};
};
};
_width = _arg1;
_height = _arg2;
xPlates = Math.ceil((_width / PLATE_SIZE));
yPlates = Math.ceil((_height / PLATE_SIZE));
plates = new Array();
var _local3:int = xPlates;
while (_local3 >= 0) {
plates[_local3] = new Array();
_local6 = yPlates;
while (_local6 >= 0) {
_arg1 = PLATE_SIZE;
if (_local3 == (xPlates - 1)){
_arg1 = (_width - (PLATE_SIZE * (xPlates - 1)));
};
_arg2 = PLATE_SIZE;
if (_local6 == (yPlates - 1)){
_arg2 = (_height - (PLATE_SIZE * (yPlates - 1)));
};
plates[_local3][_local6] = new BitmapData(_arg1, _arg2, false, 0);
_local6--;
};
_local3--;
};
}
protected function renderDecal(_arg1:Decal):void{
var _local9:int;
var _local10:Point;
var _local11:BitmapData;
var _local2:int = (_arg1.pos.x * Constants.CELL_WIDTH);
var _local3:int = (_arg1.pos.y * Constants.CELL_HEIGHT);
var _local4:int = int((_local2 / PLATE_SIZE));
var _local5:int = int((_local3 / PLATE_SIZE));
var _local6:int = int(((_local2 + (_arg1.width * Constants.CELL_WIDTH)) / PLATE_SIZE));
var _local7:int = int(((_local3 + (_arg1.height * Constants.CELL_HEIGHT)) / PLATE_SIZE));
var _local8:int = _local5;
while (_local8 <= _local7) {
_local9 = _local4;
while (_local9 <= _local6) {
_local10 = new Point((-(_local9) * PLATE_SIZE), (-(_local8) * PLATE_SIZE));
_local11 = plates[_local9][_local8];
_arg1.draw(_local11, _local10);
_local9++;
};
_local8++;
};
}
public function drawParticle(_arg1:Particle):void{
var _local8:int;
var _local9:Point;
var _local10:BitmapData;
var _local2:Point = _arg1.renderOffset;
var _local3:int = int(((_local2.x - Particle.MAX_RENDER_RADIUS) / PLATE_SIZE));
var _local4:int = int(((_local2.y - Particle.MAX_RENDER_RADIUS) / PLATE_SIZE));
var _local5:int = int(((_local2.x + Particle.MAX_RENDER_RADIUS) / PLATE_SIZE));
var _local6:int = int(((_local2.y + Particle.MAX_RENDER_RADIUS) / PLATE_SIZE));
var _local7:int = _local4;
while (_local7 <= _local6) {
_local8 = _local3;
while (_local8 <= _local5) {
_local9 = new Point((-(_local8) * PLATE_SIZE), (-(_local7) * PLATE_SIZE));
_local10 = plates[_local8][_local7];
_arg1.drawDecal(_local10, _local9);
_local8++;
};
_local7++;
};
}
}
}//package boxhead.world
Section 411
//Tracer (boxhead.world.Tracer)
package boxhead.world {
import flash.geom.*;
import boxhead.world.hit.*;
import boxhead.world.thing.character.*;
import boxhead.world.thing.*;
public class Tracer {
public var charactersHit:Array;
public var dir:Direction;
public var angle:Number;
public var dx:Number;
public var dy:Number;
public var deployablesHit:Array;
public var start:Point;
public var altitude:Number;
public var propHit:TracerHit;
public var distance:Number;
public var startX:Number;
public var startY:Number;
public var maxRange:Number;
public function Tracer(_arg1:Number, _arg2:Number, _arg3:Direction, _arg4:Number, _arg5:Number){
deployablesHit = new Array();
charactersHit = new Array();
startX = _arg1;
startY = _arg2;
start = new Point(_arg1, _arg2);
this.dir = _arg3;
angle = _arg3.radians;
dx = _arg3.dx;
dy = _arg3.dy;
this.altitude = _arg4;
this.maxRange = _arg5;
}
protected function scanCellgrid(_arg1:CellGrid, _arg2:Array, _arg3:Thing):void{
var _local4:int;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local5:Cell = _arg1.cellAt(startX, startY);
if (Math.abs(dx) < 0.0001){
if (dy > 0){
_local4 = 0;
while ((((_local4 < maxRange)) && (_local5))) {
if (checkCell(_local5)){
return;
};
_local5 = _local5.s;
_local4++;
};
} else {
if (dy < 0){
_local4 = 0;
while ((((_local4 > -(maxRange))) && (_local5))) {
if (checkCell(_local5)){
return;
};
_local5 = _local5.n;
_local4--;
};
} else {
return;
};
};
} else {
_local6 = (dy / dx);
_local7 = (startY - (_local6 * startX));
_local8 = 0;
_local9 = 0;
if (dx > 0){
if (dy > 0){
while (_local5) {
_local10 = int(((startX + _local8) + 1));
_local11 = int(((_local6 * _local10) + _local7));
while (_local5) {
if (((_local9 * _local9) + (_local8 * _local8)) > (maxRange * maxRange)){
return;
};
if (checkCell(_local5)){
return;
};
if (int((startY + _local9)) < _local11){
_local9++;
_local5 = _local5.s;
} else {
_local8++;
_local5 = _local5.e;
break;
};
};
};
} else {
if (dy < 0){
while (_local5) {
_local10 = int(((startX + _local8) + 1));
_local11 = int(((_local6 * _local10) + _local7));
while (_local5) {
if (((_local9 * _local9) + (_local8 * _local8)) > (maxRange * maxRange)){
return;
};
if (checkCell(_local5)){
return;
};
if (int((startY + _local9)) > _local11){
_local9--;
_local5 = _local5.n;
} else {
_local8++;
_local5 = _local5.e;
break;
};
};
};
} else {
_local4 = 0;
while ((((_local4 < maxRange)) && (_local5))) {
if (checkCell(_local5)){
return;
};
_local5 = _local5.e;
_local4++;
};
};
};
} else {
if (dx < 0){
if (dy > 0){
while (_local5) {
_local10 = int((startX + _local8));
_local11 = int(((_local6 * _local10) + _local7));
while (_local5) {
if (((_local9 * _local9) + (_local8 * _local8)) > (maxRange * maxRange)){
return;
};
if (checkCell(_local5)){
return;
};
if (int((startY + _local9)) < _local11){
_local9++;
_local5 = _local5.s;
} else {
_local8--;
_local5 = _local5.w;
break;
};
};
};
} else {
if (dy < 0){
while (_local5) {
_local10 = int((startX + _local8));
_local11 = int(((_local6 * _local10) + _local7));
while (_local5) {
if (((_local9 * _local9) + (_local8 * _local8)) > (maxRange * maxRange)){
return;
};
if (checkCell(_local5)){
return;
};
if (int((startY + _local9)) > _local11){
_local9--;
_local5 = _local5.n;
} else {
_local8--;
_local5 = _local5.w;
break;
};
};
};
} else {
_local4 = 0;
while ((((_local4 > -(maxRange))) && (_local5))) {
if (checkCell(_local5)){
return;
};
_local5 = _local5.w;
_local4--;
};
};
};
};
};
};
}
protected function checkCell(_arg1:Cell):Boolean{
var _local2:TraceCollision;
var _local3:HitShape;
if (_arg1.prop){
if (altitude > _arg1.prop.height){
return (false);
};
_local3 = _arg1.prop.hit;
while (_local3 != null) {
_local2 = _local3.traceLine(start, angle, dx, dy);
if (_local2){
if (((!(propHit)) || ((_local2.distance < propHit.distance)))){
propHit = new TracerHit(_local2.impact, _local2.distance, _arg1.prop);
};
};
_local3 = _local3.next;
};
if (propHit){
return (true);
};
} else {
if (_arg1.deployable){
if (altitude > _arg1.deployable.height){
return (false);
};
_local2 = _arg1.deployable.hit.traceLine(start, angle, dx, dy);
if (_local2){
deployablesHit.push(new TracerHit(_local2.impact, _local2.distance, _arg1.deployable));
return (false);
};
};
};
return (false);
}
public function drawDebug():void{
var _local2:TracerHit;
var _local3:TracerHit;
var _local1:Number = maxRange;
if (((propHit) && ((propHit.distance < _local1)))){
_local1 = propHit.distance;
};
if (propHit){
Debug.drawLine(start, propHit.impact, 0xFF0000);
Debug.drawCircle(propHit.impact.x, propHit.impact.y, 0.05, 0xFF8000);
} else {
Debug.drawLine(start, start.add(new Point((dx * _local1), (dy * _local1))), 0xFFFF00, 0.3);
};
for each (_local3 in deployablesHit) {
if (((!(_local2)) || ((_local3.distance < _local2.distance)))){
_local2 = _local3;
};
};
if (_local2){
Debug.drawLine(start, _local2.impact, 0xFF8000);
Debug.drawCircle(_local2.impact.x, _local2.impact.y, 0.05, 0xFF8000);
};
}
public function checkCollisions(_arg1:CellGrid, _arg2:Array, _arg3:Thing=null):void{
var _local4:Character;
var _local5:TraceCollision;
scanCellgrid(_arg1, _arg2, _arg3);
distance = maxRange;
if (((propHit) && ((propHit.distance < distance)))){
distance = propHit.distance;
};
for each (_local4 in _arg2) {
if (_local4 == _arg3){
} else {
if (altitude > _local4.height){
} else {
_local5 = _local4.fireHit.traceLine(start, angle, dx, dy);
if (((_local5) && ((_local5.distance < distance)))){
charactersHit.push(new TracerHit(_local5.impact, _local5.distance, _local4));
};
};
};
};
}
}
}//package boxhead.world
Section 412
//ChatWindow (MMOcha.lobby.ChatWindow)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
import MMOcha.server.*;
import flash.text.*;
import MMOcha.utils.*;
import flash.ui.*;
public dynamic class ChatWindow extends Sprite {
protected var chatField:TextField;
protected var scrollBar:ScrollBar;
public var inputField:TextField;
public var sendButton:SimpleButton;
protected var previousMessages:Array;
protected var chatText:String;
protected var previousDisplayed:int;// = -1
protected var chatDisabled:Boolean;// = false
protected static const MAX_LINES:int = 200;
protected static const MAX_CHARACTERS:int = 200;
protected static const LEFT_BRACKET_REGEXP:RegExp = new RegExp("<", "g");
protected static const RIGHT_BRACKET_REGEXP:RegExp = new RegExp(">", "g");
public function ChatWindow(){
MMOchaSounds.addChatSounds(this);
chatField = (((getChildByName("_chatField") as TextField)) || (new TextField()));
chatText = "";
while (chatField.maxScrollV < 2) {
chatText = (chatText + "<BR>");
chatField.htmlText = chatText;
};
chatField.htmlText = chatText;
chatField.addEventListener(Event.SCROLL, onScrollChatField, false, 0, true);
chatField.addEventListener(TextEvent.LINK, linkClick, false, 0, true);
scrollBar = (((getChildByName("_scrollBar") as ScrollBar)) || (new ScrollBar()));
scrollBar.handleSize = 1;
scrollBar.addEventListener(ScrollEvent.DRAG, onChatBarDrag, false, 0, true);
scrollBar.addEventListener(ScrollEvent.STEP_UP, onChatBarStepUp, false, 0, true);
scrollBar.addEventListener(ScrollEvent.STEP_DOWN, onChatBarStepDown, false, 0, true);
inputField = (((getChildByName("_inputField") as TextField)) || (new TextField()));
inputField.maxChars = MAX_CHARACTERS;
inputField.addEventListener(FocusEvent.FOCUS_IN, enableChatSending, false, 0, true);
inputField.addEventListener(FocusEvent.FOCUS_OUT, disableChatSending, false, 0, true);
sendButton = (((getChildByName("_sendButton") as SimpleButton)) || (new SimpleButton()));
sendButton.addEventListener(MouseEvent.CLICK, onClickSendChatMessage, false, 0, true);
previousMessages = new Array();
autoScrollChat();
}
public function replaceText(_arg1, _arg2:Object):void{
chatText = chatText.replace(_arg1, _arg2);
chatField.htmlText = chatText;
checkLeadingWhiteSpace();
}
public function enable():void{
chatDisabled = false;
sendButton.enabled = true;
}
public function clearChat():void{
chatText = "";
chatField.htmlText = "";
autoScrollChat();
}
protected function updateBarPosition():void{
scrollBar.scrollValue = ((chatField.scrollV - 1) / Math.max(1, (chatField.maxScrollV - 1)));
}
protected function onScrollChatField(_arg1:Event):void{
updateBarPosition();
}
protected function onChatBarDrag(_arg1:ScrollEvent):void{
chatField.removeEventListener(Event.SCROLL, onScrollChatField, false);
chatField.scrollV = (chatField.maxScrollV * _arg1.value);
chatField.addEventListener(Event.SCROLL, onScrollChatField, false, 0, true);
}
protected function checkLeadingWhiteSpace():void{
var _local1 = (chatField.scrollV == chatField.maxScrollV);
while ((((chatField.scrollV > 1)) && ((chatText.indexOf("<BR>") == 0)))) {
chatText = chatText.substr(4);
chatField.htmlText = chatText;
if (_local1){
chatField.scrollV = chatField.maxScrollV;
};
updateBarSize();
updateBarPosition();
};
}
protected function onKeyPress(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
sendChatMessage();
};
}
public function enableChatSending(_arg1:Event=null):void{
if (stage){
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyRelease, false, 0, true);
};
}
public function disableChatSending(_arg1:Event=null):void{
if (stage){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyRelease);
};
}
public function receiveMessage(_arg1:String, _arg2:MMOchaUser):void{
print(_arg1, _arg2, false);
dispatchEvent(new WindowEvent(WindowEvent.CHAT_RECEIVED));
}
protected function sendChatMessage():void{
if (chatDisabled){
inputField.text = "";
return;
};
var _local1:String = inputField.text;
if (_local1.length){
dispatchEvent(new WindowEvent(WindowEvent.CHAT_INPUT, true, false, null, _local1));
previousMessages.unshift(_local1);
while (previousMessages.length > 10) {
previousMessages.pop();
};
previousDisplayed = -1;
inputField.text = "";
};
}
protected function updateBarSize():void{
scrollBar.handleSize = (((chatField.bottomScrollV + 1) - (chatField.scrollV - 1)) / chatField.numLines);
}
protected function autoScrollChat():void{
chatField.scrollV = chatField.maxScrollV;
updateBarSize();
updateBarPosition();
}
public function print(_arg1:String, _arg2:MMOchaUser=null, _arg3:Boolean=true):void{
var _local6:String;
var _local7:String;
var _local8:int;
var _local4 = (chatField.scrollV == chatField.maxScrollV);
_arg1 = LanguageFilter.filter(_arg1);
var _local5 = "";
if (!_arg3){
_arg1 = _arg1.replace(LEFT_BRACKET_REGEXP, "<").replace(RIGHT_BRACKET_REGEXP, ">");
};
if (_arg2){
_local6 = "<";
_local7 = ">";
if (_arg2.moderator){
_local6 = (_local6 + _local6);
_local7 = (_local7 + _local7);
};
_local5 = ((((((((((("<FONT COLOR='#" + _arg2.color.toString(16)) + "'>") + _local6) + "<A HREF=\"event:user:") + _arg2.id) + _arg2.name) + "\">") + _arg2.name) + "</A>") + _local7) + "</FONT> ");
};
_local5 = (_local5 + (_arg1 + "<BR>"));
chatText = (chatText + _local5);
chatField.htmlText = chatText;
while (chatField.numLines > MAX_LINES) {
_local8 = chatText.indexOf("<BR>");
if (_local8 == -1){
break;
};
chatText = chatText.substr((_local8 + 4));
chatField.htmlText = chatText;
};
if (_local4){
chatField.scrollV = chatField.maxScrollV;
};
updateBarSize();
updateBarPosition();
checkLeadingWhiteSpace();
}
protected function onKeyRelease(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.UP){
if ((previousDisplayed + 1) < previousMessages.length){
previousDisplayed++;
inputField.text = previousMessages[previousDisplayed];
inputField.setSelection(inputField.text.length, inputField.text.length);
};
} else {
if (_arg1.keyCode == Keyboard.DOWN){
if (previousDisplayed == 0){
previousDisplayed = -1;
inputField.text = "";
} else {
if (previousDisplayed > 0){
previousDisplayed--;
inputField.text = previousMessages[previousDisplayed];
inputField.setSelection(inputField.text.length, inputField.text.length);
};
};
};
};
}
public function disable():void{
chatDisabled = true;
sendButton.enabled = false;
}
public function replaceLast(_arg1:String, _arg2:Object):void{
var _local3:int = chatText.lastIndexOf(_arg1);
if (_local3 == -1){
return;
};
var _local4 = (chatField.scrollV == chatField.maxScrollV);
chatText = ((chatText.substr(0, _local3) + _arg2) + chatText.substr((_local3 + _arg1.length)));
chatField.htmlText = chatText;
if (_local4){
autoScrollChat();
};
checkLeadingWhiteSpace();
}
protected function onChatBarStepUp(_arg1:ScrollEvent):void{
chatField.scrollV--;
updateBarPosition();
}
protected function linkClick(_arg1:TextEvent):void{
if (_arg1.text.substr(0, 5) == "user:"){
dispatchEvent(new WindowEvent(WindowEvent.USER_NAME_CLICK, true, false, null, _arg1.text.substr(5)));
};
}
protected function onChatBarStepDown(_arg1:ScrollEvent):void{
chatField.scrollV++;
updateBarPosition();
}
protected function onClickSendChatMessage(_arg1:MouseEvent):void{
sendChatMessage();
stage.focus = inputField;
}
public static function coloredString(_arg1:String, _arg2:uint):String{
return ((((("<FONT COLOR='#" + _arg2.toString(16)) + "'>") + _arg1) + "</FONT>"));
}
}
}//package MMOcha.lobby
Section 413
//LobbyButton (MMOcha.lobby.LobbyButton)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import boxhead.sounds.*;
public class LobbyButton extends SimpleButton {
public var sound:Sound;
private static const _disabledColorTransform:ColorTransform = new ColorTransform(0.4, 0.4, 0.4);
public function LobbyButton(){
MMOchaSounds.addButtonSounds(this);
addEventListener(MouseEvent.CLICK, click, false, 0, true);
sound = SoundList.CLICK_SHORT;
}
public function enable():void{
enabled = true;
mouseEnabled = true;
tabEnabled = true;
transform.colorTransform = new ColorTransform();
}
protected function get disabledColorTransform():ColorTransform{
return (_disabledColorTransform);
}
protected function click(_arg1:MouseEvent):void{
if (((sound) && (enabled))){
SoundControl.playUISound(sound);
};
}
public function disable():void{
enabled = false;
mouseEnabled = false;
tabEnabled = false;
transform.colorTransform = disabledColorTransform;
}
public function useLongClick():void{
sound = SoundList.CLICK_LONG;
}
}
}//package MMOcha.lobby
Section 414
//MMOchaSounds (MMOcha.lobby.MMOchaSounds)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
public class MMOchaSounds {
protected var offscreenChatPlayed:Boolean;// = false
public static var chatSent:Sound;
public static var offscreenChat:Sound;
public static var invitation:Sound;
public static var volume:Number = 1;
public static var buttonOver:Sound;
public static var chatReceived:Sound;
public static var buttonClick:Sound;
public static var buttonDown:Sound;
protected static function playSound(_arg1:Sound, _arg2:DisplayObject=null):void{
var _local5:Point;
if (((!(_arg1)) || ((volume <= 0)))){
return;
};
var _local3:Number = 0;
if (_arg2){
if ((((_arg2 is LobbyButton)) && (!(LobbyButton(_arg2).enabled)))){
return;
};
if (_arg2.stage){
_local5 = _arg2.localToGlobal(new Point((_arg2.width / 2), 0));
_local3 = ((_local5.x / (_arg2.stage.width / 2)) - 1);
};
};
var _local4:SoundTransform = new SoundTransform(volume, _local3);
_arg1.play(0, 0, _local4);
}
public static function addButtonSounds(_arg1:DisplayObject):void{
_arg1.addEventListener(MouseEvent.ROLL_OVER, onButtonOver, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, onButtonDown, false, 0, true);
_arg1.addEventListener(MouseEvent.CLICK, onButtonClick, false, 0, true);
}
protected static function onChatReceived(_arg1:Event):void{
var _local2:ChatWindow = (_arg1.target as ChatWindow);
if (((_local2) && (!(_local2.stage)))){
playSound(offscreenChat);
} else {
playSound(chatReceived);
};
}
protected static function onButtonClick(_arg1:Event):void{
playSound(buttonClick, (_arg1.target as DisplayObject));
}
protected static function onInvitation(_arg1:Event):void{
playSound(invitation);
}
protected static function onButtonOver(_arg1:Event):void{
playSound(buttonOver, (_arg1.target as DisplayObject));
}
protected static function onButtonDown(_arg1:Event):void{
playSound(buttonDown, (_arg1.target as DisplayObject));
}
protected static function onChatInput(_arg1:Event):void{
playSound(chatSent);
}
public static function addChatSounds(_arg1:ChatWindow):void{
_arg1.addEventListener(WindowEvent.CHAT_INPUT, onChatInput, false, 0, true);
_arg1.addEventListener(WindowEvent.CHAT_RECEIVED, onChatReceived, false, 0, true);
_arg1.addEventListener(WindowEvent.INVITE_DISPLAYED, onInvitation, false, 0, true);
}
}
}//package MMOcha.lobby
Section 415
//MMOchaUIElement (MMOcha.lobby.MMOchaUIElement)
package MMOcha.lobby {
import flash.display.*;
import flash.filters.*;
public class MMOchaUIElement extends Sprite {
public static var elementFilters:Array = null;
public function MMOchaUIElement(){
if (elementFilters){
filters = elementFilters;
};
}
public static function grayScaleFilter(_arg1:Number):ColorMatrixFilter{
return (new ColorMatrixFilter([(0.33 * _arg1), (0.33 * _arg1), (0.33 * _arg1), 0, 0, (0.33 * _arg1), (0.33 * _arg1), (0.33 * _arg1), 0, 0, (0.33 * _arg1), (0.33 * _arg1), (0.33 * _arg1), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]));
}
public static function setGrayScale(_arg1:Number):void{
elementFilters = [grayScaleFilter(_arg1)];
}
public static function setHue(_arg1:Number):void{
if (_arg1){
elementFilters = [generateHueFilter(_arg1)];
} else {
elementFilters = null;
};
}
public static function generateHueFilter(_arg1:Number):ColorMatrixFilter{
_arg1 = (_arg1 * (Math.PI / 180));
var _local2:Number = Math.cos(_arg1);
var _local3:Number = Math.sin(_arg1);
var _local4:Number = 0.213;
var _local5:Number = 0.715;
var _local6:Number = 0.072;
return (new ColorMatrixFilter([((_local4 + (_local2 * (1 - _local4))) + (_local3 * -(_local4))), ((_local5 + (_local2 * -(_local5))) + (_local3 * -(_local5))), ((_local6 + (_local2 * -(_local6))) + (_local3 * (1 - _local6))), 0, 0, ((_local4 + (_local2 * -(_local4))) + (_local3 * 0.143)), ((_local5 + (_local2 * (1 - _local5))) + (_local3 * 0.14)), ((_local6 + (_local2 * -(_local6))) + (_local3 * -0.283)), 0, 0, ((_local4 + (_local2 * -(_local4))) + (_local3 * -((1 - _local4)))), ((_local5 + (_local2 * -(_local5))) + (_local3 * _local5)), ((_local6 + (_local2 * (1 - _local6))) + (_local3 * _local6)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]));
}
public static function setDefault():void{
elementFilters = null;
}
}
}//package MMOcha.lobby
Section 416
//OptionSelector (MMOcha.lobby.OptionSelector)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public dynamic class OptionSelector extends Sprite {
protected var leftButton:LobbyButton;
protected var optionField:TextField;
protected var _optionName:String;
protected var valueField:TextField;
protected var rightButton:LobbyButton;
protected var _selectedOption:Object;
protected var _selectedIndex:int;
protected var options:Array;
public function OptionSelector(_arg1:String=null, _arg2:Array=null, _arg3:Object=null){
optionField = (((getChildByName("_optionField") as TextField)) || (new TextField()));
valueField = (((getChildByName("_valueField") as TextField)) || (new TextField()));
leftButton = (((getChildByName("_leftButton") as LobbyButton)) || (new LobbyButton()));
leftButton.addEventListener(MouseEvent.CLICK, onLeftClick, false, 0, true);
rightButton = (((getChildByName("_rightButton") as LobbyButton)) || (new LobbyButton()));
rightButton.addEventListener(MouseEvent.CLICK, onRightClick, false, 0, true);
displayOptions(_arg1, _arg2, _arg3);
}
public function get optionName():String{
return (_optionName);
}
public function set selectedOption(_arg1:Object):void{
_selectedIndex = -1;
var _local2:int;
if (_arg1){
_local2 = Math.max(0, options.lastIndexOf(_arg1));
};
selectIndex(_local2, false);
}
public function displayOptions(_arg1:String=null, _arg2:Array=null, _arg3:Object=null):void{
if (((!(_arg2)) || (!(_arg2.length)))){
return;
};
this.options = _arg2;
_optionName = _arg1;
optionField.text = _arg1;
selectedOption = _arg3;
}
protected function onLeftClick(_arg1:MouseEvent):void{
if (_selectedIndex > 0){
selectIndex((_selectedIndex - 1));
};
}
public function get selectedIndex():int{
return (_selectedIndex);
}
protected function onRightClick(_arg1:MouseEvent):void{
if (_selectedIndex < (options.length - 1)){
selectIndex((_selectedIndex + 1));
};
}
protected function selectIndex(_arg1:int, _arg2:Boolean=true):void{
if (_selectedIndex == _arg1){
return;
};
if (_arg1 == 0){
leftButton.disable();
} else {
leftButton.enable();
};
if (_arg1 == (options.length - 1)){
rightButton.disable();
} else {
rightButton.enable();
};
_selectedIndex = _arg1;
_selectedOption = options[_arg1];
valueField.text = String(selectedOption);
if (_arg2){
dispatchEvent(new Event(Event.CHANGE));
};
}
public function get selectedOption():Object{
return (_selectedOption);
}
}
}//package MMOcha.lobby
Section 417
//OptionSlider (MMOcha.lobby.OptionSlider)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public dynamic class OptionSlider extends Sprite {
protected var slider:Slider;
protected var optionField:TextField;
protected var _optionName:String;
public function OptionSlider(_arg1:String=null, _arg2:Number=0.5){
optionField = (((getChildByName("_optionField") as TextField)) || (new TextField()));
slider = (((getChildByName("_slider") as Slider)) || (new Slider()));
slider.addEventListener(Event.CHANGE, change, false, 0, true);
displayOptions(_arg1, _arg2);
}
public function get optionName():String{
return (_optionName);
}
protected function change(_arg1:Event):void{
dispatchEvent(_arg1);
}
public function get value():Number{
return (slider.value);
}
public function set value(_arg1:Number):void{
slider.value = _arg1;
}
public function displayOptions(_arg1:String=null, _arg2:Number=0.5):void{
_optionName = _arg1;
if (_arg1){
optionField.text = _arg1;
};
this.value = _arg2;
}
}
}//package MMOcha.lobby
Section 418
//OptionTickBox (MMOcha.lobby.OptionTickBox)
package MMOcha.lobby {
import flash.display.*;
import flash.text.*;
public dynamic class OptionTickBox extends TickBox {
protected var optionField:TextField;
protected var box:Sprite;
protected var _optionName:String;
public function OptionTickBox(){
optionField = (((getChildByName("_optionField") as TextField)) || (new TextField()));
box = (((getChildByName("_box") as Sprite)) || (new Sprite()));
hitArea = box;
}
public function get optionName():String{
return (_optionName);
}
public function displayOption(_arg1:String=null, _arg2:Boolean=false):void{
_optionName = _arg1;
optionField.text = _arg1;
this.ticked = _arg2;
}
}
}//package MMOcha.lobby
Section 419
//ScrollBar (MMOcha.lobby.ScrollBar)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public dynamic class ScrollBar extends MMOchaUIElement {
protected var downButtonIsDown:Boolean;// = false
protected var grabY:Number;
protected var handle:Sprite;
public var backgroundStep:Number;
protected var bottom:MovieClip;
protected var upButton:SimpleButton;
protected var background:Sprite;
protected var handleIsDown:Boolean;// = false
protected var holdTimer:Timer;
protected var mid:MovieClip;
protected var top:MovieClip;
protected var _scrollValue:Number;
protected var downButton:SimpleButton;
protected var _handleSize:Number;
protected var upButtonIsDown:Boolean;// = false
protected static const DEFAULT_HEIGHT:Number = 100;
protected static const INITIAL_DELAY:int = 500;
protected static const REPEAT_DELAY:int = 100;
public function ScrollBar(){
background = (((getChildByName("_background") as Sprite)) || (new Sprite()));
upButton = (((getChildByName("_upButton") as SimpleButton)) || (new SimpleButton()));
downButton = (((getChildByName("_downButton") as SimpleButton)) || (new SimpleButton()));
handle = (((getChildByName("_handle") as Sprite)) || (new Sprite()));
top = (((handle.getChildByName("_top") as MovieClip)) || (new MovieClip()));
mid = (((handle.getChildByName("_mid") as MovieClip)) || (new MovieClip()));
bottom = (((handle.getChildByName("_bottom") as MovieClip)) || (new MovieClip()));
MMOchaSounds.addButtonSounds(handle);
arrange();
_scrollValue = 0;
backgroundStep = 0.1;
handleSize = 0.4;
grabY = 0;
holdTimer = new Timer(INITIAL_DELAY, 0);
handleUp();
handle.buttonMode = true;
handle.tabEnabled = false;
handle.addEventListener(MouseEvent.ROLL_OVER, onHandleOver, false, 0, true);
handle.addEventListener(MouseEvent.ROLL_OUT, onHandleOut, false, 0, true);
handle.addEventListener(MouseEvent.MOUSE_DOWN, onHandleDown, false, 0, true);
background.buttonMode = true;
background.tabEnabled = false;
background.addEventListener(MouseEvent.MOUSE_DOWN, onBackgroundDown, false, 0, true);
upButton.addEventListener(MouseEvent.MOUSE_DOWN, onUpButtonDown, false, 0, true);
upButton.addEventListener(MouseEvent.CLICK, onUpButtonClick, false, 0, true);
downButton.addEventListener(MouseEvent.MOUSE_DOWN, onDownButtonDown, false, 0, true);
downButton.addEventListener(MouseEvent.CLICK, onDownButtonClick, false, 0, true);
}
protected function updateDownButtonHold():void{
dispatchEvent(new ScrollEvent(ScrollEvent.STEP_DOWN, false, false, scrollValue));
}
protected function onUpButtonHold(_arg1:TimerEvent):void{
updateUpButtonHold();
holdTimer.delay = REPEAT_DELAY;
}
public function set handleSize(_arg1:Number):void{
_handleSize = Math.max(0, Math.min(1, _arg1));
handle.height = (background.height * _handleSize);
updateHandlePosition();
}
protected function onDownButtonClick(_arg1:MouseEvent):void{
if (!downButtonIsDown){
updateDownButtonHold();
};
downButtonIsDown = false;
}
protected function onDownButtonHold(_arg1:TimerEvent):void{
updateDownButtonHold();
holdTimer.delay = REPEAT_DELAY;
}
protected function updateHandlePosition():void{
handle.y = (background.y + (_scrollValue * (background.height - handle.height)));
}
protected function handleOver():void{
top.gotoAndStop("Over");
mid.gotoAndStop("Over");
bottom.gotoAndStop("Over");
}
public function get scrollValue():Number{
return (_scrollValue);
}
protected function updateHandleDrag():void{
if (background.height == handle.height){
scrollTo(0);
} else {
scrollTo(Math.max(0, Math.min(1, (((mouseY + grabY) - background.y) / (background.height - handle.height)))));
};
}
public function arrange():void{
upButton.scaleY = ((upButton.scaleX * scaleX) / scaleY);
upButton.y = (upButton.height / 2);
downButton.scaleY = ((upButton.scaleX * scaleX) / scaleY);
downButton.y = (DEFAULT_HEIGHT - (downButton.height / 2));
background.height = ((DEFAULT_HEIGHT - upButton.height) - downButton.height);
background.y = upButton.height;
handle.scaleY = ((handle.scaleX * scaleX) / scaleY);
}
protected function onBackgroundDown(_arg1:MouseEvent):void{
updateBackgroundHold();
holdTimer.addEventListener(TimerEvent.TIMER, onBackgroundHold, false, 0, true);
holdTimer.delay = INITIAL_DELAY;
holdTimer.reset();
holdTimer.start();
stage.addEventListener(MouseEvent.MOUSE_UP, onBackgroundUp, false, 0, true);
}
protected function onHandleDown(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, onHandleMove, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, onHandleUp, false, 0, true);
handleIsDown = true;
handleDown();
grabY = (handle.y - mouseY);
updateHandleDrag();
}
protected function onDownButtonUp(_arg1:MouseEvent):void{
if (stage){
stage.removeEventListener(MouseEvent.MOUSE_UP, onDownButtonUp);
};
holdTimer.stop();
holdTimer.removeEventListener(TimerEvent.TIMER, onDownButtonHold);
}
protected function updateBackgroundHold():void{
if (mouseY < handle.y){
scrollTo(Math.max(0, (scrollValue - backgroundStep)));
} else {
if (mouseY > (handle.y + handle.height)){
scrollTo(Math.min(1, (scrollValue + backgroundStep)));
};
};
}
protected function scrollTo(_arg1:Number, _arg2:Boolean=true):void{
if (_arg1 != _scrollValue){
_scrollValue = _arg1;
updateHandlePosition();
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollEvent.DRAG, false, false, _arg1));
};
};
}
protected function onUpButtonClick(_arg1:MouseEvent):void{
if (!upButtonIsDown){
updateUpButtonHold();
};
upButtonIsDown = false;
}
public function get handleSize():Number{
return (_handleSize);
}
protected function onBackgroundHold(_arg1:TimerEvent):void{
updateBackgroundHold();
holdTimer.delay = REPEAT_DELAY;
}
public function set scrollValue(_arg1:Number):void{
scrollTo(_arg1, false);
}
protected function onHandleMove(_arg1:MouseEvent):void{
updateHandleDrag();
}
protected function onHandleOver(_arg1:MouseEvent):void{
if (!handleIsDown){
handleOver();
};
}
protected function onHandleUp(_arg1:MouseEvent):void{
if (stage){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onHandleMove);
stage.removeEventListener(MouseEvent.MOUSE_UP, onHandleUp);
if (handle.hitTestPoint(stage.mouseX, stage.mouseY)){
handleOver();
} else {
handleUp();
};
} else {
handleUp();
};
handleIsDown = false;
updateHandleDrag();
}
protected function handleUp():void{
top.gotoAndStop("Up");
mid.gotoAndStop("Up");
bottom.gotoAndStop("Up");
}
protected function onHandleOut(_arg1:MouseEvent):void{
if (!handleIsDown){
handleUp();
};
}
protected function handleDown():void{
top.gotoAndStop("Down");
mid.gotoAndStop("Down");
bottom.gotoAndStop("Down");
}
protected function onUpButtonDown(_arg1:MouseEvent):void{
updateUpButtonHold();
holdTimer.addEventListener(TimerEvent.TIMER, onUpButtonHold, false, 0, true);
holdTimer.delay = INITIAL_DELAY;
holdTimer.reset();
holdTimer.start();
upButtonIsDown = true;
stage.addEventListener(MouseEvent.MOUSE_UP, onUpButtonUp, false, 0, true);
}
protected function onBackgroundUp(_arg1:MouseEvent):void{
if (stage){
stage.removeEventListener(MouseEvent.MOUSE_UP, onBackgroundUp);
};
holdTimer.stop();
holdTimer.removeEventListener(TimerEvent.TIMER, onBackgroundHold);
}
protected function updateUpButtonHold():void{
dispatchEvent(new ScrollEvent(ScrollEvent.STEP_UP, false, false, scrollValue));
}
protected function onUpButtonUp(_arg1:MouseEvent):void{
if (stage){
stage.removeEventListener(MouseEvent.MOUSE_UP, onUpButtonUp);
};
holdTimer.stop();
holdTimer.removeEventListener(TimerEvent.TIMER, onUpButtonHold);
}
protected function onDownButtonDown(_arg1:MouseEvent):void{
updateDownButtonHold();
holdTimer.addEventListener(TimerEvent.TIMER, onDownButtonHold, false, 0, true);
holdTimer.delay = INITIAL_DELAY;
holdTimer.reset();
holdTimer.start();
downButtonIsDown = true;
stage.addEventListener(MouseEvent.MOUSE_UP, onDownButtonUp, false, 0, true);
}
}
}//package MMOcha.lobby
Section 420
//ScrollEvent (MMOcha.lobby.ScrollEvent)
package MMOcha.lobby {
import flash.events.*;
public class ScrollEvent extends Event {
public var value:Number;
public static const DRAG:String = "Drag";
public static const STEP_DOWN:String = "Step Down";
public static const STEP_UP:String = "Step Up";
public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "eventPhase", "value"));
}
override public function clone():Event{
return (new ScrollEvent(type, bubbles, cancelable, value));
}
}
}//package MMOcha.lobby
Section 421
//Slider (MMOcha.lobby.Slider)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
public dynamic class Slider extends Sprite {
protected var handle:Sprite;
protected var background:Sprite;
protected var _value:Number;
protected var bar:Sprite;
public function Slider(_arg1:Number=0.5):void{
handle = (((getChildByName("_handle") as Sprite)) || (new Sprite()));
bar = (((getChildByName("_bar") as Sprite)) || (new Sprite()));
background = (((getChildByName("_background") as Sprite)) || (new Sprite()));
buttonMode = true;
this.value = _arg1;
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDown, false, 0, true);
}
protected function added(_arg1:Event):void{
handle.scaleX = (1 / scaleX);
bar.scaleY = (1 / scaleY);
}
public function set value(_arg1:Number):void{
_value = _arg1;
updateBar();
}
protected function mouseInput():void{
value = Math.max(0, Math.min(1, (mouseX / bar.width)));
updateBar();
dispatchEvent(new Event(Event.CHANGE));
}
protected function mouseDown(_arg1:MouseEvent):void{
mouseInput();
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp, false, 0, true);
}
protected function updateBar():void{
handle.x = (value * background.width);
}
protected function mouseUp(_arg1:MouseEvent):void{
if (stage){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUp);
};
}
public function get value():Number{
return (_value);
}
protected function mouseMove(_arg1:MouseEvent):void{
mouseInput();
}
}
}//package MMOcha.lobby
Section 422
//TextButton (MMOcha.lobby.TextButton)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class TextButton extends LobbyButton {
protected var textFields:Array;
protected var textWidth:Number;
private static const RED:ColorTransform = new ColorTransform(0.55, 0, 0);
public function TextButton(){
var _local1:TextField;
super();
textFields = new Array();
_local1 = findTextFieldIn(upState);
if (_local1){
textFields.push(_local1);
};
_local1 = findTextFieldIn(overState);
if (_local1){
textFields.push(_local1);
};
_local1 = findTextFieldIn(downState);
if (_local1){
textFields.push(_local1);
};
textWidth = _local1.width;
upState.alpha = 0.5;
downState.transform.colorTransform = RED;
addEventListener(Event.ADDED, added, false, 0, true);
}
protected function added(_arg1:Event):void{
var _local4:TextField;
var _local5:DisplayObject;
if (scaleX == scaleY){
return;
};
var _local2:Number = width;
var _local3:Number = (scaleX / scaleY);
scaleX = scaleY;
textWidth = (_local2 / scaleX);
for each (_local4 in textFields) {
_local4.x = (int((textWidth - _local4.width)) / 2);
};
_local5 = hitTestState;
hitTestState.scaleX = (_local5.scaleY * _local3);
}
public function align(_arg1:String):void{
var _local3:TextField;
var _local2:TextFormat = new TextFormat();
switch (_arg1.toLowerCase()){
case "l":
case "left":
_local2.align = TextFormatAlign.LEFT;
for each (_local3 in textFields) {
_local3.x = 0;
};
break;
case "r":
case "right":
_local2.align = TextFormatAlign.RIGHT;
for each (_local3 in textFields) {
_local3.x = int((textWidth - _local3.width));
};
break;
default:
_local2.align = TextFormatAlign.CENTER;
for each (_local3 in textFields) {
_local3.x = (int((textWidth - _local3.width)) / 2);
};
break;
};
for each (_local3 in textFields) {
_local3.setTextFormat(_local2);
};
}
protected function findTextFieldIn(_arg1:DisplayObject):TextField{
var _local3:DisplayObjectContainer;
var _local4:int;
var _local2:TextField = (_arg1 as TextField);
if (_local2){
return (_local2);
};
_local3 = (_arg1 as DisplayObjectContainer);
if (_local3){
_local4 = (_local3.numChildren - 1);
while (_local4 >= 0) {
_local2 = (_local3.getChildAt(_local4) as TextField);
if (_local2){
return (_local2);
};
_local4--;
};
};
return (null);
}
public function set text(_arg1:String):void{
var _local2:TextField;
var _local3:Number;
for each (_local2 in textFields) {
_local3 = _local2.width;
_local2.text = _arg1;
if (_local2.width != _local3){
_local2.x = (_local2.x + ((_local3 - _local2.width) / 2));
};
};
}
}
}//package MMOcha.lobby
Section 423
//TickBox (MMOcha.lobby.TickBox)
package MMOcha.lobby {
import flash.events.*;
import flash.display.*;
public class TickBox extends MovieClip {
protected var _ticked:Boolean;// = false
public function TickBox(){
gotoAndStop("Unticked");
buttonMode = true;
addEventListener(MouseEvent.CLICK, clicked, false, 0, true);
}
public function set ticked(_arg1:Boolean):void{
if (_ticked == _arg1){
return;
};
_ticked = _arg1;
if (_ticked){
gotoAndStop("Ticked");
} else {
gotoAndStop("Unticked");
};
}
public function get ticked():Boolean{
return (_ticked);
}
protected function clicked(_arg1:MouseEvent):void{
ticked = !(ticked);
dispatchEvent(new Event(Event.CHANGE));
}
}
}//package MMOcha.lobby
Section 424
//WindowEvent (MMOcha.lobby.WindowEvent)
package MMOcha.lobby {
import flash.events.*;
import MMOcha.server.*;
public class WindowEvent extends Event {
public var message:String;
public var user:MMOchaUser;
public static const CHAT_INPUT:String = "Chat Input";
public static const READY:String = "Ready";
public static const INVITE_DISPLAYED:String = "Invite Displayed";
public static const SHOW_USER_STATS:String = "Show User Stats";
public static const USER_SOCIAL_STATUS:String = "User Social Status";
public static const SHOW_PAGE:String = "Show Page";
public static const USER_DISPLAY_CLICK:String = "User Display Click";
public static const OPEN_COLOR_POPUP:String = "Open Color Popup";
public static const OPEN_USER_CHAT:String = "Open User Chat";
public static const FIND_MATCH:String = "Find Match";
public static const ACCEPT_INVITE:String = "Accept Invite";
public static const REQUEST_CUSTOM_GAMES:String = "Request Custom Games";
public static const EXIT:String = "Exit";
public static const USER_NAME_CLICK:String = "User Name Click";
public static const CUSTOMIZE:String = "Customize";
public static const BROWSE_GAMES:String = "Browse Games";
public static const QUICK_MATCH_SEARCH:String = "Quick Match Search";
public static const HOST_GAME:String = "Host Game";
public static const REQUEST_ROOM_INFO:String = "Request Room Info";
public static const START_GAME:String = "Start Game";
public static const BEGIN_HOSTING:String = "Begin Hosting";
public static const CLOSE:String = "Close";
public static const CHAT_RECEIVED:String = "Chat Received";
public static const JOIN_CUSTOM_GAME:String = "Join Custom Game";
public static const PRINTED:String = "Printed";
public static const HIDE_PAGE:String = "Hide Page";
public static const SHOW_PREMIUMS:String = "Show Premiums";
public function WindowEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:MMOchaUser=null, _arg5:String=null){
super(_arg1, _arg2, _arg3);
this.user = _arg4;
this.message = _arg5;
}
override public function toString():String{
return (formatToString("WindowEvent", "type", "bubbles", "cancelable", "eventPhase", "user", "message"));
}
override public function clone():Event{
return (new WindowEvent(type, bubbles, cancelable, user, message));
}
}
}//package MMOcha.lobby
Section 425
//DatabaseEvent (MMOcha.server.DatabaseEvent)
package MMOcha.server {
import flash.events.*;
public class DatabaseEvent extends Event {
public var error:String;
public var data:Object;
public var password:String;
public var username:String;
public static const MAP_LIST:String = "Database Map List";
public static const REGISTER:String = "Database Register";
public static const GET_PREMIUMS:String = "Database Get Premiums";
public static const XCASH:String = "Database XCash";
public static const GET_MOST_WANTED:String = "Database Get Most Wanted";
public static const PREMIUM_MASTER_LIST:String = "Database Premium Master List";
public static const GET_MAP:String = "Database Get Map";
public static const GET_WEEKLY_WANTED:String = "Database Get Weekly Wanted";
public static const BUY_PREMIUM:String = "Database Buy Premium";
public function DatabaseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null, _arg6:Object=null, _arg7:String=null){
super(_arg1, _arg2, _arg3);
this.username = _arg4;
this.password = _arg5;
this.data = _arg6;
this.error = _arg7;
}
override public function clone():Event{
return (new DatabaseEvent(type, bubbles, cancelable, username, password, data, error));
}
}
}//package MMOcha.server
Section 426
//DatabaseRequest (MMOcha.server.DatabaseRequest)
package MMOcha.server {
import flash.events.*;
import flash.net.*;
public class DatabaseRequest extends EventDispatcher {
public var method:String;
public var item_id:String;
protected var loader:URLLoader;
public var password:String;
public var slot_id:String;
public var username:String;
public static const MAP_LIST:String = "xgen.stickarena.maps.list";
public static const REGISTER:String = "xgen.users.add";
public static const GET_WEEKLY_WANTED:String = "xgen.boxhead.mostwanted.list";
public static const GET_PREMIUMS:String = "xgen.users.items.list&game_id=boxhead";
public static const GET_MOST_WANTED:String = "xgen.boxhead.mostwanted.list";
public static const XCASH:String = "xgen.users.authenticate";
public static const GET_MAP:String = "xgen.stickarena.maps.get";
public static const PREMIUM_MASTER_LIST:String = "xgen.items.list&game_id=boxhead";
public static const BUY_PREMIUM:String = "xgen.users.items.buy&game_id=boxhead";
public function DatabaseRequest(_arg1:String, _arg2:String=null, _arg3:String=null, _arg4:String=null, _arg5:String=null){
this.method = _arg1;
this.username = _arg2;
this.password = _arg3;
this.item_id = _arg4;
this.slot_id = _arg5;
var _local6:String = ("http://api.xgenstudios.com/?method=" + _arg1);
if (_arg2){
_local6 = (_local6 + ("&username=" + _arg2));
};
if (_arg3){
_local6 = (_local6 + ("&password=" + _arg3));
};
if (_arg4){
_local6 = (_local6 + ("&item_id=" + _arg4));
};
if (_arg5){
_local6 = (_local6 + ("&slot_id=" + _arg5));
};
var _local7:URLRequest = new URLRequest(_local6);
loader = new URLLoader(_local7);
loader.addEventListener(Event.COMPLETE, onComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
}
protected function onError(_arg1:IOErrorEvent):void{
loader.removeEventListener(Event.COMPLETE, onComplete);
loader.removeEventListener(IOErrorEvent.IO_ERROR, onError);
dispatch(_arg1.text);
}
protected function dispatch(_arg1:String=null):void{
var _local2:XML;
if (!_arg1){
_local2 = new XML(loader.data);
};
switch (method){
case XCASH:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.XCASH, false, false, username, password, null, _arg1));
} else {
if (_local2.attribute("stat").toString() == "ok"){
dispatchEvent(new DatabaseEvent(DatabaseEvent.XCASH, false, false, username, password, int(_local2.user.points)));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.XCASH, false, false, username, password, null, _local2.err.@msg.toXMLString()));
};
};
break;
case REGISTER:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.REGISTER, false, false, username, password, null, _arg1));
} else {
if (_local2.attribute("stat").toString() == "ok"){
dispatchEvent(new DatabaseEvent(DatabaseEvent.REGISTER, false, false, username, password));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.REGISTER, false, false, username, password, null, _local2.err.@msg.toXMLString()));
};
};
break;
case MAP_LIST:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.MAP_LIST, false, false, username, null, null, _arg1));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.MAP_LIST, false, false, username, null, _local2.maps));
};
break;
case GET_MAP:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.GET_MAP, false, false, username, null, null, _arg1));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.GET_MAP, false, false, username, null, _local2.maps));
};
break;
case GET_MOST_WANTED:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.GET_MOST_WANTED, false, false, null, null, null, _arg1));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.GET_MOST_WANTED, false, false, null, null, _local2.users));
};
break;
case PREMIUM_MASTER_LIST:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.PREMIUM_MASTER_LIST, false, false, null, null, null, _arg1));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.PREMIUM_MASTER_LIST, false, false, null, null, _local2.items));
};
break;
case GET_PREMIUMS:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.GET_PREMIUMS, false, false, username, null, null, _arg1));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.GET_PREMIUMS, false, false, username, null, _local2.items.item));
};
break;
case BUY_PREMIUM:
if (_arg1){
dispatchEvent(new DatabaseEvent(DatabaseEvent.BUY_PREMIUM, false, false, username, null, null, _arg1));
} else {
if (_local2.err){
dispatchEvent(new DatabaseEvent(DatabaseEvent.BUY_PREMIUM, false, false, username, null, parseInt(item_id), _local2.err.attribute("msg")));
} else {
dispatchEvent(new DatabaseEvent(DatabaseEvent.BUY_PREMIUM, false, false, username, null, parseInt(item_id)));
};
};
break;
};
}
protected function onComplete(_arg1:Event):void{
loader.removeEventListener(Event.COMPLETE, onComplete);
loader.removeEventListener(IOErrorEvent.IO_ERROR, onError);
dispatch();
}
}
}//package MMOcha.server
Section 427
//MMOchaServer (MMOcha.server.MMOchaServer)
package MMOcha.server {
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import MMOcha.utils.*;
import flash.system.*;
public class MMOchaServer extends EventDispatcher {
protected var _password:String;
protected var pingTimes:Array;
protected var _authenticated:Boolean;// = false
protected var _username:String;
protected var received_id:Boolean;// = false
protected var _peers:Array;
protected var _connecting:Boolean;
protected var _localUser:MMOchaUser;
protected var _port:int;
protected var socket:XMLSocket;
protected var _roomList:Array;
protected var pingIndex:int;// = 0
protected var _clientID:String;
protected var _eventsPaused:Boolean;// = false
protected var pingsSent:Array;
protected var storedEvents:Array;
protected var _gameID:String;
protected var _url:String;
protected var _joiningRoom:String;
protected var _room:String;
protected var pingTimer:Timer;
public static const ACCOUNT_BANNED:String = "Account Banned";
public static const DUPLICATE_LOGIN:String = "Duplicate Login";
public static const SERVER_FULL:String = "Server Full";
public function MMOchaServer(){
storedEvents = new Array();
_peers = new Array();
socket = new XMLSocket();
socket.addEventListener(Event.CONNECT, onConnect, false, 0, true);
socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError, false, 0, true);
socket.addEventListener(Event.CLOSE, onDisconnect, false, 0, true);
socket.addEventListener(DataEvent.DATA, onMessageReceived, false, 0, true);
}
public function connectTo(_arg1:String=null, _arg2:int=-1):void{
if (connected){
if ((((_url == _arg1)) && ((_port == _arg2)))){
Debug.output("Already connected to MMOcha Server");
return;
};
disconnect();
};
if (_arg1){
_url = _arg1;
};
if (_arg2 != -1){
_port = _arg2;
};
var _local3:String = ((("XMLSocket://" + _url) + ":") + _port);
Security.loadPolicyFile(_local3);
connect();
}
public function get connected():Boolean{
return (socket.connected);
}
protected function onConnect(_arg1:Event):void{
Debug.output("Connected to Server!");
_connecting = false;
_clientID = null;
received_id = false;
_localUser = new MMOchaUser(null);
_localUser.local = true;
attemptDispatchEvent(new ServerEvent(ServerEvent.CONNECTED));
}
public function sendGameMessage(_arg1:String):void{
if (!socket.connected){
return;
};
if (Constants.PRINT_NETWORK){
Debug.output("[MMOcha] Sending Message:", _arg1);
};
socket.send(_arg1);
}
protected function onSecurityError(_arg1:SecurityErrorEvent):void{
Debug.output(("Failed to Connect to Server: " + _arg1.text));
_connecting = false;
_clientID = null;
received_id = false;
attemptDispatchEvent(new ServerEvent(ServerEvent.FAILED));
}
public function getXCash():void{
if (((((!(_username)) || (!(_password)))) || (!(authenticated)))){
return;
};
var _local1:DatabaseRequest = new DatabaseRequest(DatabaseRequest.XCASH, username, password);
_local1.addEventListener(DatabaseEvent.XCASH, onXCash);
}
public function set gameID(_arg1:String):void{
_gameID = _arg1;
}
protected function onReceivePremiums(_arg1:DatabaseEvent):void{
var _local3:XML;
var _local4:int;
var _local5:Premium;
var _local2:DatabaseRequest = (_arg1.target as DatabaseRequest);
_local2.removeEventListener(DatabaseEvent.GET_PREMIUMS, onReceivePremiums);
if (((((!(_local2)) || (!(connected)))) || (!((username == _arg1.username))))){
return;
};
for each (_local3 in _arg1.data) {
_local4 = parseInt(_local3.attribute("id"));
_local5 = localUser.premiums[_local4];
if (_local5){
if (_local3.remainingHours.toString().length > 0){
_local5.remainingHours = int(_local3.remainingHours);
} else {
_local5.remainingHours = int.MAX_VALUE;
};
_local5.timeReceived = getTimer();
localUser.applyPremium(_local4);
};
};
attemptDispatchEvent(_arg1);
}
public function findUser(_arg1:String):void{
if (!socket.connected){
return;
};
socket.send(("0h" + _arg1.toUpperCase()));
}
public function joinRoom(_arg1:String):void{
if (!socket.connected){
return;
};
_joiningRoom = _arg1;
socket.send(("03" + _arg1));
_peers = new Array();
}
public function get clientID():String{
return (_clientID);
}
protected function onMessageReceived(_arg1:DataEvent):void{
var _local2:String;
var _local4:int;
var _local5:Boolean;
var _local6:String;
var _local7:String;
var _local8:MMOchaUser;
var _local9:int;
var _local10:String;
var _local11:String;
var _local12:String;
var _local13:int;
var _local14:Array;
var _local15:RoomInfo;
var _local16:int;
var _local17:String;
var _local18:String;
var _local19:String;
_local2 = _arg1.data;
var _local3:String = _local2.substr(0, 1);
if (Constants.PRINT_NETWORK){
if (((!((_local3 == "M"))) || (!((_local2.charAt(4) == "9"))))){
Debug.output("[MMOcha] Message Received:", _arg1.data);
};
};
switch (_local3){
case "0":
_local10 = _local2.substr(1, 1);
switch (_local10){
case "1":
_local14 = _local2.substr(2).split(";");
_local14.pop();
_local4 = 0;
while (_local4 < _local14.length) {
_local17 = _local14[_local4];
_local13 = parseInt(_local17.substr(0, 2));
_local12 = _local17.substr(2);
_local14[_local4] = new RoomInfo(_local12, _local13, 16);
_local4++;
};
attemptDispatchEvent(new ServerEvent(ServerEvent.ROOM_LIST, false, false, null, null, _local14));
break;
case "4":
_local15 = new RoomInfo();
_local15.gameType = _local2.charAt(2);
_local15.useCustomMaps = (_local2.charAt(3) == "1");
_local15.mapID = StringFunctions.fromAlphaCharacter(_local2.charAt(4).toLowerCase());
_local15.players = parseInt(_local2.substr(5, 2));
_local15.roundTime = parseInt(_local2.substr(7));
attemptDispatchEvent(new ServerEvent(ServerEvent.ROOM_INFO, false, false, null, null, null, _local15));
break;
case "6":
_local7 = _local2.substr(2);
_local9 = _local7.indexOf("=");
if (_local9 > 0){
_local18 = _local7.substr(0, _local9);
_local19 = _local7.substr((_local9 + 1));
attemptDispatchEvent(new ServerEvent(ServerEvent.ROOM_VAR, false, false, _local18, _local19));
};
break;
case "7":
_local7 = _local2.substr(2);
attemptDispatchEvent(new ServerEvent(ServerEvent.GET_IP, false, false, null, _local7));
break;
case "e":
_local7 = _local2.substr(2);
_local9 = _local7.indexOf(";");
_local16 = parseInt(_local7.substr(0, _local9));
_local7 = _local7.substr((_local9 + 2));
attemptDispatchEvent(new ServerEvent(ServerEvent.BAN, false, false, null, _local7, null, _local16));
break;
case "g":
_local7 = _local2.substr(2);
attemptDispatchEvent(new ServerEvent(ServerEvent.WARNING, false, false, null, _local7));
break;
case "h":
_local7 = _local2.substr(2);
attemptDispatchEvent(new ServerEvent(ServerEvent.FIND_USER, false, false, null, _local7));
break;
case "j":
_local7 = _local2.substr(2);
attemptDispatchEvent(new ServerEvent(ServerEvent.GLOBAL_MESSAGE, false, false, null, _local7));
break;
case "r":
_local7 = ("R" + _local2.substr(2));
attemptDispatchEvent(new ServerEvent(ServerEvent.SERVER_MESSAGE, false, false, null, _local7));
break;
case "m":
_local6 = _local2.substr(2, 3);
_local7 = ("m" + _local2.substr(5));
attemptDispatchEvent(new ServerEvent(ServerEvent.PLAYER_MESSAGE, false, false, _local6, _local7));
break;
case "p":
if (_local2.length > 2){
_local6 = _local2.substr(2, 3);
_local7 = _local2.substr(5);
attemptDispatchEvent(new ServerEvent(ServerEvent.PEER_PREMIUMS, false, false, _local6, _local7));
} else {
attemptDispatchEvent(new ServerEvent(ServerEvent.PREMIUMS_REFRESHED));
};
break;
case "y":
_local6 = _local2.substr(2, 3);
_local7 = _local2.substr(5);
if (_local6 == _clientID){
_local5 = true;
_local8 = _localUser;
} else {
_local5 = false;
_local4 = 0;
while (_local4 < _peers.length) {
_local8 = _peers[_local4];
if (_local8.id == _local6){
_local5 = true;
break;
};
_local4++;
};
};
if (_local5){
_local8.wanted = (_local7 == "1");
attemptDispatchEvent(new ServerEvent(ServerEvent.MOST_WANTED_CHANGE, false, false, _local6, _local7, null, _local8));
};
break;
case "9":
switch (_local2.substr(2, 1)){
case "0":
attemptDispatchEvent(new ServerEvent(ServerEvent.SERVER_ERROR, false, false, null, SERVER_FULL));
break;
case "1":
attemptDispatchEvent(new ServerEvent(ServerEvent.SERVER_ERROR, false, false, null, ACCOUNT_BANNED));
break;
case "3":
attemptDispatchEvent(new ServerEvent(ServerEvent.SERVER_ERROR, false, false, null, DUPLICATE_LOGIN));
break;
case "4":
attemptDispatchEvent(new ServerEvent(ServerEvent.SERVER_ERROR, false, false, null, "Vote Kicked"));
break;
default:
attemptDispatchEvent(new ServerEvent(ServerEvent.SERVER_ERROR, false, false, null, "Error"));
break;
};
break;
};
break;
case "A":
_local6 = _local2.substr(1, 3);
_local8 = _localUser;
_local8.id = _local6;
_clientID = _local6;
_authenticated = true;
received_id = true;
updateUserFromAuthenticate(_local8, _local2.substr(4));
attemptDispatchEvent(new ServerEvent(ServerEvent.AUTHENTICATE, false, false, _local8.id, _local8.name, null, _local8));
getXCash();
requestPremiums();
break;
case "U":
_local6 = _local2.substr(1, 3);
_local11 = _local2.substr(4);
_local5 = false;
_local4 = 0;
while (_local4 < _peers.length) {
_local8 = _peers[_local4];
if (_local8.id == _local6){
_local5 = true;
if (_room == "_"){
updateUserFromLobbyHandshake(_local8, _local11);
} else {
updateUserFromGameHandshake(_local8, _local11);
};
attemptDispatchEvent(new ServerEvent(ServerEvent.HANDSHAKE, false, false, _local8.id, _local11, null, _local8));
break;
};
_local4++;
};
if (!_local5){
Debug.output("Handshake received from Unknown User", _local6);
};
break;
case "C":
_local6 = _local2.substr(1, 3);
if (!_clientID){
_local8 = _localUser;
_local8.local = true;
_localUser.id = _local6;
_clientID = _local6;
received_id = true;
};
if (_local6 == _clientID){
_room = _joiningRoom;
attemptDispatchEvent(new ServerEvent(ServerEvent.ROOM_JOINED, false, false, _local6, _room));
} else {
_peers.push(new MMOchaUser(_local6));
attemptDispatchEvent(new ServerEvent(ServerEvent.PEER_JOINED, false, false, _local6));
};
break;
case "D":
_local6 = _local2.substr(1, 3);
if (_local6 == _clientID){
endSession();
attemptDispatchEvent(new ServerEvent(ServerEvent.DISCONNECTED));
} else {
_local4 = 0;
while (_local4 < _peers.length) {
_local8 = _peers[_local4];
if (_local8.id == _local6){
_peers.splice(_local4, 1);
attemptDispatchEvent(new ServerEvent(ServerEvent.PEER_DISCONNECTED, false, false, _local6));
break;
};
_local4++;
};
};
break;
case "M":
_local6 = _local2.substr(1, 3);
switch (_local2.charAt(4)){
case "9":
if (_local2.charAt(5) == "?"){
if (_local6 == clientID){
pingReceived(parseInt(_local2.substr(6)));
};
} else {
_local7 = _local2.substr(5);
_local7 = decrypt(_local7);
attemptDispatchEvent(new ServerEvent(ServerEvent.MESSAGE, false, false, _local6, _local7));
};
break;
default:
_local7 = _local2.substr(4);
attemptDispatchEvent(new ServerEvent(ServerEvent.PLAYER_MESSAGE, false, false, _local6, _local7));
break;
};
break;
case "r":
case "s":
case "n":
case "o":
_local7 = _local2;
attemptDispatchEvent(new ServerEvent(ServerEvent.SERVER_MESSAGE, false, false, null, _local7));
break;
case "p":
attemptDispatchEvent(new ServerEvent(ServerEvent.ROUND_TIME, false, false, null, null, null, parseInt(_local2.substr(1))));
break;
default:
_local6 = _local2.substr(1, 3);
_local7 = _local2.substr(4);
attemptDispatchEvent(new ServerEvent(ServerEvent.PLAYER_MESSAGE, false, false, _local6, _local7));
break;
};
}
protected function onXCash(_arg1:DatabaseEvent):void{
if (_arg1.error){
localUser.mtxCash = Premium.XCASH_ERROR;
} else {
localUser.mtxCash = int(_arg1.data);
};
_arg1.target.removeEventListener(DatabaseEvent.XCASH, onXCash);
attemptDispatchEvent(_arg1);
}
public function get authenticated():Boolean{
return (_authenticated);
}
protected function pingTick(_arg1:TimerEvent):void{
if (!socket.connected){
return;
};
if (((pingsSent) && (room))){
pingsSent.push({time:getTimer(), index:pingIndex});
socket.send(("9?" + pingIndex));
pingIndex = ((pingIndex + 1) % 1000);
};
}
protected function onBuyPremium(_arg1:DatabaseEvent):void{
var _local2:DatabaseRequest = (_arg1.target as DatabaseRequest);
_local2.removeEventListener(DatabaseEvent.BUY_PREMIUM, onBuyPremium);
if (((((!(_local2)) || (!(connected)))) || (!((username == _arg1.username))))){
return;
};
if (!_arg1.error){
localUser.buyPremium(parseInt(_local2.item_id));
};
attemptDispatchEvent(_arg1);
}
protected function endSession():void{
_connecting = false;
_clientID = null;
received_id = false;
_authenticated = false;
_peers = new Array();
_room = null;
_localUser = null;
}
public function getPingTimes():Array{
return (pingTimes.concat());
}
public function get peers():Array{
return (_peers.concat());
}
public function reconnect():void{
if (((!(connected)) && (!(connecting)))){
connect();
};
}
private function updateUserFromLobbyHandshake(_arg1:MMOchaUser, _arg2:String):void{
var _local3:String = _arg2.substr(0, 20);
while (_local3.charAt(0) == "#") {
_local3 = _local3.substr(1);
};
_arg1.name = capitalizeName(_local3);
_arg1.wanted = (_arg2.charAt((_arg2.length - 1)) == "1");
_arg2 = _arg2.substr(0, (_arg2.length - 1));
var _local4:Array = _arg2.substr(20).split(";");
_arg1.stats = new UserStats(_local4[0], _local4[1], _local4[2], _local4[3], _local4[4]);
_arg1.level = parseInt(_local4[5]);
}
public function banByID(_arg1:String, _arg2:int, _arg3:String):void{
if (!socket.connected){
return;
};
socket.send(((((("0e" + _arg1) + ";") + _arg2) + ";") + _arg3));
}
protected function encrypt(_arg1:String):String{
var _local2:int = (int((Math.random() * 9)) + 1);
var _local3:int = ((_local2 * _local2) % _arg1.length);
return (((("" + _local2) + _arg1.substr(_local3)) + _arg1.substr(0, _local3)));
}
public function sendMessage(_arg1:String):void{
if (!socket.connected){
return;
};
socket.send(("9" + encrypt(_arg1)));
}
public function get url():String{
return (_url);
}
public function get ping():int{
var _local2:int;
if (((!(pingTimes)) || (!(pingTimes.length)))){
return (0);
};
var _local1:int;
for each (_local2 in pingTimes) {
_local1 = (_local1 + _local2);
};
return ((_local1 / pingTimes.length));
}
protected function attemptDispatchEvent(_arg1:Event):void{
if (_eventsPaused){
storedEvents.push(_arg1);
} else {
dispatchEvent(_arg1);
};
}
public function get port():int{
return (_port);
}
protected function pingReceived(_arg1:int):void{
var _local3:Object;
var _local4:int;
if (((!(pingsSent)) || (!(pingsSent.length)))){
return;
};
var _local2:int;
while (_local2 < pingsSent.length) {
_local3 = pingsSent[_local2];
if (_local3.index == _arg1){
if (_local2 > 0){
Debug.output("Ping Error");
};
while (_local2 >= 0) {
pingsSent.splice(_local2, 1);
_local2--;
};
_local4 = (getTimer() - _local3.time);
pingTimes.push(_local4);
while (pingTimes.length > 5) {
pingTimes.shift();
};
attemptDispatchEvent(new ServerEvent(ServerEvent.PING));
return;
};
_local2++;
};
Debug.output("Ping Error");
}
public function disablePing():void{
if (pingTimer){
pingTimer.removeEventListener(TimerEvent.TIMER, pingTick);
pingTimer.stop();
pingTimer = null;
};
pingTimes = null;
pingsSent = null;
}
public function setRoomVar(_arg1:String, _arg2:String):void{
if (!socket.connected){
return;
};
socket.send(((("05" + _arg1) + "=") + _arg2));
}
public function get gameID():String{
return (_gameID);
}
public function reauthenticate():void{
if (((!(_username)) || (!(_password)))){
return;
};
_authenticated = false;
if (socket.connected){
socket.send(((("09" + _username) + ";") + _password));
};
}
protected function decrypt(_arg1:String):String{
var _local2:int = int(_arg1.charAt(0));
_arg1 = _arg1.substr(1);
var _local3:int = (_arg1.length - ((_local2 * _local2) % _arg1.length));
return ((_arg1.substr(_local3) + _arg1.substr(0, _local3)));
}
public function enablePing(_arg1:int=1000):void{
_arg1 = Math.max(1000, _arg1);
if (pingTimer){
pingTimer.delay = _arg1;
return;
};
pingTimes = new Array();
pingsSent = new Array();
pingTimer = new Timer(_arg1);
pingTimer.addEventListener(TimerEvent.TIMER, pingTick, false, 0, true);
pingTimer.start();
pingTick(null);
}
public function get password():String{
return (_password);
}
public function submitCustomization(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:String):void{
var _local6:int;
localUser.headModelIndex = _arg1;
localUser.headColorIndex = _arg2;
localUser.bodyModelIndex = _arg3;
localUser.bodyColorIndex = _arg4;
localUser.gender = _arg5;
sendGameMessage((("0d0" + StringFunctions.padInt(_arg1, 2)) + StringFunctions.padInt(_arg2, 2)));
sendGameMessage((("0d1" + StringFunctions.padInt(_arg3, 2)) + StringFunctions.padInt(_arg4, 2)));
switch (_arg5){
case Constants.MONSTER:
default:
_local6 = 0;
break;
case Constants.MALE:
_local6 = 1;
break;
case Constants.FEMALE:
_local6 = 2;
break;
};
sendGameMessage(("0d2" + _local6));
}
public function disconnect():void{
if (!connected){
return;
};
Debug.output("Disconnecting from MMOcha Server");
socket.close();
endSession();
}
public function resumeEvents():void{
_eventsPaused = false;
while (storedEvents.length) {
attemptDispatchEvent(storedEvents.shift());
};
}
public function get eventsPaused():Boolean{
return (_eventsPaused);
}
protected function onRegister(_arg1:DatabaseEvent):void{
_authenticated = !(_arg1.error);
attemptDispatchEvent(_arg1);
_arg1.target.removeEventListener(DatabaseEvent.REGISTER, onRegister);
}
public function register(_arg1:String, _arg2:String):void{
_username = _arg1;
_password = _arg2;
_authenticated = false;
var _local3:DatabaseRequest = new DatabaseRequest(DatabaseRequest.REGISTER, _arg1, _arg2);
_local3.addEventListener(DatabaseEvent.REGISTER, onRegister);
}
public function requestPremiums():void{
var _local1:DatabaseRequest = new DatabaseRequest(DatabaseRequest.GET_PREMIUMS, username);
_local1.addEventListener(DatabaseEvent.GET_PREMIUMS, onReceivePremiums);
}
public function pauseEvents():void{
_eventsPaused = true;
}
public function requestRoundTime():void{
if (!socket.connected){
return;
};
socket.send("p");
}
public function get connecting():Boolean{
return (_connecting);
}
public function requestRoomVar(_arg1:String, _arg2:String):void{
if (!socket.connected){
return;
};
socket.send(((("06" + _arg1) + ";") + _arg2));
}
public function sendServerMessage(_arg1:String):void{
if (!socket.connected){
return;
};
socket.send(_arg1);
}
protected function onIOError(_arg1:IOErrorEvent):void{
Debug.output("Failed to Connect to Server!");
_connecting = false;
_clientID = null;
received_id = false;
attemptDispatchEvent(new ServerEvent(ServerEvent.FAILED));
}
private function updateUserFromGameHandshake(_arg1:MMOchaUser, _arg2:String):void{
var _local3:String = _arg2.substr(5, 20);
while (_local3.charAt(0) == "#") {
_local3 = _local3.substr(1);
};
_arg1.name = capitalizeName(_local3);
_arg1.wanted = (_arg2.charAt((_arg2.length - 1)) == "1");
_arg2 = _arg2.substr(0, (_arg2.length - 1));
var _local4:int = parseInt(_arg2.substr(0, 2));
var _local5:int = parseInt(_arg2.substr(2, 3));
switch (parseInt(_arg2.charAt(25))){
case 0:
default:
_arg1.gender = Constants.MONSTER;
break;
case 1:
_arg1.gender = Constants.MALE;
break;
case 2:
_arg1.gender = Constants.FEMALE;
break;
};
_arg1.equipHead(parseInt(_arg2.substr(26, 2)), parseInt(_arg2.substr(28, 2)));
_arg1.equipBody(parseInt(_arg2.substr(30, 2)), parseInt(_arg2.substr(32, 2)));
var _local6:int = parseInt(_arg2.charAt(34));
_arg2 = _arg2.substr(35);
var _local7:int = _arg2.indexOf(";");
var _local8:int = parseInt(_arg2.substr(0, _local7));
_arg2 = _arg2.substr((_local7 + 1));
_local7 = _arg2.indexOf(";");
var _local9:int = parseInt(_arg2.substr(0, _local7));
_arg2 = _arg2.substr((_local7 + 1));
_local7 = _arg2.indexOf(";");
var _local10:int = parseInt(_arg2.substr(0, _local7));
_arg2 = _arg2.substr((_local7 + 1));
_local7 = _arg2.indexOf(";");
var _local11:int = parseInt(_arg2.substr(0, _local7));
_arg2 = _arg2.substr((_local7 + 1));
var _local12:Array = new Array();
while (_arg2.length > 2) {
_local12.push({weaponID:parseInt(_arg2.substr(0, 2)), flags:parseInt(_arg2.charAt(2))});
_arg2 = _arg2.substr(3);
};
_arg1.handShake = new UserHandshake(_local4, _local5, _local6, _local8, _local9, _local10, _local11, _local12);
}
public function requestRoomList():void{
if (!socket.connected){
return;
};
socket.send("01");
}
public function joinLobby():void{
joinRoom("_");
}
public function authenticate(_arg1:String, _arg2:String):void{
_username = _arg1;
_password = _arg2;
_authenticated = false;
socket.send(((("09" + _username) + ";") + _password));
}
public function get localUser():MMOchaUser{
return (_localUser);
}
public function requestRoomInfo(_arg1:String):void{
if (!socket.connected){
return;
};
socket.send(("04" + _arg1));
}
protected function onDisconnect(_arg1:Event):void{
Debug.output("Disconnected from Server!");
endSession();
attemptDispatchEvent(new ServerEvent(ServerEvent.DISCONNECTED));
}
public function get username():String{
return (_username);
}
public function get room():String{
return (_room);
}
public function sendPrivate(_arg1:String, _arg2:String):void{
if (!socket.connected){
return;
};
socket.send(((("00" + _arg2) + "9") + encrypt(_arg1)));
}
public function buyPremium(_arg1:int):Boolean{
if (((!(connected)) || (!(username)))){
return (false);
};
var _local2:DatabaseRequest = new DatabaseRequest(DatabaseRequest.BUY_PREMIUM, username, password, ("" + _arg1));
_local2.addEventListener(DatabaseEvent.BUY_PREMIUM, onBuyPremium);
return (true);
}
private function updateUserFromAuthenticate(_arg1:MMOchaUser, _arg2:String):void{
var _local3:String = _arg2.substr(0, 20);
while (_local3.charAt(0) == "#") {
_local3 = _local3.substr(1);
};
_arg1.name = capitalizeName(_local3);
_arg1.level = parseInt(_arg2.charAt(20));
_arg1.wanted = (_arg2.charAt((_arg2.length - 1)) == "1");
_arg2 = _arg2.substr(0, (_arg2.length - 1));
switch (parseInt(_arg2.charAt(21))){
case 0:
default:
_arg1.gender = Constants.MONSTER;
break;
case 1:
_arg1.gender = Constants.MALE;
break;
case 2:
_arg1.gender = Constants.FEMALE;
break;
};
_arg1.equipHead(parseInt(_arg2.substr(22, 2)), parseInt(_arg2.substr(24, 2)));
_arg1.equipBody(parseInt(_arg2.substr(26, 2)), parseInt(_arg2.substr(28, 2)));
var _local4:Array = _arg2.substr(30).split(";");
_arg1.stats = new UserStats(_local4[0], _local4[1], _local4[2], _local4[3], _local4[4]);
}
public function sendWarning(_arg1:String, _arg2:String):void{
if (!socket.connected){
return;
};
socket.send((("0g" + _arg1) + _arg2));
}
public function createRoom(_arg1:String, _arg2:Boolean, _arg3:String, _arg4:Boolean, _arg5:Array):void{
var _local6:String;
var _local7:int;
if (!socket.connected){
return;
};
_joiningRoom = _arg1;
if (_arg1 == "_"){
} else {
_local6 = ("02" + _arg3);
if (_arg4){
_local6 = (_local6 + "1");
} else {
_local6 = (_local6 + "0");
};
if (_arg2){
_local6 = (_local6 + "1");
} else {
_local6 = (_local6 + "0");
};
_local6 = (_local6 + (_arg1 + ";"));
for each (_local7 in _arg5) {
_local6 = (_local6 + StringFunctions.toAlphaCharacter(_local7).toUpperCase());
};
socket.send(_local6);
};
_peers = new Array();
}
protected function connect():void{
if (((!(port)) || (!(url)))){
Debug.output("No MMOcha Server specified.");
return;
};
_connecting = true;
Debug.output("Connecting to MMOcha Server");
socket.connect(_url, _port);
}
public function updatePremiumsFromDB():void{
if (!socket.connected){
return;
};
socket.send("0p");
}
public function getIP(_arg1:String):void{
if (!socket.connected){
return;
};
socket.send(("07" + _arg1));
}
protected static function capitalizeName(_arg1:String):String{
return ((_arg1.charAt(0).toUpperCase() + _arg1.substr(1)));
}
}
}//package MMOcha.server
Section 428
//MMOchaUser (MMOcha.server.MMOchaUser)
package MMOcha.server {
import boxhead.security.*;
import flash.utils.*;
import boxhead.assets.*;
public class MMOchaUser {
public var gender:String;// = "Monster"
public var level:int;// = 0
public var wanted:Boolean;// = false
public var quickPlay:Boolean;// = false
public var name:String;
private var _mtxCash:StoredInt;
public var availableHeadModels:Array;
public var availableBodyModels:Array;
public var handShake:UserHandshake;
public var ignore:Boolean;// = false
public var id:String;
public var stats:UserStats;
public var headModelIndex:int;// = 0
public var bodyModelIndex:int;// = 0
public var friend:Boolean;// = false
public var headColorIndex:int;// = 0
public var bodyColorIndex:int;// = 0
public var local:Boolean;// = false
public var premiums:Array;
public static const WANTED_COLOR:uint = 14101291;
public static const MODERATOR_COLOR:uint = 0xDFDFDF;
public static const NORMAL_COLOR:uint = 0xA6A6A6;
public static const LOCAL_COLOR:uint = 16777024;
public function MMOchaUser(_arg1:String){
var _local2:int;
_mtxCash = new StoredInt(Premium.RETRIEVING_XCASH);
super();
this.id = _arg1;
name = "Unknown User";
stats = new UserStats();
premiums = new Array();
for each (_local2 in Premium.VALID_PREMIUMS) {
premiums[_local2] = Premium.lookup(_local2).clone();
};
availableHeadModels = BodyParts.freeHeadModels.concat();
availableBodyModels = BodyParts.freeBodyModels.concat();
}
public function buyPremium(_arg1:int):void{
applyPremium(_arg1);
var _local2:Premium = premiums[_arg1];
_local2.remainingHours = _local2.duration;
_local2.timeReceived = getTimer();
}
public function get moderator():Boolean{
return ((level > 0));
}
public function applyPremium(_arg1:int):void{
var _local2:Premium = premiums[_arg1];
if (_local2.owned){
return;
};
_local2.owned = true;
switch (_arg1){
case Premium.DEVIL_ID:
if (availableHeadModels.indexOf("Devil") == -1){
availableHeadModels.push("Devil");
};
if (availableBodyModels.indexOf("Devil") == -1){
availableBodyModels.push("Devil");
};
break;
};
}
public function get mtxCash():int{
return (_mtxCash.value);
}
public function set mtxCash(_arg1:int):void{
_mtxCash.value = _arg1;
}
public function get color():uint{
if (wanted){
return (WANTED_COLOR);
};
if (level > 0){
return (MODERATOR_COLOR);
};
return (NORMAL_COLOR);
}
public function equipHead(_arg1:int, _arg2:int):void{
headModelIndex = _arg1;
headColorIndex = _arg2;
}
public function equipBody(_arg1:int, _arg2:int):void{
bodyModelIndex = _arg1;
bodyColorIndex = _arg2;
}
}
}//package MMOcha.server
Section 429
//RoomInfo (MMOcha.server.RoomInfo)
package MMOcha.server {
public class RoomInfo {
public var name:String;
public var gameType:String;
public var maxPlayers:int;
public var useCustomMaps:Boolean;
public var players:int;
public var mapID:int;
public var roundTime:int;
public function RoomInfo(_arg1:String=null, _arg2:int=0, _arg3:int=0){
this.name = _arg1;
this.players = _arg2;
this.maxPlayers = _arg3;
}
}
}//package MMOcha.server
Section 430
//ServerEvent (MMOcha.server.ServerEvent)
package MMOcha.server {
import flash.events.*;
public class ServerEvent extends Event {
public var message:String;
public var source:String;
public var info:Object;
public var list:Array;
public static const ROOM_LIST:String = "Room List";
public static const SERVER_MESSAGE:String = "Server Message";
public static const PEER_JOINED:String = "Peer Joined";
public static const PLAYER_MESSAGE:String = "Player Message";
public static const GLOBAL_MESSAGE:String = "Global Message";
public static const GET_IP:String = "Get IP";
public static const FIND_USER:String = "Find User";
public static const MOST_WANTED_CHANGE:String = "Most Wanted Change";
public static const AUTHENTICATE:String = "Authenticate";
public static const HANDSHAKE:String = "Handshake";
public static const ROOM_INFO:String = "Room Info";
public static const ROOM_VAR:String = "Room Var";
public static const PREMIUMS_REFRESHED:String = "Premiums Refreshed";
public static const MESSAGE:String = "Message";
public static const CONNECTED:String = "Connected";
public static const SERVER_ERROR:String = "Server Error";
public static const ROOM_JOINED:String = "Room Joined";
public static const BAN:String = "Ban";
public static const PING:String = "Ping";
public static const PEER_DISCONNECTED:String = "Peer Disconnected";
public static const PEER_PREMIUMS:String = "Peer Premiums";
public static const DISCONNECTED:String = "Disconnected";
public static const WARNING:String = "Warning";
public static const FAILED:String = "Failed";
public static const ROUND_TIME:String = "Round Time";
public function ServerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null, _arg6:Array=null, _arg7:Object=null){
super(_arg1, _arg2, _arg3);
source = _arg4;
message = _arg5;
this.list = _arg6;
this.info = _arg7;
}
override public function clone():Event{
return (new ServerEvent(type, bubbles, cancelable, source, message, list, info));
}
}
}//package MMOcha.server
Section 431
//ServerInfo (MMOcha.server.ServerInfo)
package MMOcha.server {
public class ServerInfo {
public var port:int;
public var name:String;
public var area:String;
public var url:String;
public static const LOCAL:String = "Local";
public static const EURO:String = "US";
public static const US:String = "US";
public function ServerInfo(_arg1:String, _arg2:String, _arg3:int, _arg4:String){
this.name = _arg1;
this.url = _arg2;
this.port = _arg3;
this.area = _arg4;
}
}
}//package MMOcha.server
Section 432
//UserHandshake (MMOcha.server.UserHandshake)
package MMOcha.server {
public class UserHandshake {
public var bountyPoints:int;
public var hp:int;
public var upgrades:Array;
public var score:int;
public var kills:int;
public var weaponID:int;
public var team:int;
public var deaths:int;
public function UserHandshake(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Array){
this.weaponID = _arg1;
this.hp = _arg2;
this.team = _arg3;
this.score = _arg4;
this.kills = _arg5;
this.deaths = _arg6;
this.bountyPoints = _arg7;
this.upgrades = _arg8;
}
}
}//package MMOcha.server
Section 433
//UserStats (MMOcha.server.UserStats)
package MMOcha.server {
import boxhead.security.*;
public class UserStats {
protected var storedDeaths:StoredInt;
protected var storedBountyPoints:StoredInt;
protected var storedKills:StoredInt;
protected var storedWins:StoredInt;
protected var storedLosses:StoredInt;
public function UserStats(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0, _arg5:int=0){
storedKills = new StoredInt(0);
storedDeaths = new StoredInt(0);
storedBountyPoints = new StoredInt(0);
storedWins = new StoredInt(0);
storedLosses = new StoredInt(0);
super();
this.kills = _arg1;
this.deaths = _arg2;
this.wins = _arg3;
this.losses = _arg4;
this.bountyPoints = _arg5;
}
public function set kills(_arg1:int):void{
storedKills.value = _arg1;
}
public function get bountyPoints():int{
return (storedBountyPoints.value);
}
public function set losses(_arg1:int):void{
storedLosses.value = _arg1;
}
public function get kills():int{
return (storedKills.value);
}
public function get wins():int{
return (storedWins.value);
}
public function get losses():int{
return (storedLosses.value);
}
public function set bountyPoints(_arg1:int):void{
storedBountyPoints.value = _arg1;
}
public function set wins(_arg1:int):void{
storedWins.value = _arg1;
}
public function set deaths(_arg1:int):void{
storedDeaths.value = _arg1;
}
public function get deaths():int{
return (storedDeaths.value);
}
}
}//package MMOcha.server
Section 434
//LanguageFilter (MMOcha.utils.LanguageFilter)
package MMOcha.utils {
public class LanguageFilter {
private static const badExps:Array = new Array();
private static const goodWords:Array = new Array();
private static var badWords:Array = null;
private static function init():void{
var _local1:String;
var _local3:int;
var _local2:int;
while (_local2 < badWords.length) {
badExps[_local2] = new RegExp(badWords[_local2], "ig");
_local1 = "";
_local3 = 0;
while (_local3 < badWords[_local2].length) {
_local1 = (_local1 + "*");
_local3++;
};
goodWords[_local2] = _local1;
_local2++;
};
}
public static function enable(_arg1:Array=null):void{
if (_arg1){
badWords = _arg1;
} else {
badWords = "asshole,arsehole,arse,bastard,beastiality,bestiality,bitch,bitcher,bitchers,bitches,bitchin,bitching,blowjob,clit,cock,cocksuck,cocksucker,cum,cumming,cumshot,cunilingus,cunillingus,cunnilingus,cunt,cuntlick,cunts,cyberfuc,cyberfuck,dick,dildo,ejaculate,ejaculated,ejaculates,ejaculating,ejaculatings,ejaculation,fag,fagging,faggot,faggs,fagot,felatio,fellatio,fingerfuck,fistfuck,fucked,fucker,fuckin,fucking,fuckme,fuk,fuks,gangbang,gaysex,goddamn,hardcoresex,horniest,horny,hotsex,jack-off,jerk-off,jism,jiz,jizm,kock,kondum,kondums,kum,kummer,kumming,kunilingus,mothafuck,mothafucka,mothafucker,mothafuckin,mothafucking,mothafucks,motherfuck,motherfucker,motherfuckin,motherfucking,nigger,orgasim,orgasm,phonesex,phuk,phuked,phuking,phuq,porn,porno,pornography,pornos,prick,pricks,pussies,pussy,shit,shited,shitfull,shiting,shitted,shitter,shitting,shitty,slut,sluts,smut,spunk,twat,fuck".split(",");
};
init();
}
public static function filter(_arg1:String):String{
if (!badWords){
return (_arg1);
};
var _local2:int;
while (_local2 < badWords.length) {
_arg1 = _arg1.replace(badExps[_local2], goodWords[_local2]);
_local2++;
};
return (_arg1);
}
}
}//package MMOcha.utils
Section 435
//StringFunctions (MMOcha.utils.StringFunctions)
package MMOcha.utils {
public class StringFunctions {
public static const MAX_NUMERIC:int = 61;
public static function fromAlphaNumericCharacter(_arg1:String):int{
var _local2:int = _arg1.charCodeAt(0);
if (_local2 >= 97){
if (_local2 <= 122){
return ((_local2 - 87));
};
} else {
if (_local2 >= 65){
if (_local2 <= 90){
return ((_local2 - 29));
};
} else {
if (_local2 >= 48){
if (_local2 <= 57){
return ((_local2 - 48));
};
};
};
};
return (undefined);
}
public static function fromAlphaCharacter(_arg1:String):int{
var _local2:int = _arg1.charCodeAt(0);
if (_local2 >= 97){
if (_local2 <= 122){
return ((_local2 - 97));
};
} else {
if (_local2 >= 65){
if (_local2 <= 90){
return ((_local2 - 39));
};
};
};
return (undefined);
}
public static function toAlphaCharacter(_arg1:int):String{
if ((((_arg1 < 0)) || ((_arg1 > 51)))){
return (undefined);
};
if (_arg1 < 26){
return ((_arg1 + 10).toString(36));
};
return ((_arg1 - 16).toString(36).toUpperCase());
}
public static function padInt(_arg1:int, _arg2:int):String{
var _local3 = "";
if (_arg1 < 0){
_local3 = "-";
_arg1 = -(_arg1);
};
var _local4:String = String(_arg1);
if ((_local3.length + _local4.length) > _arg2){
while (_local3.length < _arg2) {
_local3 = (_local3 + "9");
};
} else {
while ((_local3.length + _local4.length) < _arg2) {
_local3 = (_local3 + "0");
};
_local3 = (_local3 + _local4);
};
return (_local3);
}
public static function toAlphaNumericCharacter(_arg1:int):String{
if ((((_arg1 < 0)) || ((_arg1 > 61)))){
return (undefined);
};
if (_arg1 < 36){
return (_arg1.toString(36));
};
return ((_arg1 - 26).toString(36).toUpperCase());
}
}
}//package MMOcha.utils
Section 436
//IAutomationObject (mx.automation.IAutomationObject)
package mx.automation {
import flash.events.*;
public interface IAutomationObject {
function createAutomationIDPart(_arg1:IAutomationObject):Object;
function get automationName():String;
function get showInAutomationHierarchy():Boolean;
function set automationName(_arg1:String):void;
function getAutomationChildAt(_arg1:int):IAutomationObject;
function get automationDelegate():Object;
function get automationTabularData():Object;
function resolveAutomationIDPart(_arg1:Object):Array;
function replayAutomatableEvent(_arg1:Event):Boolean;
function set automationDelegate(_arg1:Object):void;
function get automationValue():Array;
function get numAutomationChildren():int;
function set showInAutomationHierarchy(_arg1:Boolean):void;
}
}//package mx.automation
Section 437
//Binding (mx.binding.Binding)
package mx.binding {
import flash.utils.*;
import mx.collections.errors.*;
public class Binding {
mx_internal var destFunc:Function;
mx_internal var srcFunc:Function;
mx_internal var destString:String;
mx_internal var document:Object;
private var hasHadValue:Boolean;
mx_internal var disabledRequests:Dictionary;
mx_internal var isExecuting:Boolean;
mx_internal var isHandlingEvent:Boolean;
public var twoWayCounterpart:Binding;
private var wrappedFunctionSuccessful:Boolean;
mx_internal var _isEnabled:Boolean;
public var uiComponentWatcher:int;
private var lastValue:Object;
mx_internal static const VERSION:String = "3.3.0.4852";
public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){
this.document = _arg1;
this.srcFunc = _arg2;
this.destFunc = _arg3;
this.destString = _arg4;
_isEnabled = true;
isExecuting = false;
isHandlingEvent = false;
hasHadValue = false;
uiComponentWatcher = -1;
BindingManager.addBinding(_arg1, _arg4, this);
}
private function registerDisabledExecute(_arg1:Object):void{
if (_arg1 != null){
disabledRequests = ((disabledRequests)!=null) ? disabledRequests : new Dictionary(true);
disabledRequests[_arg1] = true;
};
}
protected function wrapFunctionCall(_arg1:Object, _arg2:Function, _arg3:Object=null, ... _args):Object{
var result:Object;
var thisArg = _arg1;
var wrappedFunction = _arg2;
var object = _arg3;
var args = _args;
wrappedFunctionSuccessful = false;
try {
result = wrappedFunction.apply(thisArg, args);
wrappedFunctionSuccessful = true;
return (result);
} catch(itemPendingError:ItemPendingError) {
itemPendingError.addResponder(new EvalBindingResponder(this, object));
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + itemPendingError));
};
} catch(rangeError:RangeError) {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + rangeError));
};
} catch(error:Error) {
if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){
throw (error);
} else {
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", error = ") + error));
};
};
};
return (null);
}
public function watcherFired(_arg1:Boolean, _arg2:int):void{
var commitEvent = _arg1;
var cloneIndex = _arg2;
if (isHandlingEvent){
return;
};
try {
isHandlingEvent = true;
execute(cloneIndex);
} finally {
isHandlingEvent = false;
};
}
private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{
var _local4:uint;
var _local3:uint = _arg1.length();
if (_local3 == _arg2.length()){
_local4 = 0;
while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) {
_local4++;
};
return ((_local4 == _local3));
//unresolved jump
};
return (false);
}
mx_internal function set isEnabled(_arg1:Boolean):void{
_isEnabled = _arg1;
if (_arg1){
processDisabledRequests();
};
}
private function processDisabledRequests():void{
var _local1:Object;
if (disabledRequests != null){
for (_local1 in disabledRequests) {
execute(_local1);
};
disabledRequests = null;
};
}
public function execute(_arg1:Object=null):void{
var o = _arg1;
if (!isEnabled){
if (o != null){
registerDisabledExecute(o);
};
return;
};
if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){
hasHadValue = true;
return;
};
try {
isExecuting = true;
wrapFunctionCall(this, innerExecute, o);
} finally {
isExecuting = false;
};
}
mx_internal function get isEnabled():Boolean{
return (_isEnabled);
}
private function innerExecute():void{
var _local1:Object = wrapFunctionCall(document, srcFunc);
if (BindingManager.debugDestinationStrings[destString]){
trace(((("Binding: destString = " + destString) + ", srcFunc result = ") + _local1));
};
if (((hasHadValue) || (wrappedFunctionSuccessful))){
if (((!((((((lastValue is XML)) && (lastValue.hasComplexContent()))) && ((lastValue === _local1))))) && (!((((((((lastValue is XMLList)) && (lastValue.hasComplexContent()))) && ((_local1 is XMLList)))) && (nodeSeqEqual((lastValue as XMLList), (_local1 as XMLList)))))))){
destFunc.call(document, _local1);
lastValue = _local1;
hasHadValue = true;
};
};
}
}
}//package mx.binding
Section 438
//BindingManager (mx.binding.BindingManager)
package mx.binding {
public class BindingManager {
mx_internal static const VERSION:String = "3.3.0.4852";
static var debugDestinationStrings:Object = {};
public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:String;
if (((!(_arg2)) || ((_arg2 == "")))){
return;
};
if (((((((_arg1) && ((((_arg1 is IBindingClient)) || (_arg1.hasOwnProperty("_bindingsByDestination")))))) && (_arg1._bindingsByDestination))) && (_arg1._bindingsBeginWithWord[getFirstWord(_arg2)]))){
for (_local4 in _arg1._bindingsByDestination) {
if (_local4.charAt(0) == _arg2.charAt(0)){
if ((((((_local4.indexOf((_arg2 + ".")) == 0)) || ((_local4.indexOf((_arg2 + "[")) == 0)))) || ((_local4 == _arg2)))){
_arg1._bindingsByDestination[_local4].execute(_arg3);
};
};
};
};
}
public static function addBinding(_arg1:Object, _arg2:String, _arg3:Binding):void{
if (!_arg1._bindingsByDestination){
_arg1._bindingsByDestination = {};
_arg1._bindingsBeginWithWord = {};
};
_arg1._bindingsByDestination[_arg2] = _arg3;
_arg1._bindingsBeginWithWord[getFirstWord(_arg2)] = true;
}
public static function debugBinding(_arg1:String):void{
debugDestinationStrings[_arg1] = true;
}
private static function getFirstWord(_arg1:String):String{
var _local2:int = _arg1.indexOf(".");
var _local3:int = _arg1.indexOf("[");
if (_local2 == _local3){
return (_arg1);
};
var _local4:int = Math.min(_local2, _local3);
if (_local4 == -1){
_local4 = Math.max(_local2, _local3);
};
return (_arg1.substr(0, _local4));
}
public static function setEnabled(_arg1:Object, _arg2:Boolean):void{
var _local3:Array;
var _local4:uint;
var _local5:Binding;
if ((((_arg1 is IBindingClient)) && (_arg1._bindings))){
_local3 = (_arg1._bindings as Array);
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4];
_local5.isEnabled = _arg2;
_local4++;
};
};
}
}
}//package mx.binding
Section 439
//EvalBindingResponder (mx.binding.EvalBindingResponder)
package mx.binding {
import mx.rpc.*;
public class EvalBindingResponder implements IResponder {
private var binding:Binding;
private var object:Object;
mx_internal static const VERSION:String = "3.3.0.4852";
public function EvalBindingResponder(_arg1:Binding, _arg2:Object){
this.binding = _arg1;
this.object = _arg2;
}
public function fault(_arg1:Object):void{
}
public function result(_arg1:Object):void{
binding.execute(object);
}
}
}//package mx.binding
Section 440
//IBindingClient (mx.binding.IBindingClient)
package mx.binding {
public interface IBindingClient {
}
}//package mx.binding
Section 441
//ItemPendingError (mx.collections.errors.ItemPendingError)
package mx.collections.errors {
import mx.rpc.*;
public class ItemPendingError extends Error {
private var _responders:Array;
mx_internal static const VERSION:String = "3.3.0.4852";
public function ItemPendingError(_arg1:String){
super(_arg1);
}
public function get responders():Array{
return (_responders);
}
public function addResponder(_arg1:IResponder):void{
if (!_responders){
_responders = [];
};
_responders.push(_arg1);
}
}
}//package mx.collections.errors
Section 442
//DataGridListData (mx.controls.dataGridClasses.DataGridListData)
package mx.controls.dataGridClasses {
import mx.core.*;
import mx.controls.listClasses.*;
public class DataGridListData extends BaseListData {
public var dataField:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public function DataGridListData(_arg1:String, _arg2:String, _arg3:int, _arg4:String, _arg5:IUIComponent, _arg6:int=0){
super(_arg1, _arg4, _arg5, _arg6, _arg3);
this.dataField = _arg2;
}
}
}//package mx.controls.dataGridClasses
Section 443
//BaseListData (mx.controls.listClasses.BaseListData)
package mx.controls.listClasses {
import mx.core.*;
public class BaseListData {
private var _uid:String;
public var owner:IUIComponent;
public var label:String;
public var rowIndex:int;
public var columnIndex:int;
mx_internal static const VERSION:String = "3.3.0.4852";
public function BaseListData(_arg1:String, _arg2:String, _arg3:IUIComponent, _arg4:int=0, _arg5:int=0){
this.label = _arg1;
this.uid = _arg2;
this.owner = _arg3;
this.rowIndex = _arg4;
this.columnIndex = _arg5;
}
public function set uid(_arg1:String):void{
_uid = _arg1;
}
public function get uid():String{
return (_uid);
}
}
}//package mx.controls.listClasses
Section 444
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer)
package mx.controls.listClasses {
public interface IDropInListItemRenderer {
function get listData():BaseListData;
function set listData(_arg1:BaseListData):void;
}
}//package mx.controls.listClasses
Section 445
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer)
package mx.controls.listClasses {
import flash.events.*;
import mx.core.*;
import mx.styles.*;
import mx.managers.*;
public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent {
}
}//package mx.controls.listClasses
Section 446
//ScrollBar (mx.controls.scrollClasses.ScrollBar)
package mx.controls.scrollClasses {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.geom.*;
import flash.utils.*;
import mx.events.*;
import mx.controls.*;
import flash.ui.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
private var _pageScrollSize:Number;// = 0
mx_internal var scrollTrack:Button;
mx_internal var downArrow:Button;
mx_internal var scrollThumb:ScrollThumb;
private var trackScrollRepeatDirection:int;
private var _minScrollPosition:Number;// = 0
private var trackPosition:Number;
private var _pageSize:Number;// = 0
mx_internal var _minHeight:Number;// = 32
private var _maxScrollPosition:Number;// = 0
private var trackScrollTimer:Timer;
mx_internal var upArrow:Button;
private var _lineScrollSize:Number;// = 1
private var _scrollPosition:Number;// = 0
private var trackScrolling:Boolean;// = false
mx_internal var isScrolling:Boolean;
mx_internal var oldPosition:Number;
mx_internal var _minWidth:Number;// = 16
mx_internal static const VERSION:String = "3.3.0.4852";
public static const THICKNESS:Number = 16;
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
invalidateDisplayList();
}
public function set lineScrollSize(_arg1:Number):void{
_lineScrollSize = _arg1;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{
var _local3:ScrollEvent = new ScrollEvent(ScrollEvent.SCROLL);
_local3.detail = _arg2;
_local3.position = scrollPosition;
_local3.delta = (scrollPosition - _arg1);
_local3.direction = direction;
dispatchEvent(_local3);
}
private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(1);
}
private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{
if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){
return;
};
trackScrolling = true;
var _local2:DisplayObject = systemManager.getSandboxRoot();
_local2.addEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
_local2.addEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
_local2.addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, scrollTrack_mouseLeaveHandler);
systemManager.deployMouseShields(true);
var _local3:Point = new Point(_arg1.localX, _arg1.localY);
_local3 = _arg1.target.localToGlobal(_local3);
_local3 = globalToLocal(_local3);
trackPosition = _local3.y;
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _local3.y)) ? 1 : ((scrollThumb.y > _local3.y)) ? -1 : 0;
pageScroll(trackScrollRepeatDirection);
if (!trackScrollTimer){
trackScrollTimer = new Timer(getStyle("repeatDelay"), 1);
trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler);
};
trackScrollTimer.start();
}
public function set minScrollPosition(_arg1:Number):void{
_minScrollPosition = _arg1;
invalidateDisplayList();
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
mx_internal function get linePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT);
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
protected function get thumbStyleFilters():Object{
return (null);
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
mx_internal function get virtualHeight():Number{
return (unscaledHeight);
}
public function set scrollPosition(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_scrollPosition = _arg1;
if (scrollThumb){
if (!cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = true);
};
if (!isScrolling){
_arg1 = Math.min(_arg1, maxScrollPosition);
_arg1 = Math.max(_arg1, minScrollPosition);
_local2 = (maxScrollPosition - minScrollPosition);
_local3 = ((((_local2 == 0)) || (isNaN(_local2)))) ? 0 : ((((_arg1 - minScrollPosition) * (trackHeight - scrollThumb.height)) / _local2) + trackY);
_local4 = (((virtualWidth - scrollThumb.width) / 2) + getStyle("thumbOffset"));
scrollThumb.move(Math.round(_local4), Math.round(_local3));
};
};
}
protected function get downArrowStyleFilters():Object{
return (null);
}
public function get pageSize():Number{
return (_pageSize);
}
public function set pageScrollSize(_arg1:Number):void{
_pageScrollSize = _arg1;
}
public function set maxScrollPosition(_arg1:Number):void{
_maxScrollPosition = _arg1;
invalidateDisplayList();
}
mx_internal function pageScroll(_arg1:int):void{
var _local4:Number;
var _local5:String;
var _local2:Number = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize;
var _local3:Number = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
override protected function createChildren():void{
super.createChildren();
if (!scrollTrack){
scrollTrack = new Button();
scrollTrack.focusEnabled = false;
scrollTrack.skinName = "trackSkin";
scrollTrack.upSkinName = "trackUpSkin";
scrollTrack.overSkinName = "trackOverSkin";
scrollTrack.downSkinName = "trackDownSkin";
scrollTrack.disabledSkinName = "trackDisabledSkin";
if ((scrollTrack is ISimpleStyleClient)){
ISimpleStyleClient(scrollTrack).styleName = this;
};
addChild(scrollTrack);
scrollTrack.validateProperties();
};
if (!upArrow){
upArrow = new Button();
upArrow.enabled = false;
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
upArrow.upSkinName = "upArrowUpSkin";
upArrow.overSkinName = "upArrowOverSkin";
upArrow.downSkinName = "upArrowDownSkin";
upArrow.disabledSkinName = "upArrowDisabledSkin";
upArrow.skinName = "upArrowSkin";
upArrow.upIconName = "";
upArrow.overIconName = "";
upArrow.downIconName = "";
upArrow.disabledIconName = "";
addChild(upArrow);
upArrow.styleName = new StyleProxy(this, upArrowStyleFilters);
upArrow.validateProperties();
upArrow.addEventListener(FlexEvent.BUTTON_DOWN, upArrow_buttonDownHandler);
};
if (!downArrow){
downArrow = new Button();
downArrow.enabled = false;
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
downArrow.upSkinName = "downArrowUpSkin";
downArrow.overSkinName = "downArrowOverSkin";
downArrow.downSkinName = "downArrowDownSkin";
downArrow.disabledSkinName = "downArrowDisabledSkin";
downArrow.skinName = "downArrowSkin";
downArrow.upIconName = "";
downArrow.overIconName = "";
downArrow.downIconName = "";
downArrow.disabledIconName = "";
addChild(downArrow);
downArrow.styleName = new StyleProxy(this, downArrowStyleFilters);
downArrow.validateProperties();
downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler);
};
}
private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{
if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){
return;
};
if (trackScrolling){
trackScrollTimer.start();
};
}
private function get minDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT);
}
mx_internal function isScrollBarKey(_arg1:uint):Boolean{
var _local2:Number;
if (_arg1 == Keyboard.HOME){
if (scrollPosition != 0){
_local2 = scrollPosition;
scrollPosition = 0;
dispatchScrollEvent(_local2, minDetail);
};
return (true);
} else {
if (_arg1 == Keyboard.END){
if (scrollPosition < maxScrollPosition){
_local2 = scrollPosition;
scrollPosition = maxScrollPosition;
dispatchScrollEvent(_local2, maxDetail);
};
return (true);
};
};
return (false);
}
mx_internal function get lineMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT);
}
mx_internal function get pageMinusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_UP : ScrollEventDetail.PAGE_LEFT);
}
private function get maxDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_BOTTOM : ScrollEventDetail.AT_RIGHT);
}
private function scrollTrack_mouseLeaveHandler(_arg1:Event):void{
trackScrolling = false;
var _local2:DisplayObject = systemManager.getSandboxRoot();
_local2.removeEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true);
_local2.removeEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true);
_local2.removeEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, scrollTrack_mouseLeaveHandler);
systemManager.deployMouseShields(false);
if (trackScrollTimer){
trackScrollTimer.reset();
};
if (_arg1.target != scrollTrack){
return;
};
var _local3:String = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail;
dispatchScrollEvent(oldPosition, _local3);
oldPosition = NaN;
}
protected function get upArrowStyleFilters():Object{
return (null);
}
private function get trackHeight():Number{
return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight())));
}
public function get pageScrollSize():Number{
return (_pageScrollSize);
}
override protected function measure():void{
super.measure();
upArrow.validateSize();
downArrow.validateSize();
scrollTrack.validateSize();
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
_minWidth = (scrollThumb) ? scrollThumb.getExplicitOrMeasuredWidth() : 0;
_minWidth = Math.max(scrollTrack.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredWidth(), _minWidth);
} else {
_minWidth = upArrow.getExplicitOrMeasuredWidth();
};
_minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight());
}
mx_internal function lineScroll(_arg1:int):void{
var _local4:Number;
var _local5:String;
var _local2:Number = _lineScrollSize;
var _local3:Number = (_scrollPosition + (_arg1 * _local2));
if (_local3 > maxScrollPosition){
_local3 = maxScrollPosition;
} else {
if (_local3 < minScrollPosition){
_local3 = minScrollPosition;
};
};
if (_local3 != scrollPosition){
_local4 = scrollPosition;
scrollPosition = _local3;
_local5 = ((_arg1 < 0)) ? lineMinusDetail : linePlusDetail;
dispatchScrollEvent(_local4, _local5);
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
var _local5:Number;
this.pageSize = _arg1;
_pageScrollSize = ((_arg4)>0) ? _arg4 : _arg1;
this.minScrollPosition = Math.max(_arg2, 0);
this.maxScrollPosition = Math.max(_arg3, 0);
_scrollPosition = Math.max(this.minScrollPosition, _scrollPosition);
_scrollPosition = Math.min(this.maxScrollPosition, _scrollPosition);
if (((((this.maxScrollPosition - this.minScrollPosition) > 0)) && (enabled))){
upArrow.enabled = true;
downArrow.enabled = true;
scrollTrack.enabled = true;
addEventListener(MouseEvent.MOUSE_DOWN, scrollTrack_mouseDownHandler);
addEventListener(MouseEvent.MOUSE_OVER, scrollTrack_mouseOverHandler);
addEventListener(MouseEvent.MOUSE_OUT, scrollTrack_mouseOutHandler);
if (!scrollThumb){
scrollThumb = new ScrollThumb();
scrollThumb.focusEnabled = false;
addChildAt(scrollThumb, getChildIndex(downArrow));
scrollThumb.styleName = new StyleProxy(this, thumbStyleFilters);
scrollThumb.upSkinName = "thumbUpSkin";
scrollThumb.overSkinName = "thumbOverSkin";
scrollThumb.downSkinName = "thumbDownSkin";
scrollThumb.iconName = "thumbIcon";
scrollThumb.skinName = "thumbSkin";
};
_local5 = ((trackHeight < 0)) ? 0 : Math.round(((_arg1 / ((this.maxScrollPosition - this.minScrollPosition) + _arg1)) * trackHeight));
if (_local5 < scrollThumb.minHeight){
if (trackHeight < scrollThumb.minHeight){
scrollThumb.visible = false;
} else {
_local5 = scrollThumb.minHeight;
scrollThumb.visible = true;
scrollThumb.setActualSize(scrollThumb.measuredWidth, scrollThumb.minHeight);
};
} else {
scrollThumb.visible = true;
scrollThumb.setActualSize(scrollThumb.measuredWidth, _local5);
};
scrollThumb.setRange((upArrow.getExplicitOrMeasuredHeight() + 0), ((virtualHeight - downArrow.getExplicitOrMeasuredHeight()) - scrollThumb.height), this.minScrollPosition, this.maxScrollPosition);
scrollPosition = Math.max(Math.min(scrollPosition, this.maxScrollPosition), this.minScrollPosition);
} else {
upArrow.enabled = false;
downArrow.enabled = false;
scrollTrack.enabled = false;
if (scrollThumb){
scrollThumb.visible = false;
};
};
}
private function trackScrollTimerHandler(_arg1:Event):void{
if (trackScrollRepeatDirection == 1){
if ((scrollThumb.y + scrollThumb.height) > trackPosition){
return;
};
};
if (trackScrollRepeatDirection == -1){
if (scrollThumb.y < trackPosition){
return;
};
};
pageScroll(trackScrollRepeatDirection);
if (((trackScrollTimer) && ((trackScrollTimer.repeatCount == 1)))){
trackScrollTimer.delay = getStyle("repeatInterval");
trackScrollTimer.repeatCount = 0;
};
}
private function upArrow_buttonDownHandler(_arg1:FlexEvent):void{
if (isNaN(oldPosition)){
oldPosition = scrollPosition;
};
lineScroll(-1);
}
public function set pageSize(_arg1:Number):void{
_pageSize = _arg1;
}
private function get trackY():Number{
return (upArrow.getExplicitOrMeasuredHeight());
}
private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{
if (trackScrolling){
trackScrollTimer.stop();
};
}
private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{
scrollTrack_mouseLeaveHandler(_arg1);
}
private function scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Point;
if (trackScrolling){
_local2 = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
trackPosition = _local2.y;
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if ($height == 1){
return;
};
if (!upArrow){
return;
};
super.updateDisplayList(_arg1, _arg2);
if (cacheAsBitmap){
cacheHeuristic = (scrollThumb.cacheHeuristic = false);
};
upArrow.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight());
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
upArrow.move(((virtualWidth - upArrow.width) / 2), 0);
} else {
upArrow.move(0, 0);
};
scrollTrack.setActualSize(scrollTrack.getExplicitOrMeasuredWidth(), virtualHeight);
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
scrollTrack.x = ((virtualWidth - scrollTrack.width) / 2);
};
scrollTrack.y = 0;
downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight());
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
downArrow.move(((virtualWidth - downArrow.width) / 2), (virtualHeight - downArrow.getExplicitOrMeasuredHeight()));
} else {
downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight()));
};
setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize);
scrollPosition = _scrollPosition;
}
mx_internal function get pagePlusDetail():String{
return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT);
}
mx_internal function get virtualWidth():Number{
return (unscaledWidth);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("directionChanged"));
}
public function get direction():String{
return (_direction);
}
}
}//package mx.controls.scrollClasses
Section 447
//ScrollBarDirection (mx.controls.scrollClasses.ScrollBarDirection)
package mx.controls.scrollClasses {
public final class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
mx_internal static const VERSION:String = "3.3.0.4852";
}
}//package mx.controls.scrollClasses
Section 448
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb)
package mx.controls.scrollClasses {
import flash.events.*;
import flash.geom.*;
import mx.events.*;
import mx.controls.*;
public class ScrollThumb extends Button {
private var lastY:Number;
private var datamin:Number;
private var ymax:Number;
private var ymin:Number;
private var datamax:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
public function ScrollThumb(){
explicitMinHeight = 10;
stickyHighlighting = true;
}
private function stopDragThumb():void{
var _local1:ScrollBar = ScrollBar(parent);
_local1.isScrolling = false;
_local1.dispatchScrollEvent(_local1.oldPosition, ScrollEventDetail.THUMB_POSITION);
_local1.oldPosition = NaN;
systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
}
override protected function mouseDownHandler(_arg1:MouseEvent):void{
super.mouseDownHandler(_arg1);
var _local2:ScrollBar = ScrollBar(parent);
_local2.oldPosition = _local2.scrollPosition;
lastY = _arg1.localY;
systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
if (ymin == ymax){
return;
};
var _local2:Point = new Point(_arg1.stageX, _arg1.stageY);
_local2 = globalToLocal(_local2);
var _local3:Number = (_local2.y - lastY);
_local3 = (_local3 + y);
if (_local3 < ymin){
_local3 = ymin;
} else {
if (_local3 > ymax){
_local3 = ymax;
};
};
var _local4:ScrollBar = ScrollBar(parent);
_local4.isScrolling = true;
$y = _local3;
var _local5:Number = _local4.scrollPosition;
var _local6:Number = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin);
_local4.scrollPosition = _local6;
_local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK);
_arg1.updateAfterEvent();
}
override mx_internal function buttonReleased():void{
super.buttonReleased();
stopDragThumb();
}
mx_internal function setRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.ymin = _arg1;
this.ymax = _arg2;
this.datamin = _arg3;
this.datamax = _arg4;
}
}
}//package mx.controls.scrollClasses
Section 449
//Button (mx.controls.Button)
package mx.controls {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
import flash.utils.*;
import mx.events.*;
import mx.managers.*;
import mx.controls.listClasses.*;
import mx.controls.dataGridClasses.*;
import flash.ui.*;
public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer, IFontContextComponent, IButton {
mx_internal var _emphasized:Boolean;// = false
mx_internal var extraSpacing:Number;// = 20
private var icons:Array;
public var selectedField:String;// = null
private var labelChanged:Boolean;// = false
private var skinMeasuredWidth:Number;
mx_internal var checkedDefaultSkin:Boolean;// = false
private var autoRepeatTimer:Timer;
mx_internal var disabledIconName:String;// = "disabledIcon"
mx_internal var disabledSkinName:String;// = "disabledSkin"
mx_internal var checkedDefaultIcon:Boolean;// = false
public var stickyHighlighting:Boolean;// = false
private var enabledChanged:Boolean;// = false
mx_internal var selectedUpIconName:String;// = "selectedUpIcon"
mx_internal var selectedUpSkinName:String;// = "selectedUpSkin"
mx_internal var upIconName:String;// = "upIcon"
mx_internal var upSkinName:String;// = "upSkin"
mx_internal var centerContent:Boolean;// = true
mx_internal var buttonOffset:Number;// = 0
private var skinMeasuredHeight:Number;
private var oldUnscaledWidth:Number;
mx_internal var downIconName:String;// = "downIcon"
mx_internal var _labelPlacement:String;// = "right"
mx_internal var downSkinName:String;// = "downSkin"
mx_internal var _toggle:Boolean;// = false
private var _phase:String;// = "up"
private var toolTipSet:Boolean;// = false
private var _data:Object;
mx_internal var currentIcon:IFlexDisplayObject;
mx_internal var currentSkin:IFlexDisplayObject;
mx_internal var overIconName:String;// = "overIcon"
mx_internal var selectedDownIconName:String;// = "selectedDownIcon"
mx_internal var overSkinName:String;// = "overSkin"
mx_internal var iconName:String;// = "icon"
mx_internal var skinName:String;// = "skin"
mx_internal var selectedDownSkinName:String;// = "selectedDownSkin"
private var skins:Array;
private var selectedSet:Boolean;
private var _autoRepeat:Boolean;// = false
private var styleChangedFlag:Boolean;// = true
mx_internal var selectedOverIconName:String;// = "selectedOverIcon"
private var _listData:BaseListData;
mx_internal var selectedOverSkinName:String;// = "selectedOverSkin"
protected var textField:IUITextField;
private var labelSet:Boolean;
mx_internal var defaultIconUsesStates:Boolean;// = false
mx_internal var defaultSkinUsesStates:Boolean;// = false
mx_internal var toggleChanged:Boolean;// = false
private var emphasizedChanged:Boolean;// = false
private var _label:String;// = ""
mx_internal var _selected:Boolean;// = false
mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon"
mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin"
mx_internal static const VERSION:String = "3.3.0.4852";
mx_internal static var createAccessibilityImplementation:Function;
mx_internal static var TEXT_WIDTH_PADDING:Number = 6;
public function Button(){
skins = [];
icons = [];
super();
mouseChildren = false;
addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
addEventListener(MouseEvent.CLICK, clickHandler);
}
private function previousVersion_measure():void{
var bm:EdgeMetrics;
var lineMetrics:TextLineMetrics;
var paddingLeft:Number;
var paddingRight:Number;
var paddingTop:Number;
var paddingBottom:Number;
var horizontalGap:Number;
super.measure();
var textWidth:Number = 0;
var textHeight:Number = 0;
if (label){
lineMetrics = measureText(label);
textWidth = lineMetrics.width;
textHeight = lineMetrics.height;
paddingLeft = getStyle("paddingLeft");
paddingRight = getStyle("paddingRight");
paddingTop = getStyle("paddingTop");
paddingBottom = getStyle("paddingBottom");
textWidth = (textWidth + ((paddingLeft + paddingRight) + getStyle("textIndent")));
textHeight = (textHeight + (paddingTop + paddingBottom));
};
try {
bm = currentSkin["borderMetrics"];
} catch(e:Error) {
bm = new EdgeMetrics(3, 3, 3, 3);
};
var tempCurrentIcon:IFlexDisplayObject = getCurrentIcon();
var iconWidth:Number = (tempCurrentIcon) ? tempCurrentIcon.width : 0;
var iconHeight:Number = (tempCurrentIcon) ? tempCurrentIcon.height : 0;
var w:Number = 0;
var h:Number = 0;
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
w = (textWidth + iconWidth);
if (iconWidth != 0){
horizontalGap = getStyle("horizontalGap");
w = (w + (horizontalGap - 2));
};
h = Math.max(textHeight, (iconHeight + 6));
} else {
w = Math.max(textWidth, iconWidth);
h = (textHeight + iconHeight);
if (iconHeight != 0){
h = (h + getStyle("verticalGap"));
};
};
if (bm){
w = (w + (bm.left + bm.right));
h = (h + (bm.top + bm.bottom));
};
if (((label) && (!((label.length == 0))))){
w = (w + extraSpacing);
} else {
w = (w + 6);
};
if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){
skinMeasuredWidth = currentSkin.measuredWidth;
skinMeasuredHeight = currentSkin.measuredHeight;
};
if (!isNaN(skinMeasuredWidth)){
w = Math.max(skinMeasuredWidth, w);
};
if (!isNaN(skinMeasuredHeight)){
h = Math.max(skinMeasuredHeight, h);
};
measuredMinWidth = (measuredWidth = w);
measuredMinHeight = (measuredHeight = h);
}
public function get label():String{
return (_label);
}
mx_internal function getCurrentIconName():String{
var _local1:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledIconName : disabledIconName;
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpIconName : upIconName;
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverIconName : overIconName;
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownIconName : downIconName;
};
};
};
};
return (_local1);
}
protected function mouseUpHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
phase = ButtonPhase.OVER;
buttonReleased();
if (!toggle){
_arg1.updateAfterEvent();
};
}
override protected function adjustFocusRect(_arg1:DisplayObject=null):void{
super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon));
}
mx_internal function set phase(_arg1:String):void{
_phase = _arg1;
invalidateSize();
invalidateDisplayList();
}
mx_internal function viewIconForPhase(_arg1:String):IFlexDisplayObject{
var _local3:IFlexDisplayObject;
var _local4:Boolean;
var _local5:String;
var _local2:Class = Class(getStyle(_arg1));
if (!_local2){
_local2 = Class(getStyle(iconName));
if (defaultIconUsesStates){
_arg1 = iconName;
};
if (((!(checkedDefaultIcon)) && (_local2))){
_local3 = IFlexDisplayObject(new (_local2));
if (((!((_local3 is IProgrammaticSkin))) && ((_local3 is IStateClient)))){
defaultIconUsesStates = true;
_arg1 = iconName;
};
if (_local3){
checkedDefaultIcon = true;
};
};
};
_local3 = IFlexDisplayObject(getChildByName(_arg1));
if (_local3 == null){
if (_local2 != null){
_local3 = IFlexDisplayObject(new (_local2));
_local3.name = _arg1;
if ((_local3 is ISimpleStyleClient)){
ISimpleStyleClient(_local3).styleName = this;
};
addChild(DisplayObject(_local3));
_local4 = false;
if ((_local3 is IInvalidating)){
IInvalidating(_local3).validateNow();
_local4 = true;
} else {
if ((_local3 is IProgrammaticSkin)){
IProgrammaticSkin(_local3).validateDisplayList();
_local4 = true;
};
};
if (((_local3) && ((_local3 is IUIComponent)))){
IUIComponent(_local3).enabled = enabled;
};
if (_local4){
_local3.setActualSize(_local3.measuredWidth, _local3.measuredHeight);
};
icons.push(_local3);
};
};
if (currentIcon != null){
currentIcon.visible = false;
};
currentIcon = _local3;
if (((defaultIconUsesStates) && ((currentIcon is IStateClient)))){
_local5 = "";
if (!enabled){
_local5 = (selected) ? "selectedDisabled" : "disabled";
} else {
if (phase == ButtonPhase.UP){
_local5 = (selected) ? "selectedUp" : "up";
} else {
if (phase == ButtonPhase.OVER){
_local5 = (selected) ? "selectedOver" : "over";
} else {
if (phase == ButtonPhase.DOWN){
_local5 = (selected) ? "selectedDown" : "down";
};
};
};
};
IStateClient(currentIcon).currentState = _local5;
};
if (currentIcon != null){
currentIcon.visible = true;
};
return (_local3);
}
mx_internal function viewSkinForPhase(_arg1:String, _arg2:String):void{
var _local4:IFlexDisplayObject;
var _local5:Number;
var _local6:ISimpleStyleClient;
var _local3:Class = Class(getStyle(_arg1));
if (!_local3){
_local3 = Class(getStyle(skinName));
if (defaultSkinUsesStates){
_arg1 = skinName;
};
if (((!(checkedDefaultSkin)) && (_local3))){
_local4 = IFlexDisplayObject(new (_local3));
if (((!((_local4 is IProgrammaticSkin))) && ((_local4 is IStateClient)))){
defaultSkinUsesStates = true;
_arg1 = skinName;
};
if (_local4){
checkedDefaultSkin = true;
};
};
};
_local4 = IFlexDisplayObject(getChildByName(_arg1));
if (!_local4){
if (_local3){
_local4 = IFlexDisplayObject(new (_local3));
_local4.name = _arg1;
_local6 = (_local4 as ISimpleStyleClient);
if (_local6){
_local6.styleName = this;
};
addChild(DisplayObject(_local4));
_local4.setActualSize(unscaledWidth, unscaledHeight);
if ((((_local4 is IInvalidating)) && (initialized))){
IInvalidating(_local4).validateNow();
} else {
if ((((_local4 is IProgrammaticSkin)) && (initialized))){
IProgrammaticSkin(_local4).validateDisplayList();
};
};
skins.push(_local4);
};
};
if (currentSkin){
currentSkin.visible = false;
};
currentSkin = _local4;
if (((defaultSkinUsesStates) && ((currentSkin is IStateClient)))){
IStateClient(currentSkin).currentState = _arg2;
};
if (currentSkin){
currentSkin.visible = true;
};
if (enabled){
if (phase == ButtonPhase.OVER){
_local5 = textField.getStyle("textRollOverColor");
} else {
if (phase == ButtonPhase.DOWN){
_local5 = textField.getStyle("textSelectedColor");
} else {
_local5 = textField.getStyle("color");
};
};
textField.setColor(_local5);
};
}
mx_internal function getTextField():IUITextField{
return (textField);
}
protected function rollOverHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.UP){
if (_arg1.buttonDown){
return;
};
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
} else {
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.DOWN;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.start();
};
};
};
}
override protected function createChildren():void{
super.createChildren();
if (!textField){
textField = IUITextField(createInFontContext(UITextField));
textField.styleName = this;
addChild(DisplayObject(textField));
};
}
mx_internal function setSelected(_arg1:Boolean, _arg2:Boolean=false):void{
if (_selected != _arg1){
_selected = _arg1;
invalidateDisplayList();
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
if (toggle){
dispatchEvent(new Event(Event.CHANGE));
};
} else {
if (((toggle) && (!(_arg2)))){
dispatchEvent(new Event(Event.CHANGE));
};
};
dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
};
}
private function autoRepeatTimer_timerDelayHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.reset();
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.delay = getStyle("repeatInterval");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.start();
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set selected(_arg1:Boolean):void{
selectedSet = true;
setSelected(_arg1, true);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (phase != ButtonPhase.UP){
phase = ButtonPhase.UP;
};
}
public function get labelPlacement():String{
return (_labelPlacement);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
if (_arg1){
autoRepeatTimer = new Timer(1);
} else {
autoRepeatTimer = null;
};
}
mx_internal function changeIcons():void{
var _local1:int = icons.length;
var _local2:int;
while (_local2 < _local1) {
removeChild(icons[_local2]);
_local2++;
};
icons = [];
checkedDefaultIcon = false;
defaultIconUsesStates = false;
}
public function set data(_arg1:Object):void{
var _local2:*;
var _local3:*;
_data = _arg1;
if (((((_listData) && ((_listData is DataGridListData)))) && (!((DataGridListData(_listData).dataField == null))))){
_local2 = _data[DataGridListData(_listData).dataField];
_local3 = "";
} else {
if (_listData){
if (selectedField){
_local2 = _data[selectedField];
};
_local3 = _listData.label;
} else {
_local2 = _data;
};
};
if (((!((_local2 === undefined))) && (!(selectedSet)))){
selected = (_local2 as Boolean);
selectedSet = false;
};
if (((!((_local3 === undefined))) && (!(labelSet)))){
label = _local3;
labelSet = false;
};
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}
mx_internal function getCurrentIcon():IFlexDisplayObject{
var _local1:String = getCurrentIconName();
if (!_local1){
return (null);
};
return (viewIconForPhase(_local1));
}
public function get fontContext():IFlexModuleFactory{
return (moduleFactory);
}
public function get emphasized():Boolean{
return (_emphasized);
}
public function get listData():BaseListData{
return (_listData);
}
mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{
var _local20:TextLineMetrics;
var _local28:MoveEvent;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
previousVersion_layoutContents(_arg1, _arg2, _arg3);
return;
};
var _local4:Number = 0;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = 0;
var _local9:Number = 0;
var _local10:Number = 0;
var _local11:Number = 0;
var _local12:Number = 0;
var _local13:Number = 0;
var _local14:Number = getStyle("paddingLeft");
var _local15:Number = getStyle("paddingRight");
var _local16:Number = getStyle("paddingTop");
var _local17:Number = getStyle("paddingBottom");
var _local18:Number = 0;
var _local19:Number = 0;
if (label){
_local20 = measureText(label);
_local18 = (_local20.width + TEXT_WIDTH_PADDING);
_local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING);
} else {
_local20 = measureText("Wj");
_local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING);
};
var _local21:Number = (_arg3) ? buttonOffset : 0;
var _local22:String = getStyle("textAlign");
var _local23:Number = _arg1;
var _local24:Number = _arg2;
var _local25:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null;
if (_local25){
_local23 = (_local23 - (_local25.left + _local25.right));
_local24 = (_local24 - (_local25.top + _local25.bottom));
};
if (currentIcon){
_local8 = currentIcon.width;
_local9 = currentIcon.height;
};
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local12 = getStyle("horizontalGap");
if ((((_local8 == 0)) || ((_local18 == 0)))){
_local12 = 0;
};
if (_local18 > 0){
_local4 = Math.max(Math.min(((((_local23 - _local8) - _local12) - _local14) - _local15), _local18), 0);
textField.width = _local4;
} else {
_local4 = 0;
textField.width = _local4;
};
_local5 = Math.min(_local24, _local19);
textField.height = _local5;
if (_local22 == "left"){
_local6 = (_local6 + _local14);
} else {
if (_local22 == "right"){
_local6 = (_local6 + ((((_local23 - _local4) - _local8) - _local12) - _local15));
} else {
_local6 = (_local6 + (((((((_local23 - _local4) - _local8) - _local12) - _local14) - _local15) / 2) + _local14));
};
};
if (labelPlacement == ButtonLabelPlacement.RIGHT){
_local6 = (_local6 + (_local8 + _local12));
_local10 = (_local6 - (_local8 + _local12));
} else {
_local10 = ((_local6 + _local4) + _local12);
};
_local11 = (((((_local24 - _local9) - _local16) - _local17) / 2) + _local16);
_local7 = (((((_local24 - _local5) - _local16) - _local17) / 2) + _local16);
} else {
_local13 = getStyle("verticalGap");
if ((((_local9 == 0)) || ((label == "")))){
_local13 = 0;
};
if (_local18 > 0){
_local4 = Math.max(((_local23 - _local14) - _local15), 0);
textField.width = _local4;
_local5 = Math.min(((((_local24 - _local9) - _local16) - _local17) - _local13), _local19);
textField.height = _local5;
} else {
_local4 = 0;
textField.width = _local4;
_local5 = 0;
textField.height = _local5;
};
_local6 = _local14;
if (_local22 == "left"){
_local10 = (_local10 + _local14);
} else {
if (_local22 == "right"){
_local10 = (_local10 + Math.max(((_local23 - _local8) - _local15), _local14));
} else {
_local10 = (_local10 + (((((_local23 - _local8) - _local14) - _local15) / 2) + _local14));
};
};
if (labelPlacement == ButtonLabelPlacement.TOP){
_local7 = (_local7 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16));
_local11 = (_local11 + ((_local7 + _local5) + _local13));
} else {
_local11 = (_local11 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16));
_local7 = (_local7 + ((_local11 + _local9) + _local13));
};
};
var _local26:Number = _local21;
var _local27:Number = _local21;
if (_local25){
_local26 = (_local26 + _local25.left);
_local27 = (_local27 + _local25.top);
};
textField.x = Math.round((_local6 + _local26));
textField.y = Math.round((_local7 + _local27));
if (currentIcon){
_local10 = (_local10 + _local26);
_local11 = (_local11 + _local27);
_local28 = new MoveEvent(MoveEvent.MOVE);
_local28.oldX = currentIcon.x;
_local28.oldY = currentIcon.y;
currentIcon.x = Math.round(_local10);
currentIcon.y = Math.round(_local11);
currentIcon.dispatchEvent(_local28);
};
if (currentSkin){
setChildIndex(DisplayObject(currentSkin), (numChildren - 1));
};
if (currentIcon){
setChildIndex(DisplayObject(currentIcon), (numChildren - 1));
};
if (textField){
setChildIndex(DisplayObject(textField), (numChildren - 1));
};
}
protected function mouseDownHandler(_arg1:MouseEvent):void{
if (!enabled){
return;
};
systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, stage_mouseLeaveHandler);
buttonPressed();
_arg1.updateAfterEvent();
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonPressed();
};
}
protected function rollOutHandler(_arg1:MouseEvent):void{
if (phase == ButtonPhase.OVER){
phase = ButtonPhase.UP;
_arg1.updateAfterEvent();
} else {
if ((((phase == ButtonPhase.DOWN)) && (!(stickyHighlighting)))){
phase = ButtonPhase.OVER;
_arg1.updateAfterEvent();
if (autoRepeatTimer){
autoRepeatTimer.stop();
};
};
};
}
mx_internal function get phase():String{
return (_phase);
}
override public function set enabled(_arg1:Boolean):void{
if (super.enabled == _arg1){
return;
};
super.enabled = _arg1;
enabledChanged = true;
invalidateProperties();
invalidateDisplayList();
}
override protected function measure():void{
var _local9:TextLineMetrics;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
previousVersion_measure();
return;
};
super.measure();
var _local1:Number = 0;
var _local2:Number = 0;
if (label){
_local9 = measureText(label);
_local1 = (_local9.width + TEXT_WIDTH_PADDING);
_local2 = (_local9.height + UITextField.TEXT_HEIGHT_PADDING);
};
var _local3:IFlexDisplayObject = getCurrentIcon();
var _local4:Number = (_local3) ? _local3.width : 0;
var _local5:Number = (_local3) ? _local3.height : 0;
var _local6:Number = 0;
var _local7:Number = 0;
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local6 = (_local1 + _local4);
if (((_local1) && (_local4))){
_local6 = (_local6 + getStyle("horizontalGap"));
};
_local7 = Math.max(_local2, _local5);
} else {
_local6 = Math.max(_local1, _local4);
_local7 = (_local2 + _local5);
if (((_local2) && (_local5))){
_local7 = (_local7 + getStyle("verticalGap"));
};
};
if (((_local1) || (_local4))){
_local6 = (_local6 + (getStyle("paddingLeft") + getStyle("paddingRight")));
_local7 = (_local7 + (getStyle("paddingTop") + getStyle("paddingBottom")));
};
var _local8:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null;
if (_local8){
_local6 = (_local6 + (_local8.left + _local8.right));
_local7 = (_local7 + (_local8.top + _local8.bottom));
};
if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){
skinMeasuredWidth = currentSkin.measuredWidth;
skinMeasuredHeight = currentSkin.measuredHeight;
};
if (!isNaN(skinMeasuredWidth)){
_local6 = Math.max(skinMeasuredWidth, _local6);
};
if (!isNaN(skinMeasuredHeight)){
_local7 = Math.max(skinMeasuredHeight, _local7);
};
measuredMinWidth = (measuredWidth = _local6);
measuredMinHeight = (measuredHeight = _local7);
}
public function get toggle():Boolean{
return (_toggle);
}
mx_internal function buttonReleased():void{
systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true);
systemManager.getSandboxRoot().removeEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, stage_mouseLeaveHandler);
if (autoRepeatTimer){
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler);
autoRepeatTimer.reset();
};
}
mx_internal function buttonPressed():void{
phase = ButtonPhase.DOWN;
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
if (autoRepeat){
autoRepeatTimer.delay = getStyle("repeatDelay");
autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler);
autoRepeatTimer.start();
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
buttonReleased();
if (phase == ButtonPhase.DOWN){
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
phase = ButtonPhase.UP;
};
}
public function get selected():Boolean{
return (_selected);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelPlacementChanged"));
}
protected function clickHandler(_arg1:MouseEvent):void{
if (!enabled){
_arg1.stopImmediatePropagation();
return;
};
if (toggle){
setSelected(!(selected));
_arg1.updateAfterEvent();
};
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
public function set toggle(_arg1:Boolean):void{
_toggle = _arg1;
toggleChanged = true;
invalidateProperties();
invalidateDisplayList();
dispatchEvent(new Event("toggleChanged"));
}
override public function get baselinePosition():Number{
var _local1:String;
var _local2:TextLineMetrics;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local1 = label;
if (!_local1){
_local1 = "Wj";
};
validateNow();
if (((!(label)) && ((((labelPlacement == ButtonLabelPlacement.TOP)) || ((labelPlacement == ButtonLabelPlacement.BOTTOM)))))){
_local2 = measureText(_local1);
return ((((measuredHeight - _local2.height) / 2) + _local2.ascent));
};
return ((textField.y + measureText(_local1).ascent));
};
if (!validateBaselinePosition()){
return (NaN);
};
return ((textField.y + textField.baselinePosition));
}
public function get data():Object{
return (_data);
}
public function set fontContext(_arg1:IFlexModuleFactory):void{
this.moduleFactory = _arg1;
}
mx_internal function viewSkin():void{
var _local1:String;
var _local2:String;
if (!enabled){
_local1 = (selected) ? selectedDisabledSkinName : disabledSkinName;
_local2 = (selected) ? "selectedDisabled" : "disabled";
} else {
if (phase == ButtonPhase.UP){
_local1 = (selected) ? selectedUpSkinName : upSkinName;
_local2 = (selected) ? "selectedUp" : "up";
} else {
if (phase == ButtonPhase.OVER){
_local1 = (selected) ? selectedOverSkinName : overSkinName;
_local2 = (selected) ? "selectedOver" : "over";
} else {
if (phase == ButtonPhase.DOWN){
_local1 = (selected) ? selectedDownSkinName : downSkinName;
_local2 = (selected) ? "selectedDown" : "down";
};
};
};
};
viewSkinForPhase(_local1, _local2);
}
override public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
super.styleChanged(_arg1);
if (((!(_arg1)) || ((_arg1 == "styleName")))){
changeSkins();
changeIcons();
if (initialized){
viewSkin();
viewIcon();
};
} else {
if (_arg1.toLowerCase().indexOf("skin") != -1){
changeSkins();
} else {
if (_arg1.toLowerCase().indexOf("icon") != -1){
changeIcons();
invalidateSize();
};
};
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
emphasizedChanged = true;
invalidateDisplayList();
}
mx_internal function viewIcon():void{
var _local1:String = getCurrentIconName();
viewIconForPhase(_local1);
}
override public function set toolTip(_arg1:String):void{
super.toolTip = _arg1;
if (_arg1){
toolTipSet = true;
} else {
toolTipSet = false;
invalidateDisplayList();
};
}
override protected function commitProperties():void{
super.commitProperties();
if (((hasFontContextChanged()) && (!((textField == null))))){
removeChild(DisplayObject(textField));
textField = null;
};
if (!textField){
textField = IUITextField(createInFontContext(UITextField));
textField.styleName = this;
addChild(DisplayObject(textField));
enabledChanged = true;
toggleChanged = true;
};
if (!initialized){
viewSkin();
viewIcon();
};
if (enabledChanged){
textField.enabled = enabled;
if (((currentIcon) && ((currentIcon is IUIComponent)))){
IUIComponent(currentIcon).enabled = enabled;
};
enabledChanged = false;
};
if (toggleChanged){
if (!toggle){
selected = false;
};
toggleChanged = false;
};
}
mx_internal function changeSkins():void{
var _local1:int = skins.length;
var _local2:int;
while (_local2 < _local1) {
removeChild(skins[_local2]);
_local2++;
};
skins = [];
skinMeasuredWidth = NaN;
skinMeasuredHeight = NaN;
checkedDefaultSkin = false;
defaultSkinUsesStates = false;
if (((initialized) && ((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)))){
viewSkin();
invalidateSize();
};
}
private function autoRepeatTimer_timerHandler(_arg1:Event):void{
if (!enabled){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN));
}
private function previousVersion_layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{
var _local20:TextLineMetrics;
var _local28:Number;
var _local29:MoveEvent;
var _local4:Number = 0;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = 0;
var _local9:Number = 0;
var _local10:Number = 0;
var _local11:Number = 0;
var _local12:Number = 2;
var _local13:Number = 2;
var _local14:Number = getStyle("paddingLeft");
var _local15:Number = getStyle("paddingRight");
var _local16:Number = getStyle("paddingTop");
var _local17:Number = getStyle("paddingBottom");
var _local18:Number = 0;
var _local19:Number = 0;
if (label){
_local20 = measureText(label);
if (_local20.width > 0){
_local18 = (((_local14 + _local15) + getStyle("textIndent")) + _local20.width);
};
_local19 = _local20.height;
} else {
_local20 = measureText("Wj");
_local19 = _local20.height;
};
var _local21:Number = (_arg3) ? buttonOffset : 0;
var _local22:String = getStyle("textAlign");
var _local23:EdgeMetrics = (((currentSkin) && ((currentSkin is IRectangularBorder)))) ? IRectangularBorder(currentSkin).borderMetrics : null;
var _local24:Number = _arg1;
var _local25:Number = ((_arg2 - _local16) - _local17);
if (_local23){
_local24 = (_local24 - (_local23.left + _local23.right));
_local25 = (_local25 - (_local23.top + _local23.bottom));
};
if (currentIcon){
_local8 = currentIcon.width;
_local9 = currentIcon.height;
};
if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){
_local12 = getStyle("horizontalGap");
if ((((_local8 == 0)) || ((_local18 == 0)))){
_local12 = 0;
};
if (_local18 > 0){
_local4 = Math.max(((((_local24 - _local8) - _local12) - _local14) - _local15), 0);
textField.width = _local4;
} else {
_local4 = 0;
textField.width = _local4;
};
_local5 = Math.min((_local25 + 2), (_local19 + UITextField.TEXT_HEIGHT_PADDING));
textField.height = _local5;
if (labelPlacement == ButtonLabelPlacement.RIGHT){
_local6 = (_local8 + _local12);
if (centerContent){
if (_local22 == "left"){
_local6 = (_local6 + _local14);
} else {
if (_local22 == "right"){
_local6 = (_local6 + ((((_local24 - _local4) - _local8) - _local12) - _local14));
} else {
_local28 = ((((_local24 - _local4) - _local8) - _local12) / 2);
_local6 = (_local6 + Math.max(_local28, _local14));
};
};
};
_local10 = (_local6 - (_local8 + _local12));
if (!centerContent){
_local6 = (_local6 + _local14);
};
} else {
_local6 = ((((_local24 - _local4) - _local8) - _local12) - _local15);
if (centerContent){
if (_local22 == "left"){
_local6 = 2;
} else {
if (_local22 == "right"){
_local6--;
} else {
if (_local6 > 0){
_local6 = (_local6 / 2);
};
};
};
};
_local10 = ((_local6 + _local4) + _local12);
};
_local7 = 0;
_local11 = _local7;
if (centerContent){
_local11 = (Math.round(((_local25 - _local9) / 2)) + _local16);
_local7 = (Math.round(((_local25 - _local5) / 2)) + _local16);
} else {
_local7 = (_local7 + (Math.max(0, ((_local25 - _local5) / 2)) + _local16));
_local11 = (_local11 + (Math.max(0, (((_local25 - _local9) / 2) - 1)) + _local16));
};
} else {
_local13 = getStyle("verticalGap");
if ((((_local9 == 0)) || ((_local19 == 0)))){
_local13 = 0;
};
if (_local18 > 0){
_local4 = Math.min(_local24, (_local18 + UITextField.TEXT_WIDTH_PADDING));
textField.width = _local4;
_local5 = Math.min(((_local25 - _local9) + 1), (_local19 + 5));
textField.height = _local5;
} else {
_local4 = 0;
textField.width = _local4;
_local5 = 0;
textField.height = _local5;
};
_local6 = ((_local24 - _local4) / 2);
_local10 = ((_local24 - _local8) / 2);
if (labelPlacement == ButtonLabelPlacement.TOP){
_local7 = (((_local25 - _local5) - _local9) - _local13);
if (((centerContent) && ((_local7 > 0)))){
_local7 = (_local7 / 2);
};
_local7 = (_local7 + _local16);
_local11 = (((_local7 + _local5) + _local13) - 3);
} else {
_local7 = ((_local9 + _local13) + _local16);
if (centerContent){
_local7 = (_local7 + (((((_local25 - _local5) - _local9) - _local13) / 2) + 1));
};
_local11 = (((_local7 - _local9) - _local13) + 3);
};
};
var _local26:Number = _local21;
var _local27:Number = _local21;
if (_local23){
_local26 = (_local26 + _local23.left);
_local27 = (_local27 + _local23.top);
};
textField.x = (_local6 + _local26);
textField.y = (_local7 + _local27);
if (currentIcon){
_local10 = (_local10 + _local26);
_local11 = (_local11 + _local27);
_local29 = new MoveEvent(MoveEvent.MOVE);
_local29.oldX = currentIcon.x;
_local29.oldY = currentIcon.y;
currentIcon.x = Math.round(_local10);
currentIcon.y = Math.round(_local11);
currentIcon.dispatchEvent(_local29);
};
if (currentSkin){
setChildIndex(DisplayObject(currentSkin), (numChildren - 1));
};
if (currentIcon){
setChildIndex(DisplayObject(currentIcon), (numChildren - 1));
};
if (textField){
setChildIndex(DisplayObject(textField), (numChildren - 1));
};
}
private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{
if (contains(DisplayObject(_arg1.target))){
return;
};
phase = ButtonPhase.UP;
buttonReleased();
_arg1.updateAfterEvent();
}
public function set label(_arg1:String):void{
labelSet = true;
if (_label != _arg1){
_label = _arg1;
labelChanged = true;
invalidateSize();
invalidateDisplayList();
dispatchEvent(new Event("labelChanged"));
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local5:IFlexDisplayObject;
var _local6:Boolean;
super.updateDisplayList(_arg1, _arg2);
if (emphasizedChanged){
changeSkins();
emphasizedChanged = false;
};
var _local3:int = skins.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = IFlexDisplayObject(skins[_local4]);
_local5.setActualSize(_arg1, _arg2);
_local4++;
};
viewSkin();
viewIcon();
layoutContents(_arg1, _arg2, (phase == ButtonPhase.DOWN));
if ((((((((oldUnscaledWidth > _arg1)) || (!((textField.text == label))))) || (labelChanged))) || (styleChangedFlag))){
textField.text = label;
_local6 = textField.truncateToFit();
if (!toolTipSet){
if (_local6){
super.toolTip = label;
} else {
super.toolTip = null;
};
};
styleChangedFlag = false;
labelChanged = false;
};
oldUnscaledWidth = _arg1;
}
private function stage_mouseLeaveHandler(_arg1:Event):void{
phase = ButtonPhase.UP;
buttonReleased();
}
public function set listData(_arg1:BaseListData):void{
_listData = _arg1;
}
}
}//package mx.controls
Section 450
//ButtonLabelPlacement (mx.controls.ButtonLabelPlacement)
package mx.controls {
public final class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package mx.controls
Section 451
//ButtonPhase (mx.controls.ButtonPhase)
package mx.controls {
public final class ButtonPhase {
public static const DOWN:String = "down";
public static const OVER:String = "over";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const UP:String = "up";
}
}//package mx.controls
Section 452
//IFlexContextMenu (mx.controls.IFlexContextMenu)
package mx.controls {
import flash.display.*;
public interface IFlexContextMenu {
function setContextMenu(_arg1:InteractiveObject):void;
function unsetContextMenu(_arg1:InteractiveObject):void;
}
}//package mx.controls
Section 453
//ToolTip (mx.controls.ToolTip)
package mx.controls {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
public class ToolTip extends UIComponent implements IToolTip, IFontContextComponent {
private var textChanged:Boolean;
private var _text:String;
protected var textField:IUITextField;
mx_internal var border:IFlexDisplayObject;
mx_internal static const VERSION:String = "3.3.0.4852";
public static var maxWidth:Number = 300;
public function ToolTip(){
mouseEnabled = false;
}
public function set fontContext(_arg1:IFlexModuleFactory):void{
this.moduleFactory = _arg1;
}
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){
invalidateDisplayList();
};
}
override protected function commitProperties():void{
var _local1:int;
var _local2:TextFormat;
super.commitProperties();
if (((hasFontContextChanged()) && (!((textField == null))))){
_local1 = getChildIndex(DisplayObject(textField));
removeTextField();
createTextField(_local1);
invalidateSize();
textChanged = true;
};
if (textChanged){
_local2 = textField.getTextFormat();
_local2.leftMargin = 0;
_local2.rightMargin = 0;
textField.defaultTextFormat = _local2;
textField.text = _text;
textChanged = false;
};
}
mx_internal function getTextField():IUITextField{
return (textField);
}
override protected function createChildren():void{
var _local1:Class;
super.createChildren();
if (!border){
_local1 = getStyle("borderSkin");
border = new (_local1);
if ((border is ISimpleStyleClient)){
ISimpleStyleClient(border).styleName = this;
};
addChild(DisplayObject(border));
};
createTextField(-1);
}
override protected function measure():void{
var _local7:Number;
super.measure();
var _local1:EdgeMetrics = borderMetrics;
var _local2:Number = (_local1.left + getStyle("paddingLeft"));
var _local3:Number = (_local1.top + getStyle("paddingTop"));
var _local4:Number = (_local1.right + getStyle("paddingRight"));
var _local5:Number = (_local1.bottom + getStyle("paddingBottom"));
var _local6:Number = (_local2 + _local4);
_local7 = (_local3 + _local5);
textField.wordWrap = false;
if ((textField.textWidth + _local6) > ToolTip.maxWidth){
textField.width = (ToolTip.maxWidth - _local6);
textField.wordWrap = true;
};
measuredWidth = (textField.width + _local6);
measuredHeight = (textField.height + _local7);
}
public function get fontContext():IFlexModuleFactory{
return (moduleFactory);
}
public function set text(_arg1:String):void{
_text = _arg1;
textChanged = true;
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
public function get text():String{
return (_text);
}
mx_internal function removeTextField():void{
if (textField){
removeChild(DisplayObject(textField));
textField = null;
};
}
mx_internal function createTextField(_arg1:int):void{
if (!textField){
textField = IUITextField(createInFontContext(UITextField));
textField.autoSize = TextFieldAutoSize.LEFT;
textField.mouseEnabled = false;
textField.multiline = true;
textField.selectable = false;
textField.wordWrap = false;
textField.styleName = this;
if (_arg1 == -1){
addChild(DisplayObject(textField));
} else {
addChildAt(DisplayObject(textField), _arg1);
};
};
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:EdgeMetrics = borderMetrics;
var _local4:Number = (_local3.left + getStyle("paddingLeft"));
var _local5:Number = (_local3.top + getStyle("paddingTop"));
var _local6:Number = (_local3.right + getStyle("paddingRight"));
var _local7:Number = (_local3.bottom + getStyle("paddingBottom"));
var _local8:Number = (_local4 + _local6);
var _local9:Number = (_local5 + _local7);
border.setActualSize(_arg1, _arg2);
textField.move(_local4, _local5);
textField.setActualSize((_arg1 - _local8), (_arg2 - _local9));
}
private function get borderMetrics():EdgeMetrics{
if ((border is IRectangularBorder)){
return (IRectangularBorder(border).borderMetrics);
};
return (EdgeMetrics.EMPTY);
}
}
}//package mx.controls
Section 454
//ApplicationGlobals (mx.core.ApplicationGlobals)
package mx.core {
public class ApplicationGlobals {
public static var application:Object;
}
}//package mx.core
Section 455
//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.3.0.4852";
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 456
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.3.0.4852";
}
}//package mx.core
Section 457
//ComponentDescriptor (mx.core.ComponentDescriptor)
package mx.core {
public class ComponentDescriptor {
public var events:Object;
public var type:Class;
public var document:Object;
private var _properties:Object;
public var propertiesFactory:Function;
public var id:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public function ComponentDescriptor(_arg1:Object){
var _local2:String;
super();
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function toString():String{
return (("ComponentDescriptor_" + id));
}
public function invalidateProperties():void{
_properties = null;
}
public function get properties():Object{
var _local1:Array;
var _local2:int;
var _local3:int;
if (_properties){
return (_properties);
};
if (propertiesFactory != null){
_properties = propertiesFactory.call(document);
};
if (_properties){
_local1 = _properties.childDescriptors;
if (_local1){
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].document = document;
_local3++;
};
};
} else {
_properties = {};
};
return (_properties);
}
}
}//package mx.core
Section 458
//ContainerGlobals (mx.core.ContainerGlobals)
package mx.core {
import flash.display.*;
import mx.managers.*;
public class ContainerGlobals {
public static var focusedContainer:InteractiveObject;
public static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{
var _local6:IFocusManager;
var _local7:IButton;
var _local3:InteractiveObject = _arg2;
var _local4:InteractiveObject = _arg2;
var _local5:IUIComponent;
if (((!((_arg2 == null))) && ((_arg1 == _arg2)))){
return;
};
while (_local4) {
if (_local4.parent){
_local3 = _local4.parent;
} else {
_local3 = null;
};
if ((_local4 is IUIComponent)){
_local5 = IUIComponent(_local4);
};
_local4 = _local3;
if (((((_local4) && ((_local4 is IContainer)))) && (IContainer(_local4).defaultButton))){
break;
};
};
if (((!((ContainerGlobals.focusedContainer == _local4))) || ((((ContainerGlobals.focusedContainer == null)) && ((_local4 == null)))))){
if (!_local4){
_local4 = InteractiveObject(_local5);
};
if (((_local4) && ((_local4 is IContainer)))){
_local6 = IContainer(_local4).focusManager;
if (!_local6){
return;
};
_local7 = (IContainer(_local4).defaultButton as IButton);
if (_local7){
ContainerGlobals.focusedContainer = InteractiveObject(_local4);
_local6.defaultButton = (_local7 as IButton);
} else {
ContainerGlobals.focusedContainer = InteractiveObject(_local4);
_local6.defaultButton = null;
};
};
};
}
}
}//package mx.core
Section 459
//DragSource (mx.core.DragSource)
package mx.core {
public class DragSource {
private var formatHandlers:Object;
private var dataHolder:Object;
private var _formats:Array;
mx_internal static const VERSION:String = "3.3.0.4852";
public function DragSource(){
dataHolder = {};
formatHandlers = {};
_formats = [];
super();
}
public function hasFormat(_arg1:String):Boolean{
var _local2:int = _formats.length;
var _local3:int;
while (_local3 < _local2) {
if (_formats[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function addData(_arg1:Object, _arg2:String):void{
_formats.push(_arg2);
dataHolder[_arg2] = _arg1;
}
public function dataForFormat(_arg1:String):Object{
var _local2:Object = dataHolder[_arg1];
if (_local2){
return (_local2);
};
if (formatHandlers[_arg1]){
return (formatHandlers[_arg1]());
};
return (null);
}
public function addHandler(_arg1:Function, _arg2:String):void{
_formats.push(_arg2);
formatHandlers[_arg2] = _arg1;
}
public function get formats():Array{
return (_formats);
}
}
}//package mx.core
Section 460
//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.3.0.4852";
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 461
//EmbeddedFont (mx.core.EmbeddedFont)
package mx.core {
public class EmbeddedFont {
private var _fontName:String;
private var _fontStyle:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public function EmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean){
_fontName = _arg1;
_fontStyle = EmbeddedFontRegistry.getFontStyle(_arg2, _arg3);
}
public function get fontStyle():String{
return (_fontStyle);
}
public function get fontName():String{
return (_fontName);
}
}
}//package mx.core
Section 462
//EmbeddedFontRegistry (mx.core.EmbeddedFontRegistry)
package mx.core {
import flash.text.*;
import flash.utils.*;
public class EmbeddedFontRegistry implements IEmbeddedFontRegistry {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var fonts:Object = {};
private static var instance:IEmbeddedFontRegistry;
public function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory{
var _local4:int;
var _local5:Object;
var _local3:Dictionary = fonts[createFontKey(_arg1)];
if (_local3){
_local4 = _local3[_arg2];
if (_local4){
return (_arg2);
};
for (_local5 in _local3) {
return ((_local5 as IFlexModuleFactory));
};
};
return (null);
}
public function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{
var _local5:int;
var _local6:Object;
var _local3:String = createFontKey(_arg1);
var _local4:Dictionary = fonts[_local3];
if (_local4 != null){
delete _local4[_arg2];
_local5 = 0;
for (_local6 in _local4) {
_local5++;
};
if (_local5 == 0){
delete fonts[_local3];
};
};
}
public function getFonts():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in fonts) {
_local1.push(createEmbeddedFont(_local2));
};
return (_local1);
}
public function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{
var _local3:String = createFontKey(_arg1);
var _local4:Dictionary = fonts[_local3];
if (!_local4){
_local4 = new Dictionary(true);
fonts[_local3] = _local4;
};
_local4[_arg2] = 1;
}
public static function registerFonts(_arg1:Object, _arg2:IFlexModuleFactory):void{
var _local4:Object;
var _local5:Object;
var _local6:String;
var _local7:Boolean;
var _local8:Boolean;
var _local3:IEmbeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
for (_local4 in _arg1) {
_local5 = _arg1[_local4];
for (_local6 in _local5) {
if (_local5[_local6] == false){
} else {
if (_local6 == "regular"){
_local7 = false;
_local8 = false;
} else {
if (_local6 == "boldItalic"){
_local7 = true;
_local8 = true;
} else {
if (_local6 == "bold"){
_local7 = true;
_local8 = false;
} else {
if (_local6 == "italic"){
_local7 = false;
_local8 = true;
};
};
};
};
_local3.registerFont(new EmbeddedFont(String(_local4), _local7, _local8), _arg2);
};
};
};
}
public static function getInstance():IEmbeddedFontRegistry{
if (!instance){
instance = new (EmbeddedFontRegistry);
};
return (instance);
}
public static function getFontStyle(_arg1:Boolean, _arg2:Boolean):String{
var _local3:String = FontStyle.REGULAR;
if (((_arg1) && (_arg2))){
_local3 = FontStyle.BOLD_ITALIC;
} else {
if (_arg1){
_local3 = FontStyle.BOLD;
} else {
if (_arg2){
_local3 = FontStyle.ITALIC;
};
};
};
return (_local3);
}
private static function createFontKey(_arg1:EmbeddedFont):String{
return ((_arg1.fontName + _arg1.fontStyle));
}
private static function createEmbeddedFont(_arg1:String):EmbeddedFont{
var _local2:String;
var _local3:Boolean;
var _local4:Boolean;
var _local5:int = endsWith(_arg1, FontStyle.REGULAR);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, false, false));
};
_local5 = endsWith(_arg1, FontStyle.BOLD);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, true, false));
};
_local5 = endsWith(_arg1, FontStyle.BOLD_ITALIC);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, true, true));
};
_local5 = endsWith(_arg1, FontStyle.ITALIC);
if (_local5 > 0){
_local2 = _arg1.substring(0, _local5);
return (new EmbeddedFont(_local2, false, true));
};
return (new EmbeddedFont("", false, false));
}
private static function endsWith(_arg1:String, _arg2:String):int{
var _local3:int = _arg1.lastIndexOf(_arg2);
if ((((_local3 > 0)) && (((_local3 + _arg2.length) == _arg1.length)))){
return (_local3);
};
return (-1);
}
}
}//package mx.core
Section 463
//EventPriority (mx.core.EventPriority)
package mx.core {
public final class EventPriority {
public static const DEFAULT:int = 0;
public static const BINDING:int = 100;
public static const DEFAULT_HANDLER:int = -50;
public static const EFFECT:int = -100;
public static const CURSOR_MANAGEMENT:int = 200;
mx_internal static const VERSION:String = "3.3.0.4852";
}
}//package mx.core
Section 464
//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.3.0.4852";
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 465
//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.3.0.4852";
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 466
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.3.0.4852";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 467
//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.3.0.4852";
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 468
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.3.0.4852";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 469
//FlexTextField (mx.core.FlexTextField)
package mx.core {
import flash.text.*;
import mx.utils.*;
public class FlexTextField extends TextField {
mx_internal static const VERSION:String = "3.3.0.4852";
public function FlexTextField(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 470
//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.3.0.4852";
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 471
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 472
//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 473
//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 474
//IConstraintClient (mx.core.IConstraintClient)
package mx.core {
public interface IConstraintClient {
function setConstraintValue(_arg1:String, _arg2):void;
function getConstraintValue(_arg1:String);
}
}//package mx.core
Section 475
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import mx.managers.*;
import flash.media.*;
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 476
//IDataRenderer (mx.core.IDataRenderer)
package mx.core {
public interface IDataRenderer {
function get data():Object;
function set data(_arg1:Object):void;
}
}//package mx.core
Section 477
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent)
package mx.core {
public interface IDeferredInstantiationUIComponent extends IUIComponent {
function set cacheHeuristic(_arg1:Boolean):void;
function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function get cachePolicy():String;
function set id(_arg1:String):void;
function registerEffects(_arg1:Array):void;
function executeBindings(_arg1:Boolean=false):void;
function get id():String;
function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void;
function set descriptor(_arg1:UIComponentDescriptor):void;
function get descriptor():UIComponentDescriptor;
}
}//package mx.core
Section 478
//IEmbeddedFontRegistry (mx.core.IEmbeddedFontRegistry)
package mx.core {
public interface IEmbeddedFontRegistry {
function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory;
function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void;
function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void;
function getFonts():Array;
}
}//package mx.core
Section 479
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 480
//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 481
//IFlexModule (mx.core.IFlexModule)
package mx.core {
public interface IFlexModule {
function set moduleFactory(_arg1:IFlexModuleFactory):void;
function get moduleFactory():IFlexModuleFactory;
}
}//package mx.core
Section 482
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 483
//IFontContextComponent (mx.core.IFontContextComponent)
package mx.core {
public interface IFontContextComponent {
function get fontContext():IFlexModuleFactory;
function set fontContext(_arg1:IFlexModuleFactory):void;
}
}//package mx.core
Section 484
//IIMESupport (mx.core.IIMESupport)
package mx.core {
public interface IIMESupport {
function set imeMode(_arg1:String):void;
function get imeMode():String;
}
}//package mx.core
Section 485
//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 486
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 487
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier)
package mx.core {
import flash.events.*;
public interface IPropertyChangeNotifier extends IEventDispatcher, IUID {
}
}//package mx.core
Section 488
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 489
//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 490
//IRepeater (mx.core.IRepeater)
package mx.core {
public interface IRepeater {
function get container():IContainer;
function set startingIndex(_arg1:int):void;
function get startingIndex():int;
function set recycleChildren(_arg1:Boolean):void;
function get currentItem():Object;
function get count():int;
function get recycleChildren():Boolean;
function executeChildBindings():void;
function set dataProvider(_arg1:Object):void;
function initializeRepeater(_arg1:IContainer, _arg2:Boolean):void;
function get currentIndex():int;
function get dataProvider():Object;
function set count(_arg1:int):void;
}
}//package mx.core
Section 491
//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 492
//IStateClient (mx.core.IStateClient)
package mx.core {
public interface IStateClient {
function get currentState():String;
function set currentState(_arg1:String):void;
}
}//package mx.core
Section 493
//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 494
//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 495
//ISWFLoader (mx.core.ISWFLoader)
package mx.core {
import flash.geom.*;
public interface ISWFLoader extends ISWFBridgeProvider {
function getVisibleApplicationRect(_arg1:Boolean=false):Rectangle;
function set loadForCompatibility(_arg1:Boolean):void;
function get loadForCompatibility():Boolean;
}
}//package mx.core
Section 496
//ITextFieldFactory (mx.core.ITextFieldFactory)
package mx.core {
import flash.text.*;
public interface ITextFieldFactory {
function createTextField(_arg1:IFlexModuleFactory):TextField;
}
}//package mx.core
Section 497
//IToolTip (mx.core.IToolTip)
package mx.core {
import flash.geom.*;
public interface IToolTip extends IUIComponent {
function set text(_arg1:String):void;
function get screen():Rectangle;
function get text():String;
}
}//package mx.core
Section 498
//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 499
//IUID (mx.core.IUID)
package mx.core {
public interface IUID {
function get uid():String;
function set uid(_arg1:String):void;
}
}//package mx.core
Section 500
//IUITextField (mx.core.IUITextField)
package mx.core {
import flash.display.*;
import mx.styles.*;
import flash.geom.*;
import flash.text.*;
import mx.managers.*;
public interface IUITextField extends IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent {
function replaceText(_arg1:int, _arg2:int, _arg3:String):void;
function get doubleClickEnabled():Boolean;
function get nestLevel():int;
function get caretIndex():int;
function set doubleClickEnabled(_arg1:Boolean):void;
function get maxScrollH():int;
function set nestLevel(_arg1:int):void;
function get numLines():int;
function get scrollH():int;
function setColor(_arg1:uint):void;
function get maxScrollV():int;
function getImageReference(_arg1:String):DisplayObject;
function get scrollV():int;
function get border():Boolean;
function get text():String;
function get styleSheet():StyleSheet;
function getCharBoundaries(_arg1:int):Rectangle;
function get background():Boolean;
function set scrollH(_arg1:int):void;
function getFirstCharInParagraph(_arg1:int):int;
function get type():String;
function replaceSelectedText(_arg1:String):void;
function set borderColor(_arg1:uint):void;
function get alwaysShowSelection():Boolean;
function get sharpness():Number;
function get tabIndex():int;
function get textColor():uint;
function set defaultTextFormat(_arg1:TextFormat):void;
function get condenseWhite():Boolean;
function get displayAsPassword():Boolean;
function get autoSize():String;
function setSelection(_arg1:int, _arg2:int):void;
function set scrollV(_arg1:int):void;
function set useRichTextClipboard(_arg1:Boolean):void;
function get selectionBeginIndex():int;
function get selectable():Boolean;
function set border(_arg1:Boolean):void;
function set multiline(_arg1:Boolean):void;
function set background(_arg1:Boolean):void;
function set embedFonts(_arg1:Boolean):void;
function set text(_arg1:String):void;
function get selectionEndIndex():int;
function set mouseWheelEnabled(_arg1:Boolean):void;
function appendText(_arg1:String):void;
function get antiAliasType():String;
function set styleSheet(_arg1:StyleSheet):void;
function set nonInheritingStyles(_arg1:Object):void;
function set textColor(_arg1:uint):void;
function get wordWrap():Boolean;
function getLineIndexAtPoint(_arg1:Number, _arg2:Number):int;
function get htmlText():String;
function set tabIndex(_arg1:int):void;
function get thickness():Number;
function getLineIndexOfChar(_arg1:int):int;
function get bottomScrollV():int;
function set restrict(_arg1:String):void;
function set alwaysShowSelection(_arg1:Boolean):void;
function getTextFormat(_arg1:int=-1, _arg2:int=-1):TextFormat;
function set sharpness(_arg1:Number):void;
function set type(_arg1:String):void;
function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void;
function set gridFitType(_arg1:String):void;
function getUITextFormat():UITextFormat;
function set inheritingStyles(_arg1:Object):void;
function setFocus():void;
function get borderColor():uint;
function set condenseWhite(_arg1:Boolean):void;
function get textWidth():Number;
function getLineOffset(_arg1:int):int;
function set displayAsPassword(_arg1:Boolean):void;
function set autoSize(_arg1:String):void;
function get defaultTextFormat():TextFormat;
function get useRichTextClipboard():Boolean;
function get nonZeroTextHeight():Number;
function set backgroundColor(_arg1:uint):void;
function get embedFonts():Boolean;
function set selectable(_arg1:Boolean):void;
function get multiline():Boolean;
function set maxChars(_arg1:int):void;
function get textHeight():Number;
function get nonInheritingStyles():Object;
function getLineText(_arg1:int):String;
function set focusRect(_arg1:Object):void;
function get mouseWheelEnabled():Boolean;
function get restrict():String;
function getParagraphLength(_arg1:int):int;
function set mouseEnabled(_arg1:Boolean):void;
function get gridFitType():String;
function get inheritingStyles():Object;
function set ignorePadding(_arg1:Boolean):void;
function set antiAliasType(_arg1:String):void;
function get backgroundColor():uint;
function getCharIndexAtPoint(_arg1:Number, _arg2:Number):int;
function set tabEnabled(_arg1:Boolean):void;
function get maxChars():int;
function get focusRect():Object;
function get ignorePadding():Boolean;
function get mouseEnabled():Boolean;
function get length():int;
function set wordWrap(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function set thickness(_arg1:Number):void;
function getLineLength(_arg1:int):int;
function truncateToFit(_arg1:String=null):Boolean;
function set htmlText(_arg1:String):void;
function getLineMetrics(_arg1:int):TextLineMetrics;
function getStyle(_arg1:String);
}
}//package mx.core
Section 501
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 502
//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 503
//ResourceModuleRSLItem (mx.core.ResourceModuleRSLItem)
package mx.core {
import flash.events.*;
import mx.events.*;
import mx.resources.*;
public class ResourceModuleRSLItem extends RSLItem {
mx_internal static const VERSION:String = "3.3.0.4852";
public function ResourceModuleRSLItem(_arg1:String){
super(_arg1);
}
private function resourceErrorHandler(_arg1:ResourceEvent):void{
var _local2:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR);
_local2.text = _arg1.errorText;
super.itemErrorHandler(_local2);
}
override public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
var _local6:IResourceManager = ResourceManager.getInstance();
var _local7:IEventDispatcher = _local6.loadResourceModule(url);
_local7.addEventListener(ResourceEvent.PROGRESS, itemProgressHandler);
_local7.addEventListener(ResourceEvent.COMPLETE, itemCompleteHandler);
_local7.addEventListener(ResourceEvent.ERROR, resourceErrorHandler);
}
}
}//package mx.core
Section 504
//RSLItem (mx.core.RSLItem)
package mx.core {
import flash.events.*;
import flash.net.*;
import flash.display.*;
import flash.system.*;
import mx.events.*;
import mx.utils.*;
public class RSLItem {
protected var chainedSecurityErrorHandler:Function;
public var total:uint;// = 0
public var loaded:uint;// = 0
private var completed:Boolean;// = false
protected var chainedRSLErrorHandler:Function;
protected var chainedIOErrorHandler:Function;
protected var chainedCompleteHandler:Function;
private var errorText:String;
protected var chainedProgressHandler:Function;
public var urlRequest:URLRequest;
public var rootURL:String;
protected var url:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public function RSLItem(_arg1:String, _arg2:String=null){
this.url = _arg1;
this.rootURL = _arg2;
}
public function itemProgressHandler(_arg1:ProgressEvent):void{
loaded = _arg1.bytesLoaded;
total = _arg1.bytesTotal;
if (chainedProgressHandler != null){
chainedProgressHandler(_arg1);
};
}
public function itemErrorHandler(_arg1:ErrorEvent):void{
errorText = decodeURI(_arg1.text);
completed = true;
loaded = 0;
total = 0;
trace(errorText);
if ((((_arg1.type == IOErrorEvent.IO_ERROR)) && (!((chainedIOErrorHandler == null))))){
chainedIOErrorHandler(_arg1);
} else {
if ((((_arg1.type == SecurityErrorEvent.SECURITY_ERROR)) && (!((chainedSecurityErrorHandler == null))))){
chainedSecurityErrorHandler(_arg1);
} else {
if ((((_arg1.type == RSLEvent.RSL_ERROR)) && (!((chainedRSLErrorHandler == null))))){
chainedRSLErrorHandler(_arg1);
};
};
};
}
public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
var _local6:Loader = new Loader();
var _local7:LoaderContext = new LoaderContext();
urlRequest = new URLRequest(LoaderUtil.createAbsoluteURL(rootURL, url));
_local6.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, itemProgressHandler);
_local6.contentLoaderInfo.addEventListener(Event.COMPLETE, itemCompleteHandler);
_local6.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, itemErrorHandler);
_local6.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, itemErrorHandler);
_local7.applicationDomain = ApplicationDomain.currentDomain;
_local6.load(urlRequest, _local7);
}
public function itemCompleteHandler(_arg1:Event):void{
completed = true;
if (chainedCompleteHandler != null){
chainedCompleteHandler(_arg1);
};
}
}
}//package mx.core
Section 505
//RSLListLoader (mx.core.RSLListLoader)
package mx.core {
import flash.events.*;
public class RSLListLoader {
private var chainedSecurityErrorHandler:Function;
private var chainedIOErrorHandler:Function;
private var rslList:Array;
private var chainedRSLErrorHandler:Function;
private var chainedCompleteHandler:Function;
private var currentIndex:int;// = 0
private var chainedProgressHandler:Function;
mx_internal static const VERSION:String = "3.3.0.4852";
public function RSLListLoader(_arg1:Array){
rslList = [];
super();
this.rslList = _arg1;
}
private function loadNext():void{
if (!isDone()){
currentIndex++;
if (currentIndex < rslList.length){
rslList[currentIndex].load(chainedProgressHandler, listCompleteHandler, listIOErrorHandler, listSecurityErrorHandler, chainedRSLErrorHandler);
};
};
}
public function getIndex():int{
return (currentIndex);
}
public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{
chainedProgressHandler = _arg1;
chainedCompleteHandler = _arg2;
chainedIOErrorHandler = _arg3;
chainedSecurityErrorHandler = _arg4;
chainedRSLErrorHandler = _arg5;
currentIndex = -1;
loadNext();
}
private function listCompleteHandler(_arg1:Event):void{
if (chainedCompleteHandler != null){
chainedCompleteHandler(_arg1);
};
loadNext();
}
public function isDone():Boolean{
return ((currentIndex >= rslList.length));
}
private function listSecurityErrorHandler(_arg1:Event):void{
if (chainedSecurityErrorHandler != null){
chainedSecurityErrorHandler(_arg1);
};
}
public function getItemCount():int{
return (rslList.length);
}
public function getItem(_arg1:int):RSLItem{
if ((((_arg1 < 0)) || ((_arg1 >= rslList.length)))){
return (null);
};
return (rslList[_arg1]);
}
private function listIOErrorHandler(_arg1:Event):void{
if (chainedIOErrorHandler != null){
chainedIOErrorHandler(_arg1);
};
}
}
}//package mx.core
Section 506
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.3.0.4852";
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 507
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.3.0.4852";
}
}//package mx.core
Section 508
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 509
//SWFBridgeGroup (mx.core.SWFBridgeGroup)
package mx.core {
import flash.events.*;
import flash.utils.*;
import mx.managers.*;
public class SWFBridgeGroup implements ISWFBridgeGroup {
private var _parentBridge:IEventDispatcher;
private var _childBridges:Dictionary;
private var _groupOwner:ISystemManager;
mx_internal static const VERSION:String = "3.3.0.4852";
public function SWFBridgeGroup(_arg1:ISystemManager){
_groupOwner = _arg1;
}
public function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider{
if (!_childBridges){
return (null);
};
return (ISWFBridgeProvider(_childBridges[_arg1]));
}
public function removeChildBridge(_arg1:IEventDispatcher):void{
var _local2:Object;
if (((!(_childBridges)) || (!(_arg1)))){
return;
};
for (_local2 in _childBridges) {
if (_local2 == _arg1){
delete _childBridges[_local2];
};
};
}
public function get parentBridge():IEventDispatcher{
return (_parentBridge);
}
public function containsBridge(_arg1:IEventDispatcher):Boolean{
var _local2:Object;
if (((parentBridge) && ((parentBridge == _arg1)))){
return (true);
};
for (_local2 in _childBridges) {
if (_arg1 == _local2){
return (true);
};
};
return (false);
}
public function set parentBridge(_arg1:IEventDispatcher):void{
_parentBridge = _arg1;
}
public function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void{
if (!_childBridges){
_childBridges = new Dictionary();
};
_childBridges[_arg1] = _arg2;
}
public function getChildBridges():Array{
var _local2:Object;
var _local1:Array = [];
for (_local2 in _childBridges) {
_local1.push(_local2);
};
return (_local1);
}
}
}//package mx.core
Section 510
//TextFieldFactory (mx.core.TextFieldFactory)
package mx.core {
import flash.text.*;
import flash.utils.*;
public class TextFieldFactory implements ITextFieldFactory {
private var textFields:Dictionary;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var instance:ITextFieldFactory;
public function TextFieldFactory(){
textFields = new Dictionary(true);
super();
}
public function createTextField(_arg1:IFlexModuleFactory):TextField{
var _local4:Object;
var _local2:TextField;
var _local3:Dictionary = textFields[_arg1];
if (_local3){
for (_local4 in _local3) {
_local2 = TextField(_local4);
break;
};
};
if (!_local2){
if (_arg1){
_local2 = TextField(_arg1.create("flash.text.TextField"));
} else {
_local2 = new TextField();
};
if (!_local3){
_local3 = new Dictionary(true);
};
_local3[_local2] = 1;
textFields[_arg1] = _local3;
};
return (_local2);
}
public static function getInstance():ITextFieldFactory{
if (!instance){
instance = new (TextFieldFactory);
};
return (instance);
}
}
}//package mx.core
Section 511
//UIComponent (mx.core.UIComponent)
package mx.core {
import flash.events.*;
import flash.display.*;
import mx.styles.*;
import flash.system.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import mx.modules.*;
import mx.events.*;
import mx.managers.*;
import mx.automation.*;
import mx.resources.*;
import mx.controls.*;
import mx.states.*;
import mx.effects.*;
import mx.graphics.*;
import mx.binding.*;
import mx.utils.*;
import mx.validators.*;
public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener, IStateClient, IConstraintClient {
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var errorStringChanged:Boolean;// = false
mx_internal var overlay:UIComponent;
mx_internal var automaticRadioButtonGroups:Object;
private var _currentState:String;
private var _isPopUp:Boolean;
private var _repeaters:Array;
private var _systemManager:ISystemManager;
private var _measuredWidth:Number;// = 0
private var methodQueue:Array;
mx_internal var _width:Number;
private var _tweeningProperties:Array;
private var _validationSubField:String;
private var _endingEffectInstances:Array;
mx_internal var saveBorderColor:Boolean;// = true
mx_internal var overlayColor:uint;
mx_internal var overlayReferenceCount:int;// = 0
private var hasFontContextBeenSaved:Boolean;// = false
private var _repeaterIndices:Array;
private var oldExplicitWidth:Number;
mx_internal var _descriptor:UIComponentDescriptor;
private var _initialized:Boolean;// = false
private var _focusEnabled:Boolean;// = true
private var cacheAsBitmapCount:int;// = 0
private var requestedCurrentState:String;
private var listeningForRender:Boolean;// = false
mx_internal var invalidateDisplayListFlag:Boolean;// = false
private var oldScaleX:Number;// = 1
private var oldScaleY:Number;// = 1
mx_internal var _explicitMaxHeight:Number;
mx_internal var invalidatePropertiesFlag:Boolean;// = false
private var hasFocusRect:Boolean;// = false
mx_internal var invalidateSizeFlag:Boolean;// = false
private var _scaleX:Number;// = 1
private var _scaleY:Number;// = 1
private var _styleDeclaration:CSSStyleDeclaration;
private var _resourceManager:IResourceManager;
mx_internal var _affectedProperties:Object;
mx_internal var _documentDescriptor:UIComponentDescriptor;
private var _processedDescriptors:Boolean;// = false
mx_internal var origBorderColor:Number;
private var _focusManager:IFocusManager;
private var _cachePolicy:String;// = "auto"
private var _measuredHeight:Number;// = 0
private var _id:String;
private var _owner:DisplayObjectContainer;
public var transitions:Array;
mx_internal var _parent:DisplayObjectContainer;
private var _measuredMinWidth:Number;// = 0
private var oldMinWidth:Number;
private var _explicitWidth:Number;
private var _enabled:Boolean;// = false
public var states:Array;
private var _mouseFocusEnabled:Boolean;// = true
private var oldHeight:Number;// = 0
private var _currentStateChanged:Boolean;
private var cachedTextFormat:UITextFormat;
mx_internal var _height:Number;
private var _automationDelegate:IAutomationObject;
private var _percentWidth:Number;
private var _automationName:String;// = null
private var _isEffectStarted:Boolean;// = false
private var _styleName:Object;
private var lastUnscaledWidth:Number;
mx_internal var _document:Object;
mx_internal var _errorString:String;// = ""
private var oldExplicitHeight:Number;
private var _nestLevel:int;// = 0
private var _systemManagerDirty:Boolean;// = false
private var _explicitHeight:Number;
mx_internal var _toolTip:String;
private var _filters:Array;
private var _focusPane:Sprite;
private var playStateTransition:Boolean;// = true
private var _nonInheritingStyles:Object;
private var _showInAutomationHierarchy:Boolean;// = true
private var _moduleFactory:IFlexModuleFactory;
private var preventDrawFocus:Boolean;// = false
private var oldX:Number;// = 0
private var oldY:Number;// = 0
private var _instanceIndices:Array;
private var _visible:Boolean;// = true
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
mx_internal var _effectsStarted:Array;
mx_internal var _explicitMinWidth:Number;
private var lastUnscaledHeight:Number;
mx_internal var _explicitMaxWidth:Number;
private var _measuredMinHeight:Number;// = 0
private var _uid:String;
private var _currentTransitionEffect:IEffect;
private var _updateCompletePendingFlag:Boolean;// = false
private var oldMinHeight:Number;
private var _flexContextMenu:IFlexContextMenu;
mx_internal var _explicitMinHeight:Number;
private var _percentHeight:Number;
private var oldEmbeddedFontContext:IFlexModuleFactory;// = null
private var oldWidth:Number;// = 0
public static const DEFAULT_MEASURED_WIDTH:Number = 160;
public static const DEFAULT_MAX_WIDTH:Number = 10000;
public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22;
public static const DEFAULT_MAX_HEIGHT:Number = 10000;
public static const DEFAULT_MEASURED_HEIGHT:Number = 22;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40;
mx_internal static var dispatchEventHook:Function;
private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY");
mx_internal static var createAccessibilityImplementation:Function;
mx_internal static var STYLE_UNINITIALIZED:Object = {};
private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX");
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
public function UIComponent(){
methodQueue = [];
_resourceManager = ResourceManager.getInstance();
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
states = [];
transitions = [];
_effectsStarted = [];
_affectedProperties = {};
_endingEffectInstances = [];
super();
focusRect = false;
tabEnabled = (this is IFocusManagerComponent);
tabChildren = false;
enabled = true;
$visible = false;
addEventListener(Event.ADDED, addedHandler);
addEventListener(Event.REMOVED, removedHandler);
if ((this is IFocusManagerComponent)){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
resourcesChanged();
resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true);
_width = super.width;
_height = super.height;
}
override public function get filters():Array{
return ((_filters) ? _filters : super.filters);
}
public function get toolTip():String{
return (_toolTip);
}
private function transition_effectEndHandler(_arg1:EffectEvent):void{
_currentTransitionEffect = null;
}
public function get nestLevel():int{
return (_nestLevel);
}
protected function adjustFocusRect(_arg1:DisplayObject=null):void{
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Number;
if (!_arg1){
_arg1 = this;
};
if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){
return;
};
var _local2:IFocusManager = focusManager;
if (!_local2){
return;
};
var _local3:IFlexDisplayObject = IFlexDisplayObject(getFocusObject());
if (_local3){
if (((errorString) && (!((errorString == ""))))){
_local4 = getStyle("errorColor");
} else {
_local4 = getStyle("themeColor");
};
_local5 = getStyle("focusThickness");
if ((_local3 is IStyleClient)){
IStyleClient(_local3).setStyle("focusColor", _local4);
};
_local3.setActualSize((_arg1.width + (2 * _local5)), (_arg1.height + (2 * _local5)));
if (rotation){
_local7 = ((rotation * Math.PI) / 180);
_local6 = new Point((_arg1.x - (_local5 * (Math.cos(_local7) - Math.sin(_local7)))), (_arg1.y - (_local5 * (Math.cos(_local7) + Math.sin(_local7)))));
DisplayObject(_local3).rotation = rotation;
} else {
_local6 = new Point((_arg1.x - _local5), (_arg1.y - _local5));
};
if (_arg1.parent == this){
_local6.x = (_local6.x + x);
_local6.y = (_local6.y + y);
};
_local6 = parent.localToGlobal(_local6);
_local6 = parent.globalToLocal(_local6);
_local3.move(_local6.x, _local6.y);
if ((_local3 is IInvalidating)){
IInvalidating(_local3).validateNow();
} else {
if ((_local3 is IProgrammaticSkin)){
IProgrammaticSkin(_local3).validateNow();
};
};
};
}
mx_internal function setUnscaledWidth(_arg1:Number):void{
var _local2:Number = (_arg1 * Math.abs(oldScaleX));
if (_explicitWidth == _local2){
return;
};
if (!isNaN(_local2)){
_percentWidth = NaN;
};
_explicitWidth = _local2;
invalidateSize();
var _local3:IInvalidating = (parent as IInvalidating);
if (((_local3) && (includeInLayout))){
_local3.invalidateSize();
_local3.invalidateDisplayList();
};
}
private function isOnDisplayList():Boolean{
var p:DisplayObjectContainer;
try {
p = (_parent) ? _parent : super.parent;
} catch(e:SecurityError) {
return (true);
};
return ((p) ? true : false);
}
public function set nestLevel(_arg1:int):void{
var _local2:IChildList;
var _local3:int;
var _local4:int;
var _local5:ILayoutManagerClient;
var _local6:IUITextField;
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
updateCallbacks();
_local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
_local3 = _local2.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local5 = (_local2.getChildAt(_local4) as ILayoutManagerClient);
if (_local5){
_local5.nestLevel = (_arg1 + 1);
} else {
_local6 = (_local2.getChildAt(_local4) as IUITextField);
if (_local6){
_local6.nestLevel = (_arg1 + 1);
};
};
_local4++;
};
};
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function callLaterDispatcher(_arg1:Event):void{
var callLaterErrorEvent:DynamicEvent;
var event = _arg1;
UIComponentGlobals.callLaterDispatcherCount++;
if (!UIComponentGlobals.catchCallLaterExceptions){
callLaterDispatcher2(event);
} else {
try {
callLaterDispatcher2(event);
} catch(e:Error) {
callLaterErrorEvent = new DynamicEvent("callLaterError");
callLaterErrorEvent.error = e;
systemManager.dispatchEvent(callLaterErrorEvent);
};
};
UIComponentGlobals.callLaterDispatcherCount--;
}
public function getStyle(_arg1:String){
return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]);
}
final mx_internal function get $width():Number{
return (super.width);
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, (Math.PI / 2), _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function setCurrentState(_arg1:String, _arg2:Boolean=true):void{
if (((!((_arg1 == currentState))) && (!(((isBaseState(_arg1)) && (isBaseState(currentState))))))){
requestedCurrentState = _arg1;
playStateTransition = _arg2;
if (initialized){
commitCurrentState();
} else {
_currentStateChanged = true;
addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
};
};
}
private function getBaseStates(_arg1:State):Array{
var _local2:Array = [];
while (((_arg1) && (_arg1.basedOn))) {
_local2.push(_arg1.basedOn);
_arg1 = getState(_arg1.basedOn);
};
return (_local2);
}
public function set minHeight(_arg1:Number):void{
if (explicitMinHeight == _arg1){
return;
};
explicitMinHeight = _arg1;
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
public function get errorString():String{
return (_errorString);
}
mx_internal function setUnscaledHeight(_arg1:Number):void{
var _local2:Number = (_arg1 * Math.abs(oldScaleY));
if (_explicitHeight == _local2){
return;
};
if (!isNaN(_local2)){
_percentHeight = NaN;
};
_explicitHeight = _local2;
invalidateSize();
var _local3:IInvalidating = (parent as IInvalidating);
if (((_local3) && (includeInLayout))){
_local3.invalidateSize();
_local3.invalidateDisplayList();
};
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
final mx_internal function set $width(_arg1:Number):void{
super.width = _arg1;
}
public function getVisibleRect(_arg1:DisplayObject=null):Rectangle{
if (!_arg1){
_arg1 = DisplayObject(systemManager);
};
var _local2:DisplayObject = ($parent) ? $parent : parent;
if (!_local2){
return (new Rectangle());
};
var _local3:Point = new Point(x, y);
_local3 = _local2.localToGlobal(_local3);
var _local4:Rectangle = new Rectangle(_local3.x, _local3.y, width, height);
var _local5:DisplayObject = this;
var _local6:Rectangle = new Rectangle();
do {
if ((_local5 is UIComponent)){
if (UIComponent(_local5).$parent){
_local5 = UIComponent(_local5).$parent;
} else {
_local5 = UIComponent(_local5).parent;
};
} else {
_local5 = _local5.parent;
};
if (((_local5) && (_local5.scrollRect))){
_local6 = _local5.scrollRect.clone();
_local3 = _local5.localToGlobal(_local6.topLeft);
_local6.x = _local3.x;
_local6.y = _local3.y;
_local4 = _local4.intersection(_local6);
};
} while (((_local5) && (!((_local5 == _arg1)))));
return (_local4);
}
public function invalidateDisplayList():void{
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (((isOnDisplayList()) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
};
}
mx_internal function initThemeColor():Boolean{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Array;
var _local7:int;
var _local8:CSSStyleDeclaration;
var _local1:Object = _styleName;
if (_styleDeclaration){
_local2 = _styleDeclaration.getStyle("themeColor");
_local3 = _styleDeclaration.getStyle("rollOverColor");
_local4 = _styleDeclaration.getStyle("selectionColor");
};
if ((((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_local2))))) && (((_local1) && (!((_local1 is ISimpleStyleClient))))))){
_local5 = ((_local1 is String)) ? StyleManager.getStyleDeclaration(("." + _local1)) : _local1;
if (_local5){
_local2 = _local5.getStyle("themeColor");
_local3 = _local5.getStyle("rollOverColor");
_local4 = _local5.getStyle("selectionColor");
};
};
if ((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_local2))))){
_local6 = getClassStyleDeclarations();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_local8){
_local2 = _local8.getStyle("themeColor");
_local3 = _local8.getStyle("rollOverColor");
_local4 = _local8.getStyle("selectionColor");
};
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
break;
};
_local7++;
};
};
if (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (isNaN(_local3)))) && (isNaN(_local4)))){
setThemeColor(_local2);
return (true);
};
return (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (!(isNaN(_local3))))) && (!(isNaN(_local4)))));
}
override public function get scaleX():Number{
return (_scaleX);
}
public function get uid():String{
if (!_uid){
_uid = toString();
};
return (_uid);
}
override public function get mouseX():Number{
if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseX] === undefined)))){
return (super.mouseX);
};
return (globalToLocal(new Point(root[fakeMouseX], 0)).x);
}
override public function stopDrag():void{
super.stopDrag();
invalidateProperties();
dispatchEvent(new Event("xChanged"));
dispatchEvent(new Event("yChanged"));
}
public function get focusPane():Sprite{
return (_focusPane);
}
public function set tweeningProperties(_arg1:Array):void{
_tweeningProperties = _arg1;
}
public function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, 0, _arg1, _arg2);
return (UIComponentGlobals.tempMatrix);
}
public function get isDocument():Boolean{
return ((document == this));
}
public function set validationSubField(_arg1:String):void{
_validationSubField = _arg1;
}
override public function get scaleY():Number{
return (_scaleY);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function createInFontContext(_arg1:Class):Object{
hasFontContextBeenSaved = true;
var _local2:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
var _local3:String = getStyle("fontWeight");
var _local4:String = getStyle("fontStyle");
var _local5 = (_local3 == "bold");
var _local6 = (_local4 == "italic");
oldEmbeddedFontContext = getFontContext(_local2, _local5, _local6);
var _local7:Object = createInModuleContext((oldEmbeddedFontContext) ? oldEmbeddedFontContext : moduleFactory, getQualifiedClassName(_arg1));
if (_local7 == null){
_local7 = new (_arg1);
};
return (_local7);
}
public function get screen():Rectangle{
var _local1:ISystemManager = systemManager;
return ((_local1) ? _local1.screen : null);
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus(DisplayObject(_arg1.target))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
};
ContainerGlobals.checkFocus(_arg1.relatedObject, this);
};
}
public function hasFontContextChanged():Boolean{
if (!hasFontContextBeenSaved){
return (false);
};
var _local1:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
var _local2:String = getStyle("fontWeight");
var _local3:String = getStyle("fontStyle");
var _local4 = (_local2 == "bold");
var _local5 = (_local3 == "italic");
var _local6:EmbeddedFont = getEmbeddedFont(_local1, _local4, _local5);
var _local7:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(_local6, moduleFactory);
return (!((_local7 == oldEmbeddedFontContext)));
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
override public function get x():Number{
return (super.x);
}
override public function get y():Number{
return (super.y);
}
override public function get visible():Boolean{
return (_visible);
}
mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{
if (!overlay){
overlayColor = _arg1;
overlay = new UIComponent();
overlay.name = "overlay";
overlay.$visible = true;
fillOverlay(overlay, _arg1, _arg2);
attachOverlay();
if (!_arg2){
addEventListener(ResizeEvent.RESIZE, overlay_resizeHandler);
};
overlay.x = 0;
overlay.y = 0;
invalidateDisplayList();
overlayReferenceCount = 1;
} else {
overlayReferenceCount++;
};
dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED, true, false, overlay));
}
public function get percentWidth():Number{
return (_percentWidth);
}
public function set explicitMinHeight(_arg1:Number):void{
if (_explicitMinHeight == _arg1){
return;
};
_explicitMinHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinHeightChanged"));
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
mx_internal function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function stylesInitialized():void{
}
public function set errorString(_arg1:String):void{
var _local2:String = _errorString;
_errorString = _arg1;
ToolTipManager.registerErrorString(this, _local2, _arg1);
errorStringChanged = true;
invalidateProperties();
dispatchEvent(new Event("errorStringChanged"));
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
final mx_internal function set $height(_arg1:Number):void{
super.height = _arg1;
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
final mx_internal function $removeChild(_arg1:DisplayObject):DisplayObject{
return (super.removeChild(_arg1));
}
override public function set scaleX(_arg1:Number):void{
if (_scaleX == _arg1){
return;
};
_scaleX = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleXChanged"));
}
override public function set scaleY(_arg1:Number):void{
if (_scaleY == _arg1){
return;
};
_scaleY = _arg1;
invalidateProperties();
invalidateSize();
dispatchEvent(new Event("scaleYChanged"));
}
public function set uid(_arg1:String):void{
this._uid = _arg1;
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
if (automationDelegate){
return (automationDelegate.createAutomationIDPart(_arg1));
};
return (null);
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
if (automationDelegate){
return (automationDelegate.getAutomationChildAt(_arg1));
};
return (null);
}
mx_internal function get isEffectStarted():Boolean{
return (_isEffectStarted);
}
override public function get parent():DisplayObjectContainer{
try {
return ((_parent) ? _parent : super.parent);
} catch(e:SecurityError) {
};
return (null);
}
override public function get mouseY():Number{
if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseY] === undefined)))){
return (super.mouseY);
};
return (globalToLocal(new Point(0, root[fakeMouseY])).y);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
dispatchEvent(new Event("heightChanged"));
_local3 = true;
};
if (_local3){
invalidateDisplayList();
dispatchResizeEvent();
};
}
private function focusObj_resizeHandler(_arg1:ResizeEvent):void{
adjustFocusRect();
}
mx_internal function adjustSizesForScaleChanges():void{
var _local3:Number;
var _local1:Number = scaleX;
var _local2:Number = scaleY;
if (_local1 != oldScaleX){
_local3 = Math.abs((_local1 / oldScaleX));
if (explicitMinWidth){
explicitMinWidth = (explicitMinWidth * _local3);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local3);
};
if (explicitMaxWidth){
explicitMaxWidth = (explicitMaxWidth * _local3);
};
oldScaleX = _local1;
};
if (_local2 != oldScaleY){
_local3 = Math.abs((_local2 / oldScaleY));
if (explicitMinHeight){
explicitMinHeight = (explicitMinHeight * _local3);
};
if (explicitHeight){
explicitHeight = (explicitHeight * _local3);
};
if (explicitMaxHeight){
explicitMaxHeight = (explicitMaxHeight * _local3);
};
oldScaleY = _local2;
};
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane.mask = null;
_focusPane = null;
};
}
public function determineTextFormatFromStyles():UITextFormat{
var _local2:String;
var _local1:UITextFormat = cachedTextFormat;
if (!_local1){
_local2 = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ",");
_local1 = new UITextFormat(getNonNullSystemManager(), _local2);
_local1.moduleFactory = moduleFactory;
_local1.align = _inheritingStyles.textAlign;
_local1.bold = (_inheritingStyles.fontWeight == "bold");
_local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor;
_local1.font = _local2;
_local1.indent = _inheritingStyles.textIndent;
_local1.italic = (_inheritingStyles.fontStyle == "italic");
_local1.kerning = _inheritingStyles.kerning;
_local1.leading = _nonInheritingStyles.leading;
_local1.leftMargin = _nonInheritingStyles.paddingLeft;
_local1.letterSpacing = _inheritingStyles.letterSpacing;
_local1.rightMargin = _nonInheritingStyles.paddingRight;
_local1.size = _inheritingStyles.fontSize;
_local1.underline = (_nonInheritingStyles.textDecoration == "underline");
_local1.antiAliasType = _inheritingStyles.fontAntiAliasType;
_local1.gridFitType = _inheritingStyles.fontGridFitType;
_local1.sharpness = _inheritingStyles.fontSharpness;
_local1.thickness = _inheritingStyles.fontThickness;
cachedTextFormat = _local1;
};
return (_local1);
}
public function validationResultHandler(_arg1:ValidationResultEvent):void{
var _local2:String;
var _local3:ValidationResult;
var _local4:int;
if (_arg1.type == ValidationResultEvent.VALID){
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
} else {
if (((((!((validationSubField == null))) && (!((validationSubField == ""))))) && (_arg1.results))){
_local4 = 0;
while (_local4 < _arg1.results.length) {
_local3 = _arg1.results[_local4];
if (_local3.subField == validationSubField){
if (_local3.isError){
_local2 = _local3.errorMessage;
} else {
if (errorString != ""){
errorString = "";
dispatchEvent(new FlexEvent(FlexEvent.VALID));
};
};
break;
};
_local4++;
};
} else {
if (((_arg1.results) && ((_arg1.results.length > 0)))){
_local2 = _arg1.results[0].errorMessage;
};
};
if (((_local2) && (!((errorString == _local2))))){
errorString = _local2;
dispatchEvent(new FlexEvent(FlexEvent.INVALID));
};
};
}
public function invalidateProperties():void{
if (!invalidatePropertiesFlag){
invalidatePropertiesFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
};
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
private function focusObj_scrollHandler(_arg1:Event):void{
adjustFocusRect();
}
final mx_internal function get $x():Number{
return (super.x);
}
final mx_internal function get $y():Number{
return (super.y);
}
public function setConstraintValue(_arg1:String, _arg2):void{
setStyle(_arg1, _arg2);
}
protected function resourcesChanged():void{
}
public function registerEffects(_arg1:Array):void{
var _local4:String;
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]);
if (((!((_local4 == null))) && (!((_local4 == ""))))){
addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
_local3++;
};
}
public function get explicitMinWidth():Number{
return (_explicitMinWidth);
}
private function filterChangeHandler(_arg1:Event):void{
super.filters = _filters;
}
override public function set visible(_arg1:Boolean):void{
setVisible(_arg1);
}
public function set explicitHeight(_arg1:Number):void{
if (_explicitHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentHeight = NaN;
};
_explicitHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitHeightChanged"));
}
override public function set x(_arg1:Number):void{
if (super.x == _arg1){
return;
};
super.x = _arg1;
invalidateProperties();
dispatchEvent(new Event("xChanged"));
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
_showInAutomationHierarchy = _arg1;
}
override public function set y(_arg1:Number):void{
if (super.y == _arg1){
return;
};
super.y = _arg1;
invalidateProperties();
dispatchEvent(new Event("yChanged"));
}
private function resourceManager_changeHandler(_arg1:Event):void{
resourcesChanged();
}
public function set systemManager(_arg1:ISystemManager):void{
_systemManager = _arg1;
_systemManagerDirty = false;
}
mx_internal function getFocusObject():DisplayObject{
var _local1:IFocusManager = focusManager;
if (((!(_local1)) || (!(_local1.focusPane)))){
return (null);
};
return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0));
}
public function set percentWidth(_arg1:Number):void{
if (_percentWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitWidth = NaN;
};
_percentWidth = _arg1;
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2:DisplayObjectContainer = _arg1.parent;
if (((_local2) && (!((_local2 is Loader))))){
_local2.removeChild(_arg1);
};
var _local3:int = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren;
addingChild(_arg1);
$addChildAt(_arg1, _local3);
childAdded(_arg1);
return (_arg1);
}
public function get document():Object{
return (_document);
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
final mx_internal function $addChild(_arg1:DisplayObject):DisplayObject{
return (super.addChild(_arg1));
}
mx_internal function setThemeColor(_arg1:Object):void{
var _local2:Number;
if ((_local2 is String)){
_local2 = parseInt(String(_arg1));
} else {
_local2 = Number(_arg1);
};
if (isNaN(_local2)){
_local2 = StyleManager.getColorName(_arg1);
};
var _local3:Number = ColorUtil.adjustBrightness2(_local2, 50);
var _local4:Number = ColorUtil.adjustBrightness2(_local2, 70);
setStyle("selectionColor", _local3);
setStyle("rollOverColor", _local4);
}
public function get explicitMaxWidth():Number{
return (_explicitMaxWidth);
}
public function get id():String{
return (_id);
}
override public function get height():Number{
return (_height);
}
public function set minWidth(_arg1:Number):void{
if (explicitMinWidth == _arg1){
return;
};
explicitMinWidth = _arg1;
}
public function set currentState(_arg1:String):void{
setCurrentState(_arg1, true);
}
public function getRepeaterItem(_arg1:int=-1):Object{
var _local2:Array = repeaters;
if (_arg1 == -1){
_arg1 = (_local2.length - 1);
};
return (_local2[_arg1].getItemAt(repeaterIndices[_arg1]));
}
public function executeBindings(_arg1:Boolean=false):void{
var _local2:Object = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument;
BindingManager.executeBindings(_local2, id, this);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
mx_internal function getFontContext(_arg1:String, _arg2:Boolean, _arg3:Boolean):IFlexModuleFactory{
return (embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(_arg1, _arg2, _arg3), moduleFactory));
}
public function get instanceIndex():int{
return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1);
}
public function set measuredWidth(_arg1:Number):void{
_measuredWidth = _arg1;
}
public function effectFinished(_arg1:IEffectInstance):void{
_endingEffectInstances.push(_arg1);
invalidateProperties();
UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true);
}
mx_internal function set isEffectStarted(_arg1:Boolean):void{
_isEffectStarted = _arg1;
}
mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{
if (!_arg3){
_arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0);
};
var _local4:Graphics = _arg1.graphics;
_local4.clear();
_local4.beginFill(_arg2);
_local4.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2));
_local4.endFill();
}
public function get instanceIndices():Array{
return ((_instanceIndices) ? _instanceIndices.slice(0) : null);
}
mx_internal function childAdded(_arg1:DisplayObject):void{
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).initialized){
UIComponent(_arg1).initialize();
};
} else {
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
};
}
public function globalToContent(_arg1:Point):Point{
return (globalToLocal(_arg1));
}
mx_internal function removingChild(_arg1:DisplayObject):void{
}
mx_internal function getEffectsForProperty(_arg1:String):Array{
return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []);
}
override public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = getChildAt(_arg1);
removingChild(_local2);
$removeChild(_local2);
childRemoved(_local2);
return (_local2);
}
protected function measure():void{
measuredMinWidth = 0;
measuredMinHeight = 0;
measuredWidth = 0;
measuredHeight = 0;
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
mx_internal function getNonNullSystemManager():ISystemManager{
var _local1:ISystemManager = systemManager;
if (!_local1){
_local1 = ISystemManager(SystemManager.getSWFRoot(this));
};
if (!_local1){
return (SystemManagerGlobals.topLevelSystemManagers[0]);
};
return (_local1);
}
protected function get unscaledWidth():Number{
return ((width / Math.abs(scaleX)));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
if (_arg1){
dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE));
};
}
private function processEffectFinished(_arg1:Array):void{
var _local3:int;
var _local4:IEffectInstance;
var _local5:IEffectInstance;
var _local6:Array;
var _local7:int;
var _local8:String;
var _local9:int;
var _local2:int = (_effectsStarted.length - 1);
while (_local2 >= 0) {
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1[_local3];
if (_local4 == _effectsStarted[_local2]){
_local5 = _effectsStarted[_local2];
_effectsStarted.splice(_local2, 1);
_local6 = _local5.effect.getAffectedProperties();
_local7 = 0;
while (_local7 < _local6.length) {
_local8 = _local6[_local7];
if (_affectedProperties[_local8] != undefined){
_local9 = 0;
while (_local9 < _affectedProperties[_local8].length) {
if (_affectedProperties[_local8][_local9] == _local4){
_affectedProperties[_local8].splice(_local9, 1);
break;
};
_local9++;
};
if (_affectedProperties[_local8].length == 0){
delete _affectedProperties[_local8];
};
};
_local7++;
};
break;
};
_local3++;
};
_local2--;
};
isEffectStarted = ((_effectsStarted.length > 0)) ? true : false;
if (((_local4) && (_local4.hideFocusRing))){
preventDrawFocus = false;
};
}
private function commitCurrentState():void{
var _local3:StateChangeEvent;
var _local1:IEffect = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null;
var _local2:String = findCommonBaseState(_currentState, requestedCurrentState);
var _local4:String = (_currentState) ? _currentState : "";
var _local5:State = getState(requestedCurrentState);
if (_currentTransitionEffect){
_currentTransitionEffect.end();
};
initializeState(requestedCurrentState);
if (_local1){
_local1.captureStartValues();
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING);
_local3.oldState = _local4;
_local3.newState = (requestedCurrentState) ? requestedCurrentState : "";
dispatchEvent(_local3);
if (isBaseState(_currentState)){
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
};
removeState(_currentState, _local2);
_currentState = requestedCurrentState;
if (isBaseState(currentState)){
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
} else {
applyState(_currentState, _local2);
};
_local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE);
_local3.oldState = _local4;
_local3.newState = (_currentState) ? _currentState : "";
dispatchEvent(_local3);
if (_local1){
UIComponentGlobals.layoutManager.validateNow();
_currentTransitionEffect = _local1;
_local1.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler);
_local1.play();
};
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
private function dispatchResizeEvent():void{
var _local1:ResizeEvent = new ResizeEvent(ResizeEvent.RESIZE);
_local1.oldWidth = oldWidth;
_local1.oldHeight = oldHeight;
dispatchEvent(_local1);
oldWidth = width;
oldHeight = height;
}
public function set maxWidth(_arg1:Number):void{
if (explicitMaxWidth == _arg1){
return;
};
explicitMaxWidth = _arg1;
}
public function validateDisplayList():void{
var _local1:ISystemManager;
var _local2:Number;
var _local3:Number;
if (invalidateDisplayListFlag){
_local1 = (parent as ISystemManager);
if (_local1){
if ((((_local1 is SystemManagerProxy)) || ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))))){
setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());
};
};
_local2 = ((scaleX == 0)) ? 0 : (width / scaleX);
_local3 = ((scaleY == 0)) ? 0 : (height / scaleY);
if (Math.abs((_local2 - lastUnscaledWidth)) < 1E-5){
_local2 = lastUnscaledWidth;
};
if (Math.abs((_local3 - lastUnscaledHeight)) < 1E-5){
_local3 = lastUnscaledHeight;
};
updateDisplayList(_local2, _local3);
lastUnscaledWidth = _local2;
lastUnscaledHeight = _local3;
invalidateDisplayListFlag = false;
};
}
public function contentToGlobal(_arg1:Point):Point{
return (localToGlobal(_arg1));
}
public function resolveAutomationIDPart(_arg1:Object):Array{
if (automationDelegate){
return (automationDelegate.resolveAutomationIDPart(_arg1));
};
return ([]);
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function setFocus():void{
var _local1:ISystemManager = systemManager;
if (((_local1) && (((_local1.stage) || (_local1.useSWFBridge()))))){
if (UIComponentGlobals.callLaterDispatcherCount == 0){
_local1.stage.focus = this;
UIComponentGlobals.nextFocusObject = null;
} else {
UIComponentGlobals.nextFocusObject = this;
_local1.addEventListener(FlexEvent.ENTER_FRAME, setFocusLater);
};
} else {
UIComponentGlobals.nextFocusObject = this;
callLater(setFocusLater);
};
}
private function getTransition(_arg1:String, _arg2:String):IEffect{
var _local6:Transition;
var _local3:IEffect;
var _local4:int;
if (!transitions){
return (null);
};
if (!_arg1){
_arg1 = "";
};
if (!_arg2){
_arg2 = "";
};
var _local5:int;
while (_local5 < transitions.length) {
_local6 = transitions[_local5];
if ((((((_local6.fromState == "*")) && ((_local6.toState == "*")))) && ((_local4 < 1)))){
_local3 = _local6.effect;
_local4 = 1;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == "*")))) && ((_local4 < 2)))){
_local3 = _local6.effect;
_local4 = 2;
} else {
if ((((((_local6.fromState == "*")) && ((_local6.toState == _arg2)))) && ((_local4 < 3)))){
_local3 = _local6.effect;
_local4 = 3;
} else {
if ((((((_local6.fromState == _arg1)) && ((_local6.toState == _arg2)))) && ((_local4 < 4)))){
_local3 = _local6.effect;
_local4 = 4;
break;
};
};
};
};
_local5++;
};
return (_local3);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
if (_arg1){
setVisible(_visible, true);
dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));
};
}
final mx_internal function set $y(_arg1:Number):void{
super.y = _arg1;
}
public function owns(_arg1:DisplayObject):Boolean{
var child = _arg1;
var childList:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
if (childList.contains(child)){
return (true);
};
try {
while (((child) && (!((child == this))))) {
if ((child is IUIComponent)){
child = IUIComponent(child).owner;
} else {
child = child.parent;
};
};
} catch(e:SecurityError) {
return (false);
};
return ((child == this));
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
_visible = _arg1;
if (!initialized){
return;
};
if ($visible == _arg1){
return;
};
$visible = _arg1;
if (!_arg2){
dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE));
};
}
final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (super.addChildAt(_arg1, _arg2));
}
public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:PropertyChangeEvent;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = null;
} else {
_local3 = _arg1[id];
if (!_local3){
return;
};
_local4 = [];
_local4.push(_local3);
_local5 = _local2.length;
_local6 = 0;
while (_local6 < (_local5 - 1)) {
_local8 = _local3[_local2[_local6]];
if (!_local8){
return;
};
_local3 = _local8;
_local4.push(_local3);
_local6++;
};
_local3.splice(_local2[(_local5 - 1)], 1);
_local7 = (_local4.length - 1);
while (_local7 > 0) {
if (_local4[_local7].length == 0){
_local4[(_local7 - 1)].splice(_local2[_local7], 1);
};
_local7--;
};
if ((((_local4.length > 0)) && ((_local4[0].length == 0)))){
_arg1[id] = null;
} else {
_local9 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local9);
};
};
};
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function effectStarted(_arg1:IEffectInstance):void{
var _local4:String;
_effectsStarted.push(_arg1);
var _local2:Array = _arg1.effect.getAffectedProperties();
var _local3:int;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (_affectedProperties[_local4] == undefined){
_affectedProperties[_local4] = [];
};
_affectedProperties[_local4].push(_arg1);
_local3++;
};
isEffectStarted = true;
if (_arg1.hideFocusRing){
preventDrawFocus = true;
drawFocus(false);
};
}
final mx_internal function set $x(_arg1:Number):void{
super.x = _arg1;
}
private function applyState(_arg1:String, _arg2:String):void{
var _local4:Array;
var _local5:int;
var _local3:State = getState(_arg1);
if (_arg1 == _arg2){
return;
};
if (_local3){
if (_local3.basedOn != _arg2){
applyState(_local3.basedOn, _arg2);
};
_local4 = _local3.overrides;
_local5 = 0;
while (_local5 < _local4.length) {
_local4[_local5].apply(this);
_local5++;
};
_local3.dispatchEnterState();
};
}
protected function commitProperties():void{
var _local1:Number;
var _local2:Number;
if (_scaleX != oldScaleX){
_local1 = Math.abs((_scaleX / oldScaleX));
if (!isNaN(explicitMinWidth)){
explicitMinWidth = (explicitMinWidth * _local1);
};
if (!isNaN(explicitWidth)){
explicitWidth = (explicitWidth * _local1);
};
if (!isNaN(explicitMaxWidth)){
explicitMaxWidth = (explicitMaxWidth * _local1);
};
_width = (_width * _local1);
super.scaleX = (oldScaleX = _scaleX);
};
if (_scaleY != oldScaleY){
_local2 = Math.abs((_scaleY / oldScaleY));
if (!isNaN(explicitMinHeight)){
explicitMinHeight = (explicitMinHeight * _local2);
};
if (!isNaN(explicitHeight)){
explicitHeight = (explicitHeight * _local2);
};
if (!isNaN(explicitMaxHeight)){
explicitMaxHeight = (explicitMaxHeight * _local2);
};
_height = (_height * _local2);
super.scaleY = (oldScaleY = _scaleY);
};
if (((!((x == oldX))) || (!((y == oldY))))){
dispatchMoveEvent();
};
if (((!((width == oldWidth))) || (!((height == oldHeight))))){
dispatchResizeEvent();
};
if (errorStringChanged){
errorStringChanged = false;
setBorderColorForErrorString();
};
}
public function get percentHeight():Number{
return (_percentHeight);
}
override public function get width():Number{
return (_width);
}
final mx_internal function get $parent():DisplayObjectContainer{
return (super.parent);
}
public function set explicitMinWidth(_arg1:Number):void{
if (_explicitMinWidth == _arg1){
return;
};
_explicitMinWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMinWidthChanged"));
}
public function get isPopUp():Boolean{
return (_isPopUp);
}
private function measureSizes():Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local1:Boolean;
if (!invalidateSizeFlag){
return (_local1);
};
if (((isNaN(explicitWidth)) || (isNaN(explicitHeight)))){
_local4 = Math.abs(scaleX);
_local5 = Math.abs(scaleY);
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth / _local4);
_measuredWidth = (_measuredWidth / _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight / _local5);
_measuredHeight = (_measuredHeight / _local5);
};
measure();
invalidateSizeFlag = false;
if (((!(isNaN(explicitMinWidth))) && ((measuredWidth < explicitMinWidth)))){
measuredWidth = explicitMinWidth;
};
if (((!(isNaN(explicitMaxWidth))) && ((measuredWidth > explicitMaxWidth)))){
measuredWidth = explicitMaxWidth;
};
if (((!(isNaN(explicitMinHeight))) && ((measuredHeight < explicitMinHeight)))){
measuredHeight = explicitMinHeight;
};
if (((!(isNaN(explicitMaxHeight))) && ((measuredHeight > explicitMaxHeight)))){
measuredHeight = explicitMaxHeight;
};
if (_local4 != 1){
_measuredMinWidth = (_measuredMinWidth * _local4);
_measuredWidth = (_measuredWidth * _local4);
};
if (_local5 != 1){
_measuredMinHeight = (_measuredMinHeight * _local5);
_measuredHeight = (_measuredHeight * _local5);
};
} else {
invalidateSizeFlag = false;
_measuredMinWidth = 0;
_measuredMinHeight = 0;
};
adjustSizesForScaleChanges();
if (isNaN(oldMinWidth)){
oldMinWidth = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
oldMinHeight = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
oldExplicitWidth = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
oldExplicitHeight = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
_local1 = true;
} else {
_local3 = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth;
if (_local3 != oldMinWidth){
oldMinWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight;
if (_local3 != oldMinHeight){
oldMinHeight = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth;
if (_local3 != oldExplicitWidth){
oldExplicitWidth = _local3;
_local1 = true;
};
_local3 = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight;
if (_local3 != oldExplicitHeight){
oldExplicitHeight = _local3;
_local1 = true;
};
};
return (_local1);
}
public function get automationTabularData():Object{
if (automationDelegate){
return (automationDelegate.automationTabularData);
};
return (null);
}
public function validateNow():void{
UIComponentGlobals.layoutManager.validateClient(this);
}
public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{
}
public function get repeaters():Array{
return ((_repeaters) ? _repeaters.slice(0) : []);
}
private function dispatchMoveEvent():void{
var _local1:MoveEvent = new MoveEvent(MoveEvent.MOVE);
_local1.oldX = oldX;
_local1.oldY = oldY;
dispatchEvent(_local1);
oldX = x;
oldY = y;
}
public function drawFocus(_arg1:Boolean):void{
var _local4:DisplayObjectContainer;
var _local5:Class;
if (!parent){
return;
};
var _local2:DisplayObject = getFocusObject();
var _local3:Sprite = (focusManager) ? focusManager.focusPane : null;
if (((_arg1) && (!(preventDrawFocus)))){
_local4 = _local3.parent;
if (_local4 != parent){
if (_local4){
if ((_local4 is ISystemManager)){
ISystemManager(_local4).focusPane = null;
} else {
IUIComponent(_local4).focusPane = null;
};
};
if ((parent is ISystemManager)){
ISystemManager(parent).focusPane = _local3;
} else {
IUIComponent(parent).focusPane = _local3;
};
};
_local5 = getStyle("focusSkin");
if (((_local2) && (!((_local2 is _local5))))){
_local3.removeChild(_local2);
_local2 = null;
};
if (!_local2){
_local2 = new (_local5);
_local2.name = "focus";
_local3.addChild(_local2);
};
if ((_local2 is ILayoutManagerClient)){
ILayoutManagerClient(_local2).nestLevel = nestLevel;
};
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = this;
};
addEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
addEventListener(MoveEvent.MOVE, focusObj_moveHandler);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
addEventListener(Event.REMOVED, focusObj_removedHandler, true);
_local2.visible = true;
hasFocusRect = true;
adjustFocusRect();
} else {
if (hasFocusRect){
hasFocusRect = false;
if (_local2){
_local2.visible = false;
if ((_local2 is ISimpleStyleClient)){
ISimpleStyleClient(_local2).styleName = null;
};
};
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler);
removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true);
removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler);
removeEventListener(Event.REMOVED, focusObj_removedHandler, true);
};
};
}
public function get flexContextMenu():IFlexContextMenu{
return (_flexContextMenu);
}
private function get indexedID():String{
var _local1:String = id;
var _local2:Array = instanceIndices;
if (_local2){
_local1 = (_local1 + (("[" + _local2.join("][")) + "]"));
};
return (_local1);
}
public function get measuredMinHeight():Number{
return (_measuredMinHeight);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = (document) ? document : ApplicationGlobals.application;
};
if ((((_arg1 is UIComponent)) && ((UIComponent(_arg1).moduleFactory == null)))){
if (moduleFactory != null){
UIComponent(_arg1).moduleFactory = moduleFactory;
} else {
if ((((document is IFlexModule)) && (!((document.moduleFactory == null))))){
UIComponent(_arg1).moduleFactory = document.moduleFactory;
} else {
if ((((parent is UIComponent)) && (!((UIComponent(parent).moduleFactory == null))))){
UIComponent(_arg1).moduleFactory = UIComponent(parent).moduleFactory;
};
};
};
};
if ((((((_arg1 is IFontContextComponent)) && ((!(_arg1) is UIComponent)))) && ((IFontContextComponent(_arg1).fontContext == null)))){
IFontContextComponent(_arg1).fontContext = moduleFactory;
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
} else {
if ((_arg1 is IUITextField)){
IUITextField(_arg1).nestLevel = (nestLevel + 1);
};
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
} else {
if ((((_arg1 is IUITextField)) && (IUITextField(_arg1).inheritingStyles))){
StyleProtoChain.initTextField(IUITextField(_arg1));
};
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).initThemeColor();
};
if ((_arg1 is UIComponent)){
UIComponent(_arg1).stylesInitialized();
};
}
public function set repeaterIndices(_arg1:Array):void{
_repeaterIndices = _arg1;
}
protected function initializationComplete():void{
processedDescriptors = true;
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
var _local4:UIComponent;
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as UIComponent);
if (!_local4){
} else {
if ((((_local4.moduleFactory == null)) || ((_local4.moduleFactory == _moduleFactory)))){
_local4.moduleFactory = _arg1;
};
};
_local3++;
};
_moduleFactory = _arg1;
}
private function focusObj_removedHandler(_arg1:Event):void{
if (_arg1.target != this){
return;
};
var _local2:DisplayObject = getFocusObject();
if (_local2){
_local2.visible = false;
};
}
mx_internal function updateCallbacks():void{
if (invalidateDisplayListFlag){
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
if (invalidateSizeFlag){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
if (invalidatePropertiesFlag){
UIComponentGlobals.layoutManager.invalidateProperties(this);
};
if (((systemManager) && (((_systemManager.stage) || (_systemManager.useSWFBridge()))))){
if ((((methodQueue.length > 0)) && (!(listeningForRender)))){
_systemManager.addEventListener(FlexEvent.RENDER, callLaterDispatcher);
_systemManager.addEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
if (_systemManager.stage){
_systemManager.stage.invalidate();
};
};
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_styleDeclaration = _arg1;
}
override public function set doubleClickEnabled(_arg1:Boolean):void{
var _local2:IChildList;
var _local4:InteractiveObject;
super.doubleClickEnabled = _arg1;
if ((this is IRawChildrenContainer)){
_local2 = IRawChildrenContainer(this).rawChildren;
} else {
_local2 = IChildList(this);
};
var _local3:int;
while (_local3 < _local2.numChildren) {
_local4 = (_local2.getChildAt(_local3) as InteractiveObject);
if (_local4){
_local4.doubleClickEnabled = _arg1;
};
_local3++;
};
}
public function prepareToPrint(_arg1:IFlexDisplayObject):Object{
return (null);
}
public function get minHeight():Number{
if (!isNaN(explicitMinHeight)){
return (explicitMinHeight);
};
return (measuredMinHeight);
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local5:ISimpleStyleClient;
cachedTextFormat = null;
var _local3:int = numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = (getChildAt(_local4) as ISimpleStyleClient);
if (_local5){
_local5.styleChanged(_arg1);
if ((_local5 is IStyleClient)){
IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2);
};
};
_local4++;
};
}
public function get contentMouseX():Number{
return (mouseX);
}
public function get contentMouseY():Number{
return (mouseY);
}
public function get tweeningProperties():Array{
return (_tweeningProperties);
}
public function set explicitMaxWidth(_arg1:Number):void{
if (_explicitMaxWidth == _arg1){
return;
};
_explicitMaxWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxWidthChanged"));
}
public function set document(_arg1:Object):void{
var _local4:IUIComponent;
var _local2:int = numChildren;
var _local3:int;
while (_local3 < _local2) {
_local4 = (getChildAt(_local3) as IUIComponent);
if (!_local4){
} else {
if ((((_local4.document == _document)) || ((_local4.document == ApplicationGlobals.application)))){
_local4.document = _arg1;
};
};
_local3++;
};
_document = _arg1;
}
public function validateSize(_arg1:Boolean=false):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:IInvalidating;
if (_arg1){
_local2 = 0;
while (_local2 < numChildren) {
_local3 = getChildAt(_local2);
if ((_local3 is ILayoutManagerClient)){
(_local3 as ILayoutManagerClient).validateSize(true);
};
_local2++;
};
};
if (invalidateSizeFlag){
_local4 = measureSizes();
if (((_local4) && (includeInLayout))){
invalidateDisplayList();
_local5 = (parent as IInvalidating);
if (_local5){
_local5.invalidateSize();
_local5.invalidateDisplayList();
};
};
};
}
public function get validationSubField():String{
return (_validationSubField);
}
override public function dispatchEvent(_arg1:Event):Boolean{
if (dispatchEventHook != null){
dispatchEventHook(_arg1, this);
};
return (super.dispatchEvent(_arg1));
}
public function set id(_arg1:String):void{
_id = _arg1;
}
private function overlay_resizeHandler(_arg1:Event):void{
fillOverlay(overlay, overlayColor, null);
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
final mx_internal function get $height():Number{
return (super.height);
}
protected function attachOverlay():void{
addChild(overlay);
}
public function get explicitMinHeight():Number{
return (_explicitMinHeight);
}
override public function set height(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitHeight != _arg1){
explicitHeight = _arg1;
invalidateSize();
};
if (_height != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_height = _arg1;
dispatchEvent(new Event("heightChanged"));
};
}
public function get numAutomationChildren():int{
if (automationDelegate){
return (automationDelegate.numAutomationChildren);
};
return (0);
}
public function get parentApplication():Object{
var _local2:UIComponent;
var _local1:Object = systemManager.document;
if (_local1 == this){
_local2 = (_local1.systemManager.parent as UIComponent);
_local1 = (_local2) ? _local2.systemManager.document : null;
};
return (_local1);
}
public function localToContent(_arg1:Point):Point{
return (_arg1);
}
public function get repeaterIndex():int{
return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1);
}
private function removeState(_arg1:String, _arg2:String):void{
var _local4:Array;
var _local5:int;
var _local3:State = getState(_arg1);
if (_arg1 == _arg2){
return;
};
if (_local3){
_local3.dispatchExitState();
_local4 = _local3.overrides;
_local5 = _local4.length;
while (_local5) {
_local4[(_local5 - 1)].remove(this);
_local5--;
};
if (_local3.basedOn != _arg2){
removeState(_local3.basedOn, _arg2);
};
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "styleName"){
styleName = _arg2;
return;
};
if (EffectManager.getEventForEffectTrigger(_arg1) != ""){
EffectManager.setStyle(_arg1, this);
};
var _local3:Boolean = StyleManager.isInheritingStyle(_arg1);
var _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED));
var _local5 = !((getStyle(_arg1) == _arg2));
if (!_styleDeclaration){
_styleDeclaration = new CSSStyleDeclaration();
_styleDeclaration.setStyle(_arg1, _arg2);
if (_local4){
regenerateStyleCache(_local3);
};
} else {
_styleDeclaration.setStyle(_arg1, _arg2);
};
if (((_local4) && (_local5))){
styleChanged(_arg1);
notifyStyleChangeInChildren(_arg1, _local3);
};
}
public function get showInAutomationHierarchy():Boolean{
return (_showInAutomationHierarchy);
}
public function get systemManager():ISystemManager{
var _local1:DisplayObject;
var _local2:DisplayObjectContainer;
var _local3:IUIComponent;
if (((!(_systemManager)) || (_systemManagerDirty))){
_local1 = root;
if ((_systemManager is SystemManagerProxy)){
} else {
if (((_local1) && (!((_local1 is Stage))))){
_systemManager = (_local1 as ISystemManager);
} else {
if (_local1){
_systemManager = (Stage(_local1).getChildAt(0) as ISystemManager);
} else {
_local2 = parent;
while (_local2) {
_local3 = (_local2 as IUIComponent);
if (_local3){
_systemManager = _local3.systemManager;
break;
} else {
if ((_local2 is ISystemManager)){
_systemManager = (_local2 as ISystemManager);
break;
};
};
_local2 = _local2.parent;
};
};
};
};
_systemManagerDirty = false;
};
return (_systemManager);
}
private function isBaseState(_arg1:String):Boolean{
return (((!(_arg1)) || ((_arg1 == ""))));
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
cachedTextFormat = null;
invalidateDisplayList();
dispatchEvent(new Event("enabledChanged"));
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
public function get minWidth():Number{
if (!isNaN(explicitMinWidth)){
return (explicitMinWidth);
};
return (measuredMinWidth);
}
private function setFocusLater(_arg1:Event=null):void{
var _local2:ISystemManager = systemManager;
if (((_local2) && (_local2.stage))){
_local2.stage.removeEventListener(Event.ENTER_FRAME, setFocusLater);
if (UIComponentGlobals.nextFocusObject){
_local2.stage.focus = UIComponentGlobals.nextFocusObject;
};
UIComponentGlobals.nextFocusObject = null;
};
}
public function get currentState():String{
return ((_currentStateChanged) ? requestedCurrentState : _currentState);
}
public function initializeRepeaterArrays(_arg1:IRepeaterClient):void{
if (((((((_arg1) && (_arg1.instanceIndices))) && (((!(_arg1.isDocument)) || (!((_arg1 == descriptor.document))))))) && (!(_instanceIndices)))){
_instanceIndices = _arg1.instanceIndices;
_repeaters = _arg1.repeaters;
_repeaterIndices = _arg1.repeaterIndices;
};
}
public function get baselinePosition():Number{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
return (NaN);
};
if (!validateBaselinePosition()){
return (NaN);
};
var _local1:TextLineMetrics = measureText("Wj");
if (height < ((2 + _local1.ascent) + 2)){
return (int((height + ((_local1.ascent - height) / 2))));
};
return ((2 + _local1.ascent));
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function set instanceIndices(_arg1:Array):void{
_instanceIndices = _arg1;
}
public function set cachePolicy(_arg1:String):void{
if (_cachePolicy != _arg1){
_cachePolicy = _arg1;
if (_arg1 == UIComponentCachePolicy.OFF){
cacheAsBitmap = false;
} else {
if (_arg1 == UIComponentCachePolicy.ON){
cacheAsBitmap = true;
} else {
cacheAsBitmap = (cacheAsBitmapCount > 0);
};
};
};
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([]);
}
private function addedHandler(_arg1:Event):void{
var event = _arg1;
if (event.eventPhase != EventPhase.AT_TARGET){
return;
};
try {
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
event.stopImmediatePropagation();
return;
};
} catch(error:SecurityError) {
};
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is ISystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3:DisplayObjectContainer = _arg1.parent;
if (((_local3) && (!((_local3 is Loader))))){
_local3.removeChild(_arg1);
};
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 1)));
};
addingChild(_arg1);
$addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
public function get maxWidth():Number{
return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth);
}
override public function set alpha(_arg1:Number):void{
super.alpha = _arg1;
dispatchEvent(new Event("alphaChanged"));
}
private function removedHandler(_arg1:Event):void{
var event = _arg1;
if (event.eventPhase != EventPhase.AT_TARGET){
return;
};
try {
if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){
event.stopImmediatePropagation();
return;
};
} catch(error:SecurityError) {
};
_systemManagerDirty = true;
}
public function callLater(_arg1:Function, _arg2:Array=null):void{
methodQueue.push(new MethodQueueElement(_arg1, _arg2));
var _local3:ISystemManager = systemManager;
if (((_local3) && (((_local3.stage) || (_local3.useSWFBridge()))))){
if (!listeningForRender){
_local3.addEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local3.addEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = true;
};
if (_local3.stage){
_local3.stage.invalidate();
};
};
}
public function get initialized():Boolean{
return (_initialized);
}
private function callLaterDispatcher2(_arg1:Event):void{
var _local6:MethodQueueElement;
if (UIComponentGlobals.callLaterSuspendCount > 0){
return;
};
var _local2:ISystemManager = systemManager;
if (((((_local2) && (((_local2.stage) || (_local2.useSWFBridge()))))) && (listeningForRender))){
_local2.removeEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local2.removeEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
var _local3:Array = methodQueue;
methodQueue = [];
var _local4:int = _local3.length;
var _local5:int;
while (_local5 < _local4) {
_local6 = MethodQueueElement(_local3[_local5]);
_local6.method.apply(null, _local6.args);
_local5++;
};
}
public function measureHTMLText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureHTMLText(_arg1));
}
public function set descriptor(_arg1:UIComponentDescriptor):void{
_descriptor = _arg1;
}
private function getState(_arg1:String):State{
if (((!(states)) || (isBaseState(_arg1)))){
return (null);
};
var _local2:int;
while (_local2 < states.length) {
if (states[_local2].name == _arg1){
return (states[_local2]);
};
_local2++;
};
var _local3:String = resourceManager.getString("core", "stateUndefined", [_arg1]);
throw (new ArgumentError(_local3));
}
public function validateProperties():void{
if (invalidatePropertiesFlag){
commitProperties();
invalidatePropertiesFlag = false;
};
}
mx_internal function get documentDescriptor():UIComponentDescriptor{
return (_documentDescriptor);
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("includeInLayoutChanged"));
};
}
public function getClassStyleDeclarations():Array{
var myApplicationDomain:ApplicationDomain;
var cache:Array;
var myRoot:DisplayObject;
var s:CSSStyleDeclaration;
var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(this);
if (factory != null){
myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
} else {
myRoot = SystemManager.getSWFRoot(this);
if (!myRoot){
return ([]);
};
myApplicationDomain = myRoot.loaderInfo.applicationDomain;
};
var className:String = getQualifiedClassName(this);
className = className.replace("::", ".");
cache = StyleManager.typeSelectorCache[className];
if (cache){
return (cache);
};
var decls:Array = [];
var classNames:Array = [];
var caches:Array = [];
var declcache:Array = [];
while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) {
cache = StyleManager.typeSelectorCache[className];
if (cache){
decls = decls.concat(cache);
break;
};
s = StyleManager.getStyleDeclaration(className);
if (s){
decls.unshift(s);
classNames.push(className);
caches.push(classNames);
declcache.push(decls);
decls = [];
classNames = [];
} else {
classNames.push(className);
};
try {
className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className));
className = className.replace("::", ".");
} catch(e:ReferenceError) {
className = null;
};
};
caches.push(classNames);
declcache.push(decls);
decls = [];
while (caches.length) {
classNames = caches.pop();
decls = decls.concat(declcache.pop());
while (classNames.length) {
StyleManager.typeSelectorCache[classNames.pop()] = decls;
};
};
return (decls);
}
public function set measuredMinWidth(_arg1:Number):void{
_measuredMinWidth = _arg1;
}
private function initializeState(_arg1:String):void{
var _local2:State = getState(_arg1);
while (_local2) {
_local2.initialize();
_local2 = getState(_local2.basedOn);
};
}
mx_internal function initProtoChain():void{
var _local1:CSSStyleDeclaration;
var _local7:Object;
var _local8:CSSStyleDeclaration;
if (styleName){
if ((styleName is CSSStyleDeclaration)){
_local1 = CSSStyleDeclaration(styleName);
} else {
if ((((styleName is IFlexDisplayObject)) || ((styleName is IStyleClient)))){
StyleProtoChain.initProtoChainForUIComponentStyleName(this);
return;
};
if ((styleName is String)){
_local1 = StyleManager.getStyleDeclaration(("." + styleName));
};
};
};
var _local2:Object = StyleManager.stylesRoot;
if (((_local2) && (_local2.effects))){
registerEffects(_local2.effects);
};
var _local3:IStyleClient = (parent as IStyleClient);
if (_local3){
_local7 = _local3.inheritingStyles;
if (_local7 == UIComponent.STYLE_UNINITIALIZED){
_local7 = _local2;
};
} else {
if (isPopUp){
if ((((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) && (_owner))) && ((_owner is IStyleClient)))){
_local7 = IStyleClient(_owner).inheritingStyles;
} else {
_local7 = ApplicationGlobals.application.inheritingStyles;
};
} else {
_local7 = StyleManager.stylesRoot;
};
};
var _local4:Array = getClassStyleDeclarations();
var _local5:int = _local4.length;
var _local6:int;
while (_local6 < _local5) {
_local8 = _local4[_local6];
_local7 = _local8.addStyleToProtoChain(_local7, this);
_local2 = _local8.addStyleToProtoChain(_local2, this);
if (_local8.effects){
registerEffects(_local8.effects);
};
_local6++;
};
if (_local1){
_local7 = _local1.addStyleToProtoChain(_local7, this);
_local2 = _local1.addStyleToProtoChain(_local2, this);
if (_local1.effects){
registerEffects(_local1.effects);
};
};
inheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local7, this) : _local7;
nonInheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local2, this) : _local2;
}
public function get repeaterIndices():Array{
return ((_repeaterIndices) ? _repeaterIndices.slice() : []);
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
$removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
private function focusObj_moveHandler(_arg1:MoveEvent):void{
adjustFocusRect();
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_styleDeclaration);
}
override public function get doubleClickEnabled():Boolean{
return (super.doubleClickEnabled);
}
public function contentToLocal(_arg1:Point):Point{
return (_arg1);
}
private function creationCompleteHandler(_arg1:FlexEvent):void{
if (_currentStateChanged){
_currentStateChanged = false;
commitCurrentState();
validateNow();
};
removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
}
public function set measuredHeight(_arg1:Number):void{
_measuredHeight = _arg1;
}
protected function createChildren():void{
}
public function get activeEffects():Array{
return (_effectsStarted);
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
if (((overlayReferenceCount) && (!((_arg1 == overlay))))){
_arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 2)));
};
super.setChildIndex(_arg1, _arg2);
}
public function regenerateStyleCache(_arg1:Boolean):void{
var _local5:DisplayObject;
initProtoChain();
var _local2:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this);
var _local3:int = _local2.numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = _local2.getChildAt(_local4);
if ((_local5 is IStyleClient)){
if (IStyleClient(_local5).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){
IStyleClient(_local5).regenerateStyleCache(_arg1);
};
} else {
if ((_local5 is IUITextField)){
if (IUITextField(_local5).inheritingStyles){
StyleProtoChain.initTextField(IUITextField(_local5));
};
};
};
_local4++;
};
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus(DisplayObject(_arg1.target))){
drawFocus(false);
};
}
public function getFocus():InteractiveObject{
var _local1:ISystemManager = systemManager;
if (!_local1){
return (null);
};
if (UIComponentGlobals.nextFocusObject){
return (UIComponentGlobals.nextFocusObject);
};
return (_local1.stage.focus);
}
public function endEffectsStarted():void{
var _local1:int = _effectsStarted.length;
var _local2:int;
while (_local2 < _local1) {
_effectsStarted[_local2].end();
_local2++;
};
}
protected function get unscaledHeight():Number{
return ((height / Math.abs(scaleY)));
}
public function get enabled():Boolean{
return (_enabled);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
override public function set cacheAsBitmap(_arg1:Boolean):void{
super.cacheAsBitmap = _arg1;
cacheAsBitmapCount = (_arg1) ? 1 : 0;
}
mx_internal function removeOverlay():void{
if ((((((overlayReferenceCount > 0)) && ((--overlayReferenceCount == 0)))) && (overlay))){
removeEventListener("resize", overlay_resizeHandler);
if (super.getChildByName("overlay")){
$removeChild(overlay);
};
overlay = null;
};
}
public function set cacheHeuristic(_arg1:Boolean):void{
if (_cachePolicy == UIComponentCachePolicy.AUTO){
if (_arg1){
cacheAsBitmapCount++;
} else {
if (cacheAsBitmapCount != 0){
cacheAsBitmapCount--;
};
};
super.cacheAsBitmap = !((cacheAsBitmapCount == 0));
};
}
public function get cachePolicy():String{
return (_cachePolicy);
}
public function set maxHeight(_arg1:Number):void{
if (explicitMaxHeight == _arg1){
return;
};
explicitMaxHeight = _arg1;
}
public function getConstraintValue(_arg1:String){
return (getStyle(_arg1));
}
public function set focusManager(_arg1:IFocusManager):void{
_focusManager = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function get descriptor():UIComponentDescriptor{
return (_descriptor);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function get cursorManager():ICursorManager{
var _local2:ICursorManager;
var _local1:DisplayObject = parent;
while (_local1) {
if ((((_local1 is IUIComponent)) && (("cursorManager" in _local1)))){
_local2 = _local1["cursorManager"];
return (_local2);
};
_local1 = _local1.parent;
};
return (CursorManager.getInstance());
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredMinWidth():Number{
return (_measuredMinWidth);
}
public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{
var _local2:Array;
var _local3:Object;
var _local4:int;
var _local5:int;
var _local6:PropertyChangeEvent;
var _local7:Object;
if (((id) && (!((id == ""))))){
_local2 = _instanceIndices;
if (!_local2){
_arg1[id] = this;
} else {
_local3 = _arg1[id];
if (!(_local3 is Array)){
_local3 = (_arg1[id] = []);
};
_local4 = _local2.length;
_local5 = 0;
while (_local5 < (_local4 - 1)) {
_local7 = _local3[_local2[_local5]];
if (!(_local7 is Array)){
_local7 = (_local3[_local2[_local5]] = []);
};
_local3 = _local7;
_local5++;
};
_local3[_local2[(_local4 - 1)]] = this;
_local6 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]);
_arg1.dispatchEvent(_local6);
};
};
}
public function get repeater():IRepeater{
return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null);
}
public function set isPopUp(_arg1:Boolean):void{
_isPopUp = _arg1;
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function initialize():void{
if (initialized){
return;
};
dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE));
createChildren();
childrenCreated();
initializeAccessibility();
initializationComplete();
}
override public function set width(_arg1:Number):void{
var _local2:IInvalidating;
if (explicitWidth != _arg1){
explicitWidth = _arg1;
invalidateSize();
};
if (_width != _arg1){
invalidateProperties();
invalidateDisplayList();
_local2 = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
_width = _arg1;
dispatchEvent(new Event("widthChanged"));
};
}
public function set percentHeight(_arg1:Number):void{
if (_percentHeight == _arg1){
return;
};
if (!isNaN(_arg1)){
_explicitHeight = NaN;
};
_percentHeight = _arg1;
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
}
final mx_internal function set $visible(_arg1:Boolean):void{
super.visible = _arg1;
}
private function findCommonBaseState(_arg1:String, _arg2:String):String{
var _local3:State = getState(_arg1);
var _local4:State = getState(_arg2);
if (((!(_local3)) || (!(_local4)))){
return ("");
};
if (((isBaseState(_local3.basedOn)) && (isBaseState(_local4.basedOn)))){
return ("");
};
var _local5:Array = getBaseStates(_local3);
var _local6:Array = getBaseStates(_local4);
var _local7 = "";
while (_local5[(_local5.length - 1)] == _local6[(_local6.length - 1)]) {
_local7 = _local5.pop();
_local6.pop();
if (((!(_local5.length)) || (!(_local6.length)))){
break;
};
};
if (((_local5.length) && ((_local5[(_local5.length - 1)] == _local4.name)))){
_local7 = _local4.name;
} else {
if (((_local6.length) && ((_local6[(_local6.length - 1)] == _local3.name)))){
_local7 = _local3.name;
};
};
return (_local7);
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
if (IUIComponent(_arg1).document != _arg1){
IUIComponent(_arg1).document = null;
};
IUIComponent(_arg1).parentChanged(null);
};
}
final mx_internal function $removeChildAt(_arg1:int):DisplayObject{
return (super.removeChildAt(_arg1));
}
public function get maxHeight():Number{
return ((isNaN(explicitMaxHeight)) ? DEFAULT_MAX_HEIGHT : explicitMaxHeight);
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function set explicitMaxHeight(_arg1:Number):void{
if (_explicitMaxHeight == _arg1){
return;
};
_explicitMaxHeight = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitMaxHeightChanged"));
}
public function get focusManager():IFocusManager{
if (_focusManager){
return (_focusManager);
};
var _local1:DisplayObject = parent;
while (_local1) {
if ((_local1 is IFocusManagerContainer)){
return (IFocusManagerContainer(_local1).focusManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED){
return;
};
regenerateStyleCache(true);
initThemeColor();
styleChanged("styleName");
notifyStyleChangeInChildren("styleName", true);
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
protected function get resourceManager():IResourceManager{
return (_resourceManager);
}
mx_internal function validateBaselinePosition():Boolean{
var _local1:Number;
var _local2:Number;
if (!parent){
return (false);
};
if ((((width == 0)) && ((height == 0)))){
validateNow();
_local1 = getExplicitOrMeasuredWidth();
_local2 = getExplicitOrMeasuredHeight();
setActualSize(_local1, _local2);
};
validateNow();
return (true);
}
mx_internal function cancelAllCallLaters():void{
var _local1:ISystemManager = systemManager;
if (((_local1) && (((_local1.stage) || (_local1.useSWFBridge()))))){
if (listeningForRender){
_local1.removeEventListener(FlexEvent.RENDER, callLaterDispatcher);
_local1.removeEventListener(FlexEvent.ENTER_FRAME, callLaterDispatcher);
listeningForRender = false;
};
};
methodQueue.splice(0);
}
private function updateCompleteHandler(_arg1:FlexEvent):void{
UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
processEffectFinished(_endingEffectInstances);
_endingEffectInstances = [];
}
public function styleChanged(_arg1:String):void{
if ((((this is IFontContextComponent)) && (hasFontContextChanged()))){
invalidateProperties();
};
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){
invalidateSize();
};
if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "themeColor")))){
initThemeColor();
};
invalidateDisplayList();
if ((parent is IInvalidating)){
if (StyleManager.isParentSizeInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateSize();
};
if (StyleManager.isParentDisplayListInvalidatingStyle(_arg1)){
IInvalidating(parent).invalidateDisplayList();
};
};
}
final mx_internal function get $visible():Boolean{
return (super.visible);
}
public function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null, _arg9:String=null, _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Matrix;
var _local16:Object;
var _local12:Graphics = graphics;
if (((!(_arg3)) || (!(_arg4)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is Array)){
if ((_arg7 is Array)){
_local14 = (_arg7 as Array);
} else {
_local14 = [_arg7, _arg7];
};
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local15 = null;
if (_arg8){
if ((_arg8 is Matrix)){
_local15 = Matrix(_arg8);
} else {
_local15 = new Matrix();
if ((_arg8 is Number)){
_local15.createGradientBox(_arg3, _arg4, ((Number(_arg8) * Math.PI) / 180), _arg1, _arg2);
} else {
_local15.createGradientBox(_arg8.w, _arg8.h, _arg8.r, _arg8.x, _arg8.y);
};
};
};
if (_arg9 == GradientType.RADIAL){
_local12.beginGradientFill(GradientType.RADIAL, (_arg6 as Array), _local14, _arg10, _local15);
} else {
_local12.beginGradientFill(GradientType.LINEAR, (_arg6 as Array), _local14, _arg10, _local15);
};
} else {
_local12.beginFill(Number(_arg6), Number(_arg7));
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local16 = _arg11.r;
if ((_local16 is Number)){
_local13 = (Number(_local16) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local16.tl, _local16.tr, _local16.bl, _local16.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function move(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_arg1 != super.x){
super.x = _arg1;
dispatchEvent(new Event("xChanged"));
_local3 = true;
};
if (_arg2 != super.y){
super.y = _arg2;
dispatchEvent(new Event("yChanged"));
_local3 = true;
};
if (_local3){
dispatchMoveEvent();
};
}
public function set toolTip(_arg1:String):void{
var _local2:String = _toolTip;
_toolTip = _arg1;
ToolTipManager.registerToolTip(this, _local2, _arg1);
dispatchEvent(new Event("toolTipChanged"));
}
public function set repeaters(_arg1:Array):void{
_repeaters = _arg1;
}
public function get explicitMaxHeight():Number{
return (_explicitMaxHeight);
}
public function measureText(_arg1:String):TextLineMetrics{
return (determineTextFormatFromStyles().measureText(_arg1));
}
public function get styleName():Object{
return (_styleName);
}
protected function createInModuleContext(_arg1:IFlexModuleFactory, _arg2:String):Object{
var _local3:Object;
if (_arg1){
_local3 = _arg1.create(_arg2);
};
return (_local3);
}
public function get parentDocument():Object{
var _local1:IUIComponent;
var _local2:ISystemManager;
if (document == this){
_local1 = (parent as IUIComponent);
if (_local1){
return (_local1.document);
};
_local2 = (parent as ISystemManager);
if (_local2){
return (_local2.document);
};
return (null);
//unresolved jump
};
return (document);
}
protected function childrenCreated():void{
invalidateProperties();
invalidateSize();
invalidateDisplayList();
}
public function set flexContextMenu(_arg1:IFlexContextMenu):void{
if (_flexContextMenu){
_flexContextMenu.unsetContextMenu(this);
};
_flexContextMenu = _arg1;
if (_arg1 != null){
_flexContextMenu.setContextMenu(this);
};
}
public function set explicitWidth(_arg1:Number):void{
if (_explicitWidth == _arg1){
return;
};
if (!isNaN(_arg1)){
_percentWidth = NaN;
};
_explicitWidth = _arg1;
invalidateSize();
var _local2:IInvalidating = (parent as IInvalidating);
if (((_local2) && (includeInLayout))){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
dispatchEvent(new Event("explicitWidthChanged"));
}
private function setBorderColorForErrorString():void{
if (((!(_errorString)) || ((_errorString.length == 0)))){
if (!isNaN(origBorderColor)){
setStyle("borderColor", origBorderColor);
saveBorderColor = true;
};
} else {
if (saveBorderColor){
saveBorderColor = false;
origBorderColor = getStyle("borderColor");
};
setStyle("borderColor", getStyle("errorColor"));
};
styleChanged("themeColor");
var _local1:IFocusManager = focusManager;
var _local2:DisplayObject = (_local1) ? DisplayObject(_local1.getFocus()) : null;
if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){
drawFocus(true);
};
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
if (!invalidateSizeFlag){
invalidateSizeFlag = true;
if (((parent) && (UIComponentGlobals.layoutManager))){
UIComponentGlobals.layoutManager.invalidateSize(this);
};
};
}
public function set measuredMinHeight(_arg1:Number):void{
_measuredMinHeight = _arg1;
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
override public function set filters(_arg1:Array):void{
var _local2:int;
var _local3:int;
var _local4:IEventDispatcher;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.removeEventListener("change", filterChangeHandler);
};
_local3++;
};
};
_filters = _arg1;
if (_filters){
_local2 = _filters.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (_filters[_local3] as IEventDispatcher);
if (_local4){
_local4.addEventListener("change", filterChangeHandler);
};
_local3++;
};
};
super.filters = _filters;
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
public static function resumeBackgroundProcessing():void{
var _local1:ISystemManager;
if (UIComponentGlobals.callLaterSuspendCount > 0){
UIComponentGlobals.callLaterSuspendCount--;
if (UIComponentGlobals.callLaterSuspendCount == 0){
_local1 = SystemManagerGlobals.topLevelSystemManagers[0];
if (((_local1) && (_local1.stage))){
_local1.stage.invalidate();
};
};
};
}
public static function suspendBackgroundProcessing():void{
UIComponentGlobals.callLaterSuspendCount++;
}
}
}//package mx.core
class MethodQueueElement {
public var method:Function;
public var args:Array;
private function MethodQueueElement(_arg1:Function, _arg2:Array=null){
this.method = _arg1;
this.args = _arg2;
}
}
Section 512
//UIComponentCachePolicy (mx.core.UIComponentCachePolicy)
package mx.core {
public final class UIComponentCachePolicy {
public static const AUTO:String = "auto";
public static const ON:String = "on";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const OFF:String = "off";
}
}//package mx.core
Section 513
//UIComponentDescriptor (mx.core.UIComponentDescriptor)
package mx.core {
public class UIComponentDescriptor extends ComponentDescriptor {
mx_internal var instanceIndices:Array;
public var stylesFactory:Function;
public var effects:Array;
mx_internal var repeaters:Array;
mx_internal var repeaterIndices:Array;
mx_internal static const VERSION:String = "3.3.0.4852";
public function UIComponentDescriptor(_arg1:Object){
super(_arg1);
}
override public function toString():String{
return (("UIComponentDescriptor_" + id));
}
}
}//package mx.core
Section 514
//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 515
//UITextField (mx.core.UITextField)
package mx.core {
import flash.events.*;
import flash.display.*;
import mx.styles.*;
import flash.text.*;
import flash.utils.*;
import mx.managers.*;
import mx.automation.*;
import mx.resources.*;
import mx.utils.*;
public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUITextField {
private var _enabled:Boolean;// = true
private var untruncatedText:String;
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var cachedTextFormat:TextFormat;
private var _automationDelegate:IAutomationObject;
private var _automationName:String;
private var _styleName:Object;
private var _document:Object;
mx_internal var _toolTip:String;
private var _nestLevel:int;// = 0
private var _explicitHeight:Number;
private var _moduleFactory:IFlexModuleFactory;
private var _initialized:Boolean;// = false
private var _nonInheritingStyles:Object;
private var _inheritingStyles:Object;
private var _includeInLayout:Boolean;// = true
private var invalidateDisplayListFlag:Boolean;// = true
mx_internal var explicitColor:uint;// = 4294967295
private var _processedDescriptors:Boolean;// = true
private var _updateCompletePendingFlag:Boolean;// = false
private var explicitHTMLText:String;// = null
mx_internal var _parent:DisplayObjectContainer;
private var _imeMode:String;// = null
private var resourceManager:IResourceManager;
mx_internal var styleChangedFlag:Boolean;// = true
private var _ignorePadding:Boolean;// = true
private var _owner:DisplayObjectContainer;
private var _explicitWidth:Number;
mx_internal static const TEXT_WIDTH_PADDING:int = 5;
mx_internal static const TEXT_HEIGHT_PADDING:int = 4;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var truncationIndicatorResource:String;
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
mx_internal static var debuggingBorders:Boolean = false;
public function UITextField(){
resourceManager = ResourceManager.getInstance();
_inheritingStyles = UIComponent.STYLE_UNINITIALIZED;
_nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED;
super();
super.text = "";
focusRect = false;
selectable = false;
tabEnabled = false;
if (debuggingBorders){
border = true;
};
if (!truncationIndicatorResource){
truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator");
};
addEventListener(Event.CHANGE, changeHandler);
addEventListener("textFieldStyleChange", textFieldStyleChangeHandler);
resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
public function get nestLevel():int{
return (_nestLevel);
}
private function textFieldStyleChangeHandler(_arg1:Event):void{
if (explicitHTMLText != null){
super.htmlText = explicitHTMLText;
};
}
public function truncateToFit(_arg1:String=null):Boolean{
var _local4:String;
if (!_arg1){
_arg1 = truncationIndicatorResource;
};
validateNow();
var _local2:String = super.text;
untruncatedText = _local2;
var _local3:Number = width;
if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > (_local3 + 1E-14))))){
var _local5 = _local2;
super.text = _local5;
_local4 = _local5;
_local2.slice(0, Math.floor(((_local3 / (textWidth + TEXT_WIDTH_PADDING)) * _local2.length)));
while ((((_local4.length > 1)) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))) {
_local4 = _local4.slice(0, -1);
super.text = (_local4 + _arg1);
};
return (true);
};
return (false);
}
public function set nestLevel(_arg1:int):void{
if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){
_nestLevel = _arg1;
StyleProtoChain.initTextField(this);
styleChangedFlag = true;
validateNow();
};
}
public function get minHeight():Number{
return (0);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
public function getStyle(_arg1:String){
if (StyleManager.inheritingStyles[_arg1]){
return ((inheritingStyles) ? inheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
//unresolved jump
};
return ((nonInheritingStyles) ? nonInheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1));
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function setColor(_arg1:uint):void{
explicitColor = _arg1;
styleChangedFlag = true;
invalidateDisplayListFlag = true;
validateNow();
}
override public function replaceText(_arg1:int, _arg2:int, _arg3:String):void{
super.replaceText(_arg1, _arg2, _arg3);
dispatchEvent(new Event("textReplace"));
}
private function creatingSystemManager():ISystemManager{
return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
public function get automationName():String{
if (_automationName){
return (_automationName);
};
if (automationDelegate){
return (automationDelegate.automationName);
};
return ("");
}
public function get explicitMinHeight():Number{
return (NaN);
}
public function get focusPane():Sprite{
return (null);
}
public function getTextStyles():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.align = getStyle("textAlign");
_local1.bold = (getStyle("fontWeight") == "bold");
if (enabled){
if (explicitColor == StyleManager.NOT_A_COLOR){
_local1.color = getStyle("color");
} else {
_local1.color = explicitColor;
};
} else {
_local1.color = getStyle("disabledColor");
};
_local1.font = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
_local1.indent = getStyle("textIndent");
_local1.italic = (getStyle("fontStyle") == "italic");
_local1.kerning = getStyle("kerning");
_local1.leading = getStyle("leading");
_local1.leftMargin = (ignorePadding) ? 0 : getStyle("paddingLeft");
_local1.letterSpacing = getStyle("letterSpacing");
_local1.rightMargin = (ignorePadding) ? 0 : getStyle("paddingRight");
_local1.size = getStyle("fontSize");
_local1.underline = (getStyle("textDecoration") == "underline");
cachedTextFormat = _local1;
return (_local1);
}
override public function set text(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((!(isHTML)) && ((super.text == _arg1)))){
return;
};
super.text = _arg1;
explicitHTMLText = null;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function get showInAutomationHierarchy():Boolean{
return (true);
}
public function set automationName(_arg1:String):void{
_automationName = _arg1;
}
public function get systemManager():ISystemManager{
var _local2:IUIComponent;
var _local1:DisplayObject = parent;
while (_local1) {
_local2 = (_local1 as IUIComponent);
if (_local2){
return (_local2.systemManager);
};
_local1 = _local1.parent;
};
return (null);
}
public function setStyle(_arg1:String, _arg2):void{
}
public function get percentWidth():Number{
return (NaN);
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function get baselinePosition():Number{
var _local1:TextLineMetrics;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local1 = getLineMetrics(0);
return (((height - 4) - _local1.descent));
};
if (!parent){
return (NaN);
};
var _local2 = (text == "");
if (_local2){
super.text = "Wj";
};
_local1 = getLineMetrics(0);
if (_local2){
super.text = "";
};
return ((2 + _local1.ascent));
}
public function set enabled(_arg1:Boolean):void{
mouseEnabled = _arg1;
_enabled = _arg1;
styleChanged("color");
}
public function get minWidth():Number{
return (0);
}
public function get automationValue():Array{
if (automationDelegate){
return (automationDelegate.automationValue);
};
return ([""]);
}
public function get tweeningProperties():Array{
return (null);
}
public function get measuredWidth():Number{
validateNow();
if (!stage){
return ((textWidth + TEXT_WIDTH_PADDING));
};
return (((textWidth * transform.concatenatedMatrix.d) + TEXT_WIDTH_PADDING));
}
public function set tweeningProperties(_arg1:Array):void{
}
public function createAutomationIDPart(_arg1:IAutomationObject):Object{
return (null);
}
override public function get parent():DisplayObjectContainer{
return ((_parent) ? _parent : super.parent);
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (width != _arg1){
width = _arg1;
};
if (height != _arg2){
height = _arg2;
};
}
public function get numAutomationChildren():int{
return (0);
}
public function set focusPane(_arg1:Sprite):void{
}
public function getAutomationChildAt(_arg1:int):IAutomationObject{
return (null);
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function get owner():DisplayObjectContainer{
return ((_owner) ? _owner : parent);
}
public function parentChanged(_arg1:DisplayObjectContainer):void{
if (!_arg1){
_parent = null;
_nestLevel = 0;
} else {
if ((_arg1 is IStyleClient)){
_parent = _arg1;
} else {
if ((_arg1 is SystemManager)){
_parent = _arg1;
} else {
_parent = _arg1.parent;
};
};
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function get maxWidth():Number{
return (UIComponent.DEFAULT_MAX_WIDTH);
}
private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function get initialized():Boolean{
return (_initialized);
}
public function invalidateDisplayList():void{
invalidateDisplayListFlag = true;
}
public function invalidateProperties():void{
}
override public function insertXMLText(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{
super.insertXMLText(_arg1, _arg2, _arg3, _arg4);
dispatchEvent(new Event("textInsert"));
}
public function set includeInLayout(_arg1:Boolean):void{
var _local2:IInvalidating;
if (_includeInLayout != _arg1){
_includeInLayout = _arg1;
_local2 = (parent as IInvalidating);
if (_local2){
_local2.invalidateSize();
_local2.invalidateDisplayList();
};
};
}
override public function set htmlText(_arg1:String):void{
if (!_arg1){
_arg1 = "";
};
if (((isHTML) && ((super.htmlText == _arg1)))){
return;
};
if (((cachedTextFormat) && ((styleSheet == null)))){
defaultTextFormat = cachedTextFormat;
};
super.htmlText = _arg1;
explicitHTMLText = _arg1;
if (invalidateDisplayListFlag){
validateNow();
};
}
public function set showInAutomationHierarchy(_arg1:Boolean):void{
}
private function resourceManager_changeHandler(_arg1:Event):void{
truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator");
if (untruncatedText != null){
super.text = untruncatedText;
truncateToFit();
};
}
public function set measuredMinWidth(_arg1:Number):void{
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
public function get explicitMinWidth():Number{
return (NaN);
}
public function set percentWidth(_arg1:Number):void{
}
public function get imeMode():String{
return (_imeMode);
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
public function set systemManager(_arg1:ISystemManager):void{
}
public function get explicitMaxWidth():Number{
return (NaN);
}
public function get document():Object{
return (_document);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
public function replayAutomatableEvent(_arg1:Event):Boolean{
if (automationDelegate){
return (automationDelegate.replayAutomatableEvent(_arg1));
};
return (false);
}
public function get enabled():Boolean{
return (_enabled);
}
public function set owner(_arg1:DisplayObjectContainer):void{
_owner = _arg1;
}
public function get automationTabularData():Object{
return (null);
}
public function set nonInheritingStyles(_arg1:Object):void{
_nonInheritingStyles = _arg1;
}
public function get includeInLayout():Boolean{
return (_includeInLayout);
}
public function get measuredMinWidth():Number{
return (0);
}
public function set isPopUp(_arg1:Boolean):void{
}
public function set automationDelegate(_arg1:Object):void{
_automationDelegate = (_arg1 as IAutomationObject);
}
public function get measuredHeight():Number{
validateNow();
if (!stage){
return ((textHeight + TEXT_HEIGHT_PADDING));
};
return (((textHeight * transform.concatenatedMatrix.a) + TEXT_HEIGHT_PADDING));
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function setFocus():void{
systemManager.stage.focus = this;
}
public function initialize():void{
}
public function set percentHeight(_arg1:Number):void{
}
public function resolveAutomationIDPart(_arg1:Object):Array{
return ([]);
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getUITextFormat():UITextFormat{
validateNow();
var _local1:UITextFormat = new UITextFormat(creatingSystemManager());
_local1.moduleFactory = moduleFactory;
_local1.copyFrom(getTextFormat());
_local1.antiAliasType = antiAliasType;
_local1.gridFitType = gridFitType;
_local1.sharpness = sharpness;
_local1.thickness = thickness;
return (_local1);
}
private function changeHandler(_arg1:Event):void{
explicitHTMLText = null;
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
public function get nonZeroTextHeight():Number{
var _local1:Number;
if (super.text == ""){
super.text = "Wj";
_local1 = textHeight;
super.text = "";
return (_local1);
};
return (textHeight);
}
public function owns(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void{
if (styleSheet){
return;
};
super.setTextFormat(_arg1, _arg2, _arg3);
dispatchEvent(new Event("textFormatChange"));
}
public function get nonInheritingStyles():Object{
return (_nonInheritingStyles);
}
public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{
this.visible = _arg1;
}
public function get maxHeight():Number{
return (UIComponent.DEFAULT_MAX_HEIGHT);
}
public function get automationDelegate():Object{
return (_automationDelegate);
}
public function get isPopUp():Boolean{
return (false);
}
public function set ignorePadding(_arg1:Boolean):void{
_ignorePadding = _arg1;
styleChanged(null);
}
public function set styleName(_arg1:Object):void{
if (_styleName === _arg1){
return;
};
_styleName = _arg1;
if (parent){
StyleProtoChain.initTextField(this);
styleChanged("styleName");
};
}
public function styleChanged(_arg1:String):void{
styleChangedFlag = true;
if (!invalidateDisplayListFlag){
invalidateDisplayListFlag = true;
if (("callLater" in parent)){
Object(parent).callLater(validateNow);
};
};
}
public function get percentHeight():Number{
return (NaN);
}
private function get isHTML():Boolean{
return (!((explicitHTMLText == null)));
}
public function get explicitMaxHeight():Number{
return (NaN);
}
public function get styleName():Object{
return (_styleName);
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function validateNow():void{
var _local1:TextFormat;
var _local2:EmbeddedFont;
var _local3:IFlexModuleFactory;
var _local4:ISystemManager;
if (!parent){
return;
};
if (((!(isNaN(explicitWidth))) && (!((super.width == explicitWidth))))){
super.width = ((explicitWidth)>4) ? explicitWidth : 4;
};
if (((!(isNaN(explicitHeight))) && (!((super.height == explicitHeight))))){
super.height = explicitHeight;
};
if (styleChangedFlag){
_local1 = getTextStyles();
if (_local1.font){
_local2 = getEmbeddedFont(_local1.font, _local1.bold, _local1.italic);
_local3 = embeddedFontRegistry.getAssociatedModuleFactory(_local2, moduleFactory);
if (_local3 != null){
embedFonts = true;
} else {
_local4 = creatingSystemManager();
embedFonts = ((!((_local4 == null))) && (_local4.isFontFaceEmbedded(_local1)));
};
} else {
embedFonts = getStyle("embedFonts");
};
if (getStyle("fontAntiAliasType") != undefined){
antiAliasType = getStyle("fontAntiAliasType");
gridFitType = getStyle("fontGridFitType");
sharpness = getStyle("fontSharpness");
thickness = getStyle("fontThickness");
};
if (!styleSheet){
super.setTextFormat(_local1);
defaultTextFormat = _local1;
};
dispatchEvent(new Event("textFieldStyleChange"));
};
styleChangedFlag = false;
invalidateDisplayListFlag = false;
}
public function set toolTip(_arg1:String):void{
var _local2:String = _toolTip;
_toolTip = _arg1;
ToolTipManager.registerToolTip(this, _local2, _arg1);
}
public function move(_arg1:Number, _arg2:Number):void{
if (this.x != _arg1){
this.x = _arg1;
};
if (this.y != _arg2){
this.y = _arg2;
};
}
public function get toolTip():String{
return (_toolTip);
}
public function get ignorePadding():Boolean{
return (_ignorePadding);
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
public function invalidateSize():void{
invalidateDisplayListFlag = true;
}
public function set measuredMinHeight(_arg1:Number):void{
}
public function get measuredMinHeight():Number{
return (0);
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
}
}//package mx.core
Section 516
//UITextFormat (mx.core.UITextFormat)
package mx.core {
import flash.text.*;
import mx.managers.*;
public class UITextFormat extends TextFormat {
private var systemManager:ISystemManager;
public var sharpness:Number;
public var gridFitType:String;
public var antiAliasType:String;
public var thickness:Number;
private var cachedEmbeddedFont:EmbeddedFont;// = null
private var _moduleFactory:IFlexModuleFactory;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
private static var _textFieldFactory:ITextFieldFactory;
public function UITextFormat(_arg1:ISystemManager, _arg2:String=null, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:Object=null, _arg12:Object=null, _arg13:Object=null, _arg14:Object=null){
this.systemManager = _arg1;
super(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14);
}
public function set moduleFactory(_arg1:IFlexModuleFactory):void{
_moduleFactory = _arg1;
}
mx_internal function copyFrom(_arg1:TextFormat):void{
font = _arg1.font;
size = _arg1.size;
color = _arg1.color;
bold = _arg1.bold;
italic = _arg1.italic;
underline = _arg1.underline;
url = _arg1.url;
target = _arg1.target;
align = _arg1.align;
leftMargin = _arg1.leftMargin;
rightMargin = _arg1.rightMargin;
indent = _arg1.indent;
leading = _arg1.leading;
letterSpacing = _arg1.letterSpacing;
blockIndent = _arg1.blockIndent;
bullet = _arg1.bullet;
display = _arg1.display;
indent = _arg1.indent;
kerning = _arg1.kerning;
tabStops = _arg1.tabStops;
}
private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{
if (cachedEmbeddedFont){
if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){
return (cachedEmbeddedFont);
};
};
cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3);
return (cachedEmbeddedFont);
}
public function measureText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{
return (measure(_arg1, false, _arg2));
}
private function measure(_arg1:String, _arg2:Boolean, _arg3:Boolean):TextLineMetrics{
if (!_arg1){
_arg1 = "";
};
var _local4:Boolean;
var _local5:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(font, bold, italic), moduleFactory);
_local4 = !((_local5 == null));
if (_local5 == null){
_local5 = systemManager;
};
var _local6:TextField;
_local6 = TextField(textFieldFactory.createTextField(_local5));
if (_arg2){
_local6.htmlText = "";
} else {
_local6.text = "";
};
_local6.defaultTextFormat = this;
if (font){
_local6.embedFonts = ((_local4) || (((!((systemManager == null))) && (systemManager.isFontFaceEmbedded(this)))));
} else {
_local6.embedFonts = false;
};
_local6.antiAliasType = antiAliasType;
_local6.gridFitType = gridFitType;
_local6.sharpness = sharpness;
_local6.thickness = thickness;
if (_arg2){
_local6.htmlText = _arg1;
} else {
_local6.text = _arg1;
};
var _local7:TextLineMetrics = _local6.getLineMetrics(0);
if (indent != null){
_local7.width = (_local7.width + indent);
};
if (_arg3){
_local7.width = Math.ceil(_local7.width);
_local7.height = Math.ceil(_local7.height);
};
return (_local7);
}
public function measureHTMLText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{
return (measure(_arg1, true, _arg2));
}
public function get moduleFactory():IFlexModuleFactory{
return (_moduleFactory);
}
private static function get embeddedFontRegistry():IEmbeddedFontRegistry{
if (!_embeddedFontRegistry){
_embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
};
return (_embeddedFontRegistry);
}
private static function get textFieldFactory():ITextFieldFactory{
if (!_textFieldFactory){
_textFieldFactory = ITextFieldFactory(Singleton.getInstance("mx.core::ITextFieldFactory"));
};
return (_textFieldFactory);
}
}
}//package mx.core
Section 517
//AddRemoveEffectTargetFilter (mx.effects.effectClasses.AddRemoveEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class AddRemoveEffectTargetFilter extends EffectTargetFilter {
public var add:Boolean;// = true
mx_internal static const VERSION:String = "3.3.0.4852";
public function AddRemoveEffectTargetFilter(){
filterProperties = ["parent"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
if (add){
return ((((_local5.start["parent"] == null)) && (!((_local5.end["parent"] == null)))));
};
return (((!((_local5.start["parent"] == null))) && ((_local5.end["parent"] == null))));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 518
//HideShowEffectTargetFilter (mx.effects.effectClasses.HideShowEffectTargetFilter)
package mx.effects.effectClasses {
import mx.effects.*;
public class HideShowEffectTargetFilter extends EffectTargetFilter {
public var show:Boolean;// = true
mx_internal static const VERSION:String = "3.3.0.4852";
public function HideShowEffectTargetFilter(){
filterProperties = ["visible"];
}
override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
return ((_local5.end["visible"] == show));
};
_local4++;
};
return (false);
}
}
}//package mx.effects.effectClasses
Section 519
//PropertyChanges (mx.effects.effectClasses.PropertyChanges)
package mx.effects.effectClasses {
public class PropertyChanges {
public var target:Object;
public var start:Object;
public var end:Object;
mx_internal static const VERSION:String = "3.3.0.4852";
public function PropertyChanges(_arg1:Object){
end = {};
start = {};
super();
this.target = _arg1;
}
}
}//package mx.effects.effectClasses
Section 520
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance)
package mx.effects.effectClasses {
import mx.core.*;
import mx.events.*;
import mx.effects.*;
public class TweenEffectInstance extends EffectInstance {
private var _seekTime:Number;// = 0
public var easingFunction:Function;
public var tween:Tween;
mx_internal var needToLayout:Boolean;// = false
mx_internal static const VERSION:String = "3.3.0.4852";
public function TweenEffectInstance(_arg1:Object){
super(_arg1);
}
override public function stop():void{
super.stop();
if (tween){
tween.stop();
};
}
mx_internal function applyTweenStartValues():void{
if (duration > 0){
onTweenUpdate(tween.getCurrentValue(0));
};
}
override public function get playheadTime():Number{
if (tween){
return ((tween.playheadTime + super.playheadTime));
};
return (0);
}
protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{
var _local6:Tween = new Tween(_arg1, _arg2, _arg3, _arg4, _arg5);
_local6.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
_local6.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
if (easingFunction != null){
_local6.easingFunction = easingFunction;
};
if (_seekTime > 0){
_local6.seek(_seekTime);
};
_local6.playReversed = playReversed;
return (_local6);
}
private function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
override public function end():void{
stopRepeat = true;
if (delayTimer){
delayTimer.reset();
};
if (tween){
tween.endTween();
tween = null;
};
}
override public function reverse():void{
super.reverse();
if (tween){
tween.reverse();
};
super.playReversed = !(playReversed);
}
override mx_internal function set playReversed(_arg1:Boolean):void{
super.playReversed = _arg1;
if (tween){
tween.playReversed = _arg1;
};
}
override public function resume():void{
super.resume();
if (tween){
tween.resume();
};
}
public function onTweenEnd(_arg1:Object):void{
onTweenUpdate(_arg1);
tween = null;
if (needToLayout){
UIComponentGlobals.layoutManager.validateNow();
};
finishRepeat();
}
public function onTweenUpdate(_arg1:Object):void{
}
override public function pause():void{
super.pause();
if (tween){
tween.pause();
};
}
public function seek(_arg1:Number):void{
if (tween){
tween.seek(_arg1);
} else {
_seekTime = _arg1;
};
}
}
}//package mx.effects.effectClasses
Section 521
//ZoomInstance (mx.effects.effectClasses.ZoomInstance)
package mx.effects.effectClasses {
import flash.events.*;
import mx.events.*;
import mx.effects.*;
public class ZoomInstance extends TweenEffectInstance {
private var newY:Number;
public var originY:Number;
private var origX:Number;
private var origY:Number;
public var originX:Number;
private var origPercentHeight:Number;
public var zoomWidthFrom:Number;
public var zoomWidthTo:Number;
private var newX:Number;
public var captureRollEvents:Boolean;
private var origPercentWidth:Number;
public var zoomHeightFrom:Number;
private var origScaleX:Number;
public var zoomHeightTo:Number;
private var origScaleY:Number;
private var scaledOriginX:Number;
private var scaledOriginY:Number;
private var show:Boolean;// = true
private var _mouseHasMoved:Boolean;// = false
mx_internal static const VERSION:String = "3.3.0.4852";
public function ZoomInstance(_arg1:Object){
super(_arg1);
}
override public function finishEffect():void{
if (captureRollEvents){
target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
super.finishEffect();
}
private function getScaleFromWidth(_arg1:Number):Number{
return ((_arg1 / (target.width / Math.abs(target.scaleX))));
}
override public function initEffect(_arg1:Event):void{
super.initEffect(_arg1);
if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){
show = false;
};
}
private function getScaleFromHeight(_arg1:Number):Number{
return ((_arg1 / (target.height / Math.abs(target.scaleY))));
}
private function applyPropertyChanges():void{
var _local2:Boolean;
var _local3:Boolean;
var _local1:PropertyChanges = propertyChanges;
if (_local1){
_local2 = false;
_local3 = false;
if (_local1.end["scaleX"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? target.scaleX : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? _local1.end["scaleX"] : zoomWidthTo;
_local3 = true;
};
if (_local1.end["scaleY"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? target.scaleY : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? _local1.end["scaleY"] : zoomHeightTo;
_local3 = true;
};
if (_local3){
return;
};
if (_local1.end["width"] !== undefined){
zoomWidthFrom = (isNaN(zoomWidthFrom)) ? getScaleFromWidth(target.width) : zoomWidthFrom;
zoomWidthTo = (isNaN(zoomWidthTo)) ? getScaleFromWidth(_local1.end["width"]) : zoomWidthTo;
_local2 = true;
};
if (_local1.end["height"] !== undefined){
zoomHeightFrom = (isNaN(zoomHeightFrom)) ? getScaleFromHeight(target.height) : zoomHeightFrom;
zoomHeightTo = (isNaN(zoomHeightTo)) ? getScaleFromHeight(_local1.end["height"]) : zoomHeightTo;
_local2 = true;
};
if (_local2){
return;
};
if (_local1.end["visible"] !== undefined){
show = _local1.end["visible"];
};
};
}
private function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_MOVE){
_mouseHasMoved = true;
} else {
if ((((_arg1.type == MouseEvent.ROLL_OUT)) || ((_arg1.type == MouseEvent.ROLL_OVER)))){
if (!_mouseHasMoved){
_arg1.stopImmediatePropagation();
};
_mouseHasMoved = false;
};
};
}
override public function play():void{
super.play();
applyPropertyChanges();
if (((((((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))) && (isNaN(zoomHeightFrom)))) && (isNaN(zoomHeightTo)))){
if (show){
zoomWidthFrom = (zoomHeightFrom = 0);
zoomWidthTo = target.scaleX;
zoomHeightTo = target.scaleY;
} else {
zoomWidthFrom = target.scaleX;
zoomHeightFrom = target.scaleY;
zoomWidthTo = (zoomHeightTo = 0);
};
} else {
if (((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))){
zoomWidthFrom = (zoomWidthTo = target.scaleX);
} else {
if (((isNaN(zoomHeightFrom)) && (isNaN(zoomHeightTo)))){
zoomHeightFrom = (zoomHeightTo = target.scaleY);
};
};
if (isNaN(zoomWidthFrom)){
zoomWidthFrom = target.scaleX;
} else {
if (isNaN(zoomWidthTo)){
zoomWidthTo = ((zoomWidthFrom)==1) ? 0 : 1;
};
};
if (isNaN(zoomHeightFrom)){
zoomHeightFrom = target.scaleY;
} else {
if (isNaN(zoomHeightTo)){
zoomHeightTo = ((zoomHeightFrom)==1) ? 0 : 1;
};
};
};
if (zoomWidthFrom < 0.01){
zoomWidthFrom = 0.01;
};
if (zoomWidthTo < 0.01){
zoomWidthTo = 0.01;
};
if (zoomHeightFrom < 0.01){
zoomHeightFrom = 0.01;
};
if (zoomHeightTo < 0.01){
zoomHeightTo = 0.01;
};
origScaleX = target.scaleX;
origScaleY = target.scaleY;
newX = (origX = target.x);
newY = (origY = target.y);
if (isNaN(originX)){
scaledOriginX = (target.width / 2);
} else {
scaledOriginX = (originX * origScaleX);
};
if (isNaN(originY)){
scaledOriginY = (target.height / 2);
} else {
scaledOriginY = (originY * origScaleY);
};
scaledOriginX = Number(scaledOriginX.toFixed(1));
scaledOriginY = Number(scaledOriginY.toFixed(1));
origPercentWidth = target.percentWidth;
if (!isNaN(origPercentWidth)){
target.width = target.width;
};
origPercentHeight = target.percentHeight;
if (!isNaN(origPercentHeight)){
target.height = target.height;
};
tween = createTween(this, [zoomWidthFrom, zoomHeightFrom], [zoomWidthTo, zoomHeightTo], duration);
if (captureRollEvents){
target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false);
target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false);
target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false);
};
}
override public function onTweenEnd(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
if (!isNaN(origPercentWidth)){
_local2 = target.width;
target.percentWidth = origPercentWidth;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._width = _local2;
};
};
if (!isNaN(origPercentHeight)){
_local3 = target.height;
target.percentHeight = origPercentHeight;
if (((target.parent) && ((target.parent.autoLayout == false)))){
target._height = _local3;
};
};
super.onTweenEnd(_arg1);
if (hideOnEffectEnd){
EffectManager.suspendEventHandling();
target.scaleX = origScaleX;
target.scaleY = origScaleY;
target.move(origX, origY);
EffectManager.resumeEventHandling();
};
}
override public function onTweenUpdate(_arg1:Object):void{
EffectManager.suspendEventHandling();
if (Math.abs((newX - target.x)) > 0.1){
origX = (origX + (Number(target.x.toFixed(1)) - newX));
};
if (Math.abs((newY - target.y)) > 0.1){
origY = (origY + (Number(target.y.toFixed(1)) - newY));
};
target.scaleX = _arg1[0];
target.scaleY = _arg1[1];
var _local2:Number = (_arg1[0] / origScaleX);
var _local3:Number = (_arg1[1] / origScaleY);
var _local4:Number = (scaledOriginX * _local2);
var _local5:Number = (scaledOriginY * _local3);
newX = ((scaledOriginX - _local4) + origX);
newY = ((scaledOriginY - _local5) + origY);
newX = Number(newX.toFixed(1));
newY = Number(newY.toFixed(1));
target.move(newX, newY);
if (tween){
tween.needToLayout = true;
} else {
needToLayout = true;
};
EffectManager.resumeEventHandling();
}
}
}//package mx.effects.effectClasses
Section 522
//Effect (mx.effects.Effect)
package mx.effects {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import mx.events.*;
import mx.managers.*;
import mx.effects.effectClasses.*;
public class Effect extends EventDispatcher implements IEffect {
private var _perElementOffset:Number;// = 0
private var _hideFocusRing:Boolean;// = false
private var _customFilter:EffectTargetFilter;
public var repeatCount:int;// = 1
public var suspendBackgroundProcessing:Boolean;// = false
public var startDelay:int;// = 0
private var _relevantProperties:Array;
private var _callValidateNow:Boolean;// = false
mx_internal var applyActualDimensions:Boolean;// = true
private var _filter:String;
private var _triggerEvent:Event;
private var _effectTargetHost:IEffectTargetHost;
mx_internal var durationExplicitlySet:Boolean;// = false
public var repeatDelay:int;// = 0
private var _targets:Array;
mx_internal var propertyChangesArray:Array;
mx_internal var filterObject:EffectTargetFilter;
protected var endValuesCaptured:Boolean;// = false
public var instanceClass:Class;
private var _duration:Number;// = 500
private var isPaused:Boolean;// = false
private var _relevantStyles:Array;
private var _instances:Array;
mx_internal static const VERSION:String = "3.3.0.4852";
public function Effect(_arg1:Object=null){
_instances = [];
instanceClass = IEffectInstance;
_relevantStyles = [];
_targets = [];
super();
this.target = _arg1;
}
public function get targets():Array{
return (_targets);
}
public function set targets(_arg1:Array):void{
var _local2:int = _arg1.length;
var _local3:int = (_local2 - 1);
while (_local3 > 0) {
if (_arg1[_local3] == null){
_arg1.splice(_local3, 1);
};
_local3--;
};
_targets = _arg1;
}
public function set hideFocusRing(_arg1:Boolean):void{
_hideFocusRing = _arg1;
}
public function get hideFocusRing():Boolean{
return (_hideFocusRing);
}
public function stop():void{
var _local3:IEffectInstance;
var _local1:int = _instances.length;
var _local2:int = _local1;
while (_local2 >= 0) {
_local3 = IEffectInstance(_instances[_local2]);
if (_local3){
_local3.stop();
};
_local2--;
};
}
public function captureStartValues():void{
var _local1:int;
var _local2:int;
if (targets.length > 0){
propertyChangesArray = [];
_callValidateNow = true;
_local1 = targets.length;
_local2 = 0;
while (_local2 < _local1) {
propertyChangesArray.push(new PropertyChanges(targets[_local2]));
_local2++;
};
propertyChangesArray = captureValues(propertyChangesArray, true);
};
endValuesCaptured = false;
}
mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{
var _local4:Object;
var _local5:Object;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local3:Array = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties;
if (((_local3) && ((_local3.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local3.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]);
_local9++;
};
_local7++;
};
};
var _local10:Array = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles;
if (((_local10) && ((_local10.length > 0)))){
_local6 = _arg1.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _arg1[_local7].target;
_local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end;
_local8 = _local10.length;
_local9 = 0;
while (_local9 < _local8) {
_local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]);
_local9++;
};
_local7++;
};
};
return (_arg1);
}
protected function getValueFromTarget(_arg1:Object, _arg2:String){
if ((_arg2 in _arg1)){
return (_arg1[_arg2]);
};
return (undefined);
}
public function set target(_arg1:Object):void{
_targets.splice(0);
if (_arg1){
_targets[0] = _arg1;
};
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function set perElementOffset(_arg1:Number):void{
_perElementOffset = _arg1;
}
public function resume():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (isPaused))){
isPaused = false;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).resume();
_local2++;
};
};
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
public function play(_arg1:Array=null, _arg2:Boolean=false):Array{
var _local6:IEffectInstance;
if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){
if (_callValidateNow){
LayoutManager.getInstance().validateNow();
};
if (!endValuesCaptured){
propertyChangesArray = captureValues(propertyChangesArray, false);
};
propertyChangesArray = stripUnchangedValues(propertyChangesArray);
applyStartValues(propertyChangesArray, this.targets);
};
var _local3:Array = createInstances(_arg1);
var _local4:int = _local3.length;
var _local5:int;
while (_local5 < _local4) {
_local6 = IEffectInstance(_local3[_local5]);
Object(_local6).playReversed = _arg2;
_local6.startEffect();
_local5++;
};
return (_local3);
}
public function captureEndValues():void{
propertyChangesArray = captureValues(propertyChangesArray, false);
endValuesCaptured = true;
}
protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{
if (filterObject){
return (filterObject.filterInstance(_arg1, effectTargetHost, _arg2));
};
return (true);
}
public function get customFilter():EffectTargetFilter{
return (_customFilter);
}
public function get effectTargetHost():IEffectTargetHost{
return (_effectTargetHost);
}
public function set relevantProperties(_arg1:Array):void{
_relevantProperties = _arg1;
}
public function captureMoreStartValues(_arg1:Array):void{
var _local2:Array;
var _local3:int;
if (_arg1.length > 0){
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local2.push(new PropertyChanges(_arg1[_local3]));
_local3++;
};
_local2 = captureValues(_local2, true);
propertyChangesArray = propertyChangesArray.concat(_local2);
};
}
public function deleteInstance(_arg1:IEffectInstance):void{
EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
var _local2:int = _instances.length;
var _local3:int;
while (_local3 < _local2) {
if (_instances[_local3] === _arg1){
_instances.splice(_local3, 1);
};
_local3++;
};
}
public function get filter():String{
return (_filter);
}
public function set triggerEvent(_arg1:Event):void{
_triggerEvent = _arg1;
}
public function get target():Object{
if (_targets.length > 0){
return (_targets[0]);
};
return (null);
}
public function get duration():Number{
return (_duration);
}
public function set customFilter(_arg1:EffectTargetFilter):void{
_customFilter = _arg1;
filterObject = _arg1;
}
public function get perElementOffset():Number{
return (_perElementOffset);
}
public function set effectTargetHost(_arg1:IEffectTargetHost):void{
_effectTargetHost = _arg1;
}
public function get isPlaying():Boolean{
return (((_instances) && ((_instances.length > 0))));
}
protected function effectEndHandler(_arg1:EffectEvent):void{
var _local2:IEffectInstance = IEffectInstance(_arg1.effectInstance);
deleteInstance(_local2);
dispatchEvent(_arg1);
}
public function get relevantProperties():Array{
if (_relevantProperties){
return (_relevantProperties);
};
return (getAffectedProperties());
}
public function createInstance(_arg1:Object=null):IEffectInstance{
var _local6:int;
var _local7:int;
if (!_arg1){
_arg1 = this.target;
};
var _local2:IEffectInstance;
var _local3:PropertyChanges;
var _local4:Boolean;
var _local5:Boolean;
if (propertyChangesArray){
_local5 = true;
_local4 = filterInstance(propertyChangesArray, _arg1);
};
if (_local4){
_local2 = IEffectInstance(new instanceClass(_arg1));
initInstance(_local2);
if (_local5){
_local6 = propertyChangesArray.length;
_local7 = 0;
while (_local7 < _local6) {
if (propertyChangesArray[_local7].target == _arg1){
_local2.propertyChanges = propertyChangesArray[_local7];
};
_local7++;
};
};
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_START, effectStartHandler);
EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
_instances.push(_local2);
if (triggerEvent){
_local2.initEffect(triggerEvent);
};
};
return (_local2);
}
protected function effectStartHandler(_arg1:EffectEvent):void{
dispatchEvent(_arg1);
}
public function getAffectedProperties():Array{
return ([]);
}
public function set relevantStyles(_arg1:Array):void{
_relevantStyles = _arg1;
}
public function get triggerEvent():Event{
return (_triggerEvent);
}
protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{
var target = _arg1;
var property = _arg2;
var value = _arg3;
var props = _arg4;
if ((property in target)){
try {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "height")))){
target.setActualSize(target.width, value);
} else {
if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "width")))){
target.setActualSize(value, target.height);
} else {
target[property] = value;
};
};
} catch(e:Error) {
};
};
}
protected function initInstance(_arg1:IEffectInstance):void{
_arg1.duration = duration;
Object(_arg1).durationExplicitlySet = durationExplicitlySet;
_arg1.effect = this;
_arg1.effectTargetHost = effectTargetHost;
_arg1.hideFocusRing = hideFocusRing;
_arg1.repeatCount = repeatCount;
_arg1.repeatDelay = repeatDelay;
_arg1.startDelay = startDelay;
_arg1.suspendBackgroundProcessing = suspendBackgroundProcessing;
}
mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{
var _local6:int;
var _local7:int;
var _local8:Object;
var _local9:Boolean;
var _local3:Array = relevantProperties;
var _local4:int = _arg1.length;
var _local5:int;
while (_local5 < _local4) {
_local8 = _arg1[_local5].target;
_local9 = false;
_local6 = _arg2.length;
_local7 = 0;
while (_local7 < _local6) {
if (_arg2[_local7] == _local8){
_local9 = filterInstance(_arg1, _local8);
break;
};
_local7++;
};
if (_local9){
_local6 = _local3.length;
_local7 = 0;
while (_local7 < _local6) {
if ((((_local3[_local7] in _arg1[_local5].start)) && ((_local3[_local7] in _local8)))){
applyValueToTarget(_local8, _local3[_local7], _arg1[_local5].start[_local3[_local7]], _arg1[_local5].start);
};
_local7++;
};
_local6 = relevantStyles.length;
_local7 = 0;
while (_local7 < _local6) {
if ((relevantStyles[_local7] in _arg1[_local5].start)){
_local8.setStyle(relevantStyles[_local7], _arg1[_local5].start[relevantStyles[_local7]]);
};
_local7++;
};
};
_local5++;
};
}
public function end(_arg1:IEffectInstance=null):void{
var _local2:int;
var _local3:int;
var _local4:IEffectInstance;
if (_arg1){
_arg1.end();
} else {
_local2 = _instances.length;
_local3 = _local2;
while (_local3 >= 0) {
_local4 = IEffectInstance(_instances[_local3]);
if (_local4){
_local4.end();
};
_local3--;
};
};
}
public function get relevantStyles():Array{
return (_relevantStyles);
}
public function createInstances(_arg1:Array=null):Array{
var _local6:IEffectInstance;
if (!_arg1){
_arg1 = this.targets;
};
var _local2:Array = [];
var _local3:int = _arg1.length;
var _local4:Number = 0;
var _local5:int;
while (_local5 < _local3) {
_local6 = createInstance(_arg1[_local5]);
if (_local6){
_local6.startDelay = (_local6.startDelay + _local4);
_local4 = (_local4 + perElementOffset);
_local2.push(_local6);
};
_local5++;
};
triggerEvent = null;
return (_local2);
}
public function pause():void{
var _local1:int;
var _local2:int;
if (((isPlaying) && (!(isPaused)))){
isPaused = true;
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).pause();
_local2++;
};
};
}
public function set filter(_arg1:String):void{
if (!customFilter){
_filter = _arg1;
switch (_arg1){
case "add":
case "remove":
filterObject = new AddRemoveEffectTargetFilter();
AddRemoveEffectTargetFilter(filterObject).add = (_arg1 == "add");
break;
case "hide":
case "show":
filterObject = new HideShowEffectTargetFilter();
HideShowEffectTargetFilter(filterObject).show = (_arg1 == "show");
break;
case "move":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["x", "y"];
break;
case "resize":
filterObject = new EffectTargetFilter();
filterObject.filterProperties = ["width", "height"];
break;
case "addItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {added:true};
break;
case "removeItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {removed:true};
break;
case "replacedItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {replaced:true};
break;
case "replacementItem":
filterObject = new EffectTargetFilter();
filterObject.requiredSemantics = {replacement:true};
break;
default:
filterObject = null;
break;
};
};
}
public function reverse():void{
var _local1:int;
var _local2:int;
if (isPlaying){
_local1 = _instances.length;
_local2 = 0;
while (_local2 < _local1) {
IEffectInstance(_instances[_local2]).reverse();
_local2++;
};
};
}
private static function mergeArrays(_arg1:Array, _arg2:Array):Array{
var _local3:int;
var _local4:Boolean;
var _local5:int;
if (_arg2){
_local3 = 0;
while (_local3 < _arg2.length) {
_local4 = true;
_local5 = 0;
while (_local5 < _arg1.length) {
if (_arg1[_local5] == _arg2[_local3]){
_local4 = false;
break;
};
_local5++;
};
if (_local4){
_arg1.push(_arg2[_local3]);
};
_local3++;
};
};
return (_arg1);
}
private static function stripUnchangedValues(_arg1:Array):Array{
var _local3:Object;
var _local2:int;
while (_local2 < _arg1.length) {
for (_local3 in _arg1[_local2].start) {
if ((((_arg1[_local2].start[_local3] == _arg1[_local2].end[_local3])) || ((((((((typeof(_arg1[_local2].start[_local3]) == "number")) && ((typeof(_arg1[_local2].end[_local3]) == "number")))) && (isNaN(_arg1[_local2].start[_local3])))) && (isNaN(_arg1[_local2].end[_local3])))))){
delete _arg1[_local2].start[_local3];
delete _arg1[_local2].end[_local3];
};
};
_local2++;
};
return (_arg1);
}
}
}//package mx.effects
Section 523
//EffectInstance (mx.effects.EffectInstance)
package mx.effects {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import mx.events.*;
import mx.effects.effectClasses.*;
public class EffectInstance extends EventDispatcher implements IEffectInstance {
private var _hideFocusRing:Boolean;
private var delayStartTime:Number;// = 0
mx_internal var stopRepeat:Boolean;// = false
private var playCount:int;// = 0
private var _repeatCount:int;// = 0
private var _suspendBackgroundProcessing:Boolean;// = false
mx_internal var delayTimer:Timer;
private var _triggerEvent:Event;
private var _effectTargetHost:IEffectTargetHost;
mx_internal var parentCompositeEffectInstance:EffectInstance;
mx_internal var durationExplicitlySet:Boolean;// = false
private var _effect:IEffect;
private var _target:Object;
mx_internal var hideOnEffectEnd:Boolean;// = false
private var _startDelay:int;// = 0
private var delayElapsedTime:Number;// = 0
private var _repeatDelay:int;// = 0
private var _propertyChanges:PropertyChanges;
private var _duration:Number;// = 500
private var _playReversed:Boolean;
mx_internal static const VERSION:String = "3.3.0.4852";
public function EffectInstance(_arg1:Object){
this.target = _arg1;
}
public function get playheadTime():Number{
return ((((Math.max((playCount - 1), 0) * duration) + (Math.max((playCount - 2), 0) * repeatDelay)) + (playReversed) ? 0 : startDelay));
}
public function get hideFocusRing():Boolean{
return (_hideFocusRing);
}
public function stop():void{
if (delayTimer){
delayTimer.reset();
};
stopRepeat = true;
finishEffect();
}
public function finishEffect():void{
playCount = 0;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this));
};
if ((target is UIComponent)){
UIComponent(target).effectFinished(this);
};
EffectManager.effectFinished(this);
}
public function set hideFocusRing(_arg1:Boolean):void{
_hideFocusRing = _arg1;
}
public function finishRepeat():void{
if (((((!(stopRepeat)) && (!((playCount == 0))))) && ((((playCount < repeatCount)) || ((repeatCount == 0)))))){
if (repeatDelay > 0){
delayTimer = new Timer(repeatDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
} else {
finishEffect();
};
}
mx_internal function get playReversed():Boolean{
return (_playReversed);
}
public function set effect(_arg1:IEffect):void{
_effect = _arg1;
}
public function get className():String{
var _local1:String = getQualifiedClassName(this);
var _local2:int = _local1.indexOf("::");
if (_local2 != -1){
_local1 = _local1.substr((_local2 + 2));
};
return (_local1);
}
public function set duration(_arg1:Number):void{
durationExplicitlySet = true;
_duration = _arg1;
}
mx_internal function set playReversed(_arg1:Boolean):void{
_playReversed = _arg1;
}
public function resume():void{
if (((((delayTimer) && (!(delayTimer.running)))) && (!(isNaN(delayElapsedTime))))){
delayTimer.delay = (playReversed) ? delayElapsedTime : (delayTimer.delay - delayElapsedTime);
delayTimer.start();
};
}
public function get propertyChanges():PropertyChanges{
return (_propertyChanges);
}
public function set target(_arg1:Object):void{
_target = _arg1;
}
public function get repeatCount():int{
return (_repeatCount);
}
mx_internal function playWithNoDuration():void{
duration = 0;
repeatCount = 1;
repeatDelay = 0;
startDelay = 0;
startEffect();
}
public function get startDelay():int{
return (_startDelay);
}
mx_internal function get actualDuration():Number{
var _local1:Number = NaN;
if (repeatCount > 0){
_local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay);
};
return (_local1);
}
public function play():void{
playCount++;
dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
if (target){
target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this));
};
}
public function get suspendBackgroundProcessing():Boolean{
return (_suspendBackgroundProcessing);
}
public function get effectTargetHost():IEffectTargetHost{
return (_effectTargetHost);
}
public function set repeatDelay(_arg1:int):void{
_repeatDelay = _arg1;
}
public function set propertyChanges(_arg1:PropertyChanges):void{
_propertyChanges = _arg1;
}
mx_internal function eventHandler(_arg1:Event):void{
if ((((_arg1.type == FlexEvent.SHOW)) && ((hideOnEffectEnd == true)))){
hideOnEffectEnd = false;
_arg1.target.removeEventListener(FlexEvent.SHOW, eventHandler);
};
}
public function set repeatCount(_arg1:int):void{
_repeatCount = _arg1;
}
private function delayTimerHandler(_arg1:TimerEvent):void{
delayTimer.reset();
delayStartTime = NaN;
delayElapsedTime = NaN;
play();
}
public function set suspendBackgroundProcessing(_arg1:Boolean):void{
_suspendBackgroundProcessing = _arg1;
}
public function set triggerEvent(_arg1:Event):void{
_triggerEvent = _arg1;
}
public function set startDelay(_arg1:int):void{
_startDelay = _arg1;
}
public function get effect():IEffect{
return (_effect);
}
public function set effectTargetHost(_arg1:IEffectTargetHost):void{
_effectTargetHost = _arg1;
}
public function get target():Object{
return (_target);
}
public function startEffect():void{
EffectManager.effectStarted(this);
if ((target is UIComponent)){
UIComponent(target).effectStarted(this);
};
if ((((startDelay > 0)) && (!(playReversed)))){
delayTimer = new Timer(startDelay, 1);
delayStartTime = getTimer();
delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler);
delayTimer.start();
} else {
play();
};
}
public function get repeatDelay():int{
return (_repeatDelay);
}
public function get duration():Number{
if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){
return (parentCompositeEffectInstance.duration);
};
return (_duration);
}
public function initEffect(_arg1:Event):void{
triggerEvent = _arg1;
switch (_arg1.type){
case "resizeStart":
case "resizeEnd":
if (!durationExplicitlySet){
duration = 250;
};
break;
case FlexEvent.HIDE:
target.setVisible(true, true);
hideOnEffectEnd = true;
target.addEventListener(FlexEvent.SHOW, eventHandler);
break;
};
}
public function get triggerEvent():Event{
return (_triggerEvent);
}
public function end():void{
if (delayTimer){
delayTimer.reset();
};
stopRepeat = true;
finishEffect();
}
public function reverse():void{
if (repeatCount > 0){
playCount = ((repeatCount - playCount) + 1);
};
}
public function pause():void{
if (((((delayTimer) && (delayTimer.running))) && (!(isNaN(delayStartTime))))){
delayTimer.stop();
delayElapsedTime = (getTimer() - delayStartTime);
};
}
}
}//package mx.effects
Section 524
//EffectManager (mx.effects.EffectManager)
package mx.effects {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import mx.events.*;
import mx.resources.*;
public class EffectManager extends EventDispatcher {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var _resourceManager:IResourceManager;
private static var effects:Dictionary = new Dictionary(true);
mx_internal static var effectsPlaying:Array = [];
private static var targetsInfo:Array = [];
private static var effectTriggersForEvent:Object = {};
mx_internal static var lastEffectCreated:Effect;
private static var eventHandlingSuspendCount:Number = 0;
private static var eventsForEffectTriggers:Object = {};
public static function suspendEventHandling():void{
eventHandlingSuspendCount++;
}
mx_internal static function registerEffectTrigger(_arg1:String, _arg2:String):void{
var _local3:Number;
if (_arg1 != ""){
if (_arg2 == ""){
_local3 = _arg1.length;
if ((((_local3 > 6)) && ((_arg1.substring((_local3 - 6)) == "Effect")))){
_arg2 = _arg1.substring(0, (_local3 - 6));
};
};
if (_arg2 != ""){
effectTriggersForEvent[_arg2] = _arg1;
eventsForEffectTriggers[_arg1] = _arg2;
};
};
}
private static function removedEffectHandler(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:int, _arg4:Event):void{
suspendEventHandling();
_arg2.addChildAt(_arg1, _arg3);
resumeEventHandling();
createAndPlayEffect(_arg4, _arg1);
}
private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local9:String;
var _local10:String;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:EffectInstance;
var _local3:Effect = createEffectForType(_arg2, _arg1.type);
if (!_local3){
return;
};
if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){
_local9 = resourceManager.getString("effects", "incorrectTrigger");
throw (new Error(_local9));
};
if (_arg2.initialized == false){
_local10 = _arg1.type;
if ((((((((((_local10 == MoveEvent.MOVE)) || ((_local10 == ResizeEvent.RESIZE)))) || ((_local10 == FlexEvent.SHOW)))) || ((_local10 == FlexEvent.HIDE)))) || ((_local10 == Event.CHANGE)))){
_local3 = null;
return;
};
};
if ((_local3.target is IUIComponent)){
_local11 = IUIComponent(_local3.target).tweeningProperties;
if (((_local11) && ((_local11.length > 0)))){
_local12 = _local3.getAffectedProperties();
_local4 = _local11.length;
_local6 = _local12.length;
_local5 = 0;
while (_local5 < _local4) {
_local7 = 0;
while (_local7 < _local6) {
if (_local11[_local5] == _local12[_local7]){
_local3 = null;
return;
};
_local7++;
};
_local5++;
};
};
};
if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){
_local13 = _local3.getAffectedProperties();
_local5 = 0;
while (_local5 < _local13.length) {
_local14 = _local3.target.getEffectsForProperty(_local13[_local5]);
if (_local14.length > 0){
if (_arg1.type == ResizeEvent.RESIZE){
return;
};
_local7 = 0;
while (_local7 < _local14.length) {
_local15 = _local14[_local7];
if ((((_arg1.type == FlexEvent.SHOW)) && (_local15.hideOnEffectEnd))){
_local15.target.removeEventListener(FlexEvent.SHOW, _local15.eventHandler);
_local15.hideOnEffectEnd = false;
};
_local15.end();
_local7++;
};
};
_local5++;
};
};
_local3.triggerEvent = _arg1;
_local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler);
lastEffectCreated = _local3;
var _local8:Array = _local3.play();
_local4 = _local8.length;
_local5 = 0;
while (_local5 < _local4) {
effectsPlaying.push(new EffectNode(_local3, _local8[_local5]));
_local5++;
};
if (_local3.suspendBackgroundProcessing){
UIComponent.suspendBackgroundProcessing();
};
}
public static function endEffectsForTarget(_arg1:IUIComponent):void{
var _local4:EffectInstance;
var _local2:int = effectsPlaying.length;
var _local3:int = (_local2 - 1);
while (_local3 >= 0) {
_local4 = effectsPlaying[_local3].instance;
if (_local4.target == _arg1){
_local4.end();
};
_local3--;
};
}
private static function cacheOrUncacheTargetAsBitmap(_arg1:IUIComponent, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:int;
var _local5:int;
var _local6:Object;
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
_local6 = targetsInfo[_local5];
break;
};
_local5++;
};
if (!_local6){
_local6 = {target:_arg1, bitmapEffectsCount:0, vectorEffectsCount:0};
targetsInfo.push(_local6);
};
if (_arg2){
if (_arg3){
_local6.bitmapEffectsCount++;
if ((((_local6.vectorEffectsCount == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
} else {
if ((((((_local6.vectorEffectsCount++ == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))) && ((IDeferredInstantiationUIComponent(_arg1).cachePolicy == UIComponentCachePolicy.AUTO)))){
_arg1.cacheAsBitmap = false;
};
};
} else {
if (_arg3){
if (_local6.bitmapEffectsCount != 0){
_local6.bitmapEffectsCount--;
};
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = false;
};
} else {
if (_local6.vectorEffectsCount != 0){
if ((((--_local6.vectorEffectsCount == 0)) && (!((_local6.bitmapEffectsCount == 0))))){
_local4 = _local6.bitmapEffectsCount;
_local5 = 0;
while (_local5 < _local4) {
if ((_arg1 is IDeferredInstantiationUIComponent)){
IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true;
};
_local5++;
};
};
};
};
if ((((_local6.bitmapEffectsCount == 0)) && ((_local6.vectorEffectsCount == 0)))){
_local4 = targetsInfo.length;
_local5 = 0;
while (_local5 < _local4) {
if (targetsInfo[_local5].target == _arg1){
targetsInfo.splice(_local5, 1);
break;
};
_local5++;
};
};
};
}
mx_internal static function eventHandler(_arg1:Event):void{
var _local2:FocusEvent;
var _local3:DisplayObject;
var _local4:int;
var _local5:DisplayObjectContainer;
var _local6:int;
if (!(_arg1.currentTarget is IFlexDisplayObject)){
return;
};
if (eventHandlingSuspendCount > 0){
return;
};
if ((((_arg1 is FocusEvent)) && ((((_arg1.type == FocusEvent.FOCUS_OUT)) || ((_arg1.type == FocusEvent.FOCUS_IN)))))){
_local2 = FocusEvent(_arg1);
if (((_local2.relatedObject) && (((_local2.currentTarget.contains(_local2.relatedObject)) || ((_local2.currentTarget == _local2.relatedObject)))))){
return;
};
};
if ((((((_arg1.type == Event.ADDED)) || ((_arg1.type == Event.REMOVED)))) && (!((_arg1.target == _arg1.currentTarget))))){
return;
};
if (_arg1.type == Event.REMOVED){
if ((_arg1.target is UIComponent)){
if (UIComponent(_arg1.target).initialized == false){
return;
};
if (UIComponent(_arg1.target).isEffectStarted){
_local4 = 0;
while (_local4 < UIComponent(_arg1.target)._effectsStarted.length) {
if (UIComponent(_arg1.target)._effectsStarted[_local4].triggerEvent.type == Event.REMOVED){
return;
};
_local4++;
};
};
};
_local3 = (_arg1.target as DisplayObject);
if (_local3 != null){
_local5 = (_local3.parent as DisplayObjectContainer);
if (_local5 != null){
_local6 = _local5.getChildIndex(_local3);
if (_local6 >= 0){
if ((_local3 is UIComponent)){
UIComponent(_local3).callLater(removedEffectHandler, [_local3, _local5, _local6, _arg1]);
};
};
};
};
} else {
createAndPlayEffect(_arg1, _arg1.currentTarget);
};
}
mx_internal static function endBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, true);
}
private static function animateSameProperty(_arg1:Effect, _arg2:Effect, _arg3:EffectInstance):Boolean{
var _local4:Array;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
if (_arg1.target == _arg3.target){
_local4 = _arg1.getAffectedProperties();
_local5 = _arg2.getAffectedProperties();
_local6 = _local4.length;
_local7 = _local5.length;
_local8 = 0;
while (_local8 < _local6) {
_local9 = 0;
while (_local9 < _local7) {
if (_local4[_local8] == _local5[_local9]){
return (true);
};
_local9++;
};
_local8++;
};
};
return (false);
}
mx_internal static function effectFinished(_arg1:EffectInstance):void{
delete effects[_arg1];
}
mx_internal static function effectsInEffect():Boolean{
var _local1:*;
for (_local1 in effects) {
return (true);
};
return (false);
}
mx_internal static function effectEndHandler(_arg1:EffectEvent):void{
var _local5:DisplayObject;
var _local6:DisplayObjectContainer;
var _local2:IEffectInstance = _arg1.effectInstance;
var _local3:int = effectsPlaying.length;
var _local4:int = (_local3 - 1);
while (_local4 >= 0) {
if (effectsPlaying[_local4].instance == _local2){
effectsPlaying.splice(_local4, 1);
break;
};
_local4--;
};
if (Object(_local2).hideOnEffectEnd == true){
_local2.target.removeEventListener(FlexEvent.SHOW, Object(_local2).eventHandler);
_local2.target.setVisible(false, true);
};
if (((_local2.triggerEvent) && ((_local2.triggerEvent.type == Event.REMOVED)))){
_local5 = (_local2.target as DisplayObject);
if (_local5 != null){
_local6 = (_local5.parent as DisplayObjectContainer);
if (_local6 != null){
suspendEventHandling();
_local6.removeChild(_local5);
resumeEventHandling();
};
};
};
if (_local2.suspendBackgroundProcessing){
UIComponent.resumeBackgroundProcessing();
};
}
mx_internal static function startBitmapEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, true);
}
mx_internal static function setStyle(_arg1:String, _arg2):void{
var _local3:String = eventsForEffectTriggers[_arg1];
if (((!((_local3 == null))) && (!((_local3 == ""))))){
_arg2.addEventListener(_local3, EffectManager.eventHandler, false, EventPriority.EFFECT);
};
}
mx_internal static function getEventForEffectTrigger(_arg1:String):String{
var effectTrigger = _arg1;
if (eventsForEffectTriggers){
try {
return (eventsForEffectTriggers[effectTrigger]);
} catch(e:Error) {
return ("");
};
};
return ("");
}
mx_internal static function createEffectForType(_arg1:Object, _arg2:String):Effect{
var cls:Class;
var effectObj:Effect;
var doc:Object;
var target = _arg1;
var type = _arg2;
var trigger:String = effectTriggersForEvent[type];
if (trigger == ""){
trigger = (type + "Effect");
};
var value:Object = target.getStyle(trigger);
if (!value){
return (null);
};
if ((value is Class)){
cls = Class(value);
return (new cls(target));
};
try {
if ((value is String)){
doc = target.parentDocument;
if (!doc){
doc = ApplicationGlobals.application;
};
effectObj = doc[value];
} else {
if ((value is Effect)){
effectObj = Effect(value);
};
};
if (effectObj){
effectObj.target = target;
return (effectObj);
};
} catch(e:Error) {
};
var effectClass:Class = Class(target.systemManager.getDefinitionByName(("mx.effects." + value)));
if (effectClass){
return (new effectClass(target));
};
return (null);
}
mx_internal static function effectStarted(_arg1:EffectInstance):void{
effects[_arg1] = 1;
}
public static function resumeEventHandling():void{
eventHandlingSuspendCount--;
}
mx_internal static function startVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, true, false);
}
mx_internal static function endVectorEffect(_arg1:IUIComponent):void{
cacheOrUncacheTargetAsBitmap(_arg1, false, false);
}
private static function get resourceManager():IResourceManager{
if (!_resourceManager){
_resourceManager = ResourceManager.getInstance();
};
return (_resourceManager);
}
}
}//package mx.effects
class EffectNode {
public var factory:Effect;
public var instance:EffectInstance;
private function EffectNode(_arg1:Effect, _arg2:EffectInstance){
this.factory = _arg1;
this.instance = _arg2;
}
}
Section 525
//EffectTargetFilter (mx.effects.EffectTargetFilter)
package mx.effects {
import mx.effects.effectClasses.*;
public class EffectTargetFilter {
public var filterFunction:Function;
public var filterStyles:Array;
public var filterProperties:Array;
public var requiredSemantics:Object;// = null
mx_internal static const VERSION:String = "3.3.0.4852";
public function EffectTargetFilter(){
filterFunction = defaultFilterFunctionEx;
filterProperties = [];
filterStyles = [];
super();
}
protected function defaultFilterFunctionEx(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{
var _local4:String;
if (requiredSemantics){
for (_local4 in requiredSemantics) {
if (!_arg2){
return (false);
};
if (_arg2.getRendererSemanticValue(_arg3, _local4) != requiredSemantics[_local4]){
return (false);
};
};
return (true);
};
return (defaultFilterFunction(_arg1, _arg3));
}
protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{
var _local5:PropertyChanges;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
if (_local5.target == _arg2){
_local6 = filterProperties.concat(filterStyles);
_local7 = _local6.length;
_local8 = 0;
while (_local8 < _local7) {
if (((!((_local5.start[_local6[_local8]] === undefined))) && (!((_local5.end[_local6[_local8]] == _local5.start[_local6[_local8]]))))){
return (true);
};
_local8++;
};
};
_local4++;
};
return (false);
}
public function filterInstance(_arg1:Array, _arg2:IEffectTargetHost, _arg3:Object):Boolean{
if (filterFunction.length == 2){
return (filterFunction(_arg1, _arg3));
};
return (filterFunction(_arg1, _arg2, _arg3));
}
}
}//package mx.effects
Section 526
//IAbstractEffect (mx.effects.IAbstractEffect)
package mx.effects {
import flash.events.*;
public interface IAbstractEffect extends IEventDispatcher {
}
}//package mx.effects
Section 527
//IEffect (mx.effects.IEffect)
package mx.effects {
import flash.events.*;
public interface IEffect extends IAbstractEffect {
function captureMoreStartValues(_arg1:Array):void;
function get triggerEvent():Event;
function set targets(_arg1:Array):void;
function captureStartValues():void;
function get hideFocusRing():Boolean;
function get customFilter():EffectTargetFilter;
function get effectTargetHost():IEffectTargetHost;
function set triggerEvent(_arg1:Event):void;
function set hideFocusRing(_arg1:Boolean):void;
function captureEndValues():void;
function get target():Object;
function set customFilter(_arg1:EffectTargetFilter):void;
function get duration():Number;
function get perElementOffset():Number;
function get targets():Array;
function set effectTargetHost(_arg1:IEffectTargetHost):void;
function get relevantStyles():Array;
function set relevantProperties(_arg1:Array):void;
function set target(_arg1:Object):void;
function get className():String;
function get isPlaying():Boolean;
function deleteInstance(_arg1:IEffectInstance):void;
function set duration(_arg1:Number):void;
function createInstances(_arg1:Array=null):Array;
function end(_arg1:IEffectInstance=null):void;
function set perElementOffset(_arg1:Number):void;
function resume():void;
function stop():void;
function set filter(_arg1:String):void;
function createInstance(_arg1:Object=null):IEffectInstance;
function play(_arg1:Array=null, _arg2:Boolean=false):Array;
function pause():void;
function get relevantProperties():Array;
function get filter():String;
function reverse():void;
function getAffectedProperties():Array;
function set relevantStyles(_arg1:Array):void;
}
}//package mx.effects
Section 528
//IEffectInstance (mx.effects.IEffectInstance)
package mx.effects {
import flash.events.*;
import mx.effects.effectClasses.*;
public interface IEffectInstance {
function get playheadTime():Number;
function get triggerEvent():Event;
function set triggerEvent(_arg1:Event):void;
function get hideFocusRing():Boolean;
function initEffect(_arg1:Event):void;
function set startDelay(_arg1:int):void;
function get effectTargetHost():IEffectTargetHost;
function finishEffect():void;
function set hideFocusRing(_arg1:Boolean):void;
function finishRepeat():void;
function set repeatDelay(_arg1:int):void;
function get effect():IEffect;
function startEffect():void;
function get duration():Number;
function get target():Object;
function get startDelay():int;
function stop():void;
function set effectTargetHost(_arg1:IEffectTargetHost):void;
function set propertyChanges(_arg1:PropertyChanges):void;
function set effect(_arg1:IEffect):void;
function get className():String;
function set duration(_arg1:Number):void;
function set target(_arg1:Object):void;
function end():void;
function resume():void;
function get propertyChanges():PropertyChanges;
function set repeatCount(_arg1:int):void;
function reverse():void;
function get repeatCount():int;
function pause():void;
function get repeatDelay():int;
function set suspendBackgroundProcessing(_arg1:Boolean):void;
function play():void;
function get suspendBackgroundProcessing():Boolean;
}
}//package mx.effects
Section 529
//IEffectTargetHost (mx.effects.IEffectTargetHost)
package mx.effects {
public interface IEffectTargetHost {
function unconstrainRenderer(_arg1:Object):void;
function removeDataEffectItem(_arg1:Object):void;
function getRendererSemanticValue(_arg1:Object, _arg2:String):Object;
function addDataEffectItem(_arg1:Object):void;
}
}//package mx.effects
Section 530
//Tween (mx.effects.Tween)
package mx.effects {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import mx.events.*;
public class Tween extends EventDispatcher {
private var started:Boolean;// = false
private var previousUpdateTime:Number;
public var duration:Number;// = 3000
private var id:int;
private var arrayMode:Boolean;
private var _isPlaying:Boolean;// = true
private var startValue:Object;
public var listener:Object;
private var userEquation:Function;
mx_internal var needToLayout:Boolean;// = false
private var updateFunction:Function;
private var _doSeek:Boolean;// = false
mx_internal var startTime:Number;
private var endFunction:Function;
private var endValue:Object;
private var _doReverse:Boolean;// = false
private var _playheadTime:Number;// = 0
private var _invertValues:Boolean;// = false
private var maxDelay:Number;// = 87.5
mx_internal static const VERSION:String = "3.3.0.4852";
private static var timer:Timer = null;
private static var interval:Number = 10;
mx_internal static var activeTweens:Array = [];
mx_internal static var intervalTime:Number = NAN;
public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1, _arg6:Function=null, _arg7:Function=null){
userEquation = defaultEasingFunction;
super();
if (!_arg1){
return;
};
if ((_arg2 is Array)){
arrayMode = true;
};
this.listener = _arg1;
this.startValue = _arg2;
this.endValue = _arg3;
if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){
this.duration = _arg4;
};
if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){
maxDelay = (1000 / _arg5);
};
this.updateFunction = _arg6;
this.endFunction = _arg7;
if (_arg4 == 0){
id = -1;
endTween();
} else {
Tween.addTween(this);
};
}
mx_internal function get playheadTime():Number{
return (_playheadTime);
}
public function stop():void{
if (id >= 0){
Tween.removeTweenAt(id);
};
}
mx_internal function get playReversed():Boolean{
return (_invertValues);
}
mx_internal function set playReversed(_arg1:Boolean):void{
_invertValues = _arg1;
}
public function resume():void{
_isPlaying = true;
startTime = (intervalTime - _playheadTime);
if (_doReverse){
reverse();
_doReverse = false;
};
}
public function setTweenHandlers(_arg1:Function, _arg2:Function):void{
this.updateFunction = _arg1;
this.endFunction = _arg2;
}
private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2));
}
public function set easingFunction(_arg1:Function):void{
userEquation = _arg1;
}
public function endTween():void{
var _local1:TweenEvent = new TweenEvent(TweenEvent.TWEEN_END);
var _local2:Object = getCurrentValue(duration);
_local1.value = _local2;
dispatchEvent(_local1);
if (endFunction != null){
endFunction(_local2);
} else {
listener.onTweenEnd(_local2);
};
if (id >= 0){
Tween.removeTweenAt(id);
};
}
public function reverse():void{
if (_isPlaying){
_doReverse = false;
seek((duration - _playheadTime));
_invertValues = !(_invertValues);
} else {
_doReverse = !(_doReverse);
};
}
mx_internal function getCurrentValue(_arg1:Number):Object{
var _local2:Array;
var _local3:int;
var _local4:int;
if (duration == 0){
return (endValue);
};
if (_invertValues){
_arg1 = (duration - _arg1);
};
if (arrayMode){
_local2 = [];
_local3 = startValue.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration);
_local4++;
};
return (_local2);
//unresolved jump
};
return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration));
}
mx_internal function doInterval():Boolean{
var _local2:Number;
var _local3:Object;
var _local4:TweenEvent;
var _local5:TweenEvent;
var _local1:Boolean;
previousUpdateTime = intervalTime;
if (((_isPlaying) || (_doSeek))){
_local2 = (intervalTime - startTime);
_playheadTime = _local2;
_local3 = getCurrentValue(_local2);
if ((((_local2 >= duration)) && (!(_doSeek)))){
endTween();
_local1 = true;
} else {
if (!started){
_local5 = new TweenEvent(TweenEvent.TWEEN_START);
dispatchEvent(_local5);
started = true;
};
_local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE);
_local4.value = _local3;
dispatchEvent(_local4);
if (updateFunction != null){
updateFunction(_local3);
} else {
listener.onTweenUpdate(_local3);
};
};
_doSeek = false;
};
return (_local1);
}
public function pause():void{
_isPlaying = false;
}
public function seek(_arg1:Number):void{
var _local2:Number = intervalTime;
previousUpdateTime = _local2;
startTime = (_local2 - _arg1);
_doSeek = true;
}
mx_internal static function removeTween(_arg1:Tween):void{
removeTweenAt(_arg1.id);
}
private static function addTween(_arg1:Tween):void{
_arg1.id = activeTweens.length;
activeTweens.push(_arg1);
if (!timer){
timer = new Timer(interval);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
} else {
timer.start();
};
if (isNaN(intervalTime)){
intervalTime = getTimer();
};
_arg1.startTime = (_arg1.previousUpdateTime = intervalTime);
}
private static function timerHandler(_arg1:TimerEvent):void{
var _local6:Tween;
var _local2:Boolean;
var _local3:Number = intervalTime;
intervalTime = getTimer();
var _local4:int = activeTweens.length;
var _local5:int = _local4;
while (_local5 >= 0) {
_local6 = Tween(activeTweens[_local5]);
if (_local6){
_local6.needToLayout = false;
_local6.doInterval();
if (_local6.needToLayout){
_local2 = true;
};
};
_local5--;
};
if (_local2){
UIComponentGlobals.layoutManager.validateNow();
};
_arg1.updateAfterEvent();
}
private static function removeTweenAt(_arg1:int):void{
var _local4:Tween;
if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){
return;
};
activeTweens.splice(_arg1, 1);
var _local2:int = activeTweens.length;
var _local3:int = _arg1;
while (_local3 < _local2) {
_local4 = Tween(activeTweens[_local3]);
_local4.id--;
_local3++;
};
if (_local2 == 0){
intervalTime = NaN;
timer.reset();
};
}
}
}//package mx.effects
Section 531
//TweenEffect (mx.effects.TweenEffect)
package mx.effects {
import flash.events.*;
import mx.events.*;
import mx.effects.effectClasses.*;
public class TweenEffect extends Effect {
public var easingFunction:Function;// = null
mx_internal static const VERSION:String = "3.3.0.4852";
public function TweenEffect(_arg1:Object=null){
super(_arg1);
instanceClass = TweenEffectInstance;
}
protected function tweenEventHandler(_arg1:TweenEvent):void{
dispatchEvent(_arg1);
}
override protected function initInstance(_arg1:IEffectInstance):void{
super.initInstance(_arg1);
TweenEffectInstance(_arg1).easingFunction = easingFunction;
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
}
}
}//package mx.effects
Section 532
//Zoom (mx.effects.Zoom)
package mx.effects {
import mx.effects.effectClasses.*;
public class Zoom extends TweenEffect {
public var zoomHeightFrom:Number;
public var zoomWidthTo:Number;
public var originX:Number;
public var zoomHeightTo:Number;
public var originY:Number;
public var captureRollEvents:Boolean;
public var zoomWidthFrom:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"];
public function Zoom(_arg1:Object=null){
super(_arg1);
instanceClass = ZoomInstance;
applyActualDimensions = false;
relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"];
}
override protected function initInstance(_arg1:IEffectInstance):void{
var _local2:ZoomInstance;
super.initInstance(_arg1);
_local2 = ZoomInstance(_arg1);
_local2.zoomWidthFrom = zoomWidthFrom;
_local2.zoomWidthTo = zoomWidthTo;
_local2.zoomHeightFrom = zoomHeightFrom;
_local2.zoomHeightTo = zoomHeightTo;
_local2.originX = originX;
_local2.originY = originY;
_local2.captureRollEvents = captureRollEvents;
}
override public function getAffectedProperties():Array{
return (AFFECTED_PROPERTIES);
}
}
}//package mx.effects
Section 533
//ChildExistenceChangedEvent (mx.events.ChildExistenceChangedEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class ChildExistenceChangedEvent extends Event {
public var relatedObject:DisplayObject;
public static const CHILD_REMOVE:String = "childRemove";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const OVERLAY_CREATED:String = "overlayCreated";
public static const CHILD_ADD:String = "childAdd";
public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3);
this.relatedObject = _arg4;
}
override public function clone():Event{
return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject));
}
}
}//package mx.events
Section 534
//DragEvent (mx.events.DragEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class DragEvent extends MouseEvent {
public var draggedItem:Object;
public var action:String;
public var dragInitiator:IUIComponent;
public var dragSource:DragSource;
public static const DRAG_DROP:String = "dragDrop";
public static const DRAG_COMPLETE:String = "dragComplete";
public static const DRAG_EXIT:String = "dragExit";
public static const DRAG_ENTER:String = "dragEnter";
public static const DRAG_START:String = "dragStart";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const DRAG_OVER:String = "dragOver";
public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){
super(_arg1, _arg2, _arg3);
this.dragInitiator = _arg4;
this.dragSource = _arg5;
this.action = _arg6;
this.ctrlKey = _arg7;
this.altKey = _arg8;
this.shiftKey = _arg9;
}
override public function clone():Event{
var _local1:DragEvent = new DragEvent(type, bubbles, cancelable, dragInitiator, dragSource, action, ctrlKey, altKey, shiftKey);
_local1.relatedObject = this.relatedObject;
_local1.localX = this.localX;
_local1.localY = this.localY;
return (_local1);
}
}
}//package mx.events
Section 535
//DynamicEvent (mx.events.DynamicEvent)
package mx.events {
import flash.events.*;
public dynamic class DynamicEvent extends Event {
mx_internal static const VERSION:String = "3.3.0.4852";
public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
var _local2:String;
var _local1:DynamicEvent = new DynamicEvent(type, bubbles, cancelable);
for (_local2 in this) {
_local1[_local2] = this[_local2];
};
return (_local1);
}
}
}//package mx.events
Section 536
//EffectEvent (mx.events.EffectEvent)
package mx.events {
import flash.events.*;
import mx.effects.*;
public class EffectEvent extends Event {
public var effectInstance:IEffectInstance;
public static const EFFECT_START:String = "effectStart";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const EFFECT_END:String = "effectEnd";
public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){
super(_arg1, _arg2, _arg3);
this.effectInstance = _arg4;
}
override public function clone():Event{
return (new EffectEvent(type, bubbles, cancelable, effectInstance));
}
}
}//package mx.events
Section 537
//EventListenerRequest (mx.events.EventListenerRequest)
package mx.events {
import flash.events.*;
public class EventListenerRequest extends SWFBridgeRequest {
private var _priority:int;
private var _useWeakReference:Boolean;
private var _eventType:String;
private var _useCapture:Boolean;
public static const REMOVE_EVENT_LISTENER_REQUEST:String = "removeEventListenerRequest";
public static const ADD_EVENT_LISTENER_REQUEST:String = "addEventListenerRequest";
mx_internal static const VERSION:String = "3.3.0.4852";
public function EventListenerRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:String=null, _arg5:Boolean=false, _arg6:int=0, _arg7:Boolean=false){
super(_arg1, false, false);
_eventType = _arg4;
_useCapture = _arg5;
_priority = _arg6;
_useWeakReference = _arg7;
}
public function get priority():int{
return (_priority);
}
public function get useWeakReference():Boolean{
return (_useWeakReference);
}
public function get eventType():String{
return (_eventType);
}
override public function clone():Event{
return (new EventListenerRequest(type, bubbles, cancelable, eventType, useCapture, priority, useWeakReference));
}
public function get useCapture():Boolean{
return (_useCapture);
}
public static function marshal(_arg1:Event):EventListenerRequest{
var _local2:Object = _arg1;
return (new EventListenerRequest(_local2.type, _local2.bubbles, _local2.cancelable, _local2.eventType, _local2.useCapture, _local2.priority, _local2.useWeakReference));
}
}
}//package mx.events
Section 538
//FlexChangeEvent (mx.events.FlexChangeEvent)
package mx.events {
import flash.events.*;
public class FlexChangeEvent extends Event {
public var data:Object;
public static const REMOVE_CHILD_BRIDGE:String = "removeChildBridge";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const ADD_CHILD_BRIDGE:String = "addChildBridge";
public function FlexChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.data = _arg4;
}
override public function clone():Event{
return (new FlexChangeEvent(type, bubbles, cancelable, data));
}
}
}//package mx.events
Section 539
//FlexEvent (mx.events.FlexEvent)
package mx.events {
import flash.events.*;
public class FlexEvent extends Event {
public static const ADD:String = "add";
public static const TRANSFORM_CHANGE:String = "transformChange";
public static const ENTER_FRAME:String = "flexEventEnterFrame";
public static const INIT_COMPLETE:String = "initComplete";
public static const REMOVE:String = "remove";
public static const BUTTON_DOWN:String = "buttonDown";
public static const EXIT_STATE:String = "exitState";
public static const CREATION_COMPLETE:String = "creationComplete";
public static const REPEAT:String = "repeat";
public static const LOADING:String = "loading";
public static const RENDER:String = "flexEventRender";
public static const REPEAT_START:String = "repeatStart";
public static const INITIALIZE:String = "initialize";
public static const ENTER_STATE:String = "enterState";
public static const URL_CHANGED:String = "urlChanged";
public static const REPEAT_END:String = "repeatEnd";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const HIDE:String = "hide";
public static const ENTER:String = "enter";
public static const PRELOADER_DONE:String = "preloaderDone";
public static const CURSOR_UPDATE:String = "cursorUpdate";
public static const PREINITIALIZE:String = "preinitialize";
public static const INVALID:String = "invalid";
public static const IDLE:String = "idle";
public static const VALID:String = "valid";
public static const DATA_CHANGE:String = "dataChange";
public static const APPLICATION_COMPLETE:String = "applicationComplete";
public static const VALUE_COMMIT:String = "valueCommit";
public static const UPDATE_COMPLETE:String = "updateComplete";
public static const INIT_PROGRESS:String = "initProgress";
public static const SHOW:String = "show";
public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new FlexEvent(type, bubbles, cancelable));
}
}
}//package mx.events
Section 540
//FlexMouseEvent (mx.events.FlexMouseEvent)
package mx.events {
import flash.events.*;
import flash.display.*;
public class FlexMouseEvent extends MouseEvent {
public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside";
public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside";
mx_internal static const VERSION:String = "3.3.0.4852";
public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11);
}
override public function clone():Event{
return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta));
}
}
}//package mx.events
Section 541
//InterManagerRequest (mx.events.InterManagerRequest)
package mx.events {
import flash.events.*;
public class InterManagerRequest extends Event {
public var value:Object;
public var name:String;
public static const TOOLTIP_MANAGER_REQUEST:String = "tooltipManagerRequest";
public static const SYSTEM_MANAGER_REQUEST:String = "systemManagerRequest";
public static const INIT_MANAGER_REQUEST:String = "initManagerRequest";
public static const DRAG_MANAGER_REQUEST:String = "dragManagerRequest";
public static const CURSOR_MANAGER_REQUEST:String = "cursorManagerRequest";
mx_internal static const VERSION:String = "3.3.0.4852";
public function InterManagerRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null){
super(_arg1, _arg2, _arg3);
this.name = _arg4;
this.value = _arg5;
}
override public function clone():Event{
var _local1:InterManagerRequest = new InterManagerRequest(type, bubbles, cancelable, name, value);
return (_local1);
}
}
}//package mx.events
Section 542
//InvalidateRequestData (mx.events.InvalidateRequestData)
package mx.events {
public final class InvalidateRequestData {
public static const SIZE:uint = 4;
public static const PROPERTIES:uint = 2;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const DISPLAY_LIST:uint = 1;
}
}//package mx.events
Section 543
//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.3.0.4852";
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 544
//MoveEvent (mx.events.MoveEvent)
package mx.events {
import flash.events.*;
public class MoveEvent extends Event {
public var oldX:Number;
public var oldY:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const MOVE:String = "move";
public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldX = _arg4;
this.oldY = _arg5;
}
override public function clone():Event{
return (new MoveEvent(type, bubbles, cancelable, oldX, oldY));
}
}
}//package mx.events
Section 545
//PropertyChangeEvent (mx.events.PropertyChangeEvent)
package mx.events {
import flash.events.*;
public class PropertyChangeEvent extends Event {
public var newValue:Object;
public var kind:String;
public var property:Object;
public var oldValue:Object;
public var source:Object;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const PROPERTY_CHANGE:String = "propertyChange";
public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.property = _arg5;
this.oldValue = _arg6;
this.newValue = _arg7;
this.source = _arg8;
}
override public function clone():Event{
return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source));
}
public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{
var _local5:PropertyChangeEvent = new PropertyChangeEvent(PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.UPDATE;
_local5.oldValue = _arg3;
_local5.newValue = _arg4;
_local5.source = _arg1;
_local5.property = _arg2;
return (_local5);
}
}
}//package mx.events
Section 546
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind)
package mx.events {
public final class PropertyChangeEventKind {
mx_internal static const VERSION:String = "3.3.0.4852";
public static const UPDATE:String = "update";
public static const DELETE:String = "delete";
}
}//package mx.events
Section 547
//ResizeEvent (mx.events.ResizeEvent)
package mx.events {
import flash.events.*;
public class ResizeEvent extends Event {
public var oldHeight:Number;
public var oldWidth:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const RESIZE:String = "resize";
public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){
super(_arg1, _arg2, _arg3);
this.oldWidth = _arg4;
this.oldHeight = _arg5;
}
override public function clone():Event{
return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight));
}
}
}//package mx.events
Section 548
//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.3.0.4852";
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 549
//RSLEvent (mx.events.RSLEvent)
package mx.events {
import flash.events.*;
import flash.net.*;
public class RSLEvent extends ProgressEvent {
public var errorText:String;
public var rslIndex:int;
public var rslTotal:int;
public var url:URLRequest;
public static const RSL_PROGRESS:String = "rslProgress";
public static const RSL_ERROR:String = "rslError";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const RSL_COMPLETE:String = "rslComplete";
public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.rslIndex = _arg6;
this.rslTotal = _arg7;
this.url = _arg8;
this.errorText = _arg9;
}
override public function clone():Event{
return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText));
}
}
}//package mx.events
Section 550
//SandboxMouseEvent (mx.events.SandboxMouseEvent)
package mx.events {
import flash.events.*;
public class SandboxMouseEvent extends Event {
public var buttonDown:Boolean;
public var altKey:Boolean;
public var ctrlKey:Boolean;
public var shiftKey:Boolean;
public static const CLICK_SOMEWHERE:String = "clickSomewhere";
public static const MOUSE_UP_SOMEWHERE:String = "mouseUpSomewhere";
public static const DOUBLE_CLICK_SOMEWHERE:String = "coubleClickSomewhere";
public static const MOUSE_WHEEL_SOMEWHERE:String = "mouseWheelSomewhere";
public static const MOUSE_DOWN_SOMEWHERE:String = "mouseDownSomewhere";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const MOUSE_MOVE_SOMEWHERE:String = "mouseMoveSomewhere";
public function SandboxMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false, _arg7:Boolean=false){
super(_arg1, _arg2, _arg3);
this.ctrlKey = _arg4;
this.altKey = _arg5;
this.shiftKey = _arg6;
this.buttonDown = _arg7;
}
override public function clone():Event{
return (new SandboxMouseEvent(type, bubbles, cancelable, ctrlKey, altKey, shiftKey, buttonDown));
}
public static function marshal(_arg1:Event):SandboxMouseEvent{
var _local2:Object = _arg1;
return (new SandboxMouseEvent(_local2.type, _local2.bubbles, _local2.cancelable, _local2.ctrlKey, _local2.altKey, _local2.shiftKey, _local2.buttonDown));
}
}
}//package mx.events
Section 551
//ScrollEvent (mx.events.ScrollEvent)
package mx.events {
import flash.events.*;
public class ScrollEvent extends Event {
public var detail:String;
public var delta:Number;
public var position:Number;
public var direction:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:String=null, _arg7:Number=NaN){
super(_arg1, _arg2, _arg3);
this.detail = _arg4;
this.position = _arg5;
this.direction = _arg6;
this.delta = _arg7;
}
override public function clone():Event{
return (new ScrollEvent(type, bubbles, cancelable, detail, position, direction, delta));
}
}
}//package mx.events
Section 552
//ScrollEventDetail (mx.events.ScrollEventDetail)
package mx.events {
public final class ScrollEventDetail {
public static const LINE_UP:String = "lineUp";
public static const AT_RIGHT:String = "atRight";
public static const PAGE_UP:String = "pageUp";
public static const LINE_DOWN:String = "lineDown";
public static const PAGE_DOWN:String = "pageDown";
public static const AT_LEFT:String = "atLeft";
public static const PAGE_RIGHT:String = "pageRight";
public static const THUMB_POSITION:String = "thumbPosition";
public static const AT_TOP:String = "atTop";
public static const LINE_LEFT:String = "lineLeft";
public static const AT_BOTTOM:String = "atBottom";
public static const LINE_RIGHT:String = "lineRight";
public static const THUMB_TRACK:String = "thumbTrack";
public static const PAGE_LEFT:String = "pageLeft";
mx_internal static const VERSION:String = "3.3.0.4852";
}
}//package mx.events
Section 553
//StateChangeEvent (mx.events.StateChangeEvent)
package mx.events {
import flash.events.*;
public class StateChangeEvent extends Event {
public var newState:String;
public var oldState:String;
public static const CURRENT_STATE_CHANGING:String = "currentStateChanging";
public static const CURRENT_STATE_CHANGE:String = "currentStateChange";
mx_internal static const VERSION:String = "3.3.0.4852";
public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){
super(_arg1, _arg2, _arg3);
this.oldState = _arg4;
this.newState = _arg5;
}
override public function clone():Event{
return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState));
}
}
}//package mx.events
Section 554
//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.3.0.4852";
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 555
//SWFBridgeEvent (mx.events.SWFBridgeEvent)
package mx.events {
import flash.events.*;
public class SWFBridgeEvent extends Event {
public var data:Object;
public static const BRIDGE_FOCUS_MANAGER_ACTIVATE:String = "bridgeFocusManagerActivate";
public static const BRIDGE_WINDOW_ACTIVATE:String = "bridgeWindowActivate";
public static const BRIDGE_WINDOW_DEACTIVATE:String = "brdigeWindowDeactivate";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const BRIDGE_NEW_APPLICATION:String = "bridgeNewApplication";
public static const BRIDGE_APPLICATION_UNLOADING:String = "bridgeApplicationUnloading";
public static const BRIDGE_APPLICATION_ACTIVATE:String = "bridgeApplicationActivate";
public function SWFBridgeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.data = _arg4;
}
override public function clone():Event{
return (new SWFBridgeEvent(type, bubbles, cancelable, data));
}
public static function marshal(_arg1:Event):SWFBridgeEvent{
var _local2:Object = _arg1;
return (new SWFBridgeEvent(_local2.type, _local2.bubbles, _local2.cancelable, _local2.data));
}
}
}//package mx.events
Section 556
//SWFBridgeRequest (mx.events.SWFBridgeRequest)
package mx.events {
import flash.events.*;
public class SWFBridgeRequest extends Event {
public var requestor:IEventDispatcher;
public var data:Object;
public static const SHOW_MOUSE_CURSOR_REQUEST:String = "showMouseCursorRequest";
public static const DEACTIVATE_POP_UP_REQUEST:String = "deactivatePopUpRequest";
public static const SET_ACTUAL_SIZE_REQUEST:String = "setActualSizeRequest";
public static const MOVE_FOCUS_REQUEST:String = "moveFocusRequest";
public static const GET_VISIBLE_RECT_REQUEST:String = "getVisibleRectRequest";
public static const ADD_POP_UP_PLACE_HOLDER_REQUEST:String = "addPopUpPlaceHolderRequest";
public static const REMOVE_POP_UP_PLACE_HOLDER_REQUEST:String = "removePopUpPlaceHolderRequest";
public static const RESET_MOUSE_CURSOR_REQUEST:String = "resetMouseCursorRequest";
public static const ADD_POP_UP_REQUEST:String = "addPopUpRequest";
public static const GET_SIZE_REQUEST:String = "getSizeRequest";
public static const SHOW_MODAL_WINDOW_REQUEST:String = "showModalWindowRequest";
public static const ACTIVATE_FOCUS_REQUEST:String = "activateFocusRequest";
public static const DEACTIVATE_FOCUS_REQUEST:String = "deactivateFocusRequest";
public static const HIDE_MOUSE_CURSOR_REQUEST:String = "hideMouseCursorRequest";
public static const ACTIVATE_POP_UP_REQUEST:String = "activatePopUpRequest";
public static const IS_BRIDGE_CHILD_REQUEST:String = "isBridgeChildRequest";
public static const CAN_ACTIVATE_POP_UP_REQUEST:String = "canActivateRequestPopUpRequest";
public static const HIDE_MODAL_WINDOW_REQUEST:String = "hideModalWindowRequest";
public static const INVALIDATE_REQUEST:String = "invalidateRequest";
public static const SET_SHOW_FOCUS_INDICATOR_REQUEST:String = "setShowFocusIndicatorRequest";
public static const CREATE_MODAL_WINDOW_REQUEST:String = "createModalWindowRequest";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const REMOVE_POP_UP_REQUEST:String = "removePopUpRequest";
public function SWFBridgeRequest(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEventDispatcher=null, _arg5:Object=null){
super(_arg1, _arg2, _arg3);
this.requestor = _arg4;
this.data = _arg5;
}
override public function clone():Event{
return (new SWFBridgeRequest(type, bubbles, cancelable, requestor, data));
}
public static function marshal(_arg1:Event):SWFBridgeRequest{
var _local2:Object = _arg1;
return (new SWFBridgeRequest(_local2.type, _local2.bubbles, _local2.cancelable, _local2.requestor, _local2.data));
}
}
}//package mx.events
Section 557
//ToolTipEvent (mx.events.ToolTipEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ToolTipEvent extends Event {
public var toolTip:IToolTip;
public static const TOOL_TIP_SHOWN:String = "toolTipShown";
public static const TOOL_TIP_CREATE:String = "toolTipCreate";
public static const TOOL_TIP_SHOW:String = "toolTipShow";
public static const TOOL_TIP_HIDE:String = "toolTipHide";
public static const TOOL_TIP_END:String = "toolTipEnd";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const TOOL_TIP_START:String = "toolTipStart";
public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){
super(_arg1, _arg2, _arg3);
this.toolTip = _arg4;
}
override public function clone():Event{
return (new ToolTipEvent(type, bubbles, cancelable, toolTip));
}
}
}//package mx.events
Section 558
//TweenEvent (mx.events.TweenEvent)
package mx.events {
import flash.events.*;
public class TweenEvent extends Event {
public var value:Object;
public static const TWEEN_END:String = "tweenEnd";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const TWEEN_UPDATE:String = "tweenUpdate";
public static const TWEEN_START:String = "tweenStart";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function clone():Event{
return (new TweenEvent(type, bubbles, cancelable, value));
}
}
}//package mx.events
Section 559
//ValidationResultEvent (mx.events.ValidationResultEvent)
package mx.events {
import flash.events.*;
public class ValidationResultEvent extends Event {
public var results:Array;
public var field:String;
public static const INVALID:String = "invalid";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const VALID:String = "valid";
public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){
super(_arg1, _arg2, _arg3);
this.field = _arg4;
this.results = _arg5;
}
public function get message():String{
var _local1 = "";
var _local2:int = results.length;
var _local3:int;
while (_local3 < _local2) {
if (results[_local3].isError){
_local1 = (_local1 + ((_local1 == "")) ? "" : "\n");
_local1 = (_local1 + results[_local3].errorMessage);
};
_local3++;
};
return (_local1);
}
override public function clone():Event{
return (new ValidationResultEvent(type, bubbles, cancelable, field, results));
}
}
}//package mx.events
Section 560
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
import mx.utils.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.3.0.4852";
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 561
//RoundedRectangle (mx.graphics.RoundedRectangle)
package mx.graphics {
import flash.geom.*;
public class RoundedRectangle extends Rectangle {
public var cornerRadius:Number;// = 0
mx_internal static const VERSION:String = "3.3.0.4852";
public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){
super(_arg1, _arg2, _arg3, _arg4);
this.cornerRadius = _arg5;
}
}
}//package mx.graphics
Section 562
//PriorityQueue (mx.managers.layoutClasses.PriorityQueue)
package mx.managers.layoutClasses {
import mx.core.*;
import flash.display.*;
import mx.managers.*;
public class PriorityQueue {
private var maxPriority:int;// = -1
private var arrayOfArrays:Array;
private var minPriority:int;// = 0
mx_internal static const VERSION:String = "3.3.0.4852";
public function PriorityQueue(){
arrayOfArrays = [];
super();
}
public function addObject(_arg1:Object, _arg2:int):void{
if (!arrayOfArrays[_arg2]){
arrayOfArrays[_arg2] = [];
};
arrayOfArrays[_arg2].push(_arg1);
if (maxPriority < minPriority){
minPriority = (maxPriority = _arg2);
} else {
if (_arg2 < minPriority){
minPriority = _arg2;
};
if (_arg2 > maxPriority){
maxPriority = _arg2;
};
};
}
public function removeSmallest():Object{
var _local1:Object;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
return (null);
};
};
_local1 = arrayOfArrays[minPriority].shift();
while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) {
minPriority++;
if (minPriority > maxPriority){
break;
};
};
};
return (_local1);
}
public function removeLargestChild(_arg1:ILayoutManagerClient):Object{
var _local5:int;
var _local2:Object;
var _local3:int = maxPriority;
var _local4:int = _arg1.nestLevel;
while (_local4 <= _local3) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local5 = 0;
while (_local5 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local5])){
_local2 = arrayOfArrays[_local3][_local5];
arrayOfArrays[_local3].splice(_local5, 1);
return (_local2);
};
_local5++;
};
_local3--;
} else {
if (_local3 == maxPriority){
maxPriority--;
};
_local3--;
if (_local3 < _local4){
break;
};
};
};
return (_local2);
}
public function isEmpty():Boolean{
return ((minPriority > maxPriority));
}
public function removeLargest():Object{
var _local1:Object;
if (minPriority <= maxPriority){
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
return (null);
};
};
_local1 = arrayOfArrays[maxPriority].shift();
while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) {
maxPriority--;
if (maxPriority < minPriority){
break;
};
};
};
return (_local1);
}
public function removeSmallestChild(_arg1:ILayoutManagerClient):Object{
var _local4:int;
var _local2:Object;
var _local3:int = _arg1.nestLevel;
while (_local3 <= maxPriority) {
if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){
_local4 = 0;
while (_local4 < arrayOfArrays[_local3].length) {
if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local4])){
_local2 = arrayOfArrays[_local3][_local4];
arrayOfArrays[_local3].splice(_local4, 1);
return (_local2);
};
_local4++;
};
_local3++;
} else {
if (_local3 == minPriority){
minPriority++;
};
_local3++;
if (_local3 > maxPriority){
break;
};
};
};
return (_local2);
}
public function removeAll():void{
arrayOfArrays.splice(0);
minPriority = 0;
maxPriority = -1;
}
private function contains(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{
var _local3:IChildList;
if ((_arg1 is IRawChildrenContainer)){
_local3 = IRawChildrenContainer(_arg1).rawChildren;
return (_local3.contains(_arg2));
};
if ((_arg1 is DisplayObjectContainer)){
return (DisplayObjectContainer(_arg1).contains(_arg2));
};
return ((_arg1 == _arg2));
}
}
}//package mx.managers.layoutClasses
Section 563
//EventProxy (mx.managers.systemClasses.EventProxy)
package mx.managers.systemClasses {
import flash.events.*;
import mx.events.*;
import mx.managers.*;
import mx.utils.*;
public class EventProxy extends EventDispatcher {
private var systemManager:ISystemManager;
public function EventProxy(_arg1:ISystemManager){
this.systemManager = _arg1;
}
public function marshalListener(_arg1:Event):void{
var _local2:MouseEvent;
var _local3:SandboxMouseEvent;
if ((_arg1 is MouseEvent)){
_local2 = (_arg1 as MouseEvent);
_local3 = new SandboxMouseEvent(EventUtil.mouseEventMap[_arg1.type], false, false, _local2.ctrlKey, _local2.altKey, _local2.shiftKey, _local2.buttonDown);
systemManager.dispatchEventFromSWFBridges(_local3, null, true, true);
};
}
}
}//package mx.managers.systemClasses
Section 564
//PlaceholderData (mx.managers.systemClasses.PlaceholderData)
package mx.managers.systemClasses {
import flash.events.*;
public class PlaceholderData {
public var bridge:IEventDispatcher;
public var data:Object;
public var id:String;
public function PlaceholderData(_arg1:String, _arg2:IEventDispatcher, _arg3:Object){
this.id = _arg1;
this.bridge = _arg2;
this.data = _arg3;
}
}
}//package mx.managers.systemClasses
Section 565
//RemotePopUp (mx.managers.systemClasses.RemotePopUp)
package mx.managers.systemClasses {
public class RemotePopUp {
public var window:Object;
public var bridge:Object;
public function RemotePopUp(_arg1:Object, _arg2:Object){
this.window = _arg1;
this.bridge = _arg2;
}
}
}//package mx.managers.systemClasses
Section 566
//StageEventProxy (mx.managers.systemClasses.StageEventProxy)
package mx.managers.systemClasses {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class StageEventProxy {
private var weakRef:Dictionary;
public function StageEventProxy(_arg1:Function){
weakRef = new Dictionary(true);
super();
this.weakRef[_arg1] = 1;
}
public function stageListener(_arg1:Event):void{
var _local2:*;
var _local3:Function;
if ((_arg1.target is Stage)){
for (_local2 in weakRef) {
_local3 = (_local2 as Function);
_local3(_arg1);
};
};
}
}
}//package mx.managers.systemClasses
Section 567
//CursorManager (mx.managers.CursorManager)
package mx.managers {
import mx.core.*;
public class CursorManager {
mx_internal static const VERSION:String = "3.3.0.4852";
public static const NO_CURSOR:int = 0;
private static var _impl:ICursorManager;
private static var implClassDependency:CursorManagerImpl;
public static function set currentCursorYOffset(_arg1:Number):void{
impl.currentCursorYOffset = _arg1;
}
mx_internal static function registerToUseBusyCursor(_arg1:Object):void{
impl.registerToUseBusyCursor(_arg1);
}
public static function get currentCursorID():int{
return (impl.currentCursorID);
}
public static function getInstance():ICursorManager{
return (impl);
}
public static function removeBusyCursor():void{
impl.removeBusyCursor();
}
public static function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
return (impl.setCursor(_arg1, _arg2, _arg3, _arg4));
}
public static function set currentCursorID(_arg1:int):void{
impl.currentCursorID = _arg1;
}
mx_internal static function unRegisterToUseBusyCursor(_arg1:Object):void{
impl.unRegisterToUseBusyCursor(_arg1);
}
private static function get impl():ICursorManager{
if (!_impl){
_impl = ICursorManager(Singleton.getInstance("mx.managers::ICursorManager"));
};
return (_impl);
}
public static function removeAllCursors():void{
impl.removeAllCursors();
}
public static function setBusyCursor():void{
impl.setBusyCursor();
}
public static function showCursor():void{
impl.showCursor();
}
public static function hideCursor():void{
impl.hideCursor();
}
public static function removeCursor(_arg1:int):void{
impl.removeCursor(_arg1);
}
public static function get currentCursorXOffset():Number{
return (impl.currentCursorXOffset);
}
public static function get currentCursorYOffset():Number{
return (impl.currentCursorYOffset);
}
public static function set currentCursorXOffset(_arg1:Number):void{
impl.currentCursorXOffset = _arg1;
}
}
}//package mx.managers
Section 568
//CursorManagerImpl (mx.managers.CursorManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.geom.*;
import flash.text.*;
import mx.events.*;
import flash.ui.*;
public class CursorManagerImpl implements ICursorManager {
private var showSystemCursor:Boolean;// = false
private var nextCursorID:int;// = 1
private var systemManager:ISystemManager;// = null
private var cursorList:Array;
private var _currentCursorYOffset:Number;// = 0
private var cursorHolder:Sprite;
private var currentCursor:DisplayObject;
private var sandboxRoot:IEventDispatcher;// = null
private var showCustomCursor:Boolean;// = false
private var listenForContextMenu:Boolean;// = false
private var customCursorLeftStage:Boolean;// = false
private var _currentCursorID:int;// = 0
private var initialized:Boolean;// = false
private var overTextField:Boolean;// = false
private var _currentCursorXOffset:Number;// = 0
private var busyCursorList:Array;
private var overLink:Boolean;// = false
private var sourceArray:Array;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var instance:ICursorManager;
public function CursorManagerImpl(_arg1:ISystemManager=null){
cursorList = [];
busyCursorList = [];
sourceArray = [];
super();
if (((instance) && (!(_arg1)))){
throw (new Error("Instance already exists."));
};
if (_arg1){
this.systemManager = (_arg1 as ISystemManager);
} else {
this.systemManager = (SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager);
};
sandboxRoot = this.systemManager.getSandboxRoot();
sandboxRoot.addEventListener(InterManagerRequest.CURSOR_MANAGER_REQUEST, marshalCursorManagerHandler, false, 0, true);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "update";
sandboxRoot.dispatchEvent(_local2);
}
private function mouseOverHandler(_arg1:MouseEvent):void{
sandboxRoot.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
mouseMoveHandler(_arg1);
}
public function set currentCursorYOffset(_arg1:Number):void{
var _local2:InterManagerRequest;
_currentCursorYOffset = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorYOffset";
_local2.value = currentCursorYOffset;
sandboxRoot.dispatchEvent(_local2);
};
}
public function get currentCursorXOffset():Number{
return (_currentCursorXOffset);
}
public function removeCursor(_arg1:int):void{
var _local2:Object;
var _local3:InterManagerRequest;
var _local4:CursorQueueItem;
if (((initialized) && (!(cursorHolder)))){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "removeCursor";
_local3.value = _arg1;
sandboxRoot.dispatchEvent(_local3);
return;
};
for (_local2 in cursorList) {
_local4 = cursorList[_local2];
if (_local4.cursorID == _arg1){
cursorList.splice(_local2, 1);
showCurrentCursor();
break;
};
};
}
public function get currentCursorID():int{
return (_currentCursorID);
}
private function removeContextMenuHandlers():void{
var _local1:InteractiveObject;
var _local2:InteractiveObject;
if (listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
_local2 = (systemManager as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true);
};
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.removeEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true);
};
listenForContextMenu = false;
};
}
private function marshalMouseMoveHandler(_arg1:Event):void{
var _local2:SWFBridgeRequest;
var _local3:IEventDispatcher;
if (cursorHolder.visible){
cursorHolder.visible = false;
_local2 = new SWFBridgeRequest(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST);
if (systemManager.useSWFBridge()){
_local3 = systemManager.swfBridgeGroup.parentBridge;
} else {
_local3 = systemManager;
};
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
if (_local2.data){
Mouse.show();
};
};
}
public function set currentCursorID(_arg1:int):void{
var _local2:InterManagerRequest;
_currentCursorID = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorID";
_local2.value = currentCursorID;
sandboxRoot.dispatchEvent(_local2);
};
}
private function priorityCompare(_arg1:CursorQueueItem, _arg2:CursorQueueItem):int{
if (_arg1.priority < _arg2.priority){
return (-1);
};
if (_arg1.priority == _arg2.priority){
return (0);
};
return (1);
}
private function mouseOutHandler(_arg1:MouseEvent):void{
if ((((_arg1.relatedObject == null)) && ((cursorList.length > 0)))){
customCursorLeftStage = true;
hideCursor();
Mouse.show();
};
}
public function setBusyCursor():void{
var _local3:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "setBusyCursor";
sandboxRoot.dispatchEvent(_local3);
return;
};
var _local1:CSSStyleDeclaration = StyleManager.getStyleDeclaration("CursorManager");
var _local2:Class = _local1.getStyle("busyCursor");
busyCursorList.push(setCursor(_local2, CursorManagerPriority.LOW));
}
private function findSource(_arg1:Object):int{
var _local2:int = sourceArray.length;
var _local3:int;
while (_local3 < _local2) {
if (sourceArray[_local3] === _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
private function showCurrentCursor():void{
var _local1:CursorQueueItem;
var _local2:InterManagerRequest;
var _local3:Point;
if (cursorList.length > 0){
if (!initialized){
cursorHolder = new FlexSprite();
cursorHolder.name = "cursorHolder";
cursorHolder.mouseEnabled = false;
cursorHolder.mouseChildren = false;
systemManager.addChildToSandboxRoot("cursorChildren", cursorHolder);
initialized = true;
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "initialized";
sandboxRoot.dispatchEvent(_local2);
};
_local1 = cursorList[0];
if (currentCursorID == CursorManager.NO_CURSOR){
Mouse.hide();
};
if (_local1.cursorID != currentCursorID){
if (cursorHolder.numChildren > 0){
cursorHolder.removeChildAt(0);
};
currentCursor = new _local1.cursorClass();
if (currentCursor){
if ((currentCursor is InteractiveObject)){
InteractiveObject(currentCursor).mouseEnabled = false;
};
if ((currentCursor is DisplayObjectContainer)){
DisplayObjectContainer(currentCursor).mouseChildren = false;
};
cursorHolder.addChild(currentCursor);
addContextMenuHandlers();
if ((systemManager is SystemManager)){
_local3 = new Point((SystemManager(systemManager).mouseX + _local1.x), (SystemManager(systemManager).mouseY + _local1.y));
_local3 = SystemManager(systemManager).localToGlobal(_local3);
_local3 = cursorHolder.parent.globalToLocal(_local3);
cursorHolder.x = _local3.x;
cursorHolder.y = _local3.y;
} else {
if ((systemManager is DisplayObject)){
_local3 = new Point((DisplayObject(systemManager).mouseX + _local1.x), (DisplayObject(systemManager).mouseY + _local1.y));
_local3 = DisplayObject(systemManager).localToGlobal(_local3);
_local3 = cursorHolder.parent.globalToLocal(_local3);
cursorHolder.x = (DisplayObject(systemManager).mouseX + _local1.x);
cursorHolder.y = (DisplayObject(systemManager).mouseY + _local1.y);
} else {
cursorHolder.x = _local1.x;
cursorHolder.y = _local1.y;
};
};
if (systemManager.useSWFBridge()){
sandboxRoot.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
} else {
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true, EventPriority.CURSOR_MANAGEMENT);
};
sandboxRoot.addEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, marshalMouseMoveHandler, false, EventPriority.CURSOR_MANAGEMENT);
if (systemManager.useSWFBridge()){
sandboxRoot.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, true, EventPriority.CURSOR_MANAGEMENT);
} else {
systemManager.stage.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, true, EventPriority.CURSOR_MANAGEMENT);
};
};
currentCursorID = _local1.cursorID;
currentCursorXOffset = _local1.x;
currentCursorYOffset = _local1.y;
};
} else {
showCustomCursor = false;
if (currentCursorID != CursorManager.NO_CURSOR){
currentCursorID = CursorManager.NO_CURSOR;
currentCursorXOffset = 0;
currentCursorYOffset = 0;
cursorHolder.removeChild(currentCursor);
removeSystemManagerHandlers();
removeContextMenuHandlers();
};
Mouse.show();
};
}
public function get currentCursorYOffset():Number{
return (_currentCursorYOffset);
}
private function contextMenu_menuSelectHandler(_arg1:ContextMenuEvent):void{
showCustomCursor = true;
sandboxRoot.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
}
public function hideCursor():void{
var _local1:InterManagerRequest;
if (cursorHolder){
cursorHolder.visible = false;
} else {
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "hideCursor";
sandboxRoot.dispatchEvent(_local1);
};
}
public function showCursor():void{
var _local1:InterManagerRequest;
if (cursorHolder){
cursorHolder.visible = true;
} else {
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "showCursor";
sandboxRoot.dispatchEvent(_local1);
};
}
private function marshalCursorManagerHandler(_arg1:Event):void{
var _local3:InterManagerRequest;
if ((_arg1 is InterManagerRequest)){
return;
};
var _local2:Object = _arg1;
switch (_local2.name){
case "initialized":
initialized = _local2.value;
break;
case "currentCursorID":
_currentCursorID = _local2.value;
break;
case "currentCursorXOffset":
_currentCursorXOffset = _local2.value;
break;
case "currentCursorYOffset":
_currentCursorYOffset = _local2.value;
break;
case "showCursor":
if (cursorHolder){
cursorHolder.visible = true;
};
break;
case "hideCursor":
if (cursorHolder){
cursorHolder.visible = false;
};
break;
case "setCursor":
if (cursorHolder){
_local2.value = setCursor.apply(this, _local2.value);
};
break;
case "removeCursor":
if (cursorHolder){
removeCursor.apply(this, [_local2.value]);
};
break;
case "removeAllCursors":
if (cursorHolder){
removeAllCursors();
};
break;
case "setBusyCursor":
if (cursorHolder){
setBusyCursor();
};
break;
case "removeBusyCursor":
if (cursorHolder){
removeBusyCursor();
};
break;
case "registerToUseBusyCursor":
if (cursorHolder){
registerToUseBusyCursor.apply(this, _local2.value);
};
break;
case "unRegisterToUseBusyCursor":
if (cursorHolder){
unRegisterToUseBusyCursor.apply(this, _local2.value);
};
break;
case "update":
if (cursorHolder){
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "initialized";
_local3.value = true;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorID";
_local3.value = currentCursorID;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorXOffset";
_local3.value = currentCursorXOffset;
sandboxRoot.dispatchEvent(_local3);
_local3 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local3.name = "currentCursorYOffset";
_local3.value = currentCursorYOffset;
sandboxRoot.dispatchEvent(_local3);
};
};
}
public function removeAllCursors():void{
var _local1:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "removeAllCursors";
sandboxRoot.dispatchEvent(_local1);
return;
};
cursorList.splice(0);
showCurrentCursor();
}
private function completeHandler(_arg1:Event):void{
var _local2:int = findSource(_arg1.target);
if (_local2 != -1){
sourceArray.splice(_local2, 1);
removeBusyCursor();
};
}
public function removeBusyCursor():void{
var _local1:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local1 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local1.name = "removeBusyCursor";
sandboxRoot.dispatchEvent(_local1);
return;
};
if (busyCursorList.length > 0){
removeCursor(int(busyCursorList.pop()));
};
}
private function addContextMenuHandlers():void{
var _local1:InteractiveObject;
var _local2:InteractiveObject;
if (!listenForContextMenu){
_local1 = (systemManager.document as InteractiveObject);
_local2 = (systemManager as InteractiveObject);
if (((_local1) && (_local1.contextMenu))){
_local1.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true, EventPriority.CURSOR_MANAGEMENT);
listenForContextMenu = true;
};
if (((_local2) && (_local2.contextMenu))){
_local2.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelectHandler, true, EventPriority.CURSOR_MANAGEMENT);
listenForContextMenu = true;
};
};
}
public function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int{
var _local7:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local7 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local7.name = "setCursor";
_local7.value = [_arg1, _arg2, _arg3, _arg4];
sandboxRoot.dispatchEvent(_local7);
return ((_local7.value as int));
};
var _local5:int = nextCursorID++;
var _local6:CursorQueueItem = new CursorQueueItem();
_local6.cursorID = _local5;
_local6.cursorClass = _arg1;
_local6.priority = _arg2;
_local6.x = _arg3;
_local6.y = _arg4;
if (systemManager){
_local6.systemManager = systemManager;
} else {
_local6.systemManager = ApplicationGlobals.application.systemManager;
};
cursorList.push(_local6);
cursorList.sort(priorityCompare);
showCurrentCursor();
return (_local5);
}
private function progressHandler(_arg1:ProgressEvent):void{
var _local2:int = findSource(_arg1.target);
if (_local2 == -1){
sourceArray.push(_arg1.target);
setBusyCursor();
};
}
private function removeSystemManagerHandlers():void{
if (systemManager.useSWFBridge()){
sandboxRoot.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
} else {
systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
};
sandboxRoot.removeEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, marshalMouseMoveHandler, false);
if (systemManager.useSWFBridge()){
sandboxRoot.removeEventListener(MouseEvent.MOUSE_OUT, mouseMoveHandler, true);
} else {
systemManager.stage.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler, true);
};
}
public function registerToUseBusyCursor(_arg1:Object):void{
var _local2:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "registerToUseBusyCursor";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
return;
};
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local4:SWFBridgeRequest;
var _local5:IEventDispatcher;
var _local2:Point = new Point(_arg1.stageX, _arg1.stageY);
_local2 = cursorHolder.parent.globalToLocal(_local2);
_local2.x = (_local2.x + currentCursorXOffset);
_local2.y = (_local2.y + currentCursorYOffset);
cursorHolder.x = _local2.x;
cursorHolder.y = _local2.y;
var _local3:Object = _arg1.target;
if (((((!(overTextField)) && ((_local3 is TextField)))) && ((_local3.type == TextFieldType.INPUT)))){
overTextField = true;
showSystemCursor = true;
} else {
if (((overTextField) && (!((((_local3 is TextField)) && ((_local3.type == TextFieldType.INPUT))))))){
overTextField = false;
showCustomCursor = true;
} else {
showCustomCursor = true;
};
};
if (showSystemCursor){
showSystemCursor = false;
cursorHolder.visible = false;
Mouse.show();
};
if (showCustomCursor){
showCustomCursor = false;
cursorHolder.visible = true;
Mouse.hide();
_local4 = new SWFBridgeRequest(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST);
if (systemManager.useSWFBridge()){
_local5 = systemManager.swfBridgeGroup.parentBridge;
} else {
_local5 = systemManager;
};
_local4.requestor = _local5;
_local5.dispatchEvent(_local4);
};
}
public function unRegisterToUseBusyCursor(_arg1:Object):void{
var _local2:InterManagerRequest;
if (((initialized) && (!(cursorHolder)))){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "unRegisterToUseBusyCursor";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
return;
};
if (((_arg1) && ((_arg1 is EventDispatcher)))){
_arg1.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.removeEventListener(Event.COMPLETE, completeHandler);
_arg1.removeEventListener(IOErrorEvent.IO_ERROR, completeHandler);
};
}
public function set currentCursorXOffset(_arg1:Number):void{
var _local2:InterManagerRequest;
_currentCursorXOffset = _arg1;
if (!cursorHolder){
_local2 = new InterManagerRequest(InterManagerRequest.CURSOR_MANAGER_REQUEST);
_local2.name = "currentCursorXOffset";
_local2.value = currentCursorXOffset;
sandboxRoot.dispatchEvent(_local2);
};
}
public static function getInstance():ICursorManager{
if (!instance){
instance = new (CursorManagerImpl);
};
return (instance);
}
}
}//package mx.managers
class CursorQueueItem {
public var priority:int;// = 2
public var cursorClass:Class;// = null
public var cursorID:int;// = 0
public var x:Number;
public var y:Number;
public var systemManager:ISystemManager;
mx_internal static const VERSION:String = "3.3.0.4852";
private function CursorQueueItem(){
}
}
Section 569
//CursorManagerPriority (mx.managers.CursorManagerPriority)
package mx.managers {
public final class CursorManagerPriority {
public static const HIGH:int = 1;
public static const MEDIUM:int = 2;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const LOW:int = 3;
}
}//package mx.managers
Section 570
//ICursorManager (mx.managers.ICursorManager)
package mx.managers {
public interface ICursorManager {
function removeAllCursors():void;
function set currentCursorYOffset(_arg1:Number):void;
function removeBusyCursor():void;
function unRegisterToUseBusyCursor(_arg1:Object):void;
function hideCursor():void;
function get currentCursorID():int;
function registerToUseBusyCursor(_arg1:Object):void;
function setBusyCursor():void;
function showCursor():void;
function set currentCursorID(_arg1:int):void;
function setCursor(_arg1:Class, _arg2:int=2, _arg3:Number=0, _arg4:Number=0):int;
function removeCursor(_arg1:int):void;
function get currentCursorXOffset():Number;
function get currentCursorYOffset():Number;
function set currentCursorXOffset(_arg1:Number):void;
}
}//package mx.managers
Section 571
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function 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 572
//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 573
//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 574
//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 575
//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 576
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function 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 577
//IToolTipManager2 (mx.managers.IToolTipManager2)
package mx.managers {
import mx.core.*;
import flash.display.*;
import mx.effects.*;
public interface IToolTipManager2 {
function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function get scrubDelay():Number;
function set hideEffect(_arg1:IAbstractEffect):void;
function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip;
function set scrubDelay(_arg1:Number):void;
function set hideDelay(_arg1:Number):void;
function get currentTarget():DisplayObject;
function set showDelay(_arg1:Number):void;
function get showDelay():Number;
function get showEffect():IAbstractEffect;
function get hideDelay():Number;
function get currentToolTip():IToolTip;
function get hideEffect():IAbstractEffect;
function set currentToolTip(_arg1:IToolTip):void;
function get toolTipClass():Class;
function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void;
function destroyToolTip(_arg1:IToolTip):void;
function set toolTipClass(_arg1:Class):void;
function sizeTip(_arg1:IToolTip):void;
function set currentTarget(_arg1:DisplayObject):void;
function set showEffect(_arg1:IAbstractEffect):void;
}
}//package mx.managers
Section 578
//IToolTipManagerClient (mx.managers.IToolTipManagerClient)
package mx.managers {
import mx.core.*;
public interface IToolTipManagerClient extends IFlexDisplayObject {
function get toolTip():String;
function set toolTip(_arg1:String):void;
}
}//package mx.managers
Section 579
//LayoutManager (mx.managers.LayoutManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.events.*;
import mx.managers.layoutClasses.*;
public class LayoutManager extends EventDispatcher implements ILayoutManager {
private var invalidateClientPropertiesFlag:Boolean;// = false
private var invalidateDisplayListQueue:PriorityQueue;
private var updateCompleteQueue:PriorityQueue;
private var invalidateDisplayListFlag:Boolean;// = false
private var invalidateClientSizeFlag:Boolean;// = false
private var invalidateSizeQueue:PriorityQueue;
private var originalFrameRate:Number;
private var invalidatePropertiesFlag:Boolean;// = false
private var invalidatePropertiesQueue:PriorityQueue;
private var invalidateSizeFlag:Boolean;// = false
private var callLaterPending:Boolean;// = false
private var _usePhasedInstantiation:Boolean;// = false
private var callLaterObject:UIComponent;
private var targetLevel:int;// = 2147483647
mx_internal static const VERSION:String = "3.3.0.4852";
private static var instance:LayoutManager;
public function LayoutManager(){
updateCompleteQueue = new PriorityQueue();
invalidatePropertiesQueue = new PriorityQueue();
invalidateSizeQueue = new PriorityQueue();
invalidateDisplayListQueue = new PriorityQueue();
super();
}
public function set usePhasedInstantiation(_arg1:Boolean):void{
var sm:ISystemManager;
var stage:Stage;
var value = _arg1;
if (_usePhasedInstantiation != value){
_usePhasedInstantiation = value;
try {
sm = SystemManagerGlobals.topLevelSystemManagers[0];
stage = SystemManagerGlobals.topLevelSystemManagers[0].stage;
if (stage){
if (value){
originalFrameRate = stage.frameRate;
stage.frameRate = 1000;
} else {
stage.frameRate = originalFrameRate;
};
};
} catch(e:SecurityError) {
};
};
}
private function waitAFrame():void{
callLaterObject.callLater(doPhasedInstantiation);
}
public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{
var _local3:ILayoutManagerClient;
var _local4:int;
var _local5:Boolean;
var _local6:int = targetLevel;
if (targetLevel == int.MAX_VALUE){
targetLevel = _arg1.nestLevel;
};
while (!(_local5)) {
_local5 = true;
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateProperties();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
invalidateClientPropertiesFlag = false;
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
while (_local3) {
_local3.validateSize();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
invalidateClientSizeFlag = false;
};
if (!_arg2){
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
while (_local3) {
_local3.validateDisplayList();
if (!_local3.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local3, _local3.nestLevel);
_local3.updateCompletePendingFlag = true;
};
if (invalidateClientPropertiesFlag){
_local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1));
if (_local3){
invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
if (invalidateClientSizeFlag){
_local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1));
if (_local3){
invalidateSizeQueue.addObject(_local3, _local3.nestLevel);
_local5 = false;
break;
};
};
_local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1));
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
};
};
if (_local6 == int.MAX_VALUE){
targetLevel = int.MAX_VALUE;
if (!_arg2){
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
while (_local3) {
if (!_local3.initialized){
_local3.initialized = true;
};
_local3.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local3.updateCompletePendingFlag = false;
_local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1));
};
};
};
}
private function validateProperties():void{
var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
while (_local1) {
_local1.validateProperties();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest());
};
if (invalidatePropertiesQueue.isEmpty()){
invalidatePropertiesFlag = false;
};
}
public function invalidateProperties(_arg1:ILayoutManagerClient):void{
if (((!(invalidatePropertiesFlag)) && (ApplicationGlobals.application.systemManager))){
invalidatePropertiesFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientPropertiesFlag = true;
};
invalidatePropertiesQueue.addObject(_arg1, _arg1.nestLevel);
}
public function invalidateDisplayList(_arg1:ILayoutManagerClient):void{
if (((!(invalidateDisplayListFlag)) && (ApplicationGlobals.application.systemManager))){
invalidateDisplayListFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
} else {
if (((!(invalidateDisplayListFlag)) && (!(ApplicationGlobals.application.systemManager)))){
};
};
invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel);
}
private function validateDisplayList():void{
var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
while (_local1) {
_local1.validateDisplayList();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest());
};
if (invalidateDisplayListQueue.isEmpty()){
invalidateDisplayListFlag = false;
};
}
public function validateNow():void{
var _local1:int;
if (!usePhasedInstantiation){
_local1 = 0;
while (((callLaterPending) && ((_local1 < 100)))) {
doPhasedInstantiation();
};
};
}
private function validateSize():void{
var _local1:ILayoutManagerClient = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
while (_local1) {
_local1.validateSize();
if (!_local1.updateCompletePendingFlag){
updateCompleteQueue.addObject(_local1, _local1.nestLevel);
_local1.updateCompletePendingFlag = true;
};
_local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest());
};
if (invalidateSizeQueue.isEmpty()){
invalidateSizeFlag = false;
};
}
private function doPhasedInstantiation():void{
var _local1:ILayoutManagerClient;
if (usePhasedInstantiation){
if (invalidatePropertiesFlag){
validateProperties();
ApplicationGlobals.application.dispatchEvent(new Event("validatePropertiesComplete"));
} else {
if (invalidateSizeFlag){
validateSize();
ApplicationGlobals.application.dispatchEvent(new Event("validateSizeComplete"));
} else {
if (invalidateDisplayListFlag){
validateDisplayList();
ApplicationGlobals.application.dispatchEvent(new Event("validateDisplayListComplete"));
};
};
};
} else {
if (invalidatePropertiesFlag){
validateProperties();
};
if (invalidateSizeFlag){
validateSize();
};
if (invalidateDisplayListFlag){
validateDisplayList();
};
};
if (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))){
callLaterObject.callLater(doPhasedInstantiation);
} else {
usePhasedInstantiation = false;
callLaterPending = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
while (_local1) {
if (((!(_local1.initialized)) && (_local1.processedDescriptors))){
_local1.initialized = true;
};
_local1.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
_local1.updateCompletePendingFlag = false;
_local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest());
};
dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
};
}
public function isInvalid():Boolean{
return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag)));
}
public function get usePhasedInstantiation():Boolean{
return (_usePhasedInstantiation);
}
public function invalidateSize(_arg1:ILayoutManagerClient):void{
if (((!(invalidateSizeFlag)) && (ApplicationGlobals.application.systemManager))){
invalidateSizeFlag = true;
if (!callLaterPending){
if (!callLaterObject){
callLaterObject = new UIComponent();
callLaterObject.systemManager = ApplicationGlobals.application.systemManager;
callLaterObject.callLater(waitAFrame);
} else {
callLaterObject.callLater(doPhasedInstantiation);
};
callLaterPending = true;
};
};
if (targetLevel <= _arg1.nestLevel){
invalidateClientSizeFlag = true;
};
invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel);
}
public static function getInstance():LayoutManager{
if (!instance){
instance = new (LayoutManager);
};
return (instance);
}
}
}//package mx.managers
Section 580
//PopUpManagerChildList (mx.managers.PopUpManagerChildList)
package mx.managers {
public final class PopUpManagerChildList {
public static const PARENT:String = "parent";
public static const APPLICATION:String = "application";
mx_internal static const VERSION:String = "3.3.0.4852";
public static const POPUP:String = "popup";
}
}//package mx.managers
Section 581
//SystemChildrenList (mx.managers.SystemChildrenList)
package mx.managers {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
public class SystemChildrenList implements IChildList {
private var lowerBoundReference:QName;
private var upperBoundReference:QName;
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.3.0.4852";
public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){
this.owner = _arg1;
this.lowerBoundReference = _arg2;
this.upperBoundReference = _arg3;
}
public function getChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1));
return (_local2);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = owner.mx_internal::rawChildren_removeChildAt((_arg1 + owner[lowerBoundReference]));
var _local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
return (_local2);
}
public function getChildIndex(_arg1:DisplayObject):int{
var _local2:int = owner.mx_internal::rawChildren_getChildIndex(_arg1);
_local2 = (_local2 - owner[lowerBoundReference]);
return (_local2);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
var _local3 = owner;
_local3.mx_internal::rawChildren_addChildAt(_arg1, (owner[lowerBoundReference] + _arg2));
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
return (_arg1);
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, (owner[lowerBoundReference] + _arg2));
}
public function get numChildren():int{
return ((owner[upperBoundReference] - owner[lowerBoundReference]));
}
public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
if (((!((_arg1 == owner))) && (owner.mx_internal::rawChildren_contains(_arg1)))){
while (_arg1.parent != owner) {
_arg1 = _arg1.parent;
};
_local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((_local2 >= owner[lowerBoundReference])) && ((_local2 < owner[upperBoundReference])))){
return (true);
};
};
return (false);
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
var _local2:int = owner.mx_internal::rawChildren_getChildIndex(_arg1);
if ((((owner[lowerBoundReference] <= _local2)) && ((_local2 < owner[upperBoundReference])))){
var _local3 = owner;
_local3.mx_internal::rawChildren_removeChild(_arg1);
_local3 = owner;
var _local4 = upperBoundReference;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
};
return (_arg1);
}
public function addChild(_arg1:DisplayObject):DisplayObject{
var _local2 = owner;
_local2.mx_internal::rawChildren_addChildAt(_arg1, owner[upperBoundReference]);
_local2 = owner;
var _local3 = upperBoundReference;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
return (_arg1);
}
}
}//package mx.managers
Section 582
//SystemManager (mx.managers.SystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.system.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.systemClasses.*;
import mx.preloaders.*;
import mx.utils.*;
import mx.messaging.config.*;
public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager, ISWFBridgeProvider {
private var _stage:Stage;
mx_internal var nestLevel:int;// = 0
private var currentSandboxEvent:Event;
private var forms:Array;
private var mouseCatcher:Sprite;
private var _height:Number;
private var dispatchingToSystemManagers:Boolean;// = false
private var preloader:Preloader;
private var lastFrame:int;
private var _document:Object;
private var strongReferenceProxies:Dictionary;
private var _rawChildren:SystemRawChildrenList;
private var _topLevelSystemManager:ISystemManager;
private var _toolTipIndex:int;// = 0
private var _bridgeToFocusManager:Dictionary;
private var _explicitHeight:Number;
private var idToPlaceholder:Object;
private var _swfBridgeGroup:ISWFBridgeGroup;
private var _toolTipChildren:SystemChildrenList;
private var form:Object;
private var _width:Number;
private var initialized:Boolean;// = false
private var _focusPane:Sprite;
private var _fontList:Object;// = null
private var isStageRoot:Boolean;// = true
private var _popUpChildren:SystemChildrenList;
private var rslSizes:Array;// = null
private var _topMostIndex:int;// = 0
private var nextFrameTimer:Timer;// = null
mx_internal var topLevel:Boolean;// = true
private var weakReferenceProxies:Dictionary;
private var _cursorIndex:int;// = 0
private var isBootstrapRoot:Boolean;// = false
mx_internal var _mouseY;
private var _numModalWindows:int;// = 0
mx_internal var _mouseX;
private var _screen:Rectangle;
mx_internal var idleCounter:int;// = 0
private var _cursorChildren:SystemChildrenList;
private var initCallbackFunctions:Array;
private var _noTopMostIndex:int;// = 0
private var _applicationIndex:int;// = 1
private var isDispatchingResizeEvent:Boolean;
private var idleTimer:Timer;
private var doneExecutingInitCallbacks:Boolean;// = false
private var _explicitWidth:Number;
private var eventProxy:EventProxy;
mx_internal var topLevelWindow:IUIComponent;
private static const IDLE_THRESHOLD:Number = 1000;
private static const IDLE_INTERVAL:Number = 100;
mx_internal static const VERSION:String = "3.3.0.4852";
mx_internal static var lastSystemManager:SystemManager;
mx_internal static var allSystemManagers:Dictionary = new Dictionary(true);
public function SystemManager(){
initCallbackFunctions = [];
forms = [];
weakReferenceProxies = new Dictionary(true);
strongReferenceProxies = new Dictionary(false);
super();
if (stage){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
};
if ((((SystemManagerGlobals.topLevelSystemManagers.length > 0)) && (!(stage)))){
topLevel = false;
};
if (!stage){
isStageRoot = false;
};
if (topLevel){
SystemManagerGlobals.topLevelSystemManagers.push(this);
};
lastSystemManager = this;
var _local1:Array = info()["compiledLocales"];
ResourceBundle.locale = (((!((_local1 == null))) && ((_local1.length > 0)))) ? _local1[0] : "en_US";
executeCallbacks();
stop();
if (((topLevel) && (!((currentFrame == 1))))){
throw (new Error((("The SystemManager constructor was called when the currentFrame was at " + currentFrame) + " Please add this SWF to bug 129782.")));
};
if (((root) && (root.loaderInfo))){
root.loaderInfo.addEventListener(Event.INIT, initHandler);
};
}
private function removeEventListenerFromSandboxes(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:IEventDispatcher=null):void{
var _local8:int;
if (!swfBridgeGroup){
return;
};
var _local5:EventListenerRequest = new EventListenerRequest(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, false, false, _arg1, _arg3);
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local6) && (!((_local6 == _arg4))))){
_local6.removeEventListener(_arg1, _arg2, _arg3);
};
var _local7:Array = swfBridgeGroup.getChildBridges();
while (_local8 < _local7.length) {
if (_local7[_local8] != _arg4){
IEventDispatcher(_local7[_local8]).removeEventListener(_arg1, _arg2, _arg3);
};
_local8++;
};
dispatchEventFromSWFBridges(_local5, _arg4);
}
mx_internal function addingChild(_arg1:DisplayObject):void{
var _local4:DisplayObjectContainer;
var _local2 = 1;
if (((!(topLevel)) && (parent))){
_local4 = parent.parent;
while (_local4) {
if ((_local4 is ILayoutManagerClient)){
_local2 = (ILayoutManagerClient(_local4).nestLevel + 1);
break;
};
_local4 = _local4.parent;
};
};
nestLevel = _local2;
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).systemManager = this;
};
var _local3:Class = Class(getDefinitionByName("mx.core.UIComponent"));
if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){
IUIComponent(_arg1).document = document;
};
if ((_arg1 is ILayoutManagerClient)){
ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1);
};
if ((_arg1 is InteractiveObject)){
if (doubleClickEnabled){
InteractiveObject(_arg1).doubleClickEnabled = true;
};
};
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(this);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).regenerateStyleCache(true);
};
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleChanged(null);
};
if ((_arg1 is IStyleClient)){
IStyleClient(_arg1).notifyStyleChangeInChildren(null, true);
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).initThemeColor();
};
if (((_local3) && ((_arg1 is _local3)))){
_local3(_arg1).stylesInitialized();
};
}
private function dispatchEventToOtherSystemManagers(_arg1:Event):void{
dispatchingToSystemManagers = true;
var _local2:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
if (_local2[_local4] != this){
_local2[_local4].dispatchEvent(_arg1);
};
_local4++;
};
dispatchingToSystemManagers = false;
}
private function idleTimer_timerHandler(_arg1:TimerEvent):void{
idleCounter++;
if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){
dispatchEvent(new FlexEvent(FlexEvent.IDLE));
};
}
private function initManagerHandler(_arg1:Event):void{
var event = _arg1;
if (!dispatchingToSystemManagers){
dispatchEventToOtherSystemManagers(event);
};
if ((event is InterManagerRequest)){
return;
};
var name:String = event["name"];
try {
Singleton.getInstance(name);
} catch(e:Error) {
};
}
private function getSizeRequestHandler(_arg1:Event):void{
var _local2:Object = Object(_arg1);
_local2.data = {width:measuredWidth, height:measuredHeight};
}
private function beforeUnloadHandler(_arg1:Event):void{
var _local2:DisplayObject;
if (((topLevel) && (stage))){
_local2 = getSandboxRoot();
if (_local2 != this){
_local2.removeEventListener(Event.RESIZE, Stage_resizeHandler);
};
};
removeParentBridgeListeners();
dispatchEvent(_arg1);
}
public function getExplicitOrMeasuredHeight():Number{
return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight);
}
private function getVisibleRectRequestHandler(_arg1:Event):void{
var _local5:Rectangle;
var _local7:Point;
var _local8:IEventDispatcher;
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Rectangle = Rectangle(_local2.data);
var _local4:DisplayObject = DisplayObject(swfBridgeGroup.getChildBridgeProvider(_local2.requestor));
var _local6:Boolean;
if (!DisplayObjectContainer(document).contains(_local4)){
_local6 = false;
};
if ((_local4 is ISWFLoader)){
_local5 = ISWFLoader(_local4).getVisibleApplicationRect();
} else {
_local5 = _local4.getBounds(this);
_local7 = localToGlobal(_local5.topLeft);
_local5.x = _local7.x;
_local5.y = _local7.y;
};
_local3 = _local3.intersection(_local5);
_local2.data = _local3;
if (((_local6) && (useSWFBridge()))){
_local8 = swfBridgeGroup.parentBridge;
_local2.requestor = _local8;
_local8.dispatchEvent(_local2);
};
Object(_arg1).data = _local2.data;
}
mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
var _local6:IStyleClient;
var _local3:Boolean;
var _local4:int = rawChildren.numChildren;
var _local5:int;
while (_local5 < _local4) {
_local6 = (rawChildren.getChildAt(_local5) as IStyleClient);
if (_local6){
_local6.styleChanged(_arg1);
_local6.notifyStyleChangeInChildren(_arg1, _arg2);
};
if (isTopLevelWindow(DisplayObject(_local6))){
_local3 = true;
};
_local4 = rawChildren.numChildren;
_local5++;
};
if (((!(_local3)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).styleChanged(_arg1);
IStyleClient(topLevelWindow).notifyStyleChangeInChildren(_arg1, _arg2);
};
}
mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{
return (super.getObjectsUnderPoint(_arg1));
}
private function initHandler(_arg1:Event):void{
var bridgeEvent:SWFBridgeEvent;
var event = _arg1;
if (!isStageRoot){
if (root.loaderInfo.parentAllowsChild){
try {
if (((!(parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))) || (!(root.loaderInfo.sharedEvents.hasEventListener(SWFBridgeEvent.BRIDGE_NEW_APPLICATION))))){
isBootstrapRoot = true;
};
} catch(e:Error) {
};
};
};
allSystemManagers[this] = this.loaderInfo.url;
root.loaderInfo.removeEventListener(Event.INIT, initHandler);
if (useSWFBridge()){
swfBridgeGroup = new SWFBridgeGroup(this);
swfBridgeGroup.parentBridge = loaderInfo.sharedEvents;
addParentBridgeListeners();
bridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_NEW_APPLICATION);
bridgeEvent.data = swfBridgeGroup.parentBridge;
swfBridgeGroup.parentBridge.dispatchEvent(bridgeEvent);
addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
root.loaderInfo.addEventListener(Event.UNLOAD, unloadHandler, false, 0, true);
};
var sbRoot:DisplayObject = getSandboxRoot();
sbRoot.addEventListener(InterManagerRequest.INIT_MANAGER_REQUEST, initManagerHandler, false, 0, true);
if (sbRoot == this){
addEventListener(InterManagerRequest.SYSTEM_MANAGER_REQUEST, systemManagerHandler);
addEventListener(InterManagerRequest.DRAG_MANAGER_REQUEST, multiWindowRedispatcher);
addEventListener("dispatchDragEvent", multiWindowRedispatcher);
addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
};
var docFrame:int = ((totalFrames)==1) ? 0 : 1;
addEventListener(Event.ENTER_FRAME, docFrameListener);
initialize();
}
mx_internal function findFocusManagerContainer(_arg1:SystemManagerProxy):IFocusManagerContainer{
var _local5:DisplayObject;
var _local2:IChildList = _arg1.rawChildren;
var _local3:int = _local2.numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = _local2.getChildAt(_local4);
if ((_local5 is IFocusManagerContainer)){
return (IFocusManagerContainer(_local5));
};
_local4++;
};
return (null);
}
private function addPlaceholderPopupRequestHandler(_arg1:Event):void{
var _local3:RemotePopUp;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (((!((_arg1.target == this))) && ((_arg1 is SWFBridgeRequest)))){
return;
};
if (!forwardPlaceholderRequest(_local2, true)){
_local3 = new RemotePopUp(_local2.data.placeHolderId, _local2.requestor);
forms.push(_local3);
};
}
override public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
if (super.contains(_arg1)){
if (_arg1.parent == this){
_local2 = super.getChildIndex(_arg1);
if (_local2 < noTopMostIndex){
return (true);
};
} else {
_local3 = 0;
while (_local3 < noTopMostIndex) {
_local4 = super.getChildAt(_local3);
if ((_local4 is IRawChildrenContainer)){
if (IRawChildrenContainer(_local4).rawChildren.contains(_arg1)){
return (true);
};
};
if ((_local4 is DisplayObjectContainer)){
if (DisplayObjectContainer(_local4).contains(_arg1)){
return (true);
};
};
_local3++;
};
};
};
return (false);
}
private function modalWindowRequestHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!preProcessModalWindowRequest(_local2, getSandboxRoot())){
return;
};
Singleton.getInstance("mx.managers::IPopUpManager");
dispatchEvent(_local2);
}
private function activateApplicationSandboxEventHandler(_arg1:Event):void{
if (!isTopLevelRoot()){
swfBridgeGroup.parentBridge.dispatchEvent(_arg1);
return;
};
activateForm(document);
}
public function getDefinitionByName(_arg1:String):Object{
var _local3:Object;
var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain);
if (_local2.hasDefinition(_arg1)){
_local3 = _local2.getDefinition(_arg1);
};
return (_local3);
}
public function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void{
var _local3:InterManagerRequest;
if (getSandboxRoot() == this){
this[_arg1].removeChild(_arg2);
} else {
removingChild(_arg2);
_local3 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = (_arg1 + ".removeChild");
_local3.value = _arg2;
getSandboxRoot().dispatchEvent(_local3);
childRemoved(_arg2);
};
}
private function removeEventListenerFromOtherSystemManagers(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
var _local4:Array = SystemManagerGlobals.topLevelSystemManagers;
if (_local4.length < 2){
return;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var _local5:int = _local4.length;
var _local6:int;
while (_local6 < _local5) {
if (_local4[_local6] != this){
_local4[_local6].removeEventListener(_arg1, _arg2, _arg3);
};
_local6++;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
private function addEventListenerToOtherSystemManagers(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
var _local6:Array = SystemManagerGlobals.topLevelSystemManagers;
if (_local6.length < 2){
return;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
if (_local6[_local8] != this){
_local6[_local8].addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
};
_local8++;
};
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
public function get embeddedFontList():Object{
var _local1:Object;
var _local2:String;
var _local3:Object;
if (_fontList == null){
_fontList = {};
_local1 = info()["fonts"];
for (_local2 in _local1) {
_fontList[_local2] = _local1[_local2];
};
if (((!(topLevel)) && (_topLevelSystemManager))){
_local3 = _topLevelSystemManager.embeddedFontList;
for (_local2 in _local3) {
_fontList[_local2] = _local3[_local2];
};
};
};
return (_fontList);
}
mx_internal function set cursorIndex(_arg1:int):void{
var _local2:int = (_arg1 - _cursorIndex);
_cursorIndex = _arg1;
}
mx_internal function addChildBridgeListeners(_arg1:IEventDispatcher):void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).addChildBridgeListeners(_arg1);
return;
};
_arg1.addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
_arg1.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
_arg1.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
_arg1.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
_arg1.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
_arg1.addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
public function set document(_arg1:Object):void{
_document = _arg1;
}
override public function getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt((applicationIndex + _arg1)));
}
public function get rawChildren():IChildList{
if (!_rawChildren){
_rawChildren = new SystemRawChildrenList(this);
};
return (_rawChildren);
}
private function findLastActiveForm(_arg1:Object):Object{
var _local2:int = forms.length;
var _local3:int = (forms.length - 1);
while (_local3 >= 0) {
if (((!((forms[_local3] == _arg1))) && (canActivatePopUp(forms[_local3])))){
return (forms[_local3]);
};
_local3--;
};
return (null);
}
private function multiWindowRedispatcher(_arg1:Event):void{
if (!dispatchingToSystemManagers){
dispatchEventToOtherSystemManagers(_arg1);
};
}
public function deployMouseShields(_arg1:Boolean):void{
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST, false, false, "mouseShield", _arg1);
getSandboxRoot().dispatchEvent(_local2);
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
var newListener:StageEventProxy;
var actualType:String;
var type = _arg1;
var listener = _arg2;
var useCapture = _arg3;
var priority = _arg4;
var useWeakReference = _arg5;
if ((((type == FlexEvent.RENDER)) || ((type == FlexEvent.ENTER_FRAME)))){
if (type == FlexEvent.RENDER){
type = Event.RENDER;
} else {
type = Event.ENTER_FRAME;
};
try {
if (stage){
stage.addEventListener(type, listener, useCapture, priority, useWeakReference);
} else {
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
};
} catch(error:SecurityError) {
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
};
if (((stage) && ((type == Event.RENDER)))){
stage.invalidate();
};
return;
};
if ((((((((((type == MouseEvent.MOUSE_MOVE)) || ((type == MouseEvent.MOUSE_UP)))) || ((type == MouseEvent.MOUSE_DOWN)))) || ((type == Event.ACTIVATE)))) || ((type == Event.DEACTIVATE)))){
try {
if (stage){
newListener = new StageEventProxy(listener);
stage.addEventListener(type, newListener.stageListener, false, priority, useWeakReference);
if (useWeakReference){
weakReferenceProxies[listener] = newListener;
} else {
strongReferenceProxies[listener] = newListener;
};
};
} catch(error:SecurityError) {
};
};
if (((hasSWFBridges()) || ((SystemManagerGlobals.topLevelSystemManagers.length > 1)))){
if (!eventProxy){
eventProxy = new EventProxy(this);
};
actualType = EventUtil.sandboxMouseEventMap[type];
if (actualType){
if (isTopLevelRoot()){
stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
addEventListenerToSandboxes(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
} else {
super.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
};
addEventListenerToSandboxes(type, sandboxMouseListener, useCapture, priority, useWeakReference);
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers){
addEventListenerToOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture, priority, useWeakReference);
};
if (getSandboxRoot() == this){
super.addEventListener(actualType, eventProxy.marshalListener, useCapture, priority, useWeakReference);
};
super.addEventListener(type, listener, false, priority, useWeakReference);
return;
};
};
if ((((type == FlexEvent.IDLE)) && (!(idleTimer)))){
idleTimer = new Timer(IDLE_INTERVAL);
idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler);
idleTimer.start();
addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true);
};
super.addEventListener(type, listener, useCapture, priority, useWeakReference);
}
private function activateForm(_arg1:Object):void{
var _local2:IFocusManagerContainer;
if (form){
if (((!((form == _arg1))) && ((forms.length > 1)))){
if (isRemotePopUp(form)){
if (!areRemotePopUpsEqual(form, _arg1)){
deactivateRemotePopUp(form);
};
} else {
_local2 = IFocusManagerContainer(form);
_local2.focusManager.deactivate();
};
};
};
form = _arg1;
if (isRemotePopUp(_arg1)){
activateRemotePopUp(_arg1);
} else {
if (_arg1.focusManager){
_arg1.focusManager.activate();
};
};
updateLastActiveForm();
}
public function removeFocusManager(_arg1:IFocusManagerContainer):void{
var _local2:int = forms.length;
var _local3:int;
while (_local3 < _local2) {
if (forms[_local3] == _arg1){
if (form == _arg1){
deactivate(_arg1);
};
dispatchDeactivatedWindowEvent(DisplayObject(_arg1));
forms.splice(_local3, 1);
return;
};
_local3++;
};
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
private function getSandboxScreen():Rectangle{
var _local2:Rectangle;
var _local3:DisplayObject;
var _local4:InterManagerRequest;
var _local1:DisplayObject = getSandboxRoot();
if (_local1 == this){
_local2 = new Rectangle(0, 0, width, height);
} else {
if (_local1 == topLevelSystemManager){
_local3 = DisplayObject(topLevelSystemManager);
_local2 = new Rectangle(0, 0, _local3.width, _local3.height);
} else {
_local4 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false, "screen");
_local1.dispatchEvent(_local4);
_local2 = Rectangle(_local4.value);
};
};
return (_local2);
}
public function get focusPane():Sprite{
return (_focusPane);
}
override public function get mouseX():Number{
if (_mouseX === undefined){
return (super.mouseX);
};
return (_mouseX);
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local3:int;
var _local4:DisplayObject;
var _local5:Boolean;
var _local6:int;
var _local7:Object;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:IChildList;
var _local12:DisplayObject;
var _local13:Boolean;
var _local14:int;
idleCounter = 0;
var _local2:IEventDispatcher = getSWFBridgeOfDisplayObject((_arg1.target as DisplayObject));
if (((_local2) && ((bridgeToFocusManager[_local2] == document.focusManager)))){
if (isTopLevelRoot()){
activateForm(document);
} else {
dispatchActivatedApplicationEvent();
};
return;
};
if (numModalWindows == 0){
if (((!(isTopLevelRoot())) || ((forms.length > 1)))){
_local3 = forms.length;
_local4 = DisplayObject(_arg1.target);
_local5 = document.rawChildren.contains(_local4);
while (_local4) {
_local6 = 0;
while (_local6 < _local3) {
_local7 = (isRemotePopUp(forms[_local6])) ? forms[_local6].window : forms[_local6];
if (_local7 == _local4){
_local8 = 0;
if (((((!((_local4 == form))) && ((_local4 is IFocusManagerContainer)))) || (((!(isTopLevelRoot())) && ((_local4 == form)))))){
if (isTopLevelRoot()){
activate(IFocusManagerContainer(_local4));
};
if (_local4 == document){
dispatchActivatedApplicationEvent();
} else {
if ((_local4 is DisplayObject)){
dispatchActivatedWindowEvent(DisplayObject(_local4));
};
};
};
if (popUpChildren.contains(_local4)){
_local11 = popUpChildren;
} else {
_local11 = this;
};
_local9 = _local11.getChildIndex(_local4);
_local10 = _local9;
_local3 = forms.length;
_local8 = 0;
for (;_local8 < _local3;_local8++) {
_local13 = isRemotePopUp(forms[_local8]);
if (_local13){
if ((forms[_local8].window is String)){
continue;
};
_local12 = forms[_local8].window;
} else {
_local12 = forms[_local8];
};
if (_local13){
_local14 = getChildListIndex(_local11, _local12);
if (_local14 > _local9){
_local10 = Math.max(_local14, _local10);
};
} else {
if (_local11.contains(_local12)){
if (_local11.getChildIndex(_local12) > _local9){
_local10 = Math.max(_local11.getChildIndex(_local12), _local10);
};
};
};
};
if ((((_local10 > _local9)) && (!(_local5)))){
_local11.setChildIndex(_local4, _local10);
};
return;
};
_local6++;
};
_local4 = _local4.parent;
};
} else {
dispatchActivatedApplicationEvent();
};
};
}
private function removePopupRequestHandler(_arg1:Event):void{
var _local3:SWFBridgeRequest;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (((swfBridgeGroup.parentBridge) && (SecurityUtil.hasMutualTrustBetweenParentAndChild(this)))){
_local2.requestor = swfBridgeGroup.parentBridge;
getSandboxRoot().dispatchEvent(_local2);
return;
};
if (popUpChildren.contains(_local2.data.window)){
popUpChildren.removeChild(_local2.data.window);
} else {
removeChild(DisplayObject(_local2.data.window));
};
if (_local2.data.modal){
numModalWindows--;
};
removeRemotePopUp(new RemotePopUp(_local2.data.window, _local2.requestor));
if (((!(isTopLevelRoot())) && (swfBridgeGroup))){
_local3 = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false, _local2.requestor, {placeHolderId:NameUtil.displayObjectToString(_local2.data.window)});
dispatchEvent(_local3);
};
}
public function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void{
var _local3:IFocusManager;
var _local4:DisplayObject = _arg2;
while (_local4) {
if ((_local4 is IFocusManagerContainer)){
_local3 = IFocusManagerContainer(_local4).focusManager;
break;
};
_local4 = _local4.parent;
};
if (!_local3){
return;
};
if (!swfBridgeGroup){
swfBridgeGroup = new SWFBridgeGroup(this);
};
swfBridgeGroup.addChildBridge(_arg1, ISWFBridgeProvider(_arg2));
_local3.addSWFBridge(_arg1, _arg2);
if (!bridgeToFocusManager){
bridgeToFocusManager = new Dictionary();
};
bridgeToFocusManager[_arg1] = _local3;
addChildBridgeListeners(_arg1);
dispatchEvent(new FlexChangeEvent(FlexChangeEvent.ADD_CHILD_BRIDGE, false, false, _arg1));
}
public function get screen():Rectangle{
if (!_screen){
Stage_resizeHandler();
};
if (!isStageRoot){
Stage_resizeHandler();
};
return (_screen);
}
private function resetMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
} else {
if (eventProxy){
SystemManagerGlobals.showMouseCursor = true;
};
};
}
mx_internal function set topMostIndex(_arg1:int):void{
var _local2:int = (_arg1 - _topMostIndex);
_topMostIndex = _arg1;
toolTipIndex = (toolTipIndex + _local2);
}
mx_internal function docFrameHandler(_arg1:Event=null):void{
var _local2:TextFieldFactory;
var _local4:int;
var _local5:int;
var _local6:Class;
Singleton.registerClass("mx.managers::IBrowserManager", Class(getDefinitionByName("mx.managers::BrowserManagerImpl")));
Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl")));
Singleton.registerClass("mx.managers::IHistoryManager", Class(getDefinitionByName("mx.managers::HistoryManagerImpl")));
Singleton.registerClass("mx.managers::ILayoutManager", Class(getDefinitionByName("mx.managers::LayoutManager")));
Singleton.registerClass("mx.managers::IPopUpManager", Class(getDefinitionByName("mx.managers::PopUpManagerImpl")));
Singleton.registerClass("mx.managers::IToolTipManager2", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl")));
if (Capabilities.playerType == "Desktop"){
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::NativeDragManagerImpl")));
if (Singleton.getClass("mx.managers::IDragManager") == null){
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
};
} else {
Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl")));
};
Singleton.registerClass("mx.core::ITextFieldFactory", Class(getDefinitionByName("mx.core::TextFieldFactory")));
executeCallbacks();
doneExecutingInitCallbacks = true;
var _local3:Array = info()["mixins"];
if (((_local3) && ((_local3.length > 0)))){
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = Class(getDefinitionByName(_local3[_local5]));
var _local7 = _local6;
_local7["init"](this);
_local5++;
};
};
installCompiledResourceBundles();
initializeTopLevelWindow(null);
deferredNextFrame();
}
public function get explicitHeight():Number{
return (_explicitHeight);
}
public function get preloaderBackgroundSize():String{
return (info()["backgroundSize"]);
}
public function isTopLevel():Boolean{
return (topLevel);
}
override public function get mouseY():Number{
if (_mouseY === undefined){
return (super.mouseY);
};
return (_mouseY);
}
public function getExplicitOrMeasuredWidth():Number{
return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth);
}
public function deactivate(_arg1:IFocusManagerContainer):void{
deactivateForm(Object(_arg1));
}
private function preProcessModalWindowRequest(_arg1:SWFBridgeRequest, _arg2:DisplayObject):Boolean{
var _local3:IEventDispatcher;
var _local4:ISWFLoader;
var _local5:Rectangle;
if (_arg1.data.skip){
_arg1.data.skip = false;
if (useSWFBridge()){
_local3 = swfBridgeGroup.parentBridge;
_arg1.requestor = _local3;
_local3.dispatchEvent(_arg1);
};
return (false);
};
if (this != _arg2){
if ((((_arg1.type == SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST)) || ((_arg1.type == SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST)))){
_local4 = (swfBridgeGroup.getChildBridgeProvider(_arg1.requestor) as ISWFLoader);
if (_local4){
_local5 = ISWFLoader(_local4).getVisibleApplicationRect();
_arg1.data.excludeRect = _local5;
if (!DisplayObjectContainer(document).contains(DisplayObject(_local4))){
_arg1.data.useExclude = false;
};
};
};
_local3 = swfBridgeGroup.parentBridge;
_arg1.requestor = _local3;
if (_arg1.type == SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST){
_arg2.dispatchEvent(_arg1);
} else {
_local3.dispatchEvent(_arg1);
};
return (false);
};
_arg1.data.skip = false;
return (true);
}
private function resetMouseCursorTracking(_arg1:Event):void{
var _local2:SWFBridgeRequest;
var _local3:IEventDispatcher;
if (isTopLevelRoot()){
SystemManagerGlobals.showMouseCursor = true;
} else {
if (swfBridgeGroup.parentBridge){
_local2 = new SWFBridgeRequest(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST);
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
};
};
}
mx_internal function addParentBridgeListeners():void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).addParentBridgeListeners();
return;
};
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
_local1.addEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
_local1.addEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
_local1.addEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, activateRequestHandler);
_local1.addEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, deactivateRequestHandler);
_local1.addEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
_local1.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.addEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
_local1.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
public function get swfBridgeGroup():ISWFBridgeGroup{
if (topLevel){
return (_swfBridgeGroup);
};
if (topLevelSystemManager){
return (topLevelSystemManager.swfBridgeGroup);
};
return (null);
}
override public function getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
public function get measuredWidth():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width);
}
public function removeChildBridge(_arg1:IEventDispatcher):void{
dispatchEvent(new FlexChangeEvent(FlexChangeEvent.REMOVE_CHILD_BRIDGE, false, false, _arg1));
var _local2:IFocusManager = IFocusManager(bridgeToFocusManager[_arg1]);
_local2.removeSWFBridge(_arg1);
swfBridgeGroup.removeChildBridge(_arg1);
delete bridgeToFocusManager[_arg1];
removeChildBridgeListeners(_arg1);
}
mx_internal function removeChildBridgeListeners(_arg1:IEventDispatcher):void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).removeChildBridgeListeners(_arg1);
return;
};
_arg1.removeEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
_arg1.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
_arg1.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_arg1.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
_arg1.removeEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2)));
}
private function Stage_resizeHandler(_arg1:Event=null):void{
var m:Number;
var n:Number;
var sandboxScreen:Rectangle;
var event = _arg1;
if (isDispatchingResizeEvent){
return;
};
var w:Number = 0;
var h:Number = 0;
try {
m = loaderInfo.width;
n = loaderInfo.height;
} catch(error:Error) {
if (!_screen){
_screen = new Rectangle();
};
return;
};
var align:String = StageAlign.TOP_LEFT;
try {
if (stage){
w = stage.stageWidth;
h = stage.stageHeight;
align = stage.align;
};
} catch(error:SecurityError) {
sandboxScreen = getSandboxScreen();
w = sandboxScreen.width;
h = sandboxScreen.height;
};
var x:Number = ((m - w) / 2);
var y:Number = ((n - h) / 2);
if (align == StageAlign.TOP){
y = 0;
} else {
if (align == StageAlign.BOTTOM){
y = (n - h);
} else {
if (align == StageAlign.LEFT){
x = 0;
} else {
if (align == StageAlign.RIGHT){
x = (m - w);
} else {
if ((((align == StageAlign.TOP_LEFT)) || ((align == "LT")))){
y = 0;
x = 0;
} else {
if (align == StageAlign.TOP_RIGHT){
y = 0;
x = (m - w);
} else {
if (align == StageAlign.BOTTOM_LEFT){
y = (n - h);
x = 0;
} else {
if (align == StageAlign.BOTTOM_RIGHT){
y = (n - h);
x = (m - w);
};
};
};
};
};
};
};
};
if (!_screen){
_screen = new Rectangle();
};
_screen.x = x;
_screen.y = y;
_screen.width = w;
_screen.height = h;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
};
if (event){
resizeMouseCatcher();
isDispatchingResizeEvent = true;
dispatchEvent(event);
isDispatchingResizeEvent = false;
};
}
public function get swfBridge():IEventDispatcher{
if (swfBridgeGroup){
return (swfBridgeGroup.parentBridge);
};
return (null);
}
private function findRemotePopUp(_arg1:Object, _arg2:IEventDispatcher):RemotePopUp{
var _local5:RemotePopUp;
var _local3:int = forms.length;
var _local4:int;
while (_local4 < _local3) {
if (isRemotePopUp(forms[_local4])){
_local5 = RemotePopUp(forms[_local4]);
if ((((_local5.window == _arg1)) && ((_local5.bridge == _arg2)))){
return (_local5);
};
};
_local4++;
};
return (null);
}
public function info():Object{
return ({});
}
mx_internal function get toolTipIndex():int{
return (_toolTipIndex);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
if (isStageRoot){
return;
};
_width = _arg1;
_height = _arg2;
if (mouseCatcher){
mouseCatcher.width = _arg1;
mouseCatcher.height = _arg2;
};
dispatchEvent(new Event(Event.RESIZE));
}
private function removePlaceholderPopupRequestHandler(_arg1:Event):void{
var _local3:int;
var _local4:int;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!forwardPlaceholderRequest(_local2, false)){
_local3 = forms.length;
_local4 = 0;
while (_local4 < _local3) {
if (isRemotePopUp(forms[_local4])){
if ((((forms[_local4].window == _local2.data.placeHolderId)) && ((forms[_local4].bridge == _local2.requestor)))){
forms.splice(_local4, 1);
break;
};
};
_local4++;
};
};
}
public function set focusPane(_arg1:Sprite):void{
if (_arg1){
addChild(_arg1);
_arg1.x = 0;
_arg1.y = 0;
_arg1.scrollRect = null;
_focusPane = _arg1;
} else {
removeChild(_focusPane);
_focusPane = null;
};
}
mx_internal function removeParentBridgeListeners():void{
if (((!(topLevel)) && (topLevelSystemManager))){
SystemManager(topLevelSystemManager).removeParentBridgeListeners();
return;
};
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
_local1.removeEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, activateRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, deactivateRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
_local1.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
_local1.removeEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
_local1.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
override public function get parent():DisplayObjectContainer{
try {
return (super.parent);
} catch(e:SecurityError) {
};
return (null);
}
private function eventListenerRequestHandler(_arg1:Event):void{
var _local2:String;
if ((_arg1 is EventListenerRequest)){
return;
};
var _local3:EventListenerRequest = EventListenerRequest.marshal(_arg1);
if (_arg1.type == EventListenerRequest.ADD_EVENT_LISTENER_REQUEST){
if (!eventProxy){
eventProxy = new EventProxy(this);
};
_local2 = EventUtil.sandboxMouseEventMap[_local3.eventType];
if (_local2){
if (isTopLevelRoot()){
stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
} else {
super.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, (EventPriority.CURSOR_MANAGEMENT + 1), true);
};
addEventListenerToSandboxes(_local3.eventType, sandboxMouseListener, true, _local3.priority, _local3.useWeakReference, (_arg1.target as IEventDispatcher));
addEventListenerToOtherSystemManagers(_local3.eventType, otherSystemManagerMouseListener, true, _local3.priority, _local3.useWeakReference);
if (getSandboxRoot() == this){
if (((isTopLevelRoot()) && ((((_local2 == MouseEvent.MOUSE_UP)) || ((_local2 == MouseEvent.MOUSE_MOVE)))))){
stage.addEventListener(_local2, eventProxy.marshalListener, false, _local3.priority, _local3.useWeakReference);
};
super.addEventListener(_local2, eventProxy.marshalListener, true, _local3.priority, _local3.useWeakReference);
};
};
} else {
if (_arg1.type == EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST){
_local2 = EventUtil.sandboxMouseEventMap[_local3.eventType];
if (_local2){
removeEventListenerFromOtherSystemManagers(_local3.eventType, otherSystemManagerMouseListener, true);
removeEventListenerFromSandboxes(_local3.eventType, sandboxMouseListener, true, (_arg1.target as IEventDispatcher));
if (getSandboxRoot() == this){
if (((isTopLevelRoot()) && ((((_local2 == MouseEvent.MOUSE_UP)) || ((_local2 == MouseEvent.MOUSE_MOVE)))))){
stage.removeEventListener(_local2, eventProxy.marshalListener);
};
super.removeEventListener(_local2, eventProxy.marshalListener, true);
};
};
};
};
}
mx_internal function set applicationIndex(_arg1:int):void{
_applicationIndex = _arg1;
}
private function showMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
Object(_arg1).data = _local2.data;
} else {
if (eventProxy){
Object(_arg1).data = SystemManagerGlobals.showMouseCursor;
};
};
}
public function get childAllowsParent():Boolean{
try {
return (loaderInfo.childAllowsParent);
} catch(error:Error) {
};
return (false);
}
public function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void{
var _local5:Event;
if (_arg4){
dispatchEventToOtherSystemManagers(_arg1);
};
if (!swfBridgeGroup){
return;
};
_local5 = _arg1.clone();
if (_arg3){
currentSandboxEvent = _local5;
};
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local6) && (!((_local6 == _arg2))))){
if ((_local5 is SWFBridgeRequest)){
SWFBridgeRequest(_local5).requestor = _local6;
};
_local6.dispatchEvent(_local5);
};
var _local7:Array = swfBridgeGroup.getChildBridges();
var _local8:int;
while (_local8 < _local7.length) {
if (_local7[_local8] != _arg2){
_local5 = _arg1.clone();
if (_arg3){
currentSandboxEvent = _local5;
};
if ((_local5 is SWFBridgeRequest)){
SWFBridgeRequest(_local5).requestor = IEventDispatcher(_local7[_local8]);
};
IEventDispatcher(_local7[_local8]).dispatchEvent(_local5);
};
_local8++;
};
currentSandboxEvent = null;
}
private function setActualSizeRequestHandler(_arg1:Event):void{
var _local2:Object = Object(_arg1);
setActualSize(_local2.data.width, _local2.data.height);
}
private function executeCallbacks():void{
var _local1:Function;
if (((!(parent)) && (parentAllowsChild))){
return;
};
while (initCallbackFunctions.length > 0) {
_local1 = initCallbackFunctions.shift();
_local1(this);
};
}
private function addPlaceholderId(_arg1:String, _arg2:String, _arg3:IEventDispatcher, _arg4:Object):void{
if (!_arg3){
throw (new Error());
};
if (!idToPlaceholder){
idToPlaceholder = [];
};
idToPlaceholder[_arg1] = new PlaceholderData(_arg2, _arg3, _arg4);
}
private function canActivateHandler(_arg1:Event):void{
var _local3:SWFBridgeRequest;
var _local6:PlaceholderData;
var _local7:RemotePopUp;
var _local8:SystemManagerProxy;
var _local9:IFocusManagerContainer;
var _local10:IEventDispatcher;
var _local2:Object = Object(_arg1);
var _local4:Object = _local2.data;
var _local5:String;
if ((_local2.data is String)){
_local6 = idToPlaceholder[_local2.data];
_local4 = _local6.data;
_local5 = _local6.id;
if (_local5 == null){
_local7 = findRemotePopUp(_local4, _local6.bridge);
if (_local7){
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, IEventDispatcher(_local7.bridge), _local7.window);
if (_local7.bridge){
_local7.bridge.dispatchEvent(_local3);
_local2.data = _local3.data;
};
return;
};
};
};
if ((_local4 is SystemManagerProxy)){
_local8 = SystemManagerProxy(_local4);
_local9 = findFocusManagerContainer(_local8);
_local2.data = ((((_local8) && (_local9))) && (canActivateLocalComponent(_local9)));
} else {
if ((_local4 is IFocusManagerContainer)){
_local2.data = canActivateLocalComponent(_local4);
} else {
if ((_local4 is IEventDispatcher)){
_local10 = IEventDispatcher(_local4);
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, _local10, _local5);
if (_local10){
_local10.dispatchEvent(_local3);
_local2.data = _local3.data;
};
} else {
throw (new Error());
};
};
};
}
private function docFrameListener(_arg1:Event):void{
if (currentFrame == 2){
removeEventListener(Event.ENTER_FRAME, docFrameListener);
if (totalFrames > 2){
addEventListener(Event.ENTER_FRAME, extraFrameListener);
};
docFrameHandler();
};
}
public function get popUpChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.popUpChildren);
};
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
return (_popUpChildren);
}
private function addEventListenerToSandboxes(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false, _arg6:IEventDispatcher=null):void{
var _local10:int;
var _local11:IEventDispatcher;
if (!swfBridgeGroup){
return;
};
var _local7:EventListenerRequest = new EventListenerRequest(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, false, false, _arg1, _arg3, _arg4, _arg5);
var _local8:IEventDispatcher = swfBridgeGroup.parentBridge;
if (((_local8) && (!((_local8 == _arg6))))){
_local8.addEventListener(_arg1, _arg2, false, _arg4, _arg5);
};
var _local9:Array = swfBridgeGroup.getChildBridges();
while (_local10 < _local9.length) {
_local11 = IEventDispatcher(_local9[_local10]);
if (_local11 != _arg6){
_local11.addEventListener(_arg1, _arg2, false, _arg4, _arg5);
};
_local10++;
};
dispatchEventFromSWFBridges(_local7, _arg6);
}
private function forwardFormEvent(_arg1:SWFBridgeEvent):Boolean{
var _local3:DisplayObject;
if (isTopLevelRoot()){
return (false);
};
var _local2:IEventDispatcher = swfBridgeGroup.parentBridge;
if (_local2){
_local3 = getSandboxRoot();
_arg1.data.notifier = _local2;
if (_local3 == this){
if (!(_arg1.data.window is String)){
_arg1.data.window = NameUtil.displayObjectToString(DisplayObject(_arg1.data.window));
} else {
_arg1.data.window = ((NameUtil.displayObjectToString(DisplayObject(this)) + ".") + _arg1.data.window);
};
_local2.dispatchEvent(_arg1);
} else {
if ((_arg1.data.window is String)){
_arg1.data.window = ((NameUtil.displayObjectToString(DisplayObject(this)) + ".") + _arg1.data.window);
};
_local3.dispatchEvent(_arg1);
};
};
return (true);
}
public function set explicitHeight(_arg1:Number):void{
_explicitHeight = _arg1;
}
override public function removeChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChild(_arg1));
}
mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{
removingChild(_arg1);
super.removeChild(_arg1);
childRemoved(_arg1);
return (_arg1);
}
final mx_internal function get $numChildren():int{
return (super.numChildren);
}
public function get toolTipChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.toolTipChildren);
};
if (!_toolTipChildren){
_toolTipChildren = new SystemChildrenList(this, new QName(mx_internal, "topMostIndex"), new QName(mx_internal, "toolTipIndex"));
};
return (_toolTipChildren);
}
public function create(... _args):Object{
var _local4:String;
var _local5:int;
var _local6:int;
var _local2:String = info()["mainClassName"];
if (_local2 == null){
_local4 = loaderInfo.loaderURL;
_local5 = _local4.lastIndexOf(".");
_local6 = _local4.lastIndexOf("/");
_local2 = _local4.substring((_local6 + 1), _local5);
};
var _local3:Class = Class(getDefinitionByName(_local2));
return ((_local3) ? new (_local3) : null);
}
override public function get stage():Stage{
var _local2:DisplayObject;
if (_stage){
return (_stage);
};
var _local1:Stage = super.stage;
if (_local1){
_stage = _local1;
return (_local1);
};
if (((!(topLevel)) && (_topLevelSystemManager))){
_stage = _topLevelSystemManager.stage;
return (_stage);
};
if (((!(isStageRoot)) && (topLevel))){
_local2 = getTopLevelRoot();
if (_local2){
_stage = _local2.stage;
return (_stage);
};
};
return (null);
}
override public function addChild(_arg1:DisplayObject):DisplayObject{
noTopMostIndex++;
return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1)));
}
private function removeRemotePopUp(_arg1:RemotePopUp):void{
var _local2:int = forms.length;
var _local3:int;
while (_local3 < _local2) {
if (isRemotePopUp(forms[_local3])){
if ((((forms[_local3].window == _arg1.window)) && ((forms[_local3].bridge == _arg1.bridge)))){
if (forms[_local3] == _arg1){
deactivateForm(_arg1);
};
forms.splice(_local3, 1);
break;
};
};
_local3++;
};
}
private function deactivateRemotePopUp(_arg1:Object):void{
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST, false, false, _arg1.bridge, _arg1.window);
var _local3:Object = _arg1.bridge;
if (_local3){
_local3.dispatchEvent(_local2);
};
}
override public function getChildIndex(_arg1:DisplayObject):int{
return ((super.getChildIndex(_arg1) - applicationIndex));
}
mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{
return (super.getChildIndex(_arg1));
}
public function activate(_arg1:IFocusManagerContainer):void{
activateForm(_arg1);
}
public function getSandboxRoot():DisplayObject{
var parent:DisplayObject;
var lastParent:DisplayObject;
var loader:Loader;
var loaderInfo:LoaderInfo;
var sm:ISystemManager = this;
try {
if (sm.topLevelSystemManager){
sm = sm.topLevelSystemManager;
};
parent = DisplayObject(sm).parent;
if ((parent is Stage)){
return (DisplayObject(sm));
};
if (((parent) && (!(parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))))){
return (this);
};
lastParent = this;
while (parent) {
if ((parent is Stage)){
return (lastParent);
};
if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true))){
return (lastParent);
};
if ((parent is Loader)){
loader = Loader(parent);
loaderInfo = loader.contentLoaderInfo;
if (!loaderInfo.childAllowsParent){
return (loaderInfo.content);
};
};
if (parent.hasEventListener(InterManagerRequest.SYSTEM_MANAGER_REQUEST)){
lastParent = parent;
};
parent = parent.parent;
};
} catch(error:Error) {
};
return (((lastParent)!=null) ? lastParent : DisplayObject(sm));
}
private function deferredNextFrame():void{
if ((currentFrame + 1) > totalFrames){
return;
};
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
} else {
nextFrameTimer = new Timer(100);
nextFrameTimer.addEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.start();
};
}
mx_internal function get cursorIndex():int{
return (_cursorIndex);
}
mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{
return (super.contains(_arg1));
}
override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, (applicationIndex + _arg2));
}
public function get document():Object{
return (_document);
}
private function resizeMouseCatcher():void{
var g:Graphics;
var s:Rectangle;
if (mouseCatcher){
try {
g = mouseCatcher.graphics;
s = screen;
g.clear();
g.beginFill(0, 0);
g.drawRect(0, 0, s.width, s.height);
g.endFill();
} catch(e:SecurityError) {
};
};
}
private function extraFrameListener(_arg1:Event):void{
if (lastFrame == currentFrame){
return;
};
lastFrame = currentFrame;
if ((currentFrame + 1) > totalFrames){
removeEventListener(Event.ENTER_FRAME, extraFrameListener);
};
extraFrameHandler();
}
private function addPopupRequestHandler(_arg1:Event):void{
var _local3:Boolean;
var _local4:IChildList;
var _local6:ISWFBridgeProvider;
var _local7:SWFBridgeRequest;
if (((!((_arg1.target == this))) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (_arg1.target != this){
_local6 = swfBridgeGroup.getChildBridgeProvider(IEventDispatcher(_arg1.target));
if (!SecurityUtil.hasMutualTrustBetweenParentAndChild(_local6)){
return;
};
};
if (((swfBridgeGroup.parentBridge) && (SecurityUtil.hasMutualTrustBetweenParentAndChild(this)))){
_local2.requestor = swfBridgeGroup.parentBridge;
getSandboxRoot().dispatchEvent(_local2);
return;
};
if (((!(_local2.data.childList)) || ((_local2.data.childList == PopUpManagerChildList.PARENT)))){
_local3 = ((_local2.data.parent) && (popUpChildren.contains(_local2.data.parent)));
} else {
_local3 = (_local2.data.childList == PopUpManagerChildList.POPUP);
};
_local4 = (_local3) ? popUpChildren : this;
_local4.addChild(DisplayObject(_local2.data.window));
if (_local2.data.modal){
numModalWindows++;
};
var _local5:RemotePopUp = new RemotePopUp(_local2.data.window, _local2.requestor);
forms.push(_local5);
if (((!(isTopLevelRoot())) && (swfBridgeGroup))){
_local7 = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, _local2.requestor, {window:_local2.data.window});
_local7.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(_local2.data.window));
dispatchEvent(_local7);
};
}
override public function get height():Number{
return (_height);
}
mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{
return (super.getChildAt(_arg1));
}
private function systemManagerHandler(_arg1:Event):void{
if (_arg1["name"] == "sameSandbox"){
_arg1["value"] = (currentSandboxEvent == _arg1["value"]);
return;
};
if (_arg1["name"] == "hasSWFBridges"){
_arg1["value"] = hasSWFBridges();
return;
};
if ((_arg1 is InterManagerRequest)){
return;
};
var _local2:String = _arg1["name"];
switch (_local2){
case "popUpChildren.addChild":
popUpChildren.addChild(_arg1["value"]);
break;
case "popUpChildren.removeChild":
popUpChildren.removeChild(_arg1["value"]);
break;
case "cursorChildren.addChild":
cursorChildren.addChild(_arg1["value"]);
break;
case "cursorChildren.removeChild":
cursorChildren.removeChild(_arg1["value"]);
break;
case "toolTipChildren.addChild":
toolTipChildren.addChild(_arg1["value"]);
break;
case "toolTipChildren.removeChild":
toolTipChildren.removeChild(_arg1["value"]);
break;
case "screen":
_arg1["value"] = screen;
break;
case "application":
_arg1["value"] = application;
break;
case "isTopLevelRoot":
_arg1["value"] = isTopLevelRoot();
break;
case "getVisibleApplicationRect":
_arg1["value"] = getVisibleApplicationRect();
break;
case "bringToFront":
if (_arg1["value"].topMost){
popUpChildren.setChildIndex(DisplayObject(_arg1["value"].popUp), (popUpChildren.numChildren - 1));
} else {
setChildIndex(DisplayObject(_arg1["value"].popUp), (numChildren - 1));
};
break;
};
}
private function activateRemotePopUp(_arg1:Object):void{
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST, false, false, _arg1.bridge, _arg1.window);
var _local3:Object = _arg1.bridge;
if (_local3){
_local3.dispatchEvent(_local2);
};
}
mx_internal function set noTopMostIndex(_arg1:int):void{
var _local2:int = (_arg1 - _noTopMostIndex);
_noTopMostIndex = _arg1;
topMostIndex = (topMostIndex + _local2);
}
override public function getObjectsUnderPoint(_arg1:Point):Array{
var _local5:DisplayObject;
var _local6:Array;
var _local2:Array = [];
var _local3:int = topMostIndex;
var _local4:int;
while (_local4 < _local3) {
_local5 = super.getChildAt(_local4);
if ((_local5 is DisplayObjectContainer)){
_local6 = DisplayObjectContainer(_local5).getObjectsUnderPoint(_arg1);
if (_local6){
_local2 = _local2.concat(_local6);
};
};
_local4++;
};
return (_local2);
}
mx_internal function get topMostIndex():int{
return (_topMostIndex);
}
mx_internal function regenerateStyleCache(_arg1:Boolean):void{
var _local5:IStyleClient;
var _local2:Boolean;
var _local3:int = rawChildren.numChildren;
var _local4:int;
while (_local4 < _local3) {
_local5 = (rawChildren.getChildAt(_local4) as IStyleClient);
if (_local5){
_local5.regenerateStyleCache(_arg1);
};
if (isTopLevelWindow(DisplayObject(_local5))){
_local2 = true;
};
_local3 = rawChildren.numChildren;
_local4++;
};
if (((!(_local2)) && ((topLevelWindow is IStyleClient)))){
IStyleClient(topLevelWindow).regenerateStyleCache(_arg1);
};
}
public function addFocusManager(_arg1:IFocusManagerContainer):void{
forms.push(_arg1);
}
private function deactivateFormSandboxEventHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:SWFBridgeEvent = SWFBridgeEvent.marshal(_arg1);
if (!forwardFormEvent(_local2)){
if (((((isRemotePopUp(form)) && ((RemotePopUp(form).window == _local2.data.window)))) && ((RemotePopUp(form).bridge == _local2.data.notifier)))){
deactivateForm(form);
};
};
}
public function set swfBridgeGroup(_arg1:ISWFBridgeGroup):void{
if (topLevel){
_swfBridgeGroup = _arg1;
} else {
if (topLevelSystemManager){
SystemManager(topLevelSystemManager).swfBridgeGroup = _arg1;
};
};
}
mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{
super.setChildIndex(_arg1, _arg2);
}
private function mouseUpHandler(_arg1:MouseEvent):void{
idleCounter = 0;
}
mx_internal function childAdded(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).initialize();
};
}
public function isFontFaceEmbedded(_arg1:TextFormat):Boolean{
var _local6:Font;
var _local7:String;
var _local2:String = _arg1.font;
var _local3:Array = Font.enumerateFonts();
var _local4:int;
while (_local4 < _local3.length) {
_local6 = Font(_local3[_local4]);
if (_local6.fontName == _local2){
_local7 = "regular";
if (((_arg1.bold) && (_arg1.italic))){
_local7 = "boldItalic";
} else {
if (_arg1.bold){
_local7 = "bold";
} else {
if (_arg1.italic){
_local7 = "italic";
};
};
};
if (_local6.fontStyle == _local7){
return (true);
};
};
_local4++;
};
if (((((!(_local2)) || (!(embeddedFontList)))) || (!(embeddedFontList[_local2])))){
return (false);
};
var _local5:Object = embeddedFontList[_local2];
return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular)))))));
}
private function forwardPlaceholderRequest(_arg1:SWFBridgeRequest, _arg2:Boolean):Boolean{
if (isTopLevelRoot()){
return (false);
};
var _local3:Object;
var _local4:String;
if (_arg1.data.window){
_local3 = _arg1.data.window;
_arg1.data.window = null;
} else {
_local3 = _arg1.requestor;
_local4 = _arg1.data.placeHolderId;
_arg1.data.placeHolderId = ((NameUtil.displayObjectToString(this) + ".") + _arg1.data.placeHolderId);
};
if (_arg2){
addPlaceholderId(_arg1.data.placeHolderId, _local4, _arg1.requestor, _local3);
} else {
removePlaceholderId(_arg1.data.placeHolderId);
};
var _local5:DisplayObject = getSandboxRoot();
var _local6:IEventDispatcher = swfBridgeGroup.parentBridge;
_arg1.requestor = _local6;
if (_local5 == this){
_local6.dispatchEvent(_arg1);
} else {
_local5.dispatchEvent(_arg1);
};
return (true);
}
public function getTopLevelRoot():DisplayObject{
var sm:ISystemManager;
var parent:DisplayObject;
var lastParent:DisplayObject;
try {
sm = this;
if (sm.topLevelSystemManager){
sm = sm.topLevelSystemManager;
};
parent = DisplayObject(sm).parent;
lastParent = parent;
while (parent) {
if ((parent is Stage)){
return (lastParent);
};
lastParent = parent;
parent = parent.parent;
};
} catch(error:SecurityError) {
};
return (null);
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
var newListener:StageEventProxy;
var actualType:String;
var type = _arg1;
var listener = _arg2;
var useCapture = _arg3;
if ((((type == FlexEvent.RENDER)) || ((type == FlexEvent.ENTER_FRAME)))){
if (type == FlexEvent.RENDER){
type = Event.RENDER;
} else {
type = Event.ENTER_FRAME;
};
try {
if (stage){
stage.removeEventListener(type, listener, useCapture);
};
super.removeEventListener(type, listener, useCapture);
} catch(error:SecurityError) {
super.removeEventListener(type, listener, useCapture);
};
return;
};
if ((((((((((type == MouseEvent.MOUSE_MOVE)) || ((type == MouseEvent.MOUSE_UP)))) || ((type == MouseEvent.MOUSE_DOWN)))) || ((type == Event.ACTIVATE)))) || ((type == Event.DEACTIVATE)))){
try {
if (stage){
newListener = weakReferenceProxies[listener];
if (!newListener){
newListener = strongReferenceProxies[listener];
if (newListener){
delete strongReferenceProxies[listener];
};
};
if (newListener){
stage.removeEventListener(type, newListener.stageListener, false);
};
};
} catch(error:SecurityError) {
};
};
if (((hasSWFBridges()) || ((SystemManagerGlobals.topLevelSystemManagers.length > 1)))){
actualType = EventUtil.sandboxMouseEventMap[type];
if (actualType){
if ((((getSandboxRoot() == this)) && (eventProxy))){
super.removeEventListener(actualType, eventProxy.marshalListener, useCapture);
};
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers){
removeEventListenerFromOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture);
};
removeEventListenerFromSandboxes(type, sandboxMouseListener, useCapture);
super.removeEventListener(type, listener, false);
return;
};
};
if (type == FlexEvent.IDLE){
super.removeEventListener(type, listener, useCapture);
if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){
idleTimer.stop();
idleTimer = null;
removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
};
} else {
super.removeEventListener(type, listener, useCapture);
};
}
private function extraFrameHandler(_arg1:Event=null):void{
var _local3:Class;
var _local2:Object = info()["frames"];
if (((_local2) && (_local2[currentLabel]))){
_local3 = Class(getDefinitionByName(_local2[currentLabel]));
var _local4 = _local3;
_local4["frame"](this);
};
deferredNextFrame();
}
public function isTopLevelRoot():Boolean{
return (((isStageRoot) || (isBootstrapRoot)));
}
public function get application():IUIComponent{
return (IUIComponent(_document));
}
override public function removeChildAt(_arg1:int):DisplayObject{
noTopMostIndex--;
return (rawChildren_removeChildAt((applicationIndex + _arg1)));
}
mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{
var _local2:DisplayObject = super.getChildAt(_arg1);
removingChild(_local2);
super.removeChildAt(_arg1);
childRemoved(_local2);
return (_local2);
}
private function getSWFBridgeOfDisplayObject(_arg1:DisplayObject):IEventDispatcher{
var _local2:SWFBridgeRequest;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:IEventDispatcher;
var _local7:ISWFBridgeProvider;
if (swfBridgeGroup){
_local2 = new SWFBridgeRequest(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, false, false, null, _arg1);
_local3 = swfBridgeGroup.getChildBridges();
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = IEventDispatcher(_local3[_local5]);
_local7 = swfBridgeGroup.getChildBridgeProvider(_local6);
if (SecurityUtil.hasMutualTrustBetweenParentAndChild(_local7)){
_local6.dispatchEvent(_local2);
if (_local2.data == true){
return (_local6);
};
_local2.data = _arg1;
};
_local5++;
};
};
return (null);
}
private function deactivateRequestHandler(_arg1:Event):void{
var _local5:PlaceholderData;
var _local6:RemotePopUp;
var _local7:SystemManagerProxy;
var _local8:IFocusManagerContainer;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Object = _local2.data;
var _local4:String;
if ((_local2.data is String)){
_local5 = idToPlaceholder[_local2.data];
_local3 = _local5.data;
_local4 = _local5.id;
if (_local4 == null){
_local6 = findRemotePopUp(_local3, _local5.bridge);
if (_local6){
deactivateRemotePopUp(_local6);
return;
};
};
};
if ((_local3 is SystemManagerProxy)){
_local7 = SystemManagerProxy(_local3);
_local8 = findFocusManagerContainer(_local7);
if (((_local7) && (_local8))){
_local7.deactivateByProxy(_local8);
};
} else {
if ((_local3 is IFocusManagerContainer)){
IFocusManagerContainer(_local3).focusManager.deactivate();
} else {
if ((_local3 is IEventDispatcher)){
_local2.data = _local4;
_local2.requestor = IEventDispatcher(_local3);
IEventDispatcher(_local3).dispatchEvent(_local2);
return;
};
throw (new Error());
};
};
}
private function installCompiledResourceBundles():void{
var _local1:Object = this.info();
var _local2:ApplicationDomain = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : _local1["currentDomain"];
var _local3:Array = _local1["compiledLocales"];
var _local4:Array = _local1["compiledResourceBundleNames"];
var _local5:IResourceManager = ResourceManager.getInstance();
_local5.installCompiledResourceBundles(_local2, _local3, _local4);
if (!_local5.localeChain){
_local5.initializeLocaleChain(_local3);
};
}
private function deactivateForm(_arg1:Object):void{
if (form){
if ((((form == _arg1)) && ((forms.length > 1)))){
if (isRemotePopUp(form)){
deactivateRemotePopUp(form);
} else {
form.focusManager.deactivate();
};
form = findLastActiveForm(_arg1);
if (form){
if (isRemotePopUp(form)){
activateRemotePopUp(form);
} else {
form.focusManager.activate();
};
};
};
};
}
private function unloadHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
mx_internal function removingChild(_arg1:DisplayObject):void{
_arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
}
mx_internal function get applicationIndex():int{
return (_applicationIndex);
}
mx_internal function set toolTipIndex(_arg1:int):void{
var _local2:int = (_arg1 - _toolTipIndex);
_toolTipIndex = _arg1;
cursorIndex = (cursorIndex + _local2);
}
private function hasSWFBridges():Boolean{
if (swfBridgeGroup){
return (true);
};
return (false);
}
private function updateLastActiveForm():void{
var _local1:int = forms.length;
if (_local1 < 2){
return;
};
var _local2 = -1;
var _local3:int;
while (_local3 < _local1) {
if (areFormsEqual(form, forms[_local3])){
_local2 = _local3;
break;
};
_local3++;
};
if (_local2 >= 0){
forms.splice(_local2, 1);
forms.push(form);
};
}
mx_internal function set bridgeToFocusManager(_arg1:Dictionary):void{
if (topLevel){
_bridgeToFocusManager = _arg1;
} else {
if (topLevelSystemManager){
SystemManager(topLevelSystemManager).bridgeToFocusManager = _arg1;
};
};
}
public function get cursorChildren():IChildList{
if (!topLevel){
return (_topLevelSystemManager.cursorChildren);
};
if (!_cursorChildren){
_cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex"));
};
return (_cursorChildren);
}
private function sandboxMouseListener(_arg1:Event):void{
if ((_arg1 is SandboxMouseEvent)){
return;
};
var _local2:Event = SandboxMouseEvent.marshal(_arg1);
dispatchEventFromSWFBridges(_local2, (_arg1.target as IEventDispatcher));
var _local3:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = "sameSandbox";
_local3.value = _arg1;
getSandboxRoot().dispatchEvent(_local3);
if (!_local3.value){
dispatchEvent(_local2);
};
}
public function get preloaderBackgroundImage():Object{
return (info()["backgroundImage"]);
}
public function set numModalWindows(_arg1:int):void{
_numModalWindows = _arg1;
}
public function get preloaderBackgroundAlpha():Number{
return (info()["backgroundAlpha"]);
}
mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{
return (super.getChildByName(_arg1));
}
private function dispatchInvalidateRequest():void{
var _local1:IEventDispatcher = swfBridgeGroup.parentBridge;
var _local2:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.INVALIDATE_REQUEST, false, false, _local1, (InvalidateRequestData.SIZE | InvalidateRequestData.DISPLAY_LIST));
_local1.dispatchEvent(_local2);
}
public function get preloaderBackgroundColor():uint{
var _local1:* = info()["backgroundColor"];
if (_local1 == undefined){
return (StyleManager.NOT_A_COLOR);
};
return (StyleManager.getColorName(_local1));
}
public function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle{
var _local2:Rectangle;
var _local3:Point;
var _local4:IEventDispatcher;
var _local5:SWFBridgeRequest;
if (!_arg1){
_arg1 = getBounds(DisplayObject(this));
_local2 = screen;
_local3 = new Point(Math.max(0, _arg1.x), Math.max(0, _arg1.y));
_local3 = localToGlobal(_local3);
_arg1.x = _local3.x;
_arg1.y = _local3.y;
_arg1.width = _local2.width;
_arg1.height = _local2.height;
};
if (useSWFBridge()){
_local4 = swfBridgeGroup.parentBridge;
_local5 = new SWFBridgeRequest(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, false, false, _local4, _arg1);
_local4.dispatchEvent(_local5);
_arg1 = Rectangle(_local5.data);
};
return (_arg1);
}
public function get topLevelSystemManager():ISystemManager{
if (topLevel){
return (this);
};
return (_topLevelSystemManager);
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
var _local2:DisplayObjectContainer;
if (((!(topLevel)) && (parent))){
_local2 = parent.parent;
while (_local2) {
if ((_local2 is IInvalidating)){
IInvalidating(_local2).invalidateSize();
IInvalidating(_local2).invalidateDisplayList();
return;
};
_local2 = _local2.parent;
};
};
if (((topLevel) && (useSWFBridge()))){
dispatchInvalidateRequest();
};
}
public function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void{
var _local3:InterManagerRequest;
if (getSandboxRoot() == this){
this[_arg1].addChild(_arg2);
} else {
addingChild(_arg2);
_local3 = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local3.name = (_arg1 + ".addChild");
_local3.value = _arg2;
getSandboxRoot().dispatchEvent(_local3);
childAdded(_arg2);
};
}
private function dispatchDeactivatedWindowEvent(_arg1:DisplayObject):void{
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = getSandboxRoot();
_local4 = !((_local3 == this));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, false, false, {notifier:_local2, window:(_local4) ? _arg1 : NameUtil.displayObjectToString(_arg1)});
if (_local4){
_local3.dispatchEvent(_local5);
} else {
_local2.dispatchEvent(_local5);
};
};
}
private function isBridgeChildHandler(_arg1:Event):void{
if ((_arg1 is SWFBridgeRequest)){
return;
};
var _local2:Object = Object(_arg1);
_local2.data = ((_local2.data) && (rawChildren.contains((_local2.data as DisplayObject))));
}
public function get measuredHeight():Number{
return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height);
}
private function activateRequestHandler(_arg1:Event):void{
var _local5:PlaceholderData;
var _local6:RemotePopUp;
var _local7:SystemManagerProxy;
var _local8:IFocusManagerContainer;
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
var _local3:Object = _local2.data;
var _local4:String;
if ((_local2.data is String)){
_local5 = idToPlaceholder[_local2.data];
_local3 = _local5.data;
_local4 = _local5.id;
if (_local4 == null){
_local6 = findRemotePopUp(_local3, _local5.bridge);
if (_local6){
activateRemotePopUp(_local6);
return;
};
};
};
if ((_local3 is SystemManagerProxy)){
_local7 = SystemManagerProxy(_local3);
_local8 = findFocusManagerContainer(_local7);
if (((_local7) && (_local8))){
_local7.activateByProxy(_local8);
};
} else {
if ((_local3 is IFocusManagerContainer)){
IFocusManagerContainer(_local3).focusManager.activate();
} else {
if ((_local3 is IEventDispatcher)){
_local2.data = _local4;
_local2.requestor = IEventDispatcher(_local3);
IEventDispatcher(_local3).dispatchEvent(_local2);
} else {
throw (new Error());
};
};
};
}
mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
addingChild(_arg1);
super.addChildAt(_arg1, _arg2);
childAdded(_arg1);
return (_arg1);
}
mx_internal function initialize():void{
var _local6:int;
var _local7:int;
var _local9:EmbeddedFontRegistry;
var _local13:Class;
var _local14:Object;
var _local15:RSLItem;
if (isStageRoot){
_width = stage.stageWidth;
_height = stage.stageHeight;
} else {
_width = loaderInfo.width;
_height = loaderInfo.height;
};
preloader = new Preloader();
preloader.addEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
preloader.addEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
if (!_popUpChildren){
_popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex"));
};
_popUpChildren.addChild(preloader);
var _local1:Array = info()["rsls"];
var _local2:Array = info()["cdRsls"];
var _local3:Boolean;
if (info()["usePreloader"] != undefined){
_local3 = info()["usePreloader"];
};
var _local4:Class = (info()["preloader"] as Class);
if (((_local3) && (!(_local4)))){
_local4 = DownloadProgressBar;
};
var _local5:Array = [];
if (((_local2) && ((_local2.length > 0)))){
_local13 = Class(getDefinitionByName("mx.core::CrossDomainRSLItem"));
_local6 = _local2.length;
_local7 = 0;
while (_local7 < _local6) {
_local14 = new _local13(_local2[_local7]["rsls"], _local2[_local7]["policyFiles"], _local2[_local7]["digests"], _local2[_local7]["types"], _local2[_local7]["isSigned"], LoaderUtil.normalizeURL(this.loaderInfo));
_local5.push(_local14);
_local7++;
};
};
if (((!((_local1 == null))) && ((_local1.length > 0)))){
_local6 = _local1.length;
_local7 = 0;
while (_local7 < _local6) {
_local15 = new RSLItem(_local1[_local7].url, LoaderUtil.normalizeURL(this.loaderInfo));
_local5.push(_local15);
_local7++;
};
};
Singleton.registerClass("mx.resources::IResourceManager", Class(getDefinitionByName("mx.resources::ResourceManagerImpl")));
var _local8:IResourceManager = ResourceManager.getInstance();
Singleton.registerClass("mx.core::IEmbeddedFontRegistry", Class(getDefinitionByName("mx.core::EmbeddedFontRegistry")));
Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
Singleton.registerClass("mx.styles::IStyleManager2", Class(getDefinitionByName("mx.styles::StyleManagerImpl")));
var _local10:String = loaderInfo.parameters["localeChain"];
if (((!((_local10 == null))) && (!((_local10 == ""))))){
_local8.localeChain = _local10.split(",");
};
var _local11:String = loaderInfo.parameters["resourceModuleURLs"];
var _local12:Array = (_local11) ? _local11.split(",") : null;
preloader.initialize(_local3, _local4, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, null, null, _local5, _local12);
}
public function useSWFBridge():Boolean{
if (isStageRoot){
return (false);
};
if (((!(topLevel)) && (topLevelSystemManager))){
return (topLevelSystemManager.useSWFBridge());
};
var sbRoot:DisplayObject = getSandboxRoot();
if (((topLevel) && (!((sbRoot == this))))){
return (true);
};
if (sbRoot == this){
try {
root.loaderInfo.parentAllowsChild;
if (((parentAllowsChild) && (childAllowsParent))){
try {
if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isStageRoot", false, true))){
return (true);
};
} catch(e:Error) {
};
} else {
return (true);
};
} catch(e1:Error) {
return (false);
};
};
return (false);
}
mx_internal function childRemoved(_arg1:DisplayObject):void{
if ((_arg1 is IUIComponent)){
IUIComponent(_arg1).parentChanged(null);
};
}
final mx_internal function $removeChildAt(_arg1:int):DisplayObject{
return (super.removeChildAt(_arg1));
}
private function canActivatePopUp(_arg1:Object):Boolean{
var _local2:RemotePopUp;
var _local3:SWFBridgeRequest;
if (isRemotePopUp(_arg1)){
_local2 = RemotePopUp(_arg1);
_local3 = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, false, false, null, _local2.window);
IEventDispatcher(_local2.bridge).dispatchEvent(_local3);
return (_local3.data);
};
if (canActivateLocalComponent(_arg1)){
return (true);
};
return (false);
}
mx_internal function get noTopMostIndex():int{
return (_noTopMostIndex);
}
override public function get numChildren():int{
return ((noTopMostIndex - applicationIndex));
}
private function canActivateLocalComponent(_arg1:Object):Boolean{
if ((((((((_arg1 is Sprite)) && ((_arg1 is IUIComponent)))) && (Sprite(_arg1).visible))) && (IUIComponent(_arg1).enabled))){
return (true);
};
return (false);
}
private function preloader_preloaderDoneHandler(_arg1:Event):void{
var _local2:IUIComponent = topLevelWindow;
preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler);
_popUpChildren.removeChild(preloader);
preloader = null;
mouseCatcher = new FlexSprite();
mouseCatcher.name = "mouseCatcher";
noTopMostIndex++;
super.addChildAt(mouseCatcher, 0);
resizeMouseCatcher();
if (!topLevel){
mouseCatcher.visible = false;
mask = mouseCatcher;
};
noTopMostIndex++;
super.addChildAt(DisplayObject(_local2), 1);
_local2.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE));
}
private function initializeTopLevelWindow(_arg1:Event):void{
var _local2:IUIComponent;
var _local3:DisplayObjectContainer;
var _local4:ISystemManager;
var _local5:DisplayObject;
initialized = true;
if (((!(parent)) && (parentAllowsChild))){
return;
};
if (!topLevel){
if (!parent){
return;
};
_local3 = parent.parent;
if (!_local3){
return;
};
while (_local3) {
if ((_local3 is IUIComponent)){
_local4 = IUIComponent(_local3).systemManager;
if (((_local4) && (!(_local4.isTopLevel())))){
_local4 = _local4.topLevelSystemManager;
};
_topLevelSystemManager = _local4;
break;
};
_local3 = _local3.parent;
};
};
if (((isTopLevelRoot()) || ((getSandboxRoot() == this)))){
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true);
};
if (((isTopLevelRoot()) && (stage))){
stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
} else {
if (((topLevel) && (stage))){
_local5 = getSandboxRoot();
if (_local5 != this){
_local5.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true);
};
};
};
_local2 = (topLevelWindow = IUIComponent(create()));
document = _local2;
if (document){
IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
if (!LoaderConfig._url){
LoaderConfig._url = loaderInfo.url;
LoaderConfig._parameters = loaderInfo.parameters;
};
if (((isStageRoot) && (stage))){
_width = stage.stageWidth;
_height = stage.stageHeight;
IFlexDisplayObject(_local2).setActualSize(_width, _height);
} else {
IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height);
};
if (preloader){
preloader.registerApplication(_local2);
};
addingChild(DisplayObject(_local2));
childAdded(DisplayObject(_local2));
} else {
document = this;
};
}
final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (super.addChildAt(_arg1, _arg2));
}
mx_internal function dispatchActivatedWindowEvent(_arg1:DisplayObject):void{
var _local3:DisplayObject;
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = getSandboxRoot();
_local4 = !((_local3 == this));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, false, false, {notifier:_local2, window:(_local4) ? _arg1 : NameUtil.displayObjectToString(_arg1)});
if (_local4){
_local3.dispatchEvent(_local5);
} else {
_local2.dispatchEvent(_local5);
};
};
}
private function nextFrameTimerHandler(_arg1:TimerEvent):void{
if ((currentFrame + 1) <= framesLoaded){
nextFrame();
nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler);
nextFrameTimer.reset();
};
}
mx_internal function get bridgeToFocusManager():Dictionary{
if (topLevel){
return (_bridgeToFocusManager);
};
if (topLevelSystemManager){
return (SystemManager(topLevelSystemManager).bridgeToFocusManager);
};
return (null);
}
public function get numModalWindows():int{
return (_numModalWindows);
}
private function areFormsEqual(_arg1:Object, _arg2:Object):Boolean{
if (_arg1 == _arg2){
return (true);
};
if ((((_arg1 is RemotePopUp)) && ((_arg2 is RemotePopUp)))){
return (areRemotePopUpsEqual(_arg1, _arg2));
};
return (false);
}
public function isTopLevelWindow(_arg1:DisplayObject):Boolean{
return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow))));
}
private function removePlaceholderId(_arg1:String):void{
delete idToPlaceholder[_arg1];
}
override public function get width():Number{
return (_width);
}
private function dispatchActivatedApplicationEvent():void{
var _local2:SWFBridgeEvent;
var _local1:IEventDispatcher = (swfBridgeGroup) ? swfBridgeGroup.parentBridge : null;
if (_local1){
_local2 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, false, false);
_local1.dispatchEvent(_local2);
};
}
private function otherSystemManagerMouseListener(_arg1:SandboxMouseEvent):void{
if (dispatchingToSystemManagers){
return;
};
dispatchEventFromSWFBridges(_arg1);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
_local2.name = "sameSandbox";
_local2.value = _arg1;
getSandboxRoot().dispatchEvent(_local2);
if (!_local2.value){
dispatchEvent(_arg1);
};
}
private function hideMouseCursorRequestHandler(_arg1:Event):void{
var _local3:IEventDispatcher;
if (((!(isTopLevelRoot())) && ((_arg1 is SWFBridgeRequest)))){
return;
};
var _local2:SWFBridgeRequest = SWFBridgeRequest.marshal(_arg1);
if (!isTopLevelRoot()){
_local3 = swfBridgeGroup.parentBridge;
_local2.requestor = _local3;
_local3.dispatchEvent(_local2);
} else {
if (eventProxy){
SystemManagerGlobals.showMouseCursor = false;
};
};
}
private function getTopLevelSystemManager(_arg1:DisplayObject):ISystemManager{
var _local3:ISystemManager;
var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.root);
if (((((!(_local2)) || ((_local2 is Stage)))) && ((_arg1 is IUIComponent)))){
_local2 = DisplayObjectContainer(IUIComponent(_arg1).systemManager);
};
if ((_local2 is ISystemManager)){
_local3 = ISystemManager(_local2);
if (!_local3.isTopLevel()){
_local3 = _local3.topLevelSystemManager;
};
};
return (_local3);
}
public function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean{
return (!((getSWFBridgeOfDisplayObject(_arg1) == null)));
}
public function move(_arg1:Number, _arg2:Number):void{
}
public function set explicitWidth(_arg1:Number):void{
_explicitWidth = _arg1;
}
public function get parentAllowsChild():Boolean{
try {
return (loaderInfo.parentAllowsChild);
} catch(error:Error) {
};
return (false);
}
private function preloader_initProgressHandler(_arg1:Event):void{
preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler);
deferredNextFrame();
}
public function get explicitWidth():Number{
return (_explicitWidth);
}
private function activateFormSandboxEventHandler(_arg1:Event):void{
var _local2:SWFBridgeEvent = SWFBridgeEvent.marshal(_arg1);
if (!forwardFormEvent(_local2)){
activateForm(new RemotePopUp(_local2.data.window, _local2.data.notifier));
};
}
mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{
addingChild(_arg1);
super.addChild(_arg1);
childAdded(_arg1);
return (_arg1);
}
public static function getSWFRoot(_arg1:Object):DisplayObject{
var p:*;
var sm:ISystemManager;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for (p in allSystemManagers) {
sm = (p as ISystemManager);
domain = sm.loaderInfo.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return ((sm as DisplayObject));
};
} catch(e:Error) {
};
};
return (null);
}
private static function areRemotePopUpsEqual(_arg1:Object, _arg2:Object):Boolean{
if (!(_arg1 is RemotePopUp)){
return (false);
};
if (!(_arg2 is RemotePopUp)){
return (false);
};
var _local3:RemotePopUp = RemotePopUp(_arg1);
var _local4:RemotePopUp = RemotePopUp(_arg2);
if ((((((_local3.window == _local4.window)) && (_local3.bridge))) && (_local4.bridge))){
return (true);
};
return (false);
}
private static function getChildListIndex(_arg1:IChildList, _arg2:Object):int{
var childList = _arg1;
var f = _arg2;
var index = -1;
try {
index = childList.getChildIndex(DisplayObject(f));
} catch(e:ArgumentError) {
};
return (index);
}
mx_internal static function registerInitCallback(_arg1:Function):void{
if (((!(allSystemManagers)) || (!(lastSystemManager)))){
return;
};
var _local2:SystemManager = lastSystemManager;
if (_local2.doneExecutingInitCallbacks){
_arg1(_local2);
} else {
_local2.initCallbackFunctions.push(_arg1);
};
}
private static function isRemotePopUp(_arg1:Object):Boolean{
return (!((_arg1 is IFocusManagerContainer)));
}
}
}//package mx.managers
Section 583
//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;
}
}//package mx.managers
Section 584
//SystemManagerProxy (mx.managers.SystemManagerProxy)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.events.*;
import mx.utils.*;
public class SystemManagerProxy extends SystemManager {
private var _systemManager:ISystemManager;
mx_internal static const VERSION:String = "3.3.0.4852";
public function SystemManagerProxy(_arg1:ISystemManager){
_systemManager = _arg1;
topLevel = true;
super.addEventListener(MouseEvent.MOUSE_DOWN, proxyMouseDownHandler, true);
}
override public function create(... _args):Object{
return (IFlexModuleFactory(_systemManager).create.apply(this, _args));
}
public function get systemManager():ISystemManager{
return (_systemManager);
}
override public function activate(_arg1:IFocusManagerContainer):void{
var _local3:Boolean;
var _local4:SWFBridgeEvent;
var _local2:IEventDispatcher = (_systemManager.swfBridgeGroup) ? _systemManager.swfBridgeGroup.parentBridge : null;
if (_local2){
_local3 = SecurityUtil.hasMutualTrustBetweenParentAndChild(ISWFBridgeProvider(_systemManager));
_local4 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, false, false, {notifier:_local2, window:(_local3) ? this : NameUtil.displayObjectToString(this)});
_systemManager.getSandboxRoot().dispatchEvent(_local4);
};
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
_systemManager.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function deactivateByProxy(_arg1:IFocusManagerContainer):void{
if (_arg1){
_arg1.focusManager.deactivate();
};
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
_systemManager.removeEventListener(_arg1, _arg2, _arg3);
}
override public function get document():Object{
return (findFocusManagerContainer(this));
}
public function activateByProxy(_arg1:IFocusManagerContainer):void{
super.activate(_arg1);
}
override public function removeChildBridge(_arg1:IEventDispatcher):void{
_systemManager.removeChildBridge(_arg1);
}
override public function get swfBridgeGroup():ISWFBridgeGroup{
return (_systemManager.swfBridgeGroup);
}
override public function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void{
_systemManager.addChildBridge(_arg1, _arg2);
}
override public function useSWFBridge():Boolean{
return (_systemManager.useSWFBridge());
}
override public function get screen():Rectangle{
return (_systemManager.screen);
}
override public function set swfBridgeGroup(_arg1:ISWFBridgeGroup):void{
}
private function proxyMouseDownHandler(_arg1:MouseEvent):void{
if (findFocusManagerContainer(this)){
SystemManager(_systemManager).dispatchActivatedWindowEvent(this);
};
}
override public function deactivate(_arg1:IFocusManagerContainer):void{
var _local4:Boolean;
var _local5:SWFBridgeEvent;
var _local2:ISystemManager = _systemManager;
var _local3:IEventDispatcher = (_local2.swfBridgeGroup) ? _local2.swfBridgeGroup.parentBridge : null;
if (_local3){
_local4 = SecurityUtil.hasMutualTrustBetweenParentAndChild(ISWFBridgeProvider(_systemManager));
_local5 = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, false, false, {notifier:_local3, window:(_local4) ? this : NameUtil.displayObjectToString(this)});
_systemManager.getSandboxRoot().dispatchEvent(_local5);
};
}
override public function set document(_arg1:Object):void{
}
override public function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle{
return (_systemManager.getVisibleApplicationRect(_arg1));
}
override public function getDefinitionByName(_arg1:String):Object{
return (_systemManager.getDefinitionByName(_arg1));
}
}
}//package mx.managers
Section 585
//SystemRawChildrenList (mx.managers.SystemRawChildrenList)
package mx.managers {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
public class SystemRawChildrenList implements IChildList {
private var owner:SystemManager;
mx_internal static const VERSION:String = "3.3.0.4852";
public function SystemRawChildrenList(_arg1:SystemManager){
this.owner = _arg1;
}
public function getChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_getChildAt(_arg1));
}
public function addChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_addChild(_arg1));
}
public function getChildIndex(_arg1:DisplayObject):int{
return (owner.mx_internal::rawChildren_getChildIndex(_arg1));
}
public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{
var _local3 = owner;
_local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2);
}
public function getChildByName(_arg1:String):DisplayObject{
return (owner.mx_internal::rawChildren_getChildByName(_arg1));
}
public function removeChildAt(_arg1:int):DisplayObject{
return (owner.mx_internal::rawChildren_removeChildAt(_arg1));
}
public function get numChildren():int{
return (owner.mx_internal::$numChildren);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2));
}
public function getObjectsUnderPoint(_arg1:Point):Array{
return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1));
}
public function contains(_arg1:DisplayObject):Boolean{
return (owner.mx_internal::rawChildren_contains(_arg1));
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
return (owner.mx_internal::rawChildren_removeChild(_arg1));
}
}
}//package mx.managers
Section 586
//ToolTipManager (mx.managers.ToolTipManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.effects.*;
public class ToolTipManager extends EventDispatcher {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var implClassDependency:ToolTipManagerImpl;
private static var _impl:IToolTipManager2;
mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
impl.registerToolTip(_arg1, _arg2, _arg3);
}
public static function get enabled():Boolean{
return (impl.enabled);
}
public static function set enabled(_arg1:Boolean):void{
impl.enabled = _arg1;
}
public static function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
return (impl.createToolTip(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public static function set hideDelay(_arg1:Number):void{
impl.hideDelay = _arg1;
}
public static function set showDelay(_arg1:Number):void{
impl.showDelay = _arg1;
}
public static function get showDelay():Number{
return (impl.showDelay);
}
public static function destroyToolTip(_arg1:IToolTip):void{
return (impl.destroyToolTip(_arg1));
}
public static function get scrubDelay():Number{
return (impl.scrubDelay);
}
public static function get toolTipClass():Class{
return (impl.toolTipClass);
}
mx_internal static function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
impl.registerErrorString(_arg1, _arg2, _arg3);
}
mx_internal static function sizeTip(_arg1:IToolTip):void{
impl.sizeTip(_arg1);
}
public static function set currentTarget(_arg1:DisplayObject):void{
impl.currentTarget = _arg1;
}
public static function set showEffect(_arg1:IAbstractEffect):void{
impl.showEffect = _arg1;
}
private static function get impl():IToolTipManager2{
if (!_impl){
_impl = IToolTipManager2(Singleton.getInstance("mx.managers::IToolTipManager2"));
};
return (_impl);
}
public static function get hideDelay():Number{
return (impl.hideDelay);
}
public static function set hideEffect(_arg1:IAbstractEffect):void{
impl.hideEffect = _arg1;
}
public static function set scrubDelay(_arg1:Number):void{
impl.scrubDelay = _arg1;
}
public static function get currentToolTip():IToolTip{
return (impl.currentToolTip);
}
public static function set currentToolTip(_arg1:IToolTip):void{
impl.currentToolTip = _arg1;
}
public static function get showEffect():IAbstractEffect{
return (impl.showEffect);
}
public static function get currentTarget():DisplayObject{
return (impl.currentTarget);
}
public static function get hideEffect():IAbstractEffect{
return (impl.hideEffect);
}
public static function set toolTipClass(_arg1:Class):void{
impl.toolTipClass = _arg1;
}
}
}//package mx.managers
Section 587
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.geom.*;
import flash.utils.*;
import mx.events.*;
import mx.controls.*;
import mx.effects.*;
import mx.validators.*;
public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager2 {
private var _enabled:Boolean;// = true
private var _showDelay:Number;// = 500
private var _hideEffect:IAbstractEffect;
mx_internal var hideTimer:Timer;
private var _scrubDelay:Number;// = 100
private var _toolTipClass:Class;
mx_internal var showTimer:Timer;
private var sandboxRoot:IEventDispatcher;// = null
mx_internal var currentText:String;
private var _currentToolTip:DisplayObject;
mx_internal var scrubTimer:Timer;
mx_internal var previousTarget:DisplayObject;
private var _currentTarget:DisplayObject;
private var systemManager:ISystemManager;// = null
private var _showEffect:IAbstractEffect;
private var _hideDelay:Number;// = 10000
mx_internal var initialized:Boolean;// = false
mx_internal var isError:Boolean;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var instance:IToolTipManager2;
public function ToolTipManagerImpl(){
_toolTipClass = ToolTip;
super();
if (instance){
throw (new Error("Instance already exists."));
};
this.systemManager = (SystemManagerGlobals.topLevelSystemManagers[0] as ISystemManager);
sandboxRoot = this.systemManager.getSandboxRoot();
sandboxRoot.addEventListener(InterManagerRequest.TOOLTIP_MANAGER_REQUEST, marshalToolTipManagerHandler, false, 0, true);
var _local1:InterManagerRequest = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local1.name = "update";
sandboxRoot.dispatchEvent(_local1);
}
mx_internal function systemManager_mouseDownHandler(_arg1:MouseEvent):void{
reset();
}
public function set showDelay(_arg1:Number):void{
_showDelay = _arg1;
}
mx_internal function showTimer_timerHandler(_arg1:TimerEvent):void{
if (currentTarget){
createTip();
initializeTip();
positionTip();
showTip();
};
}
mx_internal function hideEffectEnded():void{
var _local1:ToolTipEvent;
reset();
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_END);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
}
public function set scrubDelay(_arg1:Number):void{
_scrubDelay = _arg1;
}
public function get currentToolTip():IToolTip{
return ((_currentToolTip as IToolTip));
}
private function mouseIsOver(_arg1:DisplayObject):Boolean{
if (((!(_arg1)) || (!(_arg1.stage)))){
return (false);
};
if ((((_arg1.stage.mouseX == 0)) && ((_arg1.stage.mouseY == 0)))){
return (false);
};
return (_arg1.hitTestPoint(_arg1.stage.mouseX, _arg1.stage.mouseY, true));
}
mx_internal function toolTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
public function get enabled():Boolean{
return (_enabled);
}
public function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{
var _local6:ToolTip = new ToolTip();
var _local7:ISystemManager = (_arg5) ? (_arg5.systemManager as ISystemManager) : (ApplicationGlobals.application.systemManager as ISystemManager);
_local7.topLevelSystemManager.addChildToSandboxRoot("toolTipChildren", (_local6 as DisplayObject));
if (_arg4){
_local6.setStyle("styleName", "errorTip");
_local6.setStyle("borderStyle", _arg4);
};
_local6.text = _arg1;
sizeTip(_local6);
_local6.move(_arg2, _arg3);
return ((_local6 as IToolTip));
}
mx_internal function reset():void{
var _local1:ISystemManager;
showTimer.reset();
hideTimer.reset();
if (currentToolTip){
if (((showEffect) || (hideEffect))){
currentToolTip.removeEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
EffectManager.endEffectsForTarget(currentToolTip);
_local1 = (currentToolTip.systemManager as ISystemManager);
_local1.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", (currentToolTip as DisplayObject));
currentToolTip = null;
scrubTimer.delay = scrubDelay;
scrubTimer.reset();
if (scrubDelay > 0){
scrubTimer.delay = scrubDelay;
scrubTimer.start();
};
};
}
public function set currentToolTip(_arg1:IToolTip):void{
_currentToolTip = (_arg1 as DisplayObject);
var _local2:InterManagerRequest = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = "currentToolTip";
_local2.value = _arg1;
sandboxRoot.dispatchEvent(_local2);
}
public function get toolTipClass():Class{
return (_toolTipClass);
}
private function hideImmediately(_arg1:DisplayObject):void{
checkIfTargetChanged(null);
}
mx_internal function showTip():void{
var _local2:ISystemManager;
var _local1:ToolTipEvent = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
if (isError){
currentTarget.addEventListener("change", changeHandler);
} else {
_local2 = getSystemManager(currentTarget);
_local2.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
currentToolTip.visible = true;
if (!showEffect){
showEffectEnded();
};
}
mx_internal function effectEndHandler(_arg1:EffectEvent):void{
if (_arg1.effectInstance.effect == showEffect){
showEffectEnded();
} else {
if (_arg1.effectInstance.effect == hideEffect){
hideEffectEnded();
};
};
}
public function get hideDelay():Number{
return (_hideDelay);
}
public function get currentTarget():DisplayObject{
return (_currentTarget);
}
mx_internal function showEffectEnded():void{
var _local1:ToolTipEvent;
if (hideDelay == 0){
hideTip();
} else {
if (hideDelay < Infinity){
hideTimer.delay = hideDelay;
hideTimer.start();
};
};
if (currentTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN);
_local1.toolTip = currentToolTip;
currentTarget.dispatchEvent(_local1);
};
}
public function get hideEffect():IAbstractEffect{
return (_hideEffect);
}
mx_internal function changeHandler(_arg1:Event):void{
reset();
}
public function set enabled(_arg1:Boolean):void{
_enabled = _arg1;
}
mx_internal function errorTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
public function get showDelay():Number{
return (_showDelay);
}
public function get scrubDelay():Number{
return (_scrubDelay);
}
public function registerErrorString(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
if (((!(_arg2)) && (_arg3))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
if (mouseIsOver(_arg1)){
showImmediately(_arg1);
};
} else {
if (((_arg2) && (!(_arg3)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler);
if (mouseIsOver(_arg1)){
hideImmediately(_arg1);
};
};
};
}
mx_internal function initialize():void{
if (!showTimer){
showTimer = new Timer(0, 1);
showTimer.addEventListener(TimerEvent.TIMER, showTimer_timerHandler);
};
if (!hideTimer){
hideTimer = new Timer(0, 1);
hideTimer.addEventListener(TimerEvent.TIMER, hideTimer_timerHandler);
};
if (!scrubTimer){
scrubTimer = new Timer(0, 1);
};
initialized = true;
}
public function destroyToolTip(_arg1:IToolTip):void{
var _local2:ISystemManager = (_arg1.systemManager as ISystemManager);
_local2.topLevelSystemManager.removeChildFromSandboxRoot("toolTipChildren", DisplayObject(_arg1));
}
mx_internal function checkIfTargetChanged(_arg1:DisplayObject):void{
if (!enabled){
return;
};
findTarget(_arg1);
if (currentTarget != previousTarget){
targetChanged();
previousTarget = currentTarget;
};
}
private function marshalToolTipManagerHandler(_arg1:Event):void{
var _local2:InterManagerRequest;
if ((_arg1 is InterManagerRequest)){
return;
};
var _local3:Object = _arg1;
switch (_local3.name){
case "currentToolTip":
_currentToolTip = _local3.value;
break;
case ToolTipEvent.TOOL_TIP_HIDE:
if ((_currentToolTip is IToolTip)){
hideTip();
};
break;
case "update":
_arg1.stopImmediatePropagation();
_local2 = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = "currentToolTip";
_local2.value = _currentToolTip;
sandboxRoot.dispatchEvent(_local2);
};
}
public function set toolTipClass(_arg1:Class):void{
_toolTipClass = _arg1;
}
private function getGlobalBounds(_arg1:DisplayObject, _arg2:DisplayObject):Rectangle{
var _local3:Point = new Point(0, 0);
_local3 = _arg1.localToGlobal(_local3);
_local3 = _arg2.globalToLocal(_local3);
return (new Rectangle(_local3.x, _local3.y, _arg1.width, _arg1.height));
}
mx_internal function positionTip():void{
var _local1:Number;
var _local2:Number;
var _local5:Rectangle;
var _local6:Point;
var _local7:IToolTip;
var _local8:Number;
var _local9:Number;
var _local10:ISystemManager;
var _local11:Number;
var _local12:Number;
var _local3:Number = currentToolTip.screen.width;
var _local4:Number = currentToolTip.screen.height;
if (isError){
_local5 = getGlobalBounds(currentTarget, currentToolTip.root);
_local1 = (_local5.right + 4);
_local2 = (_local5.top - 1);
if ((_local1 + currentToolTip.width) > _local3){
_local8 = NaN;
_local9 = NaN;
_local1 = (_local5.left - 2);
if (((_local1 + currentToolTip.width) + 4) > _local3){
_local8 = ((_local3 - _local1) - 4);
_local9 = Object(toolTipClass).maxWidth;
Object(toolTipClass).maxWidth = _local8;
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
Object(toolTipClass).maxWidth = _local9;
} else {
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
};
currentToolTip["text"] = currentToolTip["text"];
};
if ((currentToolTip.height + 2) < _local5.top){
_local2 = (_local5.top - (currentToolTip.height + 2));
} else {
_local2 = (_local5.bottom + 2);
if (!isNaN(_local8)){
Object(toolTipClass).maxWidth = _local8;
};
if ((currentToolTip is IStyleClient)){
IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow");
};
currentToolTip["text"] = currentToolTip["text"];
if (!isNaN(_local9)){
Object(toolTipClass).maxWidth = _local9;
};
};
};
sizeTip(currentToolTip);
_local6 = new Point(_local1, _local2);
_local7 = currentToolTip;
_local1 = _local6.x;
_local2 = _local6.y;
} else {
_local10 = getSystemManager(currentTarget);
_local1 = (DisplayObject(_local10).mouseX + 11);
_local2 = (DisplayObject(_local10).mouseY + 22);
_local11 = currentToolTip.width;
if ((_local1 + _local11) > _local3){
_local1 = (_local3 - _local11);
};
_local12 = currentToolTip.height;
if ((_local2 + _local12) > _local4){
_local2 = (_local4 - _local12);
};
_local6 = new Point(_local1, _local2);
_local6 = DisplayObject(_local10).localToGlobal(_local6);
_local6 = DisplayObject(sandboxRoot).globalToLocal(_local6);
_local1 = _local6.x;
_local2 = _local6.y;
};
currentToolTip.move(_local1, _local2);
}
mx_internal function errorTipMouseOutHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(_arg1.relatedObject);
}
mx_internal function findTarget(_arg1:DisplayObject):void{
while (_arg1) {
if ((_arg1 is IValidatorListener)){
currentText = IValidatorListener(_arg1).errorString;
if (((!((currentText == null))) && (!((currentText == ""))))){
currentTarget = _arg1;
isError = true;
return;
};
};
if ((_arg1 is IToolTipManagerClient)){
currentText = IToolTipManagerClient(_arg1).toolTip;
if (currentText != null){
currentTarget = _arg1;
isError = false;
return;
};
};
_arg1 = _arg1.parent;
};
currentText = null;
currentTarget = null;
}
public function registerToolTip(_arg1:DisplayObject, _arg2:String, _arg3:String):void{
if (((!(_arg2)) && (_arg3))){
_arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
if (mouseIsOver(_arg1)){
showImmediately(_arg1);
};
} else {
if (((_arg2) && (!(_arg3)))){
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler);
_arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler);
if (mouseIsOver(_arg1)){
hideImmediately(_arg1);
};
};
};
}
private function showImmediately(_arg1:DisplayObject):void{
var _local2:Number = ToolTipManager.showDelay;
ToolTipManager.showDelay = 0;
checkIfTargetChanged(_arg1);
ToolTipManager.showDelay = _local2;
}
public function set hideDelay(_arg1:Number):void{
_hideDelay = _arg1;
}
private function getSystemManager(_arg1:DisplayObject):ISystemManager{
return (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).systemManager : null);
}
public function set currentTarget(_arg1:DisplayObject):void{
_currentTarget = _arg1;
}
public function sizeTip(_arg1:IToolTip):void{
if ((_arg1 is IInvalidating)){
IInvalidating(_arg1).validateNow();
};
_arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight());
}
public function set showEffect(_arg1:IAbstractEffect):void{
_showEffect = (_arg1 as IAbstractEffect);
}
mx_internal function targetChanged():void{
var _local1:ToolTipEvent;
var _local2:InterManagerRequest;
if (!initialized){
initialize();
};
if (((previousTarget) && (currentToolTip))){
if ((currentToolTip is IToolTip)){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
} else {
_local2 = new InterManagerRequest(InterManagerRequest.TOOLTIP_MANAGER_REQUEST);
_local2.name = ToolTipEvent.TOOL_TIP_HIDE;
sandboxRoot.dispatchEvent(_local2);
};
};
reset();
if (currentTarget){
if (currentText == ""){
return;
};
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START);
currentTarget.dispatchEvent(_local1);
if ((((showDelay == 0)) || (scrubTimer.running))){
createTip();
initializeTip();
positionTip();
showTip();
} else {
showTimer.delay = showDelay;
showTimer.start();
};
};
}
public function set hideEffect(_arg1:IAbstractEffect):void{
_hideEffect = (_arg1 as IAbstractEffect);
}
mx_internal function hideTimer_timerHandler(_arg1:TimerEvent):void{
hideTip();
}
mx_internal function initializeTip():void{
if ((currentToolTip is IToolTip)){
IToolTip(currentToolTip).text = currentText;
};
if (((isError) && ((currentToolTip is IStyleClient)))){
IStyleClient(currentToolTip).setStyle("styleName", "errorTip");
};
sizeTip(currentToolTip);
if ((currentToolTip is IStyleClient)){
if (showEffect){
IStyleClient(currentToolTip).setStyle("showEffect", showEffect);
};
if (hideEffect){
IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect);
};
};
if (((showEffect) || (hideEffect))){
currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
};
}
public function get showEffect():IAbstractEffect{
return (_showEffect);
}
mx_internal function toolTipMouseOverHandler(_arg1:MouseEvent):void{
checkIfTargetChanged(DisplayObject(_arg1.target));
}
mx_internal function hideTip():void{
var _local1:ToolTipEvent;
var _local2:ISystemManager;
if (previousTarget){
_local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
_local1.toolTip = currentToolTip;
previousTarget.dispatchEvent(_local1);
};
if (currentToolTip){
currentToolTip.visible = false;
};
if (isError){
if (currentTarget){
currentTarget.removeEventListener("change", changeHandler);
};
} else {
if (previousTarget){
_local2 = getSystemManager(previousTarget);
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
};
};
if (!hideEffect){
hideEffectEnded();
};
}
mx_internal function createTip():void{
var _local1:ToolTipEvent = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE);
currentTarget.dispatchEvent(_local1);
if (_local1.toolTip){
currentToolTip = _local1.toolTip;
} else {
currentToolTip = new toolTipClass();
};
currentToolTip.visible = false;
var _local2:ISystemManager = (getSystemManager(currentTarget) as ISystemManager);
_local2.topLevelSystemManager.addChildToSandboxRoot("toolTipChildren", (currentToolTip as DisplayObject));
}
public static function getInstance():IToolTipManager2{
if (!instance){
instance = new (ToolTipManagerImpl);
};
return (instance);
}
}
}//package mx.managers
Section 588
//LoaderConfig (mx.messaging.config.LoaderConfig)
package mx.messaging.config {
public class LoaderConfig {
mx_internal static const VERSION:String = "3.3.0.4852";
mx_internal static var _url:String = null;
mx_internal static var _parameters:Object;
public static function get url():String{
return (_url);
}
public static function get parameters():Object{
return (_parameters);
}
}
}//package mx.messaging.config
Section 589
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
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 590
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.3.0.4852";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.net.*;
import flash.display.*;
import flash.system.*;
import flash.utils.*;
import mx.events.*;
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;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 591
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 592
//DownloadProgressBar (mx.preloaders.DownloadProgressBar)
package mx.preloaders {
import flash.events.*;
import flash.net.*;
import flash.display.*;
import flash.system.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import mx.events.*;
import mx.graphics.*;
public class DownloadProgressBar extends Sprite implements IPreloaderDisplay {
protected var MINIMUM_DISPLAY_TIME:uint;// = 0
private var _barFrameRect:RoundedRectangle;
private var _stageHeight:Number;// = 375
private var _stageWidth:Number;// = 500
private var _percentRect:Rectangle;
private var _percentObj:TextField;
private var _downloadingLabel:String;// = "Loading"
private var _showProgressBar:Boolean;// = true
private var _yOffset:Number;// = 20
private var _initProgressCount:uint;// = 0
private var _barSprite:Sprite;
private var _visible:Boolean;// = false
private var _barRect:RoundedRectangle;
private var _showingDisplay:Boolean;// = false
private var _backgroundSize:String;// = ""
private var _initProgressTotal:uint;// = 12
private var _startedInit:Boolean;// = false
private var _showLabel:Boolean;// = true
private var _value:Number;// = 0
private var _labelRect:Rectangle;
private var _backgroundImage:Object;
private var _backgroundAlpha:Number;// = 1
private var _backgroundColor:uint;
private var _startedLoading:Boolean;// = false
private var _showPercentage:Boolean;// = false
private var _barFrameSprite:Sprite;
protected var DOWNLOAD_PERCENTAGE:uint;// = 60
private var _displayStartCount:uint;// = 0
private var _labelObj:TextField;
private var _borderRect:RoundedRectangle;
private var _maximum:Number;// = 0
private var _displayTime:int;
private var _label:String;// = ""
private var _preloader:Sprite;
private var _xOffset:Number;// = 20
private var _startTime:int;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var _initializingLabel:String = "Initializing";
public function DownloadProgressBar(){
_labelRect = labelRect;
_percentRect = percentRect;
_borderRect = borderRect;
_barFrameRect = barFrameRect;
_barRect = barRect;
super();
}
protected function getPercentLoaded(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
if ((((((((_arg1 == 0)) || ((_arg2 == 0)))) || (isNaN(_arg2)))) || (isNaN(_arg1)))){
return (0);
};
_local3 = ((100 * _arg1) / _arg2);
if (((isNaN(_local3)) || ((_local3 <= 0)))){
return (0);
};
if (_local3 > 99){
return (99);
};
return (Math.round(_local3));
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0x333333;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
private function calcScale():void{
var _local1:Number;
if ((((stageWidth < 160)) || ((stageHeight < 120)))){
scaleX = 1;
scaleY = 1;
} else {
if ((((stageWidth < 240)) || ((stageHeight < 150)))){
createChildren();
_local1 = Math.min((stageWidth / 240), (stageHeight / 150));
scaleX = _local1;
scaleY = _local1;
} else {
createChildren();
};
};
}
protected function get percentRect():Rectangle{
return (new Rectangle(108, 4, 34, 16));
}
protected function set showLabel(_arg1:Boolean):void{
_showLabel = _arg1;
draw();
}
private function calcBackgroundSize():Number{
var _local2:int;
var _local1:Number = NaN;
if (backgroundSize){
_local2 = backgroundSize.indexOf("%");
if (_local2 != -1){
_local1 = Number(backgroundSize.substr(0, _local2));
};
};
return (_local1);
}
private function show():void{
_showingDisplay = true;
calcScale();
draw();
_displayTime = getTimer();
}
private function loadBackgroundImage(_arg1:Object):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var classOrString = _arg1;
if (((classOrString) && ((classOrString as Class)))){
cls = Class(classOrString);
initBackgroundImage(new (cls));
} else {
if (((classOrString) && ((classOrString is String)))){
try {
cls = Class(getDefinitionByName(String(classOrString)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(classOrString)), loaderContext);
};
};
};
}
protected function set showPercentage(_arg1:Boolean):void{
_showPercentage = _arg1;
draw();
}
protected function get barFrameRect():RoundedRectangle{
return (new RoundedRectangle(14, 40, 154, 4));
}
private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{
}
protected function rslErrorHandler(_arg1:RSLEvent):void{
_preloader.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
_preloader.removeEventListener(Event.COMPLETE, completeHandler);
_preloader.removeEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_preloader.removeEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_preloader.removeEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_preloader.removeEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_preloader.removeEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
if (!_showingDisplay){
show();
_showingDisplay = true;
};
label = ((("RSL Error " + (_arg1.rslIndex + 1)) + " of ") + _arg1.rslTotal);
var _local2:ErrorField = new ErrorField(this);
_local2.show(_arg1.errorText);
}
protected function rslCompleteHandler(_arg1:RSLEvent):void{
label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal);
}
protected function get borderRect():RoundedRectangle{
return (new RoundedRectangle(0, 0, 182, 60, 4));
}
protected function showDisplayForDownloading(_arg1:int, _arg2:ProgressEvent):Boolean{
return ((((_arg1 > 700)) && ((_arg2.bytesLoaded < (_arg2.bytesTotal / 2)))));
}
protected function createChildren():void{
var _local2:TextField;
var _local3:TextField;
var _local1:Graphics = graphics;
if (backgroundColor != 4294967295){
_local1.beginFill(backgroundColor, backgroundAlpha);
_local1.drawRect(0, 0, stageWidth, stageHeight);
};
if (backgroundImage != null){
loadBackgroundImage(backgroundImage);
};
_barFrameSprite = new Sprite();
_barSprite = new Sprite();
addChild(_barFrameSprite);
addChild(_barSprite);
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height, (_borderRect.cornerRadius * 2), (_borderRect.cornerRadius * 2));
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
_local1.beginFill(0xCCCCCC, 0.4);
_local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2)));
_local1.endFill();
var _local4:Graphics = _barFrameSprite.graphics;
var _local5:Matrix = new Matrix();
_local5.createGradientBox(_barFrameRect.width, _barFrameRect.height, (Math.PI / 2), calcX(_barFrameRect.x), calcY(_barFrameRect.y));
_local4.beginGradientFill(GradientType.LINEAR, [6054502, 11909306], [1, 1], [0, 0xFF], _local5);
_local4.drawRoundRect(calcX(_barFrameRect.x), calcY(_barFrameRect.y), _barFrameRect.width, _barFrameRect.height, (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.drawRoundRect(calcX((_barFrameRect.x + 1)), calcY((_barFrameRect.y + 1)), (_barFrameRect.width - 2), (_barFrameRect.height - 2), (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2));
_local4.endFill();
_labelObj = new TextField();
_labelObj.x = calcX(_labelRect.x);
_labelObj.y = calcY(_labelRect.y);
_labelObj.width = _labelRect.width;
_labelObj.height = _labelRect.height;
_labelObj.selectable = false;
_labelObj.defaultTextFormat = labelFormat;
addChild(_labelObj);
_percentObj = new TextField();
_percentObj.x = calcX(_percentRect.x);
_percentObj.y = calcY(_percentRect.y);
_percentObj.width = _percentRect.width;
_percentObj.height = _percentRect.height;
_percentObj.selectable = false;
_percentObj.defaultTextFormat = percentFormat;
addChild(_percentObj);
var _local6:RectangularDropShadow = new RectangularDropShadow();
_local6.color = 0;
_local6.angle = 90;
_local6.alpha = 0.6;
_local6.distance = 2;
_local6.tlRadius = (_local6.trRadius = (_local6.blRadius = (_local6.brRadius = _borderRect.cornerRadius)));
_local6.drawShadow(_local1, calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height);
_local1.lineStyle(1, 0xFFFFFF, 0.3);
_local1.moveTo((calcX(_borderRect.x) + _borderRect.cornerRadius), calcY(_borderRect.y));
_local1.lineTo(((calcX(_borderRect.x) - _borderRect.cornerRadius) + _borderRect.width), calcY(_borderRect.y));
}
private function draw():void{
var _local1:Number;
if (_startedLoading){
if (!_startedInit){
_local1 = Math.round(((getPercentLoaded(_value, _maximum) * DOWNLOAD_PERCENTAGE) / 100));
} else {
_local1 = Math.round((((getPercentLoaded(_value, _maximum) * (100 - DOWNLOAD_PERCENTAGE)) / 100) + DOWNLOAD_PERCENTAGE));
};
} else {
_local1 = getPercentLoaded(_value, _maximum);
};
if (_labelObj){
_labelObj.text = _label;
};
if (_percentObj){
if (!_showPercentage){
_percentObj.visible = false;
_percentObj.text = "";
} else {
_percentObj.text = (String(_local1) + "%");
};
};
if (((_barSprite) && (_barFrameSprite))){
if (!_showProgressBar){
_barSprite.visible = false;
_barFrameSprite.visible = false;
} else {
drawProgressBar(_local1);
};
};
}
private function timerHandler(_arg1:Event=null):void{
dispatchEvent(new Event(Event.COMPLETE));
}
private function hide():void{
}
public function get backgroundSize():String{
return (_backgroundSize);
}
protected function center(_arg1:Number, _arg2:Number):void{
_xOffset = Math.floor(((_arg1 - _borderRect.width) / 2));
_yOffset = Math.floor(((_arg2 - _borderRect.height) / 2));
}
protected function progressHandler(_arg1:ProgressEvent):void{
var _local2:uint = _arg1.bytesLoaded;
var _local3:uint = _arg1.bytesTotal;
var _local4:int = (getTimer() - _startTime);
if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){
if (!_startedLoading){
show();
label = downloadingLabel;
_startedLoading = true;
};
setProgress(_arg1.bytesLoaded, _arg1.bytesTotal);
};
}
protected function initProgressHandler(_arg1:Event):void{
var _local3:Number;
var _local2:int = (getTimer() - _startTime);
_initProgressCount++;
if (((!(_showingDisplay)) && (showDisplayForInit(_local2, _initProgressCount)))){
_displayStartCount = _initProgressCount;
show();
} else {
if (_showingDisplay){
if (!_startedInit){
_startedInit = true;
label = initializingLabel;
};
_local3 = ((100 * _initProgressCount) / (_initProgressTotal - _displayStartCount));
setProgress(_local3, 100);
};
};
}
protected function set downloadingLabel(_arg1:String):void{
_downloadingLabel = _arg1;
}
public function get stageWidth():Number{
return (_stageWidth);
}
protected function get showPercentage():Boolean{
return (_showPercentage);
}
override public function get visible():Boolean{
return (_visible);
}
public function set stageHeight(_arg1:Number):void{
_stageHeight = _arg1;
}
public function initialize():void{
_startTime = getTimer();
center(stageWidth, stageHeight);
}
protected function rslProgressHandler(_arg1:RSLEvent):void{
}
protected function get barRect():RoundedRectangle{
return (new RoundedRectangle(14, 39, 154, 6, 0));
}
protected function get percentFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.align = "right";
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
public function set backgroundImage(_arg1:Object):void{
_backgroundImage = _arg1;
}
private function calcX(_arg1:Number):Number{
return ((_arg1 + _xOffset));
}
private function calcY(_arg1:Number):Number{
return ((_arg1 + _yOffset));
}
public function set backgroundAlpha(_arg1:Number):void{
_backgroundAlpha = _arg1;
}
private function initCompleteHandler(_arg1:Event):void{
var _local3:Timer;
var _local2:int = (getTimer() - _displayTime);
if (((_showingDisplay) && ((_local2 < MINIMUM_DISPLAY_TIME)))){
_local3 = new Timer((MINIMUM_DISPLAY_TIME - _local2), 1);
_local3.addEventListener(TimerEvent.TIMER, timerHandler);
_local3.start();
} else {
timerHandler();
};
}
public function set backgroundColor(_arg1:uint):void{
_backgroundColor = _arg1;
}
private function initBackgroundImage(_arg1:DisplayObject):void{
var _local7:Number;
var _local8:Number;
var _local9:Number;
addChildAt(_arg1, 0);
var _local2:Number = _arg1.width;
var _local3:Number = _arg1.height;
var _local4:Number = calcBackgroundSize();
if (isNaN(_local4)){
_local7 = 1;
_local8 = 1;
} else {
_local9 = (_local4 * 0.01);
_local7 = ((_local9 * stageWidth) / _local2);
_local8 = ((_local9 * stageHeight) / _local3);
};
_arg1.scaleX = _local7;
_arg1.scaleY = _local8;
var _local5:Number = Math.round((0.5 * (stageWidth - (_local2 * _local7))));
var _local6:Number = Math.round((0.5 * (stageHeight - (_local3 * _local8))));
_arg1.x = _local5;
_arg1.y = _local6;
if (!isNaN(backgroundAlpha)){
_arg1.alpha = backgroundAlpha;
};
}
public function set backgroundSize(_arg1:String):void{
_backgroundSize = _arg1;
}
protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{
return ((((_arg1 > 300)) && ((_arg2 == 2))));
}
protected function get downloadingLabel():String{
return (_downloadingLabel);
}
private function loader_completeHandler(_arg1:Event):void{
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
}
protected function setProgress(_arg1:Number, _arg2:Number):void{
if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){
_value = Number(_arg1);
_maximum = Number(_arg2);
draw();
};
}
public function get stageHeight():Number{
return (_stageHeight);
}
public function get backgroundImage():Object{
return (_backgroundImage);
}
public function get backgroundAlpha():Number{
if (!isNaN(_backgroundAlpha)){
return (_backgroundAlpha);
};
return (1);
}
private function drawProgressBar(_arg1:Number):void{
var _local11:Number;
var _local2:Graphics = _barSprite.graphics;
_local2.clear();
var _local3:Array = [0xFFFFFF, 0xFFFFFF];
var _local4:Array = [0, 0xFF];
var _local5:Matrix = new Matrix();
var _local6:Number = ((_barRect.width * _arg1) / 100);
var _local7:Number = (_local6 / 2);
var _local8:Number = (_barRect.height - 4);
var _local9:Number = calcX(_barRect.x);
var _local10:Number = (calcY(_barRect.y) + 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.39, 0.85], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, _local8);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.85, 1], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, _local8);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = calcY(_barRect.y);
_local11 = ((_local10 + _local8) - 1);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.05, 0.15], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.25], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.25, 0.1], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
_local7 = (_local6 / 3);
_local8 = _barRect.height;
_local10 = (calcY(_barRect.y) + 1);
_local11 = ((calcY(_barRect.y) + _local8) - 2);
_local5.createGradientBox(_local7, _local8, 0, _local9, _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.3], _local4, _local5);
_local2.drawRect(_local9, _local10, _local7, 1);
_local2.drawRect(_local9, _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.3, 0.4], _local4, _local5);
_local2.drawRect((_local9 + _local7), _local10, _local7, 1);
_local2.drawRect((_local9 + _local7), _local11, _local7, 1);
_local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10);
_local2.beginGradientFill(GradientType.LINEAR, _local3, [0.4, 0.25], _local4, _local5);
_local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1);
_local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1);
}
public function get backgroundColor():uint{
return (_backgroundColor);
}
public function set stageWidth(_arg1:Number):void{
_stageWidth = _arg1;
}
protected function completeHandler(_arg1:Event):void{
}
protected function set label(_arg1:String):void{
if (!(_arg1 is Function)){
_label = _arg1;
};
draw();
}
public function set preloader(_arg1:Sprite):void{
_preloader = _arg1;
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);
_arg1.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);
_arg1.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);
_arg1.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
_arg1.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
}
protected function get label():String{
return (_label);
}
protected function get labelRect():Rectangle{
return (new Rectangle(14, 17, 100, 16));
}
override public function set visible(_arg1:Boolean):void{
if (((!(_visible)) && (_arg1))){
show();
} else {
if (((_visible) && (!(_arg1)))){
hide();
};
};
_visible = _arg1;
}
protected function get showLabel():Boolean{
return (_showLabel);
}
public static function get initializingLabel():String{
return (_initializingLabel);
}
public static function set initializingLabel(_arg1:String):void{
_initializingLabel = _arg1;
}
}
}//package mx.preloaders
import flash.display.*;
import flash.system.*;
import flash.text.*;
class ErrorField extends Sprite {
private const TEXT_MARGIN_PX:int = 10;
private const MAX_WIDTH_INCHES:int = 6;
private const MIN_WIDTH_INCHES:int = 2;
private var downloadProgressBar:DownloadProgressBar;
private function ErrorField(_arg1:DownloadProgressBar){
this.downloadProgressBar = _arg1;
}
protected function get labelFormat():TextFormat{
var _local1:TextFormat = new TextFormat();
_local1.color = 0;
_local1.font = "Verdana";
_local1.size = 10;
return (_local1);
}
public function show(_arg1:String):void{
if ((((_arg1 == null)) || ((_arg1.length == 0)))){
return;
};
var _local2:Number = downloadProgressBar.stageWidth;
var _local3:Number = downloadProgressBar.stageHeight;
var _local4:TextField = new TextField();
_local4.autoSize = TextFieldAutoSize.LEFT;
_local4.multiline = true;
_local4.wordWrap = true;
_local4.background = true;
_local4.defaultTextFormat = labelFormat;
_local4.text = _arg1;
_local4.width = Math.max((MIN_WIDTH_INCHES * Capabilities.screenDPI), (_local2 - (TEXT_MARGIN_PX * 2)));
_local4.width = Math.min((MAX_WIDTH_INCHES * Capabilities.screenDPI), _local4.width);
_local4.y = Math.max(0, ((_local3 - TEXT_MARGIN_PX) - _local4.height));
_local4.x = ((_local2 - _local4.width) / 2);
downloadProgressBar.parent.addChild(this);
this.addChild(_local4);
}
}
Section 593
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay)
package mx.preloaders {
import flash.events.*;
import flash.display.*;
public interface IPreloaderDisplay extends IEventDispatcher {
function set backgroundAlpha(_arg1:Number):void;
function get stageHeight():Number;
function get stageWidth():Number;
function set backgroundColor(_arg1:uint):void;
function set preloader(_arg1:Sprite):void;
function get backgroundImage():Object;
function get backgroundSize():String;
function get backgroundAlpha():Number;
function set stageHeight(_arg1:Number):void;
function get backgroundColor():uint;
function set stageWidth(_arg1:Number):void;
function set backgroundImage(_arg1:Object):void;
function set backgroundSize(_arg1:String):void;
function initialize():void;
}
}//package mx.preloaders
Section 594
//Preloader (mx.preloaders.Preloader)
package mx.preloaders {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import mx.events.*;
public class Preloader extends Sprite {
private var app:IEventDispatcher;// = null
private var showDisplay:Boolean;
private var timer:Timer;
private var rslDone:Boolean;// = false
private var displayClass:IPreloaderDisplay;// = null
private var rslListLoader:RSLListLoader;
mx_internal static const VERSION:String = "3.3.0.4852";
private function getByteValues():Object{
var _local1:LoaderInfo = root.loaderInfo;
var _local2:int = _local1.bytesLoaded;
var _local3:int = _local1.bytesTotal;
var _local4:int = (rslListLoader) ? rslListLoader.getItemCount() : 0;
var _local5:int;
while (_local5 < _local4) {
_local2 = (_local2 + rslListLoader.getItem(_local5).loaded);
_local3 = (_local3 + rslListLoader.getItem(_local5).total);
_local5++;
};
return ({loaded:_local2, total:_local3});
}
private function appProgressHandler(_arg1:Event):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
}
private function dispatchAppEndEvent(_arg1:Object=null):void{
dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE));
if (!showDisplay){
displayClassCompleteHandler(null);
};
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
}
private function appCreationCompleteHandler(_arg1:FlexEvent):void{
dispatchAppEndEvent();
}
mx_internal function rslErrorHandler(_arg1:ErrorEvent):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_ERROR);
_local4.bytesLoaded = 0;
_local4.bytesTotal = 0;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
_local4.errorText = decodeURI(_arg1.text);
dispatchEvent(_local4);
}
public function initialize(_arg1:Boolean, _arg2:Class, _arg3:uint, _arg4:Number, _arg5:Object, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Array=null, _arg10:Array=null, _arg11:Array=null, _arg12:Array=null):void{
var _local13:int;
var _local14:int;
var _local15:RSLItem;
var _local16:ResourceModuleRSLItem;
if (((((!((_arg9 == null))) || (!((_arg10 == null))))) && (!((_arg11 == null))))){
throw (new Error("RSLs may only be specified by using libs and sizes or rslList, not both."));
};
root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
if (((_arg9) && ((_arg9.length > 0)))){
if (_arg11 == null){
_arg11 = [];
};
_local13 = _arg9.length;
_local14 = 0;
while (_local14 < _local13) {
_local15 = new RSLItem(_arg9[_local14]);
_arg11.push(_local15);
_local14++;
};
};
if (((_arg12) && ((_arg12.length > 0)))){
_local13 = _arg12.length;
_local14 = 0;
while (_local14 < _local13) {
_local16 = new ResourceModuleRSLItem(_arg12[_local14]);
_arg11.push(_local16);
_local14++;
};
};
rslListLoader = new RSLListLoader(_arg11);
this.showDisplay = _arg1;
timer = new Timer(10);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
if (_arg1){
displayClass = new (_arg2);
displayClass.addEventListener(Event.COMPLETE, displayClassCompleteHandler);
addChild(DisplayObject(displayClass));
displayClass.backgroundColor = _arg3;
displayClass.backgroundAlpha = _arg4;
displayClass.backgroundImage = _arg5;
displayClass.backgroundSize = _arg6;
displayClass.stageWidth = _arg7;
displayClass.stageHeight = _arg8;
displayClass.initialize();
displayClass.preloader = this;
};
if (rslListLoader.getItemCount() > 0){
rslListLoader.load(mx_internal::rslProgressHandler, mx_internal::rslCompleteHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler, mx_internal::rslErrorHandler);
} else {
rslDone = true;
};
}
mx_internal function rslProgressHandler(_arg1:ProgressEvent):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_PROGRESS);
_local4.bytesLoaded = _arg1.bytesLoaded;
_local4.bytesTotal = _arg1.bytesTotal;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
dispatchEvent(_local4);
}
public function registerApplication(_arg1:IEventDispatcher):void{
_arg1.addEventListener("validatePropertiesComplete", appProgressHandler);
_arg1.addEventListener("validateSizeComplete", appProgressHandler);
_arg1.addEventListener("validateDisplayListComplete", appProgressHandler);
_arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
this.app = _arg1;
}
mx_internal function rslCompleteHandler(_arg1:Event):void{
var _local2:int = rslListLoader.getIndex();
var _local3:RSLItem = rslListLoader.getItem(_local2);
var _local4:RSLEvent = new RSLEvent(RSLEvent.RSL_COMPLETE);
_local4.bytesLoaded = _local3.total;
_local4.bytesTotal = _local3.total;
_local4.rslIndex = _local2;
_local4.rslTotal = rslListLoader.getItemCount();
_local4.url = _local3.urlRequest;
dispatchEvent(_local4);
rslDone = ((_local2 + 1) == _local4.rslTotal);
}
private function timerHandler(_arg1:TimerEvent):void{
if (!root){
return;
};
var _local2:Object = getByteValues();
var _local3:int = _local2.loaded;
var _local4:int = _local2.total;
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _local3, _local4));
if (((rslDone) && ((((((((_local3 >= _local4)) && ((_local4 > 0)))) || ((((_local4 == 0)) && ((_local3 > 0)))))) || ((((((root is MovieClip)) && ((MovieClip(root).totalFrames > 2)))) && ((MovieClip(root).framesLoaded >= 2)))))))){
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.reset();
dispatchEvent(new Event(Event.COMPLETE));
dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
};
}
private function displayClassCompleteHandler(_arg1:Event):void{
if (displayClass){
displayClass.removeEventListener(Event.COMPLETE, displayClassCompleteHandler);
};
if (root){
root.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
};
if (app){
app.removeEventListener("validatePropertiesComplete", appProgressHandler);
app.removeEventListener("validateSizeComplete", appProgressHandler);
app.removeEventListener("validateDisplayListComplete", appProgressHandler);
app.removeEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
app = null;
};
dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE));
}
}
}//package mx.preloaders
Section 595
//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 596
//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 597
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 598
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
public class LocaleSorter {
mx_internal static const VERSION:String = "3.3.0.4852";
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 599
//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.3.0.4852";
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 600
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.3.0.4852";
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 601
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
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.3.0.4852";
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{
throw (new Error("unloadResourceModule() is not yet implemented."));
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 602
//IResponder (mx.rpc.IResponder)
package mx.rpc {
public interface IResponder {
function fault(_arg1:Object):void;
function result(_arg1:Object):void;
}
}//package mx.rpc
Section 603
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.graphics.*;
import mx.skins.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.3.0.4852";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = (bRoundedCorners) ? radius : 0;
radiusObj = {tl:radius, tr:radius, bl:_local9, br:_local9};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local10 = getStyle("highlightAlphas");
_local11 = (_local10) ? _local10[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local11, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 604
//HaloColors (mx.skins.halo.HaloColors)
package mx.skins.halo {
import mx.utils.*;
public class HaloColors {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var cache:Object = {};
public static function getCacheKey(... _args):String{
return (_args.join(","));
}
public static function addHaloColors(_arg1:Object, _arg2:uint, _arg3:uint, _arg4:uint):void{
var _local5:String = getCacheKey(_arg2, _arg3, _arg4);
var _local6:Object = cache[_local5];
if (!_local6){
_local6 = (cache[_local5] = {});
_local6.themeColLgt = ColorUtil.adjustBrightness(_arg2, 100);
_local6.themeColDrk1 = ColorUtil.adjustBrightness(_arg2, -75);
_local6.themeColDrk2 = ColorUtil.adjustBrightness(_arg2, -25);
_local6.fillColorBright1 = ColorUtil.adjustBrightness2(_arg3, 15);
_local6.fillColorBright2 = ColorUtil.adjustBrightness2(_arg4, 15);
_local6.fillColorPress1 = ColorUtil.adjustBrightness2(_arg2, 85);
_local6.fillColorPress2 = ColorUtil.adjustBrightness2(_arg2, 60);
_local6.bevelHighlight1 = ColorUtil.adjustBrightness2(_arg3, 40);
_local6.bevelHighlight2 = ColorUtil.adjustBrightness2(_arg4, 40);
};
_arg1.themeColLgt = _local6.themeColLgt;
_arg1.themeColDrk1 = _local6.themeColDrk1;
_arg1.themeColDrk2 = _local6.themeColDrk2;
_arg1.fillColorBright1 = _local6.fillColorBright1;
_arg1.fillColorBright2 = _local6.fillColorBright2;
_arg1.fillColorPress1 = _local6.fillColorPress1;
_arg1.fillColorPress2 = _local6.fillColorPress2;
_arg1.bevelHighlight1 = _local6.bevelHighlight1;
_arg1.bevelHighlight2 = _local6.bevelHighlight2;
}
}
}//package mx.skins.halo
Section 605
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
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 606
//ScrollArrowSkin (mx.skins.halo.ScrollArrowSkin)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
import mx.controls.scrollClasses.*;
public class ScrollArrowSkin extends Border {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var cache:Object = {};
override public function get measuredWidth():Number{
return (ScrollBar.THICKNESS);
}
override public function get measuredHeight():Number{
return (ScrollBar.THICKNESS);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local13:Array;
var _local15:Array;
var _local16:Array;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
super.updateDisplayList(_arg1, _arg2);
var _local3:Number = getStyle("backgroundColor");
var _local4:uint = getStyle("borderColor");
var _local5:Array = getStyle("fillAlphas");
var _local6:Array = getStyle("fillColors");
StyleManager.getColorNames(_local6);
var _local7:Array = getStyle("highlightAlphas");
var _local8:uint = getStyle("themeColor");
var _local9 = (name.charAt(0) == "u");
var _local10:uint = getStyle("iconColor");
var _local11:Object = calcDerivedStyles(_local8, _local4, _local6[0], _local6[1]);
var _local12:Boolean = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0))));
if (((_local9) && (!(_local12)))){
_local13 = [_local4, _local11.borderColorDrk1];
} else {
_local13 = [_local11.borderColorDrk1, _local11.borderColorDrk2];
};
var _local14:Graphics = graphics;
_local14.clear();
if (isNaN(_local3)){
_local3 = 0xFFFFFF;
};
if ((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) || ((name.indexOf("Disabled") == -1)))){
drawRoundRect(0, 0, _arg1, _arg2, 0, _local3, 1);
};
switch (name){
case "upArrowUpSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowUpSkin":
_local15 = [_local6[0], _local6[1]];
_local16 = [_local5[0], _local5[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local15, _local16, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowOverSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowOverSkin":
if (_local6.length > 2){
_local17 = [_local6[2], _local6[3]];
} else {
_local17 = [_local6[0], _local6[1]];
};
if (_local5.length > 2){
_local18 = [_local5[2], _local5[3]];
} else {
_local18 = [_local5[0], _local5[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 1);
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local17, _local18, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowDownSkin":
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local12) ? horizontalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8) : verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
case "downArrowDownSkin":
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local8, _local11.themeColDrk1], 1, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)));
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - (2 / 2)), 0, [0xFFFFFF, 0xFFFFFF], _local7, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
break;
case "upArrowDisabledSkin":
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
if (!_local12){
drawRoundRect(1, (_arg2 - 4), (_arg1 - 2), 8, 0, [_local11.borderColorDrk1, _local11.borderColorDrk1], [0.5, 0], verticalGradientMatrix(1, (_arg2 - 4), (_arg1 - 2), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - 4), w:(_arg1 - 2), h:4, r:0});
};
};
case "downArrowDisabledSkin":
if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){
_local19 = [_local6[0], _local6[1]];
_local20 = [(_local5[0] - 0.15), (_local5[1] - 0.15)];
drawRoundRect(0, 0, _arg1, _arg2, 0, _local13, 0.5, (_local12) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local19, _local20, (_local12) ? horizontalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(0, 0, (_arg1 - 2), (_arg2 - (2 / 2))));
_local10 = getStyle("disabledIconColor");
} else {
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
return;
};
break;
default:
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
return;
};
_local14.beginFill(_local10);
if (_local9){
_local14.moveTo((_arg1 / 2), 6);
_local14.lineTo((_arg1 - 5), (_arg2 - 6));
_local14.lineTo(5, (_arg2 - 6));
_local14.lineTo((_arg1 / 2), 6);
} else {
_local14.moveTo((_arg1 / 2), (_arg2 - 6));
_local14.lineTo((_arg1 - 5), 6);
_local14.lineTo(5, 6);
_local14.lineTo((_arg1 / 2), (_arg2 - 6));
};
_local14.endFill();
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{
var _local6:Object;
var _local5:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4);
if (!cache[_local5]){
_local6 = (cache[_local5] = {});
HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4);
_local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -25);
_local6.borderColorDrk2 = ColorUtil.adjustBrightness2(_arg2, -50);
};
return (cache[_local5]);
}
}
}//package mx.skins.halo
Section 607
//ScrollThumbSkin (mx.skins.halo.ScrollThumbSkin)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class ScrollThumbSkin extends Border {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var cache:Object = {};
override public function get measuredWidth():Number{
return (16);
}
override public function get measuredHeight():Number{
return (10);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
super.updateDisplayList(_arg1, _arg2);
var _local3:Number = getStyle("backgroundColor");
var _local4:uint = getStyle("borderColor");
var _local5:Number = getStyle("cornerRadius");
var _local6:Array = getStyle("fillAlphas");
var _local7:Array = getStyle("fillColors");
StyleManager.getColorNames(_local7);
var _local8:Array = getStyle("highlightAlphas");
var _local9:uint = getStyle("themeColor");
var _local10:uint = 7305079;
var _local11:Object = calcDerivedStyles(_local9, _local4, _local7[0], _local7[1]);
var _local12:Number = Math.max((_local5 - 1), 0);
var _local13:Object = {tl:0, tr:_local12, bl:0, br:_local12};
_local12 = Math.max((_local12 - 1), 0);
var _local14:Object = {tl:0, tr:_local12, bl:0, br:_local12};
var _local15:Boolean = ((((parent) && (parent.parent))) && (!((parent.parent.rotation == 0))));
if (isNaN(_local3)){
_local3 = 0xFFFFFF;
};
graphics.clear();
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, _local3, 1);
switch (name){
case "thumbUpSkin":
default:
_local17 = [_local7[0], _local7[1]];
_local18 = [_local6[0], _local6[1]];
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local4, _local11.borderColorDrk1], 1, (_local15) ? horizontalGradientMatrix(0, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local17, _local18, (_local15) ? horizontalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)) : verticalGradientMatrix(1, 0, (_arg1 - 2), (_arg2 - 2)));
if (_local15){
drawRoundRect(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2), 0, [0xFFFFFF, 0xFFFFFF], _local8, horizontalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2)));
} else {
drawRoundRect(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2), _local14, [0xFFFFFF, 0xFFFFFF], _local8, (_local15) ? horizontalGradientMatrix(1, 0, ((_arg1 - 4) / 2), (_arg2 - 2)) : verticalGradientMatrix(1, 1, (_arg1 - 4), ((_arg2 - 2) / 2)));
};
break;
case "thumbOverSkin":
if (_local7.length > 2){
_local19 = [_local7[2], _local7[3]];
} else {
_local19 = [_local7[0], _local7[1]];
};
if (_local6.length > 2){
_local20 = [_local6[2], _local6[3]];
} else {
_local20 = [_local6[0], _local6[1]];
};
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local5, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk1], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, _local19, _local20, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2));
break;
case "thumbDownSkin":
if (_local15){
drawRoundRect(1, 0, (_arg1 - 2), _arg2, _local13, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], horizontalGradientMatrix(2, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
} else {
drawRoundRect(1, (_arg2 - _local12), (_arg1 - 3), (_local12 + 4), {tl:0, tr:0, bl:0, br:_local12}, [_local11.borderColorDrk1, _local11.borderColorDrk1], [1, 0], (_local15) ? horizontalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8) : verticalGradientMatrix(0, (_arg2 - 4), (_arg1 - 3), 8), GradientType.LINEAR, null, {x:1, y:(_arg2 - _local12), w:(_arg1 - 4), h:_local12, r:{tl:0, tr:0, bl:0, br:(_local12 - 1)}});
};
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, [_local9, _local11.themeColDrk2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 4), h:(_arg2 - 2), r:_local14});
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, [_local11.fillColorPress1, _local11.fillColorPress2], 1, (_local15) ? horizontalGradientMatrix(1, 0, _arg1, _arg2) : verticalGradientMatrix(1, 0, _arg1, _arg2));
break;
case "thumbDisabledSkin":
drawRoundRect(0, 0, _arg1, _arg2, 0, 0xFFFFFF, 0);
drawRoundRect(1, 0, (_arg1 - 3), _arg2, _local13, 0x999999, 0.5);
drawRoundRect(1, 1, (_arg1 - 4), (_arg2 - 2), _local14, 0xFFFFFF, 0.5);
break;
};
var _local16:Number = Math.floor(((_arg1 / 2) - 4));
drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 4)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) - 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor((_arg2 / 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 2)), 5, 1, 0, 0, 0.4);
drawRoundRect(_local16, Math.floor(((_arg2 / 2) + 4)), 5, 1, 0, 0, 0.4);
}
private static function calcDerivedStyles(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Object{
var _local6:Object;
var _local5:String = HaloColors.getCacheKey(_arg1, _arg2, _arg3, _arg4);
if (!cache[_local5]){
_local6 = (cache[_local5] = {});
HaloColors.addHaloColors(_local6, _arg1, _arg3, _arg4);
_local6.borderColorDrk1 = ColorUtil.adjustBrightness2(_arg2, -50);
};
return (cache[_local5]);
}
}
}//package mx.skins.halo
Section 608
//ScrollTrackSkin (mx.skins.halo.ScrollTrackSkin)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class ScrollTrackSkin extends Border {
mx_internal static const VERSION:String = "3.3.0.4852";
override public function get measuredWidth():Number{
return (16);
}
override public function get measuredHeight():Number{
return (1);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:Array = getStyle("trackColors");
StyleManager.getColorNames(_local3);
var _local4:uint = ColorUtil.adjustBrightness2(getStyle("borderColor"), -20);
var _local5:uint = ColorUtil.adjustBrightness2(_local4, -30);
graphics.clear();
var _local6:Number = 1;
if ((((name == "trackDisabledSkin")) && ((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)))){
_local6 = 0.2;
};
drawRoundRect(0, 0, _arg1, _arg2, 0, [_local4, _local5], _local6, verticalGradientMatrix(0, 0, _arg1, _arg2), GradientType.LINEAR, null, {x:1, y:1, w:(_arg1 - 2), h:(_arg2 - 2), r:0});
drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), 0, _local3, _local6, horizontalGradientMatrix(1, 1, ((_arg1 / 3) * 2), (_arg2 - 2)));
}
}
}//package mx.skins.halo
Section 609
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.3.0.4852";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 610
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import flash.geom.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.3.0.4852";
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 611
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.net.*;
import flash.display.*;
import mx.styles.*;
import flash.system.*;
import flash.geom.*;
import flash.utils.*;
import mx.resources.*;
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.3.0.4852";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 612
//IOverride (mx.states.IOverride)
package mx.states {
import mx.core.*;
public interface IOverride {
function initialize():void;
function remove(_arg1:UIComponent):void;
function apply(_arg1:UIComponent):void;
}
}//package mx.states
Section 613
//State (mx.states.State)
package mx.states {
import flash.events.*;
import mx.events.*;
public class State extends EventDispatcher {
public var basedOn:String;
private var initialized:Boolean;// = false
public var overrides:Array;
public var name:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public function State(){
overrides = [];
super();
}
mx_internal function initialize():void{
var _local1:int;
if (!initialized){
initialized = true;
_local1 = 0;
while (_local1 < overrides.length) {
IOverride(overrides[_local1]).initialize();
_local1++;
};
};
}
mx_internal function dispatchExitState():void{
dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
}
mx_internal function dispatchEnterState():void{
dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
}
}
}//package mx.states
Section 614
//Transition (mx.states.Transition)
package mx.states {
import mx.effects.*;
public class Transition {
public var effect:IEffect;
public var toState:String;// = "*"
public var fromState:String;// = "*"
mx_internal static const VERSION:String = "3.3.0.4852";
}
}//package mx.states
Section 615
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import mx.managers.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.3.0.4852";
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 616
//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 617
//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 618
//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 619
//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 620
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 621
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.3.0.4852";
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 622
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
import mx.modules.*;
import mx.events.*;
import mx.managers.*;
import mx.resources.*;
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.3.0.4852";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 623
//StyleProtoChain (mx.styles.StyleProtoChain)
package mx.styles {
import mx.core.*;
import flash.display.*;
public class StyleProtoChain {
mx_internal static const VERSION:String = "3.3.0.4852";
public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{
var _local9:CSSStyleDeclaration;
var _local2:IStyleClient = IStyleClient(_arg1.styleName);
var _local3:DisplayObject = (_arg1 as DisplayObject);
var _local4:Object = _local2.nonInheritingStyles;
if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){
_local4 = StyleManager.stylesRoot;
if (_local4.effects){
_arg1.registerEffects(_local4.effects);
};
};
var _local5:Object = _local2.inheritingStyles;
if (((!(_local5)) || ((_local5 == UIComponent.STYLE_UNINITIALIZED)))){
_local5 = StyleManager.stylesRoot;
};
var _local6:Array = _arg1.getClassStyleDeclarations();
var _local7:int = _local6.length;
if ((_local2 is StyleProxy)){
if (_local7 == 0){
_local4 = addProperties(_local4, _local2, false);
};
_local3 = (StyleProxy(_local2).source as DisplayObject);
};
var _local8:int;
while (_local8 < _local7) {
_local9 = _local6[_local8];
_local5 = _local9.addStyleToProtoChain(_local5, _local3);
_local5 = addProperties(_local5, _local2, true);
_local4 = _local9.addStyleToProtoChain(_local4, _local3);
_local4 = addProperties(_local4, _local2, false);
if (_local9.effects){
_arg1.registerEffects(_local9.effects);
};
_local8++;
};
_arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local5, _local3) : _local5;
_arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, _local3) : _local4;
}
private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{
var _local11:CSSStyleDeclaration;
var _local12:CSSStyleDeclaration;
var _local4:Object = ((((_arg2 is StyleProxy)) && (!(_arg3)))) ? StyleProxy(_arg2).filterMap : null;
var _local5:IStyleClient = _arg2;
while ((_local5 is StyleProxy)) {
_local5 = StyleProxy(_local5).source;
};
var _local6:DisplayObject = (_local5 as DisplayObject);
var _local7:Array = _arg2.getClassStyleDeclarations();
var _local8:int = _local7.length;
var _local9:int;
while (_local9 < _local8) {
_local11 = _local7[_local9];
_arg1 = _local11.addStyleToProtoChain(_arg1, _local6, _local4);
if (_local11.effects){
_arg2.registerEffects(_local11.effects);
};
_local9++;
};
var _local10:Object = _arg2.styleName;
if (_local10){
if (typeof(_local10) == "object"){
if ((_local10 is CSSStyleDeclaration)){
_local12 = CSSStyleDeclaration(_local10);
} else {
_arg1 = addProperties(_arg1, IStyleClient(_local10), _arg3);
};
} else {
_local12 = StyleManager.getStyleDeclaration(("." + _local10));
};
if (_local12){
_arg1 = _local12.addStyleToProtoChain(_arg1, _local6, _local4);
if (_local12.effects){
_arg2.registerEffects(_local12.effects);
};
};
};
if (_arg2.styleDeclaration){
_arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, _local6, _local4);
};
return (_arg1);
}
public static function initTextField(_arg1:IUITextField):void{
var _local3:CSSStyleDeclaration;
var _local2:Object = _arg1.styleName;
if (_local2){
if (typeof(_local2) == "object"){
if ((_local2 is CSSStyleDeclaration)){
_local3 = CSSStyleDeclaration(_local2);
} else {
if ((_local2 is StyleProxy)){
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = addProperties(StyleManager.stylesRoot, IStyleClient(_local2), false);
return;
};
_arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles;
_arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles;
return;
};
} else {
_local3 = StyleManager.getStyleDeclaration(("." + _local2));
};
};
var _local4:Object = IStyleClient(_arg1.parent).inheritingStyles;
var _local5:Object = StyleManager.stylesRoot;
if (!_local4){
_local4 = StyleManager.stylesRoot;
};
if (_local3){
_local4 = _local3.addStyleToProtoChain(_local4, DisplayObject(_arg1));
_local5 = _local3.addStyleToProtoChain(_local5, DisplayObject(_arg1));
};
_arg1.inheritingStyles = _local4;
_arg1.nonInheritingStyles = _local5;
}
}
}//package mx.styles
Section 624
//StyleProxy (mx.styles.StyleProxy)
package mx.styles {
import mx.core.*;
public class StyleProxy implements IStyleClient {
private var _source:IStyleClient;
private var _filterMap:Object;
mx_internal static const VERSION:String = "3.3.0.4852";
public function StyleProxy(_arg1:IStyleClient, _arg2:Object){
this.filterMap = _arg2;
this.source = _arg1;
}
public function styleChanged(_arg1:String):void{
return (_source.styleChanged(_arg1));
}
public function get filterMap():Object{
return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? null : _filterMap);
}
public function set filterMap(_arg1:Object):void{
_filterMap = _arg1;
}
public function get styleDeclaration():CSSStyleDeclaration{
return (_source.styleDeclaration);
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
return (_source.notifyStyleChangeInChildren(_arg1, _arg2));
}
public function set inheritingStyles(_arg1:Object):void{
}
public function get source():IStyleClient{
return (_source);
}
public function get styleName():Object{
if ((_source.styleName is IStyleClient)){
return (new StyleProxy(IStyleClient(_source.styleName), filterMap));
};
return (_source.styleName);
}
public function registerEffects(_arg1:Array):void{
return (_source.registerEffects(_arg1));
}
public function regenerateStyleCache(_arg1:Boolean):void{
_source.regenerateStyleCache(_arg1);
}
public function get inheritingStyles():Object{
return (_source.inheritingStyles);
}
public function get className():String{
return (_source.className);
}
public function clearStyle(_arg1:String):void{
_source.clearStyle(_arg1);
}
public function getClassStyleDeclarations():Array{
return (_source.getClassStyleDeclarations());
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function setStyle(_arg1:String, _arg2):void{
_source.setStyle(_arg1, _arg2);
}
public function get nonInheritingStyles():Object{
return (((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) ? _source.nonInheritingStyles : null);
}
public function set styleName(_arg1:Object):void{
_source.styleName = _arg1;
}
public function getStyle(_arg1:String){
return (_source.getStyle(_arg1));
}
public function set source(_arg1:IStyleClient):void{
_source = _arg1;
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
_source.styleDeclaration = styleDeclaration;
}
}
}//package mx.styles
Section 625
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
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 626
//EventUtil (mx.utils.EventUtil)
package mx.utils {
import flash.events.*;
import mx.events.*;
public class EventUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var _sandboxEventMap:Object;
private static var _mouseEventMap:Object;
public static function get sandboxMouseEventMap():Object{
if (!_sandboxEventMap){
_sandboxEventMap = {};
_sandboxEventMap[SandboxMouseEvent.CLICK_SOMEWHERE] = MouseEvent.CLICK;
_sandboxEventMap[SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE] = MouseEvent.DOUBLE_CLICK;
_sandboxEventMap[SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE] = MouseEvent.MOUSE_DOWN;
_sandboxEventMap[SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE] = MouseEvent.MOUSE_MOVE;
_sandboxEventMap[SandboxMouseEvent.MOUSE_UP_SOMEWHERE] = MouseEvent.MOUSE_UP;
_sandboxEventMap[SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE] = MouseEvent.MOUSE_WHEEL;
};
return (_sandboxEventMap);
}
public static function get mouseEventMap():Object{
if (!_mouseEventMap){
_mouseEventMap = {};
_mouseEventMap[MouseEvent.CLICK] = SandboxMouseEvent.CLICK_SOMEWHERE;
_mouseEventMap[MouseEvent.DOUBLE_CLICK] = SandboxMouseEvent.DOUBLE_CLICK_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_DOWN] = SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_MOVE] = SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_UP] = SandboxMouseEvent.MOUSE_UP_SOMEWHERE;
_mouseEventMap[MouseEvent.MOUSE_WHEEL] = SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE;
};
return (_mouseEventMap);
}
}
}//package mx.utils
Section 627
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
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 628
//LoaderUtil (mx.utils.LoaderUtil)
package mx.utils {
import flash.display.*;
public class LoaderUtil {
public static function normalizeURL(_arg1:LoaderInfo):String{
var _local2:String = _arg1.url;
var _local3:Array = _local2.split("/[[DYNAMIC]]/");
return (_local3[0]);
}
public static function createAbsoluteURL(_arg1:String, _arg2:String):String{
var _local4:int;
var _local3:String = _arg2;
if (((_arg1) && (!((((((_arg2.indexOf(":") > -1)) || ((_arg2.indexOf("/") == 0)))) || ((_arg2.indexOf("\\") == 0))))))){
_local4 = Math.max(_arg1.lastIndexOf("\\"), _arg1.lastIndexOf("/"));
if (_arg2.indexOf("./") == 0){
_arg2 = _arg2.substring(2);
} else {
while (_arg2.indexOf("../") == 0) {
_arg2 = _arg2.substring(3);
_local4 = Math.max(_arg1.lastIndexOf("\\", (_local4 - 1)), _arg1.lastIndexOf("/", (_local4 - 1)));
};
};
if (_local4 != -1){
_local3 = (_arg1.substr(0, (_local4 + 1)) + _arg2);
};
};
return (_local3);
}
}
}//package mx.utils
Section 629
//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.3.0.4852";
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 630
//SecurityUtil (mx.utils.SecurityUtil)
package mx.utils {
import mx.core.*;
public class SecurityUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
public static function hasMutualTrustBetweenParentAndChild(_arg1:ISWFBridgeProvider):Boolean{
if (((((_arg1) && (_arg1.childAllowsParent))) && (_arg1.parentAllowsChild))){
return (true);
};
return (false);
}
}
}//package mx.utils
Section 631
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
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 632
//IValidatorListener (mx.validators.IValidatorListener)
package mx.validators {
import mx.events.*;
public interface IValidatorListener {
function set errorString(_arg1:String):void;
function get validationSubField():String;
function validationResultHandler(_arg1:ValidationResultEvent):void;
function set validationSubField(_arg1:String):void;
function get errorString():String;
}
}//package mx.validators
Section 633
//ValidationResult (mx.validators.ValidationResult)
package mx.validators {
public class ValidationResult {
public var subField:String;
public var errorCode:String;
public var isError:Boolean;
public var errorMessage:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){
this.isError = _arg1;
this.subField = _arg2;
this.errorMessage = _arg4;
this.errorCode = _arg3;
}
}
}//package mx.validators
Section 634
//_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 635
//_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 636
//_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 637
//_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 638
//_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 639
//_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 640
//_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 641
//_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 642
//_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 643
//_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 644
//_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 645
//_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 646
//_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 647
//_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 648
//_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 649
//_ScrollBarStyle (_ScrollBarStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _ScrollBarStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ScrollBar");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("ScrollBar", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.thumbOffset = 0;
this.paddingTop = 0;
this.borderColor = 12040892;
this.trackColors = [9738651, 0xE7E7E7];
this.trackSkin = ScrollTrackSkin;
this.downArrowSkin = ScrollArrowSkin;
this.cornerRadius = 4;
this.upArrowSkin = ScrollArrowSkin;
this.paddingLeft = 0;
this.paddingBottom = 0;
this.thumbSkin = ScrollThumbSkin;
this.paddingRight = 0;
};
};
}
}
}//package
Section 650
//_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 651
//_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 652
//_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 653
//_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 654
//_TreeStyle (_TreeStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _TreeStyle {
private static var _embed_css_Assets_swf_TreeDisclosureOpen_1703319027:Class = _TreeStyle__embed_css_Assets_swf_TreeDisclosureOpen_1703319027;
private static var _embed_css_Assets_swf_TreeFolderClosed_1203165182:Class = _TreeStyle__embed_css_Assets_swf_TreeFolderClosed_1203165182;
private static var _embed_css_Assets_swf_TreeNodeIcon_1116996801:Class = _TreeStyle__embed_css_Assets_swf_TreeNodeIcon_1116996801;
private static var _embed_css_Assets_swf_TreeFolderOpen_1582348532:Class = _TreeStyle__embed_css_Assets_swf_TreeFolderOpen_1582348532;
private static var _embed_css_Assets_swf_TreeDisclosureClosed_1556594769:Class = _TreeStyle__embed_css_Assets_swf_TreeDisclosureClosed_1556594769;
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Tree");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Tree", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.disclosureOpenIcon = _embed_css_Assets_swf_TreeDisclosureOpen_1703319027;
this.folderClosedIcon = _embed_css_Assets_swf_TreeFolderClosed_1203165182;
this.folderOpenIcon = _embed_css_Assets_swf_TreeFolderOpen_1582348532;
this.disclosureClosedIcon = _embed_css_Assets_swf_TreeDisclosureClosed_1556594769;
this.verticalAlign = "middle";
this.defaultLeafIcon = _embed_css_Assets_swf_TreeNodeIcon_1116996801;
this.paddingLeft = 2;
this.paddingRight = 0;
};
};
}
}
}//package
Section 655
//_TreeStyle__embed_css_Assets_swf_TreeDisclosureClosed_1556594769 (_TreeStyle__embed_css_Assets_swf_TreeDisclosureClosed_1556594769)
package {
import mx.core.*;
import flash.display.*;
public class _TreeStyle__embed_css_Assets_swf_TreeDisclosureClosed_1556594769 extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var bountySymbol:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package
Section 656
//_TreeStyle__embed_css_Assets_swf_TreeDisclosureOpen_1703319027 (_TreeStyle__embed_css_Assets_swf_TreeDisclosureOpen_1703319027)
package {
import mx.core.*;
import flash.display.*;
public class _TreeStyle__embed_css_Assets_swf_TreeDisclosureOpen_1703319027 extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var bountySymbol:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package
Section 657
//_TreeStyle__embed_css_Assets_swf_TreeFolderClosed_1203165182 (_TreeStyle__embed_css_Assets_swf_TreeFolderClosed_1203165182)
package {
import mx.core.*;
import flash.display.*;
public class _TreeStyle__embed_css_Assets_swf_TreeFolderClosed_1203165182 extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var bountySymbol:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package
Section 658
//_TreeStyle__embed_css_Assets_swf_TreeFolderOpen_1582348532 (_TreeStyle__embed_css_Assets_swf_TreeFolderOpen_1582348532)
package {
import mx.core.*;
import flash.display.*;
public class _TreeStyle__embed_css_Assets_swf_TreeFolderOpen_1582348532 extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var bountySymbol:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package
Section 659
//_TreeStyle__embed_css_Assets_swf_TreeNodeIcon_1116996801 (_TreeStyle__embed_css_Assets_swf_TreeNodeIcon_1116996801)
package {
import mx.core.*;
import flash.display.*;
public class _TreeStyle__embed_css_Assets_swf_TreeNodeIcon_1116996801 extends SpriteAsset {
public var XGenStudiosComMC:DisplayObject;
public var bountySymbol:DisplayObject;
public var linkButton:DisplayObject;
public var textField:DisplayObject;
public var helvian:DisplayObject;
}
}//package
Section 660
//_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 661
//_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 662
//_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 663
//Constants (Constants)
package {
import flash.geom.*;
import MMOcha.server.*;
public class Constants {
public static const PRINT_DEBUG:Boolean = ((true) && (!(RELEASE)));
public static const CAMERA_CELL_X_RADIUS:Number = ((WINDOW.width / 2) / CELL_WIDTH);
public static const SHOW_INTROS:Boolean = ((false) || (RELEASE));
public static const PING_CYCLE_INTERVAL:int = 1000;
public static const CELL_WIDTH:Number = 40;
public static const POSITION_RESOLUTION:int = 100;
public static const MALE:String = "Male";
public static const LOCAL_MODE:Boolean = ((false) && (!(RELEASE)));
public static const USE_TEST_SERVERS:Boolean = ((true) && (!(RELEASE)));
public static const BOUNTY_FRACTION:Number = 0.15;
public static const CELL_HEIGHT:Number = 28;
public static const EURO_SERVERS:Array = [];
public static const MAX_PLAYERS:int = 16;
public static const AD_FPS:Number = 30;
public static const TEST_MODE:Boolean = ((true) && (!(RELEASE)));
public static const PROCESS_INTERVAL:int = 50;
public static const LOCAL_SERVER:ServerInfo = new ServerInfo("Localhost", "localhost", 0x0400, ServerInfo.LOCAL);
public static const PLAY_MUSIC:Boolean = ((false) || (RELEASE));
public static const VERSION:int = 100;
public static const MONSTER:String = "Monster";
public static const TEST_SERVERS:Array = [new ServerInfo("Dev 1024", "dev.mmocha.com", 1278, ServerInfo.US)];
public static const GRAVITY:Number = 5;
public static const MAX_STORED_POSITIONS:int = 40;
public static const US_SERVERS:Array = [new ServerInfo("Boxhead Lite", "bbhlite.xgenstudios.com", 1032, ServerInfo.US)];
public static const FEMALE:String = "Female";
public static const EDITOR_SERVER:ServerInfo = TEST_SERVERS[0];
public static const HIDE_PREMIUMS:Boolean = false;
public static const CAMERA_CELL_Y_RADIUS:Number = ((WINDOW.height / 2) / CELL_HEIGHT);
public static const PRINT_NETWORK:Boolean = ((false) && (!(RELEASE)));
public static const SHADOW_ALPHA:Number = 0.55;
public static const ALLOW_MULTIPLE:Boolean = ((true) && (!(RELEASE)));
public static const RELEASE:Boolean = true;
public static const MENU_FPS:Number = 30;
public static const WINDOW:Rectangle = new Rectangle(0, 0, 700, 490);
public static const PING_INTERVAL:int = 10000;
public static const GAME_FPS:Number = 60;
public static function get CENTER_Y():Number{
return ((WINDOW.y + (WINDOW.height / 2)));
}
public static function get CENTER_X():Number{
return ((WINDOW.x + (WINDOW.width / 2)));
}
}
}//package
Section 664
//Debug (Debug)
package {
import flash.display.*;
import flash.geom.*;
import boxhead.world.*;
import boxhead.world.hit.*;
import boxhead.ui.*;
public class Debug {
private static var display:Sprite = new Sprite();
private static var g:Graphics = display.graphics;
public static var graphics:Graphics = g;
public static function fillRect(_arg1:Rectangle, _arg2:uint=0xFFFFFF, _arg3:Number=0.3):void{
g.lineStyle();
g.beginFill(_arg2, _arg3);
g.drawRect(_arg1.x, _arg1.y, _arg1.width, _arg1.height);
g.endFill();
}
public static function output(... _args):void{
if (!Constants.PRINT_DEBUG){
return;
};
var _local2:int = (_args.length - 1);
while (_local2 >= 0) {
if (_args[_local2] == null){
_args[_local2] = "null";
};
_local2--;
};
var _local3:String = _args.join(" ");
trace(_local3);
Console.print(("Debug: " + _local3));
}
public static function cycle():void{
display.visible = !(display.visible);
}
public static function error(... _args):void{
var _local2:int = (_args.length - 1);
while (_local2 >= 0) {
if (_args[_local2] == null){
_args[_local2] = "null";
};
_local2--;
};
var _local3:String = _args.join(" ");
trace(_local3);
Console.print(("Error: " + _local3));
}
public static function clear():void{
g.clear();
}
public static function drawHit(_arg1:HitShape, _arg2:uint=0xFF0000, _arg3:Number=1):void{
g.lineStyle(0.05, _arg2, _arg3);
_arg1.draw(g);
}
public static function drawHeight(_arg1:Point, _arg2:Number, _arg3:uint=0xFF0000, _arg4:Number=1):void{
g.lineStyle(0.05, _arg3, _arg4);
g.moveTo(_arg1.x, _arg1.y);
g.lineTo(_arg1.x, (_arg1.y - (_arg2 / display.scaleY)));
}
public static function set scale(_arg1:Number):void{
display.scaleX = (Constants.CELL_WIDTH * _arg1);
display.scaleY = (Constants.CELL_HEIGHT * _arg1);
}
public static function focus(_arg1:Position):void{
display.x = ((Constants.WINDOW.width / 2) - (_arg1.x * display.scaleX));
display.y = ((Constants.WINDOW.height / 2) - (_arg1.y * display.scaleY));
}
public static function drawCircle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:uint=0xFF0000, _arg5:Number=1):void{
g.lineStyle(0.05, _arg4, _arg5);
g.drawCircle(_arg1, _arg2, _arg3);
}
public static function addTo(_arg1:DisplayObjectContainer):void{
_arg1.addChild(display);
display.scaleX = Constants.CELL_WIDTH;
display.scaleY = Constants.CELL_HEIGHT;
display.visible = false;
}
public static function drawLine(_arg1:Point, _arg2:Point, _arg3:uint=0xFF0000, _arg4:Number=1):void{
g.lineStyle(0.05, _arg3, _arg4);
g.moveTo(_arg1.x, _arg1.y);
g.lineTo(_arg2.x, _arg2.y);
}
}
}//package
Section 665
//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 666
//en_US$effects_properties (en_US$effects_properties)
package {
import mx.resources.*;
public class en_US$effects_properties extends ResourceBundle {
public function en_US$effects_properties(){
super("en_US", "effects");
}
override protected function getContent():Object{
var _local1:Object = {incorrectTrigger:"The Zoom effect can not be triggered by a moveEffect trigger.", incorrectSource:"Source property must be a Class or String."};
return (_local1);
}
}
}//package
Section 667
//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 668
//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 669
//Links (Links)
package {
import flash.net.*;
import flash.external.*;
public class Links {
public static const STC:String = "http://www.boxhead.seantcooper.com/";
public static const BICLOPS:String = "http://www.biclopsgames.com";
public static const PAGE_LINK:String = "http://boxheadbounty.com/";
public static const XGEN:String = "http://www.xgenstudios.com/";
public static const PREMIUMS_LINK:String = "http://www.xgenstudios.com/xcash";
private static var _pageURL:String;
public static function set pageURL(_arg1:String):void{
if (_arg1.substr(0, 4) == "file"){
_pageURL = "Local";
} else {
_pageURL = _arg1;
};
trace(_arg1);
}
public static function openLink(_arg1:String):void{
var url = _arg1;
try {
ExternalInterface.call("window.open", url, "_blank", "");
} catch(error:Error) {
navigateToURL(new URLRequest(url), "_blank");
};
}
public static function milestone(_arg1:String):void{
var loader:URLLoader;
var url:URLRequest;
var variables:URLVariables;
var type = _arg1;
try {
type = type.replace(new RegExp(" ", "g"), "");
loader = new URLLoader();
url = new URLRequest("http://api.xgenstudios.com/?method=xgen.milestones.add");
url.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.milestone = type;
variables.url = _pageURL;
variables.game_id = "Boxhead";
url.data = variables;
loader.load(url);
Debug.output("Milestone:", type);
} catch(error:Error) {
Debug.output("Tracking Error");
};
}
}
}//package
Section 670
//LiteConstants (LiteConstants)
package {
import boxhead.world.weapon.*;
public class LiteConstants {
public static const WEAPONS:Array = [WeaponInfo.PISTOL_ID, WeaponInfo.AKIMBO_UZIS_ID, WeaponInfo.SHOTGUN_ID, WeaponInfo.RIFLE_ID, WeaponInfo.AK47_ID, WeaponInfo.MAGNUM_ID];
}
}//package
Section 671
//Main (Main)
package {
import flash.events.*;
import boxhead.events.*;
import MMOcha.server.*;
import boxhead.ui.screen.*;
import boxhead.ui.*;
import flash.net.*;
import boxhead.assets.*;
import boxhead.world.*;
import boxhead.game.*;
import boxhead.world.weapon.*;
import flash.display.*;
import flash.system.*;
import flash.utils.*;
import boxhead.security.*;
import MMOcha.utils.*;
import boxhead.options.*;
import boxhead.sounds.*;
public class Main extends Sprite {
private var mmochaAssetsLoader:Loader;
private var sharedObject:SharedObject;
private var intros:MovieClip;
private var ingameMenu:IngameMenuScreen;
private var begun:Boolean;// = false
private var assetLoader:AssetLoader;
private var quickPlayProfile:QuickPlayProfile;// = null
private var localConnection:LocalConnection;
private var authenticationTimer:Timer;
private var testLocalConnection:LocalConnection;
private var backdrop:Backdrop;
private var connection:MMOchaServer;
private var menu:MainMenuScreen;
private var blockPlay:Boolean;// = false
private var game:Game;
private var lobbyLoaded:Boolean;// = false
private var serverDetails:ServerInfo;
private static const AUTHENTICATION_TIMEOUT:int = 10000;
private static var MMOchaAssets:Class = Main_MMOchaAssets;
public function Main(){
tabEnabled = false;
tabChildren = false;
sharedObject = SharedObject.getLocal("BoxheadMP");
mmochaAssetsLoader = new Loader();
var _local1:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
mmochaAssetsLoader.loadBytes(new MMOchaAssets(), _local1);
mmochaAssetsLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, lobbyLoaderComplete);
LanguageFilter.enable();
WeaponInfo.init(sharedObject);
Preferences.init(sharedObject);
assetLoader = new AssetLoader();
assetLoader.begin();
intros = new Intros();
intros.addEventListener(ScreenEvent.MENU, introsMenu);
intros.addEventListener(Event.COMPLETE, hideIntros);
addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);
Cheat.notifier.addEventListener(ScreenEvent.CHEAT, handleCheat);
checkVersion();
addEventListener(TextEvent.LINK, handleUpsell, false, 0, true);
}
protected function connected(_arg1:ServerEvent=null):void{
connection.removeEventListener(ServerEvent.CONNECTED, connected);
connection.removeEventListener(ServerEvent.FAILED, connectionFailed);
connection.localUser.quickPlay = !((quickPlayProfile == null));
if (quickPlayProfile){
connection.submitCustomization(quickPlayProfile.headModelIndex, quickPlayProfile.headColorIndex, quickPlayProfile.bodyModelIndex, quickPlayProfile.bodyColorIndex, quickPlayProfile.gender);
findQuickPlayGame();
};
}
protected function closeGame(_arg1:ScreenEvent):void{
hideGame();
showMainMenu();
checkVersion();
}
protected function handleCheat(_arg1:ScreenEvent):void{
showErrorScreen("Data Error", "Please refresh the page");
}
protected function introsMenu(_arg1:ScreenEvent):void{
if (((intros) && ((intros.parent == this)))){
setChildIndex(intros, (numChildren - 1));
};
}
protected function toggleIngameMenu(_arg1:ScreenEvent):void{
if (ingameMenu){
closeIngameMenu();
} else {
showIngameMenu();
};
}
protected function beginJSSession():void{
if (!Constants.TEST_MODE){
XGenAPIFunctions.APIGameLogin(connection.username, connection.password, XGenAPIReturn, root);
};
}
protected function disconnectedFromGame(_arg1:ScreenEvent):void{
hideGame();
showMainMenu();
connect();
}
protected function beginQuickPlay(_arg1:ScreenEvent):void{
_arg1.target.removeEventListener(ScreenEvent.QUICK_PLAY, beginQuickPlay);
_arg1.target.removeEventListener(ScreenEvent.CLOSE, cancelQuickPlaySelection);
quickPlayProfile = (_arg1.data as QuickPlayProfile);
connect();
serverDetails = null;
}
protected function hideMainMenu():void{
if (!menu){
return;
};
menu.removeEventListener(ScreenEvent.QUICK_PLAY, quickPlayClick);
menu.close();
menu = null;
if (Constants.PLAY_MUSIC){
SoundControl.fadeMusic(1000);
};
}
protected function showQPSelectionScreen():void{
if (blockPlay){
return;
};
menu.showQuickPlaySelectionScreen();
menu.subscreen.addEventListener(ScreenEvent.QUICK_PLAY, beginQuickPlay);
menu.subscreen.addEventListener(ScreenEvent.CLOSE, cancelQuickPlaySelection);
checkConsoleDepth();
}
protected function findQuickPlayGame():void{
connection.addEventListener(ServerEvent.ROOM_LIST, qpRoomList);
connection.requestRoomList();
}
protected function closeIngameMenu(_arg1:ScreenEvent=null):void{
if (!ingameMenu){
return;
};
ingameMenu.removeEventListener(ScreenEvent.CLOSE, closeIngameMenu);
ingameMenu.removeEventListener(ScreenEvent.QUIT, closeGame);
if (ingameMenu.parent){
ingameMenu.parent.removeChild(ingameMenu);
};
if (game){
game.freeInput(ingameMenu);
};
ingameMenu.dispose();
ingameMenu = null;
}
protected function checkVersion():void{
var _local1:VersionCheck = new VersionCheck();
_local1.addEventListener(Event.COMPLETE, handleVersionSuccess);
_local1.addEventListener(ErrorEvent.ERROR, handleFailure);
_local1.check(Constants.VERSION);
}
protected function handleUpsell(_arg1:TextEvent):void{
if (_arg1.text.substr(0, 6) == "Upsell"){
Links.openLink(Links.PAGE_LINK);
Links.milestone(_arg1.text);
};
}
protected function begin():void{
var alreadyRunning:Boolean;
if (((((begun) || (!(stage)))) || (!(lobbyLoaded)))){
return;
};
begun = true;
graphics.clear();
stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
connection = new MMOchaServer();
Input.init(stage, sharedObject);
Console.display;
Console.connection = connection;
backdrop = new Backdrop();
backdrop.blendMode = BlendMode.LAYER;
if (Constants.SHOW_INTROS){
addChild(intros);
intros.play();
} else {
showMainMenu();
hideIntros();
};
if (!Constants.ALLOW_MULTIPLE){
localConnection = new LocalConnection();
alreadyRunning = false;
try {
localConnection.connect("BoxheadBountyHunter");
} catch(e:Error) {
alreadyRunning = true;
};
if (alreadyRunning){
showErrorScreen("Boxhead Bounty Hunter is already\nrunning on this computer", "");
return;
};
};
SoundControl.playUISound(SoundList.PISTOL_FIRE_LIST[0]);
}
protected function handleServerError(_arg1:ServerEvent):void{
switch (_arg1.message){
case MMOchaServer.ACCOUNT_BANNED:
showMainMenu();
menu.showBanScreen("You are currently banned", "");
connection.disconnect();
break;
case MMOchaServer.SERVER_FULL:
showMainMenu();
menu.showBanScreen("Server is full.", "Please try again later.");
connection.disconnect();
break;
case MMOchaServer.DUPLICATE_LOGIN:
showMainMenu();
menu.showBanScreen("Duplicate login detected.", "");
connection.disconnect();
break;
};
}
protected function qpError(_arg1:ServerEvent):void{
connection.removeEventListener(ServerEvent.ROOM_JOINED, qpJoined);
connection.removeEventListener(ServerEvent.SERVER_ERROR, qpError);
findQuickPlayGame();
}
protected function quickPlayClick(_arg1:ScreenEvent):void{
var _local2:Array;
if (Constants.LOCAL_MODE){
_local2 = [Constants.LOCAL_SERVER];
} else {
if (Constants.USE_TEST_SERVERS){
_local2 = Constants.TEST_SERVERS;
} else {
_local2 = Constants.US_SERVERS;
};
};
serverDetails = _local2[int((Math.random() * _local2.length))];
if (assetLoader.finished){
showQPSelectionScreen();
} else {
assetLoader.addEventListener(Event.COMPLETE, qpLoadFinished);
if (menu){
menu.showQuickPlayLoadingScreen();
menu.subscreen.addEventListener(ScreenEvent.CLOSE, cancelQuickPlayLoad, false, 0, true);
};
};
}
protected function qpJoined(_arg1:ServerEvent):void{
connection.removeEventListener(ServerEvent.ROOM_JOINED, qpJoined);
connection.removeEventListener(ServerEvent.SERVER_ERROR, qpError);
connection.localUser.name = QuickPlayProfile.generateName(connection.localUser);
hideMainMenu();
beginGame();
}
protected function handleFailure(_arg1:ErrorEvent):void{
_arg1.target.removeEventListener(Event.COMPLETE, handleVersionSuccess);
_arg1.target.removeEventListener(ErrorEvent.ERROR, handleFailure);
showVersionScreen();
}
protected function connectionFailed(_arg1:ServerEvent):void{
if (menu){
menu.connectionFailed();
};
}
protected function qpLoadFinished(_arg1:Event):void{
assetLoader.removeEventListener(Event.COMPLETE, qpLoadFinished);
showQPSelectionScreen();
}
protected function handleVersionSuccess(_arg1:Event):void{
_arg1.target.removeEventListener(Event.COMPLETE, handleVersionSuccess);
_arg1.target.removeEventListener(ErrorEvent.ERROR, handleFailure);
}
protected function hideGame():void{
closeIngameMenu();
if (!game){
return;
};
game.removeEventListener(ScreenEvent.CLOSE, closeGame);
game.removeEventListener(ScreenEvent.DISCONNECTED, disconnectedFromGame);
game.removeEventListener(ScreenEvent.MENU, toggleIngameMenu);
game.dispose();
if (game.parent){
game.parent.removeChild(game);
};
game = null;
SoundControl.stopAllAreaSounds();
stage.frameRate = Constants.MENU_FPS;
}
protected function showMainMenu():void{
if (blockPlay){
return;
};
addChildAt(backdrop, 0);
if (connection.connected){
connection.disconnect();
};
if (!menu){
menu = new MainMenuScreen(backdrop, sharedObject, assetLoader);
menu.addEventListener(ScreenEvent.QUICK_PLAY, quickPlayClick);
addChild(menu);
menu.fadeIn();
if (Constants.PLAY_MUSIC){
SoundControl.playMusic(SoundList.TITLE_MUSIC, 300);
};
};
checkConsoleDepth();
}
protected function showErrorScreen(_arg1:String, _arg2:String, _arg3:String=null):void{
blockPlay = true;
hideMainMenu();
hideGame();
if (connection){
connection.disconnect();
};
var _local4:ErrorScreen = new ErrorScreen(_arg1, _arg2, _arg3);
if (stage){
stage.addChild(_local4);
} else {
addChild(_local4);
};
checkConsoleDepth();
}
protected function qpRoomList(_arg1:ServerEvent):void{
var _local3:RoomInfo;
var _local5:Array;
var _local6:Array;
var _local7:String;
var _local8:int;
var _local9:MapInfo;
connection.removeEventListener(ServerEvent.ROOM_LIST, qpRoomList);
var _local2:Array = _arg1.list;
var _local4:int = (_local2.length - 1);
while (_local4 >= 0) {
_local3 = _local2[_local4];
if (_local3.name.charAt(0) != "!"){
_local2.splice(_local4, 1);
};
_local4--;
};
connection.addEventListener(ServerEvent.ROOM_JOINED, qpJoined);
connection.addEventListener(ServerEvent.SERVER_ERROR, qpError);
if (_local2.length > 0){
_local3 = _local2[int((Math.random() * _local2.length))];
connection.joinRoom(_local3.name);
} else {
_local5 = MapInfo.mapList.concat();
_local6 = new Array();
while (_local5.length > 0) {
_local8 = int((Math.random() * _local5.length));
_local9 = _local5[_local8];
_local5.splice(_local8, 1);
if (_local9){
_local6.push(_local9.slot);
};
};
_local7 = StringFunctions.padInt(int((Math.random() * 10000)), 4);
connection.createRoom(("!QuickPlay" + _local7), false, "A", false, _local6);
};
}
protected function checkConsoleDepth():void{
if (Console.display.parent){
Console.display.parent.setChildIndex(Console.display, (Console.display.parent.numChildren - 1));
};
}
protected function beginGame():void{
stage.focus = stage;
stage.frameRate = Constants.GAME_FPS;
Links.milestone("Enter Game");
game = new BountyGame(connection.localUser, quickPlayProfile);
game.addEventListener(ScreenEvent.CLOSE, closeGame);
game.addEventListener(ScreenEvent.DISCONNECTED, disconnectedFromGame);
game.addEventListener(ScreenEvent.MENU, toggleIngameMenu);
addChild(game);
checkConsoleDepth();
Debug.addTo(this);
connection.enablePing(1000);
game.start(connection);
}
protected function lobbyLoaderComplete(_arg1:Event):void{
_arg1.target.removeEventListener(Event.COMPLETE, lobbyLoaderComplete);
lobbyLoaded = true;
begin();
}
protected function cancelQuickPlaySelection(_arg1:ScreenEvent):void{
_arg1.target.removeEventListener(ScreenEvent.QUICK_PLAY, beginQuickPlay);
_arg1.target.removeEventListener(ScreenEvent.CLOSE, cancelQuickPlaySelection);
}
protected function showVersionScreen():void{
blockPlay = true;
Links.milestone("Failed Version Check");
hideMainMenu();
hideGame();
if (connection){
connection.disconnect();
};
var _local1:VersionScreen = new VersionScreen();
_local1.addEventListener(TextEvent.LINK, handleUpsell, false, 0, true);
if (stage){
stage.addChild(_local1);
} else {
addChild(_local1);
};
checkConsoleDepth();
}
protected function hideIntros(_arg1:Event=null):void{
if (intros){
intros.removeEventListener(ScreenEvent.MENU, introsMenu);
intros.removeEventListener(Event.COMPLETE, hideIntros);
if (intros.parent){
intros.parent.removeChild(intros);
};
intros = null;
};
showMainMenu();
dispatchEvent(new Event(Event.OPEN));
}
protected function connect():void{
if (!serverDetails){
showMainMenu();
return;
};
if (menu){
menu.showConnectingScreen();
};
connection.addEventListener(ServerEvent.CONNECTED, connected);
connection.addEventListener(ServerEvent.FAILED, connectionFailed);
connection.addEventListener(ServerEvent.SERVER_ERROR, handleServerError, false, 0, true);
if (connection.connected){
connected();
} else {
connection.connectTo(serverDetails.url, serverDetails.port);
};
}
protected function handleAddedToStage(_arg1:Event):void{
begin();
}
protected function cancelQuickPlayLoad(_arg1:ScreenEvent):void{
_arg1.target.removeEventListener(ScreenEvent.CLOSE, cancelQuickPlayLoad);
assetLoader.removeEventListener(Event.COMPLETE, qpLoadFinished);
}
protected function showIngameMenu():void{
if (ingameMenu){
return;
};
ingameMenu = new IngameMenuScreen();
ingameMenu.addEventListener(ScreenEvent.CLOSE, closeIngameMenu);
ingameMenu.addEventListener(ScreenEvent.QUIT, closeGame);
addChild(ingameMenu);
if (game){
game.captureInput(ingameMenu);
};
checkConsoleDepth();
}
protected function XGenAPIReturn(_arg1:Boolean):void{
Debug.output("XGen Login return");
}
protected function keyUp(_arg1:KeyboardEvent):void{
if (Input.isConsoleKey(_arg1.keyCode)){
if (Console.display.stage){
Console.display.parent.removeChild(Console.display);
if (game){
game.freeInput(Console.display);
};
stage.focus = stage;
} else {
addChild(Console.display);
if (game){
game.captureInput(Console.display);
};
};
};
}
}
}//package
Section 672
//Main_MMOchaAssets (Main_MMOchaAssets)
package {
import mx.core.*;
public class Main_MMOchaAssets extends ByteArrayAsset {
}
}//package
Section 673
//MainFactory (MainFactory)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class MainFactory extends MovieClip {
private var app:DisplayObject;
private var bar:MovieClip;
private var preloader:Sprite;
private var loadingField:TextField;
protected static const Preloader:Class = MainFactory_Preloader;
public static var ON_KONG:Boolean = false;
public function MainFactory(){
stop();
if (stage){
handleAddedToStage();
} else {
addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);
};
}
private function mainOpen(_arg1:Event):void{
Links.milestone("Load Finished");
_arg1.target.removeEventListener(Event.OPEN, mainOpen);
if (preloader){
if (preloader.parent){
preloader.parent.removeChild(preloader);
};
preloader = null;
};
}
protected function handleAddedToStage(_arg1:Event=null):void{
removeEventListener(Event.ADDED_TO_STAGE, handleAddedToStage);
Links.pageURL = stage.loaderInfo.url;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.frameRate = Constants.MENU_FPS;
ON_KONG = false;
if (stage.loaderInfo.loaderURL.indexOf("kongregate.com") >= 0){
ON_KONG = true;
};
if (stage.loaderInfo.loaderURL.indexOf("kongregatetrunk.com") >= 0){
ON_KONG = true;
};
if (stage.loaderInfo.loaderURL.indexOf("kongregatestage.com") >= 0){
ON_KONG = true;
};
if (stage.loaderInfo.loaderURL.indexOf("kongshred.com") >= 0){
ON_KONG = true;
};
var _local2:ContextMenu = new ContextMenu();
_local2.hideBuiltInItems();
this.contextMenu = _local2;
preloader = (new Preloader() as Sprite);
bar = (preloader.getChildByName("bar") as MovieClip);
bar.stop();
loadingField = (preloader.getChildByName("loadingField") as TextField);
loadingField.text = "";
var _local3:TextField = (preloader.getChildByName("versionField") as TextField);
var _local4:String = ("" + Constants.VERSION);
while (_local4.length < 3) {
_local4 = ("0" + _local4);
};
_local4 = ((_local4.charAt(0) + ".") + _local4.substr(1));
_local3.text = ("Version " + _local4);
addChild(preloader);
Links.milestone("Load Start");
drawBar(0);
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
}
private function drawBar(_arg1:Number):void{
bar.gotoAndStop(Math.round(((_arg1 * (bar.totalFrames - 1)) + 1)));
}
private function onEnterFrame(_arg1:Event):void{
var loaded:Number;
var event = _arg1;
try {
loaded = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
drawBar(loaded);
if (framesLoaded == totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
loadComplete();
};
} catch(error:Error) {
if (loadingField){
loadingField.text = ("Error: " + error.message);
};
};
}
public function loadComplete():void{
bar = null;
loadingField = null;
nextFrame();
var _local1:Class = (getDefinitionByName("Main") as Class);
if (_local1){
app = (new (_local1) as DisplayObject);
app.addEventListener(Event.OPEN, mainOpen);
};
var _local2:Sprite = new Sprite();
_local2.graphics.beginFill(0x440000, 0.92);
_local2.graphics.drawRect(0, 0, Constants.WINDOW.width, Constants.WINDOW.height);
_local2.graphics.endFill();
preloader.addChild(_local2);
addChild(app);
}
}
}//package
Section 674
//MainFactory_Preloader (MainFactory_Preloader)
package {
import flash.display.*;
import mx.core.*;
public class MainFactory_Preloader extends SpriteAsset {
public var versionField:DisplayObject;
public var loadingField:DisplayObject;
public var linkButton:DisplayObject;
public var helvian:DisplayObject;
public var XGenStudiosComMC:DisplayObject;
public var bar:DisplayObject;
}
}//package
Section 675
//Premium (Premium)
package {
public class Premium {
public var remainingHours:int;
public var description:String;
public var owned:Boolean;
public var name:String;
public var uses:int;
public var cost:int;
public var timeReceived:int;
public var value:Number;
public var duration:int;
public var index:int;
public var applied:Boolean;
public static const RETRIEVING_XCASH:int = -1;
public static const M16_ID:int = 1;
public static const SPY_SATELLITE_ID:int = 14;
public static const CHARGE_PACKS_ID:int = 9;
public static const RADAR_ID:int = 7;
public static const BARRICADES_ID:int = 13;
public static const WALLET_ID:int = 5;
public static const AIRSTRIKES_ID:int = 11;
public static const MG_TURRET_ID:int = 15;
public static const MORTAR_TURRET_ID:int = 16;
public static const DEVIL_ID:int = 17;
public static const RAILGUN_ID:int = 2;
public static const BARRELS_ID:int = 12;
public static const SHOES_ID:int = 4;
public static const XCASH_ERROR:int = -2;
public static const GRENADES_ID:int = 8;
public static const ARMOR_ID:int = 3;
public static const CLAYMORES_ID:int = 10;
public static const PISTOLS_ID:int = 0;
public static const VALID_PREMIUMS:Array = [PISTOLS_ID, M16_ID, RAILGUN_ID, ARMOR_ID, SHOES_ID, WALLET_ID, RADAR_ID, GRENADES_ID, CHARGE_PACKS_ID, CLAYMORES_ID, AIRSTRIKES_ID, BARRELS_ID, BARRICADES_ID, SPY_SATELLITE_ID, DEVIL_ID];
private static var upgrades:Array = new Array();
private static var list:Array = [];
public function clone():Premium{
var _local1:Premium = new Premium();
_local1.index = index;
_local1.name = name;
_local1.cost = cost;
_local1.duration = duration;
_local1.remainingHours = remainingHours;
_local1.timeReceived = timeReceived;
_local1.uses = uses;
_local1.value = value;
_local1.description = description;
_local1.owned = owned;
return (_local1);
}
public static function lookup(_arg1:int):Premium{
return (list[_arg1]);
}
public static function readMasterList(_arg1:XMLList):void{
var _local2:XML;
var _local3:Premium;
for each (_local2 in _arg1.item) {
_local3 = new (Premium);
_local3.index = parseInt(_local2.attribute("id"));
_local3.name = _local2.name.toString();
_local3.cost = int(_local2.cost);
_local3.uses = int(_local2.uses);
if (_local2.duration.toString().length > 0){
_local3.duration = int((_local2.duration * 24));
} else {
_local3.duration = int.MAX_VALUE;
};
list[_local3.index] = _local3;
};
}
}
}//package
Section 676
//Time (Time)
package {
public class Time {
public static var lastProcess:int;
public static var current:int;
public static var lastRender:int;
}
}//package
Section 677
//XMLConstants (XMLConstants)
package {
import boxhead.world.thing.obstacle.deployable.*;
import boxhead.world.thing.character.*;
import boxhead.world.weapon.*;
import flash.xml.*;
public class XMLConstants {
protected static function readWeapons(_arg1:XMLList):void{
var _local2:int;
var _local3:WeaponInfo;
var _local4:String;
var _local5:WeaponUpgrade;
var _local7:XML;
var _local8:int;
var _local6:Array = new Array();
_local2 = 0;
while (_local2 < WeaponInfo.NUM_WEAPONS) {
_local6.push(_local2);
_local2++;
};
for each (_local7 in _arg1) {
_local2 = parseInt(_local7.attribute("id"));
_local3 = WeaponInfo.lookup(_local2);
_local8 = _local6.indexOf(_local2);
if (_local8 >= 0){
_local6.splice(_local8, 1);
};
_local3.name = _local7.attribute("name").toString();
_local3.abbreviatedName = _local7.attribute("shortName").toString();
_local4 = "ammo";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.ammo = parseInt(_local7[_local4]);
};
_local4 = "ammoIncrement";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.ammoIncrement = parseInt(_local7[_local4]);
};
_local4 = "damage";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.damage = parseInt(_local7[_local4]);
};
_local4 = "range";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.range = parseFloat(_local7[_local4]);
};
_local4 = "spread";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.spread = parseFloat(_local7[_local4]);
};
_local4 = "fireDelay";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.fireDelay = parseFloat(_local7[_local4]);
};
_local4 = "moveSpeed";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.moveSpeed = parseFloat(_local7[_local4]);
};
_local4 = "cost";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.cost = parseInt(_local7[_local4]);
};
_local4 = "ammoCost";
if (_local7[_local4] == undefined){
Debug.error(((("Missing weapon statistic: " + _local3.name) + " - ") + _local4));
} else {
_local3.ammoCost = parseInt(_local7[_local4]);
};
_local3.killMessage = _local7["killMessage"];
_local3.suicideMessage = _local7["suicideMessage"];
_local3.description = _local7["description"];
_local5 = readUpgradeXML(_local7["upgrade1"]);
if (!_local5){
Debug.error(("No upgrade 1 found for weapon:" + _local3.name));
};
if (_local5.type != ""){
_local3.upgrade1 = _local5;
};
_local5 = readUpgradeXML(_local7["upgrade2"]);
if (!_local5){
Debug.error(("No upgrade 2 found for weapon:" + _local3.name));
};
if (_local5.type != ""){
_local3.upgrade2 = _local5;
};
};
for each (_local2 in _local6) {
_local3 = WeaponInfo.lookup(_local2);
Debug.error(("Weapon statistics not found for: " + _local3.name));
};
}
public static function readXML(_arg1:XML):void{
var _local2:String;
_local2 = "playerHealth";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
PlayerCharacter.DEFAULT_HEALTH.value = parseInt(_arg1[_local2]);
};
_local2 = "barrelHealth";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
Barrel.DEFAULT_HEALTH.value = parseInt(_arg1[_local2]);
};
_local2 = "barricadeHealth";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
Barricade.DEFAULT_HEALTH.value = parseInt(_arg1[_local2]);
};
_local2 = "chargePackHealth";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
ChargePack.DEFAULT_HEALTH.value = parseInt(_arg1[_local2]);
};
_local2 = "claymoreHealth";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
Claymore.DEFAULT_HEALTH.value = parseInt(_arg1[_local2]);
};
_local2 = "turretMGHealth";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
TurretMG.DEFAULT_HEALTH.value = parseInt(_arg1[_local2]);
};
_local2 = "turretMGDamage";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
TurretMG.DEFAULT_DAMAGE.value = parseInt(_arg1[_local2]);
};
_local2 = "turretMGFireDelay";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
TurretMG.DEFAULT_FIRE_DELAY.value = parseFloat(_arg1[_local2]);
};
_local2 = "turretMortarHealth";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
TurretMortar.DEFAULT_HEALTH.value = parseInt(_arg1[_local2]);
};
_local2 = "turretMortarDamage";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
TurretMortar.DEFAULT_DAMAGE.value = parseInt(_arg1[_local2]);
};
_local2 = "turretMortarFireDelay";
if (_arg1[_local2] == undefined){
Debug.error((("Stat '" + _local2) + "' not found"));
} else {
TurretMortar.DEFAULT_FIRE_DELAY.value = parseFloat(_arg1[_local2]);
};
readWeapons(_arg1["weapon"]);
readPremiums(_arg1["premium"]);
}
protected static function readUpgradeXML(_arg1:XMLList):WeaponUpgrade{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:int;
_local2 = "type";
if (_arg1[_local2] == undefined){
return (null);
};
_local3 = _arg1[_local2].toString();
_local2 = "value";
if (_arg1[_local2] == undefined){
return (null);
};
_local4 = parseFloat(_arg1[_local2]);
_local2 = "cost";
if (_arg1[_local2] == undefined){
return (null);
};
_local5 = parseInt(_arg1[_local2]);
return (new WeaponUpgrade(null, _local3, _local4, _local5));
}
protected static function readPremiums(_arg1:XMLList):void{
var _local2:int;
var _local3:Premium;
var _local4:String;
var _local6:XML;
var _local7:int;
var _local5:Array = Premium.VALID_PREMIUMS.concat();
for each (_local6 in _arg1) {
_local2 = parseInt(_local6.attribute("id"));
_local3 = Premium.lookup(_local2);
if (!_local3){
Debug.error(("Premium statistics found for invalid index " + _local2));
} else {
_local7 = _local5.indexOf(_local2);
if (_local7 >= 0){
_local5.splice(_local7, 1);
};
_local3.name = _local6.attribute("name").toString();
_local4 = "description";
if (_local6[_local4] == undefined){
Debug.error(((("Missing premium statistic: " + _local2) + " - ") + _local4));
} else {
_local3.description = _local6[_local4].toString();
};
_local4 = "value";
if (_local6[_local4] == undefined){
Debug.error(((("Missing premium statistic: " + _local2) + " - ") + _local4));
} else {
_local3.value = parseFloat(_local6[_local4]);
};
_local4 = "cost";
if (_local6[_local4] == undefined){
Debug.error(((("Missing premium statistic: " + _local2) + " - ") + _local4));
} else {
_local3.cost = parseInt(_local6[_local4]);
};
};
};
for each (_local2 in _local5) {
Debug.error(("Premium statistics not found for index " + _local2));
};
}
}
}//package