Section 1
//GamePreloaderEvent (com.gamezhero.api.as3.events.GamePreloaderEvent)
package com.gamezhero.api.as3.events {
import flash.events.*;
public class GamePreloaderEvent extends Event {
private var value_;
public static const FINISH:String = "PRELOAD_COMPLETE";
public static const PARAMS:String = "PARAMS_COMPLETE";
public function GamePreloaderEvent(_arg1:String){
super(_arg1);
}
public function get value(){
return (value_);
}
public function set value(_arg1):void{
value_ = _arg1;
}
override public function toString():String{
return (formatToString("GamePreloaderEvent"));
}
}
}//package com.gamezhero.api.as3.events
Section 2
//Background (com.gamezhero.api.as3.gui.Background)
package com.gamezhero.api.as3.gui {
import flash.display.*;
public class Background extends MovieClip {
private var _goal:MovieClip;
private var _bg:MovieClip;
public function Background(_arg1:MovieClip){
_goal = _arg1;
_goal.addChild(this);
ini();
iniEvents();
}
public function remove():void{
clearEvents();
_goal.removeChild(this);
}
private function clearEvents():void{
}
public function update(_arg1:Number, _arg2:Number):void{
this.x = 0;
this.y = 0;
this.width = (_arg1 + 100);
this.height = (_arg2 + 100);
}
private function getBg():MovieClip{
var _local1:MovieClip = new MovieClip();
_local1.graphics.beginFill(0, 1);
_local1.graphics.lineStyle(0, 0, 0);
_local1.graphics.moveTo(0, 0);
_local1.graphics.lineTo(1000, 0);
_local1.graphics.lineTo(1000, 1000);
_local1.graphics.lineTo(0, 1000);
_local1.graphics.lineTo(0, 0);
_local1.graphics.endFill();
return (_local1);
}
private function ini():void{
_bg = getBg();
this.addChild(_bg);
}
private function iniEvents():void{
}
}
}//package com.gamezhero.api.as3.gui
Section 3
//Indicator (com.gamezhero.api.as3.gui.Indicator)
package com.gamezhero.api.as3.gui {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class Indicator extends MovieClip {
private var _timer:Timer;
private var _goal:MovieClip;
private var _indicator:MovieClip;
private var _dalpha:Number;
private var _info_text:TextField;
private var _arr:Array;
private var _n:uint;// = 10
private var _timer_2:Timer;
private var _current:Number;// = 0
public function Indicator(_arg1:MovieClip){
_dalpha = (360 / _n);
_arr = new Array();
super();
_goal = _arg1;
_goal.addChild(this);
ini();
iniEvents();
}
public function setSize(_arg1:Number, _arg2:Number):void{
this.visible = true;
this.width = _arg1;
this.height = _arg2;
}
public function remove():void{
clearEvents();
_goal.removeChild(this);
}
private function getItem():MovieClip{
var _local1:MovieClip = new MovieClip();
_local1.graphics.beginFill(0xFFFFFF, 1);
_local1.graphics.lineStyle(0, 0, 0);
_local1.graphics.moveTo(32.3, -5.7);
_local1.graphics.curveTo(30, -3.3, 30, 0);
_local1.graphics.curveTo(30, 3.3, 32.3, 5.6);
_local1.graphics.curveTo(34.7, 8, 38.05, 8);
_local1.graphics.lineTo(57, 8);
_local1.graphics.curveTo(60.3, 8, 62.6, 5.6);
_local1.graphics.curveTo(65, 3.3, 65, 0);
_local1.graphics.curveTo(65, -3.3, 62.6, -5.7);
_local1.graphics.curveTo(60.3, -8, 57, -8);
_local1.graphics.lineTo(38.05, -8);
_local1.graphics.curveTo(34.7, -8, 32.3, -5.7);
_local1.graphics.endFill();
_indicator.addChild(_local1);
return (_local1);
}
private function clearEvents():void{
_timer.removeEventListener(TimerEvent.TIMER, updateIndicator);
_timer_2.removeEventListener(TimerEvent.TIMER, updateCurrent);
}
public function setPos(_arg1:Number, _arg2:Number):void{
this.visible = true;
this.x = _arg1;
this.y = _arg2;
}
private function updateIndicator(_arg1:TimerEvent=null):void{
var _local2:uint;
while (_local2 < _n) {
_arr[_local2].alpha = (_arr[_local2].alpha - 0.07);
if (_arr[_local2].alpha <= 0){
_arr[_local2].alpha = 0;
};
_local2++;
};
_arg1.updateAfterEvent();
}
public function createInfoText():void{
_info_text = new TextField();
var _local1:TextFormat = new TextFormat();
_local1.color = 0xFFFFFF;
_local1.size = 11;
_local1.font = "Arial";
_info_text.defaultTextFormat = _local1;
_info_text.autoSize = TextFieldAutoSize.CENTER;
_indicator.addChild(_info_text);
var _local2:Number = 100;
var _local3:Number = 20;
_local2 = _info_text.width;
_local3 = _info_text.height;
_info_text.x = (-(_local2) / 2);
_info_text.y = -10;
}
public function update(_arg1:Number, _arg2:Number):void{
this.visible = true;
this.x = (_arg1 / 2);
this.y = (_arg2 / 2);
}
private function iniEvents():void{
_timer.addEventListener(TimerEvent.TIMER, updateIndicator);
_timer.start();
_timer_2.addEventListener(TimerEvent.TIMER, updateCurrent);
_timer_2.start();
}
public function setVal(_arg1:String):void{
_info_text.text = _arg1;
}
private function getBorder():MovieClip{
var _local1:Number = 10;
var _local2:Number = 150;
var _local3:Number = 150;
var _local4:MovieClip = new MovieClip();
_local4.graphics.beginFill(0x333333, 1);
_local4.graphics.moveTo(_local1, 0);
_local4.graphics.lineTo((_local2 - _local1), 0);
_local4.graphics.curveTo(_local2, 0, _local2, _local1);
_local4.graphics.lineTo(_local2, _local1);
_local4.graphics.lineTo(_local2, (_local3 - _local1));
_local4.graphics.curveTo(_local2, _local3, (_local2 - _local1), _local3);
_local4.graphics.lineTo((_local2 - _local1), _local3);
_local4.graphics.lineTo(_local1, _local3);
_local4.graphics.curveTo(0, _local3, 0, (_local3 - _local1));
_local4.graphics.lineTo(0, (_local3 - _local1));
_local4.graphics.lineTo(0, _local1);
_local4.graphics.curveTo(0, 0, _local1, 0);
_local4.graphics.lineTo(_local1, 0);
_local4.graphics.endFill();
_indicator.addChild(_local4);
_local4.x = (-(_local4.width) / 2);
_local4.y = (-(_local4.height) / 2);
return (_local4);
}
private function ini():void{
var _local2:MovieClip;
this.visible = false;
_timer = new Timer((1000 / 40), 0);
_timer_2 = new Timer((1000 / 20), 0);
_indicator = new MovieClip();
this.addChild(_indicator);
getBorder();
var _local1:uint;
while (_local1 < _n) {
_local2 = getItem();
_local2.rotation = (_dalpha * _local1);
_local2.alpha = 0.2;
_arr.push(_local2);
_local1++;
};
createInfoText();
}
private function updateCurrent(_arg1:TimerEvent=null):void{
_current++;
if (_current >= _arr.length){
_current = 0;
};
_arr[_current].alpha = 1;
_arg1.updateAfterEvent();
}
}
}//package com.gamezhero.api.as3.gui
Section 4
//URL (com.gamezhero.api.as3.utils.URL)
package com.gamezhero.api.as3.utils {
public class URL {
private var _scheme:String;
private var _host:String;
private var _query:String;
private var _path:String;
private var _userinfo:String;
private var _port:String;
private var _url:String;
private var _fragment:String;
private static const PATTERN:RegExp = /^([A-Za-z0-9_+.]{1,8}:\/\/)?([!-~]+@)?([^\/?#:]*)(:[0-9]*)?(\/[^?#]*)?(\?[^#]*)?(\#.*)?/i;
public function URL(_arg1:String):void{
var _local2:Array = _arg1.match(URL.PATTERN);
_url = _local2[0];
_scheme = _local2[1];
_userinfo = _local2[2];
_host = _local2[3];
_port = _local2[4];
_path = _local2[5];
_query = _local2[6];
_fragment = _local2[7];
}
public function get port():int{
return (((_port.length <= 0)) ? undefined : int(_port.substring(1, _port.length)));
}
public function get fragment():String{
return (((_fragment.length <= 0)) ? undefined : _fragment);
}
public function get query():Object{
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local1:Object = {raw:undefined, parsed:undefined};
if (((_query) && ((_query.length > 0)))){
_local1.raw = _query;
_local2 = _query.substring(1, _query.length);
_local3 = _local2.split("&");
_local1.parsed = ((_local3.length > 0)) ? {} : undefined;
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4].split("=");
_local1.parsed[_local5[0]] = _local5[1];
_local4++;
};
};
return (_local1);
}
public function get scheme():String{
return (((_scheme.length <= 0)) ? undefined : _scheme.substring(0, (_scheme.length - 3)));
}
public function get host():String{
return (((_host.length <= 0)) ? undefined : _host);
}
public function get path():String{
return (((_path.length <= 0)) ? undefined : _path);
}
public function get url():String{
return (((_url.length <= 0)) ? undefined : _url);
}
public function get userinfo():Object{
var _local2:Array;
var _local1:Object = {user:undefined, pass:undefined};
if (_userinfo){
_local2 = _userinfo.substring(0, (_userinfo.length - 1)).split(":");
_local1.user = (_local2[0]) ? _local2[0] : _local1.user;
_local1.pass = (_local2[1]) ? _local2[1] : _local1.pas;
};
return (_local1);
}
}
}//package com.gamezhero.api.as3.utils
Section 5
//GamePreloader (com.gamezhero.api.as3.GamePreloader)
package com.gamezhero.api.as3 {
import flash.display.*;
import com.gamezhero.api.as3.events.*;
import flash.events.*;
import flash.net.*;
import com.google.analytics.*;
import com.gamezhero.api.as3.gui.*;
import flash.utils.*;
public class GamePreloader extends MovieClip {
private var _tracker:GATracker;
private var skin_load_tries:uint;// = 2
private var _indicator:Indicator;
private var _frame_rate:Number;// = 24
private var updatePosition:Function;
private var setTarget:Function;
private var updateProgress:Function;
private var _goal:MovieClip;
private var _quality_old:String;
private var progress:Number;// = 0
private var _obj:Object;
private var _scale_old:String;
private var _urls:Dictionary;
private var _preloader_skin:MovieClip;
private var _timer:Timer;
private var _loader_preloader_skin:Loader;
private var _bg:Background;
private var _in_target:String;
private var _align_old:String;
private var iniPreloader:Function;
private var _in_url:String;// = "null"
private var _debug_flag:Boolean;// = false
private var _frame_rate_old:Number;
private var getParams:Function;
private var stage_ini_tries:uint;// = 5
public function GamePreloader(_arg1:MovieClip, _arg2:Object=null){
var par = _arg1;
var iniObject = _arg2;
_timer = new Timer((1000 / _frame_rate), 0);
_obj = new Object();
_urls = new Dictionary();
_loader_preloader_skin = new Loader();
super();
_goal = par;
_goal.addChild(this);
if (iniObject != null){
_obj = iniObject;
};
try {
_debug_flag = _obj["debug"];
} catch(e:Error) {
_debug_flag = false;
};
_bg = new Background(this);
_indicator = new Indicator(this);
progress = (_goal.loaderInfo.bytesLoaded / _goal.loaderInfo.bytesTotal);
iniEvents();
iniStage();
iniGoogleAnalitics();
}
private function beginScenario1():void{
clearTimers();
_timer.addEventListener(TimerEvent.TIMER, updatePreloader1);
_timer.start();
resizeAction();
}
private function beginScenario2():void{
clearTimers();
_timer.addEventListener(TimerEvent.TIMER, updatePreloader2);
_timer.start();
}
private function iniStage(_arg1:Event=null):void{
var event = _arg1;
this.removeEventListener(Event.ENTER_FRAME, iniStage);
try {
getStageSettings();
iniStageSettings();
iniStageEvents();
if (_debug_flag == false){
loadPreloaderSkin();
} else {
beginScenario2();
};
} catch(e:Error) {
stage_ini_tries--;
if (stage_ini_tries <= 0){
beginScenario2();
} else {
this.addEventListener(Event.ENTER_FRAME, iniStage);
};
};
}
private function getStageSettings():void{
_scale_old = stage.scaleMode;
_align_old = stage.align;
_frame_rate_old = stage.frameRate;
_quality_old = stage.quality;
}
public function trackClick():void{
_tracker.trackEvent(GamezheroGlobal.gameName, "click", "preloader");
}
private function resizeAction(_arg1:Event=null):void{
var obj:Object;
var event = _arg1;
obj = new Object();
try {
obj.width = stage.stageWidth;
obj.height = stage.stageHeight;
} catch(e:Error) {
obj.width = 550;
obj.height = 400;
};
try {
updatePosition(obj);
} catch(e:Error) {
};
_indicator.update(obj.width, obj.height);
_bg.update(obj.width, obj.height);
}
private function iniEvents():void{
_goal.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_goal.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressAction);
_loader_preloader_skin.contentLoaderInfo.addEventListener(Event.INIT, preloaderLoaderInit);
_loader_preloader_skin.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, preloaderLoaderError);
}
private function updatePreloader2(_arg1:TimerEvent=null):void{
var _local2:Number;
iniStageSettings();
_local2 = progress;
if ((((_local2 >= 1)) && (!((_goal.totalFrames == _goal.framesLoaded))))){
_local2 = 0.99;
};
_indicator.setVal((Math.round((_local2 * 100)) + " %"));
if (_local2 >= 1){
_timer.removeEventListener(TimerEvent.TIMER, updatePreloader2);
action();
};
_arg1.updateAfterEvent();
}
private function clearStageEvents():void{
try {
stage.removeEventListener(Event.RESIZE, resizeAction);
} catch(e:Error) {
};
}
private function getInfo():Object{
var _local1:UserInfo = new UserInfo(_goal);
return ((_local1 as Object));
}
public function changeLanguage(_arg1:String):void{
GamezheroDictionary.language = _arg1;
}
public function action(_arg1:Event=null):void{
clearTimers();
_timer.addEventListener(TimerEvent.TIMER, actionDone);
_timer.start();
}
private function iniGoogleAnalitics():void{
try {
_tracker = new GATracker(this, "UA-262190-1", "AS3", false);
} catch(e:Error) {
};
}
private function updatePreloader1(_arg1:TimerEvent=null):void{
var proc:Number;
var event = _arg1;
iniStageSettings();
proc = progress;
if ((((proc >= 1)) && (!((_goal.totalFrames == _goal.framesLoaded))))){
proc = 0.99;
};
try {
updateProgress({loaded:proc});
} catch(e:Error) {
trace("Error Update Progress of Preloader.");
beginScenario2();
};
event.updateAfterEvent();
}
private function iniStageSettings():void{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = _frame_rate;
stage.quality = StageQuality.HIGH;
}
private function iniStageEvents():void{
stage.addEventListener(Event.RESIZE, resizeAction);
resizeAction();
}
private function progressAction(_arg1:ProgressEvent=null):void{
var event = _arg1;
try {
progress = (event.bytesLoaded / event.bytesTotal);
} catch(e:Error) {
progress = 0;
};
}
private function clearEvents():void{
_goal.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
_goal.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressAction);
this.removeEventListener(Event.ENTER_FRAME, iniStage);
_loader_preloader_skin.contentLoaderInfo.removeEventListener(Event.INIT, preloaderLoaderInit);
_loader_preloader_skin.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, preloaderLoaderError);
try {
removeChild(_preloader_skin);
} catch(e:Error) {
};
}
private function loadPreloaderSkin():void{
var url:String = (GamezheroGlobal.toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 112, 114, 101, 108, 111, 97, 100, 101, 114, 47, 97, 115, 51, 47, 112, 114, 101, 108, 111, 97, 100, 101, 114, 46, 115, 119, 102, 63]) + String(new Date().getTime()));
var request:URLRequest = new URLRequest(url);
try {
_loader_preloader_skin.load(request);
} catch(e:Error) {
beginScenario2();
};
}
private function preloaderLoaderInit(_arg1:Event=null):void{
var paramsObj:Object;
var evnt:GamePreloaderEvent;
var event = _arg1;
_preloader_skin = (_loader_preloader_skin.content as MovieClip);
addChild(_preloader_skin);
iniPreloader = (_preloader_skin["iniPreloader"] as Function);
updateProgress = (_preloader_skin["updateProgress"] as Function);
updatePosition = (_preloader_skin["updatePosition"] as Function);
getParams = (_preloader_skin["getParams"] as Function);
setTarget = (_preloader_skin["setTarget"] as Function);
var infoObj:Object = getInfo();
try {
setTarget(this);
} catch(e:Error) {
trace("Error Set Target.");
};
try {
paramsObj = getParams(infoObj);
evnt = new GamePreloaderEvent(GamePreloaderEvent.PARAMS);
evnt.value = paramsObj;
this.dispatchEvent(evnt);
} catch(e:Error) {
trace("Error Get Params.");
};
try {
iniPreloader(infoObj);
beginScenario1();
} catch(e:Error) {
trace("Error Ini Preloader.");
beginScenario2();
};
}
private function preloaderLoaderError(_arg1:Event=null):void{
var IOErrorEvent = _arg1;
skin_load_tries--;
try {
_tracker.trackEvent("preloader", ("loading_error_" + (2 - skin_load_tries)), GamezheroGlobal.gameName);
} catch(e:Error) {
};
if (skin_load_tries <= 0){
beginScenario2();
} else {
loadPreloaderSkin();
};
}
private function actionDone(_arg1:TimerEvent=null):void{
var _local2:GamePreloaderEvent;
this.alpha = (this.alpha - 1);
if (this.alpha <= 1){
this.alpha = 0;
clearEvents();
clearStageEvents();
clearTimers();
setStageSettings();
_local2 = new GamePreloaderEvent(GamePreloaderEvent.FINISH);
this.dispatchEvent(_local2);
_indicator.remove();
_bg.remove();
_goal.removeChild(this);
};
_arg1.updateAfterEvent();
}
private function ioErrorHandler(_arg1:IOErrorEvent=null):void{
beginScenario2();
}
private function clearTimers():void{
_timer.removeEventListener(TimerEvent.TIMER, updatePreloader1);
_timer.removeEventListener(TimerEvent.TIMER, updatePreloader2);
_timer.removeEventListener(TimerEvent.TIMER, actionDone);
}
private function setStageSettings():void{
stage.scaleMode = _scale_old;
stage.align = _align_old;
stage.frameRate = _frame_rate_old;
stage.quality = _quality_old;
}
}
}//package com.gamezhero.api.as3
Section 6
//GameScore (com.gamezhero.api.as3.GameScore)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.gamezhero.api.as3.gui.*;
public class GameScore extends MovieClip {
private var _goal:MovieClip;
private var _frame_rate_old:Number;
private var _indicator:Indicator;
private var _frame_rate:Number;// = 24
private var _engine_load_tries:Number;// = 2
private var _quality_old:String;
private var updatePositionSkin:Function;
private var setTargetSkin:Function;
private var _loader:URLVariables;
private var _scale_old:String;
private var _engine_mc:MovieClip;
private var setTargetEngine:Function;
private var iniEngineForSkin:Function;
private var _skin_load_tries:Number;// = 2
private var _info_obj:UserInfo;
private var _score_value:Number;// = 0
private var _score_mode:String;// = "submit_mode"
private var _skin_mc:MovieClip;
private var _obj_listener_skin:Object;
private var _loader_url:String;// = "null"
private var _bg:Background;
private var obj_listener_engine:Object;
private var _loader_skin:Loader;
private var _align_old:String;
private var _loader_engine:Loader;
private var iniSkinForEngine:Function;
public static const SUBMIT_MODE:String = "submit_mode";
public static const CLOSE:String = "gamezhero_close";
public static const VIEW_MODE:String = "view_mode";
public function GameScore(_arg1:MovieClip, _arg2:String, _arg3:Number=0){
_loader_skin = new Loader();
_loader_engine = new Loader();
_obj_listener_skin = new Object();
obj_listener_engine = new Object();
_loader = new URLVariables();
super();
_goal = _arg1;
_goal.addChild(this);
_score_value = _arg3;
_score_mode = _arg2;
iniStageSettings();
_bg = new Background(this);
_indicator = new Indicator(this);
iniEvents();
loadSkin();
}
private function loadSkin():void{
var url:String = (GamezheroGlobal.toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 115, 99, 111, 114, 101, 47, 115, 107, 105, 110, 47, 97, 115, 51, 47, 115, 107, 105, 110, 46, 115, 119, 102, 63]) + String(new Date().getTime()));
var request:URLRequest = new URLRequest(url);
try {
_loader_skin.load(request);
} catch(e:Error) {
closeActionFoo();
};
}
public function close():void{
closeActionFoo();
}
private function engineLoaderError(_arg1:Event=null):void{
_engine_load_tries--;
if (_engine_load_tries <= 0){
closeActionFoo();
} else {
loadEngine();
};
}
private function closeActionFoo(){
try {
this.removeChild(_skin_mc);
} catch(e:Error) {
};
try {
this.removeChild(_engine_mc);
} catch(e:Error) {
};
try {
_indicator.remove();
} catch(e:Error) {
};
restoreStageSettings();
clearEvents();
dispatchEvent(new Event(CLOSE));
try {
_goal.removeChild(this);
} catch(e:Error) {
};
}
private function iniEvents():void{
stage.addEventListener(Event.RESIZE, resizeAction);
resizeAction();
_loader_skin.contentLoaderInfo.addEventListener(Event.INIT, skinLoaderInit);
_loader_skin.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, skinLoaderError);
_loader_engine.contentLoaderInfo.addEventListener(Event.INIT, engineLoaderInit);
_loader_engine.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, engineLoaderError);
}
private function iniSkin():void{
}
private function getInfo():UserInfo{
var _local1:UserInfo = new UserInfo(_goal);
return (_local1);
}
private function skinLoaderInit(_arg1:Event=null):void{
_skin_mc = (_loader_skin.content as MovieClip);
addChild(_skin_mc);
loadEngine();
}
private function resizeAction(_arg1:Event=null):void{
var obj:Object;
var event = _arg1;
obj = new Object();
try {
obj.width = stage.stageWidth;
obj.height = stage.stageHeight;
} catch(e:Error) {
obj.width = 550;
obj.height = 400;
};
try {
updatePositionSkin.call(null, obj);
} catch(e:Error) {
};
_bg.update(obj.width, obj.height);
_indicator.update(obj.width, obj.height);
}
private function iniStageSettings():void{
_scale_old = stage.scaleMode;
_align_old = stage.align;
_frame_rate_old = stage.frameRate;
_quality_old = stage.quality;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = _frame_rate;
stage.quality = StageQuality.HIGH;
}
private function clearEvents():void{
try {
stage.removeEventListener(Event.RESIZE, resizeAction);
} catch(e:Error) {
};
_loader_skin.contentLoaderInfo.removeEventListener(Event.INIT, skinLoaderInit);
_loader_skin.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, skinLoaderError);
_loader_engine.contentLoaderInfo.removeEventListener(Event.INIT, engineLoaderInit);
_loader_engine.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, engineLoaderError);
}
private function engineLoaderInit(_arg1:Event=null):void{
_engine_mc = (_loader_engine.content as MovieClip);
addChild(_engine_mc);
connectScoreParts();
}
private function restoreStageSettings():void{
stage.scaleMode = _scale_old;
stage.align = _align_old;
stage.frameRate = _frame_rate_old;
stage.quality = _quality_old;
}
private function loadEngine():void{
var url:String = (GamezheroGlobal.toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 115, 99, 111, 114, 101, 47, 101, 110, 103, 105, 110, 101, 47, 97, 115, 51, 47, 101, 110, 103, 105, 110, 101, 46, 115, 119, 102, 63]) + String(new Date().getTime()));
var request:URLRequest = new URLRequest(url);
try {
_loader_engine.load(request);
} catch(e:Error) {
closeActionFoo();
};
}
private function skinLoaderError(_arg1:Event=null):void{
_skin_load_tries--;
if (_skin_load_tries <= 0){
closeActionFoo();
} else {
loadSkin();
};
}
private function connectScoreParts():void{
setTargetSkin = _skin_mc["setTarget"];
iniEngineForSkin = _skin_mc["iniEngineForSkin"];
updatePositionSkin = _skin_mc["updatePosition"];
setTargetEngine = _engine_mc["setTarget"];
iniSkinForEngine = _engine_mc["iniSkinForEngine"];
_info_obj = getInfo();
_info_obj["score"] = _score_value;
_info_obj["mode"] = _score_mode;
_info_obj["skin"] = _skin_mc;
_info_obj["engine"] = _engine_mc;
try {
setTargetSkin.call(_skin_mc, this);
iniEngineForSkin.call(_skin_mc, Object(_info_obj));
} catch(e) {
trace("Error. GameScore. Error Set Target For Skin");
};
try {
setTargetEngine.call(_engine_mc, this);
iniSkinForEngine.call(_engine_mc, Object(_info_obj));
} catch(e) {
trace("Error. GameScore. Error Set Target For Engine");
};
resizeAction();
}
}
}//package com.gamezhero.api.as3
Section 7
//GamezheroApi (com.gamezhero.api.as3.GamezheroApi)
package com.gamezhero.api.as3 {
import flash.display.*;
import com.gamezhero.api.as3.events.*;
import flash.events.*;
import com.google.analytics.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
public class GamezheroApi {
private static var params:Object = new Object();
private static var _score_flag:Boolean = false;
private static var _version:String = "4.0 (as3)";
public static var MORE_GAMES_FROM_LOGO:String = "more_games_from_logo";
private static var _preloader_flag:Boolean = false;
private static var _score_target:MovieClip;
public static var MORE_GAMES:String = "more_games";
public static var FACEBOOK:String = "facebook";
private static var _ini_flag:Boolean = false;
public static var VIEW_TOP_SCORE:String = "view_top_score";
public static var TWITTER:String = "twitter";
private static var _preloader_target:MovieClip;
private static var _preloader_next_step_function:Function;
private static var _score_close_function:Function;
public static var SHARE_GAME:String = "share_game";
private static var SHARE_GAME_FROM_CONTEXT_MENU:String = "share_game_from_context_menu";
private static var _tracker:GATracker;
private static var MORE_GAMES_FROM_CONTEXT_MENU:String = "more_games_from_context_menu";
private static function checkApp():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:String;
var _local1:Array = [60, 84, 69, 88, 84, 70, 79, 82, 77, 65, 84, 32, 76, 69, 65, 68, 73, 78, 71, 61, 34, 50, 34, 62, 60, 80, 32, 65, 76, 73, 71, 78, 61, 34, 67, 69, 78, 84, 69, 82, 34, 62, 60, 70, 79, 78, 84, 32, 70, 65, 67, 69, 61, 34, 95, 115, 97, 110, 115, 34, 32, 83, 73, 90, 69, 61, 34, 49, 50, 34, 32, 67, 79, 76, 79, 82, 61, 34, 35, 70, 70, 48, 48, 48, 48, 34, 32, 76, 69, 84, 84, 69, 82, 83, 80, 65, 67, 73, 78, 71, 61, 34, 48, 34, 32, 75, 69, 82, 78, 73, 78, 71, 61, 34, 49, 34, 62, 60, 65, 32, 72, 82, 69, 70, 61, 34];
var _local2:MovieClip = GamezheroGlobal.root;
_local3 = 0;
while (_local3 < _local2.numChildren) {
_local4 = _local2.getChildAt(_local3);
if ((_local4 is MovieClip)){
_local5 = 0;
while (_local5 < _local4.numChildren) {
_local6 = _local4.getChildAt(_local5);
if ((_local6 is TextField)){
_local7 = _local6.htmlText;
if (_local7.indexOf(GamezheroGlobal.toText(_local1)) != -1){
_local2.removeChild(_local4);
//unresolved jump
};
};
_local5++;
};
};
_local3++;
};
}
private static function moreGameAction(_arg1:ContextMenuEvent=null):void{
navigateTo(MORE_GAMES_FROM_CONTEXT_MENU);
}
private static function shareGameAction(_arg1:ContextMenuEvent=null):void{
navigateTo(SHARE_GAME_FROM_CONTEXT_MENU);
}
private static function twitterAction(_arg1:ContextMenuEvent=null):void{
navigateTo(TWITTER);
}
private static function gameParamsReceived(_arg1:GamePreloaderEvent=null):void{
var _local3:String;
var _local2:Object = (_arg1.value as Object);
for (_local3 in _local2) {
params[_local3] = _local2[_local3];
};
}
private static function facebookAction(_arg1:ContextMenuEvent=null):void{
navigateTo(FACEBOOK);
}
private static function iniContextMenu():void{
var gamezheroMenu:ContextMenu = new ContextMenu();
gamezheroMenu.hideBuiltInItems();
var defaultItems:ContextMenuBuiltInItems = gamezheroMenu.builtInItems;
defaultItems.quality = true;
defaultItems.print = true;
defaultItems.save = true;
var item1:ContextMenuItem = new ContextMenuItem(getTranslationByName(GamezheroDictionary.FOLLOW_US_ON_TWITTER));
item1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, twitterAction);
gamezheroMenu.customItems.push(item1);
var item2:ContextMenuItem = new ContextMenuItem(getTranslationByName(GamezheroDictionary.BECOME_A_FUN_ON_FACEBOOK));
item2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, facebookAction);
gamezheroMenu.customItems.push(item2);
var item3:ContextMenuItem = new ContextMenuItem(getTranslationByName(GamezheroDictionary.MORE_GAMES));
item3.separatorBefore = true;
item3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, moreGameAction);
gamezheroMenu.customItems.push(item3);
var item4:ContextMenuItem = new ContextMenuItem(getTranslationByName(GamezheroDictionary.SHARE_GAME));
item4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, shareGameAction);
gamezheroMenu.customItems.push(item4);
var item5:ContextMenuItem = new ContextMenuItem(("Gamezhero API v" + _version));
item5.separatorBefore = true;
item5.enabled = false;
gamezheroMenu.customItems.push(item5);
try {
_preloader_target.contextMenu = gamezheroMenu;
} catch(e:Error) {
trace("Error: Ini context menu error");
};
}
private static function iniGoogleAnalitics(_arg1:MovieClip):void{
var target = _arg1;
try {
_tracker = new GATracker(target, "UA-262190-1", "AS3", false);
} catch(e:Error) {
};
}
public static function navigateTo(_arg1:String):void{
var from = _arg1;
try {
_tracker.trackEvent(GamezheroGlobal.gameName, "click", from);
} catch(e:Error) {
};
switch (from){
case MORE_GAMES_FROM_LOGO:
if (!params["logo"]){
GamezheroGlobal.getURL((((("http://www.gamezhero.com/?utm_campaign=" + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.domain) + "&utm_medium=zorro_logo"), "_blank");
} else {
GamezheroGlobal.getURL(params["logo"], "_blank");
};
break;
case VIEW_TOP_SCORE:
if (!params["top_score"]){
GamezheroGlobal.getURL((((((("http://www.gamezhero.com/topscore/" + GamezheroGlobal.gameName) + "/top100.html?utm_campaign=") + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.domain) + "&utm_medium=submit_score"), "_blank");
} else {
GamezheroGlobal.getURL(params["top_score"], "_blank");
};
break;
case TWITTER:
if (!params["folow_us_on_twitter"]){
GamezheroGlobal.getURL("http://twitter.com/gamezhero", "_blank");
} else {
GamezheroGlobal.getURL(params["folow_us_on_twitter"], "_blank");
};
break;
case FACEBOOK:
if (!params["became_a_fun_on_facebook"]){
GamezheroGlobal.getURL("http://www.facebook.com/pages/Gamezhero/71374863786", "_blank");
} else {
GamezheroGlobal.getURL(params["became_a_fun_on_facebook"], "_blank");
};
break;
case SHARE_GAME:
if (!params["share_game"]){
GamezheroGlobal.getURL((((((("http://www.gamezhero.com/freewebsitegames/" + GamezheroGlobal.gameName) + "-games.html?utm_campaign=") + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.domain) + "&utm_medium=share_game"), "_blank");
} else {
GamezheroGlobal.getURL(params["share_game"], "_blank");
};
break;
case MORE_GAMES_FROM_CONTEXT_MENU:
if (!params["more_games_context_menu"]){
GamezheroGlobal.getURL((((("http://www.gamezhero.com/?utm_campaign=" + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.domain) + "&utm_medium=more_free_games_context_menu"), "_blank");
} else {
GamezheroGlobal.getURL(params["more_games_context_menu"], "_blank");
};
break;
case SHARE_GAME_FROM_CONTEXT_MENU:
if (!params["share_game_context_menu"]){
GamezheroGlobal.getURL((((("http://www.gamezhero.com/?utm_campaign=" + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.domain) + "&utm_medium=share_game"), "_blank");
} else {
GamezheroGlobal.getURL(params["share_game_context_menu"], "_blank");
};
break;
default:
if (!params["more_games"]){
GamezheroGlobal.getURL((((("http://www.gamezhero.com/?utm_campaign=" + GamezheroGlobal.gameName) + "&utm_source=") + GamezheroGlobal.domain) + "&utm_medium=more_free_games"), "_blank");
} else {
GamezheroGlobal.getURL(params["more_games"], "_blank");
};
};
}
public static function submitScore(_arg1:String, _arg2:Number, _arg3:Function):void{
var _local4:Number;
var _local5:GameScore;
if (_ini_flag != true){
trace("Error. GamezheroApi don't initialize.");
return;
};
GamezheroGlobal.gameCode = _arg1;
_score_target = GamezheroGlobal.root;
_score_close_function = _arg3;
if ((((GamezheroGlobal.gameName == "unset")) || ((_score_flag == true)))){
trace("Error. GamezheroApi don't ini or score is opened");
} else {
_score_flag = true;
_local4 = _arg2;
_local5 = new GameScore(_score_target, GameScore.SUBMIT_MODE, _local4);
_local5.addEventListener(GameScore.CLOSE, scoreCloseAction);
};
}
private static function scoreCloseAction(_arg1:Event=null):void{
var event = _arg1;
_score_flag = false;
try {
(event.target as GameScore).removeEventListener(GameScore.CLOSE, scoreCloseAction);
} catch(e:Error) {
};
_score_close_function.apply();
}
public static function getTranslationByName(_arg1:String):String{
return (GamezheroDictionary.getTranslationByName(_arg1));
}
public static function viewScore(_arg1:String, _arg2:Function, _arg3:Boolean=true):void{
var _local4:GameScore;
if (_ini_flag != true){
trace("Error. GamezheroApi don't initialize.");
return;
};
GamezheroGlobal.gameCode = _arg1;
_score_target = GamezheroGlobal.root;
_score_close_function = _arg2;
if ((((GamezheroGlobal.gameName == "unset")) || ((_score_flag == true)))){
trace("Error. GamezheroApi don't ini or score is opened");
} else {
_score_flag = true;
_local4 = new GameScore(_score_target, GameScore.VIEW_MODE);
_local4.addEventListener(GameScore.CLOSE, scoreCloseAction);
};
}
public static function ini(_arg1:MovieClip, _arg2:String, _arg3:Boolean=false):void{
var _local4:Stage;
GamezheroGlobal.root = _arg1;
GamezheroGlobal.multilanguage = _arg3;
if (GamezheroGlobal.multilanguage == false){
GamezheroDictionary.language = GamezheroDictionary.ENG;
} else {
_local4 = GamezheroGlobal.root.stage;
if (_local4.root.loaderInfo.parameters["language"]){
GamezheroDictionary.language = _local4.root.loaderInfo.parameters["language"];
} else {
GamezheroDictionary.language = GamezheroDictionary.ENG;
};
};
Security.allowDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "data.gamezhero.com", "*.gamezhero.com");
Security.allowInsecureDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "data.gamezhero.com", "*.gamezhero.com");
GamezheroGlobal.gameName = _arg2;
if (GamezheroGlobal.root == null){
trace("Error Ini GamezheroApi. appRoot == null");
} else {
_ini_flag = true;
iniGoogleAnalitics(GamezheroGlobal.root);
checkApp();
};
}
private static function preloaderNextStep(_arg1:Event=null):void{
_preloader_flag = false;
iniContextMenu();
_preloader_next_step_function.apply();
}
public static function preloader(_arg1:Function):void{
var gamePreloader:GamePreloader;
var nextStep = _arg1;
if (_ini_flag != true){
trace("Error. GamezheroApi don't initialize.");
return;
};
try {
_tracker.trackEvent(GamezheroGlobal.gameName, "load", "preloader");
} catch(e:Error) {
};
_preloader_target = GamezheroGlobal.root;
_preloader_next_step_function = nextStep;
if ((((GamezheroGlobal.gameName == "unset")) || ((_preloader_flag == true)))){
trace("Error. GamezheroApi don't ini or preloader is opened");
} else {
_preloader_flag = true;
gamePreloader = new GamePreloader(_preloader_target, {debug:false});
gamePreloader.addEventListener(GamePreloaderEvent.FINISH, preloaderNextStep);
gamePreloader.addEventListener(GamePreloaderEvent.PARAMS, gameParamsReceived);
};
var gamezheroMenu:ContextMenu = new ContextMenu();
gamezheroMenu.hideBuiltInItems();
_preloader_target.contextMenu = gamezheroMenu;
}
}
}//package com.gamezhero.api.as3
Section 8
//GamezheroDictionary (com.gamezhero.api.as3.GamezheroDictionary)
package com.gamezhero.api.as3 {
public class GamezheroDictionary {
public static const SUBMIT_TOP_SCORE:String = "submit_top_score";
public static const UKR:String = "UKR";
public static const MUSIC:String = "music";
public static const GAME_OVER:String = "game_over";
public static const PRT:String = "PRT";
public static const SUBMIT:String = "submit";
public static const PLAY_GAME:String = "play_game";
public static const SETTINGS:String = "settings";
public static const MAIN_MENU:String = "main_menu";
public static const FOLLOW_US_ON_TWITTER:String = "folow_us_on_twitter";
public static const CONTINUE:String = "continue";
public static const POL:String = "POL";
public static const CONGRATULATIONS:String = "congratulate";
public static const ENG:String = "ENG";
public static const HELP:String = "help";
public static const SEND_TO_FRIENDS:String = "send_to friends";
public static const MORE_GAMES:String = "more_games";
public static const NEW_GAME:String = "new_game";
public static const ENTER_YOUR_NAME:String = "enter_your_name";
public static const LANGUAGE:String = "language";
public static const BECOME_A_FUN_ON_FACEBOOK:String = "became_a_fun_on_facebook";
public static const ESP:String = "ESP";
public static const REPLAY:String = "replay";
public static const SOUND:String = "sound";
public static const SHARE_GAME:String = "share_game";
public static const DEU:String = "DEU";
public static const FRA:String = "FRS";
public static const ITA:String = "ITA";
public static const TOP_SCORE:String = "top_score";
public static const LEVEL_FAILED:String = "level_failed";
public static const RUS:String = "RUS";
public static var user_texts:Array = new Array();
private static var _languages:Array = [ENG, ESP, PRT, ITA, UKR, RUS];
private static var _dictionary:XML = new XML((((("<dictionary>\r\n\t\t\t\t\t" + (((((((((((("<languages>\r\n\t\t\t\t\t\t\t" + (("<language id=\"" + ??esc_xattr
) + "\"><![CDATA[English]]></language>")) + "\r\n\t\t\t\t\t\t\t") + (("<language id=\"" + ??esc_xattr
) + "\"><![CDATA[Українська]]></language>")) + "\r\n\t\t\t\t\t\t\t") + (("<language id=\"" + ??esc_xattr
) + "\"><![CDATA[Русский]]></language>")) + "\r\n\t\t\t\t\t\t\t") + (("<language id=\"" + ??esc_xattr
) + "\"><![CDATA[Español]]></language>")) + "\r\n\t\t\t\t\t\t\t") + (("<language id=\"" + ??esc_xattr
) + "\"><![CDATA[Portugues]]></language>")) + " \r\n\t\t\t\t\t\t\t") + (("<language id=\"" + ??esc_xattr
) + "\"><![CDATA[Italiano]]></language>")) + "\r\n\t\t\t\t\t</languages>")) + "\r\n\t\t\t\t\t") + (((((((((((((((((((((((((((((((((((((((((((("<texts>\r\n\t\t\t\t\t\t\t" + (((((((((((((("<phrase id=\"1\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[New Game]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Нова Гра]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Новая Игра]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Nuevo juego]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Novo jogo]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Nuovo gioco]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"2\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Continue]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Продовжити]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Продолжить]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Continuar]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Continuar]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Continuare]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"3\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Top Score]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Результати]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Результаты]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Resultados]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Resultados]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Risultati]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"4\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Settings]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Налаштування]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Настройки]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Ajustes]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Especificações]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Impostazioni]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"5\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Help]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Порадник]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Помощь]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Ayuda]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Ajuda]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Aiuto]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"6\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Menu]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Меню]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Меню]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Menú]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Menú]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Menu]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"7\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Sound]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Звук]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Звук]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Sonido]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Sonido]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Suono]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"8\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Music]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Музика]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Музыка]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Música]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Música]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Musica]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"9\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Language]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Мова]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Язык]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Idioma]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Lengua]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Lingua]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"10\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Level Failed]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Халепа]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Неудача]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Nivel fracasado]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Nível fracassado]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Livello falito ]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"11\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Replay]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Грати Знов]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Играть Снова]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Jugar de nuevo]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Jogar de novo]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Giocare di nuovo]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"12\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[More Games]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Більше Ігор]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Больше Игр]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Más juegos gratis]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Mais jogos gratuitos]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Di più giochi gratis]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"13\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Send To Friends]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Надіслати Гру Другові]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Послать Игру Другу]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Enviar a los amigos]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Mandar aos amigos]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Inviare agli amici]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"14\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Follow us on Twitter]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Ми на Twitter]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Мы на Twitter]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Siga con nosotros en Twitter]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Sigam-nós no Twitter]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Siamo su Twitter]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"15\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Become a Fan on Facebook]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Ми на Facebook]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Мы на Facebook]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Estamos en Facebook]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Seja o fan no Facebook]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Siamo su Facebook]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + " \r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"16\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Share Game]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Запропонувати Гру]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Поделиться Игрой]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Compartir el juego]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Compartilhar o jogo]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Comunicare il gioco]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"17\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Congratulations]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Вітаємо]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Поздравляем]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Felicidades]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Parabéns]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Molti auguri]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"18\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Play Game]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Грати]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Играть]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Jugar]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Jogar]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Giocare]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\t\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"19\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Submit Top Score]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Надіслати Результат]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Отправить Результат]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Enviar el resultado]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Mandar o resultado]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Inviare il risultato]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"20\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Enter Your Name]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Введіть Ваше Ім'я]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Введите Ваше Имя]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Entre su nombre]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Entre o seu nome]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Entre il suo nome]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"21\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Submit]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Надіслати]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Отправить]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Enviar]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Mandar]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Inviare]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\t\t\r\n\t\t\t\t\t\t\t") + (((((((((((((("<phrase id=\"22\" name=\"" + ??esc_xattr
) + "\">\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Game Over]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Кінець Гри]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Конец Игры]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Juego Terminado]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Jogo Terminado]]></translation>")) + "\r\n\t\t\t\t\t\t\t\t\t") + (("<translation id=\"" + ??esc_xattr
) + "\"><![CDATA[Gioco Finito]]></translation>")) + "\r\n\t\t\t\t\t\t\t</phrase>")) + "\t\r\n\t\t\t\t\t</texts>")) + "\r\n\t\t\t</dictionary>"));
;
private static var _current_language:String = "ENG";
public static function get languages():Array{
return (_languages);
}
public static function get language():String{
return (_current_language);
}
public static function set language(_arg1:String):void{
_arg1 = _arg1.toUpperCase();
var _local2:Boolean;
var _local3:Number = 0;
while (_local3 < _languages.length) {
if (_languages[_local3] == _arg1){
_local2 = true;
_current_language = _arg1;
break;
};
_local3++;
};
if (_local2 == false){
_current_language = ENG;
};
}
public static function getTranslationByName(_arg1:String):String{
var val:String;
var _name = _arg1;
val = _dictionary.texts.phrase.(@name == _name).translation.(@id == _current_language);
if (!val){
val = user_texts[_current_language][_name];
if (!val){
val = "";
trace(("error translate " + _name));
};
};
return (val);
}
user_texts[ENG] = [];
user_texts[UKR] = [];
user_texts[RUS] = [];
user_texts[ESP] = [];
user_texts[PRT] = [];
user_texts[ITA] = [];
user_texts[ENG]["game_description"] = "My English Text";
user_texts[UKR]["game_description"] = "Provided by Gamezhero.com";
user_texts[RUS]["game_description"] = "Provided by Gamezhero.com";
user_texts[ESP]["game_description"] = "Provided by Gamezhero.com";
user_texts[PRT]["game_description"] = "Provided by Gamezhero.com";
user_texts[ITA]["game_description"] = "Provided by Gamezhero.com";
user_texts[ENG]["game_additional_text"] = "My English Text";
user_texts[UKR]["game_additional_text"] = "Provided by Gamezhero.com";
user_texts[RUS]["game_additional_text"] = "Provided by Gamezhero.com";
user_texts[ESP]["game_additional_text"] = "Provided by Gamezhero.com";
user_texts[PRT]["game_additional_text"] = "Provided by Gamezhero.com";
user_texts[ITA]["game_additional_text"] = "Provided by Gamezhero.com";
}
}//package com.gamezhero.api.as3
Section 9
//GamezheroGlobal (com.gamezhero.api.as3.GamezheroGlobal)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.net.*;
import com.gamezhero.api.as3.utils.*;
import flash.external.*;
public class GamezheroGlobal {
public static const SAFARI:String = "safari";
public static const IE:String = "ie";
public static const OPERA:String = "opera";
public static const FIREFOX:String = "firefox";
public static const CHROME:String = "chrome";
public static var _host:String = "error";
public static var _game_name:String = "unset";
public static var _game_code:String = "unset";
private static var _app_root:MovieClip;
public static var _browser:String = "unset";
private static var _app_multilanguage:Boolean = false;
public static function set root(_arg1:MovieClip):void{
var _local2:MovieClip = _arg1;
if (_local2.root == null){
_app_root = null;
} else {
_app_root = (_local2.root as MovieClip);
};
}
public static function set gameCode(_arg1:String):void{
_game_code = _arg1;
}
public static function set gameName(_arg1:String):void{
_game_name = _arg1;
}
public static function get domain():String{
var url:URL;
if (_host != "error"){
return (_host);
};
try {
url = new URL(_app_root.stage.loaderInfo.url);
_host = url.host;
if (_host == null){
_host = "local";
};
} catch(e:Error) {
trace("ERROR DOMAIN");
_host = "error";
};
return (_host);
}
public static function getURL(_arg1:String, _arg2:String="_blank"):void{
var _local3:URLRequest = new URLRequest(_arg1);
navigateToURL(_local3, _arg2);
}
public static function get multilanguage():Boolean{
return (_app_multilanguage);
}
public static function set multilanguage(_arg1:Boolean):void{
_app_multilanguage = _arg1;
}
public static function toText(_arg1:Array):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
public static function get gameName():String{
return (_game_name);
}
public static function get browser():String{
var st:String;
if (_browser == "unset"){
if (ExternalInterface.available){
try {
st = ExternalInterface.call("function (){ return navigator['userAgent']}");
st = st.toLowerCase();
if (st.indexOf("firefox") != -1){
_browser = FIREFOX;
} else {
if (st.indexOf("chrome") != -1){
_browser = CHROME;
} else {
if (st.indexOf("safari") != -1){
_browser = SAFARI;
} else {
if (st.indexOf("opera") != -1){
_browser = OPERA;
} else {
_browser = IE;
};
};
};
};
} catch(e:Error) {
_browser = IE;
};
} else {
_browser = IE;
};
};
return (_browser);
}
public static function get root():MovieClip{
return (_app_root);
}
public static function fromText(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
public static function get gameCode():String{
return (_game_code);
}
}
}//package com.gamezhero.api.as3
Section 10
//UserInfo (com.gamezhero.api.as3.UserInfo)
package com.gamezhero.api.as3 {
import flash.display.*;
import flash.system.*;
import flash.external.*;
public class UserInfo {
public var engine:MovieClip;
public var game_multilanguage:Boolean;
public var game_language:String;
public var skin:MovieClip;
public var game_languages:Array;
public var ad_zone:String;// = "preloader"
public var score:Number;
public var game_code:String;
public var flash_vars:Object;
public var flash_height:Number;
public var referrer:String;
public var flash_url:String;
public var mode:String;
public var browser:String;
public var href:String;
public var game_domain:String;
private var _goal:MovieClip;
public var api_version:String;// = "AS3 - v4.0"
public var capabilities:String;
public var flash_width:Number;
public var flash_domain:String;
public var publisher:String;// = "gamezhero"
public var game_name:String;
public function UserInfo(_arg1:MovieClip){
iniInfo();
}
private function iniInfo():void{
var i:String;
this["publisher"] = "gamezhero";
this["ad_zone"] = "preloader";
this["api_version"] = "AS3 - v4.0";
this["flash_vars"] = new Object();
this["capabilities"] = Capabilities.serverString;
if (ExternalInterface.available){
try {
this["href"] = ExternalInterface.call("function (){return document.location.href}");
} catch(e:Error) {
this["href"] = "-1";
};
try {
this["browser"] = ExternalInterface.call("function (){var st = ''; for (i in navigator){ if (typeof(navigator[i])!='function'){ st+=i+'='+navigator[i]+'&'; }} return st}");
} catch(e:Error) {
this["browser"] = "-1";
};
try {
this["referrer"] = ExternalInterface.call("function (){return document.referrer}");
} catch(e:Error) {
this["referrer"] = "-1";
};
} else {
this["href"] = "-1";
this["browser"] = "-1";
this["referrer"] = "-1";
};
this["flash_domain"] = GamezheroGlobal.domain;
var _stage:Stage = GamezheroGlobal.root.stage;
try {
this["flash_width"] = _stage.stageWidth;
this["flash_height"] = _stage.stageHeight;
this["flash_url"] = _stage.root.loaderInfo.url;
} catch(e:Error) {
};
try {
for (i in _stage.root.loaderInfo.parameters) {
this["flash_vars"][i] = _stage.root.loaderInfo.parameters[i];
};
} catch(e:Error) {
};
this["game_name"] = GamezheroGlobal.gameName;
this["game_code"] = GamezheroGlobal.gameCode;
this["game_domain"] = GamezheroGlobal.domain;
this["game_language"] = GamezheroDictionary.language;
this["game_languages"] = GamezheroDictionary.languages;
this["game_multilanguage"] = GamezheroGlobal.multilanguage;
}
}
}//package com.gamezhero.api.as3
Section 11
//CampaignInfo (com.google.analytics.campaign.CampaignInfo)
package com.google.analytics.campaign {
import com.google.analytics.utils.*;
public class CampaignInfo {
private var _new:Boolean;
private var _empty:Boolean;
public function CampaignInfo(_arg1:Boolean=true, _arg2:Boolean=false){
_empty = _arg1;
_new = _arg2;
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
public function isNew():Boolean{
return (_new);
}
public function get utmcn():String{
return ("1");
}
public function isEmpty():Boolean{
return (_empty);
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
if (((!(isEmpty())) && (isNew()))){
_local1.utmcn = utmcn;
};
if (((!(isEmpty())) && (!(isNew())))){
_local1.utmcr = utmcr;
};
return (_local1);
}
public function get utmcr():String{
return ("1");
}
}
}//package com.google.analytics.campaign
Section 12
//CampaignKey (com.google.analytics.campaign.CampaignKey)
package com.google.analytics.campaign {
public class CampaignKey {
public var UCMD:String;// = "utm_medium"
public var UCID:String;// = "utm_id"
public var UCTR:String;// = "utm_term"
public var UCSR:String;// = "utm_source"
public var UCNO:String;// = "utm_nooverride"
public var UCCN:String;// = "utm_campaign"
public var UGCLID:String;// = "gclid"
public var UCCT:String;// = "utm_content"
}
}//package com.google.analytics.campaign
Section 13
//CampaignManager (com.google.analytics.campaign.CampaignManager)
package com.google.analytics.campaign {
import com.google.analytics.core.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
public class CampaignManager {
private var _config:Configuration;
private var _domainHash:Number;
private var _debug:DebugConfiguration;
private var _timeStamp:Number;
private var _referrer:String;
private var _buffer:Buffer;
public static const trackingDelimiter:String = "|";
public function CampaignManager(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Number, _arg5:String, _arg6:Number){
_config = _arg1;
_debug = _arg2;
_buffer = _arg3;
_domainHash = _arg4;
_referrer = _arg5;
_timeStamp = _arg6;
}
public function getCampaignInformation(_arg1:String, _arg2:Boolean):CampaignInfo{
var _local4:CampaignTracker;
var _local8:CampaignTracker;
var _local9:int;
var _local3:CampaignInfo = new CampaignInfo();
var _local5:Boolean;
var _local6:Boolean;
var _local7:int;
if (((_config.allowLinker) && (_buffer.isGenuine()))){
if (!_buffer.hasUTMZ()){
return (_local3);
};
};
_local4 = getTrackerFromSearchString(_arg1);
if (isValid(_local4)){
_local6 = hasNoOverride(_arg1);
if (((_local6) && (!(_buffer.hasUTMZ())))){
return (_local3);
};
};
if (!isValid(_local4)){
_local4 = getOrganicCampaign();
if (((!(_buffer.hasUTMZ())) && (isIgnoredKeyword(_local4)))){
return (_local3);
};
};
if (((!(isValid(_local4))) && (_arg2))){
_local4 = getReferrerCampaign();
if (((!(_buffer.hasUTMZ())) && (isIgnoredReferral(_local4)))){
return (_local3);
};
};
if (!isValid(_local4)){
if (((!(_buffer.hasUTMZ())) && (_arg2))){
_local4 = getDirectCampaign();
};
};
if (!isValid(_local4)){
return (_local3);
};
if (((_buffer.hasUTMZ()) && (!(_buffer.utmz.isEmpty())))){
_local8 = new CampaignTracker();
_local8.fromTrackerString(_buffer.utmz.campaignTracking);
_local5 = (_local8.toTrackerString() == _local4.toTrackerString());
_local7 = _buffer.utmz.responseCount;
};
if (((!(_local5)) || (_arg2))){
_local9 = _buffer.utma.sessionCount;
_local7++;
if (_local9 == 0){
_local9 = 1;
};
_buffer.utmz.domainHash = _domainHash;
_buffer.utmz.campaignCreation = _timeStamp;
_buffer.utmz.campaignSessions = _local9;
_buffer.utmz.responseCount = _local7;
_buffer.utmz.campaignTracking = _local4.toTrackerString();
_debug.info(_buffer.utmz.toString(), VisualDebugMode.geek);
_local3 = new CampaignInfo(false, true);
} else {
_local3 = new CampaignInfo(false, false);
};
return (_local3);
}
public function hasNoOverride(_arg1:String):Boolean{
var _local2:CampaignKey = _config.campaignKey;
if (_arg1 == ""){
return (false);
};
var _local3:Variables = new Variables(_arg1);
var _local4 = "";
if (_local3.hasOwnProperty(_local2.UCNO)){
_local4 = _local3[_local2.UCNO];
switch (_local4){
case "1":
return (true);
case "":
case "0":
default:
return (false);
};
};
return (false);
}
public function getTrackerFromSearchString(_arg1:String):CampaignTracker{
var _local2:CampaignTracker = getOrganicCampaign();
var _local3:CampaignTracker = new CampaignTracker();
var _local4:CampaignKey = _config.campaignKey;
if (_arg1 == ""){
return (_local3);
};
var _local5:Variables = new Variables(_arg1);
if (_local5.hasOwnProperty(_local4.UCID)){
_local3.id = _local5[_local4.UCID];
};
if (_local5.hasOwnProperty(_local4.UCSR)){
_local3.source = _local5[_local4.UCSR];
};
if (_local5.hasOwnProperty(_local4.UGCLID)){
_local3.clickId = _local5[_local4.UGCLID];
};
if (_local5.hasOwnProperty(_local4.UCCN)){
_local3.name = _local5[_local4.UCCN];
} else {
_local3.name = "(not set)";
};
if (_local5.hasOwnProperty(_local4.UCMD)){
_local3.medium = _local5[_local4.UCMD];
} else {
_local3.medium = "(not set)";
};
if (_local5.hasOwnProperty(_local4.UCTR)){
_local3.term = _local5[_local4.UCTR];
} else {
if (((_local2) && (!((_local2.term == ""))))){
_local3.term = _local2.term;
};
};
if (_local5.hasOwnProperty(_local4.UCCT)){
_local3.content = _local5[_local4.UCCT];
};
return (_local3);
}
public function getOrganicCampaign():CampaignTracker{
var _local1:CampaignTracker;
var _local4:Array;
var _local5:OrganicReferrer;
var _local6:String;
if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){
return (_local1);
};
var _local2:URL = new URL(_referrer);
var _local3 = "";
if (_local2.hostName != ""){
if (_local2.hostName.indexOf(".") > -1){
_local4 = _local2.hostName.split(".");
switch (_local4.length){
case 2:
_local3 = _local4[0];
break;
case 3:
_local3 = _local4[1];
break;
};
};
};
if (_config.organic.match(_local3)){
_local5 = _config.organic.getReferrerByName(_local3);
_local6 = _config.organic.getKeywordValue(_local5, _local2.search);
_local1 = new CampaignTracker();
_local1.source = _local5.engine;
_local1.name = "(organic)";
_local1.medium = "organic";
_local1.term = _local6;
};
return (_local1);
}
public function getDirectCampaign():CampaignTracker{
var _local1:CampaignTracker = new CampaignTracker();
_local1.source = "(direct)";
_local1.name = "(direct)";
_local1.medium = "(none)";
return (_local1);
}
public function isIgnoredKeyword(_arg1:CampaignTracker):Boolean{
if (((_arg1) && ((_arg1.medium == "organic")))){
return (_config.organic.isIgnoredKeyword(_arg1.term));
};
return (false);
}
public function isIgnoredReferral(_arg1:CampaignTracker):Boolean{
if (((_arg1) && ((_arg1.medium == "referral")))){
return (_config.organic.isIgnoredReferral(_arg1.source));
};
return (false);
}
public function isValid(_arg1:CampaignTracker):Boolean{
if (((_arg1) && (_arg1.isValid()))){
return (true);
};
return (false);
}
public function getReferrerCampaign():CampaignTracker{
var _local1:CampaignTracker;
if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){
return (_local1);
};
var _local2:URL = new URL(_referrer);
var _local3:String = _local2.hostName;
var _local4:String = _local2.path;
if (_local3.indexOf("www.") == 0){
_local3 = _local3.substr(4);
};
_local1 = new CampaignTracker();
_local1.source = _local3;
_local1.name = "(referral)";
_local1.medium = "referral";
_local1.content = _local4;
return (_local1);
}
public static function isInvalidReferrer(_arg1:String):Boolean{
var _local2:URL;
if ((((((_arg1 == "")) || ((_arg1 == "-")))) || ((_arg1 == "0")))){
return (true);
};
if (_arg1.indexOf("://") > -1){
_local2 = new URL(_arg1);
if ((((_local2.protocol == Protocols.file)) || ((_local2.protocol == Protocols.none)))){
return (true);
};
};
return (false);
}
public static function isFromGoogleCSE(_arg1:String, _arg2:Configuration):Boolean{
var _local3:URL = new URL(_arg1);
if (_local3.hostName.indexOf(_arg2.google) > -1){
if (_local3.search.indexOf((_arg2.googleSearchParam + "=")) > -1){
if (_local3.path == ("/" + _arg2.googleCsePath)){
return (true);
};
};
};
return (false);
}
}
}//package com.google.analytics.campaign
Section 14
//CampaignTracker (com.google.analytics.campaign.CampaignTracker)
package com.google.analytics.campaign {
import com.google.analytics.utils.*;
public class CampaignTracker {
public var content:String;
public var source:String;
public var clickId:String;
public var name:String;
public var term:String;
public var medium:String;
public var id:String;
public function CampaignTracker(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:String="", _arg5:String="", _arg6:String="", _arg7:String=""){
this.id = _arg1;
this.source = _arg2;
this.clickId = _arg3;
this.name = _arg4;
this.medium = _arg5;
this.term = _arg6;
this.content = _arg7;
}
public function isValid():Boolean{
if (((((!((id == ""))) || (!((source == ""))))) || (!((clickId == ""))))){
return (true);
};
return (false);
}
public function toTrackerString():String{
var _local1:Array = [];
_addIfNotEmpty(_local1, "utmcid=", id);
_addIfNotEmpty(_local1, "utmcsr=", source);
_addIfNotEmpty(_local1, "utmgclid=", clickId);
_addIfNotEmpty(_local1, "utmccn=", name);
_addIfNotEmpty(_local1, "utmcmd=", medium);
_addIfNotEmpty(_local1, "utmctr=", term);
_addIfNotEmpty(_local1, "utmcct=", content);
return (_local1.join(CampaignManager.trackingDelimiter));
}
private function _addIfNotEmpty(_arg1:Array, _arg2:String, _arg3:String):void{
if (_arg3 != ""){
_arg3 = _arg3.split("+").join("%20");
_arg3 = _arg3.split(" ").join("%20");
_arg1.push((_arg2 + _arg3));
};
}
public function fromTrackerString(_arg1:String):void{
var _local2:String = _arg1.split(CampaignManager.trackingDelimiter).join("&");
var _local3:Variables = new Variables(_local2);
if (_local3.hasOwnProperty("utmcid")){
this.id = _local3["utmcid"];
};
if (_local3.hasOwnProperty("utmcsr")){
this.source = _local3["utmcsr"];
};
if (_local3.hasOwnProperty("utmccn")){
this.name = _local3["utmccn"];
};
if (_local3.hasOwnProperty("utmcmd")){
this.medium = _local3["utmcmd"];
};
if (_local3.hasOwnProperty("utmctr")){
this.term = _local3["utmctr"];
};
if (_local3.hasOwnProperty("utmcct")){
this.content = _local3["utmcct"];
};
if (_local3.hasOwnProperty("utmgclid")){
this.clickId = _local3["utmgclid"];
};
}
}
}//package com.google.analytics.campaign
Section 15
//BrowserInfo (com.google.analytics.core.BrowserInfo)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import com.google.analytics.utils.*;
public class BrowserInfo {
private var _config:Configuration;
private var _info:Environment;
public function BrowserInfo(_arg1:Configuration, _arg2:Environment){
_config = _arg1;
_info = _arg2;
}
public function get utmul():String{
return (_info.language.toLowerCase());
}
public function get utmje():String{
return ("0");
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
public function get utmsr():String{
return (((_info.screenWidth + "x") + _info.screenHeight));
}
public function get utmfl():String{
var _local1:Version;
if (_config.detectFlash){
_local1 = _info.flashVersion;
return (((((_local1.major + ".") + _local1.minor) + " r") + _local1.build));
};
return ("-");
}
public function get utmcs():String{
return (_info.languageEncoding);
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
_local1.utmcs = utmcs;
_local1.utmsr = utmsr;
_local1.utmsc = utmsc;
_local1.utmul = utmul;
_local1.utmje = utmje;
_local1.utmfl = utmfl;
return (_local1);
}
public function get utmsc():String{
return ((_info.screenColorDepth + "-bit"));
}
}
}//package com.google.analytics.core
Section 16
//Buffer (com.google.analytics.core.Buffer)
package com.google.analytics.core {
import flash.events.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import flash.net.*;
import com.google.analytics.data.*;
public dynamic class Buffer {
private var _SO:SharedObject;
private var _data:Object;
private var _OBJ:Object;
private var _utmb:UTMB;
private var _utmc:UTMC;
private var _utma:UTMA;
private var _debug:DebugConfiguration;
private var _utmk:UTMK;
private var _config:Configuration;
private var _utmv:UTMV;
private var _utmx:UTMX;
private var _utmz:UTMZ;
private var _volatile:Boolean;
public function Buffer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Boolean=false, _arg4:Object=null){
var _local5:String;
super();
_config = _arg1;
_debug = _arg2;
_data = _arg4;
_volatile = _arg3;
if (_volatile){
_OBJ = new Object();
if (_data){
for (_local5 in _data) {
_OBJ[_local5] = _data[_local5];
};
};
};
}
public function save():void{
var flushStatus:String;
if (!isVolatile()){
flushStatus = null;
try {
flushStatus = _SO.flush();
} catch(e:Error) {
_debug.warning("Error...Could not write SharedObject to disk");
};
switch (flushStatus){
case SharedObjectFlushStatus.PENDING:
_debug.info("Requesting permission to save object...");
_SO.addEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus);
break;
case SharedObjectFlushStatus.FLUSHED:
_debug.info("Value flushed to disk.");
break;
};
};
}
public function get utmv():UTMV{
if (!hasUTMV()){
_createUMTV();
};
return (_utmv);
}
public function get utmx():UTMX{
if (!hasUTMX()){
_createUMTX();
};
return (_utmx);
}
public function get utmz():UTMZ{
if (!hasUTMZ()){
_createUMTZ();
};
return (_utmz);
}
public function hasUTMA():Boolean{
if (_utma){
return (true);
};
return (false);
}
public function hasUTMB():Boolean{
if (_utmb){
return (true);
};
return (false);
}
public function hasUTMC():Boolean{
if (_utmc){
return (true);
};
return (false);
}
public function clearCookies():void{
utma.reset();
utmb.reset();
utmc.reset();
utmz.reset();
utmv.reset();
utmk.reset();
}
public function resetCurrentSession():void{
_clearUTMB();
_clearUTMC();
save();
}
public function hasUTMK():Boolean{
if (_utmk){
return (true);
};
return (false);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
var _local3:String = toLinkerParams();
var _local4:String = _arg1;
var _local5:Array = _arg1.split("#");
if (_local3){
if (_arg2){
if (1 >= _local5.length){
_local4 = (_local4 + ("#" + _local3));
} else {
_local4 = (_local4 + ("&" + _local3));
};
} else {
if (1 >= _local5.length){
if (_arg1.indexOf("?") > -1){
_local4 = (_local4 + "&");
} else {
_local4 = (_local4 + "?");
};
_local4 = (_local4 + _local3);
} else {
_local4 = _local5[0];
if (_arg1.indexOf("?") > -1){
_local4 = (_local4 + "&");
} else {
_local4 = (_local4 + "?");
};
_local4 = (_local4 + ((_local3 + "#") + _local5[1]));
};
};
};
return (_local4);
}
public function generateCookiesHash():Number{
var _local1 = "";
_local1 = (_local1 + utma.valueOf());
_local1 = (_local1 + utmb.valueOf());
_local1 = (_local1 + utmc.valueOf());
_local1 = (_local1 + utmx.valueOf());
_local1 = (_local1 + utmz.valueOf());
_local1 = (_local1 + utmv.valueOf());
return (Utils.generateHash(_local1));
}
private function _createUMTA():void{
_utma = new UTMA();
_utma.proxy = this;
}
private function _createUMTB():void{
_utmb = new UTMB();
_utmb.proxy = this;
}
private function _createUMTC():void{
_utmc = new UTMC();
}
public function hasUTMV():Boolean{
if (_utmv){
return (true);
};
return (false);
}
private function _createUMTK():void{
_utmk = new UTMK();
_utmk.proxy = this;
}
public function hasUTMX():Boolean{
if (_utmx){
return (true);
};
return (false);
}
public function hasUTMZ():Boolean{
if (_utmz){
return (true);
};
return (false);
}
private function _createUMTV():void{
_utmv = new UTMV();
_utmv.proxy = this;
}
private function _createUMTX():void{
_utmx = new UTMX();
_utmx.proxy = this;
}
private function _createUMTZ():void{
_utmz = new UTMZ();
_utmz.proxy = this;
}
public function updateUTMA(_arg1:Number):void{
if (_debug.verbose){
_debug.info((("updateUTMA( " + _arg1) + " )"), VisualDebugMode.advanced);
};
if (!utma.isEmpty()){
if (isNaN(utma.sessionCount)){
utma.sessionCount = 1;
} else {
utma.sessionCount = (utma.sessionCount + 1);
};
utma.lastTime = utma.currentTime;
utma.currentTime = _arg1;
};
}
public function isGenuine():Boolean{
if (!hasUTMK()){
return (true);
};
return ((utmk.hash == generateCookiesHash()));
}
private function _onFlushStatus(_arg1:NetStatusEvent):void{
_debug.info("User closed permission dialog...");
switch (_arg1.info.code){
case "SharedObject.Flush.Success":
_debug.info("User granted permission -- value saved.");
break;
case "SharedObject.Flush.Failed":
_debug.info("User denied permission -- value not saved.");
break;
};
_SO.removeEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus);
}
public function toLinkerParams():String{
var _local1 = "";
_local1 = (_local1 + utma.toURLString());
_local1 = (_local1 + ("&" + utmb.toURLString()));
_local1 = (_local1 + ("&" + utmc.toURLString()));
_local1 = (_local1 + ("&" + utmx.toURLString()));
_local1 = (_local1 + ("&" + utmz.toURLString()));
_local1 = (_local1 + ("&" + utmv.toURLString()));
_local1 = (_local1 + ("&__utmk=" + generateCookiesHash()));
return (_local1);
}
private function _clearUTMA():void{
_utma = null;
if (!isVolatile()){
_SO.data.utma = null;
delete _SO.data.utma;
};
}
private function _clearUTMC():void{
_utmc = null;
}
private function _clearUTMB():void{
_utmb = null;
if (!isVolatile()){
_SO.data.utmb = null;
delete _SO.data.utmb;
};
}
public function update(_arg1:String, _arg2):void{
if (isVolatile()){
_OBJ[_arg1] = _arg2;
} else {
_SO.data[_arg1] = _arg2;
};
}
public function createSO():void{
var saveSO:Boolean;
UTMZ.defaultTimespan = _config.conversionTimeout;
UTMB.defaultTimespan = _config.sessionTimeout;
if (!_volatile){
try {
_SO = SharedObject.getLocal(_config.cookieName, _config.cookiePath);
} catch(e:Error) {
if (_debug.active){
_debug.warning(((("Shared Object " + _config.cookieName) + " failed to be set\nreason: ") + e.message));
};
};
saveSO = false;
if (_SO.data.utma){
if (!hasUTMA()){
_createUMTA();
};
_utma.fromSharedObject(_SO.data.utma);
if (_debug.verbose){
_debug.info(("found: " + _utma.toString(true)), VisualDebugMode.geek);
};
if (_utma.isExpired()){
if (_debug.verbose){
_debug.warning("UTMA has expired", VisualDebugMode.advanced);
};
_clearUTMA();
saveSO = true;
};
};
if (_SO.data.utmb){
if (!hasUTMB()){
_createUMTB();
};
_utmb.fromSharedObject(_SO.data.utmb);
if (_debug.verbose){
_debug.info(("found: " + _utmb.toString(true)), VisualDebugMode.geek);
};
if (_utmb.isExpired()){
if (_debug.verbose){
_debug.warning("UTMB has expired", VisualDebugMode.advanced);
};
_clearUTMB();
saveSO = true;
};
};
if (_SO.data.utmc){
delete _SO.data.utmc;
saveSO = true;
};
if (_SO.data.utmk){
if (!hasUTMK()){
_createUMTK();
};
_utmk.fromSharedObject(_SO.data.utmk);
if (_debug.verbose){
_debug.info(("found: " + _utmk.toString()), VisualDebugMode.geek);
};
};
if (!hasUTMX()){
_createUMTX();
};
if (_SO.data.utmv){
if (!hasUTMV()){
_createUMTV();
};
_utmv.fromSharedObject(_SO.data.utmv);
if (_debug.verbose){
_debug.info(("found: " + _utmv.toString(true)), VisualDebugMode.geek);
};
if (_utmv.isExpired()){
if (_debug.verbose){
_debug.warning("UTMV has expired", VisualDebugMode.advanced);
};
_clearUTMV();
saveSO = true;
};
};
if (_SO.data.utmz){
if (!hasUTMZ()){
_createUMTZ();
};
_utmz.fromSharedObject(_SO.data.utmz);
if (_debug.verbose){
_debug.info(("found: " + _utmz.toString(true)), VisualDebugMode.geek);
};
if (_utmz.isExpired()){
if (_debug.verbose){
_debug.warning("UTMZ has expired", VisualDebugMode.advanced);
};
_clearUTMZ();
saveSO = true;
};
};
if (saveSO){
save();
};
};
}
private function _clearUTMZ():void{
_utmz = null;
if (!isVolatile()){
_SO.data.utmz = null;
delete _SO.data.utmz;
};
}
private function _clearUTMV():void{
_utmv = null;
if (!isVolatile()){
_SO.data.utmv = null;
delete _SO.data.utmv;
};
}
public function isVolatile():Boolean{
return (_volatile);
}
public function get utma():UTMA{
if (!hasUTMA()){
_createUMTA();
};
return (_utma);
}
public function get utmb():UTMB{
if (!hasUTMB()){
_createUMTB();
};
return (_utmb);
}
public function get utmc():UTMC{
if (!hasUTMC()){
_createUMTC();
};
return (_utmc);
}
public function get utmk():UTMK{
if (!hasUTMK()){
_createUMTK();
};
return (_utmk);
}
}
}//package com.google.analytics.core
Section 17
//DocumentInfo (com.google.analytics.core.DocumentInfo)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
public class DocumentInfo {
private var _pageURL:String;
private var _utmr:String;
private var _config:Configuration;
private var _adSense:AdSenseGlobals;
private var _info:Environment;
public function DocumentInfo(_arg1:Configuration, _arg2:Environment, _arg3:String, _arg4:String=null, _arg5:AdSenseGlobals=null){
_config = _arg1;
_info = _arg2;
_utmr = _arg3;
_pageURL = _arg4;
_adSense = _arg5;
}
public function get utmr():String{
if (!_utmr){
return ("-");
};
return (_utmr);
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
private function _renderPageURL(_arg1:String=""):String{
var _local2:String = _info.locationPath;
var _local3:String = _info.locationSearch;
if (((!(_arg1)) || ((_arg1 == "")))){
_arg1 = (_local2 + unescape(_local3));
if (_arg1 == ""){
_arg1 = "/";
};
};
return (_arg1);
}
public function get utmp():String{
return (_renderPageURL(_pageURL));
}
public function get utmhid():String{
return (String(_generateHitId()));
}
private function _generateHitId():Number{
var _local1:Number;
if (((_adSense.hid) && (!((_adSense.hid == ""))))){
_local1 = Number(_adSense.hid);
} else {
_local1 = Math.round((Math.random() * 2147483647));
_adSense.hid = String(_local1);
};
return (_local1);
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
if (((_config.detectTitle) && (!((utmdt == ""))))){
_local1.utmdt = utmdt;
};
_local1.utmhid = utmhid;
_local1.utmr = utmr;
_local1.utmp = utmp;
return (_local1);
}
public function get utmdt():String{
return (_info.documentTitle);
}
}
}//package com.google.analytics.core
Section 18
//Domain (com.google.analytics.core.Domain)
package com.google.analytics.core {
import com.google.analytics.debug.*;
public class Domain {
private var _mode:DomainNameMode;
private var _debug:DebugConfiguration;
private var _name:String;
public function Domain(_arg1:DomainNameMode=null, _arg2:String="", _arg3:DebugConfiguration=null){
_debug = _arg3;
if (_arg1 == null){
_arg1 = DomainNameMode.auto;
};
_mode = _arg1;
if (_arg1 == DomainNameMode.custom){
this.name = _arg2;
} else {
_name = _arg2;
};
}
public function get mode():DomainNameMode{
return (_mode);
}
public function set mode(_arg1:DomainNameMode):void{
_mode = _arg1;
if (_mode == DomainNameMode.none){
_name = "";
};
}
public function get name():String{
return (_name);
}
public function set name(_arg1:String):void{
if (((!((_arg1.charAt(0) == "."))) && (_debug))){
_debug.warning(("missing leading period \".\", cookie will only be accessible on " + _arg1), VisualDebugMode.geek);
};
_name = _arg1;
}
}
}//package com.google.analytics.core
Section 19
//DomainNameMode (com.google.analytics.core.DomainNameMode)
package com.google.analytics.core {
public class DomainNameMode {
private var _value:int;
private var _name:String;
public static const custom:DomainNameMode = new DomainNameMode(2, "custom");
;
public static const none:DomainNameMode = new DomainNameMode(0, "none");
;
public static const auto:DomainNameMode = new DomainNameMode(1, "auto");
;
public function DomainNameMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.core
Section 20
//Ecommerce (com.google.analytics.core.Ecommerce)
package com.google.analytics.core {
import com.google.analytics.debug.*;
import com.google.analytics.ecommerce.*;
public class Ecommerce {
private var _debug:DebugConfiguration;
private var _trans:Array;
public function Ecommerce(_arg1:DebugConfiguration){
this._debug = _arg1;
_trans = new Array();
}
public function getTransLength():Number{
return (_trans.length);
}
public function getTransFromArray(_arg1:Number):Transaction{
return (_trans[_arg1]);
}
public function addTransaction(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String, _arg7:String, _arg8:String):Transaction{
var _local9:Transaction;
_local9 = getTransaction(_arg1);
if (_local9 == null){
_local9 = new Transaction(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
_trans.push(_local9);
} else {
_local9.affiliation = _arg2;
_local9.total = _arg3;
_local9.tax = _arg4;
_local9.shipping = _arg5;
_local9.city = _arg6;
_local9.state = _arg7;
_local9.country = _arg8;
};
return (_local9);
}
public function getTransaction(_arg1:String):Transaction{
var _local2:Number;
_local2 = 0;
while (_local2 < _trans.length) {
if (_trans[_local2].id == _arg1){
return (_trans[_local2]);
};
_local2++;
};
return (null);
}
}
}//package com.google.analytics.core
Section 21
//EventInfo (com.google.analytics.core.EventInfo)
package com.google.analytics.core {
import com.google.analytics.utils.*;
import com.google.analytics.data.*;
public class EventInfo {
private var _ext10:X10;
private var _isEventHit:Boolean;
private var _x10:X10;
public function EventInfo(_arg1:Boolean, _arg2:X10, _arg3:X10=null){
_isEventHit = _arg1;
_x10 = _arg2;
_ext10 = _arg3;
}
public function toURLString():String{
var _local1:Variables = toVariables();
return (_local1.toString());
}
public function get utmt():String{
return ("event");
}
public function get utme():String{
return (_x10.renderMergedUrlString(_ext10));
}
public function toVariables():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
if (_isEventHit){
_local1.utmt = utmt;
};
_local1.utme = utme;
return (_local1);
}
}
}//package com.google.analytics.core
Section 22
//EventTracker (com.google.analytics.core.EventTracker)
package com.google.analytics.core {
import com.google.analytics.v4.*;
public class EventTracker {
private var _parent:GoogleAnalyticsAPI;
public var name:String;
public function EventTracker(_arg1:String, _arg2:GoogleAnalyticsAPI){
this.name = _arg1;
_parent = _arg2;
}
public function trackEvent(_arg1:String, _arg2:String=null, _arg3:Number=NaN):Boolean{
return (_parent.trackEvent(name, _arg1, _arg2, _arg3));
}
}
}//package com.google.analytics.core
Section 23
//ga_internal (com.google.analytics.core.ga_internal)
package com.google.analytics.core {
public namespace ga_internal;
}//package com.google.analytics.core
Section 24
//GIFRequest (com.google.analytics.core.GIFRequest)
package com.google.analytics.core {
import flash.display.*;
import flash.events.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import flash.net.*;
import com.google.analytics.utils.*;
import flash.system.*;
public class GIFRequest {
private var _info:Environment;
private var _count:int;
private var _utmac:String;
private var _alertcount:int;
private var _debug:DebugConfiguration;
private var _lastRequest:URLRequest;
private var _buffer:Buffer;
private var _config:Configuration;
private var _requests:Array;
public function GIFRequest(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Environment){
_config = _arg1;
_debug = _arg2;
_buffer = _arg3;
_info = _arg4;
_count = 0;
_alertcount = 0;
_requests = [];
}
public function get utmn():String{
return ((Utils.generate32bitRandom() as String));
}
public function onIOError(_arg1:IOErrorEvent):void{
var _local2:String = _lastRequest.url;
var _local3:String = String((_requests.length - 1));
var _local4 = (("Gif Request #" + _local3) + " failed");
if (_debug.GIFRequests){
if (!_debug.verbose){
if (_local2.indexOf("?") > -1){
_local2 = _local2.split("?")[0];
};
_local2 = _shortenURL(_local2);
};
if (int(_debug.mode) > int(VisualDebugMode.basic)){
_local4 = (_local4 + ((" \"" + _local2) + "\" does not exists or is unreachable"));
};
_debug.failure(_local4);
} else {
_debug.warning(_local4);
};
_removeListeners(_arg1.target);
}
public function send(_arg1:String, _arg2:Variables=null, _arg3:Boolean=false, _arg4:Boolean=false):void{
var _local5:String;
var _local6:URLRequest;
var _local7:URLRequest;
_utmac = _arg1;
if (!_arg2){
_arg2 = new Variables();
};
_arg2.URIencode = false;
_arg2.pre = ["utmwv", "utmn", "utmhn", "utmt", "utme", "utmcs", "utmsr", "utmsc", "utmul", "utmje", "utmfl", "utmdt", "utmhid", "utmr", "utmp"];
_arg2.post = ["utmcc"];
if (_debug.verbose){
_debug.info(((("tracking: " + _buffer.utmb.trackCount) + "/") + _config.trackingLimitPerSession), VisualDebugMode.geek);
};
if ((((_buffer.utmb.trackCount < _config.trackingLimitPerSession)) || (_arg3))){
if (_arg4){
updateToken();
};
if (((((_arg3) || (!(_arg4)))) || ((_buffer.utmb.token >= 1)))){
if (((!(_arg3)) && (_arg4))){
_buffer.utmb.token = (_buffer.utmb.token - 1);
};
_buffer.utmb.trackCount = (_buffer.utmb.trackCount + 1);
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
};
_arg2.utmwv = utmwv;
_arg2.utmn = Utils.generate32bitRandom();
if (_info.domainName != ""){
_arg2.utmhn = _info.domainName;
};
if (_config.sampleRate < 1){
_arg2.utmsp = (_config.sampleRate * 100);
};
if ((((_config.serverMode == ServerOperationMode.local)) || ((_config.serverMode == ServerOperationMode.both)))){
_local5 = _info.locationSWFPath;
if (_local5.lastIndexOf("/") > 0){
_local5 = _local5.substring(0, _local5.lastIndexOf("/"));
};
_local6 = new URLRequest();
if (_config.localGIFpath.indexOf("http") == 0){
_local6.url = _config.localGIFpath;
} else {
_local6.url = (_local5 + _config.localGIFpath);
};
_local6.url = (_local6.url + ("?" + _arg2.toString()));
if (((_debug.active) && (_debug.GIFRequests))){
_debugSend(_local6);
} else {
sendRequest(_local6);
};
};
if ((((_config.serverMode == ServerOperationMode.remote)) || ((_config.serverMode == ServerOperationMode.both)))){
_local7 = new URLRequest();
if (_info.protocol == Protocols.HTTPS){
_local7.url = _config.secureRemoteGIFpath;
} else {
if (_info.protocol == Protocols.HTTP){
_local7.url = _config.remoteGIFpath;
} else {
_local7.url = _config.remoteGIFpath;
};
};
_arg2.utmac = utmac;
_arg2.utmcc = encodeURIComponent(utmcc);
_local7.url = (_local7.url + ("?" + _arg2.toString()));
if (((_debug.active) && (_debug.GIFRequests))){
_debugSend(_local7);
} else {
sendRequest(_local7);
};
};
};
};
}
public function onSecurityError(_arg1:SecurityErrorEvent):void{
if (_debug.GIFRequests){
_debug.failure(_arg1.text);
};
}
public function get utmsp():String{
return (((_config.sampleRate * 100) as String));
}
public function get utmcc():String{
var _local1:Array = [];
if (_buffer.hasUTMA()){
_local1.push((_buffer.utma.toURLString() + ";"));
};
if (_buffer.hasUTMZ()){
_local1.push((_buffer.utmz.toURLString() + ";"));
};
if (_buffer.hasUTMV()){
_local1.push((_buffer.utmv.toURLString() + ";"));
};
return (_local1.join("+"));
}
public function get utmac():String{
return (_utmac);
}
public function get utmwv():String{
return (_config.version);
}
public function sendRequest(_arg1:URLRequest):void{
var request = _arg1;
var loader:Loader = new Loader();
loader.name = String(_count++);
var context:LoaderContext = new LoaderContext(false);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
_lastRequest = request;
_requests[loader.name] = new RequestObject(request);
try {
loader.load(request, context);
} catch(e:Error) {
_debug.failure("\"Loader.load()\" could not instanciate Gif Request");
};
}
private function _removeListeners(_arg1:Object):void{
_arg1.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
_arg1.removeEventListener(Event.COMPLETE, onComplete);
}
public function updateToken():void{
var _local2:Number;
var _local1:Number = new Date().getTime();
_local2 = ((_local1 - _buffer.utmb.lastTime) * (_config.tokenRate / 1000));
if (_debug.verbose){
_debug.info(("tokenDelta: " + _local2), VisualDebugMode.geek);
};
if (_local2 >= 1){
_buffer.utmb.token = Math.min(Math.floor((_buffer.utmb.token + _local2)), _config.bucketCapacity);
_buffer.utmb.lastTime = _local1;
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
};
};
}
public function get utmhn():String{
return (_info.domainName);
}
private function _shortenURL(_arg1:String):String{
var _local2:Array;
if (_arg1.length > 60){
_local2 = _arg1.split("/");
while (_arg1.length > 60) {
_local2.shift();
_arg1 = ("../" + _local2.join("/"));
};
};
return (_arg1);
}
private function _debugSend(_arg1:URLRequest):void{
var _local3:String;
var _local2 = "";
switch (_debug.mode){
case VisualDebugMode.geek:
_local2 = ((("Gif Request #" + _alertcount) + ":\n") + _arg1.url);
break;
case VisualDebugMode.advanced:
_local3 = _arg1.url;
if (_local3.indexOf("?") > -1){
_local3 = _local3.split("?")[0];
};
_local3 = _shortenURL(_local3);
_local2 = (((("Send Gif Request #" + _alertcount) + ":\n") + _local3) + " ?");
break;
case VisualDebugMode.basic:
default:
_local2 = (((("Send " + _config.serverMode.toString()) + " Gif Request #") + _alertcount) + " ?");
};
_debug.alertGifRequest(_local2, _arg1, this);
_alertcount++;
}
public function onComplete(_arg1:Event):void{
var _local2:String = _arg1.target.loader.name;
_requests[_local2].complete();
var _local3 = (("Gif Request #" + _local2) + " sent");
var _local4:String = _requests[_local2].request.url;
if (_debug.GIFRequests){
if (!_debug.verbose){
if (_local4.indexOf("?") > -1){
_local4 = _local4.split("?")[0];
};
_local4 = _shortenURL(_local4);
};
if (int(_debug.mode) > int(VisualDebugMode.basic)){
_local3 = (_local3 + ((" to \"" + _local4) + "\""));
};
_debug.success(_local3);
} else {
_debug.info(_local3);
};
_removeListeners(_arg1.target);
}
}
}//package com.google.analytics.core
Section 25
//IdleTimer (com.google.analytics.core.IdleTimer)
package com.google.analytics.core {
import flash.display.*;
import flash.events.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import flash.utils.*;
public class IdleTimer {
private var _stage:Stage;
private var _loop:Timer;
private var _lastMove:int;
private var _inactivity:Number;
private var _debug:DebugConfiguration;
private var _session:Timer;
private var _buffer:Buffer;
public function IdleTimer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:DisplayObject, _arg4:Buffer){
var _local5:Number = _arg1.idleLoop;
var _local6:Number = _arg1.idleTimeout;
var _local7:Number = _arg1.sessionTimeout;
_loop = new Timer((_local5 * 1000));
_session = new Timer((_local7 * 1000), 1);
_debug = _arg2;
_stage = _arg3.stage;
_buffer = _arg4;
_lastMove = getTimer();
_inactivity = (_local6 * 1000);
_loop.addEventListener(TimerEvent.TIMER, checkForIdle);
_session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession);
_stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
_debug.info(((((("delay: " + _local5) + "sec , inactivity: ") + _local6) + "sec, sessionTimeout: ") + _local7), VisualDebugMode.geek);
_loop.start();
}
private function onMouseMove(_arg1:MouseEvent):void{
_lastMove = getTimer();
if (_session.running){
_debug.info("session timer reset", VisualDebugMode.geek);
_session.reset();
};
}
public function endSession(_arg1:TimerEvent):void{
_session.removeEventListener(TimerEvent.TIMER_COMPLETE, endSession);
_debug.info("session timer end session", VisualDebugMode.geek);
_session.reset();
_buffer.resetCurrentSession();
_debug.info(_buffer.utmb.toString(), VisualDebugMode.geek);
_debug.info(_buffer.utmc.toString(), VisualDebugMode.geek);
_session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession);
}
public function checkForIdle(_arg1:TimerEvent):void{
var _local2:int = getTimer();
if ((_local2 - _lastMove) >= _inactivity){
if (!_session.running){
_debug.info("session timer start", VisualDebugMode.geek);
_session.start();
};
};
}
}
}//package com.google.analytics.core
Section 26
//Organic (com.google.analytics.core.Organic)
package com.google.analytics.core {
import com.google.analytics.utils.*;
public class Organic {
private var _sourcesCache:Array;
private var _sourcesEngine:Array;
private var _ignoredKeywords:Array;
private var _ignoredReferralsCache:Object;
private var _ignoredReferrals:Array;
private var _ignoredKeywordsCache:Object;
private var _sources:Array;
public static var throwErrors:Boolean = false;
public function Organic(){
_sources = [];
_sourcesCache = [];
_sourcesEngine = [];
_ignoredReferrals = [];
_ignoredReferralsCache = {};
_ignoredKeywords = [];
_ignoredKeywordsCache = {};
}
public function isIgnoredKeyword(_arg1:String):Boolean{
if (_ignoredKeywordsCache.hasOwnProperty(_arg1)){
return (true);
};
return (false);
}
public function getKeywordValue(_arg1:OrganicReferrer, _arg2:String):String{
var _local3:String = _arg1.keyword;
return (getKeywordValueFromPath(_local3, _arg2));
}
public function isIgnoredReferral(_arg1:String):Boolean{
if (_ignoredReferralsCache.hasOwnProperty(_arg1)){
return (true);
};
return (false);
}
public function clear():void{
clearEngines();
clearIgnoredReferrals();
clearIgnoredKeywords();
}
public function get count():int{
return (_sources.length);
}
public function get ignoredKeywordsCount():int{
return (_ignoredKeywords.length);
}
public function match(_arg1:String):Boolean{
if (_arg1 == ""){
return (false);
};
_arg1 = _arg1.toLowerCase();
if (_sourcesEngine[_arg1] != undefined){
return (true);
};
return (false);
}
public function clearIgnoredKeywords():void{
_ignoredKeywords = [];
_ignoredKeywordsCache = {};
}
public function addSource(_arg1:String, _arg2:String):void{
var _local3:OrganicReferrer = new OrganicReferrer(_arg1, _arg2);
if (_sourcesCache[_local3.toString()] == undefined){
_sources.push(_local3);
_sourcesCache[_local3.toString()] = (_sources.length - 1);
if (_sourcesEngine[_local3.engine] == undefined){
_sourcesEngine[_local3.engine] = [(_sources.length - 1)];
} else {
_sourcesEngine[_local3.engine].push((_sources.length - 1));
};
} else {
if (throwErrors){
throw (new Error((_local3.toString() + " already exists, we don't add it.")));
};
};
}
public function clearEngines():void{
_sources = [];
_sourcesCache = [];
_sourcesEngine = [];
}
public function get ignoredReferralsCount():int{
return (_ignoredReferrals.length);
}
public function addIgnoredReferral(_arg1:String):void{
if (_ignoredReferralsCache[_arg1] == undefined){
_ignoredReferrals.push(_arg1);
_ignoredReferralsCache[_arg1] = (_ignoredReferrals.length - 1);
} else {
if (throwErrors){
throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it.")));
};
};
}
public function clearIgnoredReferrals():void{
_ignoredReferrals = [];
_ignoredReferralsCache = {};
}
public function getReferrerByName(_arg1:String):OrganicReferrer{
var _local2:int;
if (match(_arg1)){
_local2 = _sourcesEngine[_arg1][0];
return (_sources[_local2]);
};
return (null);
}
public function addIgnoredKeyword(_arg1:String):void{
if (_ignoredKeywordsCache[_arg1] == undefined){
_ignoredKeywords.push(_arg1);
_ignoredKeywordsCache[_arg1] = (_ignoredKeywords.length - 1);
} else {
if (throwErrors){
throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it.")));
};
};
}
public function get sources():Array{
return (_sources);
}
public static function getKeywordValueFromPath(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:Variables;
if (_arg2.indexOf((_arg1 + "=")) > -1){
if (_arg2.charAt(0) == "?"){
_arg2 = _arg2.substr(1);
};
_arg2 = _arg2.split("+").join("%20");
_local4 = new Variables(_arg2);
_local3 = _local4[_arg1];
};
return (_local3);
}
}
}//package com.google.analytics.core
Section 27
//OrganicReferrer (com.google.analytics.core.OrganicReferrer)
package com.google.analytics.core {
public class OrganicReferrer {
private var _engine:String;
private var _keyword:String;
public function OrganicReferrer(_arg1:String, _arg2:String){
this.engine = _arg1;
this.keyword = _arg2;
}
public function get keyword():String{
return (_keyword);
}
public function get engine():String{
return (_engine);
}
public function set engine(_arg1:String):void{
_engine = _arg1.toLowerCase();
}
public function toString():String{
return (((engine + "?") + keyword));
}
public function set keyword(_arg1:String):void{
_keyword = _arg1.toLowerCase();
}
}
}//package com.google.analytics.core
Section 28
//RequestObject (com.google.analytics.core.RequestObject)
package com.google.analytics.core {
import flash.net.*;
import flash.utils.*;
public class RequestObject {
public var start:int;
public var end:int;
public var request:URLRequest;
public function RequestObject(_arg1:URLRequest){
start = getTimer();
this.request = _arg1;
}
public function hasCompleted():Boolean{
return ((end > 0));
}
public function toString():String{
var _local1:Array = [];
_local1.push((("duration: " + duration) + "ms"));
_local1.push(("url: " + request.url));
return ((("{ " + _local1.join(", ")) + " }"));
}
public function complete():void{
end = getTimer();
}
public function get duration():int{
if (!hasCompleted()){
return (0);
};
return ((end - start));
}
}
}//package com.google.analytics.core
Section 29
//ServerOperationMode (com.google.analytics.core.ServerOperationMode)
package com.google.analytics.core {
public class ServerOperationMode {
private var _value:int;
private var _name:String;
public static const both:ServerOperationMode = new ServerOperationMode(2, "both");
;
public static const remote:ServerOperationMode = new ServerOperationMode(1, "remote");
;
public static const local:ServerOperationMode = new ServerOperationMode(0, "local");
;
public function ServerOperationMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.core
Section 30
//TrackerCache (com.google.analytics.core.TrackerCache)
package com.google.analytics.core {
import com.google.analytics.v4.*;
import flash.errors.*;
public class TrackerCache implements GoogleAnalyticsAPI {
public var tracker:GoogleAnalyticsAPI;
private var _ar:Array;
public static var CACHE_THROW_ERROR:Boolean;
public function TrackerCache(_arg1:GoogleAnalyticsAPI=null){
this.tracker = _arg1;
_ar = [];
}
public function size():uint{
return (_ar.length);
}
public function flush():void{
var _local1:Object;
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:int;
if (tracker == null){
return;
};
if (size() > 0){
_local4 = _ar.length;
while (_local5 < _local4) {
_local1 = _ar.shift();
_local2 = (_local1.name as String);
_local3 = (_local1.args as Array);
if (((!((_local2 == null))) && ((_local2 in tracker)))){
(tracker[_local2] as Function).apply(tracker, _local3);
};
_local5++;
};
};
}
public function enqueue(_arg1:String, ... _args):Boolean{
if (_arg1 == null){
return (false);
};
_ar.push({name:_arg1, args:_args});
return (true);
}
public function link(_arg1:String, _arg2:Boolean=false):void{
enqueue("link", _arg1, _arg2);
}
public function addOrganic(_arg1:String, _arg2:String):void{
enqueue("addOrganic", _arg1, _arg2);
}
public function setAllowLinker(_arg1:Boolean):void{
enqueue("setAllowLinker", _arg1);
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
enqueue("trackEvent", _arg1, _arg2, _arg3, _arg4);
return (true);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLinkerUrl' method for the moment."));
};
return ("");
}
public function getClientInfo():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getClientInfo' method for the moment."));
};
return (false);
}
public function trackTrans():void{
enqueue("trackTrans");
}
public function trackPageview(_arg1:String=""):void{
enqueue("trackPageview", _arg1);
}
public function setClientInfo(_arg1:Boolean):void{
enqueue("setClientInfo", _arg1);
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
enqueue("linkByPost", _arg1, _arg2);
}
public function setCookieTimeout(_arg1:int):void{
enqueue("setCookieTimeout", _arg1);
}
public function isEmpty():Boolean{
return ((_ar.length == 0));
}
public function getDetectTitle():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectTitle' method for the moment."));
};
return (false);
}
public function resetSession():void{
enqueue("resetSession");
}
public function setDetectFlash(_arg1:Boolean):void{
enqueue("setDetectFlash", _arg1);
}
public function clear():void{
_ar = [];
}
public function setCampNameKey(_arg1:String):void{
enqueue("setCampNameKey", _arg1);
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
enqueue("addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
public function createEventTracker(_arg1:String):EventTracker{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'createEventTracker' method for the moment."));
};
return (null);
}
public function clearIgnoredOrganic():void{
enqueue("clearIgnoredOrganic");
}
public function setVar(_arg1:String):void{
enqueue("setVar", _arg1);
}
public function setDomainName(_arg1:String):void{
enqueue("setDomainName", _arg1);
}
public function setCampSourceKey(_arg1:String):void{
enqueue("setCampSourceKey", _arg1);
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'addTrans' method for the moment."));
};
}
public function setCampContentKey(_arg1:String):void{
enqueue("setCampContentKey", _arg1);
}
public function setLocalServerMode():void{
enqueue("setLocalServerMode");
}
public function getLocalGifPath():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLocalGifPath' method for the moment."));
};
return ("");
}
public function setAllowAnchor(_arg1:Boolean):void{
enqueue("setAllowAnchor", _arg1);
}
public function clearIgnoredRef():void{
enqueue("clearIgnoredRef");
}
public function setLocalGifPath(_arg1:String):void{
enqueue("setLocalGifPath", _arg1);
}
public function getVersion():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getVersion' method for the moment."));
};
return ("");
}
public function setCookiePath(_arg1:String):void{
enqueue("setCookiePath", _arg1);
}
public function setSampleRate(_arg1:Number):void{
enqueue("setSampleRate", _arg1);
}
public function setDetectTitle(_arg1:Boolean):void{
enqueue("setDetectTitle", _arg1);
}
public function setAllowHash(_arg1:Boolean):void{
enqueue("setAllowHash", _arg1);
}
public function addIgnoredOrganic(_arg1:String):void{
enqueue("addIgnoredOrganic", _arg1);
}
public function setCampNOKey(_arg1:String):void{
enqueue("setCampNOKey", _arg1);
}
public function getServiceMode():ServerOperationMode{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getServiceMode' method for the moment."));
};
return (null);
}
public function setLocalRemoteServerMode():void{
enqueue("setLocalRemoteServerMode");
}
public function cookiePathCopy(_arg1:String):void{
enqueue("cookiePathCopy", _arg1);
}
public function getDetectFlash():Boolean{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectFlash' method for the moment."));
};
return (false);
}
public function setCampaignTrack(_arg1:Boolean):void{
enqueue("setCampaignTrack", _arg1);
}
public function clearOrganic():void{
enqueue("clearOrganic");
}
public function setCampTermKey(_arg1:String):void{
enqueue("setCampTermKey", _arg1);
}
public function addIgnoredRef(_arg1:String):void{
enqueue("addIgnoredRef", _arg1);
}
public function setCampMediumKey(_arg1:String):void{
enqueue("setCampMediumKey", _arg1);
}
public function setSessionTimeout(_arg1:int):void{
enqueue("setSessionTimeout", _arg1);
}
public function setRemoteServerMode():void{
enqueue("setRemoteServerMode");
}
public function element(){
return (_ar[0]);
}
public function getAccount():String{
if (CACHE_THROW_ERROR){
throw (new IllegalOperationError("The tracker is not ready and you can use the 'getAccount' method for the moment."));
};
return ("");
}
}
}//package com.google.analytics.core
Section 31
//TrackerMode (com.google.analytics.core.TrackerMode)
package com.google.analytics.core {
public class TrackerMode {
public static const BRIDGE:String = "Bridge";
public static const AS3:String = "AS3";
}
}//package com.google.analytics.core
Section 32
//Utils (com.google.analytics.core.Utils)
package com.google.analytics.core {
public class Utils {
public static function trim(_arg1:String, _arg2:Boolean=false):String{
var _local5:int;
var _local6:int;
var _local7:int;
if (_arg1 == ""){
return ("");
};
var _local3:Array = [" ", "\n", "\r", "\t"];
var _local4:String = _arg1;
if (_arg2){
_local5 = 0;
while ((((_local5 < _local3.length)) && ((_local4.indexOf(_local3[_local5]) > -1)))) {
_local4 = _local4.split(_local3[_local5]).join("");
_local5++;
};
} else {
_local6 = 0;
while ((((_local6 < _local4.length)) && ((_local3.indexOf(_local4.charAt(_local6)) > -1)))) {
_local6++;
};
_local4 = _local4.substr(_local6);
_local7 = (_local4.length - 1);
while ((((_local7 >= 0)) && ((_local3.indexOf(_local4.charAt(_local7)) > -1)))) {
_local7--;
};
_local4 = _local4.substring(0, (_local7 + 1));
};
return (_local4);
}
public static function generateHash(_arg1:String):int{
var _local4:int;
var _local5:int;
var _local2 = 1;
var _local3:int;
if (((!((_arg1 == null))) && (!((_arg1 == ""))))){
_local2 = 0;
_local4 = (_arg1.length - 1);
while (_local4 >= 0) {
_local5 = _arg1.charCodeAt(_local4);
_local2 = ((((_local2 << 6) & 268435455) + _local5) + (_local5 << 14));
_local3 = (_local2 & 266338304);
if (_local3 != 0){
_local2 = (_local2 ^ (_local3 >> 21));
};
_local4--;
};
};
return (_local2);
}
public static function generate32bitRandom():int{
return (Math.round((Math.random() * 2147483647)));
}
public static function validateAccount(_arg1:String):Boolean{
var _local2:RegExp = /^UA-[0-9]*-[0-9]*$/;
return (_local2.test(_arg1));
}
}
}//package com.google.analytics.core
Section 33
//Cookie (com.google.analytics.data.Cookie)
package com.google.analytics.data {
public interface Cookie {
function fromSharedObject(_arg1:Object):void;
function toURLString():String;
function get creation():Date;
function toSharedObject():Object;
function isExpired():Boolean;
function set creation(_arg1:Date):void;
function set expiration(_arg1:Date):void;
function get expiration():Date;
}
}//package com.google.analytics.data
Section 34
//UTMA (com.google.analytics.data.UTMA)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMA extends UTMCookie {
private var _sessionId:Number;
private var _domainHash:Number;
private var _firstTime:Number;
private var _currentTime:Number;
private var _lastTime:Number;
private var _sessionCount:Number;
public function UTMA(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:Number=NaN, _arg6:Number=NaN){
super("utma", "__utma", ["domainHash", "sessionId", "firstTime", "lastTime", "currentTime", "sessionCount"], (Timespan.twoyears * 1000));
this.domainHash = _arg1;
this.sessionId = _arg2;
this.firstTime = _arg3;
this.lastTime = _arg4;
this.currentTime = _arg5;
this.sessionCount = _arg6;
}
public function get lastTime():Number{
return (_lastTime);
}
public function set lastTime(_arg1:Number):void{
_lastTime = _arg1;
update();
}
public function set currentTime(_arg1:Number):void{
_currentTime = _arg1;
update();
}
public function get sessionId():Number{
return (_sessionId);
}
public function get sessionCount():Number{
return (_sessionCount);
}
public function get firstTime():Number{
return (_firstTime);
}
public function get currentTime():Number{
return (_currentTime);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set sessionId(_arg1:Number):void{
_sessionId = _arg1;
update();
}
public function set sessionCount(_arg1:Number):void{
_sessionCount = _arg1;
update();
}
public function get domainHash():Number{
return (_domainHash);
}
public function set firstTime(_arg1:Number):void{
_firstTime = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 35
//UTMB (com.google.analytics.data.UTMB)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMB extends UTMCookie {
private var _trackCount:Number;
private var _lastTime:Number;
private var _domainHash:Number;
private var _token:Number;
public static var defaultTimespan:Number = Timespan.thirtyminutes;
public function UTMB(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN){
super("utmb", "__utmb", ["domainHash", "trackCount", "token", "lastTime"], (defaultTimespan * 1000));
this.domainHash = _arg1;
this.trackCount = _arg2;
this.token = _arg3;
this.lastTime = _arg4;
}
public function set token(_arg1:Number):void{
_token = _arg1;
update();
}
public function set trackCount(_arg1:Number):void{
_trackCount = _arg1;
update();
}
public function get lastTime():Number{
return (_lastTime);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set lastTime(_arg1:Number):void{
_lastTime = _arg1;
update();
}
public function get domainHash():Number{
return (_domainHash);
}
public function get token():Number{
return (_token);
}
public function get trackCount():Number{
return (_trackCount);
}
}
}//package com.google.analytics.data
Section 36
//UTMC (com.google.analytics.data.UTMC)
package com.google.analytics.data {
public class UTMC extends UTMCookie {
private var _domainHash:Number;
public function UTMC(_arg1:Number=NaN){
super("utmc", "__utmc", ["domainHash"]);
this.domainHash = _arg1;
}
public function get domainHash():Number{
return (_domainHash);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 37
//UTMCookie (com.google.analytics.data.UTMCookie)
package com.google.analytics.data {
import com.google.analytics.core.*;
public class UTMCookie implements Cookie {
protected var inURL:String;
protected var name:String;
private var _creation:Date;
private var _expiration:Date;
public var proxy:Buffer;
protected var fields:Array;
private var _timespan:Number;
public function UTMCookie(_arg1:String, _arg2:String, _arg3:Array, _arg4:Number=0){
this.name = _arg1;
this.inURL = _arg2;
this.fields = _arg3;
_timestamp(_arg4);
}
public function isEmpty():Boolean{
var _local2:String;
var _local1:int;
var _local3:int;
while (_local3 < fields.length) {
_local2 = fields[_local3];
if ((((this[_local2] is Number)) && (isNaN(this[_local2])))){
_local1++;
} else {
if ((((this[_local2] is String)) && ((this[_local2] == "")))){
_local1++;
};
};
_local3++;
};
if (_local1 == fields.length){
return (true);
};
return (false);
}
public function resetTimestamp(_arg1:Number=NaN):void{
if (!isNaN(_arg1)){
_timespan = _arg1;
};
_creation = null;
_expiration = null;
_timestamp(_timespan);
}
protected function update():void{
resetTimestamp();
if (proxy){
proxy.update(name, toSharedObject());
};
}
public function reset():void{
var _local1:String;
var _local2:int;
while (_local2 < fields.length) {
_local1 = fields[_local2];
if ((this[_local1] is Number)){
this[_local1] = NaN;
} else {
if ((this[_local1] is String)){
this[_local1] = "";
};
};
_local2++;
};
resetTimestamp();
update();
}
public function fromSharedObject(_arg1:Object):void{
var _local2:String;
var _local3:int = fields.length;
var _local4:int;
while (_local4 < _local3) {
_local2 = fields[_local4];
if (_arg1[_local2]){
this[_local2] = _arg1[_local2];
};
_local4++;
};
if (_arg1.creation){
this.creation = _arg1.creation;
};
if (_arg1.expiration){
this.expiration = _arg1.expiration;
};
}
private function _timestamp(_arg1:Number):void{
creation = new Date();
_timespan = _arg1;
if (_arg1 > 0){
expiration = new Date((creation.valueOf() + _arg1));
};
}
public function isExpired():Boolean{
var _local1:Date = new Date();
var _local2:Number = (expiration.valueOf() - _local1.valueOf());
if (_local2 <= 0){
return (true);
};
return (false);
}
public function set expiration(_arg1:Date):void{
_expiration = _arg1;
}
public function get creation():Date{
return (_creation);
}
public function valueOf():String{
var _local2:String;
var _local3:*;
var _local4:Array;
var _local1:Array = [];
var _local5 = "";
var _local6:int;
while (_local6 < fields.length) {
_local2 = fields[_local6];
_local3 = this[_local2];
if ((_local3 is String)){
if (_local3 == ""){
_local3 = "-";
_local1.push(_local3);
} else {
_local1.push(_local3);
};
} else {
if ((_local3 is Number)){
if (_local3 == 0){
_local1.push(_local3);
} else {
if (isNaN(_local3)){
_local3 = "-";
_local1.push(_local3);
} else {
_local1.push(_local3);
};
};
};
};
_local6++;
};
if (isEmpty()){
return ("-");
};
return (("" + _local1.join(".")));
}
public function toURLString():String{
return (((inURL + "=") + valueOf()));
}
public function get expiration():Date{
if (_expiration){
return (_expiration);
};
return (new Date((new Date().valueOf() + 1000)));
}
public function toSharedObject():Object{
var _local2:String;
var _local3:*;
var _local1:Object = {};
var _local4:int;
for (;_local4 < fields.length;_local4++) {
_local2 = fields[_local4];
_local3 = this[_local2];
if ((_local3 is String)){
_local1[_local2] = _local3;
} else {
if (_local3 == 0){
_local1[_local2] = _local3;
} else {
if (isNaN(_local3)){
continue;
} else {
_local1[_local2] = _local3;
};
};
};
};
_local1.creation = creation;
_local1.expiration = expiration;
return (_local1);
}
public function toString(_arg1:Boolean=false):String{
var _local3:String;
var _local4:*;
var _local2:Array = [];
var _local5:int = fields.length;
var _local6:int;
for (;_local6 < _local5;_local6++) {
_local3 = fields[_local6];
_local4 = this[_local3];
if ((_local4 is String)){
_local2.push((((_local3 + ": \"") + _local4) + "\""));
} else {
if (_local4 == 0){
_local2.push(((_local3 + ": ") + _local4));
} else {
if (isNaN(_local4)){
continue;
} else {
_local2.push(((_local3 + ": ") + _local4));
};
};
};
};
var _local7 = (((name.toUpperCase() + " {") + _local2.join(", ")) + "}");
if (_arg1){
_local7 = (_local7 + (((" creation:" + creation) + ", expiration:") + expiration));
};
return (_local7);
}
public function set creation(_arg1:Date):void{
_creation = _arg1;
}
}
}//package com.google.analytics.data
Section 38
//UTMK (com.google.analytics.data.UTMK)
package com.google.analytics.data {
public class UTMK extends UTMCookie {
private var _hash:Number;
public function UTMK(_arg1:Number=NaN){
super("utmk", "__utmk", ["hash"]);
this.hash = _arg1;
}
public function set hash(_arg1:Number):void{
_hash = _arg1;
update();
}
public function get hash():Number{
return (_hash);
}
}
}//package com.google.analytics.data
Section 39
//UTMV (com.google.analytics.data.UTMV)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMV extends UTMCookie {
private var _domainHash:Number;
private var _value:String;
public function UTMV(_arg1:Number=NaN, _arg2:String=""){
super("utmv", "__utmv", ["domainHash", "value"], (Timespan.twoyears * 1000));
this.domainHash = _arg1;
this.value = _arg2;
}
public function get value():String{
return (_value);
}
public function get domainHash():Number{
return (_domainHash);
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set value(_arg1:String):void{
_value = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 40
//UTMX (com.google.analytics.data.UTMX)
package com.google.analytics.data {
public class UTMX extends UTMCookie {
private var _value:String;
public function UTMX(){
super("utmx", "__utmx", ["value"], 0);
_value = "-";
}
public function get value():String{
return (_value);
}
public function set value(_arg1:String):void{
_value = _arg1;
}
}
}//package com.google.analytics.data
Section 41
//UTMZ (com.google.analytics.data.UTMZ)
package com.google.analytics.data {
import com.google.analytics.utils.*;
public class UTMZ extends UTMCookie {
private var _campaignTracking:String;
private var _campaignCreation:Number;
private var _responseCount:Number;
private var _domainHash:Number;
private var _campaignSessions:Number;
public static var defaultTimespan:Number = Timespan.sixmonths;
public function UTMZ(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:String=""){
super("utmz", "__utmz", ["domainHash", "campaignCreation", "campaignSessions", "responseCount", "campaignTracking"], (defaultTimespan * 1000));
this.domainHash = _arg1;
this.campaignCreation = _arg2;
this.campaignSessions = _arg3;
this.responseCount = _arg4;
this.campaignTracking = _arg5;
}
public function set responseCount(_arg1:Number):void{
_responseCount = _arg1;
update();
}
public function set domainHash(_arg1:Number):void{
_domainHash = _arg1;
update();
}
public function set campaignCreation(_arg1:Number):void{
_campaignCreation = _arg1;
update();
}
public function get campaignTracking():String{
return (_campaignTracking);
}
public function get campaignSessions():Number{
return (_campaignSessions);
}
public function get domainHash():Number{
return (_domainHash);
}
public function get responseCount():Number{
return (_responseCount);
}
public function get campaignCreation():Number{
return (_campaignCreation);
}
public function set campaignSessions(_arg1:Number):void{
_campaignSessions = _arg1;
update();
}
public function set campaignTracking(_arg1:String):void{
_campaignTracking = _arg1;
update();
}
}
}//package com.google.analytics.data
Section 42
//X10 (com.google.analytics.data.X10)
package com.google.analytics.data {
public class X10 {
private var _delimEnd:String;// = ")"
private var _minimum:int;
private var _delimSet:String;// = "*"
private var _escapeChar:String;// = "'"
private var _delimBegin:String;// = "("
private var _delimNumValue:String;// = "!"
private var _key:String;// = "k"
private var _set:Array;
private var _hasData:int;
private var _escapeCharMap:Object;
private var _projectData:Object;
private var _value:String;// = "v"
public function X10(){
_set = [_key, _value];
super();
_projectData = {};
_escapeCharMap = {};
_escapeCharMap[_escapeChar] = "'0";
_escapeCharMap[_delimEnd] = "'1";
_escapeCharMap[_delimSet] = "'2";
_escapeCharMap[_delimNumValue] = "'3";
_minimum = 1;
}
private function _setInternal(_arg1:Number, _arg2:String, _arg3:Number, _arg4:String):void{
if (!hasProject(_arg1)){
_projectData[_arg1] = {};
};
if (_projectData[_arg1][_arg2] == undefined){
_projectData[_arg1][_arg2] = [];
};
_projectData[_arg1][_arg2][_arg3] = _arg4;
_hasData = (_hasData + 1);
}
private function _renderProject(_arg1:Object):String{
var _local4:int;
var _local5:Array;
var _local2 = "";
var _local3:Boolean;
var _local6:int = _set.length;
_local4 = 0;
while (_local4 < _local6) {
_local5 = _arg1[_set[_local4]];
if (_local5){
if (_local3){
_local2 = (_local2 + _set[_local4]);
};
_local2 = (_local2 + _renderDataType(_local5));
_local3 = false;
} else {
_local3 = true;
};
_local4++;
};
return (_local2);
}
public function hasProject(_arg1:Number):Boolean{
return (_projectData[_arg1]);
}
public function clearKey(_arg1:Number):void{
_clearInternal(_arg1, _key);
}
private function _renderDataType(_arg1:Array):String{
var _local3:String;
var _local4:int;
var _local2:Array = [];
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1[_local4] != undefined){
_local3 = "";
if (((!((_local4 == _minimum))) && ((_arg1[(_local4 - 1)] == undefined)))){
_local3 = (_local3 + _local4.toString());
_local3 = (_local3 + _delimNumValue);
};
_local3 = (_local3 + _escapeExtensibleValue(_arg1[_local4]));
_local2.push(_local3);
};
_local4++;
};
return (((_delimBegin + _local2.join(_delimSet)) + _delimEnd));
}
public function getKey(_arg1:Number, _arg2:Number):String{
return ((_getInternal(_arg1, _key, _arg2) as String));
}
public function hasData():Boolean{
return ((_hasData > 0));
}
public function renderMergedUrlString(_arg1:X10=null):String{
var _local3:String;
if (!_arg1){
return (renderUrlString());
};
var _local2:Array = [_arg1.renderUrlString()];
for (_local3 in _projectData) {
if (((hasProject(Number(_local3))) && (!(_arg1.hasProject(Number(_local3)))))){
_local2.push((_local3 + _renderProject(_projectData[_local3])));
};
};
return (_local2.join(""));
}
public function setValue(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
if (((((!((Math.round(_arg3) == _arg3))) || (isNaN(_arg3)))) || ((_arg3 == Infinity)))){
return (false);
};
_setInternal(_arg1, _value, _arg2, _arg3.toString());
return (true);
}
public function renderUrlString():String{
var _local2:String;
var _local1:Array = [];
for (_local2 in _projectData) {
if (hasProject(Number(_local2))){
_local1.push((_local2 + _renderProject(_projectData[_local2])));
};
};
return (_local1.join(""));
}
private function _getInternal(_arg1:Number, _arg2:String, _arg3:Number):Object{
if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){
return (_projectData[_arg1][_arg2][_arg3]);
};
return (undefined);
}
public function setKey(_arg1:Number, _arg2:Number, _arg3:String):Boolean{
_setInternal(_arg1, _key, _arg2, _arg3);
return (true);
}
public function clearValue(_arg1:Number):void{
_clearInternal(_arg1, _value);
}
private function _clearInternal(_arg1:Number, _arg2:String):void{
var _local3:Boolean;
var _local4:int;
var _local5:int;
if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){
_projectData[_arg1][_arg2] = undefined;
_local3 = true;
_local5 = _set.length;
_local4 = 0;
while (_local4 < _local5) {
if (_projectData[_arg1][_set[_local4]] != undefined){
_local3 = false;
break;
};
_local4++;
};
if (_local3){
_projectData[_arg1] = undefined;
_hasData = (_hasData - 1);
};
};
}
public function getValue(_arg1:Number, _arg2:Number){
var _local3:* = _getInternal(_arg1, _value, _arg2);
if (_local3 == null){
return (null);
};
return (Number(_local3));
}
private function _escapeExtensibleValue(_arg1:String):String{
var _local3:int;
var _local4:String;
var _local5:String;
var _local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
_local5 = _escapeCharMap[_local4];
if (_local5){
_local2 = (_local2 + _local5);
} else {
_local2 = (_local2 + _local4);
};
_local3++;
};
return (_local2);
}
}
}//package com.google.analytics.data
Section 43
//_Style (com.google.analytics.debug._Style)
package com.google.analytics.debug {
import flash.net.*;
import flash.text.*;
public class _Style {
public var failureColor:uint;
public var borderColor:uint;
public var backgroundColor:uint;
private var _sheet:StyleSheet;
public var roundedCorner:uint;
public var warningColor:uint;
public var infoColor:uint;
public var alertColor:uint;
public var successColor:uint;
private var _loader:URLLoader;
private var _defaultSheet:String;
public function _Style(){
_sheet = new StyleSheet();
_loader = new URLLoader();
_init();
}
private function _parseSheet(_arg1:String):void{
_sheet.parseCSS(_arg1);
}
public function get sheet():StyleSheet{
return (_sheet);
}
private function _init():void{
_defaultSheet = "";
_defaultSheet = (_defaultSheet + "a{text-decoration: underline;}\n");
_defaultSheet = (_defaultSheet + ".uiLabel{color: #000000;font-family: Arial;font-size: 12;margin-left: 2;margin-right: 2;}\n");
_defaultSheet = (_defaultSheet + ".uiWarning{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlert{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiInfo{color: #000000;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiSuccess{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiFailure{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlertAction{color: #ffffff;text-align: center;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + ".uiAlertTitle{color: #ffffff;font-family: Arial;font-size: 16;font-weight: bold;margin-left: 6;margin-right: 6;}\n");
_defaultSheet = (_defaultSheet + "\n");
roundedCorner = 6;
backgroundColor = 0xCCCCCC;
borderColor = 0x555555;
infoColor = 16777113;
alertColor = 0xFFCC00;
warningColor = 0xCC0000;
successColor = 0xFF00;
failureColor = 0xFF0000;
_parseSheet(_defaultSheet);
}
}
}//package com.google.analytics.debug
Section 44
//Alert (com.google.analytics.debug.Alert)
package com.google.analytics.debug {
import flash.events.*;
public class Alert extends Label {
public var autoClose:Boolean;// = true
public var actionOnNextLine:Boolean;// = true
private var _actions:Array;
public function Alert(_arg1:String, _arg2:Array, _arg3:String="uiAlert", _arg4:uint=0, _arg5:Align=null, _arg6:Boolean=false, _arg7:Boolean=true){
if (_arg4 == 0){
_arg4 = Style.alertColor;
};
if (_arg5 == null){
_arg5 = Align.center;
};
super(_arg1, _arg3, _arg4, _arg5, _arg6);
this.selectable = true;
super.mouseChildren = true;
this.buttonMode = true;
this.mouseEnabled = true;
this.useHandCursor = true;
this.actionOnNextLine = _arg7;
_actions = [];
var _local8:int;
while (_local8 < _arg2.length) {
_arg2[_local8].container = this;
_actions.push(_arg2[_local8]);
_local8++;
};
}
private function _defineActions():void{
var _local3:AlertAction;
var _local1 = "";
if (actionOnNextLine){
_local1 = (_local1 + "\n");
} else {
_local1 = (_local1 + " |");
};
_local1 = (_local1 + " ");
var _local2:Array = [];
var _local4:int;
while (_local4 < _actions.length) {
_local3 = _actions[_local4];
_local2.push((((("<a href=\"event:" + _local3.activator) + "\">") + _local3.name) + "</a>"));
_local4++;
};
_local1 = (_local1 + _local2.join(" | "));
appendText(_local1, "uiAlertAction");
}
protected function isValidAction(_arg1:String):Boolean{
var _local2:int;
while (_local2 < _actions.length) {
if (_arg1 == _actions[_local2].activator){
return (true);
};
_local2++;
};
return (false);
}
override protected function layout():void{
super.layout();
_defineActions();
}
protected function getAction(_arg1:String):AlertAction{
var _local2:int;
while (_local2 < _actions.length) {
if (_arg1 == _actions[_local2].activator){
return (_actions[_local2]);
};
_local2++;
};
return (null);
}
protected function spaces(_arg1:int):String{
var _local2 = "";
var _local3 = " ";
var _local4:int;
while (_local4 < (_arg1 + 1)) {
_local2 = (_local2 + _local3);
_local4++;
};
return (_local2);
}
override public function onLink(_arg1:TextEvent):void{
var _local2:AlertAction;
if (isValidAction(_arg1.text)){
_local2 = getAction(_arg1.text);
if (_local2){
_local2.execute();
};
};
if (autoClose){
close();
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 45
//AlertAction (com.google.analytics.debug.AlertAction)
package com.google.analytics.debug {
public class AlertAction {
public var container:Alert;
private var _callback;
public var activator:String;
public var name:String;
public function AlertAction(_arg1:String, _arg2:String, _arg3){
this.name = _arg1;
this.activator = _arg2;
_callback = _arg3;
}
public function execute():void{
if (_callback){
if ((_callback is Function)){
(_callback as Function)();
} else {
if ((_callback is String)){
var _local1 = container;
_local1[_callback]();
};
};
};
}
}
}//package com.google.analytics.debug
Section 46
//Align (com.google.analytics.debug.Align)
package com.google.analytics.debug {
public class Align {
private var _value:int;
private var _name:String;
public static const bottomRight:Align = new Align(18, "bottomRight");
;
public static const right:Align = new Align(16, "right");
;
public static const left:Align = new Align(32, "left");
;
public static const topRight:Align = new Align(17, "topRight");
;
public static const bottom:Align = new Align(2, "bottom");
;
public static const bottomLeft:Align = new Align(34, "bottomLeft");
;
public static const topLeft:Align = new Align(33, "topLeft");
;
public static const center:Align = new Align(0x0100, "center");
;
public static const none:Align = new Align(0, "none");
;
public static const top:Align = new Align(1, "top");
;
public function Align(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.debug
Section 47
//Background (com.google.analytics.debug.Background)
package com.google.analytics.debug {
import flash.display.*;
public class Background {
public static function drawRounded(_arg1, _arg2:Graphics, _arg3:uint=0, _arg4:uint=0):void{
var _local5:uint;
var _local6:uint;
var _local7:uint = Style.roundedCorner;
if ((((_arg3 > 0)) && ((_arg4 > 0)))){
_local5 = _arg3;
_local6 = _arg4;
} else {
_local5 = _arg1.width;
_local6 = _arg1.height;
};
if (((_arg1.stickToEdge) && (!((_arg1.alignement == Align.none))))){
switch (_arg1.alignement){
case Align.top:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, _local7);
break;
case Align.topLeft:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, 0, _local7);
break;
case Align.topRight:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, 0);
break;
case Align.bottom:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, _local7, 0, 0);
break;
case Align.bottomLeft:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, 0);
break;
case Align.bottomRight:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, 0, 0);
break;
case Align.left:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, _local7);
break;
case Align.right:
_arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, _local7, 0);
break;
case Align.center:
_arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7);
break;
};
} else {
_arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7);
};
}
}
}//package com.google.analytics.debug
Section 48
//Debug (com.google.analytics.debug.Debug)
package com.google.analytics.debug {
import flash.events.*;
import flash.ui.*;
public class Debug extends Label {
private var _lines:Array;
private var _preferredForcedWidth:uint;// = 540
private var _linediff:int;// = 0
public var maxLines:uint;// = 16
public static var count:uint;
public function Debug(_arg1:uint=0, _arg2:Align=null, _arg3:Boolean=false){
if (_arg2 == null){
_arg2 = Align.bottom;
};
super("", "uiLabel", _arg1, _arg2, _arg3);
this.name = ("Debug" + count++);
_lines = [];
selectable = true;
addEventListener(KeyboardEvent.KEY_DOWN, onKey);
}
public function writeBold(_arg1:String):void{
write(_arg1, true);
}
private function _getLinesToDisplay(_arg1:int=0):Array{
var _local2:Array;
var _local3:uint;
var _local4:uint;
if ((_lines.length - 1) > maxLines){
if ((_linediff <= 0)){
_linediff = (_linediff + _arg1);
} else {
if ((((_linediff > 0)) && ((_arg1 < 0)))){
_linediff = (_linediff + _arg1);
};
};
_local3 = ((_lines.length - maxLines) + _linediff);
_local4 = (_local3 + maxLines);
_local2 = _lines.slice(_local3, _local4);
} else {
_local2 = _lines;
};
return (_local2);
}
private function onKey(_arg1:KeyboardEvent=null):void{
var _local2:Array;
switch (_arg1.keyCode){
case Keyboard.DOWN:
_local2 = _getLinesToDisplay(1);
break;
case Keyboard.UP:
_local2 = _getLinesToDisplay(-1);
break;
default:
_local2 = null;
};
if (_local2 == null){
return;
};
text = _local2.join("\n");
}
override public function get forcedWidth():uint{
if (this.parent){
if (UISprite(this.parent).forcedWidth > _preferredForcedWidth){
return (_preferredForcedWidth);
};
return (UISprite(this.parent).forcedWidth);
} else {
};
return (!NULL!);
}
public function write(_arg1:String, _arg2:Boolean=false):void{
var _local3:Array;
if (_arg1.indexOf("") > -1){
_local3 = _arg1.split("\n");
} else {
_local3 = [_arg1];
};
var _local4 = "";
var _local5 = "";
if (_arg2){
_local4 = "<b>";
_local5 = "</b>";
};
var _local6:int;
while (_local6 < _local3.length) {
_lines.push(((_local4 + _local3[_local6]) + _local5));
_local6++;
};
var _local7:Array = _getLinesToDisplay();
text = _local7.join("\n");
}
public function close():void{
dispose();
}
override protected function dispose():void{
removeEventListener(KeyboardEvent.KEY_DOWN, onKey);
super.dispose();
}
}
}//package com.google.analytics.debug
Section 49
//DebugConfiguration (com.google.analytics.debug.DebugConfiguration)
package com.google.analytics.debug {
import com.google.analytics.core.*;
import flash.net.*;
import flash.utils.*;
public class DebugConfiguration {
public var showHideKey:Number;// = 32
private var _mode:VisualDebugMode;
private var _verbose:Boolean;// = false
public var destroyKey:Number;// = 8
public var GIFRequests:Boolean;// = false
public var showInfos:Boolean;// = true
public var infoTimeout:Number;// = 1000
public var minimizedOnStart:Boolean;// = false
private var _active:Boolean;// = false
public var traceOutput:Boolean;// = false
public var layout:ILayout;
public var warningTimeout:Number;// = 1500
public var javascript:Boolean;// = false
public var showWarnings:Boolean;// = true
private var _visualInitialized:Boolean;// = false
public function DebugConfiguration(){
_mode = VisualDebugMode.basic;
super();
}
public function get verbose():Boolean{
return (_verbose);
}
public function set verbose(_arg1:Boolean):void{
_verbose = _arg1;
}
public function set mode(_arg1):void{
if ((_arg1 is String)){
switch (_arg1){
case "geek":
_arg1 = VisualDebugMode.geek;
break;
case "advanced":
_arg1 = VisualDebugMode.advanced;
break;
case "basic":
default:
_arg1 = VisualDebugMode.basic;
};
};
_mode = _arg1;
}
public function success(_arg1:String):void{
if (layout){
layout.createSuccessAlert(_arg1);
};
if (traceOutput){
trace((("[+] " + _arg1) + " !!"));
};
}
public function get active():Boolean{
return (_active);
}
private function _initializeVisual():void{
if (layout){
layout.init();
_visualInitialized = true;
};
}
private function _destroyVisual():void{
if (((layout) && (_visualInitialized))){
layout.destroy();
};
}
public function warning(_arg1:String, _arg2:VisualDebugMode=null):void{
if (_filter(_arg2)){
return;
};
if (((layout) && (showWarnings))){
layout.createWarning(_arg1);
};
if (traceOutput){
trace((("## " + _arg1) + " ##"));
};
}
private function _filter(_arg1:VisualDebugMode=null):Boolean{
return (((_arg1) && ((int(_arg1) >= int(this.mode)))));
}
public function failure(_arg1:String):void{
if (layout){
layout.createFailureAlert(_arg1);
};
if (traceOutput){
trace((("[-] " + _arg1) + " !!"));
};
}
public function get mode(){
return (_mode);
}
public function set active(_arg1:Boolean):void{
_active = _arg1;
if (_active){
_initializeVisual();
} else {
_destroyVisual();
};
}
protected function trace(_arg1:String):void{
var _local7:Array;
var _local8:int;
var _local2:Array = [];
var _local3 = "";
var _local4 = "";
if (this.mode == VisualDebugMode.geek){
_local3 = (getTimer() + " - ");
_local4 = (new Array(_local3.length).join(" ") + " ");
};
if (_arg1.indexOf("\n") > -1){
_local7 = _arg1.split("\n");
_local8 = 0;
while (_local8 < _local7.length) {
if (_local7[_local8] == ""){
} else {
if (_local8 == 0){
_local2.push((_local3 + _local7[_local8]));
} else {
_local2.push((_local4 + _local7[_local8]));
};
};
_local8++;
};
} else {
_local2.push((_local3 + _arg1));
};
var _local5:int = _local2.length;
var _local6:int;
while (_local6 < _local5) {
trace(_local2[_local6]);
_local6++;
};
}
public function alert(_arg1:String):void{
if (layout){
layout.createAlert(_arg1);
};
if (traceOutput){
trace((("!! " + _arg1) + " !!"));
};
}
public function info(_arg1:String, _arg2:VisualDebugMode=null):void{
if (_filter(_arg2)){
return;
};
if (((layout) && (showInfos))){
layout.createInfo(_arg1);
};
if (traceOutput){
trace(_arg1);
};
}
public function alertGifRequest(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{
if (layout){
layout.createGIFRequestAlert(_arg1, _arg2, _arg3);
};
if (traceOutput){
trace(((">> " + _arg1) + " <<"));
};
}
}
}//package com.google.analytics.debug
Section 50
//FailureAlert (com.google.analytics.debug.FailureAlert)
package com.google.analytics.debug {
public class FailureAlert extends Alert {
public function FailureAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){
var _local4:Align = Align.bottomLeft;
var _local5:Boolean;
var _local6:Boolean;
if (_arg1.verbose){
_arg2 = ((("<u><span class=\"uiAlertTitle\">Failure</span>" + spaces(18)) + "</u>\n\n") + _arg2);
_local4 = Align.center;
_local5 = false;
_local6 = true;
};
super(_arg2, _arg3, "uiFailure", Style.failureColor, _local4, _local5, _local6);
}
}
}//package com.google.analytics.debug
Section 51
//GIFRequestAlert (com.google.analytics.debug.GIFRequestAlert)
package com.google.analytics.debug {
public class GIFRequestAlert extends Alert {
public function GIFRequestAlert(_arg1:String, _arg2:Array){
super(_arg1, _arg2);
}
}
}//package com.google.analytics.debug
Section 52
//ILayout (com.google.analytics.debug.ILayout)
package com.google.analytics.debug {
import flash.display.*;
import com.google.analytics.core.*;
import flash.net.*;
public interface ILayout {
function createAlert(_arg1:String):void;
function addToStage(_arg1:DisplayObject):void;
function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void;
function createWarning(_arg1:String):void;
function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void;
function createInfo(_arg1:String):void;
function createFailureAlert(_arg1:String):void;
function addToPanel(_arg1:String, _arg2:DisplayObject):void;
function init():void;
function createSuccessAlert(_arg1:String):void;
function createVisualDebug():void;
function destroy():void;
function bringToFront(_arg1:DisplayObject):void;
function isAvailable():Boolean;
}
}//package com.google.analytics.debug
Section 53
//Info (com.google.analytics.debug.Info)
package com.google.analytics.debug {
import flash.events.*;
import flash.utils.*;
public class Info extends Label {
private var _timer:Timer;
public function Info(_arg1:String="", _arg2:uint=3000){
super(_arg1, "uiInfo", Style.infoColor, Align.top, true);
if (_arg2 > 0){
_timer = new Timer(_arg2, 1);
_timer.start();
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true);
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
override public function onLink(_arg1:TextEvent):void{
switch (_arg1.text){
case "hide":
close();
break;
};
}
public function onComplete(_arg1:TimerEvent):void{
close();
}
}
}//package com.google.analytics.debug
Section 54
//Label (com.google.analytics.debug.Label)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Label extends UISprite {
private var _color:uint;
private var _background:Shape;
private var _textField:TextField;
public var stickToEdge:Boolean;
private var _text:String;
protected var selectable:Boolean;
private var _tag:String;
public static var count:uint = 0;
public function Label(_arg1:String="", _arg2:String="uiLabel", _arg3:uint=0, _arg4:Align=null, _arg5:Boolean=false){
this.name = ("Label" + count++);
selectable = false;
_background = new Shape();
_textField = new TextField();
_text = _arg1;
_tag = _arg2;
if (_arg4 == null){
_arg4 = Align.none;
};
this.alignement = _arg4;
this.stickToEdge = _arg5;
if (_arg3 == 0){
_arg3 = Style.backgroundColor;
};
_color = _arg3;
_textField.addEventListener(TextEvent.LINK, onLink);
}
public function get tag():String{
return (_tag);
}
private function _draw():void{
var _local1:Graphics = _background.graphics;
_local1.clear();
_local1.beginFill(_color);
var _local2:uint = _textField.width;
var _local3:uint = _textField.height;
if (forcedWidth > 0){
_local2 = forcedWidth;
};
Background.drawRounded(this, _local1, _local2, _local3);
_local1.endFill();
}
public function get text():String{
return (_textField.text);
}
public function appendText(_arg1:String, _arg2:String=""):void{
if (_arg1 == ""){
return;
};
if (_arg2 == ""){
_arg2 = tag;
};
_textField.htmlText = (_textField.htmlText + (((("<span class=\"" + _arg2) + "\">") + _arg1) + "</span>"));
_text = (_text + _arg1);
_draw();
resize();
}
public function set text(_arg1:String):void{
if (_arg1 == ""){
_arg1 = _text;
};
_textField.htmlText = (((("<span class=\"" + tag) + "\">") + _arg1) + "</span>");
_text = _arg1;
_draw();
resize();
}
override protected function layout():void{
_textField.type = TextFieldType.DYNAMIC;
_textField.autoSize = TextFieldAutoSize.LEFT;
_textField.background = false;
_textField.selectable = selectable;
_textField.multiline = true;
_textField.styleSheet = Style.sheet;
this.text = _text;
addChild(_background);
addChild(_textField);
}
public function set tag(_arg1:String):void{
_tag = _arg1;
text = "";
}
public function onLink(_arg1:TextEvent):void{
}
override protected function dispose():void{
_textField.removeEventListener(TextEvent.LINK, onLink);
super.dispose();
}
}
}//package com.google.analytics.debug
Section 55
//Layout (com.google.analytics.debug.Layout)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
import com.google.analytics.core.*;
import flash.net.*;
import com.google.analytics.*;
public class Layout implements ILayout {
private var _display:DisplayObject;
private var _infoQueue:Array;
private var _maxCharPerLine:int;// = 85
private var _hasInfo:Boolean;
private var _warningQueue:Array;
private var _hasDebug:Boolean;
private var _hasWarning:Boolean;
private var _mainPanel:Panel;
private var _GRAlertQueue:Array;
private var _debug:DebugConfiguration;
public var visualDebug:Debug;
private var _hasGRAlert:Boolean;
public function Layout(_arg1:DebugConfiguration, _arg2:DisplayObject){
_display = _arg2;
_debug = _arg1;
_hasWarning = false;
_hasInfo = false;
_hasDebug = false;
_hasGRAlert = false;
_warningQueue = [];
_infoQueue = [];
_GRAlertQueue = [];
}
private function onKey(_arg1:KeyboardEvent=null):void{
switch (_arg1.keyCode){
case _debug.showHideKey:
_mainPanel.visible = !(_mainPanel.visible);
break;
case _debug.destroyKey:
destroy();
break;
};
}
public function createWarning(_arg1:String):void{
if (((_hasWarning) || (!(isAvailable())))){
_warningQueue.push(_arg1);
return;
};
_arg1 = _filterMaxChars(_arg1);
_hasWarning = true;
var _local2:Warning = new Warning(_arg1, _debug.warningTimeout);
addToPanel("analytics", _local2);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearWarning, false, 0, true);
if (_hasDebug){
visualDebug.writeBold(_arg1);
};
}
public function bringToFront(_arg1:DisplayObject):void{
_display.stage.setChildIndex(_arg1, (_display.stage.numChildren - 1));
}
public function createFailureAlert(_arg1:String):void{
var _local2:AlertAction;
if (_debug.verbose){
_arg1 = _filterMaxChars(_arg1);
_local2 = new AlertAction("Close", "close", "close");
} else {
_local2 = new AlertAction("X", "close", "close");
};
var _local3:Alert = new FailureAlert(_debug, _arg1, [_local2]);
addToPanel("analytics", _local3);
if (_hasDebug){
if (_debug.verbose){
_arg1 = _arg1.split("\n").join("");
_arg1 = _filterMaxChars(_arg1, 66);
};
visualDebug.writeBold(_arg1);
};
}
public function init():void{
var _local1 = 10;
var _local2:uint = (_display.stage.stageWidth - (_local1 * 2));
var _local3:uint = (_display.stage.stageHeight - (_local1 * 2));
var _local4:Panel = new Panel("analytics", _local2, _local3);
_local4.alignement = Align.top;
_local4.stickToEdge = false;
_local4.title = ("Google Analytics v" + GATracker.version);
_mainPanel = _local4;
addToStage(_local4);
bringToFront(_local4);
if (_debug.minimizedOnStart){
_mainPanel.onToggle();
};
createVisualDebug();
_display.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey, false, 0, true);
}
public function addToPanel(_arg1:String, _arg2:DisplayObject):void{
var _local4:Panel;
var _local3:DisplayObject = _display.stage.getChildByName(_arg1);
if (_local3){
_local4 = (_local3 as Panel);
_local4.addData(_arg2);
} else {
trace((("panel \"" + _arg1) + "\" not found"));
};
}
private function _clearInfo(_arg1:Event):void{
_hasInfo = false;
if (_infoQueue.length > 0){
createInfo(_infoQueue.shift());
};
}
private function _filterMaxChars(_arg1:String, _arg2:int=0):String{
var _local6:String;
var _local3 = "\n";
var _local4:Array = [];
var _local5:Array = _arg1.split(_local3);
if (_arg2 == 0){
_arg2 = _maxCharPerLine;
};
var _local7:int;
while (_local7 < _local5.length) {
_local6 = _local5[_local7];
while (_local6.length > _arg2) {
_local4.push(_local6.substr(0, _arg2));
_local6 = _local6.substring(_arg2);
};
_local4.push(_local6);
_local7++;
};
return (_local4.join(_local3));
}
private function _clearGRAlert(_arg1:Event):void{
_hasGRAlert = false;
if (_GRAlertQueue.length > 0){
createGIFRequestAlert.apply(this, _GRAlertQueue.shift());
};
}
public function createSuccessAlert(_arg1:String):void{
var _local2:AlertAction;
if (_debug.verbose){
_arg1 = _filterMaxChars(_arg1);
_local2 = new AlertAction("Close", "close", "close");
} else {
_local2 = new AlertAction("X", "close", "close");
};
var _local3:Alert = new SuccessAlert(_debug, _arg1, [_local2]);
addToPanel("analytics", _local3);
if (_hasDebug){
if (_debug.verbose){
_arg1 = _arg1.split("\n").join("");
_arg1 = _filterMaxChars(_arg1, 66);
};
visualDebug.writeBold(_arg1);
};
}
public function isAvailable():Boolean{
return (!((_display.stage == null)));
}
public function createAlert(_arg1:String):void{
_arg1 = _filterMaxChars(_arg1);
var _local2:Alert = new Alert(_arg1, [new AlertAction("Close", "close", "close")]);
addToPanel("analytics", _local2);
if (_hasDebug){
visualDebug.writeBold(_arg1);
};
}
public function createInfo(_arg1:String):void{
if (((_hasInfo) || (!(isAvailable())))){
_infoQueue.push(_arg1);
return;
};
_arg1 = _filterMaxChars(_arg1);
_hasInfo = true;
var _local2:Info = new Info(_arg1, _debug.infoTimeout);
addToPanel("analytics", _local2);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearInfo, false, 0, true);
if (_hasDebug){
visualDebug.write(_arg1);
};
}
public function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{
var message = _arg1;
var request = _arg2;
var ref = _arg3;
if (_hasGRAlert){
_GRAlertQueue.push([message, request, ref]);
return;
};
_hasGRAlert = true;
var f:Function = function ():void{
ref.sendRequest(request);
};
message = _filterMaxChars(message);
var gra:GIFRequestAlert = new GIFRequestAlert(message, [new AlertAction("OK", "ok", f), new AlertAction("Cancel", "cancel", "close")]);
addToPanel("analytics", gra);
gra.addEventListener(Event.REMOVED_FROM_STAGE, _clearGRAlert, false, 0, true);
if (_hasDebug){
if (_debug.verbose){
message = message.split("\n").join("");
message = _filterMaxChars(message, 66);
};
visualDebug.write(message);
};
}
public function createVisualDebug():void{
if (!visualDebug){
visualDebug = new Debug();
visualDebug.alignement = Align.bottom;
visualDebug.stickToEdge = true;
addToPanel("analytics", visualDebug);
_hasDebug = true;
};
}
public function addToStage(_arg1:DisplayObject):void{
_display.stage.addChild(_arg1);
}
private function _clearWarning(_arg1:Event):void{
_hasWarning = false;
if (_warningQueue.length > 0){
createWarning(_warningQueue.shift());
};
}
public function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void{
var _local4:Panel = new Panel(_arg1, _arg2, _arg3);
_local4.alignement = Align.center;
_local4.stickToEdge = false;
addToStage(_local4);
bringToFront(_local4);
}
public function destroy():void{
_mainPanel.close();
_debug.layout = null;
}
}
}//package com.google.analytics.debug
Section 56
//Margin (com.google.analytics.debug.Margin)
package com.google.analytics.debug {
public class Margin {
public var top:int;
public var left:int;
public var bottom:int;
public var right:int;
public function Margin(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){
this.top = _arg1;
this.bottom = _arg2;
this.left = _arg3;
this.right = _arg4;
}
}
}//package com.google.analytics.debug
Section 57
//Panel (com.google.analytics.debug.Panel)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
public class Panel extends UISprite {
private var _savedH:uint;
private var _data:UISprite;
private var _mask:Sprite;
private var _background:Shape;
private var _savedW:uint;
private var _stickToEdge:Boolean;
private var _border:Shape;
private var _borderColor:uint;
protected var baseAlpha:Number;
private var _backgroundColor:uint;
private var _title:Label;
private var _colapsed:Boolean;
private var _name:String;
public function Panel(_arg1:String, _arg2:uint, _arg3:uint, _arg4:uint=0, _arg5:uint=0, _arg6:Number=0.3, _arg7:Align=null, _arg8:Boolean=false){
_name = _arg1;
this.name = _arg1;
this.mouseEnabled = false;
_colapsed = false;
forcedWidth = _arg2;
forcedHeight = _arg3;
this.baseAlpha = _arg6;
_background = new Shape();
_data = new UISprite();
_data.forcedWidth = _arg2;
_data.forcedHeight = _arg3;
_data.mouseEnabled = false;
_title = new Label(_arg1, "uiLabel", 0xFFFFFF, Align.topLeft, _arg8);
_title.buttonMode = true;
_title.margin.top = 0.6;
_title.margin.left = 0.6;
_title.addEventListener(MouseEvent.CLICK, onToggle);
_title.mouseChildren = false;
_border = new Shape();
_mask = new Sprite();
_mask.useHandCursor = false;
_mask.mouseEnabled = false;
_mask.mouseChildren = false;
if (_arg7 == null){
_arg7 = Align.none;
};
this.alignement = _arg7;
this.stickToEdge = _arg8;
if (_arg4 == 0){
_arg4 = Style.backgroundColor;
};
_backgroundColor = _arg4;
if (_arg5 == 0){
_arg5 = Style.borderColor;
};
_borderColor = _arg5;
}
public function get stickToEdge():Boolean{
return (_stickToEdge);
}
public function onToggle(_arg1:MouseEvent=null):void{
if (_colapsed){
_data.visible = true;
} else {
_data.visible = false;
};
_colapsed = !(_colapsed);
_update();
resize();
}
public function set stickToEdge(_arg1:Boolean):void{
_stickToEdge = _arg1;
_title.stickToEdge = _arg1;
}
override protected function dispose():void{
_title.removeEventListener(MouseEvent.CLICK, onToggle);
super.dispose();
}
private function _draw():void{
var _local1:uint;
var _local2:uint;
if (((_savedW) && (_savedH))){
forcedWidth = _savedW;
forcedHeight = _savedH;
};
if (!_colapsed){
_local1 = forcedWidth;
_local2 = forcedHeight;
} else {
_local1 = _title.width;
_local2 = _title.height;
_savedW = forcedWidth;
_savedH = forcedHeight;
forcedWidth = _local1;
forcedHeight = _local2;
};
var _local3:Graphics = _background.graphics;
_local3.clear();
_local3.beginFill(_backgroundColor);
Background.drawRounded(this, _local3, _local1, _local2);
_local3.endFill();
var _local4:Graphics = _data.graphics;
_local4.clear();
_local4.beginFill(_backgroundColor, 0);
Background.drawRounded(this, _local4, _local1, _local2);
_local4.endFill();
var _local5:Graphics = _border.graphics;
_local5.clear();
_local5.lineStyle(0.1, _borderColor);
Background.drawRounded(this, _local5, _local1, _local2);
_local5.endFill();
var _local6:Graphics = _mask.graphics;
_local6.clear();
_local6.beginFill(_backgroundColor);
Background.drawRounded(this, _local6, (_local1 + 1), (_local2 + 1));
_local6.endFill();
}
public function get title():String{
return (_title.text);
}
private function _update():void{
_draw();
if (baseAlpha < 1){
_background.alpha = baseAlpha;
_border.alpha = baseAlpha;
};
}
public function addData(_arg1:DisplayObject):void{
_data.addChild(_arg1);
}
override protected function layout():void{
_update();
addChild(_background);
addChild(_data);
addChild(_title);
addChild(_border);
addChild(_mask);
mask = _mask;
}
public function set title(_arg1:String):void{
_title.text = _arg1;
}
public function close():void{
dispose();
if (parent != null){
parent.removeChild(this);
};
}
}
}//package com.google.analytics.debug
Section 58
//Style (com.google.analytics.debug.Style)
package com.google.analytics.debug {
public const Style:_Style = new _Style();
}//package com.google.analytics.debug
Section 59
//SuccessAlert (com.google.analytics.debug.SuccessAlert)
package com.google.analytics.debug {
public class SuccessAlert extends Alert {
public function SuccessAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){
var _local4:Align = Align.bottomLeft;
var _local5:Boolean;
var _local6:Boolean;
if (_arg1.verbose){
_arg2 = ((("<u><span class=\"uiAlertTitle\">Success</span>" + spaces(18)) + "</u>\n\n") + _arg2);
_local4 = Align.center;
_local5 = false;
_local6 = true;
};
super(_arg2, _arg3, "uiSuccess", Style.successColor, _local4, _local5, _local6);
}
}
}//package com.google.analytics.debug
Section 60
//UISprite (com.google.analytics.debug.UISprite)
package com.google.analytics.debug {
import flash.display.*;
import flash.events.*;
public class UISprite extends Sprite {
private var _forcedWidth:uint;
public var margin:Margin;
protected var alignTarget:DisplayObject;
protected var listenResize:Boolean;
public var alignement:Align;
private var _forcedHeight:uint;
public function UISprite(_arg1:DisplayObject=null){
listenResize = false;
alignement = Align.none;
this.alignTarget = _arg1;
margin = new Margin();
addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
addEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage);
}
public function get forcedHeight():uint{
if (_forcedHeight){
return (_forcedHeight);
};
return (height);
}
private function _onAddedToStage(_arg1:Event):void{
layout();
resize();
}
protected function dispose():void{
var _local1:DisplayObject;
var _local2:int;
while (_local2 < numChildren) {
_local1 = getChildAt(_local2);
if (_local1){
removeChild(_local1);
};
_local2++;
};
}
public function set forcedHeight(_arg1:uint):void{
_forcedHeight = _arg1;
}
public function set forcedWidth(_arg1:uint):void{
_forcedWidth = _arg1;
}
protected function layout():void{
}
public function get forcedWidth():uint{
if (_forcedWidth){
return (_forcedWidth);
};
return (width);
}
public function alignTo(_arg1:Align, _arg2:DisplayObject=null):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:UISprite;
if (_arg2 == null){
if ((parent is Stage)){
_arg2 = this.stage;
} else {
_arg2 = parent;
};
};
if (_arg2 == this.stage){
if (this.stage == null){
return;
};
_local3 = this.stage.stageHeight;
_local4 = this.stage.stageWidth;
_local5 = 0;
_local6 = 0;
} else {
_local7 = (_arg2 as UISprite);
if (_local7.forcedHeight){
_local3 = _local7.forcedHeight;
} else {
_local3 = _local7.height;
};
if (_local7.forcedWidth){
_local4 = _local7.forcedWidth;
} else {
_local4 = _local7.width;
};
_local5 = 0;
_local6 = 0;
};
switch (_arg1){
case Align.top:
x = ((_local4 / 2) - (forcedWidth / 2));
y = (_local6 + margin.top);
break;
case Align.bottom:
x = ((_local4 / 2) - (forcedWidth / 2));
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
case Align.left:
x = (_local5 + margin.left);
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.right:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.center:
x = ((_local4 / 2) - (forcedWidth / 2));
y = ((_local3 / 2) - (forcedHeight / 2));
break;
case Align.topLeft:
x = (_local5 + margin.left);
y = (_local6 + margin.top);
break;
case Align.topRight:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = (_local6 + margin.top);
break;
case Align.bottomLeft:
x = (_local5 + margin.left);
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
case Align.bottomRight:
x = (((_local5 + _local4) - forcedWidth) - margin.right);
y = (((_local6 + _local3) - forcedHeight) - margin.bottom);
break;
};
if (((!(listenResize)) && (!((_arg1 == Align.none))))){
_arg2.addEventListener(Event.RESIZE, onResize, false, 0, true);
listenResize = true;
};
this.alignement = _arg1;
this.alignTarget = _arg2;
}
private function _onRemovedFromStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
removeEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage);
dispose();
}
public function resize():void{
if (alignement != Align.none){
alignTo(alignement, alignTarget);
};
}
protected function onResize(_arg1:Event):void{
resize();
}
}
}//package com.google.analytics.debug
Section 61
//Warning (com.google.analytics.debug.Warning)
package com.google.analytics.debug {
import flash.events.*;
import flash.utils.*;
public class Warning extends Label {
private var _timer:Timer;
public function Warning(_arg1:String="", _arg2:uint=3000){
super(_arg1, "uiWarning", Style.warningColor, Align.top, false);
margin.top = 32;
if (_arg2 > 0){
_timer = new Timer(_arg2, 1);
_timer.start();
_timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true);
};
}
public function close():void{
if (parent != null){
parent.removeChild(this);
};
}
override public function onLink(_arg1:TextEvent):void{
switch (_arg1.text){
case "hide":
close();
break;
};
}
public function onComplete(_arg1:TimerEvent):void{
close();
}
}
}//package com.google.analytics.debug
Section 62
//VisualDebugMode (com.google.analytics.debug.VisualDebugMode)
package com.google.analytics.debug {
public class VisualDebugMode {
private var _value:int;
private var _name:String;
public static const advanced:VisualDebugMode = new VisualDebugMode(1, "advanced");
;
public static const geek:VisualDebugMode = new VisualDebugMode(2, "geek");
;
public static const basic:VisualDebugMode = new VisualDebugMode(0, "basic");
;
public function VisualDebugMode(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.debug
Section 63
//Item (com.google.analytics.ecommerce.Item)
package com.google.analytics.ecommerce {
import com.google.analytics.utils.*;
public class Item {
private var _price:String;
private var _id:String;
private var _sku:String;
private var _category:String;
private var _quantity:String;
private var _name:String;
public function Item(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String){
this._id = _arg1;
this._sku = _arg2;
this._name = _arg3;
this._category = _arg4;
this._price = _arg5;
this._quantity = _arg6;
}
public function set sku(_arg1:String):void{
_sku = _arg1;
}
public function get price():String{
return (_price);
}
public function get name():String{
return (_name);
}
public function get quantity():String{
return (_quantity);
}
public function set name(_arg1:String):void{
_name = _arg1;
}
public function set price(_arg1:String):void{
_price = _arg1;
}
public function get id():String{
return (_id);
}
public function get sku():String{
return (_sku);
}
public function set quantity(_arg1:String):void{
_quantity = _arg1;
}
public function toGifParams():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
_local1.post = ["utmt", "utmtid", "utmipc", "utmipn", "utmiva", "utmipr", "utmiqt"];
_local1.utmt = "item";
_local1.utmtid = _id;
_local1.utmipc = _sku;
_local1.utmipn = _name;
_local1.utmiva = _category;
_local1.utmipr = _price;
_local1.utmiqt = _quantity;
return (_local1);
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function set category(_arg1:String):void{
_category = _arg1;
}
public function get category():String{
return (_category);
}
}
}//package com.google.analytics.ecommerce
Section 64
//Transaction (com.google.analytics.ecommerce.Transaction)
package com.google.analytics.ecommerce {
import com.google.analytics.utils.*;
public class Transaction {
private var _items:Array;
private var _total:String;
private var _vars:Variables;
private var _shipping:String;
private var _city:String;
private var _state:String;
private var _country:String;
private var _tax:String;
private var _affiliation:String;
private var _id:String;
public function Transaction(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String, _arg7:String, _arg8:String){
this._id = _arg1;
this._affiliation = _arg2;
this._total = _arg3;
this._tax = _arg4;
this._shipping = _arg5;
this._city = _arg6;
this._state = _arg7;
this._country = _arg8;
_items = new Array();
}
public function get total():String{
return (_total);
}
public function getItemFromArray(_arg1:Number):Item{
return (_items[_arg1]);
}
public function set total(_arg1:String):void{
_total = _arg1;
}
public function getItem(_arg1:String):Item{
var _local2:Number;
_local2 = 0;
while (_local2 < _items.length) {
if (_items[_local2].sku == _arg1){
return (_items[_local2]);
};
_local2++;
};
return (null);
}
public function getItemsLength():Number{
return (_items.length);
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{
var _local6:Item;
_local6 = getItem(_arg1);
if (_local6 == null){
_local6 = new Item(_id, _arg1, _arg2, _arg3, _arg4, _arg5);
_items.push(_local6);
} else {
_local6.name = _arg2;
_local6.category = _arg3;
_local6.price = _arg4;
_local6.quantity = _arg5;
};
}
public function set shipping(_arg1:String):void{
_shipping = _arg1;
}
public function get country():String{
return (_country);
}
public function get state():String{
return (_state);
}
public function set tax(_arg1:String):void{
_tax = _arg1;
}
public function set affiliation(_arg1:String):void{
_affiliation = _arg1;
}
public function set state(_arg1:String):void{
_state = _arg1;
}
public function get id():String{
return (_id);
}
public function get tax():String{
return (_tax);
}
public function toGifParams():Variables{
var _local1:Variables = new Variables();
_local1.URIencode = true;
_local1.utmt = "tran";
_local1.utmtid = id;
_local1.utmtst = affiliation;
_local1.utmtto = total;
_local1.utmttx = tax;
_local1.utmtsp = shipping;
_local1.utmtci = city;
_local1.utmtrg = state;
_local1.utmtco = country;
_local1.post = ["utmtid", "utmtst", "utmtto", "utmttx", "utmtsp", "utmtci", "utmtrg", "utmtco"];
return (_local1);
}
public function get affiliation():String{
return (_affiliation);
}
public function get city():String{
return (_city);
}
public function get shipping():String{
return (_shipping);
}
public function set id(_arg1:String):void{
_id = _arg1;
}
public function set city(_arg1:String):void{
_city = _arg1;
}
public function set country(_arg1:String):void{
_country = _arg1;
}
}
}//package com.google.analytics.ecommerce
Section 65
//AnalyticsEvent (com.google.analytics.events.AnalyticsEvent)
package com.google.analytics.events {
import flash.events.*;
import com.google.analytics.*;
public class AnalyticsEvent extends Event {
public var tracker:AnalyticsTracker;
public static const READY:String = "ready";
public function AnalyticsEvent(_arg1:String, _arg2:AnalyticsTracker, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.tracker = _arg2;
}
override public function clone():Event{
return (new AnalyticsEvent(type, tracker, bubbles, cancelable));
}
}
}//package com.google.analytics.events
Section 66
//AdSenseGlobals (com.google.analytics.external.AdSenseGlobals)
package com.google.analytics.external {
import com.google.analytics.debug.*;
public class AdSenseGlobals extends JavascriptProxy {
private var _gaGlobalVerified:Boolean;// = false
public static var gaGlobal_js:XML = <script>
<![CDATA[
function()
{
try
{
gaGlobal
}
catch(e)
{
gaGlobal = {} ;
}
}
]]>
</script>
;
public function AdSenseGlobals(_arg1:DebugConfiguration){
super(_arg1);
}
public function set vid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.vid", _arg1);
}
public function get hid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.hid"));
}
public function set hid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.hid", _arg1);
}
public function get dh():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.dh"));
}
public function get sid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.sid"));
}
public function get vid():String{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal.vid"));
}
private function _verify():void{
if (!_gaGlobalVerified){
executeBlock(gaGlobal_js);
_gaGlobalVerified = true;
};
}
public function set sid(_arg1:String):void{
if (!isAvailable()){
return;
};
_verify();
setProperty("gaGlobal.sid", _arg1);
}
public function get gaGlobal():Object{
if (!isAvailable()){
return (null);
};
_verify();
return (getProperty("gaGlobal"));
}
}
}//package com.google.analytics.external
Section 67
//HTMLDOM (com.google.analytics.external.HTMLDOM)
package com.google.analytics.external {
import com.google.analytics.debug.*;
public class HTMLDOM extends JavascriptProxy {
private var _referrer:String;
private var _language:String;
private var _host:String;
private var _pathname:String;
private var _location:String;
private var _search:String;
private var _characterSet:String;
private var _title:String;
private var _protocol:String;
private var _colorDepth:String;
public static var cache_properties_js:XML = <script>
<![CDATA[
function()
{
var obj = {};
obj.host = document.location.host;
obj.language = navigator.language ? navigator.language : navigator.browserLanguage;
obj.characterSet = document.characterSet ? document.characterSet : document.charset;
obj.colorDepth = window.screen.colorDepth;
obj.location = document.location.toString();
obj.pathname = document.location.pathname;
obj.protocol = document.location.protocol;
obj.search = document.location.search;
obj.referrer = document.referrer;
obj.title = document.title;
return obj;
}
]]>
</script>
;
public function HTMLDOM(_arg1:DebugConfiguration){
super(_arg1);
}
public function get search():String{
if (_search){
return (_search);
};
if (!isAvailable()){
return (null);
};
_search = getProperty("document.location.search");
return (_search);
}
public function get location():String{
if (_location){
return (_location);
};
if (!isAvailable()){
return (null);
};
_location = getPropertyString("document.location");
return (_location);
}
public function get pathname():String{
if (_pathname){
return (_pathname);
};
if (!isAvailable()){
return (null);
};
_pathname = getProperty("document.location.pathname");
return (_pathname);
}
public function cacheProperties():void{
if (!isAvailable()){
return;
};
var _local1:Object = call(cache_properties_js);
if (_local1){
_host = _local1.host;
_language = _local1.language;
_characterSet = _local1.characterSet;
_colorDepth = _local1.colorDepth;
_location = _local1.location;
_pathname = _local1.pathname;
_protocol = _local1.protocol;
_search = _local1.search;
_referrer = _local1.referrer;
_title = _local1.title;
};
}
public function get language():String{
if (_language){
return (_language);
};
if (!isAvailable()){
return (null);
};
var _local1:String = getProperty("navigator.language");
if (_local1 == null){
_local1 = getProperty("navigator.browserLanguage");
};
_language = _local1;
return (_language);
}
public function get colorDepth():String{
if (_colorDepth){
return (_colorDepth);
};
if (!isAvailable()){
return (null);
};
_colorDepth = getProperty("window.screen.colorDepth");
return (_colorDepth);
}
public function get referrer():String{
if (_referrer){
return (_referrer);
};
if (!isAvailable()){
return (null);
};
_referrer = getProperty("document.referrer");
return (_referrer);
}
public function get protocol():String{
if (_protocol){
return (_protocol);
};
if (!isAvailable()){
return (null);
};
_protocol = getProperty("document.location.protocol");
return (_protocol);
}
public function get host():String{
if (_host){
return (_host);
};
if (!isAvailable()){
return (null);
};
_host = getProperty("document.location.host");
return (_host);
}
public function get characterSet():String{
if (_characterSet){
return (_characterSet);
};
if (!isAvailable()){
return (null);
};
var _local1:String = getProperty("document.characterSet");
if (_local1 == null){
_local1 = getProperty("document.charset");
};
_characterSet = _local1;
return (_characterSet);
}
public function get title():String{
if (_title){
return (_title);
};
if (!isAvailable()){
return (null);
};
_title = getProperty("document.title");
return (_title);
}
}
}//package com.google.analytics.external
Section 68
//JavascriptProxy (com.google.analytics.external.JavascriptProxy)
package com.google.analytics.external {
import com.google.analytics.debug.*;
import flash.system.*;
import flash.external.*;
public class JavascriptProxy {
private var _notAvailableWarning:Boolean;// = true
private var _debug:DebugConfiguration;
public static var setProperty_js:XML = <script>
<![CDATA[
function( path , value )
{
var paths;
var prop;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
prop = paths.pop() ;
}
else
{
paths = [];
prop = path;
}
var target = window ;
var len = paths.length ;
for( var i = 0 ; i < len ; i++ )
{
target = target[ paths[i] ] ;
}
target[ prop ] = value ;
}
]]>
</script>
;
public static var hasProperty_js:XML = <script>
<![CDATA[
function( path )
{
var paths;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
}
else
{
paths = [path];
}
var target = window ;
var len = paths.length ;
for( var i = 0 ; i < len ; i++ )
{
target = target[ paths[i] ] ;
}
if( target )
{
return true;
}
else
{
return false;
}
}
]]>
</script>
;
public static var setPropertyRef_js:XML = <script>
<![CDATA[
function( path , target )
{
var paths;
var prop;
if( path.indexOf(".") > 0 )
{
paths = path.split(".");
prop = paths.pop() ;
}
else
{
paths = [];
prop = path;
}
alert( "paths:"+paths.length+", prop:"+prop );
var targets;
var name;
if( target.indexOf(".") > 0 )
{
targets = target.split(".");
name = targets.pop();
}
else
{
targets = [];
name = target;
}
alert( "targets:"+targets.length+", name:"+name );
var root = window;
var len = paths.length;
for( var i = 0 ; i < len ; i++ )
{
root = root[ paths[i] ] ;
}
var ref = window;
var depth = targets.length;
for( var j = 0 ; j < depth ; j++ )
{
ref = ref[ targets[j] ] ;
}
root[ prop ] = ref[name] ;
}
]]>
</script>
;
public function JavascriptProxy(_arg1:DebugConfiguration){
_debug = _arg1;
}
public function getProperty(_arg1:String){
return (call((_arg1 + ".valueOf")));
}
public function hasProperty(_arg1:String):Boolean{
return (call(hasProperty_js, _arg1));
}
public function setProperty(_arg1:String, _arg2):void{
call(setProperty_js, _arg1, _arg2);
}
public function executeBlock(_arg1:String):void{
var data = _arg1;
if (isAvailable()){
try {
ExternalInterface.call(data);
} catch(e:SecurityError) {
if (_debug.javascript){
_debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML.");
};
} catch(e:Error) {
if (_debug.javascript){
_debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message));
};
};
};
}
public function getPropertyString(_arg1:String):String{
return (call((_arg1 + ".toString")));
}
public function setPropertyByReference(_arg1:String, _arg2:String):void{
call(setPropertyRef_js, _arg1, _arg2);
}
public function call(_arg1:String, ... _args){
var output:String;
var functionName = _arg1;
var args = _args;
if (isAvailable()){
try {
if (((_debug.javascript) && (_debug.verbose))){
output = "";
output = ("Flash->JS: " + functionName);
output = (output + "( ");
if (args.length > 0){
output = (output + args.join(","));
};
output = (output + " )");
_debug.info(output);
};
args.unshift(functionName);
return (ExternalInterface.call.apply(ExternalInterface, args));
} catch(e:SecurityError) {
if (_debug.javascript){
_debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML.");
};
} catch(e:Error) {
if (_debug.javascript){
_debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message));
};
};
};
return (null);
}
public function isAvailable():Boolean{
var _local1:Boolean = ExternalInterface.available;
if (((_local1) && ((Capabilities.playerType == "External")))){
_local1 = false;
};
if (((((!(_local1)) && (_debug.javascript))) && (_notAvailableWarning))){
_debug.warning("ExternalInterface is not available.");
_notAvailableWarning = false;
};
return (_local1);
}
}
}//package com.google.analytics.external
Section 69
//Environment (com.google.analytics.utils.Environment)
package com.google.analytics.utils {
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
import flash.system.*;
public class Environment {
private var _dom:HTMLDOM;
private var _appName:String;
private var _debug:DebugConfiguration;
private var _appVersion:Version;
private var _url:String;
private var _protocol:Protocols;
private var _userAgent:UserAgent;
public function Environment(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:DebugConfiguration=null, _arg5:HTMLDOM=null){
var _local6:Version;
super();
if (_arg2 == ""){
if (isAIR()){
_arg2 = "AIR";
} else {
_arg2 = "Flash";
};
};
if (_arg3 == ""){
_local6 = flashVersion;
} else {
_local6 = Version.fromString(_arg3);
};
_url = _arg1;
_appName = _arg2;
_appVersion = _local6;
_debug = _arg4;
_dom = _arg5;
}
public function isAIR():Boolean{
return ((((playerType == "Desktop")) && ((Security.sandboxType.toString() == "application"))));
}
public function get screenWidth():Number{
return (Capabilities.screenResolutionX);
}
public function get playerType():String{
return (Capabilities.playerType);
}
public function get locationSearch():String{
var _local1:String = _dom.search;
if (_local1){
return (_local1);
};
return ("");
}
public function get protocol():Protocols{
if (!_protocol){
_findProtocol();
};
return (_protocol);
}
public function get flashVersion():Version{
var _local1:Version = Version.fromString(Capabilities.version.split(" ")[1], ",");
return (_local1);
}
public function get userAgent():UserAgent{
if (!_userAgent){
_userAgent = new UserAgent(this, appName, appVersion.toString(4));
};
return (_userAgent);
}
public function get languageEncoding():String{
var _local1:String;
if (System.useCodePage){
_local1 = _dom.characterSet;
if (_local1){
return (_local1);
};
return ("-");
};
return ("UTF-8");
}
public function get appName():String{
return (_appName);
}
public function get screenColorDepth():String{
var _local1:String;
switch (Capabilities.screenColor){
case "bw":
_local1 = "1";
break;
case "gray":
_local1 = "2";
break;
case "color":
default:
_local1 = "24";
};
var _local2:String = _dom.colorDepth;
if (_local2){
_local1 = _local2;
};
return (_local1);
}
private function _findProtocol():void{
var _local4:String;
var _local5:String;
var _local1:Protocols = Protocols.none;
if (_url != ""){
_local4 = _url.toLowerCase();
_local5 = _local4.substr(0, 5);
switch (_local5){
case "file:":
_local1 = Protocols.file;
break;
case "http:":
_local1 = Protocols.HTTP;
break;
case "https":
if (_local4.charAt(5) == ":"){
_local1 = Protocols.HTTPS;
};
break;
default:
_protocol = Protocols.none;
};
};
var _local2:String = _dom.protocol;
var _local3:String = (_local1.toString() + ":").toLowerCase();
if (((((_local2) && (!((_local2 == _local3))))) && (_debug))){
_debug.warning(((("Protocol mismatch: SWF=" + _local3) + ", DOM=") + _local2));
};
_protocol = _local1;
}
public function get locationSWFPath():String{
return (_url);
}
public function get platform():String{
var _local1:String = Capabilities.manufacturer;
return (_local1.split("Adobe ")[1]);
}
public function get operatingSystem():String{
return (Capabilities.os);
}
public function set appName(_arg1:String):void{
_appName = _arg1;
userAgent.applicationProduct = _arg1;
}
function set url(_arg1:String):void{
_url = _arg1;
}
public function get referrer():String{
var _local1:String = _dom.referrer;
if (_local1){
return (_local1);
};
if (protocol == Protocols.file){
return ("localhost");
};
return ("");
}
public function isInHTML():Boolean{
return ((Capabilities.playerType == "PlugIn"));
}
public function get language():String{
var _local1:String = _dom.language;
var _local2:String = Capabilities.language;
if (_local1){
if ((((_local1.length > _local2.length)) && ((_local1.substr(0, _local2.length) == _local2)))){
_local2 = _local1;
};
};
return (_local2);
}
public function get domainName():String{
var _local1:String;
var _local2:String;
var _local3:int;
if ((((protocol == Protocols.HTTP)) || ((protocol == Protocols.HTTPS)))){
_local1 = _url.toLowerCase();
if (protocol == Protocols.HTTP){
_local2 = _local1.split("http://").join("");
} else {
if (protocol == Protocols.HTTPS){
_local2 = _local1.split("https://").join("");
};
};
_local3 = _local2.indexOf("/");
if (_local3 > -1){
_local2 = _local2.substring(0, _local3);
};
return (_local2);
};
if (protocol == Protocols.file){
return ("localhost");
};
return ("");
}
public function set userAgent(_arg1:UserAgent):void{
_userAgent = _arg1;
}
public function set appVersion(_arg1:Version):void{
_appVersion = _arg1;
userAgent.applicationVersion = _arg1.toString(4);
}
public function get screenHeight():Number{
return (Capabilities.screenResolutionY);
}
public function get locationPath():String{
var _local1:String = _dom.pathname;
if (_local1){
return (_local1);
};
return ("");
}
public function get documentTitle():String{
var _local1:String = _dom.title;
if (_local1){
return (_local1);
};
return ("");
}
public function get appVersion():Version{
return (_appVersion);
}
}
}//package com.google.analytics.utils
Section 70
//Protocols (com.google.analytics.utils.Protocols)
package com.google.analytics.utils {
public class Protocols {
private var _value:int;
private var _name:String;
public static const none:Protocols = new Protocols(0, "none");
;
public static const HTTPS:Protocols = new Protocols(3, "HTTPS");
;
public static const file:Protocols = new Protocols(1, "file");
;
public static const HTTP:Protocols = new Protocols(2, "HTTP");
;
public function Protocols(_arg1:int=0, _arg2:String=""){
_value = _arg1;
_name = _arg2;
}
public function valueOf():int{
return (_value);
}
public function toString():String{
return (_name);
}
}
}//package com.google.analytics.utils
Section 71
//Timespan (com.google.analytics.utils.Timespan)
package com.google.analytics.utils {
public class Timespan {
public static var sixmonths:Number = 15768000;
public static var twoyears:Number = 63072000;
public static var thirtyminutes:Number = 1800;
}
}//package com.google.analytics.utils
Section 72
//URL (com.google.analytics.utils.URL)
package com.google.analytics.utils {
public class URL {
private var _url:String;
public function URL(_arg1:String=""){
_url = _arg1.toLowerCase();
}
public function get domain():String{
var _local1:Array;
if (((!((hostName == ""))) && ((hostName.indexOf(".") > -1)))){
_local1 = hostName.split(".");
switch (_local1.length){
case 2:
return (hostName);
case 3:
if (_local1[1] == "co"){
return (hostName);
};
_local1.shift();
return (_local1.join("."));
case 4:
_local1.shift();
return (_local1.join("."));
};
};
return ("");
}
public function get path():String{
var _local1:String = _url;
if (_local1.indexOf("://") > -1){
_local1 = _local1.split("://")[1];
};
if (_local1.indexOf(hostName) == 0){
_local1 = _local1.substr(hostName.length);
};
if (_local1.indexOf("?") > -1){
_local1 = _local1.split("?")[0];
};
if (_local1.charAt(0) != "/"){
_local1 = ("/" + _local1);
};
return (_local1);
}
public function get protocol():Protocols{
var _local1:String = _url.split("://")[0];
switch (_local1){
case "file":
return (Protocols.file);
case "http":
return (Protocols.HTTP);
case "https":
return (Protocols.HTTPS);
default:
return (Protocols.none);
};
}
public function get hostName():String{
var _local1:String = _url;
if (_local1.indexOf("://") > -1){
_local1 = _local1.split("://")[1];
};
if (_local1.indexOf("/") > -1){
_local1 = _local1.split("/")[0];
};
if (_local1.indexOf("?") > -1){
_local1 = _local1.split("?")[0];
};
if ((((protocol == Protocols.file)) || ((protocol == Protocols.none)))){
return ("");
};
return (_local1);
}
public function get subDomain():String{
if (((!((domain == ""))) && (!((domain == hostName))))){
return (hostName.split(("." + domain)).join(""));
};
return ("");
}
public function get search():String{
var _local1:String = _url;
if (_local1.indexOf("://") > -1){
_local1 = _local1.split("://")[1];
};
if (_local1.indexOf(hostName) == 0){
_local1 = _local1.substr(hostName.length);
};
if (_local1.indexOf("?") > -1){
_local1 = _local1.split("?")[1];
} else {
_local1 = "";
};
return (_local1);
}
}
}//package com.google.analytics.utils
Section 73
//UserAgent (com.google.analytics.utils.UserAgent)
package com.google.analytics.utils {
import com.google.analytics.core.*;
import flash.system.*;
public class UserAgent {
private var _localInfo:Environment;
private var _applicationProduct:String;
private var _version:Version;
public static var minimal:Boolean = false;
public function UserAgent(_arg1:Environment, _arg2:String="", _arg3:String=""){
_localInfo = _arg1;
applicationProduct = _arg2;
_version = Version.fromString(_arg3);
}
public function get tamarinProductToken():String{
if (UserAgent.minimal){
return ("");
};
if (System.vmVersion){
return (("Tamarin/" + Utils.trim(System.vmVersion, true)));
};
return ("");
}
public function get applicationVersion():String{
return (_version.toString(2));
}
public function get vendorProductToken():String{
var _local1 = "";
if (_localInfo.isAIR()){
_local1 = (_local1 + "AIR");
} else {
_local1 = (_local1 + "FlashPlayer");
};
_local1 = (_local1 + "/");
_local1 = (_local1 + _version.toString(3));
return (_local1);
}
public function toString():String{
var _local1 = "";
_local1 = (_local1 + applicationProductToken);
if (applicationComment != ""){
_local1 = (_local1 + (" " + applicationComment));
};
if (tamarinProductToken != ""){
_local1 = (_local1 + (" " + tamarinProductToken));
};
if (vendorProductToken != ""){
_local1 = (_local1 + (" " + vendorProductToken));
};
return (_local1);
}
public function get applicationComment():String{
var _local1:Array = [];
_local1.push(_localInfo.platform);
_local1.push(_localInfo.playerType);
if (!UserAgent.minimal){
_local1.push(_localInfo.operatingSystem);
_local1.push(_localInfo.language);
};
if (Capabilities.isDebugger){
_local1.push("DEBUG");
};
if (_local1.length > 0){
return ((("(" + _local1.join("; ")) + ")"));
};
return ("");
}
public function set applicationVersion(_arg1:String):void{
_version = Version.fromString(_arg1);
}
public function get applicationProductToken():String{
var _local1:String = applicationProduct;
if (applicationVersion != ""){
_local1 = (_local1 + ("/" + applicationVersion));
};
return (_local1);
}
public function set applicationProduct(_arg1:String):void{
_applicationProduct = _arg1;
}
public function get applicationProduct():String{
return (_applicationProduct);
}
}
}//package com.google.analytics.utils
Section 74
//Variables (com.google.analytics.utils.Variables)
package com.google.analytics.utils {
import flash.net.*;
public dynamic class Variables {
public var post:Array;
public var URIencode:Boolean;
public var pre:Array;
public var sort:Boolean;// = true
public function Variables(_arg1:String=null, _arg2:Array=null, _arg3:Array=null){
pre = [];
post = [];
super();
if (_arg1){
decode(_arg1);
};
if (_arg2){
this.pre = _arg2;
};
if (_arg3){
this.post = _arg3;
};
}
private function _join(_arg1:Variables):void{
var _local2:String;
if (!_arg1){
return;
};
for (_local2 in _arg1) {
this[_local2] = _arg1[_local2];
};
}
public function join(... _args):void{
var _local2:int = _args.length;
var _local3:int;
while (_local3 < _local2) {
if (!(_args[_local3] is Variables)){
} else {
_join(_args[_local3]);
};
_local3++;
};
}
public function toString():String{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:String;
var _local1:Array = [];
for (_local3 in this) {
_local2 = this[_local3];
if (URIencode){
_local2 = encodeURI(_local2);
};
_local1.push(((_local3 + "=") + _local2));
};
if (sort){
_local1.sort();
};
if (pre.length > 0){
pre.reverse();
_local5 = 0;
while (_local5 < pre.length) {
_local7 = pre[_local5];
_local6 = 0;
while (_local6 < _local1.length) {
_local4 = _local1[_local6];
if (_local4.indexOf(_local7) == 0){
_local1.unshift(_local1.splice(_local6, 1)[0]);
};
_local6++;
};
_local5++;
};
pre.reverse();
};
if (post.length > 0){
_local5 = 0;
while (_local5 < post.length) {
_local8 = post[_local5];
_local6 = 0;
while (_local6 < _local1.length) {
_local4 = _local1[_local6];
if (_local4.indexOf(_local8) == 0){
_local1.push(_local1.splice(_local6, 1)[0]);
};
_local6++;
};
_local5++;
};
};
return (_local1.join("&"));
}
public function decode(_arg1:String):void{
var _local2:Array;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:Array;
if (_arg1 == ""){
return;
};
if (_arg1.charAt(0) == "?"){
_arg1 = _arg1.substr(1, _arg1.length);
};
if (_arg1.indexOf("&") > -1){
_local2 = _arg1.split("&");
} else {
_local2 = [_arg1];
};
var _local7:int;
while (_local7 < _local2.length) {
_local3 = _local2[_local7];
if (_local3.indexOf("=") > -1){
_local6 = _local3.split("=");
_local4 = _local6[0];
_local5 = decodeURI(_local6[1]);
this[_local4] = _local5;
};
_local7++;
};
}
public function toURLVariables():URLVariables{
var _local2:String;
var _local1:URLVariables = new URLVariables();
for (_local2 in this) {
_local1[_local2] = this[_local2];
};
return (_local1);
}
}
}//package com.google.analytics.utils
Section 75
//Version (com.google.analytics.utils.Version)
package com.google.analytics.utils {
public class Version {
private var _revision:uint;
private var _maxBuild:uint;// = 0xFF
private var _maxMinor:uint;// = 15
private var _maxMajor:uint;// = 15
private var _separator:String;// = "."
private var _maxRevision:uint;// = 0xFFFF
private var _build:uint;
private var _major:uint;
private var _minor:uint;
public function Version(_arg1:uint=0, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0){
var _local5:Version;
super();
if ((((((((_arg1 > _maxMajor)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){
_local5 = Version.fromNumber(_arg1);
_arg1 = _local5.major;
_arg2 = _local5.minor;
_arg3 = _local5.build;
_arg4 = _local5.revision;
};
this.major = _arg1;
this.minor = _arg2;
this.build = _arg3;
this.revision = _arg4;
}
public function toString(_arg1:int=0):String{
var _local2:Array;
if ((((_arg1 <= 0)) || ((_arg1 > 4)))){
_arg1 = getFields();
};
switch (_arg1){
case 1:
_local2 = [major];
break;
case 2:
_local2 = [major, minor];
break;
case 3:
_local2 = [major, minor, build];
break;
case 4:
default:
_local2 = [major, minor, build, revision];
};
return (_local2.join(_separator));
}
public function set revision(_arg1:uint):void{
_revision = Math.min(_arg1, _maxRevision);
}
public function get revision():uint{
return (_revision);
}
public function set build(_arg1:uint):void{
_build = Math.min(_arg1, _maxBuild);
}
public function set minor(_arg1:uint):void{
_minor = Math.min(_arg1, _maxMinor);
}
public function get build():uint{
return (_build);
}
public function set major(_arg1:uint):void{
_major = Math.min(_arg1, _maxMajor);
}
public function get minor():uint{
return (_minor);
}
private function getFields():int{
var _local1 = 4;
if (revision == 0){
_local1--;
};
if ((((_local1 == 3)) && ((build == 0)))){
_local1--;
};
if ((((_local1 == 2)) && ((minor == 0)))){
_local1--;
};
return (_local1);
}
public function valueOf():uint{
return (((((major << 28) | (minor << 24)) | (build << 16)) | revision));
}
public function get major():uint{
return (_major);
}
public function equals(_arg1):Boolean{
if (!(_arg1 is Version)){
return (false);
};
if ((((((((_arg1.major == major)) && ((_arg1.minor == minor)))) && ((_arg1.build == build)))) && ((_arg1.revision == revision)))){
return (true);
};
return (false);
}
public static function fromString(_arg1:String="", _arg2:String="."):Version{
var _local4:Array;
var _local3:Version = new (Version);
if ((((_arg1 == "")) || ((_arg1 == null)))){
return (_local3);
};
if (_arg1.indexOf(_arg2) > -1){
_local4 = _arg1.split(_arg2);
_local3.major = parseInt(_local4[0]);
_local3.minor = parseInt(_local4[1]);
_local3.build = parseInt(_local4[2]);
_local3.revision = parseInt(_local4[3]);
} else {
_local3.major = parseInt(_arg1);
};
return (_local3);
}
public static function fromNumber(_arg1:Number=0):Version{
var _local2:Version = new (Version);
if (((((((((((isNaN(_arg1)) || ((_arg1 == 0)))) || ((_arg1 < 0)))) || ((_arg1 == Number.MAX_VALUE)))) || ((_arg1 == Number.POSITIVE_INFINITY)))) || ((_arg1 == Number.NEGATIVE_INFINITY)))){
return (_local2);
};
_local2.major = (_arg1 >>> 28);
_local2.minor = ((_arg1 & 251658240) >>> 24);
_local2.build = ((_arg1 & 0xFF0000) >>> 16);
_local2.revision = (_arg1 & 0xFFFF);
return (_local2);
}
}
}//package com.google.analytics.utils
Section 76
//Bridge (com.google.analytics.v4.Bridge)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
public class Bridge implements GoogleAnalyticsAPI {
private var _debug:DebugConfiguration;
private var _proxy:JavascriptProxy;
private var _jsContainer:String;// = "_GATracker"
private var _hasGATracker:Boolean;// = false
private var _account:String;
private static var _linkTrackingObject_js:XML = <script>
<![CDATA[
function( container , target )
{
var targets ;
var name ;
if( target.indexOf(".") > 0 )
{
targets = target.split(".");
name = targets.pop();
}
else
{
targets = [];
name = target;
}
var ref = window;
var depth = targets.length;
for( var j = 0 ; j < depth ; j++ )
{
ref = ref[ targets[j] ] ;
}
window[container][target] = ref[name] ;
}
]]>
</script>
;
private static var _createTrackingObject_js:XML = <script>
<![CDATA[
function( acct )
{
_GATracker[acct] = _gat._getTracker(acct);
}
]]>
</script>
;
private static var _injectTrackingObject_js:XML = <script>
<![CDATA[
function()
{
try
{
_GATracker
}
catch(e)
{
_GATracker = {};
}
}
]]>
</script>
;
private static var _checkGAJS_js:XML = <script>
<![CDATA[
function()
{
if( _gat && _gat._getTracker )
{
return true;
}
return false;
}
]]>
</script>
;
private static var _checkValidTrackingObject_js:XML = <script>
<![CDATA[
function(acct)
{
if( _GATracker[acct] && (_GATracker[acct]._getAccount) )
{
return true ;
}
else
{
return false;
}
}
]]>
</script>
;
public function Bridge(_arg1:String, _arg2:DebugConfiguration, _arg3:JavascriptProxy){
var _local4:String;
var _local5:String;
var _local6:String;
super();
_account = _arg1;
_debug = _arg2;
_proxy = _arg3;
if (!_checkGAJS()){
_local4 = "";
_local4 = (_local4 + "ga.js not found, be sure to check if\n");
_local4 = (_local4 + "<script src=\"http://www.google-analytics.com/ga.js\"></script>\n");
_local4 = (_local4 + "is included in the HTML.");
_debug.warning(_local4);
throw (new Error(_local4));
};
if (!_hasGATracker){
if (((_debug.javascript) && (_debug.verbose))){
_local5 = "";
_local5 = (_local5 + "The Google Analytics tracking code was not found on the container page\n");
_local5 = (_local5 + "we create it");
_debug.info(_local5, VisualDebugMode.advanced);
};
_injectTrackingObject();
};
if (Utils.validateAccount(_arg1)){
_createTrackingObject(_arg1);
} else {
if (_checkTrackingObject(_arg1)){
_linkTrackingObject(_arg1);
} else {
_local6 = "";
_local6 = (_local6 + (("JS Object \"" + _arg1) + "\" doesn't exist in DOM\n"));
_local6 = (_local6 + "Bridge object not created.");
_debug.warning(_local6);
throw (new Error(_local6));
};
};
}
public function link(_arg1:String, _arg2:Boolean=false):void{
_debug.info((((("link( " + _arg1) + ", ") + _arg2) + " )"));
_call("_link", _arg1, _arg2);
}
public function addOrganic(_arg1:String, _arg2:String):void{
_debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )"));
_call("_addOrganic", _arg1);
}
public function setAllowLinker(_arg1:Boolean):void{
_debug.info((("setAllowLinker( " + _arg1) + " )"));
_call("_setAllowLinker", _arg1);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
_debug.info((((("getLinkerUrl(" + _arg1) + ", ") + _arg2) + ")"));
return (_call("_getLinkerUrl", _arg1, _arg2));
}
private function _linkTrackingObject(_arg1:String):void{
_proxy.call(_linkTrackingObject_js, _jsContainer, _arg1);
}
public function setClientInfo(_arg1:Boolean):void{
_debug.info((("setClientInfo( " + _arg1) + " )"));
_call("_setClientInfo", _arg1);
}
public function trackTrans():void{
_debug.info("trackTrans()");
_call("_trackTrans");
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
var _local5 = 2;
if (((_arg3) && (!((_arg3 == ""))))){
_local5 = 3;
};
if ((((_local5 == 3)) && (!(isNaN(_arg4))))){
_local5 = 4;
};
switch (_local5){
case 4:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )"));
return (_call("_trackEvent", _arg1, _arg2, _arg3, _arg4));
case 3:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )"));
return (_call("_trackEvent", _arg1, _arg2, _arg3));
case 2:
default:
_debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )"));
return (_call("_trackEvent", _arg1, _arg2));
};
}
public function setCookieTimeout(_arg1:int):void{
_debug.info((("setCookieTimeout( " + _arg1) + " )"));
_call("_setCookieTimeout", _arg1);
}
public function trackPageview(_arg1:String=""):void{
_debug.info((("trackPageview( " + _arg1) + " )"));
_call("_trackPageview", _arg1);
}
private function _checkValidTrackingObject(_arg1:String):Boolean{
return (_proxy.call(_checkValidTrackingObject_js, _arg1));
}
private function _checkGAJS():Boolean{
return (_proxy.call(_checkGAJS_js));
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
_debug.warning((((("linkByPost( " + _arg1) + ", ") + _arg2) + " ) not implemented"));
}
public function getClientInfo():Boolean{
_debug.info("getClientInfo()");
return (_call("_getClientInfo"));
}
private function _call(_arg1:String, ... _args){
_args.unshift(((((("window." + _jsContainer) + "[\"") + _account) + "\"].") + _arg1));
return (_proxy.call.apply(_proxy, _args));
}
public function hasGAJS():Boolean{
return (_checkGAJS());
}
private function _checkTrackingObject(_arg1:String):Boolean{
var _local2:Boolean = _proxy.hasProperty(_arg1);
var _local3:Boolean = _proxy.hasProperty((_arg1 + "._getAccount"));
return (((_local2) && (_local3)));
}
public function resetSession():void{
_debug.warning("resetSession() not implemented");
}
public function getDetectTitle():Boolean{
_debug.info("getDetectTitle()");
return (_call("_getDetectTitle"));
}
public function setCampNameKey(_arg1:String):void{
_debug.info((("setCampNameKey( " + _arg1) + " )"));
_call("_setCampNameKey", _arg1);
}
public function setDetectFlash(_arg1:Boolean):void{
_debug.info((("setDetectFlash( " + _arg1) + " )"));
_call("_setDetectFlash", _arg1);
}
public function createEventTracker(_arg1:String):EventTracker{
_debug.info((("createEventTracker( " + _arg1) + " )"));
return (new EventTracker(_arg1, this));
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
_debug.info((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " )"));
_call("_addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
public function clearIgnoredOrganic():void{
_debug.info("clearIgnoredOrganic()");
_call("_clearIgnoreOrganic");
}
public function setVar(_arg1:String):void{
_debug.info((("setVar( " + _arg1) + " )"));
_call("_setVar", _arg1);
}
public function setDomainName(_arg1:String):void{
_debug.info((("setDomainName( " + _arg1) + " )"));
_call("_setDomainName", _arg1);
}
public function hasTrackingAccount(_arg1:String):Boolean{
if (Utils.validateAccount(_arg1)){
return (_checkValidTrackingObject(_arg1));
};
return (_checkTrackingObject(_arg1));
}
public function setCampSourceKey(_arg1:String):void{
_debug.info((("setCampSourceKey( " + _arg1) + " )"));
_call("_setCampSourceKey", _arg1);
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
_debug.info((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " )"));
_call("_addTrans", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setCampContentKey(_arg1:String):void{
_debug.info((("setCampContentKey( " + _arg1) + " )"));
_call("_setCampContentKey", _arg1);
}
public function setLocalServerMode():void{
_debug.info("setLocalServerMode()");
_call("_setLocalServerMode");
}
public function getLocalGifPath():String{
_debug.info("getLocalGifPath()");
return (_call("_getLocalGifPath"));
}
public function clearIgnoredRef():void{
_debug.info("clearIgnoredRef()");
_call("_clearIgnoreRef");
}
public function setAllowAnchor(_arg1:Boolean):void{
_debug.info((("setAllowAnchor( " + _arg1) + " )"));
_call("_setAllowAnchor", _arg1);
}
public function setLocalGifPath(_arg1:String):void{
_debug.info((("setLocalGifPath( " + _arg1) + " )"));
_call("_setLocalGifPath", _arg1);
}
public function getVersion():String{
_debug.info("getVersion()");
return (_call("_getVersion"));
}
private function _injectTrackingObject():void{
_proxy.executeBlock(_injectTrackingObject_js);
_hasGATracker = true;
}
public function setCookiePath(_arg1:String):void{
_debug.info((("setCookiePath( " + _arg1) + " )"));
_call("_setCookiePath", _arg1);
}
public function setSampleRate(_arg1:Number):void{
_debug.info((("setSampleRate( " + _arg1) + " )"));
_call("_setSampleRate", _arg1);
}
public function setAllowHash(_arg1:Boolean):void{
_debug.info((("setAllowHash( " + _arg1) + " )"));
_call("_setAllowHash", _arg1);
}
public function addIgnoredOrganic(_arg1:String):void{
_debug.info((("addIgnoredOrganic( " + _arg1) + " )"));
_call("_addIgnoredOrganic", _arg1);
}
public function setCampNOKey(_arg1:String):void{
_debug.info((("setCampNOKey( " + _arg1) + " )"));
_call("_setCampNOKey", _arg1);
}
public function cookiePathCopy(_arg1:String):void{
_debug.info((("cookiePathCopy( " + _arg1) + " )"));
_call("_cookiePathCopy", _arg1);
}
public function setLocalRemoteServerMode():void{
_debug.info("setLocalRemoteServerMode()");
_call("_setLocalRemoteServerMode");
}
public function getServiceMode():ServerOperationMode{
_debug.info("getServiceMode()");
return (_call("_getServiceMode"));
}
public function setDetectTitle(_arg1:Boolean):void{
_debug.info((("setDetectTitle( " + _arg1) + " )"));
_call("_setDetectTitle", _arg1);
}
private function _createTrackingObject(_arg1:String):void{
_proxy.call(_createTrackingObject_js, _arg1);
}
public function setCampaignTrack(_arg1:Boolean):void{
_debug.info((("setCampaignTrack( " + _arg1) + " )"));
_call("_setCampaignTrack", _arg1);
}
public function clearOrganic():void{
_debug.info("clearOrganic()");
_call("_clearOrganic");
}
public function setCampTermKey(_arg1:String):void{
_debug.info((("setCampTermKey( " + _arg1) + " )"));
_call("_setCampTermKey", _arg1);
}
public function getDetectFlash():Boolean{
_debug.info("getDetectFlash()");
return (_call("_getDetectFlash"));
}
public function setCampMediumKey(_arg1:String):void{
_debug.info((("setCampMediumKey( " + _arg1) + " )"));
_call("_setCampMediumKey", _arg1);
}
public function addIgnoredRef(_arg1:String):void{
_debug.info((("addIgnoredRef( " + _arg1) + " )"));
_call("_addIgnoredRef", _arg1);
}
public function setSessionTimeout(_arg1:int):void{
_debug.info((("setSessionTimeout( " + _arg1) + " )"));
_call("_setSessionTimeout", _arg1);
}
public function setRemoteServerMode():void{
_debug.info("setRemoteServerMode()");
_call("_setRemoteServerMode");
}
public function getAccount():String{
_debug.info("getAccount()");
return (_call("_getAccount"));
}
}
}//package com.google.analytics.v4
Section 77
//Configuration (com.google.analytics.v4.Configuration)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import com.google.analytics.utils.*;
import com.google.analytics.campaign.*;
public class Configuration {
public var serverMode:ServerOperationMode;
public var detectFlash:Boolean;// = true
public var hasSiteOverlay:Boolean;// = false
public var allowLocalTracking:Boolean;// = true
public var secureRemoteGIFpath:String;// = "https://ssl.google-analytics.com/__utm.gif"
private var _version:String;// = "4.3as"
public var allowDomainHash:Boolean;// = true
public var detectClientInfo:Boolean;// = true
public var idleLoop:Number;// = 30
public var isTrackOutboundSubdomains:Boolean;// = false
public var cookiePath:String;// = "/"
public var transactionFieldDelim:String;// = "|"
private var _organic:Organic;
private var _cookieName:String;// = "analytics"
public var campaignKey:CampaignKey;
public var google:String;// = "google"
public var googleCsePath:String;// = "cse"
public var bucketCapacity:Number;// = 10
private var _sampleRate:Number;// = 1
public var remoteGIFpath:String;// = "http://www.google-analytics.com/__utm.gif"
public var googleSearchParam:String;// = "q"
public var allowLinker:Boolean;// = false
public var maxOutboundLinkExamined:Number;// = 1000
private var _debug:DebugConfiguration;
public var allowAnchor:Boolean;// = false
private var _domain:Domain;
private var _trackingLimitPerSession:int;// = 500
public var tokenCliff:int;// = 10
public var sessionTimeout:Number;
public var idleTimeout:Number;// = 60
public var campaignTracking:Boolean;// = true
public var domainName:String;// = ""
public var detectTitle:Boolean;// = true
public var tokenRate:Number;// = 0.2
public var conversionTimeout:Number;
public var localGIFpath:String;// = "/__utm.gif"
public function Configuration(_arg1:DebugConfiguration=null){
_organic = new Organic();
conversionTimeout = Timespan.sixmonths;
sessionTimeout = Timespan.thirtyminutes;
campaignKey = new CampaignKey();
serverMode = ServerOperationMode.remote;
super();
_debug = _arg1;
_domain = new Domain(DomainNameMode.auto, "", _debug);
serverMode = ServerOperationMode.remote;
_initOrganicSources();
}
public function get organic():Organic{
return (_organic);
}
public function get cookieName():String{
return (_cookieName);
}
public function get trackingLimitPerSession():int{
return (_trackingLimitPerSession);
}
private function _initOrganicSources():void{
addOrganicSource(google, googleSearchParam);
addOrganicSource("yahoo", "p");
addOrganicSource("msn", "q");
addOrganicSource("aol", "query");
addOrganicSource("aol", "encquery");
addOrganicSource("lycos", "query");
addOrganicSource("ask", "q");
addOrganicSource("altavista", "q");
addOrganicSource("netscape", "query");
addOrganicSource("cnn", "query");
addOrganicSource("looksmart", "qt");
addOrganicSource("about", "terms");
addOrganicSource("mamma", "query");
addOrganicSource("alltheweb", "q");
addOrganicSource("gigablast", "q");
addOrganicSource("voila", "rdata");
addOrganicSource("virgilio", "qs");
addOrganicSource("live", "q");
addOrganicSource("baidu", "wd");
addOrganicSource("alice", "qs");
addOrganicSource("yandex", "text");
addOrganicSource("najdi", "q");
addOrganicSource("aol", "q");
addOrganicSource("club-internet", "q");
addOrganicSource("mama", "query");
addOrganicSource("seznam", "q");
addOrganicSource("search", "q");
addOrganicSource("wp", "szukaj");
addOrganicSource("onet", "qt");
addOrganicSource("netsprint", "q");
addOrganicSource("google.interia", "q");
addOrganicSource("szukacz", "q");
addOrganicSource("yam", "k");
addOrganicSource("pchome", "q");
addOrganicSource("kvasir", "searchExpr");
addOrganicSource("sesam", "q");
addOrganicSource("ozu", "q");
addOrganicSource("terra", "query");
addOrganicSource("nostrum", "query");
addOrganicSource("mynet", "q");
addOrganicSource("ekolay", "q");
addOrganicSource("search.ilse", "search_for");
}
public function get sampleRate():Number{
return (_sampleRate);
}
public function addOrganicSource(_arg1:String, _arg2:String):void{
var engine = _arg1;
var keyword = _arg2;
try {
_organic.addSource(engine, keyword);
} catch(e:Error) {
if (((_debug) && (_debug.active))){
_debug.warning(e.message);
};
};
}
public function get domain():Domain{
return (_domain);
}
public function set sampleRate(_arg1:Number):void{
if (_arg1 <= 0){
_arg1 = 0.1;
};
if (_arg1 > 1){
_arg1 = 1;
};
_arg1 = Number(_arg1.toFixed(2));
_sampleRate = _arg1;
}
public function get version():String{
return (_version);
}
}
}//package com.google.analytics.v4
Section 78
//GoogleAnalyticsAPI (com.google.analytics.v4.GoogleAnalyticsAPI)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
public interface GoogleAnalyticsAPI {
function setCampSourceKey(_arg1:String):void;
function setDetectTitle(_arg1:Boolean):void;
function setLocalRemoteServerMode():void;
function resetSession():void;
function setLocalServerMode():void;
function setCampContentKey(_arg1:String):void;
function addOrganic(_arg1:String, _arg2:String):void;
function setDetectFlash(_arg1:Boolean):void;
function setAllowLinker(_arg1:Boolean):void;
function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean;
function setCampTermKey(_arg1:String):void;
function setCampNameKey(_arg1:String):void;
function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String;
function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void;
function clearIgnoredRef():void;
function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void;
function getDetectFlash():Boolean;
function setCampaignTrack(_arg1:Boolean):void;
function createEventTracker(_arg1:String):EventTracker;
function setCookieTimeout(_arg1:int):void;
function setAllowAnchor(_arg1:Boolean):void;
function trackTrans():void;
function clearOrganic():void;
function trackPageview(_arg1:String=""):void;
function setLocalGifPath(_arg1:String):void;
function getVersion():String;
function getLocalGifPath():String;
function getServiceMode():ServerOperationMode;
function setVar(_arg1:String):void;
function clearIgnoredOrganic():void;
function setCampMediumKey(_arg1:String):void;
function addIgnoredRef(_arg1:String):void;
function setClientInfo(_arg1:Boolean):void;
function setCookiePath(_arg1:String):void;
function setSampleRate(_arg1:Number):void;
function setSessionTimeout(_arg1:int):void;
function setRemoteServerMode():void;
function setDomainName(_arg1:String):void;
function addIgnoredOrganic(_arg1:String):void;
function setAllowHash(_arg1:Boolean):void;
function getAccount():String;
function linkByPost(_arg1:Object, _arg2:Boolean=false):void;
function link(_arg1:String, _arg2:Boolean=false):void;
function setCampNOKey(_arg1:String):void;
function getClientInfo():Boolean;
function cookiePathCopy(_arg1:String):void;
function getDetectTitle():Boolean;
}
}//package com.google.analytics.v4
Section 79
//Tracker (com.google.analytics.v4.Tracker)
package com.google.analytics.v4 {
import com.google.analytics.core.*;
import com.google.analytics.debug.*;
import flash.net.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
import com.google.analytics.data.*;
import com.google.analytics.ecommerce.*;
import com.google.analytics.campaign.*;
public class Tracker implements GoogleAnalyticsAPI {
private const EVENT_TRACKER_LABEL_KEY_NUM:int = 3;
private const EVENT_TRACKER_VALUE_VALUE_NUM:int = 1;
private const EVENT_TRACKER_PROJECT_ID:int = 5;
private const EVENT_TRACKER_OBJECT_NAME_KEY_NUM:int = 1;
private const EVENT_TRACKER_TYPE_KEY_NUM:int = 2;
private var _adSense:AdSenseGlobals;
private var _eventTracker:X10;
private var _noSessionInformation:Boolean;// = false
private var _browserInfo:BrowserInfo;
private var _debug:DebugConfiguration;
private var _isNewVisitor:Boolean;// = false
private var _buffer:Buffer;
private var _config:Configuration;
private var _x10Module:X10;
private var _campaign:CampaignManager;
private var _formatedReferrer:String;
private var _timeStamp:Number;
private var _info:Environment;
private var _domainHash:Number;
private var _campaignInfo:CampaignInfo;
private var _gifRequest:GIFRequest;
private var _hasInitData:Boolean;// = false
private var _ecom:Ecommerce;
private var _account:String;
public function Tracker(_arg1:String, _arg2:Configuration, _arg3:DebugConfiguration, _arg4:Environment, _arg5:Buffer, _arg6:GIFRequest, _arg7:AdSenseGlobals, _arg8:Ecommerce){
var _local9:String;
super();
_account = _arg1;
_config = _arg2;
_debug = _arg3;
_info = _arg4;
_buffer = _arg5;
_gifRequest = _arg6;
_adSense = _arg7;
_ecom = _arg8;
if (!Utils.validateAccount(_arg1)){
_local9 = (("Account \"" + _arg1) + "\" is not valid.");
_debug.warning(_local9);
throw (new Error(_local9));
};
}
private function _doTracking():Boolean{
if (((((!((_info.protocol == Protocols.file))) && (!((_info.protocol == Protocols.none))))) && (_isNotGoogleSearch()))){
return (true);
};
if (_config.allowLocalTracking){
return (true);
};
return (false);
}
public function addOrganic(_arg1:String, _arg2:String):void{
_debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )"));
_config.organic.addSource(_arg1, _arg2);
}
public function setAllowLinker(_arg1:Boolean):void{
_config.allowLinker = _arg1;
_debug.info((("setAllowLinker( " + _config.allowLinker) + " )"));
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
_initData();
_debug.info((((("getLinkerUrl( " + _arg1) + ", ") + _arg2.toString()) + " )"));
return (_buffer.getLinkerUrl(_arg1, _arg2));
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
_initData();
var _local5:Boolean;
var _local6 = 2;
if (((!((_arg1 == ""))) && (!((_arg2 == ""))))){
_eventTracker.clearKey(EVENT_TRACKER_PROJECT_ID);
_eventTracker.clearValue(EVENT_TRACKER_PROJECT_ID);
_local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_OBJECT_NAME_KEY_NUM, _arg1);
_local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_TYPE_KEY_NUM, _arg2);
if (_arg3){
_local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_LABEL_KEY_NUM, _arg3);
_local6 = 3;
};
if (!isNaN(_arg4)){
_local5 = _eventTracker.setValue(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_VALUE_VALUE_NUM, _arg4);
_local6 = 4;
};
if (_local5){
_debug.info(((("valid event tracking call\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek);
_sendXEvent(_eventTracker);
};
} else {
_debug.warning(((("event tracking call is not valid, failed!\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek);
_local5 = false;
};
switch (_local6){
case 4:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )"));
break;
case 3:
_debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )"));
break;
case 2:
default:
_debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )"));
};
return (_local5);
}
public function trackPageview(_arg1:String=""):void{
_debug.info((("trackPageview( " + _arg1) + " )"));
if (_doTracking()){
_initData();
_trackMetrics(_arg1);
_noSessionInformation = false;
} else {
_debug.warning((("trackPageview( " + _arg1) + " ) failed"));
};
}
public function setCookieTimeout(_arg1:int):void{
_config.conversionTimeout = _arg1;
_debug.info((("setCookieTimeout( " + _config.conversionTimeout) + " )"));
}
public function trackTrans():void{
var _local1:Number;
var _local2:Number;
var _local4:Transaction;
_initData();
var _local3:Array = new Array();
if (_takeSample()){
_local1 = 0;
while (_local1 < _ecom.getTransLength()) {
_local4 = _ecom.getTransFromArray(_local1);
_local3.push(_local4.toGifParams());
_local2 = 0;
while (_local2 < _local4.getItemsLength()) {
_local3.push(_local4.getItemFromArray(_local2).toGifParams());
_local2++;
};
_local1++;
};
_local1 = 0;
while (_local1 < _local3.length) {
_gifRequest.send(_account, _local3[_local1]);
_local1++;
};
};
}
public function setClientInfo(_arg1:Boolean):void{
_config.detectClientInfo = _arg1;
_debug.info((("setClientInfo( " + _config.detectClientInfo) + " )"));
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
_debug.warning("linkByPost not implemented in AS3 mode");
}
private function _initData():void{
var _local1:String;
var _local2:String;
if (!_hasInitData){
_updateDomainName();
_domainHash = _getDomainHash();
_timeStamp = Math.round((new Date().getTime() / 1000));
if (_debug.verbose){
_local1 = "";
_local1 = (_local1 + "_initData 0");
_local1 = (_local1 + ("\ndomain name: " + _config.domainName));
_local1 = (_local1 + ("\ndomain hash: " + _domainHash));
_local1 = (_local1 + (((("\ntimestamp: " + _timeStamp) + " (") + new Date((_timeStamp * 1000))) + ")"));
_debug.info(_local1, VisualDebugMode.geek);
};
};
if (_doTracking()){
_handleCookie();
};
if (!_hasInitData){
if (_doTracking()){
_formatedReferrer = _formatReferrer();
_browserInfo = new BrowserInfo(_config, _info);
_debug.info(("browserInfo: " + _browserInfo.toURLString()), VisualDebugMode.advanced);
if (_config.campaignTracking){
_campaign = new CampaignManager(_config, _debug, _buffer, _domainHash, _formatedReferrer, _timeStamp);
_campaignInfo = _campaign.getCampaignInformation(_info.locationSearch, _noSessionInformation);
_debug.info(("campaignInfo: " + _campaignInfo.toURLString()), VisualDebugMode.advanced);
_debug.info(("Search: " + _info.locationSearch));
_debug.info(("CampaignTrackig: " + _buffer.utmz.campaignTracking));
};
};
_x10Module = new X10();
_eventTracker = new X10();
_hasInitData = true;
};
if (_config.hasSiteOverlay){
_debug.warning("Site Overlay is not supported");
};
if (_debug.verbose){
_local2 = "";
_local2 = (_local2 + "_initData (misc)");
_local2 = (_local2 + ("\nflash version: " + _info.flashVersion.toString(4)));
_local2 = (_local2 + ("\nprotocol: " + _info.protocol));
_local2 = (_local2 + (("\ndefault domain name (auto): \"" + _info.domainName) + "\""));
_local2 = (_local2 + ("\nlanguage: " + _info.language));
_local2 = (_local2 + ("\ndomain hash: " + _getDomainHash()));
_local2 = (_local2 + ("\nuser-agent: " + _info.userAgent));
_debug.info(_local2, VisualDebugMode.geek);
};
}
public function getDetectTitle():Boolean{
_debug.info("getDetectTitle()");
return (_config.detectTitle);
}
public function resetSession():void{
_debug.info("resetSession()");
_buffer.resetCurrentSession();
}
public function getClientInfo():Boolean{
_debug.info("getClientInfo()");
return (_config.detectClientInfo);
}
private function _sendXEvent(_arg1:X10=null):void{
var _local2:Variables;
var _local3:EventInfo;
var _local4:Variables;
var _local5:Variables;
if (_takeSample()){
_local2 = new Variables();
_local2.URIencode = true;
_local3 = new EventInfo(true, _x10Module, _arg1);
_local4 = _local3.toVariables();
_local5 = _renderMetricsSearchVariables();
_local2.join(_local4, _local5);
_gifRequest.send(_account, _local2, false, true);
};
}
public function setDetectFlash(_arg1:Boolean):void{
_config.detectFlash = _arg1;
_debug.info((("setDetectFlash( " + _config.detectFlash) + " )"));
}
public function setCampNameKey(_arg1:String):void{
_config.campaignKey.UCCN = _arg1;
var _local2 = (("setCampNameKey( " + _config.campaignKey.UCCN) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCCN]"));
} else {
_debug.info(_local2);
};
}
private function _formatReferrer():String{
var _local2:String;
var _local3:URL;
var _local4:URL;
var _local1:String = _info.referrer;
if ((((_local1 == "")) || ((_local1 == "localhost")))){
_local1 = "-";
} else {
_local2 = _info.domainName;
_local3 = new URL(_local1);
_local4 = new URL(("http://" + _local2));
if (_local3.hostName == _local2){
return ("-");
};
if (_local4.domain == _local3.domain){
if (_local4.subDomain != _local3.subDomain){
_local1 = "0";
};
};
if ((((_local1.charAt(0) == "[")) && (_local1.charAt((_local1.length - 1))))){
_local1 = "-";
};
};
_debug.info(("formated referrer: " + _local1), VisualDebugMode.advanced);
return (_local1);
}
private function _visitCode():Number{
if (_debug.verbose){
_debug.info(("visitCode: " + _buffer.utma.sessionId), VisualDebugMode.geek);
};
return (_buffer.utma.sessionId);
}
public function createEventTracker(_arg1:String):EventTracker{
_debug.info((("createEventTracker( " + _arg1) + " )"));
return (new EventTracker(_arg1, this));
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
var _local7:Transaction;
_local7 = _ecom.getTransaction(_arg1);
if (_local7 == null){
_local7 = _ecom.addTransaction(_arg1, "", "", "", "", "", "", "");
};
_local7.addItem(_arg2, _arg3, _arg4, _arg5.toString(), _arg6.toString());
if (_debug.active){
_debug.info((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " )"));
};
}
public function clearIgnoredOrganic():void{
_debug.info("clearIgnoredOrganic()");
_config.organic.clearIgnoredKeywords();
}
public function setVar(_arg1:String):void{
var _local2:Variables;
if (((!((_arg1 == ""))) && (_isNotGoogleSearch()))){
_initData();
_buffer.utmv.domainHash = _domainHash;
_buffer.utmv.value = encodeURI(_arg1);
if (_debug.verbose){
_debug.info(_buffer.utmv.toString(), VisualDebugMode.geek);
};
_debug.info((("setVar( " + _arg1) + " )"));
if (_takeSample()){
_local2 = new Variables();
_local2.utmt = "var";
_gifRequest.send(_account, _local2);
};
} else {
_debug.warning((("setVar \"" + _arg1) + "\" is ignored"));
};
}
public function setDomainName(_arg1:String):void{
if (_arg1 == "auto"){
_config.domain.mode = DomainNameMode.auto;
} else {
if (_arg1 == "none"){
_config.domain.mode = DomainNameMode.none;
} else {
_config.domain.mode = DomainNameMode.custom;
_config.domain.name = _arg1;
};
};
_updateDomainName();
_debug.info((("setDomainName( " + _config.domainName) + " )"));
}
private function _updateDomainName():void{
var _local1:String;
if (_config.domain.mode == DomainNameMode.auto){
_local1 = _info.domainName;
if (_local1.substring(0, 4) == "www."){
_local1 = _local1.substring(4);
};
_config.domain.name = _local1;
};
_config.domainName = _config.domain.name.toLowerCase();
_debug.info(("domain name: " + _config.domainName), VisualDebugMode.advanced);
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
_ecom.addTransaction(_arg1, _arg2, _arg3.toString(), _arg4.toString(), _arg5.toString(), _arg6, _arg7, _arg8);
if (_debug.active){
_debug.info((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " );"));
};
}
private function _renderMetricsSearchVariables(_arg1:String=""):Variables{
var _local4:Variables;
var _local2:Variables = new Variables();
_local2.URIencode = true;
var _local3:DocumentInfo = new DocumentInfo(_config, _info, _formatedReferrer, _arg1, _adSense);
_debug.info(("docInfo: " + _local3.toURLString()), VisualDebugMode.geek);
if (_config.campaignTracking){
_local4 = _campaignInfo.toVariables();
};
var _local5:Variables = _browserInfo.toVariables();
_local2.join(_local3.toVariables(), _local5, _local4);
return (_local2);
}
public function setCampContentKey(_arg1:String):void{
_config.campaignKey.UCCT = _arg1;
var _local2 = (("setCampContentKey( " + _config.campaignKey.UCCT) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCCT]"));
} else {
_debug.info(_local2);
};
}
private function _handleCookie():void{
var _local1:String;
var _local2:String;
var _local3:Array;
var _local4:String;
if (_config.allowLinker){
};
_buffer.createSO();
if (((_buffer.hasUTMA()) && (!(_buffer.utma.isEmpty())))){
if (((!(_buffer.hasUTMB())) || (!(_buffer.hasUTMC())))){
_buffer.updateUTMA(_timeStamp);
_noSessionInformation = true;
};
if (_debug.verbose){
_debug.info(("from cookie " + _buffer.utma.toString()), VisualDebugMode.geek);
};
} else {
_debug.info("create a new utma", VisualDebugMode.advanced);
_buffer.utma.domainHash = _domainHash;
_buffer.utma.sessionId = _getUniqueSessionId();
_buffer.utma.firstTime = _timeStamp;
_buffer.utma.lastTime = _timeStamp;
_buffer.utma.currentTime = _timeStamp;
_buffer.utma.sessionCount = 1;
if (_debug.verbose){
_debug.info(_buffer.utma.toString(), VisualDebugMode.geek);
};
_noSessionInformation = true;
_isNewVisitor = true;
};
if (((_adSense.gaGlobal) && ((_adSense.dh == String(_domainHash))))){
if (_adSense.sid){
_buffer.utma.currentTime = Number(_adSense.sid);
if (_debug.verbose){
_local1 = "";
_local1 = (_local1 + "AdSense sid found\n");
_local1 = (_local1 + (((("Override currentTime(" + _buffer.utma.currentTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")"));
_debug.info(_local1, VisualDebugMode.geek);
};
};
if (_isNewVisitor){
if (_adSense.sid){
_buffer.utma.lastTime = Number(_adSense.sid);
if (_debug.verbose){
_local2 = "";
_local2 = (_local2 + "AdSense sid found (new visitor)\n");
_local2 = (_local2 + (((("Override lastTime(" + _buffer.utma.lastTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")"));
_debug.info(_local2, VisualDebugMode.geek);
};
};
if (_adSense.vid){
_local3 = _adSense.vid.split(".");
_buffer.utma.sessionId = Number(_local3[0]);
_buffer.utma.firstTime = Number(_local3[1]);
if (_debug.verbose){
_local4 = "";
_local4 = (_local4 + "AdSense vid found (new visitor)\n");
_local4 = (_local4 + (((("Override sessionId(" + _buffer.utma.sessionId) + ") from AdSense vid(") + Number(_local3[0])) + ")\n"));
_local4 = (_local4 + (((("Override firstTime(" + _buffer.utma.firstTime) + ") from AdSense vid(") + Number(_local3[1])) + ")"));
_debug.info(_local4, VisualDebugMode.geek);
};
};
if (_debug.verbose){
_debug.info(("AdSense modified : " + _buffer.utma.toString()), VisualDebugMode.geek);
};
};
};
_buffer.utmb.domainHash = _domainHash;
if (isNaN(_buffer.utmb.trackCount)){
_buffer.utmb.trackCount = 0;
};
if (isNaN(_buffer.utmb.token)){
_buffer.utmb.token = _config.tokenCliff;
};
if (isNaN(_buffer.utmb.lastTime)){
_buffer.utmb.lastTime = _buffer.utma.currentTime;
};
_buffer.utmc.domainHash = _domainHash;
if (_debug.verbose){
_debug.info(_buffer.utmb.toString(), VisualDebugMode.advanced);
_debug.info(_buffer.utmc.toString(), VisualDebugMode.advanced);
};
}
public function setLocalServerMode():void{
_config.serverMode = ServerOperationMode.local;
_debug.info("setLocalServerMode()");
}
public function clearIgnoredRef():void{
_debug.info("clearIgnoredRef()");
_config.organic.clearIgnoredReferrals();
}
public function setCampSourceKey(_arg1:String):void{
_config.campaignKey.UCSR = _arg1;
var _local2 = (("setCampSourceKey( " + _config.campaignKey.UCSR) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCSR]"));
} else {
_debug.info(_local2);
};
}
public function getLocalGifPath():String{
_debug.info("getLocalGifPath()");
return (_config.localGIFpath);
}
public function setLocalGifPath(_arg1:String):void{
_config.localGIFpath = _arg1;
_debug.info((("setLocalGifPath( " + _config.localGIFpath) + " )"));
}
public function getVersion():String{
_debug.info("getVersion()");
return (_config.version);
}
public function setAllowAnchor(_arg1:Boolean):void{
_config.allowAnchor = _arg1;
_debug.info((("setAllowAnchor( " + _config.allowAnchor) + " )"));
}
private function _isNotGoogleSearch():Boolean{
var _local1:String = _config.domainName;
var _local2 = (_local1.indexOf("www.google.") < 0);
var _local3 = (_local1.indexOf(".google.") < 0);
var _local4 = (_local1.indexOf("google.") < 0);
var _local5 = (_local1.indexOf("google.org") > -1);
return (((((((((_local2) || (_local3))) || (_local4))) || (!((_config.cookiePath == "/"))))) || (_local5)));
}
public function setSampleRate(_arg1:Number):void{
if (_arg1 < 0){
_debug.warning("sample rate can not be negative, ignoring value.");
} else {
_config.sampleRate = _arg1;
};
_debug.info((("setSampleRate( " + _config.sampleRate) + " )"));
}
private function _takeSample():Boolean{
if (_debug.verbose){
_debug.info((((("takeSample: (" + (_visitCode() % 10000)) + ") < (") + (_config.sampleRate * 10000)) + ")"), VisualDebugMode.geek);
};
return (((_visitCode() % 10000) < (_config.sampleRate * 10000)));
}
public function setCookiePath(_arg1:String):void{
_config.cookiePath = _arg1;
_debug.info((("setCookiePath( " + _config.cookiePath) + " )"));
}
public function setAllowHash(_arg1:Boolean):void{
_config.allowDomainHash = _arg1;
_debug.info((("setAllowHash( " + _config.allowDomainHash) + " )"));
}
private function _generateUserDataHash():Number{
var _local1 = "";
_local1 = (_local1 + _info.appName);
_local1 = (_local1 + _info.appVersion);
_local1 = (_local1 + _info.language);
_local1 = (_local1 + _info.platform);
_local1 = (_local1 + _info.userAgent.toString());
_local1 = (_local1 + (((_info.screenWidth + "x") + _info.screenHeight) + _info.screenColorDepth));
_local1 = (_local1 + _info.referrer);
return (Utils.generateHash(_local1));
}
public function setCampNOKey(_arg1:String):void{
_config.campaignKey.UCNO = _arg1;
var _local2 = (("setCampNOKey( " + _config.campaignKey.UCNO) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCNO]"));
} else {
_debug.info(_local2);
};
}
public function addIgnoredOrganic(_arg1:String):void{
_debug.info((("addIgnoredOrganic( " + _arg1) + " )"));
_config.organic.addIgnoredKeyword(_arg1);
}
public function setLocalRemoteServerMode():void{
_config.serverMode = ServerOperationMode.both;
_debug.info("setLocalRemoteServerMode()");
}
public function cookiePathCopy(_arg1:String):void{
_debug.warning((("cookiePathCopy( " + _arg1) + " ) not implemented"));
}
public function setDetectTitle(_arg1:Boolean):void{
_config.detectTitle = _arg1;
_debug.info((("setDetectTitle( " + _config.detectTitle) + " )"));
}
public function setCampTermKey(_arg1:String):void{
_config.campaignKey.UCTR = _arg1;
var _local2 = (("setCampTermKey( " + _config.campaignKey.UCTR) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCTR]"));
} else {
_debug.info(_local2);
};
}
public function getServiceMode():ServerOperationMode{
_debug.info("getServiceMode()");
return (_config.serverMode);
}
private function _trackMetrics(_arg1:String=""):void{
var _local2:Variables;
var _local3:Variables;
var _local4:Variables;
var _local5:EventInfo;
if (_takeSample()){
_local2 = new Variables();
_local2.URIencode = true;
if (((_x10Module) && (_x10Module.hasData()))){
_local5 = new EventInfo(false, _x10Module);
_local3 = _local5.toVariables();
};
_local4 = _renderMetricsSearchVariables(_arg1);
_local2.join(_local3, _local4);
_gifRequest.send(_account, _local2);
};
}
public function setCampaignTrack(_arg1:Boolean):void{
_config.campaignTracking = _arg1;
_debug.info((("setCampaignTrack( " + _config.campaignTracking) + " )"));
}
public function addIgnoredRef(_arg1:String):void{
_debug.info((("addIgnoredRef( " + _arg1) + " )"));
_config.organic.addIgnoredReferral(_arg1);
}
public function clearOrganic():void{
_debug.info("clearOrganic()");
_config.organic.clearEngines();
}
public function getDetectFlash():Boolean{
_debug.info("getDetectFlash()");
return (_config.detectFlash);
}
public function setCampMediumKey(_arg1:String):void{
_config.campaignKey.UCMD = _arg1;
var _local2 = (("setCampMediumKey( " + _config.campaignKey.UCMD) + " )");
if (_debug.mode == VisualDebugMode.geek){
_debug.info((_local2 + " [UCMD]"));
} else {
_debug.info(_local2);
};
}
private function _getUniqueSessionId():Number{
var _local1:Number = ((Utils.generate32bitRandom() ^ _generateUserDataHash()) * 2147483647);
_debug.info(("Session ID: " + _local1), VisualDebugMode.geek);
return (_local1);
}
private function _getDomainHash():Number{
if (((((!(_config.domainName)) || ((_config.domainName == "")))) || ((_config.domain.mode == DomainNameMode.none)))){
_config.domainName = "";
return (1);
};
_updateDomainName();
if (_config.allowDomainHash){
return (Utils.generateHash(_config.domainName));
};
return (1);
}
public function setSessionTimeout(_arg1:int):void{
_config.sessionTimeout = _arg1;
_debug.info((("setSessionTimeout( " + _config.sessionTimeout) + " )"));
}
public function getAccount():String{
_debug.info("getAccount()");
return (_account);
}
public function link(_arg1:String, _arg2:Boolean=false):void{
var targetUrl = _arg1;
var useHash = _arg2;
_initData();
var out:String = _buffer.getLinkerUrl(targetUrl, useHash);
var request:URLRequest = new URLRequest(out);
_debug.info((("link( " + [targetUrl, useHash].join(",")) + " )"));
try {
navigateToURL(request, "_top");
} catch(e:Error) {
_debug.warning(("An error occured in link() msg: " + e.message));
};
}
public function setRemoteServerMode():void{
_config.serverMode = ServerOperationMode.remote;
_debug.info("setRemoteServerMode()");
}
}
}//package com.google.analytics.v4
Section 80
//AnalyticsTracker (com.google.analytics.AnalyticsTracker)
package com.google.analytics {
import flash.events.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
public interface AnalyticsTracker extends GoogleAnalyticsAPI, IEventDispatcher {
function set account(_arg1:String):void;
function get config():Configuration;
function get mode():String;
function set config(_arg1:Configuration):void;
function set mode(_arg1:String):void;
function set debug(_arg1:DebugConfiguration):void;
function get visualDebug():Boolean;
function get account():String;
function set visualDebug(_arg1:Boolean):void;
function isReady():Boolean;
function get debug():DebugConfiguration;
}
}//package com.google.analytics
Section 81
//API (com.google.analytics.API)
package com.google.analytics {
import com.google.analytics.utils.*;
public class API {
public static var version:Version = new Version();
version.major = 1;
version.minor = 0;
version.build = 1;
version.revision = "$Rev: 319 $ ".split(" ")[1];
}
}//package com.google.analytics
Section 82
//GATracker (com.google.analytics.GATracker)
package com.google.analytics {
import flash.display.*;
import flash.events.*;
import com.google.analytics.core.*;
import com.google.analytics.v4.*;
import com.google.analytics.debug.*;
import com.google.analytics.external.*;
import com.google.analytics.utils.*;
import com.google.analytics.events.*;
public class GATracker implements AnalyticsTracker {
private var _adSense:AdSenseGlobals;
private var _env:Environment;
private var _visualDebug:Boolean;
private var _idleTimer:IdleTimer;
private var _debug:DebugConfiguration;
private var _buffer:Buffer;
private var _config:Configuration;
private var _mode:String;
private var _display:DisplayObject;
private var _jsproxy:JavascriptProxy;
private var _dom:HTMLDOM;
private var _eventDispatcher:EventDispatcher;
private var _ready:Boolean;// = false
private var _gifRequest:GIFRequest;
private var _ecom:Ecommerce;
private var _account:String;
private var _tracker:GoogleAnalyticsAPI;
public static var version:Version = API.version;
public static var autobuild:Boolean = true;
public function GATracker(_arg1:DisplayObject, _arg2:String, _arg3:String="AS3", _arg4:Boolean=false, _arg5:Configuration=null, _arg6:DebugConfiguration=null){
_display = _arg1;
_eventDispatcher = new EventDispatcher(this);
_tracker = new TrackerCache();
this.account = _arg2;
this.mode = _arg3;
this.visualDebug = _arg4;
if (!_arg6){
this.debug = new DebugConfiguration();
};
if (!_arg5){
this.config = new Configuration(_arg6);
};
if (autobuild){
_factory();
};
}
public function link(_arg1:String, _arg2:Boolean=false):void{
_tracker.link(_arg1, _arg2);
}
public function addOrganic(_arg1:String, _arg2:String):void{
_tracker.addOrganic(_arg1, _arg2);
}
public function setAllowLinker(_arg1:Boolean):void{
_tracker.setAllowLinker(_arg1);
}
public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{
var category = _arg1;
var action = _arg2;
var label = _arg3;
var value = _arg4;
var b:Boolean;
try {
b = _tracker.trackEvent(category, action, label, value);
} catch(e:Error) {
b = false;
};
return (b);
}
public function getLinkerUrl(_arg1:String="", _arg2:Boolean=false):String{
return (_tracker.getLinkerUrl(_arg1, _arg2));
}
public function setCookieTimeout(_arg1:int):void{
_tracker.setCookieTimeout(_arg1);
}
public function trackTrans():void{
_tracker.trackTrans();
}
public function getClientInfo():Boolean{
return (_tracker.getClientInfo());
}
public function trackPageview(_arg1:String=""):void{
_tracker.trackPageview(_arg1);
}
public function setClientInfo(_arg1:Boolean):void{
_tracker.setClientInfo(_arg1);
}
public function get account():String{
return (_account);
}
public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{
_tracker.linkByPost(_arg1, _arg2);
}
public function getDetectTitle():Boolean{
return (_tracker.getDetectTitle());
}
public function dispatchEvent(_arg1:Event):Boolean{
return (_eventDispatcher.dispatchEvent(_arg1));
}
public function get config():Configuration{
return (_config);
}
public function set mode(_arg1:String):void{
_mode = _arg1;
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public function setDetectFlash(_arg1:Boolean):void{
_tracker.setDetectFlash(_arg1);
}
public function resetSession():void{
_tracker.resetSession();
}
public function setCampNameKey(_arg1:String):void{
_tracker.setCampNameKey(_arg1);
}
public function get debug():DebugConfiguration{
return (_debug);
}
public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{
_tracker.addItem(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
private function _bridgeFactory():GoogleAnalyticsAPI{
debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account));
return (new Bridge(account, _debug, _jsproxy));
}
public function clearIgnoredOrganic():void{
_tracker.clearIgnoredOrganic();
}
public function set account(_arg1:String):void{
_account = _arg1;
}
public function setVar(_arg1:String):void{
_tracker.setVar(_arg1);
}
public function build():void{
if (!isReady()){
_factory();
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function setDomainName(_arg1:String):void{
_tracker.setDomainName(_arg1);
}
public function createEventTracker(_arg1:String):EventTracker{
return (_tracker.createEventTracker(_arg1));
}
public function setCampSourceKey(_arg1:String):void{
_tracker.setCampSourceKey(_arg1);
}
public function set config(_arg1:Configuration):void{
_config = _arg1;
}
public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):void{
_tracker.addTrans(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setCampContentKey(_arg1:String):void{
_tracker.setCampContentKey(_arg1);
}
public function willTrigger(_arg1:String):Boolean{
return (_eventDispatcher.willTrigger(_arg1));
}
public function setLocalServerMode():void{
_tracker.setLocalServerMode();
}
public function isReady():Boolean{
return (_ready);
}
public function getLocalGifPath():String{
return (_tracker.getLocalGifPath());
}
public function setAllowAnchor(_arg1:Boolean):void{
_tracker.setAllowAnchor(_arg1);
}
public function clearIgnoredRef():void{
_tracker.clearIgnoredRef();
}
public function get mode():String{
return (_mode);
}
public function set debug(_arg1:DebugConfiguration):void{
_debug = _arg1;
}
public function setLocalGifPath(_arg1:String):void{
_tracker.setLocalGifPath(_arg1);
}
public function getVersion():String{
return (_tracker.getVersion());
}
public function setSampleRate(_arg1:Number):void{
_tracker.setSampleRate(_arg1);
}
public function setCookiePath(_arg1:String):void{
_tracker.setCookiePath(_arg1);
}
public function setAllowHash(_arg1:Boolean):void{
_tracker.setAllowHash(_arg1);
}
public function addIgnoredOrganic(_arg1:String):void{
_tracker.addIgnoredOrganic(_arg1);
}
public function setLocalRemoteServerMode():void{
_tracker.setLocalRemoteServerMode();
}
public function cookiePathCopy(_arg1:String):void{
_tracker.cookiePathCopy(_arg1);
}
private function _factory():void{
var _local1:GoogleAnalyticsAPI;
_jsproxy = new JavascriptProxy(debug);
if (visualDebug){
debug.layout = new Layout(debug, _display);
debug.active = visualDebug;
};
var _local2:TrackerCache = (_tracker as TrackerCache);
switch (mode){
case TrackerMode.BRIDGE:
_local1 = _bridgeFactory();
break;
case TrackerMode.AS3:
default:
_local1 = _trackerFactory();
};
if (!_local2.isEmpty()){
_local2.tracker = _local1;
_local2.flush();
};
_tracker = _local1;
_ready = true;
dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this));
}
public function setCampTermKey(_arg1:String):void{
_tracker.setCampTermKey(_arg1);
}
private function _trackerFactory():GoogleAnalyticsAPI{
debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account));
_adSense = new AdSenseGlobals(debug);
_dom = new HTMLDOM(debug);
_dom.cacheProperties();
_env = new Environment("", "", "", debug, _dom);
_buffer = new Buffer(config, debug, false);
_gifRequest = new GIFRequest(config, debug, _buffer, _env);
_idleTimer = new IdleTimer(config, debug, _display, _buffer);
_ecom = new Ecommerce(_debug);
_env.url = _display.stage.loaderInfo.url;
return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense, _ecom));
}
public function setCampNOKey(_arg1:String):void{
_tracker.setCampNOKey(_arg1);
}
public function setDetectTitle(_arg1:Boolean):void{
_tracker.setDetectTitle(_arg1);
}
public function clearOrganic():void{
_tracker.clearOrganic();
}
public function setCampaignTrack(_arg1:Boolean):void{
_tracker.setCampaignTrack(_arg1);
}
public function addIgnoredRef(_arg1:String):void{
_tracker.addIgnoredRef(_arg1);
}
public function getServiceMode():ServerOperationMode{
return (_tracker.getServiceMode());
}
public function set visualDebug(_arg1:Boolean):void{
_visualDebug = _arg1;
}
public function setCampMediumKey(_arg1:String):void{
_tracker.setCampMediumKey(_arg1);
}
public function getDetectFlash():Boolean{
return (_tracker.getDetectFlash());
}
public function get visualDebug():Boolean{
return (_visualDebug);
}
public function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public function getAccount():String{
return (_tracker.getAccount());
}
public function setSessionTimeout(_arg1:int):void{
_tracker.setSessionTimeout(_arg1);
}
public function setRemoteServerMode():void{
_tracker.setRemoteServerMode();
}
}
var _local1:* = ServerOperationMode;
return (_local1);
}//package com.google.analytics
Section 83
//EscapeMenu (com.logicking.sokoban.EscapeMenu)
package com.logicking.sokoban {
import org.flixel.*;
import com.gamezhero.api.as3.*;
public class EscapeMenu extends FlxGroupEx {
private var ImgBackground:Class;
public function EscapeMenu(){
var _local4:FlxSprite;
var _local5:FlxText;
var _local6:FlxText;
var _local7:FlxButton;
ImgBackground = EscapeMenu_ImgBackground;
super();
FlxG.mouse.show(MenuState.ImgCursor);
var _local1 = 262;
var _local2 = 106;
var _local3 = 262;
_local4 = new FlxSprite(_local1, _local2, ImgBackground);
this.add(_local4);
_local7 = new FlxButton((_local1 + 0), (_local2 + 40), onSolutionButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, _local3, "Walkthroughs");
_local5.setFormat("Arial_black", 28, 4294967193, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
_local7 = new FlxButton((_local1 + 0), (_local2 + 103), onRestartButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, _local3, "Restart");
_local5.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
_local5 = new FlxText(_local1, (_local2 + 142), _local3, "press 'R'");
_local5.setFormat("Arial_black", 14, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local5);
_local7 = new FlxButton((_local1 + 0), (_local2 + 180), onSelectLevelButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, 262, "Select Level");
_local5.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
_local7 = new FlxButton((_local1 + 0), (_local2 + 250), onMoreGamesButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, _local3, "More Games");
_local5.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
_local7 = new FlxButton((_local1 + 0), (_local2 + 320), onMenuButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, 262, "Main Menu");
_local5.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
}
public function onMenuButton():void{
FlxG.state = new MenuState();
FlxG.play(MenuState.clickSnd);
}
override public function update():void{
super.update();
}
public function onBackButton():void{
hide();
FlxG.play(MenuState.clickSnd);
}
public function onRestartButton():void{
hide();
PlayState.instance.initRoom();
FlxG.play(MenuState.selectSnd);
}
public function onSolutionButton():void{
FlxU.openURL(MenuState.SOLUTION_URL);
FlxG.play(MenuState.selectSnd);
}
public function onSelectLevelButton():void{
FlxG.state = new SelectLevelState();
FlxG.play(MenuState.clickSnd);
}
public function onMoreGamesButton():void{
GamezheroApi.navigateTo(GamezheroApi.MORE_GAMES);
FlxG.play(MenuState.selectSnd);
}
}
}//package com.logicking.sokoban
Section 84
//EscapeMenu_ImgBackground (com.logicking.sokoban.EscapeMenu_ImgBackground)
package com.logicking.sokoban {
import mx.core.*;
public class EscapeMenu_ImgBackground extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 85
//FinishRoom (com.logicking.sokoban.FinishRoom)
package com.logicking.sokoban {
import org.flixel.*;
import com.gamezhero.api.as3.*;
public class FinishRoom extends FlxGroupEx {
public var text1:FlxText;
public var text2:FlxText;
public var text3:FlxText;
public var text4:FlxText;
private var finishSpr:FlxSprite;
private var ImgFinishAll:Class;
private var ImgBackground:Class;
public var playNextBtn:FlxButton;
public var parent:PlayState;
public function FinishRoom(){
var _local2:int;
var _local4:FlxSprite;
var _local5:FlxText;
var _local6:FlxText;
var _local7:FlxButton;
ImgBackground = FinishRoom_ImgBackground;
ImgFinishAll = FinishRoom_ImgFinishAll;
super();
var _local1 = 262;
_local2 = 106;
var _local3 = 262;
_local4 = new FlxSprite(_local1, (_local2 - 7), ImgBackground);
this.add(_local4);
finishSpr = new FlxSprite((_local1 - 245), (_local2 - 83), ImgFinishAll);
this.add(finishSpr);
finishSpr.visible = false;
_local5 = new FlxText(_local1, (_local2 + 43), _local3, "Puzzle is solved!");
_local5.setFormat("Arial_black", 25, 0xFFFF00, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local5);
text1 = _local5;
_local5 = new FlxText(_local1, (_local2 + 43), _local3, "Congratulations!");
_local5.setFormat("Arial_black", 25, 0xFFFF00, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local5);
text2 = _local5;
_local5 = new FlxText(_local1, (_local2 + 100), _local3, "You've solved all the puzzles!");
_local5.setFormat("Arial_black", 19, 0xFFFF00, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local5);
text3 = _local5;
_local7 = new FlxButton((_local1 + 0), (_local2 + 93), onNextLevelButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, 262, "Play Next");
_local5.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
playNextBtn = _local7;
_local5 = new FlxText(_local1, (_local2 + 133), _local3, "press spacebar");
_local5.setFormat("Arial_black", 14, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local5);
text4 = _local5;
_local7 = new FlxButton((_local1 + 0), (_local2 + 173), onSelectLevelButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, 262, "Select Level");
_local5.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
_local7 = new FlxButton((_local1 + 0), (_local2 + 243), onMoreGamesButton);
_local7.loadGraphic(new FlxSprite().createGraphic(_local3, 56, 0), new FlxSprite().createGraphic(_local3, 56, 0));
_local5 = new FlxText(0, 3, _local3, "More Games");
_local5.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local6 = new FlxText(_local5.x, _local5.y, _local5.width, _local5.text);
_local6.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local7.loadText(_local5, _local6);
add(_local7);
}
override public function update():void{
super.update();
if (((FlxG.keys.justPressed("SPACE")) && (playNextBtn.active))){
onNextLevelButton();
};
}
public function onSelectLevelButton():void{
FlxG.state = new SelectLevelState();
FlxG.play(MenuState.clickSnd);
}
public function onNextLevelButton():void{
hide();
parent.currentRoomIdx++;
parent.initRoom();
FlxG.play(MenuState.selectSnd);
}
override public function show(_arg1:Number=0):void{
var _local2:FlxSave = new FlxSave();
super.show(_arg1);
var _local3 = (parent.currentRoomIdx == 14);
if (((!(_local3)) && (_local2.bind("DockerSokoban")))){
if (_local2.data.levels){
if (_local2.data.levels < (parent.currentRoomIdx + 2)){
_local2.data.levels = (parent.currentRoomIdx + 2);
};
} else {
_local2.data.levels = (parent.currentRoomIdx + 2);
};
};
if (_local3){
text1.visible = false;
playNextBtn.active = false;
playNextBtn.visible = false;
text4.visible = false;
text2.visible = true;
text3.visible = true;
finishSpr.visible = true;
} else {
text2.visible = false;
text3.visible = false;
text1.visible = true;
playNextBtn.active = true;
playNextBtn.visible = true;
text4.visible = true;
finishSpr.visible = false;
};
}
public function onMoreGamesButton():void{
GamezheroApi.navigateTo(GamezheroApi.MORE_GAMES);
FlxG.play(MenuState.clickSnd);
}
}
}//package com.logicking.sokoban
Section 86
//FinishRoom_ImgBackground (com.logicking.sokoban.FinishRoom_ImgBackground)
package com.logicking.sokoban {
import mx.core.*;
public class FinishRoom_ImgBackground extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 87
//FinishRoom_ImgFinishAll (com.logicking.sokoban.FinishRoom_ImgFinishAll)
package com.logicking.sokoban {
import mx.core.*;
public class FinishRoom_ImgFinishAll extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 88
//FlxButtonExtended (com.logicking.sokoban.FlxButtonExtended)
package com.logicking.sokoban {
import org.flixel.*;
import flash.events.*;
public class FlxButtonExtended extends FlxButton {
public var userData;
public function FlxButtonExtended(_arg1:int, _arg2:int, _arg3:Function){
super(_arg1, _arg2, _arg3);
}
public function isPressed():Boolean{
return (_pressed);
}
override protected function onMouseUp(_arg1:MouseEvent):void{
if (((((((((!(exists)) || (!(visible)))) || (!(active)))) || (!(FlxG.mouse.justReleased())))) || ((_callback == null)))){
return;
};
if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
_callback(this);
};
}
}
}//package com.logicking.sokoban
Section 89
//FlxGroupEx (com.logicking.sokoban.FlxGroupEx)
package com.logicking.sokoban {
import org.flixel.*;
public class FlxGroupEx extends FlxGroup {
protected var fadeTime:Number;// = 0
protected var originalFadeTime:Number;// = 0
override public function update():void{
var _local1:uint;
var _local2:Number;
var _local3:uint;
var _local4:FlxSprite;
super.update();
if (fadeTime > 0){
_local1 = members.length;
_local2 = (fadeTime / originalFadeTime);
_local3 = 0;
while (_local3 < _local1) {
_local4 = (members[_local3] as FlxSprite);
if (_local4){
_local4.alpha = _local2;
};
_local3++;
};
fadeTime = (fadeTime - FlxG.elapsed);
};
}
public function hide():void{
visible = false;
activate(false);
}
public function activate(_arg1:Boolean):void{
active = _arg1;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
if (members[_local3]){
members[_local3].active = _arg1;
};
_local3++;
};
}
public function show(_arg1:Number=0):void{
var _local2:uint;
var _local3:uint;
var _local4:FlxSprite;
fadeTime = (originalFadeTime = _arg1);
if (fadeTime){
_local2 = members.length;
_local3 = 0;
while (_local3 < _local2) {
_local4 = (members[_local3] as FlxSprite);
if (_local4){
_local4.alpha = 0;
};
_local3++;
};
};
visible = true;
activate(true);
FlxG.mouse.reset();
reset(1, 0);
update();
}
}
}//package com.logicking.sokoban
Section 90
//GameMain (com.logicking.sokoban.GameMain)
package com.logicking.sokoban {
import org.flixel.*;
public class GameMain extends FlxGame {
public function GameMain():void{
this.useDefaultHotKeys = false;
super(800, 600, MenuState, 1);
}
override public function showSoundTray(_arg1:Boolean=false):void{
super.showSoundTray(_arg1);
}
}
}//package com.logicking.sokoban
Section 91
//InGameGui (com.logicking.sokoban.InGameGui)
package com.logicking.sokoban {
import org.flixel.*;
import com.gamezhero.api.as3.*;
public class InGameGui extends FlxGroupEx {
private var offSignMusic:FlxSprite;
private var ImgMusic:Class;
private var undoBtn:FlxButtonExtended;
private var ImgMenu:Class;
private var offSignSound:FlxSprite;
private var ImgUndo:Class;
private var ImgOffSign:Class;
private var ImgSound:Class;
private var ImgSponsor:Class;
public function InGameGui(){
var _local3:int;
var _local4:FlxText;
var _local5:FlxText;
var _local6:FlxButton;
var _local7:FlxSprite;
var _local8:FlxSprite;
ImgUndo = InGameGui_ImgUndo;
ImgSound = InGameGui_ImgSound;
ImgMusic = InGameGui_ImgMusic;
ImgMenu = InGameGui_ImgMenu;
ImgOffSign = InGameGui_ImgOffSign;
ImgSponsor = InGameGui_ImgSponsor;
super();
var _local1 = 740;
var _local2 = 553;
_local3 = 42;
_local6 = new FlxButton(_local1, _local2, onMenuBtn);
_local7 = new FlxSprite();
_local7.loadGraphic(ImgMenu);
_local7.color = 4292730333;
_local8 = new FlxSprite();
_local8.loadGraphic(ImgMenu);
_local8.color = 4294967295;
_local6.loadGraphic(_local7, _local8);
_local4 = new FlxText(0, -5, 70, " ");
_local4.setFormat("Arial_black", 12, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local5 = new FlxText(_local4.x, _local4.y, _local4.width, " ");
_local5.setFormat("Arial_black", 12, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local6.loadText(_local4, _local5);
add(_local6);
_local6 = new FlxButton((_local1 - _local3), _local2, onMusicBtn);
_local7 = new FlxSprite();
_local7.loadGraphic(ImgMusic);
_local7.color = 4292730333;
_local8 = new FlxSprite();
_local8.loadGraphic(ImgMusic);
_local8.color = 4294967295;
_local6.loadGraphic(_local7, _local8);
add(_local6);
offSignMusic = new FlxSprite(_local6.x, _local6.y, ImgOffSign);
offSignMusic.color = 3722304989;
offSignMusic.visible = !(MenuState.muteMusic(4));
add(offSignMusic);
_local6 = new FlxButton((_local1 - (_local3 * 2)), _local2, onSoundBtn);
_local7 = new FlxSprite();
_local7.loadGraphic(ImgSound);
_local7.color = 4292730333;
_local8 = new FlxSprite();
_local8.loadGraphic(ImgSound);
_local8.color = 4294967295;
_local6.loadGraphic(_local7, _local8);
add(_local6);
offSignSound = new FlxSprite(_local6.x, _local6.y, ImgOffSign);
offSignSound.color = 3722304989;
offSignSound.visible = !(MenuState.muteSound(4));
add(offSignSound);
undoBtn = new FlxButtonExtended(10, (_local2 - 30), onUndoBtn);
_local7 = new FlxSprite();
_local7.loadGraphic(ImgUndo);
_local7.color = 4292730333;
_local8 = new FlxSprite();
_local8.loadGraphic(ImgUndo);
_local8.color = 4294967295;
undoBtn.loadGraphic(_local7, _local8);
add(undoBtn);
_local6 = new FlxButton(PlayState.SCREEN_OFFSET_X, PlayState.SCREEN_OFFSET_Y, onSponsorBtn);
_local7 = new FlxSprite(0, 0, ImgSponsor);
_local7.color = 3435973836;
_local8 = new FlxSprite(0, 0, ImgSponsor);
_local8.color = 4294967295;
_local6.loadGraphic(_local7, _local8);
add(_local6);
_local6 = new FlxButton((PlayState.SCREEN_OFFSET_X + 547), -5, onSolutionButton);
_local6.loadGraphic(new FlxSprite().createGraphic(250, 28, 0), new FlxSprite().createGraphic(250, 28, 0));
_local4 = new FlxText(0, 0, 240, "WALKTHROUGHS");
_local4.setFormat("Arial_black", 20, 4294967193, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
_local5 = new FlxText(_local4.x, _local4.y, _local4.width, _local4.text);
_local5.setFormat("Arial_black", 20, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
_local6.loadText(_local4, _local5);
add(_local6);
}
override public function update():void{
super.update();
if (undoBtn.isPressed()){
if (FlxG.mouse.justPressed()){
PlayState.undoWaitTime = 9999;
};
PlayState.instance.performUndo();
};
}
public function onSolutionButton():void{
FlxU.openURL(MenuState.SOLUTION_URL);
FlxG.play(MenuState.selectSnd);
}
public function onSoundBtn():void{
offSignSound.visible = !(MenuState.muteSound());
}
public function onMenuBtn():void{
PlayState.instance.onEscapeMenu();
}
public function onSponsorBtn():void{
FlxG.play(MenuState.clickSnd);
GamezheroApi.navigateTo(GamezheroApi.MORE_GAMES_FROM_LOGO);
}
public function onMusicBtn():void{
offSignMusic.visible = !(MenuState.muteMusic());
}
public function onUndoBtn(_arg1:FlxButtonExtended):void{
}
}
}//package com.logicking.sokoban
Section 92
//InGameGui_ImgMenu (com.logicking.sokoban.InGameGui_ImgMenu)
package com.logicking.sokoban {
import mx.core.*;
public class InGameGui_ImgMenu extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 93
//InGameGui_ImgMusic (com.logicking.sokoban.InGameGui_ImgMusic)
package com.logicking.sokoban {
import mx.core.*;
public class InGameGui_ImgMusic extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 94
//InGameGui_ImgOffSign (com.logicking.sokoban.InGameGui_ImgOffSign)
package com.logicking.sokoban {
import mx.core.*;
public class InGameGui_ImgOffSign extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 95
//InGameGui_ImgSound (com.logicking.sokoban.InGameGui_ImgSound)
package com.logicking.sokoban {
import mx.core.*;
public class InGameGui_ImgSound extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 96
//InGameGui_ImgSponsor (com.logicking.sokoban.InGameGui_ImgSponsor)
package com.logicking.sokoban {
import mx.core.*;
public class InGameGui_ImgSponsor extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 97
//InGameGui_ImgUndo (com.logicking.sokoban.InGameGui_ImgUndo)
package com.logicking.sokoban {
import mx.core.*;
public class InGameGui_ImgUndo extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 98
//Item (com.logicking.sokoban.Item)
package com.logicking.sokoban {
public class Item {
public var chest:uint;
public var place:uint;
public var wall:int;
public var empty:uint;
}
}//package com.logicking.sokoban
Section 99
//MenuState (com.logicking.sokoban.MenuState)
package com.logicking.sokoban {
import org.flixel.*;
import flash.ui.*;
import com.gamezhero.api.as3.*;
import com.google.analytics.*;
public class MenuState extends FlxState {
protected var arialBlackFont:String;// = "MenuState_arialBlackFont"
private var musicSnd:Class;
private var ImgBackground:Class;
protected var arialFont:String;// = "MenuState_arialFont"
private var optionsMenu:OptionsMenu;
public var buttonsGroup:FlxGroupEx;
public static const MORE_GAMES_URL:String = "http://logicking.com/";
public static const SOLUTION_URL:String = "http://www.gamezhero.com/walkthroughs/dockersokoban-games.html";
public static const SPONSOR_URL:String = "http://logicking.com/";
public static const BTN_INACTIVE_COLOR:uint = 14535884;
public static const LOGICKING_URL:String = "http://logicking.com/games.htm";
public static const BTN_INACTIVE_YELLOW_COLOR:uint = 0xFFFF00;
public static const BTN_ACTIVE_COLOR:uint = 0xFFFFFF;
public static const BTN_INACTIVE_SHADOW_COLOR:uint = 65793;
public static const MUSIC_VOL:Number = 0.5;
public static const BTN_ACTIVE_SHADOW_COLOR:uint = 0x111111;
public static var clickSnd:Class = MenuState_clickSnd;
public static var selectSnd:Class = MenuState_selectSnd;
public static var ImgTwitter:Class = MenuState_ImgTwitter;
public static var instance:MenuState;
public static var ImgFacebook:Class = MenuState_ImgFacebook;
public static var ImgCursor:Class = MenuState_ImgCursor;
public static var ImgSponsor:Class = MenuState_ImgSponsor;
private static var save:FlxSave;
public function MenuState(){
ImgBackground = MenuState_ImgBackground;
musicSnd = MenuState_musicSnd;
super();
instance = this;
save = new FlxSave();
if (save.bind("DockerSokoban")){
if (save.data.levels == null){
save.data.levels = 1;
};
if (save.data.mute == null){
save.data.mute = false;
};
if (save.data.musicVol == null){
save.data.musicVol = MUSIC_VOL;
};
};
}
public function onPlayButton():void{
FlxG.state = new SelectLevelState();
FlxG.play(_slot1.clickSnd);
}
override public function update():void{
super.update();
}
override public function create():void{
var background:FlxSprite;
var t1:FlxText;
var t2:FlxText;
var btn:FlxButton;
var spr1:FlxSprite;
var spr2:FlxSprite;
super.create();
Mouse.show();
background = new FlxSprite(0, 0, ImgBackground);
this.add(background);
buttonsGroup = new FlxGroupEx();
this.add(buttonsGroup);
btn = new FlxButton(197, 164, onPlayButton);
btn.loadGraphic(new FlxSprite().createGraphic(205, 56, 0), new FlxSprite().createGraphic(205, 56, 0));
t1 = new FlxText(0, 3, 205, "PLAY");
t1.setFormat("Arial_black", 34, _slot1.BTN_INACTIVE_COLOR, "center", _slot1.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 34, _slot1.BTN_ACTIVE_COLOR, "center", _slot1.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
buttonsGroup.add(btn);
btn = new FlxButton(197, 351, function ():void{
FlxG.play(_slot1.clickSnd);
GamezheroApi.navigateTo(GamezheroApi.MORE_GAMES);
});
btn.loadGraphic(new FlxSprite().createGraphic(205, 56, 0), new FlxSprite().createGraphic(205, 56, 0));
t1 = new FlxText(0, 5, 205, "More Games");
t1.setFormat("Arial_black", 29, _slot1.BTN_INACTIVE_COLOR, "center", _slot1.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 29, _slot1.BTN_ACTIVE_COLOR, "center", _slot1.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
buttonsGroup.add(btn);
btn = new FlxButton(553, 401, function ():void{
FlxG.play(_slot1.selectSnd);
GamezheroApi.navigateTo(GamezheroApi.MORE_GAMES_FROM_LOGO);
});
spr1 = new FlxSprite(0, 0, ImgSponsor);
spr1.color = 3435973836;
spr2 = new FlxSprite(0, 0, ImgSponsor);
spr2.color = 4294967295;
btn.loadGraphic(spr1, spr2);
add(btn);
btn = new FlxButton(627, 490, function ():void{
FlxG.play(_slot1.selectSnd);
GamezheroApi.navigateTo(GamezheroApi.TWITTER);
});
spr1 = new FlxSprite(0, 0, ImgTwitter);
spr1.color = 3435973836;
spr2 = new FlxSprite(0, 0, ImgTwitter);
spr2.color = 4294967295;
btn.loadGraphic(spr1, spr2);
add(btn);
btn = new FlxButton(700, 490, function ():void{
FlxG.play(_slot1.selectSnd);
GamezheroApi.navigateTo(GamezheroApi.FACEBOOK);
});
spr1 = new FlxSprite(0, 0, ImgFacebook);
spr1.color = 3435973836;
spr2 = new FlxSprite(0, 0, ImgFacebook);
spr2.color = 4294967295;
btn.loadGraphic(spr1, spr2);
add(btn);
btn = new FlxButton(197, 0x0100, onOptionsButton);
btn.loadGraphic(new FlxSprite().createGraphic(205, 56, 0), new FlxSprite().createGraphic(205, 56, 0));
t1 = new FlxText(0, 5, 205, "Options");
t1.setFormat("Arial_black", 29, _slot1.BTN_INACTIVE_COLOR, "center", _slot1.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 29, _slot1.BTN_ACTIVE_COLOR, "center", _slot1.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
buttonsGroup.add(btn);
btn = new FlxButton(152, 421, function ():void{
FlxG.play(_slot1.clickSnd);
FlxU.openURL("http://www.speedygames.com/pc-games/puzzle/en_docker-sokoban/");
});
btn.loadGraphic(new FlxSprite().createGraphic(305, 56, 0), new FlxSprite().createGraphic(305, 56, 0));
t1 = new FlxText(0, 5, 305, "Download PC Version");
t1.setFormat("Arial_black", 24, _slot1.BTN_INACTIVE_YELLOW_COLOR, "center", _slot1.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 24, _slot1.BTN_ACTIVE_COLOR, "center", _slot1.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
buttonsGroup.add(btn);
if (((!(FlxG.music)) || (!(FlxG.music.active)))){
FlxG.playMusic(musicSnd);
};
FlxG.mute = save.data.mute;
FlxG.musicVolume = save.data.musicVol;
optionsMenu = new OptionsMenu();
add(optionsMenu);
optionsMenu.hide();
var tracker:AnalyticsTracker = new GATracker(this, "UA-16063069-2", "AS3");
tracker.trackPageview("/dockerSokoban/Menu");
}
public function onOptionsButton():void{
optionsMenu.show();
buttonsGroup.activate(false);
FlxG.play(_slot1.clickSnd);
}
public static function muteMusic(_arg1:int=-1):Boolean{
if (!FlxG.music){
return (false);
};
if (_arg1 == -1){
if (FlxG.musicVolume > 0){
FlxG.musicVolume = 0;
} else {
FlxG.musicVolume = MUSIC_VOL;
};
} else {
if (_arg1 == 0){
FlxG.musicVolume = 0;
} else {
if (_arg1 == 1){
FlxG.musicVolume = MUSIC_VOL;
};
};
};
save.data.musicVol = FlxG.musicVolume;
if (FlxG.musicVolume > 0){
return (true);
};
return (false);
}
public static function muteSound(_arg1:int=-1):Boolean{
if (_arg1 == -1){
FlxG.mute = !(FlxG.mute);
} else {
if (_arg1 == 0){
FlxG.mute = true;
} else {
if (_arg1 == 1){
FlxG.mute = false;
};
};
};
save.data.mute = FlxG.mute;
return (!(FlxG.mute));
}
}
}//package com.logicking.sokoban
Section 100
//MenuState_arialBlackFont (com.logicking.sokoban.MenuState_arialBlackFont)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_arialBlackFont extends FontAsset {
}
}//package com.logicking.sokoban
Section 101
//MenuState_arialFont (com.logicking.sokoban.MenuState_arialFont)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_arialFont extends FontAsset {
}
}//package com.logicking.sokoban
Section 102
//MenuState_clickSnd (com.logicking.sokoban.MenuState_clickSnd)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_clickSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 103
//MenuState_ImgBackground (com.logicking.sokoban.MenuState_ImgBackground)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_ImgBackground extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 104
//MenuState_ImgCursor (com.logicking.sokoban.MenuState_ImgCursor)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_ImgCursor extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 105
//MenuState_ImgFacebook (com.logicking.sokoban.MenuState_ImgFacebook)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_ImgFacebook extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 106
//MenuState_ImgSponsor (com.logicking.sokoban.MenuState_ImgSponsor)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_ImgSponsor extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 107
//MenuState_ImgTwitter (com.logicking.sokoban.MenuState_ImgTwitter)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_ImgTwitter extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 108
//MenuState_musicSnd (com.logicking.sokoban.MenuState_musicSnd)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_musicSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 109
//MenuState_selectSnd (com.logicking.sokoban.MenuState_selectSnd)
package com.logicking.sokoban {
import mx.core.*;
public class MenuState_selectSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 110
//OptionsMenu (com.logicking.sokoban.OptionsMenu)
package com.logicking.sokoban {
import org.flixel.*;
public class OptionsMenu extends FlxGroupEx {
private const BTN_WIDTH:int = 280;
private const OFFSET_Y:int = 121;
private const OFFSET_X:int = 104;
private var muteBtn:FlxButton;
private var ImgLogicking:Class;
private var muteMusicT1:FlxText;
private var muteMusicT2:FlxText;
private var muteMusicBtn:FlxButton;
private var ImgBackground:Class;
private var muteT1:FlxText;
private var muteT2:FlxText;
public function OptionsMenu(){
var background:FlxSprite;
var t1:FlxText;
var t2:FlxText;
var btn:FlxButton;
ImgBackground = OptionsMenu_ImgBackground;
ImgLogicking = OptionsMenu_ImgLogicking;
super();
FlxG.mouse.show(MenuState.ImgCursor);
background = new FlxSprite(OFFSET_X, OFFSET_Y, ImgBackground);
this.add(background);
btn = new FlxButton((OFFSET_X + 57), (OFFSET_Y + 45), onSoundBtn);
btn.loadGraphic(new FlxSprite().createGraphic(BTN_WIDTH, 56, 0), new FlxSprite().createGraphic(BTN_WIDTH, 56, 0));
t1 = new FlxText(0, 3, BTN_WIDTH, "Sound: On");
t1.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
muteBtn = btn;
muteT1 = t1;
muteT2 = t2;
btn = new FlxButton((OFFSET_X + 57), (OFFSET_Y + 110), onMusicBtn);
btn.loadGraphic(new FlxSprite().createGraphic(BTN_WIDTH, 56, 0), new FlxSprite().createGraphic(BTN_WIDTH, 56, 0));
t1 = new FlxText(0, 3, BTN_WIDTH, "Music: On");
t1.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
muteMusicBtn = btn;
muteMusicT1 = t1;
muteMusicT2 = t2;
updateButtonsTxt();
btn = new FlxButton((OFFSET_X + 57), (OFFSET_Y + 306), onBackButton);
btn.loadGraphic(new FlxSprite().createGraphic(100, 56, 0), new FlxSprite().createGraphic(100, 56, 0));
t1 = new FlxText(0, 3, 100, "Back");
t1.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
btn = new FlxButton((OFFSET_X + 63), (OFFSET_Y + 217), function ():void{
FlxG.play(MenuState.clickSnd);
FlxU.openURL(MenuState.LOGICKING_URL);
});
var spr1:FlxSprite = new FlxSprite(0, 0, ImgLogicking);
spr1.color = 4291611852;
var spr2:FlxSprite = new FlxSprite(0, 0, ImgLogicking);
spr2.color = 4294967295;
btn.loadGraphic(spr1, spr2);
t1 = new FlxText(30, -30, 208, "Developed by");
t1.setFormat("Arial_black", 21, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 21, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
}
override public function show(_arg1:Number=0):void{
super.show();
updateButtonsTxt();
}
public function onSoundBtn():void{
MenuState.muteSound();
updateButtonsTxt();
}
public function updateButtonsTxt():void{
var _local1:FlxText;
var _local2:FlxText;
var _local3:String;
if (MenuState.muteSound(4)){
_local3 = "Sound: On";
} else {
_local3 = "Sound: Off";
};
muteT1.text = _local3;
muteT2.text = _local3;
if (MenuState.muteMusic(4)){
_local3 = "Music: On";
} else {
_local3 = "Music: Off";
};
muteMusicT1.text = _local3;
muteMusicT2.text = _local3;
}
public function onBackButton():void{
hide();
FlxG.play(MenuState.clickSnd);
MenuState.instance.buttonsGroup.activate(true);
}
public function onMusicBtn():void{
MenuState.muteMusic();
updateButtonsTxt();
}
}
}//package com.logicking.sokoban
Section 111
//OptionsMenu_ImgBackground (com.logicking.sokoban.OptionsMenu_ImgBackground)
package com.logicking.sokoban {
import mx.core.*;
public class OptionsMenu_ImgBackground extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 112
//OptionsMenu_ImgLogicking (com.logicking.sokoban.OptionsMenu_ImgLogicking)
package com.logicking.sokoban {
import mx.core.*;
public class OptionsMenu_ImgLogicking extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 113
//Player (com.logicking.sokoban.Player)
package com.logicking.sokoban {
import org.flixel.*;
public class Player extends TileSprite {
protected var animTimePassed:int;
protected var rotating:Boolean;
protected var animatedChest:TileSprite;
protected var animInProgress:Boolean;
protected var targetX:Number;
protected var targetY:Number;
protected var stopTimer:Number;
protected var dirX:Number;
protected var dirY:Number;
protected var moveTimer:Number;
protected var chestMovedToPlace:int;
protected var moveStopped:Boolean;// = true
public static const MAN_MOVE_FPS:Number = 55;
public static const MAN_TURN_TIME:uint = 18;
public static const MAN_MOVE_CHEST_TIME:Number = INF;
public static const MAN_POS_STEP:uint = 17;
public static const MAN_MOVE_CHEST:uint = 10;
public static const MAN_TURN_FPS:Number = 55;
public static const MAN_WALK:uint = 3;
public static const MAN_FRAMES_NUM:uint = 7;
public static const MAN_MOVE_STEP:uint = 5;
public static const MAN_MOVE_TIME:Number = 18;
protected static var STOP_SND_FADE:Number = 0.2;
protected static var START_SND_FADE:Number = 0.1;
public static var moveSnd:FlxSound;
public static var placeSnd:FlxSound;
public static var pushSnd:FlxSound;
public function Player(){
super(0, 0, MAN);
FRAMES_WIDTH = 4;
addAnimation("idle_right", [0]);
addAnimation("idle_up", [1]);
addAnimation("idle_down", [2]);
addAnimation("idle_left", [3]);
addAnimation("move_right", [12, 16, 20, 24, 28, 32, 36], MAN_MOVE_FPS);
addAnimation("move_up", [13, 17, 21, 25, 29, 33, 37], MAN_MOVE_FPS);
addAnimation("move_down", [14, 18, 22, 26, 30, 34, 38], MAN_MOVE_FPS);
addAnimation("move_left", [15, 19, 23, 27, 31, 35, 39], MAN_MOVE_FPS);
addAnimation("push_right", [(12 + (7 * 4)), (16 + (7 * 4)), (20 + (7 * 4)), (24 + (7 * 4)), (28 + (7 * 4)), (32 + (7 * 4)), (36 + (7 * 4))], MAN_MOVE_FPS);
addAnimation("push_up", [(13 + (7 * 4)), (17 + (7 * 4)), (21 + (7 * 4)), (25 + (7 * 4)), (29 + (7 * 4)), (33 + (7 * 4)), (37 + (7 * 4))], MAN_MOVE_FPS);
addAnimation("push_down", [(14 + (7 * 4)), (18 + (7 * 4)), (22 + (7 * 4)), (26 + (7 * 4)), (30 + (7 * 4)), (34 + (7 * 4)), (38 + (7 * 4))], MAN_MOVE_FPS);
addAnimation("push_left", [(15 + (7 * 4)), (19 + (7 * 4)), (23 + (7 * 4)), (27 + (7 * 4)), (31 + (7 * 4)), (35 + (7 * 4)), (39 + (7 * 4))], MAN_MOVE_FPS);
addAnimation("rotate_left_right", [10, 6, 14, 8, 4], MAN_TURN_FPS);
addAnimation("rotate_right_left", [4, 8, 14, 10, 6], MAN_TURN_FPS);
addAnimation("rotate_up_down", [5, 9, 12, 4, 8], MAN_TURN_FPS);
addAnimation("rotate_down_up", [10, 6, 15, 11, 7], MAN_TURN_FPS);
addAnimation("rotate_left_up", [11, 7], MAN_TURN_FPS);
addAnimation("rotate_up_left", [7, 11], MAN_TURN_FPS);
addAnimation("rotate_left_down", [6, 10], MAN_TURN_FPS);
addAnimation("rotate_down_left", [10, 6], MAN_TURN_FPS);
addAnimation("rotate_right_up", [9, 5], MAN_TURN_FPS);
addAnimation("rotate_up_right", [5, 9], MAN_TURN_FPS);
addAnimation("rotate_right_down", [4, 8], MAN_TURN_FPS);
addAnimation("rotate_down_right", [8, 4], MAN_TURN_FPS);
animInProgress = false;
}
public function stopMove():void{
if (moveStopped){
return;
};
moveStopped = true;
if (moveSnd){
moveSnd.fadeOut(STOP_SND_FADE);
moveSnd = null;
};
if (pushSnd){
pushSnd.fadeOut(STOP_SND_FADE);
pushSnd = null;
};
}
override public function update():void{
super.update();
if (animInProgress){
animTimePassed = (animTimePassed + int((FlxG.elapsed * 1000)));
if (animTimePassed > MAN_MOVE_TIME){
animTimePassed = (animTimePassed % MAN_MOVE_TIME);
x = (x + (dirX * MAN_MOVE_STEP));
y = (y + (dirY * MAN_MOVE_STEP));
if (animatedChest){
animatedChest.x = (animatedChest.x + (dirX * MAN_MOVE_STEP));
animatedChest.y = (animatedChest.y + (dirY * MAN_MOVE_STEP));
};
if (((((rotating) && (finished))) || (((((!(rotating)) && ((Math.abs((x - targetX)) < 0.1)))) && ((Math.abs((y - targetY)) < 0.1)))))){
if (animatedChest){
if (chestMovedToPlace > 0){
animatedChest.play("placed");
FlxG.play(PlayState.stagePlaceSnd);
} else {
if (chestMovedToPlace < 0){
animatedChest.play("normal");
};
};
animatedChest = null;
chestMovedToPlace = 0;
};
animInProgress = false;
};
};
};
}
public function move(_arg1:uint, _arg2:TileSprite=null, _arg3:int=0):void{
if (((animInProgress) && (!(rotating)))){
return;
};
moveStopped = false;
dirX = Room.movingTo[_arg1].x;
dirY = Room.movingTo[_arg1].y;
targetX = (x + (PlayState.SQUARESIZE * dirX));
targetY = (y + (PlayState.SQUARESIZE * dirY));
var _local4 = "move_";
if (_arg2){
animatedChest = _arg2;
_local4 = "push_";
chestMovedToPlace = _arg3;
if (((!(pushSnd)) || (!(pushSnd.playing)))){
pushSnd = FlxG.play(PlayState.stagePushSnd, 1, true);
pushSnd.fadeIn(START_SND_FADE);
};
} else {
animatedChest = null;
if (((pushSnd) && (pushSnd.playing))){
pushSnd.fadeOut(STOP_SND_FADE);
pushSnd = null;
};
};
play((_local4 + Room.movingToName[_arg1]));
animInProgress = true;
rotating = false;
if (((!(moveSnd)) || (!(moveSnd.playing)))){
moveSnd = FlxG.play(PlayState.stageMoveSnd, 1, true);
moveSnd.fadeIn(START_SND_FADE);
};
}
public function isAnimating():Boolean{
return (animInProgress);
}
public function rotate(_arg1:uint, _arg2:uint):void{
play(((("rotate_" + Room.movingToName[_arg2]) + "_") + Room.movingToName[_arg1]));
dirX = 0;
dirY = 0;
rotating = true;
animInProgress = true;
}
override protected function calcTextCoords(_arg1:uint):void{
texX = ((1 + (_arg1 % FRAMES_WIDTH)) + (frameWidth * (_arg1 % FRAMES_WIDTH)));
texY = ((1 + uint((_arg1 / FRAMES_WIDTH))) + (frameHeight * uint((_arg1 / FRAMES_WIDTH))));
}
}
}//package com.logicking.sokoban
Section 114
//PlayState (com.logicking.sokoban.PlayState)
package com.logicking.sokoban {
import org.flixel.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import com.google.analytics.*;
public class PlayState extends FlxState {
private var numOfRooms:uint;
private var DockAnim:Class;
private var DockMoveSnd:Class;
private var DockMan:Class;
private var previousMoveDir:int;
private var movingToX:int;
private var movingToY:int;
private var isMoving:Boolean;
private var DockPushSnd:Class;
private var recentPath:Array;
public var currentRoomIdx:uint;// = 0
private var DockSolvings:Class;
private var imgWall:Class;
private var emptyAnims:Array;
private var imgEmpty:Class;
private var undoMoveSnd:Class;
private var DockPlaceSnd:Class;
private var selectSquareSprite:FlxSprite;
private var pushPath:Boolean;
private var oldMouseX:int;
private var oldMouseY:int;
private var wallNum:int;
private var DockStage:Class;
private var DockChest:Class;
private var pathToMove:Array;
private var previousMousePressed:Boolean;// = false
private var DockSound:Class;
private var escapeMenu:EscapeMenu;
private var wallAnimNum:int;
private var finishRoomMenu:FinishRoom;
private var imgMan:Class;
private var emptyAnimNum:int;
private var pushDirImg:Class;
private var mouseWhenClickedY:int;
private var moveSquareSprite:FlxSprite;
private var inGameMenu:InGameGui;
private var DockEmpty:Class;
private var DockWall:Class;
private var pushDirSprite:FlxSprite;
private var mouseDir:int;// = 0
private var DockFinishSnd:Class;
private var stageData:String;
private var selectSquareImg:Class;
private var DockIntroSnd:Class;
private var mouseWhenClickedX:int;
private var wallAnims:Array;
private var pushCursorZone:Sprite;
private var tutorialMenu:TutorialMenu;
private var pushMode:Boolean;
private var manWhenClickedX:int;
private var manWhenClickedY:int;
private var oldMousePixelX:int;
private var oldMousePixelY:int;
private var currentRoom:Room;
private var emptyNum:int;
private var previousResult:int;
private var imgChest:Class;
private var rooms:Array;
public static const ROOM_HEIGHT:uint = 17;
public static const SQUARESIZE:uint = 35;
public static const SCREEN_OFFSET_X:uint = 15;
public static const SCREEN_OFFSET_Y:uint = 2;
public static const ROOM_WIDTH:uint = 22;
public static const ROOM_AREA:uint = 374;
public static var stagePlaceSnd:Class;
public static var stageMoveSnd:Class;
public static var stageIntroSnd:Class;
private static var ceilSprites:Array;
private static var chestsGroup:FlxGroup;
public static var stagePushSnd:Class;
private static var placesGroup:FlxGroup;
private static var chestSprites:Array;
public static var instance:PlayState;
private static var guiGroup:FlxGroup;
private static var floorSprites:Array;
private static var wallSprites:Array;
public static var stageMusicSnd:Class;
private static var manSprite:Player;
private static var manGroup:FlxGroup;
private static var placeSprites:Array;
public static var undoWaitTime:Number = 0;
private static var floorAndWallGroup:FlxGroup;
private static var roomIsFinished:Boolean = false;
public static var stageFinishSnd:Class;
private static var ceilGroup:FlxGroup;
public function PlayState(_arg1:int=1):void{
DockWall = PlayState_DockWall;
DockEmpty = PlayState_DockEmpty;
DockMan = PlayState_DockMan;
DockChest = PlayState_DockChest;
DockIntroSnd = PlayState_DockIntroSnd;
DockFinishSnd = PlayState_DockFinishSnd;
DockMoveSnd = PlayState_DockMoveSnd;
DockPushSnd = PlayState_DockPushSnd;
DockPlaceSnd = PlayState_DockPlaceSnd;
selectSquareImg = PlayState_selectSquareImg;
pushDirImg = PlayState_pushDirImg;
undoMoveSnd = PlayState_undoMoveSnd;
DockStage = PlayState_DockStage;
DockAnim = PlayState_DockAnim;
DockSound = PlayState_DockSound;
DockSolvings = PlayState_DockSolvings;
escapeMenu = new EscapeMenu();
finishRoomMenu = new FinishRoom();
inGameMenu = new InGameGui();
tutorialMenu = new TutorialMenu();
instance = this;
super();
loadStage(new DockStage(), new DockAnim(), new DockSolvings());
imgWall = DockWall;
imgEmpty = DockEmpty;
imgChest = DockChest;
imgMan = DockMan;
stageIntroSnd = DockIntroSnd;
stageFinishSnd = DockFinishSnd;
stageMoveSnd = DockMoveSnd;
stagePushSnd = DockPushSnd;
stagePlaceSnd = DockPlaceSnd;
currentRoomIdx = _arg1;
pushCursorZone = new Sprite();
pushCursorZone.x = 0;
pushCursorZone.y = 0;
pushCursorZone.width = 100;
pushCursorZone.height = 100;
pushCursorZone.useHandCursor = true;
addChild(pushCursorZone);
}
public function initRoom():void{
var _local4:int;
var _local5:TileSprite;
currentRoom = rooms[currentRoomIdx].clone();
chestSprites = new Array();
placeSprites = new Array();
placesGroup.destroy();
chestsGroup.destroy();
initPlayer();
var _local1:int;
var _local2:int;
while (_local2 < ROOM_HEIGHT) {
_local4 = 0;
while (_local4 < ROOM_WIDTH) {
if (getCurrentRoom().roomData[_local1].wall > 0){
wallSprites[_local1].initTile(imgWall, wallAnims, (getCurrentRoom().roomData[_local1].wall - 1));
wallSprites[_local1].visible = true;
} else {
wallSprites[_local1].visible = false;
};
if (getCurrentRoom().roomData[_local1].empty > 0){
floorSprites[_local1].initTile(imgEmpty, emptyAnims, (getCurrentRoom().roomData[_local1].empty - 1));
ceilSprites[_local1].initTile(imgEmpty, emptyAnims, (getCurrentRoom().roomData[_local1].empty - 1));
floorSprites[_local1].visible = true;
ceilSprites[_local1].visible = true;
} else {
floorSprites[_local1].visible = false;
ceilSprites[_local1].visible = false;
};
if (getCurrentRoom().roomData[_local1].place > 0){
_local5 = new TileSprite((SCREEN_OFFSET_X + (_local4 * SQUARESIZE)), (SCREEN_OFFSET_Y + (_local2 * SQUARESIZE)), TileSprite.ITEM);
placeSprites.push(_local5);
placesGroup.add(_local5);
_local5.initTile(imgChest, null, (((getCurrentRoom().roomData[_local1].place - 1) * 3) + 1));
};
if (getCurrentRoom().roomData[_local1].chest > 0){
_local5 = new TileSprite((SCREEN_OFFSET_X + (_local4 * SQUARESIZE)), (SCREEN_OFFSET_Y + (_local2 * SQUARESIZE)), TileSprite.ITEM);
chestSprites.push(_local5);
chestsGroup.add(_local5);
_local5.initTile(imgChest, null, ((getCurrentRoom().roomData[_local1].chest - 1) * 3));
if (getCurrentRoom().roomData[_local1].chest == getCurrentRoom().roomData[_local1].place){
_local5.play("placed");
};
};
_local1++;
_local4++;
};
_local2++;
};
FlxG.play(stageIntroSnd);
FlxG.mouse.reset();
pathToMove = null;
isMoving = false;
pushMode = false;
tutorialMenu.hide();
if (currentRoomIdx == 0){
tutorialMenu.show();
};
var _local3:AnalyticsTracker = new GATracker(this, "UA-16063069-2", "AS3");
_local3.trackPageview((("/dockerSokoban/room_" + currentRoomIdx) as String));
}
public function initPlayer():void{
manSprite.loadGraphic(imgMan, true, false, SQUARESIZE, SQUARESIZE);
manSprite.x = (SCREEN_OFFSET_X + (getCurrentRoom().manPosX * SQUARESIZE));
manSprite.y = (SCREEN_OFFSET_Y + (getCurrentRoom().manPosY * SQUARESIZE));
drawManStanding();
}
public function initScene():void{
var _local2:int;
var _local3:uint;
wallSprites = new Array(ROOM_AREA);
floorSprites = new Array(ROOM_AREA);
ceilSprites = new Array(ROOM_AREA);
floorAndWallGroup = new FlxGroup();
placesGroup = new FlxGroup();
chestsGroup = new FlxGroup();
manGroup = new FlxGroup();
ceilGroup = new FlxGroup();
pushDirSprite = new FlxSprite(0, 0);
selectSquareSprite = new FlxSprite(0, 0);
moveSquareSprite = new FlxSprite(0, 0);
this.add(floorAndWallGroup);
this.add(placesGroup);
this.add(selectSquareSprite);
this.add(moveSquareSprite);
this.add(chestsGroup);
this.add(pushDirSprite);
this.add(manGroup);
this.add(ceilGroup);
this.add(tutorialMenu);
tutorialMenu.hide();
this.add(escapeMenu);
escapeMenu.hide();
this.add(finishRoomMenu);
finishRoomMenu.hide();
finishRoomMenu.parent = this;
this.add(inGameMenu);
inGameMenu.show();
var _local1:int;
while (_local1 < ROOM_HEIGHT) {
_local2 = 0;
while (_local2 < ROOM_WIDTH) {
_local3 = ((_local1 * ROOM_WIDTH) + _local2);
wallSprites[_local3] = new TileSprite((SCREEN_OFFSET_X + (_local2 * SQUARESIZE)), (SCREEN_OFFSET_Y + (_local1 * SQUARESIZE)), TileSprite.WALL);
floorSprites[_local3] = new TileSprite((SCREEN_OFFSET_X + (_local2 * SQUARESIZE)), (SCREEN_OFFSET_Y + (_local1 * SQUARESIZE)), TileSprite.FLOOR);
ceilSprites[_local3] = new TileSprite((SCREEN_OFFSET_X + (_local2 * SQUARESIZE)), (SCREEN_OFFSET_Y + (_local1 * SQUARESIZE)), TileSprite.CEIL);
floorAndWallGroup.add(floorSprites[_local3]);
floorAndWallGroup.add(wallSprites[_local3]);
ceilGroup.add(ceilSprites[_local3]);
_local2++;
};
_local1++;
};
manSprite = new Player();
manGroup.add(manSprite);
pushDirSprite.loadGraphic(pushDirImg, true, false, 35, 35);
pushDirSprite.visible = false;
selectSquareSprite.loadGraphic(selectSquareImg, true, false, 35, 35);
selectSquareSprite.visible = false;
moveSquareSprite.loadGraphic(selectSquareImg, true, false, 35, 35);
moveSquareSprite.visible = false;
moveSquareSprite.frame = 1;
Player.moveSnd = FlxG.play(stageMoveSnd, 1, true);
Player.moveSnd.pause();
Player.pushSnd = FlxG.play(stageMoveSnd, 1, true);
Player.pushSnd.pause();
}
public function readShortReversed(_arg1:ByteArray):int{
return ((_arg1.readByte() + (_arg1.readByte() << 8)));
}
public function updatePushDirSprite():void{
var _local3:int;
var _local4:int;
var _local1:int = int(((FlxG.mouse.x - SCREEN_OFFSET_X) / SQUARESIZE));
var _local2:int = int(((FlxG.mouse.y - SCREEN_OFFSET_Y) / SQUARESIZE));
if (((((!(isMoving)) && (getCurrentRoom().inPosToPush(_local1, _local2, !(pushMode))))) || (pushMode))){
pushDirSprite.visible = true;
pushDirSprite.frame = getCurrentRoom().manRotate;
_local3 = Room.movingTo[getCurrentRoom().manRotate].x;
_local4 = Room.movingTo[getCurrentRoom().manRotate].y;
pushDirSprite.x = (manSprite.x + (_local3 * SQUARESIZE));
pushDirSprite.y = (manSprite.y + (_local4 * SQUARESIZE));
} else {
pushDirSprite.visible = false;
};
}
public function readIntReversed(_arg1:ByteArray):int{
return ((((_arg1.readByte() + (_arg1.readByte() << 8)) + (_arg1.readByte() << 16)) + (_arg1.readByte() << 24)));
}
public function updateFieldCursor(_arg1:int, _arg2:int, _arg3:Boolean=false):void{
var _local4:int;
var _local5:int;
if (((((_arg3) || (!((_arg1 == oldMouseX))))) || (!((_arg2 == oldMouseY))))){
recentPath = getCurrentRoom().findPath(_arg1, _arg2, pushMode);
if (((recentPath) && ((recentPath.length > 0)))){
moveSquareSprite.x = ((getCurrentRoom().pathToX * SQUARESIZE) + SCREEN_OFFSET_X);
moveSquareSprite.y = ((getCurrentRoom().pathToY * SQUARESIZE) + SCREEN_OFFSET_Y);
moveSquareSprite.visible = true;
} else {
moveSquareSprite.visible = false;
};
};
if (((((((isMoving) && (pathToMove))) && ((pathToMove.length > 0)))) && (!(pushMode)))){
selectSquareSprite.x = ((movingToX * SQUARESIZE) + SCREEN_OFFSET_X);
selectSquareSprite.y = ((movingToY * SQUARESIZE) + SCREEN_OFFSET_Y);
selectSquareSprite.visible = true;
} else {
selectSquareSprite.visible = false;
};
if (((pushMode) || (pushPath))){
selectSquareSprite.frame = (getCurrentRoom().manRotate + 2);
moveSquareSprite.frame = (getCurrentRoom().manRotate + 2);
_local4 = Room.movingTo[getCurrentRoom().manRotate].x;
_local5 = Room.movingTo[getCurrentRoom().manRotate].y;
if (pushPath){
if (!pushMode){
moveSquareSprite.frame = 1;
};
moveSquareSprite.x = ((getCurrentRoom().pathToX * SQUARESIZE) + SCREEN_OFFSET_X);
moveSquareSprite.y = ((getCurrentRoom().pathToY * SQUARESIZE) + SCREEN_OFFSET_Y);
} else {
if (FlxG.mouse.justPressed()){
moveSquareSprite.x = (((_arg1 + _local4) * SQUARESIZE) + SCREEN_OFFSET_X);
moveSquareSprite.y = (((_arg2 + _local5) * SQUARESIZE) + SCREEN_OFFSET_Y);
moveSquareSprite.visible = true;
};
};
} else {
selectSquareSprite.frame = 0;
moveSquareSprite.frame = 1;
};
}
public function parseAnims(_arg1:Array, _arg2:int, _arg3:Array, _arg4:int):int{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:Number;
var _local5:int;
while (_local5 < _arg2) {
var _temp1 = _arg4;
_arg4 = (_arg4 + 1);
_local6 = parseInt(_arg3[_temp1]);
var _temp2 = _arg4;
_arg4 = (_arg4 + 1);
_local7 = parseInt(_arg3[_temp2]);
var _temp3 = _arg4;
_arg4 = (_arg4 + 1);
_local8 = parseInt(_arg3[_temp3]);
var _temp4 = _arg4;
_arg4 = (_arg4 + 1);
_local9 = parseInt(_arg3[_temp4]);
_local10 = new Array();
_local11 = 0;
while (_local11 < _local7) {
_local10.push((_local6 + _local11));
_local11++;
};
if (_local9){
_local11 = (_local7 - 2);
while (_local11 > 0) {
_local10.push((_local6 + _local11));
_local11--;
};
};
_local12 = ((_local8)>0) ? (1000 / (_local8 * 18)) : 0;
_arg1[_local6] = [_local12, _local10];
_local5++;
};
return (_arg4);
}
public function getCurrentRoom():Room{
return (currentRoom);
}
public function onEscapeMenu():void{
if (finishRoomMenu.visible){
return;
};
if (!escapeMenu.visible){
escapeMenu.show();
} else {
escapeMenu.hide();
};
}
public function drawMoveBack(_arg1:uint):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Item;
if (_arg1 == Room.CANT_MOVE){
return;
};
if (_arg1 == Room.CHEST_MOVED){
_local2 = 0;
while (_local2 < chestSprites.length) {
if (chestSprites[_local2].overlapsPoint(((manSprite.x + 1) + (Room.movingTo[getCurrentRoom().manRotate].x * SQUARESIZE)), ((manSprite.y + 1) + (Room.movingTo[getCurrentRoom().manRotate].y * SQUARESIZE)))){
break;
};
_local2++;
};
_local3 = (getCurrentRoom().manPosX + Room.movingTo[getCurrentRoom().manRotate].x);
_local4 = (getCurrentRoom().manPosY + Room.movingTo[getCurrentRoom().manRotate].y);
_local5 = ((_local4 * getCurrentRoom().width) + _local3);
_local6 = getCurrentRoom().roomData[_local5];
chestSprites[_local2].x = (chestSprites[_local2].x - (SQUARESIZE * Room.movingTo[getCurrentRoom().manRotate].x));
chestSprites[_local2].y = (chestSprites[_local2].y - (SQUARESIZE * Room.movingTo[getCurrentRoom().manRotate].y));
if (_local6.chest == _local6.place){
chestSprites[_local2].play("placed");
} else {
chestSprites[_local2].play("normal");
};
};
manSprite.x = (manSprite.x - (SQUARESIZE * Room.movingTo[getCurrentRoom().manRotate].x));
manSprite.y = (manSprite.y - (SQUARESIZE * Room.movingTo[getCurrentRoom().manRotate].y));
FlxG.play(undoMoveSnd);
drawManStanding();
}
public function readByteUnsigned(_arg1:ByteArray):uint{
var _local2:int = _arg1.readByte();
return (((_local2 >= 0)) ? _local2 : (_local2 + 0x0100));
}
public function updateMouseCursor():Boolean{
if ((((oldMousePixelX == FlxG.mouse.x)) && ((oldMousePixelY == FlxG.mouse.y)))){
return (false);
};
mouseDir = -1;
oldMousePixelX = FlxG.mouse.x;
oldMousePixelY = FlxG.mouse.y;
var _local1:int = ((-(manSprite.x) + FlxG.mouse.x) - (SQUARESIZE / 2));
var _local2:int = ((-(manSprite.y) + FlxG.mouse.y) - (SQUARESIZE / 2));
var _local3:Point = new Point(FlxG.mouse.x, FlxG.mouse.y);
if (_local1 < 0){
if (Math.abs(_local2) < (-(_local1) / 2)){
mouseDir = Room.WEST;
} else {
if (_local2 < (-(_local1) / 2)){
mouseDir = Room.NORTH;
} else {
mouseDir = Room.SOUTH;
};
};
} else {
if (Math.abs(_local2) < (_local1 / 2)){
mouseDir = Room.EAST;
} else {
if (_local2 < (_local1 / 2)){
mouseDir = Room.NORTH;
} else {
mouseDir = Room.SOUTH;
};
};
};
return (true);
}
public function loadStage(_arg1:ByteArray, _arg2:String, _arg3:ByteArray):void{
var j:int;
var item:Item;
var data = _arg1;
var animData = _arg2;
var solvings = _arg3;
var calcPath:Function = function (_arg1:String):Array{
var _local4:String;
var _local2:Array = new Array();
var _local3:int;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
if ((((_local4 == "n")) || ((_local4 == "N")))){
_local2.unshift(Room.NORTH);
} else {
if ((((_local4 == "s")) || ((_local4 == "S")))){
_local2.unshift(Room.SOUTH);
} else {
if ((((_local4 == "e")) || ((_local4 == "E")))){
_local2.unshift(Room.EAST);
} else {
if ((((_local4 == "w")) || ((_local4 == "W")))){
_local2.unshift(Room.WEST);
};
};
};
};
_local3++;
};
return (_local2);
};
data.readByte();
data.readMultiByte(readByteUnsigned(data), "iso-8859-1");
data.readMultiByte(readByteUnsigned(data), "iso-8859-1");
data.readMultiByte(readByteUnsigned(data), "iso-8859-1");
data.readMultiByte(readByteUnsigned(data), "iso-8859-1");
data.readMultiByte(readByteUnsigned(data), "iso-8859-1");
numOfRooms = readIntReversed(data);
rooms = new Array(numOfRooms);
var i:int;
while (i < numOfRooms) {
rooms[i] = new Room();
rooms[i].height = readIntReversed(data);
rooms[i].width = readIntReversed(data);
rooms[i].area = readIntReversed(data);
rooms[i].manPosX = readIntReversed(data);
rooms[i].manPosY = readIntReversed(data);
rooms[i].requiredPoints = data.readByte();
j = 0;
while (j < rooms[i].area) {
item = new Item();
item.empty = readByteUnsigned(data);
item.wall = readByteUnsigned(data);
item.chest = readByteUnsigned(data);
item.place = readByteUnsigned(data);
rooms[i].roomData.push(item);
j = (j + 1);
};
i = (i + 1);
};
var animInfo:Array = animData.split("\n");
i = 0;
i = (i + 1);
emptyNum = parseInt(animInfo[i]);
i = (i + 1);
wallNum = parseInt(animInfo[i]);
i = (i + 1);
emptyAnimNum = parseInt(animInfo[i]);
if (emptyAnimNum > 0){
emptyAnims = new Array();
i = parseAnims(emptyAnims, emptyAnimNum, animInfo, i);
};
i = (i + 1);
wallAnimNum = parseInt(animInfo[i]);
if (wallAnimNum > 0){
wallAnims = new Array();
i = parseAnims(wallAnims, wallAnimNum, animInfo, i);
};
rooms[0].solution = calcPath("eeeeeeeeeeeeeEEwwsEEwwwwwwwSSneSwwwswwsSnw");
rooms[1].solution = calcPath("wwSSSSSnnnnneesWnwSSSwsEneSSwnnnnneennwnnESSSSesWWnwSSSSesWWnwSeennnnneennnnneesWnwSSSSSesWWnwSSSSesWnwSennnnneennnwwWWWnwSSSneesswWWWWeeeeennnnneeSWWWWWnwSSSSesWeeeennnneeesWWWWnwSSSneesswWWnwwwnwwwWnwwsEEEEEneeesswwNwnEEneSSnwwsseEneSnwWWWWWWsSSSSSSwsEEwnnnnnnnnnwwsEneSSSSSSSSwsEnnnnnnnnwwsEneSSSSSSesWnwSnennnnnwwsEneSSSSS");
rooms[2].solution = calcPath("nNwNEEEEEEEEEEEEEseNNNNNNssssswwwwwwwwwwwwwwwnNNseSwsEEEEEEEEEEEEEseNNNNNNssssswwwwwwwwwwwwssswwnNennwnnwwssseEEEEEEEEEEEEEseNNNNNNssssswwwwwwwwwwwssswNNwnEEEEEEEEEEEEEEseNNNNNsssswwwwwwwwwwwwwwwnnnNeSSSwsEEEEEEEEEEEEEseNNNNNsssswwwwwwwwwwwwwnnnnnnwSSSSSnnwwssseEEEEEEEEEEEEEseNNNNNsssswwwwwwwwnnNwwnnneeesWSSSSesswwnEEEEEEEEEEseNNNNssswwwwwwwwwwnnnwwnEwnneesSSSSesswwnEEEEEEEEEseNNNNsswwwwwwwwwnnnwwnEneSSSSSesswwnEEEEEEEEseNNNNssswwwwwwwwnnnnnneeesWWnwSSSSSesswwnEEEEEEEEEEseNNNsswwwwwwwwwwnnnnneesWnwSSSSesswwnEEEEEEEEEseNNNsswwwwwwwwwnnnneSSwsEEEEEEEseN");
rooms[3].solution = calcPath("ennnnneneEEssnnwnneeessWWWesswNNeeessWSSSesWWWWWWWWWWWWnwSSneeeeeeeeeeeennnnennwSSSSSesWWWWWWWWWWWWnwSeeeeeeeeeeeennnnneeesWWnwSSSSesWWWWWWWWWnwSSneeeeeeeeennnnnnennwSSSSSSSesWWWWWWWWWnwSeeeeeeeeennnnnnnneeesWWnwSSSSSSSesWWWWWWWWWWWWeeeeeennnnnenEEEseennwSSSSSSesWWWWWWWWWWWeeeeeeeeeennnnnneesssWnwSSSesWWWWWWWswNNNenWWWWWswNNNssseeeeeesseeeeeennnneeeeesWWWWnwSSSesWWWWWWswNNNenWWWWWWswNNssseeeeeeeseeeeennnnnnneeeSSwsseenWWWnwSSSSesWWWWWWWWWWeeeennnnnwnEEEEEseennwSSSSSSesWWWWWWWWWeeeeeeeennnnnwwsEneSSSSesWWWWWWswNNNenWWWWWWswNeeeeessseeeeeeennnnwwsEneSSSesWWWWWWWswNNNenWWWWswNseeeeeesseeeeennnnnnnnwSSSSwsEneSSSesWWWWWWswNNNenWWWWswNsseeeeeeseeeennnnnnnnwwSeessssssswwwwwnnnnnneeEEneSSSSSSesWWWWWWswNNNenWWWsw");
rooms[4].solution = calcPath("wsseeeennenEEEEEEEEEseNwwwwwwwwwnnNNNNNNeennwwSSSSSSSSSwsEEEEEEEEEwwwwwwwwnnnnwwwwnneeEseNNNeennwwSSSSSSSSSwsEEEEEEEEwwwwwwwnnnnnnnnwSessswwwwnneeEneSSSSSSwsEEEEEEEwwwwwwnnnnnnwwwwwwnwwsEEEEEEEneSSSSSSwsEEEEEEneSSnwwwwwwwswsswwwwnnnnnnnNsssssssseeeenneennnnnnnwwwwwWnwwsEEEEEEEneSSSSSSwsEEEneSwsEEEEEEwwwwwnwwwnnnnwwwwsWeneeeessssswwsswwwwnnnnnNNNsseennnwWnwwsEEEEEEEneSSSSSSwsEEEEEEneSwsEEwwwwwnwwnnnnwwsWWWeeeneessssswwsswwwwnnnnnNNNsseennnwWnwwsEEEEEEEneSSSSSSwsEEEEEEneSwsEnwwwwwwwnwwNNsseesswwNEEEEEEEEseNwnEEwwswwwwwwwssswwwwnnnneNwssseNEEEEEEEEEEseNwnEswwwwwwwwwwwwnneSwsEEEEEEEEEEEseNwwwwwwnnnnwwswsSesssswwwwnnneeEEEEEEEEseNssseNNwnwwwwwwwwnnnwnEEEneSSSSwsEEEneSwsEEEnwwwwwwwwnnnwWswNNNsseennnwWnwwsEEEEEEEneSSSSSSwsEEEneSwsEEnwwwwnnnnnnnnwwSessswwwnneEEneSSSSSSwsEEEE");
rooms[5].solution = calcPath("sswwwssseeeeeeeeeennnnneeeeennnnnnnWWWWWWnwSSSSSwsEnnnnneeeeeeennnwwwsSnneeessswwWWWWnwSSSSwsEnnnneeeeeeennWWnwSSneeesswwWWWWnwSSSSwsseNwnEsswsssswwnEseNNNNNenWennneeeeeeessssssswwwwwsssswwwwwwwwwwnneeenEEEseNNNNenWsssswwwwswwwnnnnnneeeeSSSSwsEEEseNNNNennwSesWssswwwwswwwnnEEEwwwnnnneeeesssSwsEEEseNNNNNsssswwwwnwwwnnEEEwwwnneeeesSSSwsEEEseNNNNssswwwwnwwwnnnneeeSnwwwsseeEneSSSwsEEEseNNNsswwwwswwwssseeeeeeeeennnnneeeeeennnnnwwwwNseeeennwwwWWWnwSSSSSnnnneeeeeeesssswwwwNNNseeeennwwwWWWnwSSSSnnnnssneeeeeeesssswwwNseeennwwWswNNseeeennwwwWWWnwSS");
rooms[6].solution = calcPath("wwWWeeeeeeNEEsWWWWWWWeeeeeeSSSesWWWWWWnwSSSwsEwwwnnnnEEneSSSSwwwnnnnEseeeeeeeennnwwwwwwnnwnwwsEsSSSSSSSwsEnnneeeeeeeennnnnennwSSSSSSesWWWWWWWWnwSSSnneeeeeeeennnnnnnnwwssEwnneesSSSSSSesWWWWWWWWWnwSSSnneeeeeeeeennnnnneeesWWnwSSSSSesWWWWWWWnwSSwsEEnneeeeeennnnwwwwwwnnWnwSSSSSSSSwsEEwnnnnnnnneesWnwSSSSSSSwsEnnnnnnneesWnwSSSSesWnwSSeeennnWswNNNennwSSSSSS");
rooms[7].solution = calcPath("swNNNNeEEEEEEneSSSnnwwwwwwwwswwnEEEEEEEEEneSSwwwwwnwwnnwwSwsEEEEEEEEneSSSnnwwwwwwwwnneSwsEEEEEEEneSSnwwwwssssssssswwwwwwwSSwsEEEEwwwnnneeeeeeennnnnnnnnwwwsssssswNwwwwnneeSnwwsseEEEseNNNNNwnEEEEEEneSSSnnwwwwwwssssswwwwwnEnwwwsEEsswNeeesWsSSSwsEEEEwwwnnnnnnwwsEneSSSSSwsEEEwwnnnnnnwnneSSSSSSSSwsEEEwwnnnnnnnnnwwwsEEneSSSSSSSSwsEEwnnnnnnneeeennwSesWWWswwnneSSSSSSwsEEwnnnnnnnneSwsEEEseNNNNNwnEEEEEEneS");
rooms[8].solution = calcPath("sSSSWWWnwwswsseenNNwnEEwsssseNNwnEswwwwswsEEnnennwwSSesswwnEseNwnEEEseNNwnnnwWnwSSSSSesswwnEseNwnEEneesswNNseeeennnnWWWWWWnwSSSSSesswwnEseNwnEEEseNeesseNNNNNenWWWWWWWnwSSSSSesswwnEseNwnnneesseessEwnneeessswNNenWWesswwwnnnwnwwsssseEEEEwwnnnwnwwnneeeeeeessssssswNNenWsswwwwwwnnE");
rooms[9].solution = calcPath("wnnWnwWsESWWsswwnWnwSenneenEEsswsWenennwwsSSSSSSSSSSSSesWWWWWWWeeeeeennnnnnnnnnnnnwwssEwnneesSSSSSSSSSSesWWWWWWWeeeeeennnnnnnnnnneeeEEseenWWWWWWennwwsSSSSSSSSSSSSesWWWWWWeeeeennnnnnnnnnnneeeeenWnWSesWWWswwwnneeSSSSSSSSSSSesWWWWWWeeeeennnnnnnnnnneeennnwSSesWWennwwsSSSSSSSSSSSSesWWWWWeeeennnnnnnnnneeeNNennwSesWWWennwwsSSSSSSSSSSSesWWWWWeeeennnnnnnnnnneeeeesssswwssswNWeenneennnnwwwwwsssssSSSSSSesWWWWeeennnnnneeennwSesWWenneeennnnwwwwwsssssSSSSSesWWWWeeennnnnnnnnnwwwnwwSEEEEwnneesSSSSSSSSSSSesWWWeennnnnnnnnnnwwwwwwsseNwnEEEEEwnneesSSSSSSSSSSesWWWeennnnnnnnnnwwwwwsseeNswwnneEEEwnneesSSSSSSSSSSSesW");
rooms[10].solution = calcPath("nwnnEwsseNEEseNwwwssEwnwwssseseeNNsswwnnwnneeneeesssWNennwwwssEEseNwwwnwwssseseenNsswwnnwnneesEEwwnwwssseEseNNswwnwnneesEwnnwnneeSnwwsseEEwnnwSwsE");
rooms[11].solution = calcPath("sSeesswNWWWWeeennnnnwwwwwwwwsseSeeesSSSSSSwsEEEwwnnnnnneeeeesswNenWWWWeeennnnnwwwwwwwwssseeeesSSSSSSSwsEEEwwnnnnnnneeeennnnnwwsssSnnnneessssswWWennnnnwwwwwwssseeeesSSSSSSSwsEEwnnnnnnneenWennnnwwwwwwssseeeeSSSSSSSwsEEwnnnnnnnnEwwwwwnnneeeeeessSSnnnneessssswWWnwSSSSSSSesWWWWeeennnnnnnnnwwwwsseNwnEEEEEsseeennnnnwwssSSnnnneessssswWWnwSSSSSSesWWWWeeennnnnnnnwwwwnnneSSwsEEEEEwwwwnnneeeeessSSnnnneessssswWWnwSSSSSSSesWWWeennnnnnnnnwwwsseNwnEEEEsseeennnnnwwssSSnnnneessssswWWnwSSSSSSesWWWeennnnnnnnwwwwnneeSwsEEEEwwwnnneeeessSSnnnneessssswWWnwSSSSSSSesWWennnnnnneeeeeenWswwwnnnnneesssSesWWWWnwSSSSSSesW");
rooms[12].solution = calcPath("ewWWnwwssseeNNenWseeenWWswsseNNsswwwnEse");
rooms[13].solution = calcPath("eeNNwnWneeesWssswsseNNseEseeNWWWWswNenWWWnwSSSSSSSwsEEEEEwwwwnnnnnnneeeeseeeeEEseenWWWWWWWWswNenWWWnwSSSSSSwsEEEEEwwwwnnnnnneeeeNNennwSSSSwsEEEEEEEseenWWWWWWWWswNenWWWnwSSSSSSwsEEEEwwwnnnnnneeeennnnwwsEneSSSSwsEEEEEEEseenWWWWWWWWswNenWWWnwSSSSSSSwsEEEEwwwnnnnnnneeeennnnwwwwsEEEneSSSSwsEEEEEEEseenWWWWWWWWswNenWWWnwSSSSSSSwsEEEwwnnnnnnneeeeseennEnWWnwSSSnneessswWswNenWWWnwSSSSSSwsEEEwwnnnnnneeeenneeeeesWWnwSSnnwwssseEseenWWWWswNenWWWnwSSSSSSSwsEEwnnnnnnneeeeseenneeSnwwsseEEEseenWWWWWWWWswNenWWWnwSSSSSSwsE");
rooms[14].solution = calcPath("wSneeSWsSeNsesswNNwwwsseNEneesswNwnnnnwwsEneSSnneesWnw");
}
override public function update():void{
var _local5:Boolean;
var _local6:int;
super.update();
if (FlxG.keys.justPressed("ESCAPE")){
pathToMove = null;
drawManStanding();
onEscapeMenu();
return;
};
if (((FlxG.keys.justPressed("R")) && (!(manSprite.isAnimating())))){
initRoom();
FlxG.play(MenuState.selectSnd);
};
if (((((escapeMenu.visible) || (finishRoomMenu.visible))) || ((((tutorialMenu.visible == true)) && ((tutorialMenu.mode == 0)))))){
return;
};
updatePushDirSprite();
var _local1:int = int(((FlxG.mouse.x - SCREEN_OFFSET_X) / SQUARESIZE));
var _local2:int = int(((FlxG.mouse.y - SCREEN_OFFSET_Y) / SQUARESIZE));
if (_local2 >= 15){
if ((((FlxG.mouse.x < 93)) && ((FlxG.mouse.y > 522)))){
_local1 = -1;
} else {
if ((((FlxG.mouse.x > 655)) && ((FlxG.mouse.y > 553)))){
_local1 = 22;
};
};
};
updateFieldCursor(_local1, _local2);
if (((manSprite.isAnimating()) && (!(FlxG.mouse.justPressed())))){
return;
};
var _local3 = -1;
if (FlxG.mouse.pressed()){
previousMousePressed = true;
if (FlxG.mouse.justPressed()){
if (getCurrentRoom().inPosToPush(_local1, _local2)){
pushMode = true;
mouseWhenClickedX = _local1;
mouseWhenClickedY = _local2;
manWhenClickedX = getCurrentRoom().manPosX;
manWhenClickedY = getCurrentRoom().manPosY;
updateFieldCursor(_local1, _local2);
};
};
pathToMove = getCurrentRoom().findPath(_local1, _local2, pushMode);
pushPath = false;
if (((pathToMove) && ((pathToMove.length > 0)))){
pushPath = pushMode;
isMoving = true;
movingToX = getCurrentRoom().pathToX;
movingToY = getCurrentRoom().pathToY;
} else {
isMoving = false;
};
} else {
_local5 = updateMouseCursor();
if (_local5){
if ((((mouseDir >= 0)) && (!((getCurrentRoom().manRotate == mouseDir))))){
_local3 = mouseDir;
};
updatePushDirSprite();
};
if (previousMousePressed){
if (pushMode){
if (!pushPath){
updateFieldCursor(_local1, _local2, true);
};
};
pushMode = false;
updateFieldCursor(_local1, _local2);
};
previousMousePressed = false;
};
if (manSprite.isAnimating()){
return;
};
if (roomIsFinished){
finishRoomMenu.show();
drawManStanding();
roomIsFinished = false;
return;
};
if (isMoving){
if (((pathToMove) && ((pathToMove.length > 0)))){
_local3 = pathToMove[(pathToMove.length - 1)];
if (getCurrentRoom().manRotate == _local3){
pathToMove.pop();
if (pathToMove.length == 0){
oldMousePixelX = -1;
oldMousePixelY = -1;
pushPath = false;
updateFieldCursor(_local1, _local2);
};
};
} else {
isMoving = false;
};
};
if (((FlxG.keys.UP) || (FlxG.keys.W))){
_local3 = Room.NORTH;
pathToMove = null;
} else {
if (((FlxG.keys.DOWN) || (FlxG.keys.S))){
_local3 = Room.SOUTH;
pathToMove = null;
} else {
if (((FlxG.keys.LEFT) || (FlxG.keys.A))){
_local3 = Room.WEST;
pathToMove = null;
} else {
if (((FlxG.keys.RIGHT) || (FlxG.keys.D))){
_local3 = Room.EAST;
pathToMove = null;
} else {
if (FlxG.keys.pressed("SPACE")){
if (FlxG.keys.justPressed("SPACE")){
undoWaitTime = 9999;
};
performUndo();
return;
};
};
};
};
};
var _local4 = -1;
if (_local3 >= 0){
_local4 = getCurrentRoom().moveMan(_local3);
};
if (_local4 == Room.MAN_ROTATED){
manSprite.rotate(getCurrentRoom().manRotate, getCurrentRoom().oldManRotate);
} else {
if (_local4 == Room.MAN_MOVED){
manSprite.move(_local3);
} else {
if (_local4 == Room.CHEST_MOVED){
_local6 = 0;
while (_local6 < chestSprites.length) {
if (chestSprites[_local6].overlapsPoint(((manSprite.x + (SQUARESIZE * Room.movingTo[_local3].x)) + 1), ((manSprite.y + (SQUARESIZE * Room.movingTo[_local3].y)) + 1))){
break;
};
_local6++;
};
manSprite.move(_local3, chestSprites[_local6], getCurrentRoom().scoreChange());
if (getCurrentRoom().requiredPoints == getCurrentRoom().score){
FlxG.play(stageFinishSnd);
roomIsFinished = true;
};
} else {
drawManStanding();
};
};
};
previousMoveDir = _local3;
previousResult = _local4;
oldMouseX = _local1;
oldMouseY = _local2;
}
public function performUndo():void{
pathToMove = null;
if (manSprite.isAnimating()){
return;
};
if (((escapeMenu.visible) || (finishRoomMenu.visible))){
return;
};
if (undoWaitTime < 0.08){
undoWaitTime = (undoWaitTime + FlxG.elapsed);
return;
};
undoWaitTime = 0;
drawMoveBack(getCurrentRoom().makeMoveBack());
}
public function drawManStanding():void{
manSprite.play(("idle_" + Room.movingToName[getCurrentRoom().manRotate]));
manSprite.stopMove();
}
override public function create():void{
super.create();
initScene();
initRoom();
FlxG.mouse.load(null);
FlxG.mouse.show();
}
}
}//package com.logicking.sokoban
Section 115
//PlayState_DockAnim (com.logicking.sokoban.PlayState_DockAnim)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockAnim extends ByteArrayAsset {
}
}//package com.logicking.sokoban
Section 116
//PlayState_DockChest (com.logicking.sokoban.PlayState_DockChest)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockChest extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 117
//PlayState_DockEmpty (com.logicking.sokoban.PlayState_DockEmpty)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockEmpty extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 118
//PlayState_DockFinishSnd (com.logicking.sokoban.PlayState_DockFinishSnd)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockFinishSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 119
//PlayState_DockIntroSnd (com.logicking.sokoban.PlayState_DockIntroSnd)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockIntroSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 120
//PlayState_DockMan (com.logicking.sokoban.PlayState_DockMan)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockMan extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 121
//PlayState_DockMoveSnd (com.logicking.sokoban.PlayState_DockMoveSnd)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockMoveSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 122
//PlayState_DockPlaceSnd (com.logicking.sokoban.PlayState_DockPlaceSnd)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockPlaceSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 123
//PlayState_DockPushSnd (com.logicking.sokoban.PlayState_DockPushSnd)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockPushSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 124
//PlayState_DockSolvings (com.logicking.sokoban.PlayState_DockSolvings)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockSolvings extends ByteArrayAsset {
}
}//package com.logicking.sokoban
Section 125
//PlayState_DockSound (com.logicking.sokoban.PlayState_DockSound)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockSound extends ByteArrayAsset {
}
}//package com.logicking.sokoban
Section 126
//PlayState_DockStage (com.logicking.sokoban.PlayState_DockStage)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockStage extends ByteArrayAsset {
}
}//package com.logicking.sokoban
Section 127
//PlayState_DockWall (com.logicking.sokoban.PlayState_DockWall)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_DockWall extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 128
//PlayState_pushDirImg (com.logicking.sokoban.PlayState_pushDirImg)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_pushDirImg extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 129
//PlayState_selectSquareImg (com.logicking.sokoban.PlayState_selectSquareImg)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_selectSquareImg extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 130
//PlayState_undoMoveSnd (com.logicking.sokoban.PlayState_undoMoveSnd)
package com.logicking.sokoban {
import mx.core.*;
public class PlayState_undoMoveSnd extends SoundAsset {
}
}//package com.logicking.sokoban
Section 131
//PreloaderGamezhero (com.logicking.sokoban.PreloaderGamezhero)
package com.logicking.sokoban {
import flash.display.*;
import com.gamezhero.api.as3.*;
import flash.utils.*;
public class PreloaderGamezhero extends MovieClip {
public var className:String;
public function PreloaderGamezhero(){
super();
className = "com.logicking.sokoban.GameMain";
GamezheroApi.ini(this, "dockersokoban");
GamezheroApi.preloader(function ():void{
onPlayBtn();
});
}
protected function onPlayBtn():void{
var _local2:Object;
var _local1:Class = Class(getDefinitionByName(className));
if (_local1){
_local2 = new (_local1);
addChild((_local2 as DisplayObject));
};
}
}
}//package com.logicking.sokoban
Section 132
//Room (com.logicking.sokoban.Room)
package com.logicking.sokoban {
import org.flixel.*;
import com.logicking.*;
public class Room {
public var moves:Array;
public var width:uint;
public var area:uint;
public var score:int;
public var manRotate:uint;
public var pathToX:int;
public var pathToY:int;
public var requiredPoints:uint;
public var movesNum:uint;
public var roomData:Array;
public var height:uint;
public var oldScore:int;
public var oldManRotate:uint;
public var solution:Array;
public var solving:String;
public var manPosX:uint;
public var manPosY:uint;
public static const MAN_ROTATED:uint = 4;
public static const CANT_MOVE:uint = 0;
public static const MAN_MOVED:uint = 3;
public static const NORTH:uint = 1;
public static const SOUTH:uint = 2;
public static const CANT_MOVE_CHEST:uint = 1;
public static const WEST:uint = 3;
public static const CHEST_MOVED:uint = 2;
public static const EAST:uint = 0;
private static var moveWithChest:Array = ["E", "N", "S", "W"];
public static var movingToName:Array = ["right", "up", "down", "left"];
private static var moveWithoutChest:Array = ["e", "n", "s", "w"];
public static var movingTo:Array = [new FlxPoint(1, 0), new FlxPoint(0, -1), new FlxPoint(0, 1), new FlxPoint(-1, 0)];
public function Room(){
moves = new Array();
solution = new Array();
super();
roomData = new Array();
}
public function moveMan(_arg1:uint):uint{
var _local3:Item;
oldScore = score;
setManRotate(_arg1);
if (manRotate != oldManRotate){
return (MAN_ROTATED);
};
if (((((((((manPosX + movingTo[_arg1].x) < 0)) || (((manPosX + movingTo[_arg1].x) > (width - 1))))) || (((manPosY + movingTo[_arg1].y) < 0)))) || (((manPosY + movingTo[_arg1].y) > (height - 1))))){
return (CANT_MOVE);
};
var _local2:Item = roomData[((((manPosY + movingTo[_arg1].y) * width) + manPosX) + movingTo[_arg1].x)];
if (_local2.wall){
return (CANT_MOVE);
};
if (_local2.chest){
if (((((((((manPosX + (movingTo[_arg1].x * 2)) < 0)) || (((manPosX + (movingTo[_arg1].x * 2)) > (width - 1))))) || (((manPosY + (movingTo[_arg1].y * 2)) < 0)))) || (((manPosY + (movingTo[_arg1].y * 2)) > (height - 1))))){
return (CANT_MOVE_CHEST);
};
_local3 = roomData[((((manPosY + (movingTo[_arg1].y * 2)) * width) + manPosX) + (movingTo[_arg1].x * 2))];
if (((_local3.wall) || (_local3.chest))){
return (CANT_MOVE_CHEST);
};
if (_local3.place){
if ((((_local2.chest == _local3.place)) && (!((_local2.chest == _local2.place))))){
_local3.chest = _local2.chest;
_local2.chest = 0;
score++;
} else {
if ((((_local2.chest == _local2.place)) && (!((_local2.chest == _local3.place))))){
score--;
};
_local3.chest = _local2.chest;
_local2.chest = 0;
};
} else {
if (_local2.chest == _local2.place){
_local3.chest = _local2.chest;
_local2.chest = 0;
score--;
} else {
_local3.chest = _local2.chest;
_local2.chest = 0;
};
};
manPosX = (manPosX + movingTo[_arg1].x);
manPosY = (manPosY + movingTo[_arg1].y);
moves.push(moveWithChest[_arg1]);
movesNum++;
return (CHEST_MOVED);
};
manPosX = (manPosX + movingTo[_arg1].x);
manPosY = (manPosY + movingTo[_arg1].y);
moves.push(moveWithoutChest[_arg1]);
movesNum++;
return (MAN_MOVED);
}
protected function setManRotate(_arg1:uint):void{
oldManRotate = manRotate;
manRotate = _arg1;
}
public function clone():Room{
var _local3:Item;
var _local1:Room = new Room();
_local1.area = area;
_local1.width = width;
_local1.height = height;
_local1.manPosX = manPosX;
_local1.manPosY = manPosY;
_local1.requiredPoints = requiredPoints;
var _local2:int;
while (_local2 < area) {
_local3 = new Item();
_local3.empty = roomData[_local2].empty;
_local3.wall = roomData[_local2].wall;
_local3.chest = roomData[_local2].chest;
_local3.place = roomData[_local2].place;
_local1.roomData.push(_local3);
_local2++;
};
return (_local1);
}
public function findPath(_arg1:int, _arg2:int, _arg3:Boolean):Array{
var openList:Object;
var nextOpenList:Object;
var closedList:Object;
var dX:int;
var dY:int;
var k:int;
var checkX:int;
var checkY:int;
var item:Item;
var i:Object;
var p1:FlxPoint;
var p2:FlxPoint;
var deltaX:int;
var deltaY:int;
var finalPosX = _arg1;
var finalPosY = _arg2;
var pushMode = _arg3;
var createAndCheckNode:Function = function (_arg1:int, _arg2:int, _arg3:Object):void{
var _local4:int = posToIdx(_arg1, _arg2);
var _local5:String = _local4.toString();
if (((((closedList[_local5]) || (openList[_local5]))) || (nextOpenList[_local5]))){
return;
};
if ((((((_local4 > 0)) && ((roomData[_local4].wall == 0)))) && ((roomData[_local4].chest == 0)))){
nextOpenList[_local5] = [_arg1, _arg2, _arg3];
notEmpty = true;
};
};
pathToX = -1;
pathToY = -1;
var path:Array = new Array();
var startPosX:int = manPosX;
var startPosY:int = manPosY;
if (pushMode){
dX = (manPosX - finalPosX);
dY = (manPosY - finalPosY);
if (inPosToPush(finalPosX, finalPosY, false)){
pathToX = (manPosX + movingTo[manRotate].x);
pathToY = (manPosY + movingTo[manRotate].y);
k = 0;
while (k < Math.max((Math.abs(dX) - 1), (Math.abs(dY) - 1))) {
checkX = (pathToX + movingTo[manRotate].x);
checkY = (pathToY + movingTo[manRotate].y);
item = roomData[((checkY * width) + checkX)];
if (((((!(item)) || (item.chest))) || (item.wall))){
break;
};
path.push(manRotate);
pathToX = checkX;
pathToY = checkY;
k = (k + 1);
};
return (path);
} else {
return (null);
};
};
openList = new Object();
nextOpenList = new Object();
closedList = new Object();
var startIdx:int = posToIdx(finalPosX, finalPosY);
createAndCheckNode(finalPosX, finalPosY, null);
openList = nextOpenList;
var found:Boolean;
var notEmpty:Boolean;
var length:int;
while (((notEmpty) && (!(found)))) {
notEmpty = false;
nextOpenList = new Object();
for (i in openList) {
closedList[i] = openList[i];
if ((((openList[i][0] == startPosX)) && ((openList[i][1] == startPosY)))){
found = true;
break;
};
createAndCheckNode((openList[i][0] - 1), openList[i][1], i);
createAndCheckNode((openList[i][0] + 1), openList[i][1], i);
createAndCheckNode(openList[i][0], (openList[i][1] - 1), i);
createAndCheckNode(openList[i][0], (openList[i][1] + 1), i);
};
length = (length + 1);
openList = nextOpenList;
};
if (found){
while ((i as int) != startIdx) {
p1 = idxToPos((i as int));
p2 = idxToPos((closedList[i][2] as int));
deltaX = (p2.x - p1.x);
deltaY = (p2.y - p1.y);
if (deltaX == 1){
path.unshift(EAST);
} else {
if (deltaX == -1){
path.unshift(WEST);
} else {
if (deltaY == 1){
path.unshift(SOUTH);
} else {
if (deltaY == -1){
path.unshift(NORTH);
};
};
};
};
i = closedList[i][2];
};
pathToX = finalPosX;
pathToY = finalPosY;
return (path);
};
return (null);
}
public function idxToPos(_arg1:int):FlxPoint{
if ((((_arg1 < 0)) || ((_arg1 >= area)))){
return (null);
};
var _local2:int = (_arg1 / width);
var _local3:int = (_arg1 - (_local2 * width));
return (new FlxPoint(_local3, _local2));
}
public function makeMoveBack():uint{
var _local4:Item;
oldScore = score;
if (moves.length == 0){
return (CANT_MOVE);
};
var _local1:String = moves.pop();
var _local2:uint = ((manPosY * width) + manPosX);
var _local3:Item = roomData[_local2];
switch (_local1){
case "n":
manPosY = (manPosY + 1);
setManRotate(NORTH);
return (MAN_MOVED);
case "s":
manPosY = (manPosY - 1);
setManRotate(SOUTH);
return (MAN_MOVED);
case "e":
manPosX = (manPosX - 1);
setManRotate(EAST);
return (MAN_MOVED);
case "w":
manPosX = (manPosX + 1);
setManRotate(WEST);
return (MAN_MOVED);
case "N":
_local2 = (((manPosY - 1) * width) + manPosX);
_local4 = roomData[_local2];
_local3.chest = _local4.chest;
_local4.chest = 0;
if (_local3.chest == _local4.place){
score--;
};
if (_local3.chest == _local3.place){
score++;
};
manPosY = (manPosY + 1);
setManRotate(NORTH);
return (CHEST_MOVED);
case "S":
_local2 = (((manPosY + 1) * width) + manPosX);
_local4 = roomData[_local2];
_local3.chest = _local4.chest;
_local4.chest = 0;
if (_local3.chest == _local4.place){
score--;
};
if (_local3.chest == _local3.place){
score++;
};
manPosY = (manPosY - 1);
setManRotate(SOUTH);
return (CHEST_MOVED);
case "E":
_local2 = (((manPosY * width) + manPosX) + 1);
_local4 = roomData[_local2];
_local3.chest = _local4.chest;
_local4.chest = 0;
if (_local3.chest == _local4.place){
score--;
};
if (_local3.chest == _local3.place){
score++;
};
manPosX = (manPosX - 1);
setManRotate(EAST);
return (CHEST_MOVED);
case "W":
_local2 = (((manPosY * width) + manPosX) - 1);
_local4 = roomData[_local2];
_local3.chest = _local4.chest;
_local4.chest = 0;
if (_local3.chest == _local4.place){
score--;
};
if (_local3.chest == _local3.place){
score++;
};
manPosX = (manPosX + 1);
setManRotate(WEST);
return (CHEST_MOVED);
};
return (CANT_MOVE);
}
public function scoreChange():uint{
return ((score - oldScore));
}
public function inPosToPush(_arg1:int, _arg2:int, _arg3:Boolean=true):Boolean{
var _local6:Item;
var _local7:Item;
var _local4:int = (manPosX - _arg1);
var _local5:int = (manPosY - _arg2);
if (((((_arg3) && (((Math.abs(_local4) + Math.abs(_local5)) == 1)))) || (((!(_arg3)) && ((((Utils.sign(-(_local4)) == movingTo[manRotate].x)) && ((Utils.sign(-(_local5)) == movingTo[manRotate].y)))))))){
_local6 = roomData[((((manPosY + movingTo[manRotate].y) * width) + manPosX) + movingTo[manRotate].x)];
_local7 = roomData[((((manPosY + (movingTo[manRotate].y * 2)) * width) + manPosX) + (movingTo[manRotate].x * 2))];
if (((((((_local6) && ((_local6.chest > 0)))) && (_local7))) && ((_local7.wall == 0)))){
return (true);
};
};
return (false);
}
public function posToIdx(_arg1:int, _arg2:int):int{
if ((((((((_arg1 < 0)) || ((_arg1 >= width)))) || ((_arg2 < 0)))) || ((_arg2 >= height)))){
return (-1);
};
var _local3:int = (_arg1 + (_arg2 * width));
return (_local3);
}
}
}//package com.logicking.sokoban
Section 133
//SelectLevelState (com.logicking.sokoban.SelectLevelState)
package com.logicking.sokoban {
import org.flixel.*;
import com.gamezhero.api.as3.*;
public class SelectLevelState extends FlxState {
private const ROOM_NUM:uint = 15;
private var ImgLevel_13:Class;
private var ImgLevel_14:Class;
private var ImgLevel_15:Class;
private var save:FlxSave;
private var ImgBlocked:Class;
private var ImgLevel_1:Class;
private var ImgLevel_2:Class;
private var ImgLevel_3:Class;
private var ImgLevel_5:Class;
private var ImgLevel_6:Class;
private var ImgLevel_7:Class;
private var ImgLevel_8:Class;
private var ImgLevel_9:Class;
private var ImgLevel_4:Class;
private var selectedRoom:int;
protected var arialBlackFont:String;// = "SelectLevelState_arialBlackFont"
private var ImgBackground:Class;
protected var arialFont:String;// = "SelectLevelState_arialFont"
private var ImgLevel_10:Class;
private var ImgLevel_11:Class;
private var ImgLevel_12:Class;
public function SelectLevelState(){
ImgLevel_1 = SelectLevelState_ImgLevel_1;
ImgLevel_2 = SelectLevelState_ImgLevel_2;
ImgLevel_3 = SelectLevelState_ImgLevel_3;
ImgLevel_4 = SelectLevelState_ImgLevel_4;
ImgLevel_5 = SelectLevelState_ImgLevel_5;
ImgLevel_6 = SelectLevelState_ImgLevel_6;
ImgLevel_7 = SelectLevelState_ImgLevel_7;
ImgLevel_8 = SelectLevelState_ImgLevel_8;
ImgLevel_9 = SelectLevelState_ImgLevel_9;
ImgLevel_10 = SelectLevelState_ImgLevel_10;
ImgLevel_11 = SelectLevelState_ImgLevel_11;
ImgLevel_12 = SelectLevelState_ImgLevel_12;
ImgLevel_13 = SelectLevelState_ImgLevel_13;
ImgLevel_14 = SelectLevelState_ImgLevel_14;
ImgLevel_15 = SelectLevelState_ImgLevel_15;
ImgBlocked = SelectLevelState_ImgBlocked;
ImgBackground = SelectLevelState_ImgBackground;
super();
}
override public function create():void{
var background:FlxSprite;
var t1:FlxText;
var t2:FlxText;
var btn:FlxButtonExtended;
var x:int;
var func:Function;
var txt:String;
var imgName:String;
var tc1:uint;
var tc2:uint;
var spr1:FlxSprite;
var spr2:FlxSprite;
var y_offset:uint;
super.create();
FlxG.mouse.show(MenuState.ImgCursor);
save = new FlxSave();
if (save.bind("DockerSokoban")){
if (save.data.levels == null){
save.data.levels = 1;
};
};
background = new FlxSprite(0, 0, ImgBackground);
this.add(background);
var START_POS_X:uint = 71;
var START_POS_Y:uint = 45;
var BTN_WIDTH:uint = 105;
var BTN_HEIGHT:uint = 105;
var STEP_X:uint = 138;
var STEP_Y:uint = 158;
var i:int;
var y:int;
while (y < 3) {
x = 0;
while (x < 5) {
func = null;
if (i < save.data.levels){
func = onPlayButton;
txt = (("Level " + (i + 1)) as String);
imgName = ("ImgLevel_" + (i + 1).toString());
y_offset = 114;
tc1 = MenuState.BTN_INACTIVE_COLOR;
tc2 = MenuState.BTN_ACTIVE_COLOR;
} else {
func = onLockedButton;
txt = "Locked";
imgName = "ImgBlocked";
y_offset = 43;
tc1 = 0xBBBB00;
tc2 = 0xEEEE00;
};
btn = new FlxButtonExtended((START_POS_X + (x * STEP_X)), (START_POS_Y + (y * STEP_Y)), func);
btn.userData = new int(i);
spr1 = new FlxSprite().loadGraphic(this[imgName], false);
spr1.color = 4289379276;
spr2 = new FlxSprite().loadGraphic(this[imgName], false);
btn.loadGraphic(spr1, spr2);
t1 = new FlxText(0, y_offset, BTN_WIDTH, txt);
t1.setFormat("Arial_normal", 18, tc1, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_normal", 18, tc2, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
i = (i + 1);
x = (x + 1);
};
y = (y + 1);
};
btn = new FlxButtonExtended(575, 520, onMenuButton);
btn.loadGraphic(new FlxSprite().createGraphic(205, 56, 0), new FlxSprite().createGraphic(205, 56, 0));
t1 = new FlxText(0, 3, 205, "Menu");
t1.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
btn = new FlxButtonExtended(65, 520, function ():void{
FlxG.play(MenuState.clickSnd);
GamezheroApi.navigateTo(GamezheroApi.MORE_GAMES);
});
btn.loadGraphic(new FlxSprite().createGraphic(205, 56, 0), new FlxSprite().createGraphic(205, 56, 0));
t1 = new FlxText(0, 5, 205, "More Games");
t1.setFormat("Arial_black", 28, MenuState.BTN_INACTIVE_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 28, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
}
public function onLockedButton(_arg1:FlxButtonExtended):void{
}
override public function update():void{
super.update();
if (FlxG.keys.ESCAPE){
onMenuButton();
};
}
public function onPlayButton(_arg1:FlxButtonExtended):void{
selectedRoom = (_arg1.userData as int);
FlxG.play(MenuState.selectSnd);
FlxG.fade.start(4278190080, 0.5, onFade);
}
public function onMenuButton(_arg1:FlxButtonExtended=null):void{
FlxG.state = new MenuState();
FlxG.play(MenuState.clickSnd);
}
private function onFade():void{
FlxG.state = new PlayState(selectedRoom);
}
}
}//package com.logicking.sokoban
Section 134
//SelectLevelState_arialBlackFont (com.logicking.sokoban.SelectLevelState_arialBlackFont)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_arialBlackFont extends FontAsset {
}
}//package com.logicking.sokoban
Section 135
//SelectLevelState_arialFont (com.logicking.sokoban.SelectLevelState_arialFont)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_arialFont extends FontAsset {
}
}//package com.logicking.sokoban
Section 136
//SelectLevelState_ImgBackground (com.logicking.sokoban.SelectLevelState_ImgBackground)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgBackground extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 137
//SelectLevelState_ImgBlocked (com.logicking.sokoban.SelectLevelState_ImgBlocked)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgBlocked extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 138
//SelectLevelState_ImgLevel_1 (com.logicking.sokoban.SelectLevelState_ImgLevel_1)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_1 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 139
//SelectLevelState_ImgLevel_10 (com.logicking.sokoban.SelectLevelState_ImgLevel_10)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_10 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 140
//SelectLevelState_ImgLevel_11 (com.logicking.sokoban.SelectLevelState_ImgLevel_11)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_11 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 141
//SelectLevelState_ImgLevel_12 (com.logicking.sokoban.SelectLevelState_ImgLevel_12)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_12 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 142
//SelectLevelState_ImgLevel_13 (com.logicking.sokoban.SelectLevelState_ImgLevel_13)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_13 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 143
//SelectLevelState_ImgLevel_14 (com.logicking.sokoban.SelectLevelState_ImgLevel_14)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_14 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 144
//SelectLevelState_ImgLevel_15 (com.logicking.sokoban.SelectLevelState_ImgLevel_15)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_15 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 145
//SelectLevelState_ImgLevel_2 (com.logicking.sokoban.SelectLevelState_ImgLevel_2)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_2 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 146
//SelectLevelState_ImgLevel_3 (com.logicking.sokoban.SelectLevelState_ImgLevel_3)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_3 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 147
//SelectLevelState_ImgLevel_4 (com.logicking.sokoban.SelectLevelState_ImgLevel_4)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_4 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 148
//SelectLevelState_ImgLevel_5 (com.logicking.sokoban.SelectLevelState_ImgLevel_5)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_5 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 149
//SelectLevelState_ImgLevel_6 (com.logicking.sokoban.SelectLevelState_ImgLevel_6)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_6 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 150
//SelectLevelState_ImgLevel_7 (com.logicking.sokoban.SelectLevelState_ImgLevel_7)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_7 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 151
//SelectLevelState_ImgLevel_8 (com.logicking.sokoban.SelectLevelState_ImgLevel_8)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_8 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 152
//SelectLevelState_ImgLevel_9 (com.logicking.sokoban.SelectLevelState_ImgLevel_9)
package com.logicking.sokoban {
import mx.core.*;
public class SelectLevelState_ImgLevel_9 extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 153
//TileSprite (com.logicking.sokoban.TileSprite)
package com.logicking.sokoban {
import org.flixel.*;
public class TileSprite extends FlxSprite {
protected var tileType:uint;
protected var FRAMES_WIDTH:uint;// = 16
protected var texX:uint;
protected var texY:uint;
protected var alreadyLoaded:Boolean;// = false
public static const ITEM:uint = 3;
public static const CEIL:uint = 2;
public static const MAN:uint = 4;
public static const WALL:uint = 0;
public static const FLOOR:uint = 1;
public function TileSprite(_arg1:Number, _arg2:Number, _arg3:uint){
tileType = _arg3;
super(_arg1, _arg2);
if (tileType == ITEM){
FRAMES_WIDTH = 3;
} else {
if (tileType == MAN){
FRAMES_WIDTH = 4;
};
};
}
protected function calcTextCoords(_arg1:uint):void{
texX = ((1 + (_arg1 % FRAMES_WIDTH)) + (frameWidth * (_arg1 % FRAMES_WIDTH)));
if ((((tileType == WALL)) || ((tileType == ITEM)))){
texY = ((1 + uint((_arg1 / FRAMES_WIDTH))) + (frameHeight * uint((_arg1 / FRAMES_WIDTH))));
} else {
if (tileType == FLOOR){
texY = ((1 + (uint((_arg1 / FRAMES_WIDTH)) * 2)) + ((frameHeight * uint((_arg1 / FRAMES_WIDTH))) * 2));
} else {
texY = ((1 + (uint((_arg1 / FRAMES_WIDTH)) * 2)) + ((frameHeight * uint((_arg1 / FRAMES_WIDTH))) * 2));
texY = (texY + (frameHeight + 1));
};
};
}
override public function loadGraphic(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:Boolean=false):FlxSprite{
if (alreadyLoaded){
return (this);
};
alreadyLoaded = true;
return (super.loadGraphic(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
override protected function calcFrame():void{
calcTextCoords(frame);
_flashRect.x = texX;
_flashRect.y = texY;
_framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
_flashRect.x = (_flashRect.y = 0);
if (_ct != null){
_framePixels.colorTransform(_flashRect, _ct);
};
if (_callback != null){
_callback(_curAnim.name, _curFrame, _caf);
};
}
public function initTile(_arg1:Class, _arg2:Array, _arg3:uint):void{
var _local4:Array;
loadGraphic(_arg1, true, false, PlayState.SQUARESIZE, PlayState.SQUARESIZE);
var _local5:Number = 0;
if (((_arg2) && (_arg2[_arg3]))){
_local5 = _arg2[_arg3][0];
_local4 = _arg2[_arg3][1];
} else {
_local5 = 0;
_local4 = [_arg3];
};
_animations = new Array();
this.addAnimation("normal", _local4, _local5, true);
this.play("normal", true);
if (tileType == ITEM){
this.addAnimation("placed", [(_local4[0] + 2)], _local5, true);
};
}
}
}//package com.logicking.sokoban
Section 154
//TutorialMenu (com.logicking.sokoban.TutorialMenu)
package com.logicking.sokoban {
import org.flixel.*;
public class TutorialMenu extends FlxGroupEx {
private var keyPressed:Boolean;// = false
private var tutorialImg:Class;
private var showTutorialTime:Number;// = 0
private var tutorialBox:Class;
private var mouseTut:Class;
public var mode:int;// = 0
private var t2:FlxText;
private var t3:FlxText;
private var t1:FlxText;
private var keysTut:Class;
public function TutorialMenu(){
var t:FlxText;
var btn:FlxButton;
tutorialImg = TutorialMenu_tutorialImg;
tutorialBox = TutorialMenu_tutorialBox;
mouseTut = TutorialMenu_mouseTut;
keysTut = TutorialMenu_keysTut;
super();
var spr1:FlxSprite = new FlxSprite(PlayState.SCREEN_OFFSET_X, PlayState.SCREEN_OFFSET_Y, tutorialImg);
add(spr1);
t = new FlxText(122, 495, 200, "Undo move");
t.setFormat("Arial_black", 22, MenuState.BTN_INACTIVE_YELLOW_COLOR, "left");
add(t);
t = new FlxText(122, 520, 200, " or 'spacebar'");
t.setFormat("Arial_black", 16, MenuState.BTN_INACTIVE_YELLOW_COLOR, "left");
add(t);
t = new FlxText(697, 453, 100, "Menu");
t.setFormat("Arial_black", 22, MenuState.BTN_ACTIVE_COLOR, "center");
add(t);
t = new FlxText(697, 478, 100, "or 'esc'");
t.setFormat("Arial_black", 16, MenuState.BTN_ACTIVE_COLOR, "center");
add(t);
spr1 = new FlxSprite(88, 40, tutorialBox);
add(spr1);
t1 = new FlxText(140, 65, 500, "1. Push the cargo to the right places without blocking yourself off. ");
t1.setFormat("Arial_black", 18, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(t1);
t2 = new FlxText(140, 150, 500, "2. Use arrows keys or WASD keys to drive your forklift.");
t2.setFormat("Arial_black", 18, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(t2);
spr1 = new FlxSprite(250, 206, keysTut);
add(spr1);
t2 = new FlxText(140, 295, 500, "3. You can also use mouse to move the forklift and push the items.");
t2.setFormat("Arial_black", 18, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(t2);
spr1 = new FlxSprite(230, 368);
spr1.loadGraphic(mouseTut, true, false, 374, 72, true);
spr1.scale = new FlxPoint(1.2, 1.2);
spr1.addAnimation("normal", [0, 1, 2, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9], 4);
spr1.play("normal");
add(spr1);
btn = new FlxButton(200, 440, function ():void{
keyPressed = true;
});
btn.loadGraphic(new FlxSprite().createGraphic(300, 56, 0), new FlxSprite().createGraphic(300, 56, 0));
t1 = new FlxText(0, 0, 400, "Click or press 'spacebar' to PLAY");
t1.setFormat("Arial_black", 18, MenuState.BTN_INACTIVE_YELLOW_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
t2 = new FlxText(t1.x, t1.y, t1.width, t1.text);
t2.setFormat("Arial_black", 18, MenuState.BTN_ACTIVE_COLOR, "center", MenuState.BTN_ACTIVE_SHADOW_COLOR);
btn.loadText(t1, t2);
add(btn);
}
override public function update():void{
var _local1:uint;
var _local2:uint;
super.update();
if (mode == 0){
if (((!(keyPressed)) && (((FlxG.keys.justPressed("SPACE")) || (FlxG.keys.justPressed("ESCAPE")))))){
keyPressed = true;
};
if (keyPressed == true){
keyPressed = false;
_local1 = members.length;
_local2 = 5;
while (_local2 < _local1) {
if (members[_local2]){
members[_local2].visible = false;
};
_local2++;
};
members[(members.length - 1)].active = false;
mode = 1;
};
} else {
if (mode == 1){
if (((!(keyPressed)) && (((((((((((((((((((((((FlxG.mouse.justPressed()) || (FlxG.keys.justPressed("SPACE")))) || (FlxG.keys.justPressed("ENTER")))) || (FlxG.keys.justPressed("UP")))) || (FlxG.keys.justPressed("LEFT")))) || (FlxG.keys.justPressed("RIGHT")))) || (FlxG.keys.justPressed("DOWN")))) || (FlxG.keys.justPressed("W")))) || (FlxG.keys.justPressed("A")))) || (FlxG.keys.justPressed("S")))) || (FlxG.keys.justPressed("D")))) || (FlxG.keys.justPressed("ESCAPE")))))){
keyPressed = true;
};
if (keyPressed){
keyPressed = false;
mode = 2;
};
} else {
if (mode == 2){
showTutorialTime = (showTutorialTime + FlxG.elapsed);
if (showTutorialTime > 2){
mode = 3;
fadeTime = (originalFadeTime = 1);
};
} else {
if (mode == 3){
if (fadeTime < 0){
hide();
mode = 4;
};
};
};
};
};
}
}
}//package com.logicking.sokoban
Section 155
//TutorialMenu_keysTut (com.logicking.sokoban.TutorialMenu_keysTut)
package com.logicking.sokoban {
import mx.core.*;
public class TutorialMenu_keysTut extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 156
//TutorialMenu_mouseTut (com.logicking.sokoban.TutorialMenu_mouseTut)
package com.logicking.sokoban {
import mx.core.*;
public class TutorialMenu_mouseTut extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 157
//TutorialMenu_tutorialBox (com.logicking.sokoban.TutorialMenu_tutorialBox)
package com.logicking.sokoban {
import mx.core.*;
public class TutorialMenu_tutorialBox extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 158
//TutorialMenu_tutorialImg (com.logicking.sokoban.TutorialMenu_tutorialImg)
package com.logicking.sokoban {
import mx.core.*;
public class TutorialMenu_tutorialImg extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 159
//TutorialScreen (com.logicking.sokoban.TutorialScreen)
package com.logicking.sokoban {
import org.flixel.*;
public class TutorialScreen extends FlxGroupEx {
private var tutorialImg:Class;
public function TutorialScreen(){
var _local7:FlxText;
tutorialImg = TutorialScreen_tutorialImg;
super();
var _local1 = 500;
var _local2 = 155;
var _local3 = 55;
var _local4 = 68;
var _local5 = 17;
var _local6:FlxSprite = new FlxSprite(88, 40, tutorialImg);
add(_local6);
_local7 = new FlxText(_local2, _local3, _local1, "THE GAME IS PAUSED");
_local7.setFormat("Arial_black", _local5, MenuState.BTN_INACTIVE_YELLOW_COLOR, "center", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local7);
_local7 = new FlxText(_local2, (_local3 + _local4), _local1, "ARROWS keys, 'WASD' keys or mouse to move forklift and push the cargo");
_local7.setFormat("Arial_black", _local5, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local7);
_local7 = new FlxText(_local2, (_local3 + (_local4 * 2)), _local1, "'SPACEBAR' or undo button in the bottom left to revert wrong moves");
_local7.setFormat("Arial_black", _local5, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local7);
_local7 = new FlxText(_local2, (_local3 + (_local4 * 3)), _local1, "'R' - to restart current level");
_local7.setFormat("Arial_black", _local5, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local7);
_local7 = new FlxText(_local2, (_local3 + (_local4 * 4)), _local1, "'ESC' - menu");
_local7.setFormat("Arial_black", _local5, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local7);
_local7 = new FlxText(_local2, (_local3 + (_local4 * 5)), _local1, "'P' - pause");
_local7.setFormat("Arial_black", _local5, 2868903935, "left", MenuState.BTN_INACTIVE_SHADOW_COLOR);
add(_local7);
}
}
}//package com.logicking.sokoban
Section 160
//TutorialScreen_tutorialImg (com.logicking.sokoban.TutorialScreen_tutorialImg)
package com.logicking.sokoban {
import mx.core.*;
public class TutorialScreen_tutorialImg extends BitmapAsset {
}
}//package com.logicking.sokoban
Section 161
//Utils (com.logicking.Utils)
package com.logicking {
public class Utils {
public static function sign(_arg1:Number):int{
if (_arg1 > 0){
return (1);
};
if (_arg1 < 0){
return (-1);
};
return (0);
}
}
}//package com.logicking
Section 162
//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.5.0.12683";
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 163
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.5.0.12683";
}
}//package mx.core
Section 164
//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.5.0.12683";
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 165
//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.5.0.12683";
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 166
//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.5.0.12683";
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 167
//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.5.0.12683";
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 168
//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.5.0.12683";
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 169
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.5.0.12683";
}
}//package mx.core
Section 170
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 171
//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 172
//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 173
//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 174
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 175
//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 176
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
import flash.utils.*;
public interface IFlexModuleFactory {
function get preloadedRSLs():Dictionary;
function allowInsecureDomain(... _args):void;
function create(... _args):Object;
function allowDomain(... _args):void;
function info():Object;
}
}//package mx.core
Section 177
//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 178
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 179
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 180
//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 181
//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 182
//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 183
//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 184
//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 185
//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 186
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.5.0.12683";
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 187
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.5.0.12683";
}
}//package mx.core
Section 188
//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 189
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.5.0.12683";
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 190
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.5.0.12683";
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 191
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.5.0.12683";
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 192
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.5.0.12683";
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 193
//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 194
//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 195
//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 196
//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 197
//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 198
//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 199
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var changingListenersInOtherSystemManagers:Boolean;
public static var bootstrapLoaderInfoURL:String;
public static var showMouseCursor:Boolean;
public static var dispatchingEventToOtherSystemManagers:Boolean;
}
}//package mx.managers
Section 200
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 201
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.5.0.12683";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
import mx.events.*;
import flash.net.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
var _local4:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local4 = new ModuleEvent(ModuleEvent.PROGRESS);
_local4.bytesLoaded = info.size;
_local4.bytesTotal = info.size;
dispatchEvent(_local4);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2, _arg3);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
loader.content.removeEventListener("error", moduleErrorHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
loader.content.addEventListener("error", moduleErrorHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{
var _local3:LoaderContext = new LoaderContext();
_local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local3)){
_local3["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.loadBytes(_arg2, _local3);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_arg3){
loadBytes(_arg1, _arg3);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var _local4:URLRequest = new URLRequest(_url);
var _local5:LoaderContext = new LoaderContext();
_local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local5.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local5.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local4, _local5);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((_arg1 is ModuleEvent)){
_local2 = ModuleEvent(_arg1);
} else {
_local2 = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(_local2);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.READY);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(_local2);
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 202
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 203
//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 204
//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 205
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 206
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
import mx.core.*;
public class LocaleSorter {
mx_internal static const VERSION:String = "3.5.0.12683";
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];
appendElements(_local1, extended_langs);
if (script != ""){
_local1.push(script);
};
if (region != ""){
_local1.push(region);
};
appendElements(_local1, variants);
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1.push(_local2);
appendElements(_local1, extensions[_local2]);
};
};
if (privates.length > 0){
_local1.push("x");
appendElements(_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);
}
private static function appendElements(_arg1:Array, _arg2:Array):void{
var _local3:uint;
var _local4:uint = _arg2.length;
while (_local3 < _local4) {
_arg1.push(_arg2[_local3]);
_local3++;
};
}
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 207
//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.5.0.12683";
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 208
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.5.0.12683";
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 209
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.5.0.12683";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function initializeLocaleChain(_arg1:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
private function getSystemPreferredLocales():Array{
var _local1:Array;
if (Capabilities["languages"]){
_local1 = Capabilities["languages"];
} else {
_local1 = [Capabilities.language];
};
return (_local1);
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:String;
var _local3:ResourceModuleInfo = resourceModules[_arg1];
if (!_local3){
return;
};
if (_local3.resourceModule){
_local4 = _local3.resourceModule.resourceBundles;
if (_local4){
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = _local4[_local6].locale;
_local8 = _local4[_local6].bundleName;
removeResourceBundle(_local7, _local8);
_local6++;
};
};
};
resourceModules[_arg1] = null;
delete resourceModules[_arg1];
_local3.moduleInfo.unload();
if (_arg2){
this.update();
};
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 210
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.graphics.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.5.0.12683";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = Math.max((radius - Math.max(_local6.top, _local6.left, _local6.right)), 0);
_local10 = (bRoundedCorners) ? Math.max((radius - Math.max(_local6.bottom, _local6.left, _local6.right)), 0) : 0;
radiusObj = {tl:_local9, tr:_local9, bl:_local10, br:_local10};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local11 = getStyle("highlightAlphas");
_local12 = (_local11) ? _local11[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local12, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 211
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.5.0.12683";
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 212
//PanelSkin (mx.skins.halo.PanelSkin)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import flash.utils.*;
public class PanelSkin extends HaloBorder {
private var oldControlBarHeight:Number;
protected var _panelBorderMetrics:EdgeMetrics;
private var oldHeaderHeight:Number;
mx_internal static const VERSION:String = "3.5.0.12683";
private static var panels:Object = {};
override public function styleChanged(_arg1:String):void{
super.styleChanged(_arg1);
if ((((((((((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderThicknessTop")))) || ((_arg1 == "borderThicknessBottom")))) || ((_arg1 == "borderThicknessLeft")))) || ((_arg1 == "borderThicknessRight")))) || ((_arg1 == "borderSides")))){
_panelBorderMetrics = null;
};
invalidateDisplayList();
}
override mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Graphics;
var _local8:IContainer;
var _local9:EdgeMetrics;
super.drawBorder(_arg1, _arg2);
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
return;
};
var _local3:String = getStyle("borderStyle");
if (_local3 == "default"){
_local4 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radiusObj = null;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local6 = (bRoundedCorners) ? radius : 0;
_local7 = graphics;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local6, _local6);
if (!bRoundedCorners){
radiusObj = {};
};
_local8 = (parent as IContainer);
if (_local8){
_local9 = _local8.viewMetrics;
backgroundHole = {x:_local9.left, y:_local9.top, w:Math.max(0, ((_arg1 - _local9.left) - _local9.right)), h:Math.max(0, ((_arg2 - _local9.top) - _local9.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local4 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local7.beginFill(Number(backgroundColor), _local4);
_local7.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local7.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
}
override public function get borderMetrics():EdgeMetrics{
var _local4:Number;
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
return (super.borderMetrics);
};
var _local1:Boolean = isPanel(parent);
var _local2:IUIComponent = (_local1) ? Object(parent)._controlBar : null;
var _local3:Number = (_local1) ? Object(parent).getHeaderHeightProxy() : NaN;
if (((_local2) && (_local2.includeInLayout))){
_local4 = _local2.getExplicitOrMeasuredHeight();
};
if (((!((_local4 == oldControlBarHeight))) && (!(((isNaN(oldControlBarHeight)) && (isNaN(_local4))))))){
_panelBorderMetrics = null;
};
if (((!((_local3 == oldHeaderHeight))) && (!(((isNaN(_local3)) && (isNaN(oldHeaderHeight))))))){
_panelBorderMetrics = null;
};
if (_panelBorderMetrics){
return (_panelBorderMetrics);
};
var _local5:EdgeMetrics = super.borderMetrics;
var _local6:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
var _local7:Number = getStyle("borderThickness");
var _local8:Number = getStyle("borderThicknessLeft");
var _local9:Number = getStyle("borderThicknessTop");
var _local10:Number = getStyle("borderThicknessRight");
var _local11:Number = getStyle("borderThicknessBottom");
_local6.left = (_local5.left + (isNaN(_local8)) ? _local7 : _local8);
_local6.top = (_local5.top + (isNaN(_local9)) ? _local7 : _local9);
_local6.right = (_local5.bottom + (isNaN(_local10)) ? _local7 : _local10);
_local6.bottom = (_local5.bottom + (isNaN(_local11)) ? (((_local2) && (!(isNaN(_local9))))) ? _local9 : (isNaN(_local8)) ? _local7 : _local8 : _local11);
oldHeaderHeight = _local3;
if (!isNaN(_local3)){
_local6.top = (_local6.top + _local3);
};
oldControlBarHeight = _local4;
if (!isNaN(_local4)){
_local6.bottom = (_local6.bottom + _local4);
};
_panelBorderMetrics = _local6;
return (_panelBorderMetrics);
}
override mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local3:Array;
var _local4:Number;
super.drawBackground(_arg1, _arg2);
if ((((getStyle("headerColors") == null)) && ((getStyle("borderStyle") == "default")))){
_local3 = getStyle("highlightAlphas");
_local4 = (_local3) ? _local3[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local4, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
override mx_internal function getBackgroundColorMetrics():EdgeMetrics{
if (getStyle("borderStyle") == "default"){
return (EdgeMetrics.EMPTY);
};
return (super.borderMetrics);
}
private static function isPanel(_arg1:Object):Boolean{
var s:String;
var x:XML;
var parent = _arg1;
s = getQualifiedClassName(parent);
if (panels[s] == 1){
return (true);
};
if (panels[s] == 0){
return (false);
};
if (s == "mx.containers::Panel"){
(panels[s] == 1);
return (true);
};
x = describeType(parent);
var xmllist:XMLList = x.extendsClass.(@type == "mx.containers::Panel");
if (xmllist.length() == 0){
panels[s] = 0;
return (false);
};
panels[s] = 1;
return (true);
}
}
}//package mx.skins.halo
Section 213
//TitleBackground (mx.skins.halo.TitleBackground)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class TitleBackground extends ProgrammaticSkin {
mx_internal static const VERSION:String = "3.5.0.12683";
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
super.updateDisplayList(_arg1, _arg2);
var _local3:Number = getStyle("borderAlpha");
var _local4:Number = getStyle("cornerRadius");
var _local5:Array = getStyle("highlightAlphas");
var _local6:Array = getStyle("headerColors");
var _local7 = !((_local6 == null));
StyleManager.getColorNames(_local6);
var _local8:Number = ColorUtil.adjustBrightness2((_local6) ? _local6[1] : 0xFFFFFF, -20);
var _local9:Graphics = graphics;
_local9.clear();
if (_arg2 < 3){
return;
};
if (_local7){
_local9.lineStyle(0, _local8, _local3);
_local9.moveTo(0, _arg2);
_local9.lineTo(_arg1, _arg2);
_local9.lineStyle(0, 0, 0);
drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, _local6, _local3, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 0, _arg1, (_arg2 / 2), {tl:_local4, tr:_local4, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, (_arg2 / 2)));
drawRoundRect(0, 0, _arg1, _arg2, {tl:_local4, tr:_local4, bl:0, br:0}, 0xFFFFFF, _local5[0], null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:_local4, tr:_local4, bl:0, br:0}});
};
}
}
}//package mx.skins.halo
Section 214
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.5.0.12683";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 215
//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.5.0.12683";
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 216
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import flash.geom.*;
import mx.resources.*;
import flash.net.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.5.0.12683";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
if (((((_backgroundImageBounds) && (_arg1))) && (_backgroundImageBounds.equals(_arg1)))){
return;
};
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 217
//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.5.0.12683";
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 218
//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 219
//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 220
//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 221
//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 222
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 223
//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.5.0.12683";
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 224
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.5.0.12683";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 225
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
import mx.core.*;
public class ColorUtil {
mx_internal static const VERSION:String = "3.5.0.12683";
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 226
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.5.0.12683";
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 227
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.5.0.12683";
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 228
//StringUtil (mx.utils.StringUtil)
package mx.utils {
import mx.core.*;
public class StringUtil {
mx_internal static const VERSION:String = "3.5.0.12683";
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 229
//FlxAnim (org.flixel.data.FlxAnim)
package org.flixel.data {
public class FlxAnim {
public var delay:Number;
public var frames:Array;
public var looped:Boolean;
public var name:String;
public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){
name = _arg1;
delay = 0;
if (_arg3 > 0){
delay = (1 / _arg3);
};
frames = _arg2;
looped = _arg4;
}
}
}//package org.flixel.data
Section 230
//FlxConsole (org.flixel.data.FlxConsole)
package org.flixel.data {
import org.flixel.*;
import flash.display.*;
import flash.text.*;
public class FlxConsole extends Sprite {
protected const MAX_CONSOLE_LINES:uint = 0x0100;
protected var _lines:Array;
public var lastElapsed:Number;
protected var _text:TextField;
protected var _fpsUpdate:Boolean;
protected var _console:Sprite;
protected var _Y:Number;
protected var _curFPS:uint;
protected var _fps:Array;
protected var _bx:int;
protected var _by:int;
protected var _fpsDisplay:TextField;
protected var _YT:Number;
protected var _byt:int;
public function FlxConsole(_arg1:uint, _arg2:uint, _arg3:uint){
visible = false;
x = (_arg1 * _arg3);
_by = (_arg2 * _arg3);
_byt = (_by - (FlxG.height * _arg3));
_YT = (_Y = (y = _byt));
var _local4:Bitmap = new Bitmap(new BitmapData((FlxG.width * _arg3), (FlxG.height * _arg3), true, 2130706432));
addChild(_local4);
_fps = new Array(8);
_curFPS = 0;
_fpsUpdate = true;
_text = new TextField();
_text.width = _local4.width;
_text.height = _local4.height;
_text.multiline = true;
_text.wordWrap = true;
_text.embedFonts = true;
_text.antiAliasType = AntiAliasType.NORMAL;
_text.gridFitType = GridFitType.PIXEL;
_text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF);
addChild(_text);
_fpsDisplay = new TextField();
_fpsDisplay.width = _local4.width;
_fpsDisplay.height = 20;
_fpsDisplay.multiline = true;
_fpsDisplay.wordWrap = true;
_fpsDisplay.embedFonts = true;
_fpsDisplay.antiAliasType = AntiAliasType.NORMAL;
_fpsDisplay.gridFitType = GridFitType.PIXEL;
_fpsDisplay.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right");
addChild(_fpsDisplay);
_lines = new Array();
}
public function log(_arg1:String):void{
var _local2:String;
var _local3:uint;
if (_arg1 == null){
_arg1 = "NULL";
};
trace(_arg1);
_lines.push(_arg1);
if (_lines.length > MAX_CONSOLE_LINES){
_lines.shift();
_local2 = "";
_local3 = 0;
while (_local3 < _lines.length) {
_local2 = (_local2 + (_lines[_local3] + "\n"));
_local3++;
};
_text.text = _local2;
} else {
_text.appendText((_arg1 + "\n"));
};
_text.scrollV = _text.height;
}
public function update():void{
var _local1:uint;
var _local2:uint;
if (visible){
_fps[_curFPS] = (1 / lastElapsed);
if (++_curFPS >= _fps.length){
_curFPS = 0;
};
_fpsUpdate = !(_fpsUpdate);
if (_fpsUpdate){
_local1 = 0;
_local2 = 0;
while (_local2 < _fps.length) {
_local1 = (_local1 + _fps[_local2]);
_local2++;
};
_fpsDisplay.text = (Math.floor((_local1 / _fps.length)) + " fps");
};
};
if (_Y < _YT){
_Y = (_Y + ((FlxG.height * 10) * FlxG.elapsed));
} else {
if (_Y > _YT){
_Y = (_Y - ((FlxG.height * 10) * FlxG.elapsed));
};
};
if (_Y > _by){
_Y = _by;
} else {
if (_Y < _byt){
_Y = _byt;
visible = false;
};
};
y = Math.floor(_Y);
}
public function toggle():void{
if (_YT == _by){
_YT = _byt;
} else {
_YT = _by;
visible = true;
};
}
}
}//package org.flixel.data
Section 231
//FlxFade (org.flixel.data.FlxFade)
package org.flixel.data {
import org.flixel.*;
public class FlxFade extends FlxSprite {
protected var _delay:Number;
protected var _complete:Function;
public function FlxFade(){
createGraphic(FlxG.width, FlxG.height, 0, true);
scrollFactor.x = 0;
scrollFactor.y = 0;
exists = false;
}
override public function update():void{
alpha = (alpha + (FlxG.elapsed / _delay));
if (alpha >= 1){
alpha = 1;
if (_complete != null){
_complete();
};
};
}
public function start(_arg1:uint=4278190080, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (((!(_arg4)) && (exists))){
return;
};
fill(_arg1);
_delay = _arg2;
_complete = _arg3;
alpha = 0;
exists = true;
}
public function stop():void{
exists = false;
}
}
}//package org.flixel.data
Section 232
//FlxFlash (org.flixel.data.FlxFlash)
package org.flixel.data {
import org.flixel.*;
public class FlxFlash extends FlxSprite {
protected var _delay:Number;
protected var _complete:Function;
public function FlxFlash(){
createGraphic(FlxG.width, FlxG.height, 0, true);
scrollFactor.x = 0;
scrollFactor.y = 0;
exists = false;
}
override public function update():void{
alpha = (alpha - (FlxG.elapsed / _delay));
if (alpha <= 0){
exists = false;
if (_complete != null){
_complete();
};
};
}
public function start(_arg1:uint=4294967295, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (((!(_arg4)) && (exists))){
return;
};
fill(_arg1);
_delay = _arg2;
_complete = _arg3;
alpha = 1;
exists = true;
}
public function stop():void{
exists = false;
}
}
}//package org.flixel.data
Section 233
//FlxKeyboard (org.flixel.data.FlxKeyboard)
package org.flixel.data {
import flash.events.*;
public class FlxKeyboard {
protected const _t:uint = 0x0100;
public var RIGHT:Boolean;
public var LEFT:Boolean;
public var FOUR:Boolean;
public var TWO:Boolean;
public var CONTROL:Boolean;
public var A:Boolean;
public var B:Boolean;
public var C:Boolean;
public var D:Boolean;
public var E:Boolean;
public var ONE:Boolean;
public var G:Boolean;
public var H:Boolean;
public var I:Boolean;
public var J:Boolean;
public var K:Boolean;
public var F:Boolean;
public var N:Boolean;
public var O:Boolean;
public var Q:Boolean;
public var R:Boolean;
public var S:Boolean;
public var T:Boolean;
public var U:Boolean;
public var MINUS:Boolean;
public var Y:Boolean;
public var L:Boolean;
public var Z:Boolean;
public var QUOTE:Boolean;
public var V:Boolean;
public var X:Boolean;
public var P:Boolean;
public var SHIFT:Boolean;
public var SLASH:Boolean;
public var BACKSPACE:Boolean;
public var EIGHT:Boolean;
public var W:Boolean;
public var M:Boolean;
public var THREE:Boolean;
public var ESCAPE:Boolean;
public var SEMICOLON:Boolean;
public var CAPSLOCK:Boolean;
protected var _lookup:Object;
public var PLUS:Boolean;
protected var _map:Array;
public var ZERO:Boolean;
public var DOWN:Boolean;
public var F1:Boolean;
public var F2:Boolean;
public var F3:Boolean;
public var F4:Boolean;
public var F5:Boolean;
public var F6:Boolean;
public var F7:Boolean;
public var NINE:Boolean;
public var F9:Boolean;
public var ALT:Boolean;
public var F8:Boolean;
public var DELETE:Boolean;
public var LBRACKET:Boolean;
public var UP:Boolean;
public var ENTER:Boolean;
public var FIVE:Boolean;
public var SIX:Boolean;
public var COMMA:Boolean;
public var PERIOD:Boolean;
public var BACKSLASH:Boolean;
public var F10:Boolean;
public var F11:Boolean;
public var F12:Boolean;
public var SEVEN:Boolean;
public var SPACE:Boolean;
public var RBRACKET:Boolean;
public function FlxKeyboard(){
var _local1:uint;
_lookup = new Object();
_map = new Array(_t);
_local1 = 65;
while (_local1 <= 90) {
addKey(String.fromCharCode(_local1), _local1);
_local1++;
};
_local1 = 48;
var _temp1 = _local1;
_local1 = (_local1 + 1);
addKey("ZERO", _temp1);
var _temp2 = _local1;
_local1 = (_local1 + 1);
addKey("ONE", _temp2);
var _temp3 = _local1;
_local1 = (_local1 + 1);
addKey("TWO", _temp3);
var _temp4 = _local1;
_local1 = (_local1 + 1);
addKey("THREE", _temp4);
var _temp5 = _local1;
_local1 = (_local1 + 1);
addKey("FOUR", _temp5);
var _temp6 = _local1;
_local1 = (_local1 + 1);
addKey("FIVE", _temp6);
var _temp7 = _local1;
_local1 = (_local1 + 1);
addKey("SIX", _temp7);
var _temp8 = _local1;
_local1 = (_local1 + 1);
addKey("SEVEN", _temp8);
var _temp9 = _local1;
_local1 = (_local1 + 1);
addKey("EIGHT", _temp9);
var _temp10 = _local1;
_local1 = (_local1 + 1);
addKey("NINE", _temp10);
_local1 = 1;
while (_local1 <= 12) {
addKey(("F" + _local1), (111 + _local1));
_local1++;
};
addKey("ESCAPE", 27);
addKey("MINUS", 189);
addKey("PLUS", 187);
addKey("DELETE", 46);
addKey("BACKSPACE", 8);
addKey("LBRACKET", 219);
addKey("RBRACKET", 221);
addKey("BACKSLASH", 220);
addKey("CAPSLOCK", 20);
addKey("SEMICOLON", 186);
addKey("QUOTE", 222);
addKey("ENTER", 13);
addKey("SHIFT", 16);
addKey("COMMA", 188);
addKey("PERIOD", 190);
addKey("SLASH", 191);
addKey("CONTROL", 17);
addKey("ALT", 18);
addKey("SPACE", 32);
addKey("UP", 38);
addKey("DOWN", 40);
addKey("LEFT", 37);
addKey("RIGHT", 39);
}
public function handleKeyUp(_arg1:KeyboardEvent):void{
var _local2:Object = _map[_arg1.keyCode];
if (_local2 == null){
return;
};
if (_local2.current > 0){
_local2.current = -1;
} else {
_local2.current = 0;
};
this[_local2.name] = false;
}
public function pressed(_arg1:String):Boolean{
return (this[_arg1]);
}
public function justReleased(_arg1:String):Boolean{
return ((_map[_lookup[_arg1]].current == -1));
}
public function handleKeyDown(_arg1:KeyboardEvent):void{
var _local2:Object = _map[_arg1.keyCode];
if (_local2 == null){
return;
};
if (_local2.current > 0){
_local2.current = 1;
} else {
_local2.current = 2;
};
this[_local2.name] = true;
}
public function reset():void{
var _local2:Object;
var _local1:uint;
while (_local1 < _t) {
if (_map[_local1] == null){
} else {
_local2 = _map[_local1];
this[_local2.name] = false;
_local2.current = 0;
_local2.last = 0;
};
_local1++;
};
}
public function justPressed(_arg1:String):Boolean{
return ((_map[_lookup[_arg1]].current == 2));
}
public function update():void{
var _local2:Object;
var _local1:uint;
while (_local1 < _t) {
if (_map[_local1] == null){
} else {
_local2 = _map[_local1];
if ((((_local2.last == -1)) && ((_local2.current == -1)))){
_local2.current = 0;
} else {
if ((((_local2.last == 2)) && ((_local2.current == 2)))){
_local2.current = 1;
};
};
_local2.last = _local2.current;
};
_local1++;
};
}
protected function addKey(_arg1:String, _arg2:uint):void{
_lookup[_arg1] = _arg2;
_map[_arg2] = {name:_arg1, current:0, last:0};
}
}
}//package org.flixel.data
Section 234
//FlxKong (org.flixel.data.FlxKong)
package org.flixel.data {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class FlxKong extends Sprite {
public var API;
public function FlxKong(){
API = null;
}
public function init():void{
var _local1:Object = LoaderInfo(root.loaderInfo).parameters;
var _local2:String = ((_local1.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf"));
var _local3:URLRequest = new URLRequest(_local2);
var _local4:Loader = new Loader();
_local4.contentLoaderInfo.addEventListener(Event.COMPLETE, APILoaded);
_local4.load(_local3);
this.addChild(_local4);
}
protected function APILoaded(_arg1:Event):void{
API = _arg1.target.content;
API.services.connect();
}
}
}//package org.flixel.data
Section 235
//FlxList (org.flixel.data.FlxList)
package org.flixel.data {
import org.flixel.*;
public class FlxList {
public var next:FlxList;
public var object:FlxObject;
public function FlxList(){
object = null;
next = null;
}
}
}//package org.flixel.data
Section 236
//FlxMouse (org.flixel.data.FlxMouse)
package org.flixel.data {
import org.flixel.*;
import flash.events.*;
import flash.ui.*;
public class FlxMouse {
protected var ImgDefaultCursor:Class;
protected var _out:Boolean;
public var cursor:FlxSprite;
public var screenY:int;
protected var _last:int;
public var x:int;
public var y:int;
protected var _current:int;
public var screenX:int;
public function FlxMouse(){
ImgDefaultCursor = FlxMouse_ImgDefaultCursor;
super();
x = 0;
y = 0;
screenX = 0;
screenY = 0;
_current = 0;
_last = 0;
cursor = null;
_out = false;
}
public function hide():void{
if (cursor != null){
cursor.visible = false;
_out = false;
};
}
public function update(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):void{
screenX = _arg1;
screenY = _arg2;
x = (screenX - FlxU.floor(_arg3));
y = (screenY - FlxU.floor(_arg4));
if (cursor != null){
cursor.x = x;
cursor.y = y;
};
if ((((_last == -1)) && ((_current == -1)))){
_current = 0;
} else {
if ((((_last == 2)) && ((_current == 2)))){
_current = 1;
};
};
_last = _current;
}
public function reset():void{
_current = 0;
_last = 0;
}
public function justReleased():Boolean{
return ((_current == -1));
}
public function handleMouseOver(_arg1:MouseEvent):void{
if (cursor != null){
cursor.visible = _out;
};
}
public function handleMouseDown(_arg1:MouseEvent):void{
if (_current > 0){
_current = 1;
} else {
_current = 2;
};
}
public function pressed():Boolean{
return ((_current > 0));
}
public function justPressed():Boolean{
return ((_current == 2));
}
public function load(_arg1:Class, _arg2:int=0, _arg3:int=0):void{
if (_arg1 == null){
_arg1 = ImgDefaultCursor;
};
cursor = new FlxSprite(screenX, screenY, _arg1);
cursor.offset.x = _arg2;
cursor.offset.y = _arg3;
}
public function handleMouseUp(_arg1:MouseEvent):void{
if (_current > 0){
_current = -1;
} else {
_current = 0;
};
}
public function handleMouseOut(_arg1:MouseEvent):void{
if (cursor != null){
_out = cursor.visible;
cursor.visible = false;
};
}
public function show(_arg1:Class=null, _arg2:int=0, _arg3:int=0):void{
Mouse.show();
hide();
}
public function unload():void{
if (cursor != null){
if (cursor.visible){
load(null);
} else {
cursor = null;
};
};
}
}
}//package org.flixel.data
Section 237
//FlxMouse_ImgDefaultCursor (org.flixel.data.FlxMouse_ImgDefaultCursor)
package org.flixel.data {
import mx.core.*;
public class FlxMouse_ImgDefaultCursor extends BitmapAsset {
}
}//package org.flixel.data
Section 238
//FlxPanel (org.flixel.data.FlxPanel)
package org.flixel.data {
import org.flixel.*;
import flash.ui.*;
public class FlxPanel extends FlxObject {
protected var _close:FlxButton;
protected var _digg:FlxButton;
protected var _gameTitle:String;
protected var _closed:Boolean;
protected var _payPalID:String;
protected var _donate:FlxButton;
private var ImgClose:Class;
protected var _topBar:FlxSprite;
protected var _ty:Number;
protected var _caption:FlxText;
protected var _initialized:Boolean;
protected var _twitter:FlxButton;
protected var _delicious:FlxButton;
protected var _stumble:FlxButton;
private var ImgDelicious:Class;
private var ImgTwitter:Class;
protected var _mainBar:FlxSprite;
protected var _gameURL:String;
private var ImgStumble:Class;
private var ImgReddit:Class;
private var ImgDigg:Class;
protected var _bottomBar:FlxSprite;
protected var _payPalAmount:Number;
protected var _s:Number;
private var ImgDonate:Class;
protected var _reddit:FlxButton;
public function FlxPanel(){
ImgDonate = FlxPanel_ImgDonate;
ImgStumble = FlxPanel_ImgStumble;
ImgDigg = FlxPanel_ImgDigg;
ImgReddit = FlxPanel_ImgReddit;
ImgDelicious = FlxPanel_ImgDelicious;
ImgTwitter = FlxPanel_ImgTwitter;
ImgClose = FlxPanel_ImgClose;
super();
y = -21;
_ty = y;
_closed = false;
_initialized = false;
_topBar = new FlxSprite();
_topBar.createGraphic(FlxG.width, 1, 2147483647);
_topBar.scrollFactor.x = 0;
_topBar.scrollFactor.y = 0;
_mainBar = new FlxSprite();
_mainBar.createGraphic(FlxG.width, 19, 2130706432);
_mainBar.scrollFactor.x = 0;
_mainBar.scrollFactor.y = 0;
_bottomBar = new FlxSprite();
_bottomBar.createGraphic(FlxG.width, 1, 2147483647);
_bottomBar.scrollFactor.x = 0;
_bottomBar.scrollFactor.y = 0;
_donate = new FlxButton(3, 0, onDonate);
_donate.loadGraphic(new FlxSprite(0, 0, ImgDonate));
_donate.scrollFactor.x = 0;
_donate.scrollFactor.y = 0;
_stumble = new FlxButton(((((((FlxG.width / 2) - 6) - 13) - 6) - 13) - 6), 0, onStumble);
_stumble.loadGraphic(new FlxSprite(0, 0, ImgStumble));
_stumble.scrollFactor.x = 0;
_stumble.scrollFactor.y = 0;
_digg = new FlxButton(((((FlxG.width / 2) - 6) - 13) - 6), 0, onDigg);
_digg.loadGraphic(new FlxSprite(0, 0, ImgDigg));
_digg.scrollFactor.x = 0;
_digg.scrollFactor.y = 0;
_reddit = new FlxButton(((FlxG.width / 2) - 6), 0, onReddit);
_reddit.loadGraphic(new FlxSprite(0, 0, ImgReddit));
_reddit.scrollFactor.x = 0;
_reddit.scrollFactor.y = 0;
_delicious = new FlxButton((((FlxG.width / 2) + 7) + 6), 0, onDelicious);
_delicious.loadGraphic(new FlxSprite(0, 0, ImgDelicious));
_delicious.scrollFactor.x = 0;
_delicious.scrollFactor.y = 0;
_twitter = new FlxButton((((((FlxG.width / 2) + 7) + 6) + 12) + 6), 0, onTwitter);
_twitter.loadGraphic(new FlxSprite(0, 0, ImgTwitter));
_twitter.scrollFactor.x = 0;
_twitter.scrollFactor.y = 0;
_caption = new FlxText((FlxG.width / 2), 0, ((FlxG.width / 2) - 19), "");
_caption.alignment = "right";
_caption.scrollFactor.x = 0;
_caption.scrollFactor.y = 0;
_close = new FlxButton((FlxG.width - 16), 0, onClose);
_close.loadGraphic(new FlxSprite(0, 0, ImgClose));
_close.scrollFactor.x = 0;
_close.scrollFactor.y = 0;
hide();
_s = 50;
}
public function onDelicious():void{
FlxU.openURL(((("http://delicious.com/save?v=5&noui&jump=close&url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle)));
}
public function onTwitter():void{
FlxU.openURL(("http://twitter.com/home?status=Playing" + encodeURIComponent((((" " + _gameTitle) + " - ") + _gameURL))));
}
public function setup(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{
_payPalID = _arg1;
if (_payPalID.length <= 0){
_donate.visible = false;
};
_payPalAmount = _arg2;
_gameTitle = _arg3;
_gameURL = _arg4;
_caption.text = _arg5;
_initialized = true;
}
public function onStumble():void{
FlxU.openURL(("http://www.stumbleupon.com/submit?url=" + encodeURIComponent(_gameURL)));
}
override public function render():void{
if (!_initialized){
return;
};
if (_topBar.visible){
_topBar.render();
};
if (_mainBar.visible){
_mainBar.render();
};
if (_bottomBar.visible){
_bottomBar.render();
};
if (_donate.visible){
_donate.render();
};
if (_stumble.visible){
_stumble.render();
};
if (_digg.visible){
_digg.render();
};
if (_reddit.visible){
_reddit.render();
};
if (_delicious.visible){
_delicious.render();
};
if (_twitter.visible){
_twitter.render();
};
if (_caption.visible){
_caption.render();
};
if (_close.visible){
_close.render();
};
}
public function onDigg():void{
FlxU.openURL(((("http://digg.com/submit?url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle)));
}
public function onReddit():void{
FlxU.openURL(("http://www.reddit.com/submit?url=" + encodeURIComponent(_gameURL)));
}
public function onDonate():void{
FlxU.openURL(((((("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + encodeURIComponent(_payPalID)) + "&item_name=") + encodeURIComponent(((_gameTitle + " Contribution (") + _gameURL))) + ")¤cy_code=USD&amount=") + _payPalAmount));
}
override public function update():void{
if (!_initialized){
return;
};
if (_ty != y){
if (y < _ty){
y = (y + (FlxG.elapsed * _s));
if (y > _ty){
y = _ty;
};
} else {
y = (y - (FlxG.elapsed * _s));
if (y < _ty){
y = _ty;
};
};
};
if ((((y <= -21)) || ((y > FlxG.height)))){
visible = false;
};
_topBar.y = y;
_mainBar.y = (y + 1);
_bottomBar.y = (y + 20);
_donate.y = (y + 4);
_stumble.y = (y + 4);
_digg.y = (y + 4);
_reddit.y = (y + 4);
_delicious.y = (y + 5);
_twitter.y = (y + 4);
_caption.y = (y + 4);
_close.y = (y + 4);
if (_donate.active){
_donate.update();
};
if (_stumble.active){
_stumble.update();
};
if (_digg.active){
_digg.update();
};
if (_reddit.active){
_reddit.update();
};
if (_delicious.active){
_delicious.update();
};
if (_twitter.active){
_twitter.update();
};
if (_caption.active){
_caption.update();
};
if (_close.active){
_close.update();
};
}
public function show(_arg1:Boolean=true):void{
if (!_initialized){
FlxG.log("SUPPORT PANEL ERROR: Uninitialized.\nYou forgot to call FlxGame.setupSupportPanel()\nfrom your game constructor.");
return;
};
if (_closed){
return;
};
if (_arg1){
y = -21;
_ty = -1;
} else {
y = FlxG.height;
_ty = (FlxG.height - 20);
};
Mouse.show();
visible = true;
}
public function onClose():void{
_closed = true;
hide();
}
public function hide():void{
if (y < 0){
_ty = -21;
} else {
_ty = FlxG.height;
};
Mouse.hide();
visible = false;
}
}
}//package org.flixel.data
Section 239
//FlxPanel_ImgClose (org.flixel.data.FlxPanel_ImgClose)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgClose extends BitmapAsset {
}
}//package org.flixel.data
Section 240
//FlxPanel_ImgDelicious (org.flixel.data.FlxPanel_ImgDelicious)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDelicious extends BitmapAsset {
}
}//package org.flixel.data
Section 241
//FlxPanel_ImgDigg (org.flixel.data.FlxPanel_ImgDigg)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDigg extends BitmapAsset {
}
}//package org.flixel.data
Section 242
//FlxPanel_ImgDonate (org.flixel.data.FlxPanel_ImgDonate)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgDonate extends BitmapAsset {
}
}//package org.flixel.data
Section 243
//FlxPanel_ImgReddit (org.flixel.data.FlxPanel_ImgReddit)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgReddit extends BitmapAsset {
}
}//package org.flixel.data
Section 244
//FlxPanel_ImgStumble (org.flixel.data.FlxPanel_ImgStumble)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgStumble extends BitmapAsset {
}
}//package org.flixel.data
Section 245
//FlxPanel_ImgTwitter (org.flixel.data.FlxPanel_ImgTwitter)
package org.flixel.data {
import mx.core.*;
public class FlxPanel_ImgTwitter extends BitmapAsset {
}
}//package org.flixel.data
Section 246
//FlxQuake (org.flixel.data.FlxQuake)
package org.flixel.data {
import org.flixel.*;
public class FlxQuake {
public var y:int;
protected var _timer:Number;
protected var _intensity:Number;
public var x:int;
protected var _zoom:uint;
public function FlxQuake(_arg1:uint){
_zoom = _arg1;
start(0);
}
public function update():void{
if (_timer > 0){
_timer = (_timer - FlxG.elapsed);
if (_timer <= 0){
_timer = 0;
x = 0;
y = 0;
} else {
x = (((((Math.random() * _intensity) * FlxG.width) * 2) - (_intensity * FlxG.width)) * _zoom);
y = (((((Math.random() * _intensity) * FlxG.height) * 2) - (_intensity * FlxG.height)) * _zoom);
};
};
}
public function start(_arg1:Number=0.05, _arg2:Number=0.5):void{
stop();
_intensity = _arg1;
_timer = _arg2;
}
public function stop():void{
x = 0;
y = 0;
_intensity = 0;
_timer = 0;
}
}
}//package org.flixel.data
Section 247
//FlxButton (org.flixel.FlxButton)
package org.flixel {
import flash.events.*;
public class FlxButton extends FlxGroup {
protected var _on:FlxSprite;
protected var _offT:FlxText;
protected var _initialized:Boolean;
protected var _onT:FlxText;
protected var _pressed:Boolean;
protected var _callback:Function;
protected var _off:FlxSprite;
protected var _onToggle:Boolean;
protected var _sf:FlxPoint;
public function FlxButton(_arg1:int, _arg2:int, _arg3:Function){
x = _arg1;
y = _arg2;
width = 100;
height = 20;
_off = new FlxSprite().createGraphic(width, height, 4286545791);
_off.solid = false;
add(_off, true);
_on = new FlxSprite().createGraphic(width, height, 4294967295);
_on.solid = false;
add(_on, true);
_offT = null;
_onT = null;
_callback = _arg3;
_onToggle = false;
_pressed = false;
_initialized = false;
_sf = null;
}
protected function onMouseUp(_arg1:MouseEvent):void{
if (((((((((!(exists)) || (!(visible)))) || (!(active)))) || (!(FlxG.mouse.justReleased())))) || ((_callback == null)))){
return;
};
if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
_callback();
};
}
override public function update():void{
if (!_initialized){
if (FlxG.stage != null){
FlxG.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_initialized = true;
};
};
super.update();
visibility(false);
if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
if (!FlxG.mouse.pressed()){
_pressed = false;
} else {
if (!_pressed){
_pressed = true;
};
};
visibility(!(_pressed));
};
if (_onToggle){
visibility(_off.visible);
};
}
protected function visibility(_arg1:Boolean):void{
if (_arg1){
_off.visible = false;
if (_offT != null){
_offT.visible = false;
};
_on.visible = true;
if (_onT != null){
_onT.visible = true;
};
} else {
_on.visible = false;
if (_onT != null){
_onT.visible = false;
};
_off.visible = true;
if (_offT != null){
_offT.visible = true;
};
};
}
public function get on():Boolean{
return (_onToggle);
}
public function loadGraphic(_arg1:FlxSprite, _arg2:FlxSprite=null):FlxButton{
_off = (replace(_off, _arg1) as FlxSprite);
if (_arg2 == null){
if (_on != _off){
remove(_on);
};
_on = _off;
} else {
_on = (replace(_on, _arg2) as FlxSprite);
};
_on.solid = (_off.solid = false);
_off.scrollFactor = scrollFactor;
_on.scrollFactor = scrollFactor;
width = _off.width;
height = _off.height;
refreshHulls();
return (this);
}
public function loadText(_arg1:FlxText, _arg2:FlxText=null):FlxButton{
if (_arg1 != null){
if (_offT == null){
_offT = _arg1;
add(_offT);
} else {
_offT = (replace(_offT, _arg1) as FlxText);
};
};
if (_arg2 == null){
_onT = _offT;
} else {
if (_onT == null){
_onT = _arg2;
add(_onT);
} else {
_onT = (replace(_onT, _arg2) as FlxText);
};
};
_offT.scrollFactor = scrollFactor;
_onT.scrollFactor = scrollFactor;
return (this);
}
override public function destroy():void{
if (FlxG.stage != null){
FlxG.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
};
}
public function set on(_arg1:Boolean):void{
_onToggle = _arg1;
}
}
}//package org.flixel
Section 248
//FlxG (org.flixel.FlxG)
package org.flixel {
import flash.display.*;
import flash.geom.*;
import org.flixel.data.*;
public class FlxG {
public static var panel:FlxPanel;
protected static var _mute:Boolean;
public static var kong:FlxKong;
public static var scores:Array;
public static var music:FlxSound;
public static var height:uint;
protected static var _volume:Number;
public static var buffer:BitmapData;
public static var sounds:Array;
public static var debug:Boolean;
public static var LIBRARY_MINOR_VERSION:uint = 23;
public static var LIBRARY_MAJOR_VERSION:uint = 2;
public static var levels:Array;
public static var fade:FlxFade;
public static var timeScale:Number;
protected static var _cache:Object;
public static var level:int;
public static var elapsed:Number;
public static var score:int;
public static var save:int;
public static var saves:Array;
protected static var _scrollTarget:Point;
public static var mouse:FlxMouse;
public static var followTarget:FlxObject;
public static var followLead:Point;
public static var LIBRARY_NAME:String = "flixel";
public static var width:uint;
public static var followLerp:Number;
public static var scroll:Point;
protected static var _game:FlxGame;
public static var quake:FlxQuake;
public static var _musicVolume:Number;
public static var followMin:Point;
public static var flash:FlxFlash;
public static var followMax:Point;
public static var keys:FlxKeyboard;
protected static var _pause:Boolean;
public static function get stage():Stage{
if (((!((_game._state == null))) && (!((_game._state.parent == null))))){
return (_game._state.parent.stage);
};
return (null);
}
protected static function changeSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.updateTransform();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.updateTransform();
};
_local3++;
};
}
public static function get mute():Boolean{
return (_mute);
}
public static function get volume():Number{
return (_volume);
}
static function doFollow():void{
if (followTarget != null){
_scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x);
_scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y);
if (((!((followLead == null))) && ((followTarget is FlxSprite)))){
_scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x));
_scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y));
};
scroll.x = (scroll.x + (((_scrollTarget.x - scroll.x) * followLerp) * FlxG.elapsed));
scroll.y = (scroll.y + (((_scrollTarget.y - scroll.y) * followLerp) * FlxG.elapsed));
if (followMin != null){
if (scroll.x > followMin.x){
scroll.x = followMin.x;
};
if (scroll.y > followMin.y){
scroll.y = followMin.y;
};
};
if (followMax != null){
if (scroll.x < followMax.x){
scroll.x = followMax.x;
};
if (scroll.y < followMax.y){
scroll.y = followMax.y;
};
};
};
}
public static function getMuteValue():uint{
if (_mute){
return (0);
};
return (1);
}
public static function addBitmap(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null):BitmapData{
var _local8:uint;
var _local9:String;
var _local10:BitmapData;
var _local11:Matrix;
var _local5:Boolean;
var _local6:String = _arg4;
if (_local6 == null){
_local6 = String(_arg1);
if (((((_arg3) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){
_local8 = 0;
do {
var _temp1 = _local8;
_local8 = (_local8 + 1);
_local9 = (_local6 + _temp1);
} while (((!((_cache[_local9] == undefined))) && (!((_cache[_local9] == null)))));
_local6 = _local9;
};
};
if (!checkBitmapCache(_local6)){
_cache[_local6] = new (_arg1).bitmapData;
if (_arg2){
_local5 = true;
};
};
var _local7:BitmapData = _cache[_local6];
if (((((!(_local5)) && (_arg2))) && ((_local7.width == new (_arg1).bitmapData.width)))){
_local5 = true;
};
if (_local5){
_local10 = new BitmapData((_local7.width << 1), _local7.height, true, 0);
_local10.draw(_local7);
_local11 = new Matrix();
_local11.scale(-1, 1);
_local11.translate(_local10.width, 0);
_local10.draw(_local7, _local11);
_local7 = _local10;
};
return (_local7);
}
public static function set state(_arg1:FlxState):void{
_game.switchState(_arg1);
}
public static function set mute(_arg1:Boolean):void{
_mute = _arg1;
changeSounds();
}
public static function play(_arg1:Class, _arg2:Number=1, _arg3:Boolean=false):FlxSound{
var _local4:uint = sounds.length;
var _local5:uint;
while (_local5 < _local4) {
if (!(sounds[_local5] as FlxSound).active){
break;
};
_local5++;
};
if (sounds[_local5] == null){
sounds[_local5] = new FlxSound();
};
var _local6:FlxSound = sounds[_local5];
_local6.loadEmbedded(_arg1, _arg3);
_local6.volume = _arg2;
_local6.play();
return (_local6);
}
public static function set volume(_arg1:Number):void{
_volume = _arg1;
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
changeSounds();
}
public static function set musicVolume(_arg1:Number):void{
_musicVolume = _arg1;
if (_musicVolume < 0){
_musicVolume = 0;
} else {
if (_musicVolume > 1){
_musicVolume = 1;
};
};
changeSounds();
}
static function setGameData(_arg1:FlxGame, _arg2:uint, _arg3:uint, _arg4:uint):void{
_game = _arg1;
_cache = new Object();
width = _arg2;
height = _arg3;
_mute = false;
_volume = 0.5;
sounds = new Array();
mouse = new FlxMouse();
keys = new FlxKeyboard();
scroll = null;
_scrollTarget = null;
unfollow();
FlxG.levels = new Array();
FlxG.scores = new Array();
level = 0;
score = 0;
FlxU.seed = NaN;
kong = null;
pause = false;
timeScale = 1;
panel = new FlxPanel();
quake = new FlxQuake(_arg4);
flash = new FlxFlash();
fade = new FlxFade();
FlxU.setWorldBounds();
}
public static function playMusic(_arg1:Class, _arg2:Number=1):void{
if (music == null){
music = new FlxSound();
} else {
if (music.active){
music.stop();
};
};
music.loadEmbedded(_arg1, true);
music.volume = _arg2;
music.survive = true;
music.play();
music.isMusic = true;
}
public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:String=null):BitmapData{
var _local7:uint;
var _local8:String;
var _local6:String = _arg5;
if (_local6 == null){
_local6 = ((((_arg1 + "x") + _arg2) + ":") + _arg3);
if (((((_arg4) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){
_local7 = 0;
do {
var _temp1 = _local7;
_local7 = (_local7 + 1);
_local8 = (_local6 + _temp1);
} while (((!((_cache[_local8] == undefined))) && (!((_cache[_local8] == null)))));
_local6 = _local8;
};
};
if (!checkBitmapCache(_local6)){
_cache[_local6] = new BitmapData(_arg1, _arg2, true, _arg3);
};
return (_cache[_local6]);
}
public static function log(_arg1:Object):void{
if (((!((_game == null))) && (!((_game._console == null))))){
_game._console.log(((_arg1)==null) ? "ERROR: null object" : _arg1.toString());
};
}
public static function checkBitmapCache(_arg1:String):Boolean{
return (((!((_cache[_arg1] == undefined))) && (!((_cache[_arg1] == null)))));
}
static function updateSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.update();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.update();
};
_local3++;
};
}
static function updateInput():void{
keys.update();
mouse.update(state.mouseX, state.mouseY, scroll.x, scroll.y);
}
public static function stream(_arg1:String, _arg2:Number=1, _arg3:Boolean=false):FlxSound{
var _local4:uint = sounds.length;
var _local5:uint;
while (_local5 < _local4) {
if (!(sounds[_local5] as FlxSound).active){
break;
};
_local5++;
};
if (sounds[_local5] == null){
sounds[_local5] = new FlxSound();
};
var _local6:FlxSound = sounds[_local5];
_local6.loadStream(_arg1, _arg3);
_local6.volume = _arg2;
_local6.play();
return (_local6);
}
static function unfollow():void{
followTarget = null;
followLead = null;
followLerp = 1;
followMin = null;
followMax = null;
if (scroll == null){
scroll = new Point();
} else {
scroll.x = (scroll.y = 0);
};
if (_scrollTarget == null){
_scrollTarget = new Point();
} else {
_scrollTarget.x = (_scrollTarget.y = 0);
};
}
public static function get state():FlxState{
return (_game._state);
}
protected static function playSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.play();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.play();
};
_local3++;
};
}
public static function get musicVolume():Number{
return (_musicVolume);
}
public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{
followLead = new Point(_arg1, _arg2);
}
public static function follow(_arg1:FlxObject, _arg2:Number=1):void{
followTarget = _arg1;
followLerp = _arg2;
_scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x);
_scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y);
scroll.x = _scrollTarget.x;
scroll.y = _scrollTarget.y;
doFollow();
}
public static function resetInput():void{
keys.reset();
mouse.reset();
}
public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0, _arg5:Boolean=true):void{
followMin = new Point(-(_arg1), -(_arg2));
followMax = new Point((-(_arg3) + width), (-(_arg4) + height));
if (followMax.x > followMin.x){
followMax.x = followMin.x;
};
if (followMax.y > followMin.y){
followMax.y = followMin.y;
};
if (_arg5){
FlxU.setWorldBounds(-(_arg1), -(_arg2), (-(_arg1) + _arg3), (-(_arg2) + _arg4));
};
doFollow();
}
protected static function pauseSounds():void{
var _local1:FlxSound;
if (((!((music == null))) && (music.active))){
music.pause();
};
var _local2:uint = sounds.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (sounds[_local3] as FlxSound);
if (((!((_local1 == null))) && (_local1.active))){
_local1.pause();
};
_local3++;
};
}
static function destroySounds(_arg1:Boolean=false):void{
var _local2:FlxSound;
if (sounds == null){
return;
};
if (((!((music == null))) && (((_arg1) || (!(music.survive)))))){
music.destroy();
};
var _local3:uint = sounds.length;
var _local4:uint;
while (_local4 < _local3) {
_local2 = (sounds[_local4] as FlxSound);
if (((!((_local2 == null))) && (((_arg1) || (!(_local2.survive)))))){
_local2.destroy();
};
_local4++;
};
}
public static function set pause(_arg1:Boolean):void{
var _local2:Boolean = _pause;
_pause = _arg1;
if (_pause != _local2){
if (_pause){
_game.pauseGame();
pauseSounds();
} else {
_game.unpauseGame();
playSounds();
};
};
}
public static function get pause():Boolean{
return (_pause);
}
}
}//package org.flixel
Section 249
//FlxGame (org.flixel.FlxGame)
package org.flixel {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import flash.text.*;
import com.logicking.sokoban.*;
import org.flixel.data.*;
import flash.ui.*;
public class FlxGame extends Sprite {
const MAX_ELAPSED:Number = 0.0333;
var _bmpFront:Bitmap;
protected var SndFlixel:Class;
var _state:FlxState;
protected var SndBeep:Class;
var _console:FlxConsole;
var _created:Boolean;
var _zoom:uint;
var _gameXOffset:int;
var _elapsed:Number;
var _flipped:Boolean;
var _total:uint;
var _soundTrayBars:Array;
public var useDefaultHotKeys:Boolean;
protected var junk:String;// = "FlxGame_junk"
var _zeroPoint:Point;
var _bmpBack:Bitmap;
var _iState:Class;
var _paused:Boolean;
var _gameYOffset:int;
var _buffer:Sprite;
var _soundTray:Sprite;
var _frame:Class;
var _r:Rectangle;
public var pause:FlxGroup;
var _soundTrayTimer:Number;
public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2){
SndBeep = FlxGame_SndBeep;
SndFlixel = FlxGame_SndFlixel;
super();
Mouse.hide();
_zoom = _arg4;
FlxState.bgColor = 4278190080;
FlxG.setGameData(this, _arg1, _arg2, _arg4);
_elapsed = 0;
_total = 0;
pause = new TutorialScreen();
_state = null;
_iState = _arg3;
_zeroPoint = new Point();
useDefaultHotKeys = true;
_frame = null;
_gameXOffset = 0;
_gameYOffset = 0;
_paused = false;
_created = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
function pauseGame():void{
if (((!((x == 0))) || (!((y == 0))))){
x = 0;
y = 0;
};
if (!_flipped){
_bmpBack.bitmapData.copyPixels(_bmpFront.bitmapData, _r, _zeroPoint);
} else {
_bmpFront.bitmapData.copyPixels(_bmpBack.bitmapData, _r, _zeroPoint);
};
Mouse.show();
_paused = true;
stage.frameRate = 10;
}
function unpauseGame():void{
FlxG.resetInput();
_paused = false;
stage.frameRate = 60;
}
protected function onFocus(_arg1:Event=null):void{
if (FlxG.pause){
FlxG.pause = false;
};
}
protected function onKeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:String;
if ((((_arg1.keyCode == 192)) || ((_arg1.keyCode == 220)))){
_console.toggle();
return;
};
if (useDefaultHotKeys){
_local2 = _arg1.keyCode;
_local3 = String.fromCharCode(_arg1.charCode);
switch (_local2){
case 48:
case 96:
return;
case 109:
case 189:
return;
case 107:
case 187:
return;
case 80:
FlxG.pause = !(FlxG.pause);
default:
break;
};
};
FlxG.keys.handleKeyUp(_arg1);
}
public function switchState(_arg1:FlxState):void{
FlxG.panel.hide();
FlxG.unfollow();
FlxG.resetInput();
FlxG.destroySounds();
FlxG.flash.stop();
FlxG.fade.stop();
FlxG.quake.stop();
_buffer.x = 0;
_buffer.y = 0;
_buffer.addChild(_arg1);
if (_state != null){
_state.destroy();
_buffer.swapChildren(_arg1, _state);
_buffer.removeChild(_state);
};
_state = _arg1;
_state.create();
}
protected function addFrame(_arg1:Class, _arg2:uint, _arg3:uint):FlxGame{
_frame = _arg1;
_gameXOffset = _arg2;
_gameYOffset = _arg3;
return (this);
}
protected function onEnterFrame(_arg1:Event):void{
var _local2:uint;
var _local3:FlxSave;
var _local5:String;
var _local6:String;
var _local7:Bitmap;
var _local8:TextField;
var _local9:uint;
var _local10:uint;
var _local11:Bitmap;
var _local4:uint = getTimer();
_elapsed = ((_local4 - _total) / 1000);
if (_created){
_console.lastElapsed = _elapsed;
};
_total = _local4;
FlxG.elapsed = _elapsed;
if (FlxG.elapsed > MAX_ELAPSED){
FlxG.elapsed = MAX_ELAPSED;
};
FlxG.elapsed = (FlxG.elapsed * FlxG.timeScale);
if (_soundTray != null){
if (_soundTrayTimer > 0){
_soundTrayTimer = (_soundTrayTimer - _elapsed);
} else {
if (_soundTray.y > -(_soundTray.height)){
_soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2));
if (_soundTray.y <= -(_soundTray.height)){
_soundTray.visible = false;
_local3 = new FlxSave();
if (_local3.bind("flixel")){
if (_local3.data.sound == null){
_local3.data.sound = new Object();
};
_local3.data.mute = FlxG.mute;
_local3.data.volume = FlxG.volume;
_local3.forceSave();
};
};
};
};
};
if (_created){
FlxG.panel.update();
_console.update();
FlxG.updateInput();
FlxG.updateSounds();
if (_paused){
pause.update();
if (_flipped){
FlxG.buffer.copyPixels(_bmpFront.bitmapData, _r, _zeroPoint);
} else {
FlxG.buffer.copyPixels(_bmpBack.bitmapData, _r, _zeroPoint);
};
pause.render();
} else {
if (_flipped){
FlxG.buffer = _bmpFront.bitmapData;
} else {
FlxG.buffer = _bmpBack.bitmapData;
};
FlxState.screen.unsafeBind(FlxG.buffer);
_state.preProcess();
FlxG.doFollow();
_state.update();
if (FlxG.flash.exists){
FlxG.flash.update();
};
if (FlxG.fade.exists){
FlxG.fade.update();
};
FlxG.quake.update();
_buffer.x = FlxG.quake.x;
_buffer.y = FlxG.quake.y;
_state.render();
if (FlxG.flash.exists){
FlxG.flash.render();
};
if (FlxG.fade.exists){
FlxG.fade.render();
};
if (FlxG.panel.visible){
FlxG.panel.render();
};
if (FlxG.mouse.cursor != null){
if (FlxG.mouse.cursor.active){
FlxG.mouse.cursor.update();
};
if (FlxG.mouse.cursor.visible){
FlxG.mouse.cursor.render();
};
};
_state.postProcess();
_bmpBack.visible = !((_bmpFront.visible = _flipped));
_flipped = !(_flipped);
};
} else {
if (root != null){
stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = 60;
_buffer = new Sprite();
_buffer.scaleX = _zoom;
_buffer.scaleY = _zoom;
addChild(_buffer);
_bmpBack = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, FlxState.bgColor));
_bmpBack.x = _gameXOffset;
_bmpBack.y = _gameYOffset;
_buffer.addChild(_bmpBack);
_bmpFront = new Bitmap(new BitmapData(_bmpBack.width, _bmpBack.height, true, FlxState.bgColor));
_bmpFront.x = _bmpBack.x;
_bmpFront.y = _bmpBack.y;
_buffer.addChild(_bmpFront);
_flipped = false;
_r = new Rectangle(0, 0, _bmpFront.width, _bmpFront.height);
_console = new FlxConsole(_gameXOffset, _gameYOffset, _zoom);
addChild(_console);
_local5 = ((((FlxG.LIBRARY_NAME + " v") + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION);
if (FlxG.debug){
_local5 = (_local5 + " [debug]");
} else {
_local5 = (_local5 + " [release]");
};
_local6 = "";
_local2 = 0;
while (_local2 < (_local5.length + 32)) {
_local6 = (_local6 + "-");
_local2++;
};
FlxG.log(_local5);
FlxG.log(_local6);
stage.addEventListener(KeyboardEvent.KEY_DOWN, FlxG.keys.handleKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, FlxG.mouse.handleMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, FlxG.mouse.handleMouseUp);
stage.addEventListener(MouseEvent.MOUSE_OUT, FlxG.mouse.handleMouseOut);
stage.addEventListener(MouseEvent.MOUSE_OVER, FlxG.mouse.handleMouseOver);
stage.addEventListener(Event.DEACTIVATE, onFocusLost);
stage.addEventListener(Event.ACTIVATE, onFocus);
_soundTray = new Sprite();
_soundTray.visible = false;
_soundTray.scaleX = 2;
_soundTray.scaleY = 2;
_local7 = new Bitmap(new BitmapData(80, 30, true, 2130706432));
_soundTray.x = (((_gameXOffset + (FlxG.width / 2)) * _zoom) - ((_local7.width / 2) * _soundTray.scaleX));
_soundTray.addChild(_local7);
_local8 = new TextField();
_local8.width = _local7.width;
_local8.height = _local7.height;
_local8.multiline = true;
_local8.wordWrap = true;
_local8.selectable = false;
_local8.embedFonts = true;
_local8.antiAliasType = AntiAliasType.NORMAL;
_local8.gridFitType = GridFitType.PIXEL;
_local8.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center");
_soundTray.addChild(_local8);
_local8.text = "VOLUME";
_local8.y = 16;
_local9 = 10;
_local10 = 14;
_soundTrayBars = new Array();
_local2 = 0;
while (_local2 < 10) {
_local7 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF));
_local7.x = _local9;
_local7.y = _local10;
_soundTrayBars.push(_soundTray.addChild(_local7));
_local9 = (_local9 + 6);
_local10--;
_local2++;
};
addChild(_soundTray);
if (_frame != null){
_local11 = new _frame();
_local11.scaleX = _zoom;
_local11.scaleY = _zoom;
addChild(_local11);
};
_local3 = new FlxSave();
if (((_local3.bind("flixel")) && (!((_local3.data.sound == null))))){
if (_local3.data.volume != null){
FlxG.volume = _local3.data.volume;
};
if (_local3.data.mute != null){
FlxG.mute = _local3.data.mute;
};
showSoundTray(true);
};
_created = true;
switchState(new _iState());
};
};
}
public function showSoundTray(_arg1:Boolean=false):void{
if (!_arg1){
FlxG.play(SndBeep);
};
_soundTrayTimer = 1;
_soundTray.y = (_gameYOffset * _zoom);
_soundTray.visible = true;
var _local2:uint = Math.round((FlxG.volume * 10));
if (FlxG.mute){
_local2 = 0;
};
var _local3:uint;
while (_local3 < _soundTrayBars.length) {
if (_local3 < _local2){
_soundTrayBars[_local3].alpha = 1;
} else {
_soundTrayBars[_local3].alpha = 0.5;
};
_local3++;
};
}
protected function onFocusLost(_arg1:Event=null):void{
FlxG.pause = true;
}
}
}//package org.flixel
Section 250
//FlxGame_junk (org.flixel.FlxGame_junk)
package org.flixel {
import mx.core.*;
public class FlxGame_junk extends FontAsset {
}
}//package org.flixel
Section 251
//FlxGame_SndBeep (org.flixel.FlxGame_SndBeep)
package org.flixel {
import mx.core.*;
public class FlxGame_SndBeep extends SoundAsset {
}
}//package org.flixel
Section 252
//FlxGame_SndFlixel (org.flixel.FlxGame_SndFlixel)
package org.flixel {
import mx.core.*;
public class FlxGame_SndFlixel extends SoundAsset {
}
}//package org.flixel
Section 253
//FlxGroup (org.flixel.FlxGroup)
package org.flixel {
public class FlxGroup extends FlxObject {
public var members:Array;
protected var _first:Boolean;
protected var _last:FlxPoint;
public function FlxGroup(){
_group = true;
solid = false;
members = new Array();
_last = new FlxPoint();
_first = true;
}
public function getFirstExtant():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((!((_local1 == null))) && (_local1.exists))){
return (_local1);
};
_local3++;
};
return (null);
}
override public function destroy():void{
destroyMembers();
super.destroy();
}
public function getFirstAlive():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((((!((_local1 == null))) && (_local1.exists))) && (!(_local1.dead)))){
return (_local1);
};
_local3++;
};
return (null);
}
public function remove(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{
var _local3:int = members.indexOf(_arg1);
if ((((_local3 < 0)) || ((_local3 >= members.length)))){
return (null);
};
if (_arg2){
members.splice(_local3, 1);
} else {
members[_local3] = null;
};
return (_arg1);
}
override public function update():void{
saveOldPosition();
updateMotion();
updateMembers();
updateFlickering();
}
public function resetFirstAvail(_arg1:Number=0, _arg2:Number=0):Boolean{
var _local3:FlxObject = getFirstAvail();
if (_local3 == null){
return (false);
};
_local3.reset(_arg1, _arg2);
return (true);
}
override public function reset(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local6:FlxObject;
saveOldPosition();
super.reset(_arg1, _arg2);
var _local5:Boolean;
if (((!((x == _last.x))) || (!((y == _last.y))))){
_local5 = true;
_local3 = (x - _last.x);
_local4 = (y - _last.y);
};
var _local7:uint = members.length;
var _local8:uint;
while (_local8 < _local7) {
_local6 = (members[_local8] as FlxObject);
if (((!((_local6 == null))) && (_local6.exists))){
if (_local5){
if (_local6._group){
_local6.reset((_local6.x + _local3), (_local6.y + _local4));
} else {
_local6.x = (_local6.x + _local3);
_local6.y = (_local6.y + _local4);
if (solid){
_local6.colHullX.width = (_local6.colHullX.width + ((_local3)>0) ? _local3 : -(_local3));
if (_local3 < 0){
_local6.colHullX.x = (_local6.colHullX.x + _local3);
};
_local6.colHullY.x = x;
_local6.colHullY.height = (_local6.colHullY.height + ((_local4)>0) ? _local4 : -(_local4));
if (_local4 < 0){
_local6.colHullY.y = (_local6.colHullY.y + _local4);
};
_local6.colVector.x = (_local6.colVector.x + _local3);
_local6.colVector.y = (_local6.colVector.y + _local4);
};
};
};
};
_local8++;
};
}
protected function updateMembers():void{
var _local1:Number;
var _local2:Number;
var _local4:FlxObject;
var _local3:Boolean;
if (((!((x == _last.x))) || (!((y == _last.y))))){
_local3 = true;
_local1 = (x - _last.x);
_local2 = (y - _last.y);
};
var _local5:uint = members.length;
var _local6:uint;
while (_local6 < _local5) {
_local4 = (members[_local6] as FlxObject);
if (((!((_local4 == null))) && (_local4.exists))){
if (_local3){
if (_local4._group){
_local4.reset((_local4.x + _local1), (_local4.y + _local2));
} else {
_local4.x = (_local4.x + _local1);
_local4.y = (_local4.y + _local2);
};
};
if (_local4.active){
_local4.update();
};
if (((_local3) && (_local4.solid))){
_local4.colHullX.width = (_local4.colHullX.width + ((_local1)>0) ? _local1 : -(_local1));
if (_local1 < 0){
_local4.colHullX.x = (_local4.colHullX.x + _local1);
};
_local4.colHullY.x = x;
_local4.colHullY.height = (_local4.colHullY.height + ((_local2)>0) ? _local2 : -(_local2));
if (_local2 < 0){
_local4.colHullY.y = (_local4.colHullY.y + _local2);
};
_local4.colVector.x = (_local4.colVector.x + _local1);
_local4.colVector.y = (_local4.colVector.y + _local2);
};
};
_local6++;
};
}
public function countDead():int{
var _local1:FlxObject;
var _local2 = -1;
var _local3:uint = members.length;
var _local4:uint;
while (_local4 < _local3) {
_local1 = (members[_local4] as FlxObject);
if (_local1 != null){
if (_local2 < 0){
_local2 = 0;
};
if (_local1.dead){
_local2++;
};
};
_local4++;
};
return (_local2);
}
public function getFirstAvail():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((!((_local1 == null))) && (!(_local1.exists)))){
return (_local1);
};
_local3++;
};
return (null);
}
override public function render():void{
renderMembers();
}
public function countLiving():int{
var _local1:FlxObject;
var _local2 = -1;
var _local3:uint = members.length;
var _local4:uint;
while (_local4 < _local3) {
_local1 = (members[_local4] as FlxObject);
if (_local1 != null){
if (_local2 < 0){
_local2 = 0;
};
if (((_local1.exists) && (!(_local1.dead)))){
_local2++;
};
};
_local4++;
};
return (_local2);
}
public function countOnScreen():int{
var _local1:FlxObject;
var _local2 = -1;
var _local3:uint = members.length;
var _local4:uint;
while (_local4 < _local3) {
_local1 = (members[_local4] as FlxObject);
if (_local1 != null){
if (_local2 < 0){
_local2 = 0;
};
if (_local1.onScreen()){
_local2++;
};
};
_local4++;
};
return (_local2);
}
protected function killMembers():void{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (_local1 != null){
_local1.kill();
};
_local3++;
};
}
override public function kill():void{
killMembers();
super.kill();
}
public function getFirstNull():int{
var _local1:uint = members.length;
var _local2:uint;
while (_local2 < _local1) {
if (members[_local2] == null){
return (_local2);
};
_local2++;
};
return (-1);
}
protected function renderMembers():void{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((((!((_local1 == null))) && (_local1.exists))) && (_local1.visible))){
_local1.render();
};
_local3++;
};
}
public function add(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{
members.push(_arg1);
if (_arg2){
_arg1.scrollFactor = scrollFactor;
};
return (_arg1);
}
protected function saveOldPosition():void{
if (_first){
_first = false;
_last.x = 0;
_last.y = 0;
return;
};
_last.x = x;
_last.y = y;
}
public function replace(_arg1:FlxObject, _arg2:FlxObject):FlxObject{
var _local3:int = members.indexOf(_arg1);
if ((((_local3 < 0)) || ((_local3 >= members.length)))){
return (null);
};
members[_local3] = _arg2;
return (_arg2);
}
public function getRandom():FlxObject{
var _local1:uint;
var _local2:FlxObject;
var _local3:uint = members.length;
var _local4:uint = uint((FlxU.random() * _local3));
while ((((_local2 == null)) && ((_local1 < members.length)))) {
++_local4;
_local2 = (members[(_local4 % _local3)] as FlxObject);
_local1++;
};
return (_local2);
}
public function getFirstDead():FlxObject{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (((!((_local1 == null))) && (_local1.dead))){
return (_local1);
};
_local3++;
};
return (null);
}
protected function destroyMembers():void{
var _local1:FlxObject;
var _local2:uint = members.length;
var _local3:uint;
while (_local3 < _local2) {
_local1 = (members[_local3] as FlxObject);
if (_local1 != null){
_local1.destroy();
};
_local3++;
};
members.length = 0;
}
}
}//package org.flixel
Section 254
//FlxObject (org.flixel.FlxObject)
package org.flixel {
import flash.geom.*;
public class FlxObject extends FlxRect {
public var acceleration:FlxPoint;
public var angularAcceleration:Number;
public var active:Boolean;
public var collideBottom:Boolean;
var _group:Boolean;
protected var _point:FlxPoint;
public var colHullX:FlxRect;
protected var _flickerTimer:Number;
public var colHullY:FlxRect;
protected var _flashPoint:Point;
public var colOffsets:Array;
public var solid:Boolean;
public var origin:FlxPoint;
public var drag:FlxPoint;
public var angularDrag:Number;
public var collideTop:Boolean;
protected var _flicker:Boolean;
protected var _rect:FlxRect;
public var moves:Boolean;
public var angle:Number;
public var thrust:Number;
public var health:Number;
public var velocity:FlxPoint;
public var maxAngular:Number;
public var angularVelocity:Number;
public var maxVelocity:FlxPoint;
public var exists:Boolean;
public var collideLeft:Boolean;
public var colVector:FlxPoint;
public var maxThrust:Number;
public var onFloor:Boolean;
public var dead:Boolean;
public var fixed:Boolean;
public var visible:Boolean;
public var scrollFactor:FlxPoint;
public var collideRight:Boolean;
protected static const _pZero:FlxPoint = new FlxPoint();
public function FlxObject(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
super(_arg1, _arg2, _arg3, _arg4);
exists = true;
active = true;
visible = true;
solid = true;
fixed = false;
moves = true;
collideLeft = true;
collideRight = true;
collideTop = true;
collideBottom = true;
origin = new FlxPoint();
velocity = new FlxPoint();
acceleration = new FlxPoint();
drag = new FlxPoint();
maxVelocity = new FlxPoint(10000, 10000);
angle = 0;
angularVelocity = 0;
angularAcceleration = 0;
angularDrag = 0;
maxAngular = 10000;
thrust = 0;
scrollFactor = new FlxPoint(1, 1);
_flicker = false;
_flickerTimer = -1;
health = 1;
dead = false;
_point = new FlxPoint();
_rect = new FlxRect();
_flashPoint = new Point();
colHullX = new FlxRect();
colHullY = new FlxRect();
colVector = new FlxPoint();
colOffsets = new Array(new FlxPoint());
_group = false;
}
public function onScreen():Boolean{
getScreenXY(_point);
if (((((((((_point.x + width) < 0)) || ((_point.x > FlxG.width)))) || (((_point.y + height) < 0)))) || ((_point.y > FlxG.height)))){
return (false);
};
return (true);
}
public function kill():void{
exists = false;
dead = true;
}
protected function updateFlickering():void{
if (flickering()){
if (_flickerTimer > 0){
_flickerTimer = (_flickerTimer - FlxG.elapsed);
if (_flickerTimer == 0){
_flickerTimer = -1;
};
};
if (_flickerTimer < 0){
flicker(-1);
} else {
_flicker = !(_flicker);
visible = !(_flicker);
};
};
}
public function render():void{
}
public function hitBottom(_arg1:FlxObject, _arg2:Number):void{
onFloor = true;
if (!fixed){
velocity.y = _arg2;
};
}
public function overlaps(_arg1:FlxObject):Boolean{
var _local10:FlxSprite;
var _local11:FlxSprite;
getScreenXY(_point);
var _local2:Number = _point.x;
var _local3:Number = _point.y;
var _local4:Number = width;
var _local5:Number = height;
if ((this is FlxSprite)){
_local10 = (this as FlxSprite);
_local4 = _local10.frameWidth;
_local5 = _local10.frameHeight;
};
_arg1.getScreenXY(_point);
var _local6:Number = _point.x;
var _local7:Number = _point.y;
var _local8:Number = _arg1.width;
var _local9:Number = _arg1.height;
if ((_arg1 is FlxSprite)){
_local11 = (_arg1 as FlxSprite);
_local8 = _local11.frameWidth;
_local9 = _local11.frameHeight;
};
if ((((((((_local6 <= (_local2 - _local8))) || ((_local6 >= (_local2 + _local4))))) || ((_local7 <= (_local3 - _local9))))) || ((_local7 >= (_local3 + _local5))))){
return (false);
};
return (true);
}
public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
_arg1 = (_arg1 + FlxU.floor(FlxG.scroll.x));
_arg2 = (_arg2 + FlxU.floor(FlxG.scroll.y));
getScreenXY(_point);
if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + width))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + height))))){
return (false);
};
return (true);
}
public function hurt(_arg1:Number):void{
if ((health = (health - _arg1)) <= 0){
kill();
};
}
public function refreshHulls():void{
colHullX.x = x;
colHullX.y = y;
colHullX.width = width;
colHullX.height = height;
colHullY.x = x;
colHullY.y = y;
colHullY.width = width;
colHullY.height = height;
}
public function preCollide(_arg1:FlxObject):void{
}
public function hitLeft(_arg1:FlxObject, _arg2:Number):void{
if (!fixed){
velocity.x = _arg2;
};
}
public function collide(_arg1:FlxObject=null):Boolean{
return (FlxU.collide(this, ((_arg1)==null) ? this : _arg1));
}
public function reset(_arg1:Number, _arg2:Number):void{
x = _arg1;
y = _arg2;
exists = true;
dead = false;
}
public function update():void{
updateMotion();
updateFlickering();
}
public function hitTop(_arg1:FlxObject, _arg2:Number):void{
if (!fixed){
velocity.y = _arg2;
};
}
protected function updateMotion():void{
var _local1:FlxPoint;
var _local4:FlxPoint;
var _local5:Number;
if (!moves){
return;
};
if (solid){
refreshHulls();
};
onFloor = false;
angle = (angle + ((angularVelocity = FlxU.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular)) * FlxG.elapsed));
if (thrust != 0){
_local1 = FlxU.rotatePoint(-(thrust), 0, 0, 0, angle);
_local4 = FlxU.rotatePoint(-(maxThrust), 0, 0, 0, angle);
_local5 = ((_local4.x)>0) ? _local4.x : -(_local4.x);
if (_local5 > ((_local4.y)>0) ? _local4.y : -(_local4.y)){
_local4.y = _local5;
} else {
_local5 = ((_local4.y)>0) ? _local4.y : -(_local4.y);
};
maxVelocity.x = (maxVelocity.y = ((_local5)>0) ? _local5 : -(_local5));
} else {
_local1 = _pZero;
};
velocity.x = FlxU.computeVelocity(velocity.x, (acceleration.x + _local1.x), drag.x, maxVelocity.x);
velocity.y = FlxU.computeVelocity(velocity.y, (acceleration.y + _local1.y), drag.y, maxVelocity.y);
var _local2:Number = (velocity.x * FlxG.elapsed);
var _local3:Number = (velocity.y * FlxG.elapsed);
x = (x + _local2);
y = (y + _local3);
if (!solid){
return;
};
colVector.x = _local2;
colVector.y = _local3;
colHullX.width = (colHullX.width + ((colVector.x)>0) ? colVector.x : -(colVector.x));
if (colVector.x < 0){
colHullX.x = (colHullX.x + colVector.x);
};
colHullY.x = x;
colHullY.height = (colHullY.height + ((colVector.y)>0) ? colVector.y : -(colVector.y));
if (colVector.y < 0){
colHullY.y = (colHullY.y + colVector.y);
};
}
public function flickering():Boolean{
return ((_flickerTimer >= 0));
}
public function hitRight(_arg1:FlxObject, _arg2:Number):void{
hitLeft(_arg1, _arg2);
}
public function destroy():void{
}
public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{
if (_arg1 == null){
_arg1 = new FlxPoint();
};
_arg1.x = (FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y)));
return (_arg1);
}
public function flicker(_arg1:Number=1):void{
_flickerTimer = _arg1;
if (_flickerTimer < 0){
_flicker = false;
visible = true;
};
}
}
}//package org.flixel
Section 255
//FlxPoint (org.flixel.FlxPoint)
package org.flixel {
public class FlxPoint {
public var x:Number;
public var y:Number;
public function FlxPoint(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
}
public function toString():String{
return (FlxU.getClassName(this, true));
}
}
}//package org.flixel
Section 256
//FlxQuadTree (org.flixel.FlxQuadTree)
package org.flixel {
import org.flixel.data.*;
public class FlxQuadTree extends FlxRect {
protected var _sw:FlxQuadTree;
protected var _mx:Number;
protected var _my:Number;
protected var _ne:FlxQuadTree;
protected var _hh:Number;
protected var _headA:FlxList;
protected var _headB:FlxList;
protected var _canSubdivide:Boolean;
protected var _l:Number;
protected var _hw:Number;
protected var _nw:FlxQuadTree;
protected var _se:FlxQuadTree;
protected var _tailA:FlxList;
protected var _r:Number;
protected var _t:Number;
protected var _tailB:FlxList;
protected var _b:Number;
public static const A_LIST:uint = 0;
public static const MIN:Number = 48;
public static const B_LIST:uint = 1;
protected static var _ot:Number;
protected static var _or:Number;
protected static var _o:FlxObject;
protected static var _oa:uint;
protected static var _oc:Function;
protected static var _ob:Number;
protected static var _ol:Number;
public function FlxQuadTree(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:FlxQuadTree=null){
var _local6:FlxList;
var _local7:FlxList;
super(_arg1, _arg2, _arg3, _arg4);
_canSubdivide = (((_arg3 > MIN)) || ((_arg4 > MIN)));
_headA = (_tailA = new FlxList());
_headB = (_tailB = new FlxList());
if (_arg5){
if (_arg5._headA.object != null){
_local6 = _arg5._headA;
while (_local6 != null) {
if (_tailA.object != null){
_local7 = _tailA;
_tailA = new FlxList();
_local7.next = _tailA;
};
_tailA.object = _local6.object;
_local6 = _local6.next;
};
};
if (_arg5._headB.object != null){
_local6 = _arg5._headB;
while (_local6 != null) {
if (_tailB.object != null){
_local7 = _tailB;
_tailB = new FlxList();
_local7.next = _tailB;
};
_tailB.object = _local6.object;
_local6 = _local6.next;
};
};
};
_nw = null;
_ne = null;
_se = null;
_sw = null;
_l = x;
_r = (x + width);
_hw = (width / 2);
_mx = (_l + _hw);
_t = y;
_b = (y + height);
_hh = (height / 2);
_my = (_t + _hh);
}
protected function addObject():void{
if (((!(_canSubdivide)) || ((((((((_l >= _ol)) && ((_r <= _or)))) && ((_t >= _ot)))) && ((_b <= _ob)))))){
addToList();
return;
};
if ((((_ol > _l)) && ((_or < _mx)))){
if ((((_ot > _t)) && ((_ob < _my)))){
if (_nw == null){
_nw = new FlxQuadTree(_l, _t, _hw, _hh, this);
};
_nw.addObject();
return;
};
if ((((_ot > _my)) && ((_ob < _b)))){
if (_sw == null){
_sw = new FlxQuadTree(_l, _my, _hw, _hh, this);
};
_sw.addObject();
return;
};
};
if ((((_ol > _mx)) && ((_or < _r)))){
if ((((_ot > _t)) && ((_ob < _my)))){
if (_ne == null){
_ne = new FlxQuadTree(_mx, _t, _hw, _hh, this);
};
_ne.addObject();
return;
};
if ((((_ot > _my)) && ((_ob < _b)))){
if (_se == null){
_se = new FlxQuadTree(_mx, _my, _hw, _hh, this);
};
_se.addObject();
return;
};
};
if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _t)))) && ((_ot < _my)))){
if (_nw == null){
_nw = new FlxQuadTree(_l, _t, _hw, _hh, this);
};
_nw.addObject();
};
if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _t)))) && ((_ot < _my)))){
if (_ne == null){
_ne = new FlxQuadTree(_mx, _t, _hw, _hh, this);
};
_ne.addObject();
};
if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _my)))) && ((_ot < _b)))){
if (_se == null){
_se = new FlxQuadTree(_mx, _my, _hw, _hh, this);
};
_se.addObject();
};
if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _my)))) && ((_ot < _b)))){
if (_sw == null){
_sw = new FlxQuadTree(_l, _my, _hw, _hh, this);
};
_sw.addObject();
};
}
protected function addToList():void{
var _local1:FlxList;
if (_oa == A_LIST){
if (_tailA.object != null){
_local1 = _tailA;
_tailA = new FlxList();
_local1.next = _tailA;
};
_tailA.object = _o;
} else {
if (_tailB.object != null){
_local1 = _tailB;
_tailB = new FlxList();
_local1.next = _tailB;
};
_tailB.object = _o;
};
if (!_canSubdivide){
return;
};
if (_nw != null){
_nw.addToList();
};
if (_ne != null){
_ne.addToList();
};
if (_se != null){
_se.addToList();
};
if (_sw != null){
_sw.addToList();
};
}
public function overlap(_arg1:Boolean=true, _arg2:Function=null):Boolean{
var _local4:FlxList;
_oc = _arg2;
var _local3:Boolean;
if (_arg1){
_oa = B_LIST;
if (_headA.object != null){
_local4 = _headA;
while (_local4 != null) {
_o = _local4.object;
if (((((_o.exists) && (_o.solid))) && (overlapNode()))){
_local3 = true;
};
_local4 = _local4.next;
};
};
_oa = A_LIST;
if (_headB.object != null){
_local4 = _headB;
while (_local4 != null) {
_o = _local4.object;
if (((_o.exists) && (_o.solid))){
if (((!((_nw == null))) && (_nw.overlapNode()))){
_local3 = true;
};
if (((!((_ne == null))) && (_ne.overlapNode()))){
_local3 = true;
};
if (((!((_se == null))) && (_se.overlapNode()))){
_local3 = true;
};
if (((!((_sw == null))) && (_sw.overlapNode()))){
_local3 = true;
};
};
_local4 = _local4.next;
};
};
} else {
if (_headA.object != null){
_local4 = _headA;
while (_local4 != null) {
_o = _local4.object;
if (((((_o.exists) && (_o.solid))) && (overlapNode(_local4.next)))){
_local3 = true;
};
_local4 = _local4.next;
};
};
};
if (((!((_nw == null))) && (_nw.overlap(_arg1, _oc)))){
_local3 = true;
};
if (((!((_ne == null))) && (_ne.overlap(_arg1, _oc)))){
_local3 = true;
};
if (((!((_se == null))) && (_se.overlap(_arg1, _oc)))){
_local3 = true;
};
if (((!((_sw == null))) && (_sw.overlap(_arg1, _oc)))){
_local3 = true;
};
return (_local3);
}
public function add(_arg1:FlxObject, _arg2:uint):void{
var _local3:FlxObject;
var _local4:Array;
var _local5:uint;
var _local6:uint;
_oa = _arg2;
if (_arg1._group){
_local4 = (_arg1 as FlxGroup).members;
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local3 = (_local4[_local6] as FlxObject);
if (((!((_local3 == null))) && (_local3.exists))){
if (_local3._group){
add(_local3, _arg2);
} else {
if (_local3.solid){
_o = _local3;
_ol = _o.x;
_ot = _o.y;
_or = (_o.x + _o.width);
_ob = (_o.y + _o.height);
addObject();
};
};
};
_local6++;
};
};
if (_arg1.solid){
_o = _arg1;
_ol = _o.x;
_ot = _o.y;
_or = (_o.x + _o.width);
_ob = (_o.y + _o.height);
addObject();
};
}
protected function overlapNode(_arg1:FlxList=null):Boolean{
var _local3:FlxObject;
var _local2:Boolean;
var _local4:FlxList = _arg1;
if (_local4 == null){
if (_oa == A_LIST){
_local4 = _headA;
} else {
_local4 = _headB;
};
};
if (_local4.object != null){
while (_local4 != null) {
_local3 = _local4.object;
if ((((((((((((((((((_o === _local3)) || (!(_local3.exists)))) || (!(_o.exists)))) || (!(_local3.solid)))) || (!(_o.solid)))) || (((_o.x + _o.width) < (_local3.x + FlxU.roundingError))))) || (((_o.x + FlxU.roundingError) > (_local3.x + _local3.width))))) || (((_o.y + _o.height) < (_local3.y + FlxU.roundingError))))) || (((_o.y + FlxU.roundingError) > (_local3.y + _local3.height))))){
_local4 = _local4.next;
} else {
if (_oc == null){
_o.kill();
_local3.kill();
_local2 = true;
} else {
if (_oc(_o, _local3)){
_local2 = true;
};
};
_local4 = _local4.next;
};
};
};
return (_local2);
}
}
}//package org.flixel
Section 257
//FlxRect (org.flixel.FlxRect)
package org.flixel {
public class FlxRect extends FlxPoint {
public var width:Number;
public var height:Number;
public function FlxRect(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
super(_arg1, _arg2);
width = _arg3;
height = _arg4;
}
public function get bottom():Number{
return ((y + height));
}
public function get top():Number{
return (y);
}
public function get left():Number{
return (x);
}
public function get right():Number{
return ((x + width));
}
}
}//package org.flixel
Section 258
//FlxSave (org.flixel.FlxSave)
package org.flixel {
import flash.net.*;
public class FlxSave {
protected var _so:SharedObject;
public var data:Object;
public var name:String;
public function FlxSave(){
name = null;
_so = null;
data = null;
}
public function read(_arg1:String):Object{
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.read().");
return (null);
};
return (data[_arg1]);
}
public function forceSave(_arg1:uint=0):Boolean{
var MinFileSize = _arg1;
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.forceSave().");
return (false);
};
var status:Object;
try {
status = _so.flush(MinFileSize);
} catch(e:Error) {
FlxG.log("WARNING: There was a problem flushing\nthe shared object data from FlxSave.");
return (false);
};
return ((status == SharedObjectFlushStatus.FLUSHED));
}
public function bind(_arg1:String):Boolean{
var Name = _arg1;
name = null;
_so = null;
data = null;
name = Name;
try {
_so = SharedObject.getLocal(name);
} catch(e:Error) {
FlxG.log("WARNING: There was a problem binding to\nthe shared object data from FlxSave.");
name = null;
_so = null;
data = null;
return (false);
};
data = _so.data;
return (true);
}
public function erase(_arg1:uint=0):Boolean{
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.erase().");
return (false);
};
_so.clear();
return (forceSave(_arg1));
}
public function write(_arg1:String, _arg2:Object, _arg3:uint=0):Boolean{
if (_so == null){
FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.write().");
return (false);
};
data[_arg1] = _arg2;
return (forceSave(_arg3));
}
}
}//package org.flixel
Section 259
//FlxSound (org.flixel.FlxSound)
package org.flixel {
import flash.events.*;
import flash.media.*;
import flash.net.*;
public class FlxSound extends FlxObject {
public var name:String;
protected var _position:Number;
protected var _fadeOutTotal:Number;
protected var _fadeOutTimer:Number;
protected var _sound:Sound;
public var isMusic:Boolean;// = false
protected var _pauseOnFadeOut:Boolean;
protected var _volumeAdjust:Number;
public var playing:Boolean;
protected var _radius:Number;
protected var _volume:Number;
protected var _point2:FlxPoint;
protected var _fadeInTimer:Number;
public var artist:String;
protected var _channel:SoundChannel;
protected var _fadeInTotal:Number;
protected var _looped:Boolean;
protected var _pan:Boolean;
protected var _transform:SoundTransform;
protected var _init:Boolean;
public var survive:Boolean;
protected var _core:FlxObject;
public function FlxSound(){
_point2 = new FlxPoint();
_transform = new SoundTransform();
init();
fixed = true;
}
public function loadStream(_arg1:String, _arg2:Boolean=false):FlxSound{
stop();
init();
_sound = new Sound();
_sound.addEventListener(Event.ID3, gotID3);
_sound.load(new URLRequest(_arg1));
_looped = _arg2;
updateTransform();
active = true;
return (this);
}
public function stop():void{
_position = 0;
if (_channel != null){
_channel.stop();
stopped();
};
}
public function loadEmbedded(_arg1:Class, _arg2:Boolean=false):FlxSound{
stop();
init();
_sound = new (_arg1);
_looped = _arg2;
updateTransform();
active = true;
return (this);
}
public function get volume():Number{
return (_volume);
}
function updateTransform():void{
if (isMusic){
_transform.volume = ((FlxG.musicVolume * _volume) * _volumeAdjust);
} else {
_transform.volume = (((FlxG.getMuteValue() * FlxG.volume) * _volume) * _volumeAdjust);
};
if (_channel != null){
_channel.soundTransform = _transform;
};
}
protected function init():void{
_transform.pan = 0;
_sound = null;
_position = 0;
_volume = 1;
_volumeAdjust = 1;
_looped = false;
_core = null;
_radius = 0;
_pan = false;
_fadeOutTimer = 0;
_fadeOutTotal = 0;
_pauseOnFadeOut = false;
_fadeInTimer = 0;
_fadeInTotal = 0;
active = false;
visible = false;
solid = false;
playing = false;
name = null;
artist = null;
}
public function play():void{
if (_position < 0){
return;
};
if (_looped){
if (_position == 0){
if (_channel == null){
_channel = _sound.play(0, 9999, _transform);
};
if (_channel == null){
active = false;
};
} else {
_channel = _sound.play(_position, 0, _transform);
if (_channel == null){
active = false;
} else {
_channel.addEventListener(Event.SOUND_COMPLETE, looped);
};
};
} else {
if (_position == 0){
if (_channel == null){
_channel = _sound.play(0, 0, _transform);
if (_channel == null){
active = false;
} else {
_channel.addEventListener(Event.SOUND_COMPLETE, stopped);
};
};
} else {
_channel = _sound.play(_position, 0, _transform);
if (_channel == null){
active = false;
};
};
};
playing = !((_channel == null));
_position = 0;
}
public function set volume(_arg1:Number):void{
_volume = _arg1;
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
updateTransform();
}
protected function looped(_arg1:Event=null):void{
if (_channel == null){
return;
};
_channel.removeEventListener(Event.SOUND_COMPLETE, looped);
_channel = null;
play();
}
protected function updateSound():void{
var _local3:FlxPoint;
var _local4:FlxPoint;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_position != 0){
return;
};
var _local1:Number = 1;
var _local2:Number = 1;
if (_core != null){
_local3 = new FlxPoint();
_local4 = new FlxPoint();
_core.getScreenXY(_local3);
getScreenXY(_local4);
_local5 = (_local3.x - _local4.x);
_local6 = (_local3.y - _local4.y);
_local1 = ((_radius - Math.sqrt(((_local5 * _local5) + (_local6 * _local6)))) / _radius);
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
if (_pan){
_local7 = (-(_local5) / _radius);
if (_local7 < -1){
_local7 = -1;
} else {
if (_local7 > 1){
_local7 = 1;
};
};
_transform.pan = _local7;
};
};
if (_fadeOutTimer > 0){
_fadeOutTimer = (_fadeOutTimer - FlxG.elapsed);
if (_fadeOutTimer <= 0){
if (_pauseOnFadeOut){
pause();
} else {
stop();
};
};
_local2 = (_fadeOutTimer / _fadeOutTotal);
if (_local2 < 0){
_local2 = 0;
};
} else {
if (_fadeInTimer > 0){
_fadeInTimer = (_fadeInTimer - FlxG.elapsed);
_local2 = (_fadeInTimer / _fadeInTotal);
if (_local2 < 0){
_local2 = 0;
};
_local2 = (1 - _local2);
};
};
_volumeAdjust = (_local1 * _local2);
updateTransform();
}
public function fadeIn(_arg1:Number):void{
_fadeOutTimer = 0;
_fadeInTimer = _arg1;
_fadeInTotal = _fadeInTimer;
play();
}
override public function update():void{
super.update();
updateSound();
}
public function fadeOut(_arg1:Number, _arg2:Boolean=false):void{
_pauseOnFadeOut = _arg2;
_fadeInTimer = 0;
_fadeOutTimer = _arg1;
_fadeOutTotal = _fadeOutTimer;
}
protected function stopped(_arg1:Event=null):void{
if (!_looped){
_channel.removeEventListener(Event.SOUND_COMPLETE, stopped);
} else {
_channel.removeEventListener(Event.SOUND_COMPLETE, looped);
};
_channel = null;
active = false;
playing = false;
}
protected function gotID3(_arg1:Event=null):void{
FlxG.log("got ID3 info!");
if (_sound.id3.songName.length > 0){
name = _sound.id3.songName;
};
if (_sound.id3.artist.length > 0){
artist = _sound.id3.artist;
};
_sound.removeEventListener(Event.ID3, gotID3);
}
public function pause():void{
if (_channel == null){
_position = -1;
return;
};
_position = _channel.position;
_channel.stop();
if (_looped){
while (_position >= _sound.length) {
_position = (_position - _sound.length);
};
};
_channel = null;
playing = false;
}
override public function destroy():void{
if (active){
stop();
};
}
public function proximity(_arg1:Number, _arg2:Number, _arg3:FlxObject, _arg4:Number, _arg5:Boolean=true):FlxSound{
x = _arg1;
y = _arg2;
_core = _arg3;
_radius = _arg4;
_pan = _arg5;
return (this);
}
}
}//package org.flixel
Section 260
//FlxSprite (org.flixel.FlxSprite)
package org.flixel {
import flash.display.*;
import flash.geom.*;
import org.flixel.data.*;
public class FlxSprite extends FlxObject {
protected var _mtx:Matrix;
protected var _caf:uint;
public var finished:Boolean;
protected var _animations:Array;
protected var _ct:ColorTransform;
public var offset:FlxPoint;
protected var _callback:Function;
protected var _curAnim:FlxAnim;
protected var _framePixels:BitmapData;
protected var _flipped:uint;
public var scale:FlxPoint;
protected var _pixels:BitmapData;
protected var _bakedRotation:Number;
public var blend:String;
public var frameWidth:uint;
protected var _flashRect2:Rectangle;
protected var _alpha:Number;
protected var _flashPointZero:Point;
protected var _curFrame:uint;
public var frameHeight:uint;
protected var _flashRect:Rectangle;
protected var _frameTimer:Number;
protected var _facing:uint;
public var antialiasing:Boolean;
protected var _color:uint;
public static const LEFT:uint = 0;
public static const DOWN:uint = 3;
public static const UP:uint = 2;
public static const RIGHT:uint = 1;
public function FlxSprite(_arg1:Number=0, _arg2:Number=0, _arg3:Class=null){
x = _arg1;
y = _arg2;
_flashRect = new Rectangle();
_flashRect2 = new Rectangle();
_flashPointZero = new Point();
if (_arg3 == null){
createGraphic(8, 8);
} else {
loadGraphic(_arg3);
};
offset = new FlxPoint();
scale = new FlxPoint(1, 1);
_alpha = 1;
_color = 0xFFFFFF;
blend = null;
antialiasing = false;
finished = false;
_facing = RIGHT;
_animations = new Array();
_flipped = 0;
_curAnim = null;
_curFrame = 0;
_caf = 0;
_frameTimer = 0;
_mtx = new Matrix();
_callback = null;
}
protected function renderSprite():void{
getScreenXY(_point);
_flashPoint.x = _point.x;
_flashPoint.y = _point.y;
if ((((((((((angle == 0)) || ((_bakedRotation > 0)))) && ((scale.x == 1)))) && ((scale.y == 1)))) && ((blend == null)))){
FlxG.buffer.copyPixels(_framePixels, _flashRect, _flashPoint, null, null, true);
return;
};
_mtx.identity();
_mtx.translate(-(origin.x), -(origin.y));
_mtx.scale(scale.x, scale.y);
if (angle != 0){
_mtx.rotate(((Math.PI * 2) * (angle / 360)));
};
_mtx.translate((_point.x + origin.x), (_point.y + origin.y));
FlxG.buffer.draw(_framePixels, _mtx, null, blend, null, antialiasing);
}
public function fill(_arg1:uint):void{
_pixels.fillRect(_flashRect2, _arg1);
calcFrame();
}
public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{
_animations.push(new FlxAnim(_arg1, _arg2, _arg3, _arg4));
}
override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
_arg1 = (_arg1 - FlxU.floor(FlxG.scroll.x));
_arg2 = (_arg2 - FlxU.floor(FlxG.scroll.y));
getScreenXY(_point);
if (_arg3){
return (_framePixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _point.x), (_arg2 - _point.y))));
};
if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + frameWidth))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + frameHeight))))){
return (false);
};
return (true);
}
override public function render():void{
renderSprite();
}
protected function calcFrame():void{
var _local1:uint = (_caf * frameWidth);
var _local2:uint;
var _local3:uint = (_flipped) ? _flipped : _pixels.width;
if (_local1 >= _local3){
_local2 = (uint((_local1 / _local3)) * frameHeight);
_local1 = (_local1 % _local3);
};
if (((_flipped) && ((_facing == LEFT)))){
_local1 = (((_flipped << 1) - _local1) - frameWidth);
};
_flashRect.x = _local1;
_flashRect.y = _local2;
_framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
_flashRect.x = (_flashRect.y = 0);
if (_ct != null){
_framePixels.colorTransform(_flashRect, _ct);
};
if (_callback != null){
_callback(_curAnim.name, _curFrame, _caf);
};
}
function unsafeBind(_arg1:BitmapData):void{
_pixels = (_framePixels = _arg1);
}
public function loadGraphic(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:Boolean=false):FlxSprite{
_bakedRotation = 0;
_pixels = FlxG.addBitmap(_arg1, _arg3, _arg6);
if (_arg3){
_flipped = (_pixels.width >> 1);
} else {
_flipped = 0;
};
if (_arg4 == 0){
if (_arg2){
_arg4 = _pixels.height;
} else {
if (_flipped > 0){
_arg4 = (_pixels.width / 2);
} else {
_arg4 = _pixels.width;
};
};
};
width = (frameWidth = _arg4);
if (_arg5 == 0){
if (_arg2){
_arg5 = width;
} else {
_arg5 = _pixels.height;
};
};
height = (frameHeight = _arg5);
resetHelpers();
return (this);
}
public function get pixels():BitmapData{
return (_pixels);
}
public function set facing(_arg1:uint):void{
var _local2 = !((_facing == _arg1));
_facing = _arg1;
if (_local2){
calcFrame();
};
}
protected function resetHelpers():void{
_flashRect.x = 0;
_flashRect.y = 0;
_flashRect.width = frameWidth;
_flashRect.height = frameHeight;
_flashRect2.x = 0;
_flashRect2.y = 0;
_flashRect2.width = _pixels.width;
_flashRect2.height = _pixels.height;
if ((((((_framePixels == null)) || (!((_framePixels.width == width))))) || (!((_framePixels.height == height))))){
_framePixels = new BitmapData(width, height);
};
origin.x = (frameWidth / 2);
origin.y = (frameHeight / 2);
_framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
_caf = 0;
refreshHulls();
}
override public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{
if (_arg1 == null){
_arg1 = new FlxPoint();
};
_arg1.x = ((FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x))) - offset.x);
_arg1.y = ((FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y))) - offset.y);
return (_arg1);
}
public function set alpha(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 == _alpha){
return;
};
_alpha = _arg1;
if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){
_ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha);
} else {
_ct = null;
};
calcFrame();
}
protected function updateAnimation():void{
var _local1:uint;
var _local2:int;
if (_bakedRotation){
_local1 = _caf;
_local2 = (angle % 360);
if (_local2 < 0){
_local2 = (_local2 + 360);
};
_caf = (_local2 / _bakedRotation);
if (_local1 != _caf){
calcFrame();
};
return;
};
if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){
_frameTimer = (_frameTimer + FlxG.elapsed);
if (_frameTimer > _curAnim.delay){
_frameTimer = (_frameTimer - _curAnim.delay);
if (_curFrame == (_curAnim.frames.length - 1)){
if (_curAnim.looped){
_curFrame = 0;
};
finished = true;
} else {
_curFrame++;
};
_caf = _curAnim.frames[_curFrame];
calcFrame();
};
};
}
public function draw(_arg1:FlxSprite, _arg2:int=0, _arg3:int=0):void{
var _local4:BitmapData = _arg1._framePixels;
if ((((((((((_arg1.angle == 0)) || ((_arg1._bakedRotation > 0)))) && ((_arg1.scale.x == 1)))) && ((_arg1.scale.y == 1)))) && ((_arg1.blend == null)))){
_flashPoint.x = _arg2;
_flashPoint.y = _arg3;
_flashRect2.width = _local4.width;
_flashRect2.height = _local4.height;
_pixels.copyPixels(_local4, _flashRect2, _flashPoint, null, null, true);
_flashRect2.width = _pixels.width;
_flashRect2.height = _pixels.height;
calcFrame();
return;
};
_mtx.identity();
_mtx.translate(-(_arg1.origin.x), -(_arg1.origin.y));
_mtx.scale(_arg1.scale.x, _arg1.scale.y);
if (_arg1.angle != 0){
_mtx.rotate(((Math.PI * 2) * (_arg1.angle / 360)));
};
_mtx.translate((_arg2 + _arg1.origin.x), (_arg3 + _arg1.origin.y));
_pixels.draw(_local4, _mtx, null, _arg1.blend, null, _arg1.antialiasing);
calcFrame();
}
public function loadRotatedGraphic(_arg1:Class, _arg2:uint=16, _arg3:int=-1, _arg4:Boolean=false, _arg5:Boolean=false):FlxSprite{
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local6:uint = 4;
var _local7:FlxSprite = new FlxSprite().loadGraphic(_arg1, (_arg3 >= 0));
if (_arg3 >= 0){
_local7.frame = _arg3;
};
_local7.antialiasing = _arg4;
var _local8:uint = _local7.width;
if (_local7.height > _local8){
_local8 = _local7.height;
};
if (_arg5){
_local8 = (_local8 * 1.5);
};
var _local9:uint = Math.ceil((_arg2 / _local6));
width = (_local8 * _local9);
height = (_local8 * _local6);
var _local10:String = ((((((String(_arg1) + ":") + _arg3) + ":") + width) + "x") + height);
var _local11:Boolean = FlxG.checkBitmapCache(_local10);
createGraphic(width, height, 0, true, _local10);
_bakedRotation = (360 / _arg2);
if (!_local11){
_local14 = (_local7.width / 2);
_local15 = (_local7.height / 2);
_local16 = (_local8 / 2);
_local17 = (_local8 / 2);
_local12 = 0;
while (_local12 < _local6) {
_local13 = 0;
while (_local13 < _local9) {
draw(_local7, ((_local16 + (_local8 * _local13)) - _local14), (_local17 - _local15));
_local7.angle = (_local7.angle + _bakedRotation);
_local13++;
};
_local17 = (_local17 + _local8);
_local12++;
};
};
frameWidth = (frameHeight = (width = (height = _local8)));
resetHelpers();
return (this);
}
public function set color(_arg1:uint):void{
_arg1 = (_arg1 & 0xFFFFFF);
if (_color == _arg1){
return;
};
_color = _arg1;
if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){
_ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha);
} else {
_ct = null;
};
calcFrame();
}
override public function update():void{
updateMotion();
updateAnimation();
updateFlickering();
}
public function onEmit():void{
}
public function createGraphic(_arg1:uint, _arg2:uint, _arg3:uint=4294967295, _arg4:Boolean=false, _arg5:String=null):FlxSprite{
_bakedRotation = 0;
_pixels = FlxG.createBitmap(_arg1, _arg2, _arg3, _arg4, _arg5);
width = (frameWidth = _pixels.width);
height = (frameHeight = _pixels.height);
resetHelpers();
return (this);
}
public function play(_arg1:String, _arg2:Boolean=false):void{
if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){
return;
};
_curFrame = 0;
_caf = 0;
_frameTimer = 0;
var _local3:uint = _animations.length;
var _local4:uint;
while (_local4 < _local3) {
if (_animations[_local4].name == _arg1){
_curAnim = _animations[_local4];
if (_curAnim.delay <= 0){
finished = true;
} else {
finished = false;
};
_caf = _curAnim.frames[_curFrame];
calcFrame();
return;
};
_local4++;
};
}
public function addAnimationCallback(_arg1:Function):void{
_callback = _arg1;
}
public function set pixels(_arg1:BitmapData):void{
_pixels = _arg1;
width = (frameWidth = _pixels.width);
height = (frameHeight = _pixels.height);
resetHelpers();
}
public function get alpha():Number{
return (_alpha);
}
public function get facing():uint{
return (_facing);
}
public function get color():uint{
return (_color);
}
public function set frame(_arg1:uint):void{
_curAnim = null;
_caf = _arg1;
calcFrame();
}
public function get frame():uint{
return (_caf);
}
public function randomFrame():void{
_curAnim = null;
_caf = int((FlxU.random() * (_pixels.width / frameWidth)));
calcFrame();
}
}
}//package org.flixel
Section 261
//FlxState (org.flixel.FlxState)
package org.flixel {
import flash.display.*;
public class FlxState extends Sprite {
public var defaultGroup:FlxGroup;
public static var screen:FlxSprite;
public static var bgColor:uint;
public function FlxState(){
defaultGroup = new FlxGroup();
if (screen == null){
screen = new FlxSprite();
screen.createGraphic(FlxG.width, FlxG.height, 0, true);
screen.origin.x = (screen.origin.y = 0);
screen.antialiasing = true;
};
}
public function add(_arg1:FlxObject):FlxObject{
return (defaultGroup.add(_arg1));
}
public function preProcess():void{
screen.fill(bgColor);
}
public function collide():void{
defaultGroup.collide();
}
public function render():void{
defaultGroup.render();
}
public function update():void{
defaultGroup.update();
}
public function destroy():void{
defaultGroup.destroy();
}
public function create():void{
}
public function postProcess():void{
}
}
}//package org.flixel
Section 262
//FlxText (org.flixel.FlxText)
package org.flixel {
import flash.display.*;
import flash.text.*;
public class FlxText extends FlxSprite {
protected var _tf:TextField;
protected var _regen:Boolean;
protected var _shadow:uint;
public function FlxText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:String=null){
super(_arg1, _arg2);
createGraphic(_arg3, 1);
if (_arg4 == null){
_arg4 = "";
};
_tf = new TextField();
_tf.width = _arg3;
_tf.embedFonts = true;
_tf.selectable = false;
_tf.sharpness = 100;
_tf.multiline = true;
_tf.wordWrap = true;
_tf.text = _arg4;
var _local5:TextFormat = new TextFormat("system", 8, 0xFFFFFF);
_tf.defaultTextFormat = _local5;
_tf.setTextFormat(_local5);
if (_arg4.length <= 0){
_tf.height = 1;
} else {
_tf.height = 10;
};
_regen = true;
_shadow = 0;
solid = false;
calcFrame();
}
public function get shadow():uint{
return (_shadow);
}
public function get size():Number{
return ((_tf.defaultTextFormat.size as Number));
}
override public function get color():uint{
return ((_tf.defaultTextFormat.color as uint));
}
override public function set color(_arg1:uint):void{
var _local2:TextFormat = dtfCopy();
_local2.color = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
public function set shadow(_arg1:uint):void{
_shadow = _arg1;
calcFrame();
}
public function set size(_arg1:Number):void{
var _local2:TextFormat = dtfCopy();
_local2.size = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
public function get alignment():String{
return (_tf.defaultTextFormat.align);
}
protected function dtfCopy():TextFormat{
var _local1:TextFormat = _tf.defaultTextFormat;
return (new TextFormat(_local1.font, _local1.size, _local1.color, _local1.bold, _local1.italic, _local1.underline, _local1.url, _local1.target, _local1.align));
}
public function get text():String{
return (_tf.text);
}
public function get font():String{
return (_tf.defaultTextFormat.font);
}
public function set alignment(_arg1:String):void{
var _local2:TextFormat = dtfCopy();
_local2.align = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
calcFrame();
}
public function set font(_arg1:String):void{
var _local2:TextFormat = dtfCopy();
_local2.font = _arg1;
_tf.defaultTextFormat = _local2;
_tf.setTextFormat(_local2);
_regen = true;
calcFrame();
}
override protected function calcFrame():void{
var _local3:uint;
var _local4:uint;
if ((((((_tf == null)) || ((_tf.text == null)))) || ((_tf.text.length <= 0)))){
_pixels.fillRect(_flashRect, 0);
return;
};
if (_regen){
_local3 = _tf.numLines;
height = 0;
_local4 = 0;
while (_local4 < _local3) {
height = (height + _tf.getLineMetrics(_local4).height);
_local4++;
};
height = (height + 4);
_pixels = new BitmapData(width, height, true, 0);
frameHeight = height;
_tf.height = (height * 1.2);
_flashRect.x = 0;
_flashRect.y = 0;
_flashRect.width = width;
_flashRect.height = height;
_regen = false;
} else {
_pixels.fillRect(_flashRect, 0);
};
var _local1:TextFormat = _tf.defaultTextFormat;
var _local2:TextFormat = _local1;
_mtx.identity();
if ((((_local1.align == "center")) && ((_tf.numLines == 1)))){
_local2 = new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, "left");
_tf.setTextFormat(_local2);
_mtx.translate(Math.floor(((width - _tf.getLineMetrics(0).width) / 2)), 0);
};
if (_shadow > 0){
_tf.setTextFormat(new TextFormat(_local2.font, _local2.size, _shadow, null, null, null, null, null, _local2.align));
_mtx.translate(1, 1);
_pixels.draw(_tf, _mtx, _ct);
_mtx.translate(-1, -1);
_tf.setTextFormat(new TextFormat(_local2.font, _local2.size, _local2.color, null, null, null, null, null, _local2.align));
};
_pixels.draw(_tf, _mtx, _ct);
_tf.setTextFormat(new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, _local1.align));
_framePixels = new BitmapData(_pixels.width, _pixels.height, true, 0);
_framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
if (solid){
refreshHulls();
};
}
public function setFormat(_arg1:String=null, _arg2:Number=8, _arg3:uint=0xFFFFFF, _arg4:String=null, _arg5:uint=0):FlxText{
if (_arg1 == null){
_arg1 = "";
};
var _local6:TextFormat = dtfCopy();
_local6.font = _arg1;
_local6.size = _arg2;
_local6.color = _arg3;
_local6.align = _arg4;
_tf.defaultTextFormat = _local6;
_tf.setTextFormat(_local6);
_shadow = _arg5;
_regen = true;
calcFrame();
return (this);
}
public function set text(_arg1:String):void{
_tf.text = _arg1;
_regen = true;
calcFrame();
}
}
}//package org.flixel
Section 263
//FlxU (org.flixel.FlxU)
package org.flixel {
import flash.utils.*;
import flash.net.*;
public class FlxU {
protected static var _originalSeed:Number;
public static var quadTree:FlxQuadTree;
protected static var _seed:Number;
static var roundingError:Number = 1E-7;
public static var quadTreeBounds:FlxRect;
public static function random(_arg1:Boolean=true):Number{
var _local2:Number;
if (((_arg1) && (!(isNaN(_seed))))){
_local2 = randomize(_seed);
_seed = mutate(_seed, _local2);
return (_local2);
};
return (Math.random());
}
public static function mutate(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 + _arg2);
if (_arg1 > 1){
_arg1 = (_arg1 - int(_arg1));
};
return (_arg1);
}
public static function overlap(_arg1:FlxObject, _arg2:FlxObject, _arg3:Function=null):Boolean{
if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){
return (false);
};
quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height);
quadTree.add(_arg1, FlxQuadTree.A_LIST);
if (_arg1 === _arg2){
return (quadTree.overlap(false, _arg3));
};
quadTree.add(_arg2, FlxQuadTree.B_LIST);
return (quadTree.overlap(true, _arg3));
}
public static function getClass(_arg1:String):Class{
return ((getDefinitionByName(_arg1) as Class));
}
public static function openURL(_arg1:String):void{
navigateToURL(new URLRequest(_arg1), "_blank");
}
public static function floor(_arg1:Number):Number{
var _local2:Number = int(_arg1);
return (((_arg1)>0) ? _local2 : ((_local2)!=_arg1) ? (_local2 - 1) : _local2);
}
public static function solveYCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{
var _local5:Number;
var _local7:Boolean;
var _local14:uint;
var _local15:uint;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local3:Number = _arg1.colVector.y;
var _local4:Number = _arg2.colVector.y;
if (_local3 == _local4){
return (false);
};
_arg1.preCollide(_arg2);
_arg2.preCollide(_arg1);
var _local6:Boolean;
var _local8 = (_local3 == 0);
var _local9 = (_local3 < 0);
var _local10 = (_local3 > 0);
var _local11 = (_local4 == 0);
var _local12 = (_local4 < 0);
var _local13 = (_local4 > 0);
var _local16:FlxRect = _arg1.colHullY;
var _local17:FlxRect = _arg2.colHullY;
var _local18:Array = _arg1.colOffsets;
var _local19:Array = _arg2.colOffsets;
var _local20:uint = _local18.length;
var _local21:uint = _local19.length;
_local7 = ((((((((((_local8) && (_local12))) || (((_local10) && (_local11))))) || (((_local10) && (_local12))))) || (((((_local9) && (_local12))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local10) && (_local13))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4))))));
if ((_local7) ? ((!(_arg1.collideBottom)) || (!(_arg2.collideTop))) : ((!(_arg1.collideTop)) || (!(_arg2.collideBottom)))){
return (false);
};
_local14 = 0;
while (_local14 < _local20) {
_local22 = _local18[_local14].x;
_local23 = _local18[_local14].y;
_local16.x = (_local16.x + _local22);
_local16.y = (_local16.y + _local23);
_local15 = 0;
while (_local15 < _local21) {
_local24 = _local19[_local15].x;
_local25 = _local19[_local15].y;
_local17.x = (_local17.x + _local24);
_local17.y = (_local17.y + _local25);
if (((((((((_local16.x + _local16.width) < (_local17.x + roundingError))) || (((_local16.x + roundingError) > (_local17.x + _local17.width))))) || (((_local16.y + _local16.height) < (_local17.y + roundingError))))) || (((_local16.y + roundingError) > (_local17.y + _local17.height))))){
_local17.x = (_local17.x - _local24);
_local17.y = (_local17.y - _local25);
} else {
if (_local7){
if (_local9){
_local26 = (_local16.y + _arg1.colHullX.height);
} else {
_local26 = (_local16.y + _local16.height);
};
if (_local12){
_local27 = _local17.y;
} else {
_local27 = ((_local17.y + _local17.height) - _arg2.colHullX.height);
};
} else {
if (_local12){
_local26 = (-(_local17.y) - _arg2.colHullX.height);
} else {
_local26 = (-(_local17.y) - _local17.height);
};
if (_local9){
_local27 = -(_local16.y);
} else {
_local27 = ((-(_local16.y) - _local16.height) + _arg1.colHullX.height);
};
};
_local5 = (_local26 - _local27);
if ((((((_local5 == 0)) || (((!(_arg1.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local16.height * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local17.height * 0.8))))))){
_local17.x = (_local17.x - _local24);
_local17.y = (_local17.y - _local25);
} else {
_local6 = true;
_local28 = _arg2.velocity.y;
_local29 = _arg1.velocity.y;
if (((!(_arg1.fixed)) && (_arg2.fixed))){
if (_arg1._group){
_arg1.reset(_arg1.x, (_arg1.y - _local5));
} else {
_arg1.y = (_arg1.y - _local5);
};
} else {
if (((_arg1.fixed) && (!(_arg2.fixed)))){
if (_arg2._group){
_arg2.reset(_arg2.x, (_arg2.y + _local5));
} else {
_arg2.y = (_arg2.y + _local5);
};
} else {
if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){
_local5 = (_local5 / 2);
if (_arg1._group){
_arg1.reset(_arg1.x, (_arg1.y - _local5));
} else {
_arg1.y = (_arg1.y - _local5);
};
if (_arg2._group){
_arg2.reset(_arg2.x, (_arg2.y + _local5));
} else {
_arg2.y = (_arg2.y + _local5);
};
_local28 = (_local28 / 2);
_local29 = (_local29 / 2);
};
};
};
if (_local7){
_arg1.hitBottom(_arg2, _local28);
_arg2.hitTop(_arg1, _local29);
} else {
_arg1.hitTop(_arg2, _local28);
_arg2.hitBottom(_arg1, _local29);
};
if (((!(_arg1.fixed)) && (!((_local5 == 0))))){
if (_local7){
_local16.y = (_local16.y - _local5);
if (((_arg2.fixed) && (_arg2.moves))){
_local28 = _arg2.colVector.x;
_arg1.x = (_arg1.x + _local28);
_local16.x = (_local16.x + _local28);
_arg1.colHullX.x = (_arg1.colHullX.x + _local28);
};
} else {
_local16.y = (_local16.y - _local5);
_local16.height = (_local16.height + _local5);
};
};
if (((!(_arg2.fixed)) && (!((_local5 == 0))))){
if (_local7){
_local17.y = (_local17.y + _local5);
_local17.height = (_local17.height - _local5);
} else {
_local17.height = (_local17.height + _local5);
if (((_arg1.fixed) && (_arg1.moves))){
_local29 = _arg1.colVector.x;
_arg2.x = (_arg2.x + _local29);
_local17.x = (_local17.x + _local29);
_arg2.colHullX.x = (_arg2.colHullX.x + _local29);
};
};
};
_local17.x = (_local17.x - _local24);
_local17.y = (_local17.y - _local25);
};
};
_local15++;
};
_local16.x = (_local16.x - _local22);
_local16.y = (_local16.y - _local23);
_local14++;
};
return (_local6);
}
public static function ceil(_arg1:Number):Number{
var _local2:Number = int(_arg1);
return (((_arg1)>0) ? ((_local2)!=_arg1) ? (_local2 + 1) : _local2 : _local2);
}
public static function getAngle(_arg1:Number, _arg2:Number):Number{
return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI));
}
public static function setWorldBounds(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{
if ((((((((_arg1 == 0)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){
_arg1 = (-128 * FlxG.width);
_arg2 = (-128 * FlxG.height);
_arg3 = (0x0100 * FlxG.width);
_arg4 = (0x0100 * FlxG.height);
};
if (quadTreeBounds == null){
quadTreeBounds = new FlxRect();
};
quadTreeBounds.x = _arg1;
quadTreeBounds.y = _arg2;
if (_arg3 != 0){
quadTreeBounds.width = _arg3;
};
if (_arg4 != 0){
quadTreeBounds.height = _arg4;
};
}
public static function set seed(_arg1:Number):void{
_seed = _arg1;
_originalSeed = _seed;
}
public static function getClassName(_arg1:Object, _arg2:Boolean=false):String{
var _local3:String = getQualifiedClassName(_arg1);
_local3 = _local3.replace("::", ".");
if (_arg2){
_local3 = _local3.substr((_local3.lastIndexOf(".") + 1));
};
return (_local3);
}
public static function randomize(_arg1:Number):Number{
return ((((69621 * int((_arg1 * 2147483647))) % 2147483647) / 2147483647));
}
public static function abs(_arg1:Number):Number{
return (((_arg1)>0) ? _arg1 : -(_arg1));
}
public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{
var _local5:Number;
if (_arg2 != 0){
_arg1 = (_arg1 + (_arg2 * FlxG.elapsed));
} else {
if (_arg3 != 0){
_local5 = (_arg3 * FlxG.elapsed);
if ((_arg1 - _local5) > 0){
_arg1 = (_arg1 - _local5);
} else {
if ((_arg1 + _local5) < 0){
_arg1 = (_arg1 + _local5);
} else {
_arg1 = 0;
};
};
};
};
if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){
if (_arg1 > _arg4){
_arg1 = _arg4;
} else {
if (_arg1 < -(_arg4)){
_arg1 = -(_arg4);
};
};
};
return (_arg1);
}
public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:FlxPoint=null):FlxPoint{
if (_arg6 == null){
_arg6 = new FlxPoint();
};
var _local7:Number = ((-(_arg5) / 180) * Math.PI);
var _local8:Number = (_arg1 - _arg3);
var _local9:Number = (_arg4 - _arg2);
_arg6.x = ((_arg3 + (Math.cos(_local7) * _local8)) - (Math.sin(_local7) * _local9));
_arg6.y = (_arg4 - ((Math.sin(_local7) * _local8) + (Math.cos(_local7) * _local9)));
return (_arg6);
}
public static function get seed():Number{
return (_originalSeed);
}
public static function solveXCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{
var _local5:Boolean;
var _local6:Boolean;
var _local7:Number;
var _local9:Boolean;
var _local16:uint;
var _local17:uint;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local3:Number = _arg1.colVector.x;
var _local4:Number = _arg2.colVector.x;
if (_local3 == _local4){
return (false);
};
_arg1.preCollide(_arg2);
_arg2.preCollide(_arg1);
var _local8:Boolean;
var _local10 = (_local3 == 0);
var _local11 = (_local3 < 0);
var _local12 = (_local3 > 0);
var _local13 = (_local4 == 0);
var _local14 = (_local4 < 0);
var _local15 = (_local4 > 0);
var _local18:FlxRect = _arg1.colHullX;
var _local19:FlxRect = _arg2.colHullX;
var _local20:Array = _arg1.colOffsets;
var _local21:Array = _arg2.colOffsets;
var _local22:uint = _local20.length;
var _local23:uint = _local21.length;
_local9 = ((((((((((_local10) && (_local14))) || (((_local12) && (_local13))))) || (((_local12) && (_local14))))) || (((((_local11) && (_local14))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local12) && (_local15))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4))))));
if ((_local9) ? ((!(_arg1.collideRight)) || (!(_arg2.collideLeft))) : ((!(_arg1.collideLeft)) || (!(_arg2.collideRight)))){
return (false);
};
_local16 = 0;
while (_local16 < _local22) {
_local24 = _local20[_local16].x;
_local25 = _local20[_local16].y;
_local18.x = (_local18.x + _local24);
_local18.y = (_local18.y + _local25);
_local17 = 0;
while (_local17 < _local23) {
_local26 = _local21[_local17].x;
_local27 = _local21[_local17].y;
_local19.x = (_local19.x + _local26);
_local19.y = (_local19.y + _local27);
if (((((((((_local18.x + _local18.width) < (_local19.x + roundingError))) || (((_local18.x + roundingError) > (_local19.x + _local19.width))))) || (((_local18.y + _local18.height) < (_local19.y + roundingError))))) || (((_local18.y + roundingError) > (_local19.y + _local19.height))))){
_local19.x = (_local19.x - _local26);
_local19.y = (_local19.y - _local27);
} else {
if (_local9){
if (_local11){
_local28 = (_local18.x + _arg1.colHullY.width);
} else {
_local28 = (_local18.x + _local18.width);
};
if (_local14){
_local29 = _local19.x;
} else {
_local29 = ((_local19.x + _local19.width) - _arg2.colHullY.width);
};
} else {
if (_local14){
_local28 = (-(_local19.x) - _arg2.colHullY.width);
} else {
_local28 = (-(_local19.x) - _local19.width);
};
if (_local11){
_local29 = -(_local18.x);
} else {
_local29 = ((-(_local18.x) - _local18.width) + _arg1.colHullY.width);
};
};
_local7 = (_local28 - _local29);
if ((((((_local7 == 0)) || (((!(_arg1.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local18.width * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local19.width * 0.8))))))){
_local19.x = (_local19.x - _local26);
_local19.y = (_local19.y - _local27);
} else {
_local8 = true;
_local30 = _arg2.velocity.x;
_local31 = _arg1.velocity.x;
if (((!(_arg1.fixed)) && (_arg2.fixed))){
if (_arg1._group){
_arg1.reset((_arg1.x - _local7), _arg1.y);
} else {
_arg1.x = (_arg1.x - _local7);
};
} else {
if (((_arg1.fixed) && (!(_arg2.fixed)))){
if (_arg2._group){
_arg2.reset((_arg2.x + _local7), _arg2.y);
} else {
_arg2.x = (_arg2.x + _local7);
};
} else {
if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){
_local7 = (_local7 / 2);
if (_arg1._group){
_arg1.reset((_arg1.x - _local7), _arg1.y);
} else {
_arg1.x = (_arg1.x - _local7);
};
if (_arg2._group){
_arg2.reset((_arg2.x + _local7), _arg2.y);
} else {
_arg2.x = (_arg2.x + _local7);
};
_local30 = (_local30 / 2);
_local31 = (_local31 / 2);
};
};
};
if (_local9){
_arg1.hitRight(_arg2, _local30);
_arg2.hitLeft(_arg1, _local31);
} else {
_arg1.hitLeft(_arg2, _local30);
_arg2.hitRight(_arg1, _local31);
};
if (((!(_arg1.fixed)) && (!((_local7 == 0))))){
if (_local9){
_local18.width = (_local18.width - _local7);
} else {
_local18.x = (_local18.x - _local7);
_local18.width = (_local18.width + _local7);
};
_arg1.colHullY.x = (_arg1.colHullY.x - _local7);
};
if (((!(_arg2.fixed)) && (!((_local7 == 0))))){
if (_local9){
_local19.x = (_local19.x + _local7);
_local19.width = (_local19.width - _local7);
} else {
_local19.width = (_local19.width + _local7);
};
_arg2.colHullY.x = (_arg2.colHullY.x + _local7);
};
_local19.x = (_local19.x - _local26);
_local19.y = (_local19.y - _local27);
};
};
_local17++;
};
_local18.x = (_local18.x - _local24);
_local18.y = (_local18.y - _local25);
_local16++;
};
return (_local8);
}
public static function collide(_arg1:FlxObject, _arg2:FlxObject):Boolean{
if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){
return (false);
};
quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height);
quadTree.add(_arg1, FlxQuadTree.A_LIST);
var _local3 = (_arg1 === _arg2);
if (!_local3){
quadTree.add(_arg2, FlxQuadTree.B_LIST);
};
var _local4:Boolean = quadTree.overlap(!(_local3), solveXCollision);
var _local5:Boolean = quadTree.overlap(!(_local3), solveYCollision);
return (((_local4) || (_local5)));
}
}
}//package org.flixel
Section 264
//_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 265
//_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 266
//_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 267
//_AlertStyle (_AlertStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _AlertStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Alert");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Alert", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.borderColor = 8821927;
this.roundedBottomCorners = true;
this.color = 0xFFFFFF;
this.buttonStyleName = "alertButtonStyle";
this.backgroundColor = 8821927;
this.borderAlpha = 0.9;
this.paddingLeft = 10;
this.paddingBottom = 2;
this.backgroundAlpha = 0.9;
this.paddingRight = 10;
};
};
}
}
}//package
Section 268
//_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 269
//_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 270
//_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 271
//_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 272
//_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 273
//_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 274
//_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 275
//_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 276
//_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 277
//_PanelStyle (_PanelStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _PanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var effects:Array;
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Panel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("Panel", style, false);
effects = style.mx_internal::effects;
if (!effects){
effects = (style.mx_internal::effects = new Array());
};
effects.push("resizeEndEffect");
effects.push("resizeStartEffect");
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.statusStyleName = "windowStatus";
this.borderStyle = "default";
this.paddingTop = 0;
this.borderColor = 0xE2E2E2;
this.backgroundColor = 0xFFFFFF;
this.cornerRadius = 4;
this.titleBackgroundSkin = TitleBackground;
this.borderAlpha = 0.4;
this.borderThicknessTop = 2;
this.paddingLeft = 0;
this.resizeEndEffect = "Dissolve";
this.paddingRight = 0;
this.titleStyleName = "windowStyles";
this.roundedBottomCorners = false;
this.borderThicknessRight = 10;
this.dropShadowEnabled = true;
this.resizeStartEffect = "Dissolve";
this.borderSkin = PanelSkin;
this.borderThickness = 0;
this.borderThicknessLeft = 10;
this.paddingBottom = 0;
};
};
}
}
}//package
Section 278
//_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 279
//_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 280
//_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 281
//_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 282
//_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 283
//_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 284
//_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 285
//_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 286
//_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 287
//_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 288
//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 289
//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 290
//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