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

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

Coinz!.swf

This is the info page for
Flash #47619

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


Text
<p align="center"><font face="Showcard Gothic Cyr_ya" size="34" color="#000000" letterSpacing="4.000000" kerning="0">TEXT</font></p>

ActionScript [AS3]

Section 1
//OAdBanner (ENGINE.AD.OAdBanner) package ENGINE.AD { import flash.events.*; import flash.display.*; import flash.net.*; public class OAdBanner { private var iManager:DisplayObject; private var iID:String; private var iBanner:DisplayObject; private var iPrefix:String; private var iLoader:Loader; private static const strURL:String = "http://wellgames.com/ad/"; public function OAdBanner(_arg1:String, _arg2:String){ this.iPrefix = _arg1; this.iID = _arg2; this.iLoader = new Loader(); this.iLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, OnIOError); this.iLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, OnComplete); this.iLoader.load(new URLRequest(this.prURL)); } private function OnIOError(_arg1:IOErrorEvent):void{ } public function DeleteBanner():void{ this.iBanner = null; } private function get prURL():String{ return ((((((OAdBanner.strURL + this.iPrefix) + "AdBanner.swf?r=") + this.iPrefix) + this.iID) + "&i=-1")); } public function get prBanner():DisplayObject{ return (this.iBanner); } public function CreateBanner():void{ if (this.iManager){ this.iBanner = this.iManager["prBanner"]; }; } private function OnComplete(_arg1:Event):void{ this.iManager = this.iLoader.content; } } }//package ENGINE.AD
Section 2
//OAdBanners (ENGINE.AD.OAdBanners) package ENGINE.AD { import flash.display.*; import ENGINE.CORE.*; public class OAdBanners { public static var iBBanner:OAdBanner; public static var iTBanner:OAdBanner; public static function InitTBanner(_arg1:String, _arg2:String):void{ OAdBanners.iTBanner = new OAdBanner(_arg1, _arg2); } public static function RemoveBBanner(_arg1:DisplayObjectContainer):void{ var _local2:Sprite; _local2 = (OAdBanners.iBBanner.prBanner as Sprite); if (((_local2) && (_arg1.contains(_local2)))){ _arg1.removeChild(_local2); }; OAdBanners.iBBanner.DeleteBanner(); } public static function AddBBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{ var _local6:Sprite; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; OAdBanners.iBBanner.CreateBanner(); _local6 = (OAdBanners.iBBanner.prBanner as Sprite); if (!_local6){ return; }; _local7 = OGlobal.ToGlobal(_arg2); _local8 = OGlobal.ToGlobal(_arg3); _local9 = OGlobal.ToGlobal(_arg4); _local10 = OGlobal.ToGlobal(_arg5); _local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2))); _local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2))); _arg1.addChild(_local6); } public static function RemoveTBanner(_arg1:DisplayObjectContainer):void{ var _local2:Sprite; _local2 = (OAdBanners.iTBanner.prBanner as Sprite); if (((_local2) && (_arg1.contains(_local2)))){ _arg1.removeChild(_local2); }; OAdBanners.iTBanner.DeleteBanner(); } public static function InitBBanner(_arg1:String, _arg2:String):void{ OAdBanners.iBBanner = new OAdBanner(_arg1, _arg2); } public static function AddTBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{ var _local6:Sprite; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; OAdBanners.iTBanner.CreateBanner(); _local6 = (OAdBanners.iTBanner.prBanner as Sprite); if (!_local6){ return; }; _local7 = OGlobal.ToGlobal(_arg2); _local8 = OGlobal.ToGlobal(_arg3); _local9 = OGlobal.ToGlobal(_arg4); _local10 = OGlobal.ToGlobal(_arg5); _local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2))); _local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2))); _arg1.addChild(_local6); } } }//package ENGINE.AD
Section 3
//OCache (ENGINE.CORE.OCache) package ENGINE.CORE { import flash.utils.*; public dynamic class OCache { public function Pack():ByteArray{ var _local1:ByteArray; _local1 = new ByteArray(); _local1.writeObject(this); _local1.compress(); return (_local1); } public function AddCategoryArr(_arg1:String, _arg2:String):Array{ var _local3:OCache; _local3 = ((this[_arg1])==undefined) ? AddCategory(_arg1) : this[_arg1]; return (_local3.AddArr(_arg2)); } public function GetArrItem(_arg1:String, _arg2:int){ if ((((this[_arg1] == undefined)) || ((this[_arg1][_arg2] == undefined)))){ return (null); }; return (this[_arg1][_arg2]); } public function DeleteArrItem(_arg1:String, _arg2:int):void{ if (this[_arg1] == undefined){ return; }; this[_arg1].splice(_arg2, 1); } public function IsCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):Boolean{ if (this[_arg1] == undefined){ return (false); }; return (this[_arg1].IsArrItem(_arg2, _arg3)); } public function GetCategoryItem(_arg1:String, _arg2:String){ if (this[_arg1] == undefined){ return (null); }; return (this[_arg1].GetItem(_arg2)); } public function SetCategoryItem(_arg1:String, _arg2:String, _arg3):void{ if (this[_arg1] == undefined){ this[_arg1] = new OCache(); }; this[_arg1].SetItem(_arg2, _arg3); } public function SetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int, _arg4):void{ if (this[_arg1] == undefined){ this[_arg1] = new OCache(); }; this[_arg1].SetArrItem(_arg2, _arg3, _arg4); } public function IsCategoryItem(_arg1:String, _arg2:String):Boolean{ if (this[_arg1] == undefined){ return (false); }; return (this[_arg1].IsItem(_arg2)); } public function DeleteCategoryItem(_arg1:String, _arg2:String):void{ if (this[_arg1] == undefined){ return; }; this[_arg1].DeleteItem(_arg2); } public function AddCategory(_arg1:String):OCache{ this[_arg1] = new OCache(); return (this[_arg1]); } public function GetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int){ if (this[_arg1] == undefined){ return (null); }; return (GetArrItem(_arg2, _arg3)); } public function GetCategoryNames(_arg1:String):Array{ var _local2:Array; var _local3:String; if (this[_arg1] == undefined){ return (null); }; _local2 = new Array(); for (_local3 in this[_arg1]) { _local2.push(_local3); }; return ((_local2.length) ? _local2.sort() : null); } public function AddArr(_arg1:String):Array{ this[_arg1] = new Array(); return (this[_arg1]); } public function GetItem(_arg1:String){ if (this[_arg1] == undefined){ return (null); }; return (this[_arg1]); } public function IsArrItem(_arg1:String, _arg2:int):Boolean{ return (((!((this[_arg1] == undefined))) && (!((this[_arg1][_arg2] == undefined))))); } public function DeleteCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):void{ if (this[_arg1] == undefined){ return; }; this[_arg1].DeleteArrItem(_arg2, _arg3); } public function Clear():void{ var _local1:String; for (_local1 in this) { delete this[_local1]; }; } public function SetArrItem(_arg1:String, _arg2:int, _arg3):void{ if (this[_arg1] == undefined){ this[_arg1] = new Array(); }; this[_arg1][_arg2] = _arg3; } public function SetItem(_arg1:String, _arg2):void{ this[_arg1] = _arg2; } public function GetNames():Array{ var _local1:Array; var _local2:String; _local1 = new Array(); for (_local2 in this) { _local1.push(_local2); }; return ((_local1.length) ? _local1.sort() : null); } public function IsItem(_arg1:String):Boolean{ return (!((this[_arg1] == undefined))); } public function DeleteItem(_arg1:String):void{ if (this[_arg1] == undefined){ return; }; delete this[_arg1]; } } }//package ENGINE.CORE
Section 4
//OGlobal (ENGINE.CORE.OGlobal) package ENGINE.CORE { import flash.display.*; import flash.geom.*; import flash.net.*; public class OGlobal { private static var iFPS:int = 60; private static var iDomain:String; private static var iSRect:Rectangle = new Rectangle(); private static var iVRect:Rectangle = new Rectangle(0, 0, 800, 600); private static var iStage:Stage; private static var iScale:Number = 1; private static var iAppName:String; private static var iOldScale:Number = 1; public static function get FPS():int{ return (OGlobal.iFPS); } public static function CheckDomain(_arg1:String):Boolean{ var _local2:int; _local2 = OGlobal.iDomain.indexOf(_arg1); return ((((_local2 >= 0)) && ((_local2 <= 4)))); } public static function ToLocal(_arg1:Number):Number{ return ((_arg1 / OGlobal.iScale)); } public static function set FPS(_arg1:int):void{ OGlobal.iFPS = _arg1; if (OGlobal.iStage){ OGlobal.iStage.frameRate = _arg1; }; } public static function Rescale(_arg1:Sprite, _arg2:Boolean=true):void{ var _local3:Number; _local3 = (((OGlobal.iStage.stageWidth / OGlobal.iStage.stageHeight))<=(800 / 600)) ? (OGlobal.iStage.stageWidth / 800) : (OGlobal.iStage.stageHeight / 600); OGlobal.iSRect.x = 0; OGlobal.iSRect.y = 0; OGlobal.iSRect.width = OGlobal.iStage.stageWidth; OGlobal.iSRect.height = OGlobal.iStage.stageHeight; OGlobal.iVRect.width = Math.round((800 * _local3)); OGlobal.iVRect.height = Math.round((600 * _local3)); OGlobal.iVRect.x = Math.floor(((OGlobal.iStage.stageWidth - OGlobal.iVRect.width) / 2)); OGlobal.iVRect.y = Math.floor(((OGlobal.iStage.stageHeight - OGlobal.iVRect.height) / 2)); if (_arg2){ _arg1.x = OGlobal.iVRect.x; _arg1.y = OGlobal.iVRect.y; }; OGlobal.iScale = _local3; } public static function get prStage():Stage{ return (OGlobal.iStage); } public static function ClearScale():void{ OGlobal.iOldScale = OGlobal.iScale; OGlobal.iScale = 1; OGlobal.iVRect = OGlobal.iSRect.clone(); } public static function ToGlobal(_arg1:Number):Number{ return ((_arg1 * OGlobal.iScale)); } public static function set AppName(_arg1:String):void{ OGlobal.iAppName = ("WellGames_" + _arg1); } public static function get Domain():String{ return (OGlobal.iDomain); } public static function SetDomain():void{ var _local1:LocalConnection; _local1 = new LocalConnection(); OGlobal.iDomain = _local1.domain; } public static function get StageRect():Rectangle{ return (OGlobal.iSRect); } public static function ScaleFloor(_arg1:Number):Number{ return ((Math.floor((_arg1 * OGlobal.iScale)) / OGlobal.iScale)); } public static function get Scale():Number{ return (OGlobal.iScale); } public static function get ViewporRect():Rectangle{ return (OGlobal.iVRect); } public static function get AppName():String{ return (OGlobal.iAppName); } public static function set prStage(_arg1:Stage):void{ OGlobal.iStage = _arg1; } public static function RestoreScale():void{ OGlobal.iScale = OGlobal.iOldScale; } public static function ScaleMod(_arg1:Number):Number{ var _local2:Number; _local2 = (_arg1 * OGlobal.iScale); return (((_local2 - Math.floor(_local2)) / OGlobal.iScale)); } } }//package ENGINE.CORE
Section 5
//ORandomInt (ENGINE.CORE.ORandomInt) package ENGINE.CORE { import flash.utils.*; public class ORandomInt { private var iNextRandom:int; public function ORandomInt(){ iNextRandom = getTimer(); } public function RandNumber():Number{ var _local1:Number; _local1 = Rand(); return ((_local1 / 32767)); } public function Rand():int{ iNextRandom = ((iNextRandom * 1103515245) + 12345); return (((iNextRandom >> 16) & 32767)); } public function get NextRandom():int{ return (this.iNextRandom); } public function RandOnInterval(_arg1:Number=0, _arg2:Number=1):int{ return ((_arg1 + (Rand() % ((1 + _arg2) - _arg1)))); } public function RandVal(_arg1:int):int{ var _local2:Number; _local2 = Rand(); return ((_local2 % _arg1)); } public function SeedRand(_arg1:int=0):void{ if (_arg1 == 0){ iNextRandom = getTimer(); } else { iNextRandom = _arg1; }; } } }//package ENGINE.CORE
Section 6
//OSound (ENGINE.CORE.OSound) package ENGINE.CORE { import flash.events.*; import flash.utils.*; import flash.net.*; import flash.media.*; public class OSound { private static var iMusicInd:int = 0; private static var iSoundsObjects:Array; private static var iSounds:Dictionary = new Dictionary(true); private static var iMusicPlayList:Array = new Array(); private static var iSoundVolume:Number = 1; private static var iMusicChannel:SoundChannel; private static var iMusicVolume:Number = 1; private static var iMusic:Sound; public static function PlaySoundInd(_arg1:int, _arg2:Number=0):Boolean{ if (OSound.iSoundVolume == 0){ return (false); }; _arg1 = Math.max(_arg1, 0); _arg1 = Math.min(_arg1, (OSound.iSoundsObjects.length - 1)); return (OSound.PlaySound(OSound.iSoundsObjects[_arg1], _arg2)); } public static function set MusicVolume(_arg1:Number):void{ var _local2:SoundTransform; OSound.iMusicVolume = _arg1; if (OSound.iMusicChannel){ if (_arg1 == 0){ OSound.StopMusic(); } else { _local2 = OSound.iMusicChannel.soundTransform; _local2.volume = _arg1; OSound.iMusicChannel.soundTransform = _local2; }; } else { if (OSound.iMusicVolume > 0){ OSound.PlayMusic(); }; }; } private static function OnMusicLoadComplete(_arg1:Event):void{ if (OSound.iMusicVolume == 0){ return; }; OSound.iMusicChannel = iMusic.play(0, 0, new SoundTransform(OSound.iMusicVolume, 0)); OSound.RemoveMusic(); OSound.iMusicChannel.addEventListener(Event.SOUND_COMPLETE, OnMusicComplete); } public static function set SoundVolume(_arg1:Number):void{ OSound.iSoundVolume = _arg1; } private static function OnMusicLoadIOError(_arg1:Event):void{ OSound.RemoveMusic(); OSound.iMusicPlayList.splice(OSound.iMusicInd, 1); OSound.iMusicInd = ((OSound.iMusicInd > (OSound.iMusicPlayList.length - 1))) ? (OSound.iMusicPlayList.length - 1) : OSound.iMusicInd; OSound.PlayMusic(); } private static function OnMusicComplete(_arg1:Event):void{ PlayMusic(); } public static function PlaySound(_arg1:Class, _arg2:Number=0):Boolean{ var _local3:Sound; if (OSound.iSoundVolume == 0){ return (false); }; _local3 = OSound.iSounds[_arg1]; if (_local3 != null){ _local3.play(0, 0, new SoundTransform(OSound.iSoundVolume, _arg2)); }; return (!((_local3 == null))); } private static function RemoveMusic():void{ if (OSound.iMusic){ OSound.iMusic.removeEventListener(Event.COMPLETE, OSound.OnMusicLoadComplete); OSound.iMusic.removeEventListener(IOErrorEvent.IO_ERROR, OSound.OnMusicLoadIOError); OSound.iMusic = null; }; } public static function StopMusic():void{ if (OSound.iMusicChannel){ OSound.iMusicChannel.removeEventListener(Event.SOUND_COMPLETE, OnMusicComplete); OSound.iMusicChannel.stop(); OSound.iMusicChannel = null; }; } public static function get SoundVolume():Number{ return (OSound.iSoundVolume); } public static function PlayListClear():void{ OSound.iMusicPlayList = new Array(); } public static function PlayListAdd(_arg1:String):void{ OSound.iMusicPlayList.push(_arg1); OSound.iMusicInd = (OSound.iMusicPlayList.length - 1); } public static function PlayMusic():void{ var request:URLRequest; if ((((OSound.iMusicVolume == 0)) || (!(OSound.iMusicPlayList.length)))){ return; }; OSound.StopMusic(); OSound.iMusicInd = ((OSound.iMusicInd + 1) % OSound.iMusicPlayList.length); request = new URLRequest(OSound.iMusicPlayList[OSound.iMusicInd]); OSound.iMusic = new Sound(); OSound.iMusic.addEventListener(Event.COMPLETE, OSound.OnMusicLoadComplete); OSound.iMusic.addEventListener(IOErrorEvent.IO_ERROR, OSound.OnMusicLoadIOError); try { OSound.iMusic.load(request); } catch(e:Error) { }; } public static function RegisterEmbedSounds(_arg1:Array):Boolean{ var _local2:int; var _local3:Sound; OSound.iSoundsObjects = _arg1; _local2 = 0; while (_local2 < _arg1.length) { _local3 = (new (_arg1[_local2]) as Sound); OSound.iSounds[_arg1[_local2]] = _local3; _local2++; }; return (true); } public static function PlaySoundRandom(_arg1:Number=0, _arg2:int=0, _arg3:int=-1):Boolean{ var _local4:int; if (OSound.iSoundVolume == 0){ return (false); }; _arg2 = Math.max(_arg2, 0); _arg2 = Math.min(_arg2, (OSound.iSoundsObjects.length - 1)); if (_arg3 < 0){ _arg3 = (OSound.iSoundsObjects.length - 1); }; _arg3 = Math.max(_arg3, 0); _arg3 = Math.min(_arg3, (OSound.iSoundsObjects.length - 1)); _local4 = OUtils.Random(_arg2, _arg3); return (OSound.PlaySound(OSound.iSoundsObjects[_local4], _arg1)); } public static function get MusicVolume():Number{ return (OSound.iMusicVolume); } } }//package ENGINE.CORE
Section 7
//OSystem (ENGINE.CORE.OSystem) package ENGINE.CORE { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; import flash.system.*; public class OSystem extends Sprite { private var iLastTime:int; private var iCount:int; private var iText:TextField; private var iSTimer:String; public static var iUserText1:String = ""; public static var iUserText:String = ""; public static var iUserText2:String = ""; public function OSystem(){ this.iText = new TextField(); this.iText.autoSize = TextFieldAutoSize.LEFT; this.iText.mouseEnabled = false; this.addChild(this.iText); this.addEventListener(Event.ENTER_FRAME, OnEnterFrame); this.iLastTime = getTimer(); this.iSTimer = ""; } public function OnEnterFrame(_arg1:Event):void{ var _local2:uint; var _local3:int; _local2 = System.totalMemory; _local3 = (getTimer() - this.iLastTime); this.iCount++; if (_local3 >= 1000){ this.iSTimer = String((Math.round(((_local3 / this.iCount) * 100)) / 100)); this.iLastTime = getTimer(); this.iCount = 0; }; iText.text = ((((((((((_local2.toString() + " ") + this.iSTimer) + " ") + OGlobal.prStage.frameRate) + " | ") + OSystem.iUserText) + " ") + OSystem.iUserText1) + " ") + OSystem.iUserText2); } } }//package ENGINE.CORE
Section 8
//OUtils (ENGINE.CORE.OUtils) package ENGINE.CORE { import ENGINE.DISPLAY.*; import flash.geom.*; public class OUtils { public static function AddZero(_arg1:String, _arg2:int):String{ var _local3:String; var _local4:int; _local3 = ""; _local4 = _arg1.length; while (_local4 < _arg2) { _local3 = (_local3 + "0"); _local4++; }; _local3 = (_local3 + _arg1); return (_local3); } public static function Random(_arg1:Number, _arg2:Number):Number{ return ((_arg1 + ((_arg2 - _arg1) * Math.random()))); } public static function StringToTarget(_arg1:Class, _arg2:int, _arg3:String, _arg4:String, _arg5:int):String{ var _local6:Number; var _local7:Rectangle; var _local8:String; var _local9:String; var _local10:int; _local6 = Math.round((1 + (_arg2 / 70))); _local8 = ((_arg4)==null) ? "" : ((" (" + _arg4) + ")"); _local9 = (_arg3 + _local8); _local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9); if (_local7.width <= _arg5){ return (_local9); }; _local8 = ("..." + _local8); _local10 = (_arg3.length - 1); while (_local10 > 0) { _local9 = (_arg3.substr(0, _local10) + _local8); _local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9); if (_local7.width <= _arg5){ return (_local9); }; _local10--; }; return ((_arg3.substr(0, 1) + _local8)); } public static function ClearString(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:int; _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 "; _local3 = ""; _local4 = 0; while (_local4 < _arg1.length) { if (_local2.indexOf(_arg1.charAt(_local4)) > -1){ _local3 = (_local3 + _arg1.charAt(_local4)); }; _local4++; }; return (_local3); } } }//package ENGINE.CORE
Section 9
//OEffect (ENGINE.DISPLAY.EFFECTS.OEffect) package ENGINE.DISPLAY.EFFECTS { import ENGINE.DISPLAY.*; import ENGINE.CORE.*; public class OEffect { protected var iColors:OCache; protected var iFilters:OCache; public function OEffect(){ this.iColors = new OCache(); this.iFilters = new OCache(); } public function RegisterColor(_arg1:String, _arg2):void{ this.iColors.SetItem(_arg1, _arg2); } public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{ } public function RegisterFilter(_arg1:String, _arg2):void{ this.iFilters.SetItem(_arg1, _arg2); } public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{ return (null); } } }//package ENGINE.DISPLAY.EFFECTS
Section 10
//OEffects (ENGINE.DISPLAY.EFFECTS.OEffects) package ENGINE.DISPLAY.EFFECTS { import ENGINE.DISPLAY.*; import ENGINE.CORE.*; public class OEffects { private static var iEffects:OCache = new OCache(); public static function RegisterColor(_arg1:String, _arg2:String, _arg3):void{ var _local4:OEffect; _local4 = iEffects.GetItem(_arg1); if (_local4 == null){ return; }; _local4.RegisterColor(_arg2, _arg3); } public static function RegisterEffect(_arg1:String, _arg2:OEffect):void{ iEffects.SetItem(_arg1, _arg2); } public static function Make(_arg1:Array):OBM{ var _local2:OEffect; _local2 = iEffects.GetItem(_arg1[3]); if (_local2 == null){ return (null); }; _local2.Init(_arg1[4], _arg1[5], _arg1[6]); return (_local2.Apply(_arg1[1], _arg1[2], _arg1[7], _arg1[8])); } public static function GetEffect(_arg1:String):OEffect{ return (iEffects.GetItem(_arg1)); } public static function RegisterFilter(_arg1:String, _arg2:String, _arg3):void{ var _local4:OEffect; _local4 = iEffects.GetItem(_arg1); if (_local4 == null){ return; }; _local4.RegisterFilter(_arg2, _arg3); } public static function Apply(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBM{ var _local9:OEffect; _local9 = iEffects.GetItem(_arg3); if (_local9 == null){ return (null); }; _local9.Init(_arg4, _arg5, _arg6); return (_local9.Apply([ODisplay.SpriteLib, _arg1], _arg2, _arg7, _arg8)); } } }//package ENGINE.DISPLAY.EFFECTS
Section 11
//IDisplayObject (ENGINE.DISPLAY.IDisplayObject) package ENGINE.DISPLAY { public interface IDisplayObject { function set prVisible(_arg1:Boolean):void; function get prWidth():Number; function get prHeight():Number; function set prX(_arg1:Number):void; function set prY(_arg1:Number):void; function get prVisible():Boolean; function Move(_arg1:Number, _arg2:Number):void; function Pos(_arg1:Number, _arg2:Number):void; function get prX():Number; function get prY():Number; } }//package ENGINE.DISPLAY
Section 12
//OBitmap (ENGINE.DISPLAY.OBitmap) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import flash.text.*; import ENGINE.CORE.*; public class OBitmap extends Bitmap implements IDisplayObject { protected var iY:Number;// = 0 protected var iX:Number;// = 0 protected var iOBM:OBM;// = null public function OBitmap(_arg1:OBM=null, _arg2:Number=0, _arg3:Number=0){ iX = 0; iY = 0; iOBM = null; super(); this.iX = _arg2; this.iY = _arg3; Init(_arg1); } public function get prVisible():Boolean{ return (this.visible); } public function set prX(_arg1:Number):void{ this.iX = _arg1; Pos(this.iX, this.iY); } public function Clear():void{ this.Init(null); } public function set prOBM(_arg1:OBM):void{ this.Init(_arg1); } public function Pos(_arg1:Number, _arg2:Number):void{ this.iX = _arg1; this.iY = _arg2; if (this.iOBM){ this.x = ((this.iX * OGlobal.Scale) + this.iOBM.iX); this.y = ((this.iY * OGlobal.Scale) + this.iOBM.iY); } else { this.x = (this.iX * OGlobal.Scale); this.y = (this.iY * OGlobal.Scale); }; } public function set prY(_arg1:Number):void{ this.iY = _arg1; Pos(this.iX, this.iY); } public function Init(_arg1:OBM):void{ this.iOBM = _arg1; this.bitmapData = (_arg1) ? _arg1.iBM : null; this.Pos(this.iX, this.iY); } public function set prVisible(_arg1:Boolean):void{ this.visible = _arg1; } public function Clone():OBitmap{ return (new OBitmap(this.iOBM.Clone(), this.iX, this.iY)); } public function get prX():Number{ return (this.iX); } public function get prY():Number{ return (this.iY); } public function get prOBM():OBM{ return (this.iOBM); } public function get prHeight():Number{ return ((this.iOBM) ? (this.iOBM.iHeight / OGlobal.Scale) : 0); } public function get prWidth():Number{ return ((this.iOBM) ? (this.iOBM.iWidth / OGlobal.Scale) : 0); } public function CopyFrom(_arg1:OBitmap):void{ this.iX = _arg1.iX; this.iY = _arg1.iY; this.Init(_arg1.iOBM); } public function Move(_arg1:Number, _arg2:Number):void{ Pos((this.iX + _arg1), (this.iY + _arg2)); } public static function MakeEffectFromListP(_arg1:Array):OBitmap{ var _local2:Sprite; var _local3:Sprite; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); _local3 = (_local2.getChildAt(_arg1[2]) as Sprite); return (OBitmap.MakeEffect(_local3, _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _local3.x, _local3.y)); } public static function MakeEffectP(_arg1:Array):OBitmap{ return (OBitmap.MakeEffect(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8])); } public static function MakeEffectTextInRectP(_arg1:Array):OBitmap{ var _local2:Sprite; var _local3:Rectangle; var _local4:Number; var _local5:Number; var _local6:TextField; var _local7:TextFormat; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if ((_local2.getChildAt(0) is TextField)){ _local6 = (_local2.getChildAt(0) as TextField); _local6.autoSize = TextFieldAutoSize.LEFT; _local6.text = _arg1[4]; _local7 = _local6.defaultTextFormat; _local7.size = _arg1[2]; _local7.letterSpacing = _arg1[3]; _local6.setTextFormat(_local7); } else { return (null); }; _local3 = _local2.getBounds(_local2); _local4 = ((_arg1[9] - _local3.width) / 2); _local5 = ((_arg1[10] - _local3.height) / 2); return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], (_arg1[11] + _local4), (_arg1[12] + _local5))); } public static function MakeEffectTextP(_arg1:Array):OBitmap{ var _local2:Sprite; var _local3:TextField; var _local4:TextFormat; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if ((_local2.getChildAt(0) is TextField)){ _local3 = (_local2.getChildAt(0) as TextField); _local3.autoSize = TextFieldAutoSize.LEFT; _local3.text = _arg1[4]; _local4 = _local3.defaultTextFormat; _local4.size = _arg1[2]; _local4.letterSpacing = _arg1[3]; _local3.setTextFormat(_local4); } else { return (null); }; return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10])); } public static function MakeRoundRectBorderEffectP(_arg1:Array):OBitmap{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); _local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4])); return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10])); } public static function MakeEffectInRectP(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Sprite; var _local4:Rectangle; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local2 = Math.min(_arg1[7], _arg1[8]); _local3 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); _local4 = _local3.getBounds(_local3); _local5 = Math.max(_local4.width, _local4.height); _local6 = ((_local2 / _local5) * _arg1[2]); _local7 = ((_arg1[7] - (_local4.width * _local6)) / 2); _local8 = ((_arg1[8] - (_local4.height * _local6)) / 2); return (OBitmap.MakeEffect(_local3, _local6, _arg1[3], _arg1[4], _arg1[5], _arg1[6], (_arg1[9] + _local7), (_arg1[10] + _local8))); } public static function MakeTmp(_arg1, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):OBitmap{ var _local6:OBM; _local6 = OBM.Make([null, [ODisplay.SpriteLib, _arg1], _arg2, _arg3, _arg4, _arg5]); return (new OBitmap(_local6, _arg3, _arg4)); } public static function MakeP(_arg1:Array):OBitmap{ return (OBitmap.MakeTmp(_arg1[1], _arg1[2], _arg1[3], _arg1[4])); } public static function MakeRoundRectEffectP(_arg1:Array):OBitmap{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); return (OBitmap.MakeEffect(_local2, 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9])); } public static function Make(_arg1:Array):OBitmap{ return (new OBitmap(_arg1[1][0](_arg1[1]), _arg1[2], _arg1[3])); } public static function MakeEffect(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBitmap{ var _local9:OBM; _local9 = OEffects.Apply(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); return (new OBitmap(_local9, _arg7, _arg8)); } } }//package ENGINE.DISPLAY
Section 13
//OBM (ENGINE.DISPLAY.OBM) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.CORE.*; public class OBM { public var iX:Number; public var iHeight:Number; public var iBM:BitmapData; public var iY:Number; public var iWidth:Number; public function OBM(_arg1:BitmapData=null, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ this.iBM = _arg1; this.iX = _arg2; this.iY = _arg3; this.iWidth = _arg4; this.iHeight = _arg5; } public function Clone():OBM{ var _local1:BitmapData; _local1 = this.iBM.clone(); return (new OBM(_local1, this.iX, this.iY, this.iWidth, this.iHeight)); } public static function Make(_arg1:Array):OBM{ var _local2:Sprite; var _local3:Sprite; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Rectangle; var _local8:int; var _local9:int; var _local10:Number; var _local11:Number; var _local12:BitmapData; var _local13:Matrix; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local4 = (OGlobal.Scale * _arg1[2]); _local5 = OGlobal.ToGlobal(_arg1[3]); _local6 = OGlobal.ToGlobal(_arg1[4]); _local3.scaleX = _local4; _local3.scaleY = _local4; _local3.x = (_local3.x * OGlobal.Scale); _local3.y = (_local3.y * OGlobal.Scale); _local3.x = (_local3.x + _local5); _local3.y = (_local3.y + _local6); _local2.addChild(_local3); _local7 = _local3.getBounds(_local2); _local8 = ((_local7.width + 4) + (_arg1[5] * 2)); _local9 = ((_local7.height + 4) + (_arg1[5] * 2)); _local10 = Math.floor(_local7.x); _local11 = Math.floor(_local7.y); _local12 = new BitmapData(_local8, _local9, true, 0); _local13 = new Matrix(1, 0, 0, 1, ((-(_local10) + 1) + _arg1[5]), ((-(_local11) + 1) + _arg1[5])); _local12.draw(_local2, _local13); return (new OBM(_local12, (((_local10 - _local5) - 1) - _arg1[5]), (((_local11 - _local6) - 1) - _arg1[5]), _local7.width, _local7.height)); } } }//package ENGINE.DISPLAY
Section 14
//ODisplay (ENGINE.DISPLAY.ODisplay) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import flash.text.*; import ENGINE.CORE.*; public class ODisplay { public static function HSBToRGB(_arg1:Number, _arg2:Number, _arg3:Number):uint{ var _local4:int; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:int; var _local12:int; _arg1 = (_arg1 % 360); if (_arg2 > 1){ _arg2 = 1; }; if (_arg3 > 1){ _arg3 = 1; }; if (_arg2 == 0){ _local4 = (_arg3 * 0xFF); return ((((_local4 << 16) | (_local4 << 8)) | _local4)); }; if (_arg1 == 360){ _arg1 = 0; } else { _arg1 = (_arg1 / 60); }; _local5 = Math.floor(_arg1); _local6 = (_arg1 - _local5); _local7 = (_arg3 * (1 - _arg2)); _local8 = (_arg3 * (1 - (_arg2 * _local6))); _local9 = (_arg3 * (1 - (_arg2 * (1 - _local6)))); switch (_local5){ case 0: _local10 = (_arg3 * 0xFF); _local11 = (_local9 * 0xFF); _local12 = (_local7 * 0xFF); break; case 1: _local10 = (_local8 * 0xFF); _local11 = (_arg3 * 0xFF); _local12 = (_local7 * 0xFF); break; case 2: _local10 = (_local7 * 0xFF); _local11 = (_arg3 * 0xFF); _local12 = (_local9 * 0xFF); break; case 3: _local10 = (_local7 * 0xFF); _local11 = (_local8 * 0xFF); _local12 = (_arg3 * 0xFF); break; case 4: _local10 = (_local9 * 0xFF); _local11 = (_local7 * 0xFF); _local12 = (_arg3 * 0xFF); break; case 5: _local10 = (_arg3 * 0xFF); _local11 = (_local7 * 0xFF); _local12 = (_local8 * 0xFF); break; }; return ((((_local10 << 16) | (_local11 << 8)) | _local12)); } public static function OBitmapAngleFrameSprite(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]])); } public static function OBitmapXBorder(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function OBitmapAngleFrameText(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]])); } public static function OBitmapRoundFrameText(_arg1:Array):OBitmap{ if (_arg1[4]){ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]])); }; return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]])); } public static function SpriteFillRect(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Sprite; var _local4:Rectangle; var _local5:Number; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local2.addChild(_local3); _local4 = _local3.getBounds(_local2); _local5 = (Math.max(_arg1[2], _arg1[3]) / Math.max(_local4.width, _local4.height)); _local3.scaleX = _local5; _local3.scaleY = _local5; _local4 = _local3.getBounds(_local2); _local2.removeChild(_local3); _local3.x = (_local3.x + ((_arg1[2] - _local4.width) / 2)); _local3.y = (_local3.y + ((_arg1[3] - _local4.height) / 2)); return (_local3); } public static function TextRect(_arg1, _arg2:Number, _arg3:Number, _arg4:String):Rectangle{ var _local5:Sprite; var _local6:TextField; var _local7:TextFormat; _local5 = ((_arg1 is Sprite)) ? (_arg1 as Sprite) : new ((_arg1 as Class)); if ((_local5.getChildAt(0) is TextField)){ _local6 = (_local5.getChildAt(0) as TextField); _local6.autoSize = TextFieldAutoSize.LEFT; _local6.text = _arg4; _local7 = _local6.defaultTextFormat; _local7.size = _arg2; _local7.letterSpacing = _arg3; _local6.setTextFormat(_local7); } else { return (null); }; return (_local5.getBounds(_local5)); } public static function OBitmapXBorderText(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[17], _arg1[18]], [null, [ODisplay.SpriteTextInRect, _arg1[9], _arg1[10], _arg1[11], _arg1[12], _arg1[1], _arg1[2]], 1, _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18]]]])); } public static function OBitmapRoundRect(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]])); } public static function OBitmapAngleFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]])); } public static function HSBAToRGBA(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):uint{ var _local5:uint; var _local6:uint; _local5 = HSBToRGB(_arg1, _arg2, _arg3); _local6 = (0xFF * _arg4); _local6 = (_local6 << 24); return ((_local5 + _local6)); } public static function OBitmapTextAlign(_arg1:Array):OBitmap{ return (OBitmapMake([null, [ODisplay.SpriteTextAlign, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[11], _arg1[12]], 1, _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[13], _arg1[14]])); } public static function OBitmapList(_arg1:Array):OBitmap{ var _local2:OBM; var _local3:Number; var _local4:Number; var _local5:int; var _local6:OBM; var _local7:Matrix; _local2 = OEffects.Make(_arg1[1][0]); _local3 = (_local2.iX + (_arg1[1][0][7] * OGlobal.Scale)); _local4 = (_local2.iY + (_arg1[1][0][8] * OGlobal.Scale)); _local5 = 1; while (_local5 < _arg1[1].length) { _local6 = OEffects.Make(_arg1[1][_local5]); _local7 = new Matrix(1, 0, 0, 1, (((_arg1[1][_local5][7] * OGlobal.Scale) + _local6.iX) - _local3), (((_arg1[1][_local5][8] * OGlobal.Scale) + _local6.iY) - _local4)); _local2.iBM.draw(_local6.iBM, _local7); _local5++; }; return (new OBitmap(_local2, _arg1[1][0][7], _arg1[1][0][8])); } public static function SpriteLibList(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if (_arg1[2] >= _local2.numChildren){ return (null); }; return ((_local2.getChildAt(_arg1[2]) as Sprite)); } public static function SpriteXBorder(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.lineStyle(_arg1[4]); _local2.graphics.moveTo(0, _arg1[3]); _local2.graphics.lineTo(_arg1[1], _arg1[3]); _local2.graphics.moveTo(0, (_arg1[2] - _arg1[3])); _local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3])); _local2.graphics.moveTo(_arg1[3], 0); _local2.graphics.lineTo(_arg1[3], _arg1[2]); _local2.graphics.moveTo((_arg1[1] - _arg1[3]), 0); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]); return (_local2); } public static function SpriteLib(_arg1:Array):Sprite{ return (((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class))); } public static function OBitmapAngleBorder(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function OBitmapRoundBorder(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function SpriteScale(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = _arg1[1][0](_arg1[1]); _local2.scaleX = _arg1[2]; _local2.scaleY = _arg1[2]; return (_local2); } public static function IDisplayObjectMake(_arg1:Array){ var _local2:IDisplayObject; _local2 = _arg1[1][0](_arg1[1]); _local2.Pos(_arg1[2], _arg1[3]); return (_local2); } public static function SpriteAlign(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Sprite; var _local4:Rectangle; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local3.scaleX = _arg1[2]; _local3.scaleY = _arg1[2]; _local2.addChild(_local3); _local4 = _local3.getBounds(_local2); _local2.removeChild(_local3); switch (_arg1[3]){ case 1: _local3.x = (_local3.x + ((_arg1[5] - _local4.width) / 2)); break; case 2: _local3.x = (_local3.x + (_arg1[5] - _local4.width)); break; }; switch (_arg1[4]){ case 1: _local3.y = (_local3.y + ((_arg1[6] - _local4.height) / 2)); break; case 2: _local3.y = (_local3.y + (_arg1[6] - _local4.height)); break; }; return (_local3); } public static function OBitmapAngleRect(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteAngleRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]])); } public static function SpriteRect(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRect(0, 0, _arg1[1], _arg1[2]); return (_local2); } public static function OBitmapSpriteFillRect(_arg1:Array):OBitmap{ var _local2:Sprite; _local2 = ODisplay.SpriteFillRect([null, _arg1[3], _arg1[1], _arg1[2]]); return (OBitmapMake([null, [ODisplay.SpriteFillRect, _arg1[3], _arg1[1], _arg1[2]], _local2.scaleX, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]])); } public static function OBitmapText(_arg1:Array):OBitmap{ return (OBitmapMake([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function OBitmapMake(_arg1:Array):OBitmap{ return (new OBitmap(OEffects.Make(_arg1), _arg1[7], _arg1[8])); } public static function SpriteRoundRect(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); return (_local2); } public static function SpriteInRect(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Sprite; var _local4:Rectangle; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local3.scaleX = _arg1[2]; _local3.scaleY = _arg1[2]; _local2.addChild(_local3); _local4 = _local3.getBounds(_local2); _local2.removeChild(_local3); _local3.x = (_local3.x + ((_arg1[3] - _local4.width) / 2)); _local3.y = (_local3.y + ((_arg1[4] - _local4.height) / 2)); return (_local3); } public static function SpriteScaleRotate(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Number; var _local4:Number; var _local5:Matrix; var _local6:Matrix; var _local7:Sprite; _local2 = _arg1[1][0](_arg1[1]); _local3 = (_arg1[4] * _arg1[2]); _local4 = (_arg1[5] * _arg1[2]); _local5 = new Matrix(); _local5.scale(_arg1[2], _arg1[2]); _local5.translate(-(_local3), -(_local4)); _local5.rotate(((Math.PI / 180) * _arg1[3])); _local6 = new Matrix(); _local6.translate(_local3, _local4); _local5.concat(_local6); _local7 = new Sprite(); _local7.addChild(_local2); _local2.transform.matrix = _local5; return (_local7); } public static function OBitmapRoundFrameSprite(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]])); } public static function SpriteText(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:TextField; var _local4:TextFormat; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if ((_local2.getChildAt(0) is TextField)){ _local3 = (_local2.getChildAt(0) as TextField); _local3.autoSize = TextFieldAutoSize.LEFT; _local3.text = _arg1[4]; _local4 = _local3.defaultTextFormat; _local4.size = _arg1[2]; _local4.letterSpacing = _arg1[3]; _local3.setTextFormat(_local4); } else { return (null); }; return (_local2); } public static function SpriteTextAlign(_arg1:Array):Sprite{ return (ODisplay.SpriteAlign([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8]])); } public static function OBitmapTextInRect(_arg1:Array):OBitmap{ return (OBitmapMake([null, [ODisplay.SpriteTextInRect, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[9], _arg1[10]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[11], _arg1[12]])); } public static function SpriteRoundBorder(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); _local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4])); return (_local2); } public static function SpriteAngleRect(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.moveTo(_arg1[3], 0); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0); _local2.graphics.lineTo(_arg1[1], _arg1[3]); _local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3])); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]); _local2.graphics.lineTo(_arg1[3], _arg1[2]); _local2.graphics.lineTo(0, (_arg1[2] - _arg1[3])); _local2.graphics.lineTo(0, _arg1[3]); _local2.graphics.endFill(); return (_local2); } public static function SpriteAngleBorder(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.moveTo(_arg1[3], 0); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0); _local2.graphics.lineTo(_arg1[1], _arg1[3]); _local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3])); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]); _local2.graphics.lineTo(_arg1[3], _arg1[2]); _local2.graphics.lineTo(0, (_arg1[2] - _arg1[3])); _local2.graphics.lineTo(0, _arg1[3]); _local3 = (_arg1[1] - (_arg1[4] * 2)); _local4 = (_arg1[2] - (_arg1[4] * 2)); _local5 = ((_arg1[3] * _local3) / _arg1[1]); _local2.graphics.moveTo((_arg1[4] + _local5), (_arg1[4] + 0)); _local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + 0)); _local2.graphics.lineTo((_arg1[4] + _local3), (_arg1[4] + _local5)); _local2.graphics.lineTo((_arg1[4] + _local3), ((_arg1[4] + _local4) - _local5)); _local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + _local4)); _local2.graphics.lineTo((_arg1[4] + _local5), (_arg1[4] + _local4)); _local2.graphics.lineTo((_arg1[4] + 0), ((_arg1[4] + _local4) - _local5)); _local2.graphics.lineTo((_arg1[4] + 0), (_arg1[4] + _local5)); return (_local2); } public static function SpriteTextInRect(_arg1:Array):Sprite{ return (ODisplay.SpriteInRect([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6]])); } public static function OBitmapRoundFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]])); } } }//package ENGINE.DISPLAY
Section 15
//OSprite (ENGINE.DISPLAY.OSprite) package ENGINE.DISPLAY { import flash.display.*; import ENGINE.CORE.*; public class OSprite extends Sprite implements IDisplayObject { private var iY:Number;// = 0 private var iX:Number;// = 0 public function OSprite(){ iX = 0; iY = 0; super(); } public function get prVisible():Boolean{ return (this.visible); } public function set prX(_arg1:Number):void{ this.iX = _arg1; this.x = (_arg1 * OGlobal.Scale); } public function set prY(_arg1:Number):void{ this.iY = _arg1; this.y = (_arg1 * OGlobal.Scale); } public function Pos(_arg1:Number, _arg2:Number):void{ this.iX = _arg1; this.iY = _arg2; this.x = (this.iX * OGlobal.Scale); this.y = (this.iY * OGlobal.Scale); } public function set prVisible(_arg1:Boolean):void{ this.visible = _arg1; } public function moveTo(_arg1:Number, _arg2:Number):void{ this.graphics.moveTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale)); } public function get prX():Number{ return (this.iX); } public function get prY():Number{ return (this.iY); } public function Free():void{ var _local1:DisplayObject; while (this.numChildren) { _local1 = this.getChildAt(0); if ((_local1 is OSprite)){ (_local1 as OSprite).Free(); }; this.removeChildAt(0); }; } public function lineTo(_arg1:Number, _arg2:Number):void{ this.graphics.lineTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale)); } public function get prHeight():Number{ return ((this.height / OGlobal.Scale)); } public function get prWidth():Number{ return ((this.width / OGlobal.Scale)); } public function Move(_arg1:Number, _arg2:Number):void{ Pos((this.iX + _arg1), (this.iY + _arg2)); } public static function Make(_arg1:Array):OSprite{ var _local2:OSprite; var _local3:int; var _local4:int; _local2 = new (OSprite); _local3 = _arg1[1].length; _local4 = 0; while (_local4 < _local3) { _local2.addChild(_arg1[1][_local4][0](_arg1[1][_local4])); _local4++; }; _local2.Pos(_arg1[2], _arg1[3]); return (_local2); } } }//package ENGINE.DISPLAY
Section 16
//OGame (ENGINE.GAME.OGame) package ENGINE.GAME { import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; public class OGame { protected var iSTableSize:int; protected var iCache:OCache; protected var iPlayer:OPlayer; protected var iRNDFactor:int; protected var iModes:int; protected var iScores:OScoresTable; public static const catGlobal:String = "Global"; public static const catTmp:String = "Tmp"; protected static const strgMusicVolume:String = "Music Volume"; protected static const strgResX:String = "ResX"; protected static const strgResY:String = "ResY"; protected static const strgСurPlayer:String = "Current Player"; protected static const strgFullScreen:String = "Full Screen"; protected static const strgSoundVolume:String = "Sound Volume"; protected static const strgLocalScores:String = "Local Scores"; public static const catPlayers:String = "Players"; public function OGame(_arg1:int=1, _arg2:int=10, _arg3:int=10){ var _local4:String; super(); this.iModes = _arg1; this.iSTableSize = _arg2; registerClassAlias("OCacheClass", OCache); registerClassAlias("OGameParamsClass", OGameParams); registerClassAlias("OScoreParamsClass", OScoreParams); registerClassAlias("OScoresTableClass", OScoresTable); registerClassAlias("OPlayerClass", OPlayer); this.LoadCache(); _local4 = this.iCache.GetCategoryItem(catGlobal, strgСurPlayer); if (_local4){ this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local4); this.iScores = this.iCache.GetCategoryItem(catGlobal, strgLocalScores); this.InitAfterLoadCache(); } else { this.iScores = new OScoresTable(_arg1, this.iSTableSize); this.DefaultInitLocalScores(); this.iCache.SetCategoryItem(catGlobal, strgLocalScores, this.iScores); this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, 1); this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, 1); this.iCache.SetCategoryItem(catGlobal, strgResX, OGlobal.StageRect.width); this.iCache.SetCategoryItem(catGlobal, strgResY, OGlobal.StageRect.height); this.iCache.SetCategoryItem(catGlobal, strgFullScreen, false); }; OSound.SoundVolume = this.prSoundVolume; OSound.MusicVolume = this.prMusicVolume; } public function set prFullScreen(_arg1:Boolean):void{ this.iCache.SetCategoryItem(catGlobal, strgFullScreen, _arg1); } public function set prMode(_arg1:int):void{ this.iPlayer.iMode = _arg1; } public function get prGamesStartCount():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart); } public function get prLevelScore():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore); } public function set prPassword(_arg1:String):void{ this.iPlayer.iPassword = _arg1; } public function DeletePlayer(_arg1:String):String{ var _local2:String; var _local3:Array; _local2 = (this.iPlayer) ? this.iPlayer.iName : ""; this.iCache.DeleteCategoryItem(catPlayers, _arg1); if (_arg1 == _local2){ _local3 = this.iCache.GetCategoryNames(catPlayers); if (!_local3){ this.iPlayer = null; return (null); }; this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local3[0]); this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _local3[0]); }; return ((this.iPlayer) ? this.iPlayer.iName : null); } public function get prPlayerNames():Array{ return (this.iCache.GetCategoryNames(catPlayers)); } public function ClearPersonalScores(_arg1:int):void{ this.iPlayer.iScoreTable.Clear(_arg1); } public function GetPersonalRecord(_arg1:int):int{ return (this.iPlayer.iScoreTable.GetRecord(_arg1)); } public function InitAfterLoadCache():void{ } public function AddScore(_arg1:int):void{ this.iPlayer.iGParams[this.iPlayer.iMode].iScore = (this.iPlayer.iGParams[this.iPlayer.iMode].iScore + _arg1); } public function get prPlayersData(){ var _local1:OCache; var _local2:ByteArray; _local1 = this.iCache.GetItem(catPlayers); _local2 = _local1.Pack(); _local2.uncompress(); _local1 = _local2.readObject(); return (_local1); } public function IsPersonalRecord(_arg1:int, _arg2:int):Boolean{ return (this.iPlayer.iScoreTable.IsRecord(_arg1, _arg2)); } public function LoadCache():void{ var so:SharedObject; var a:ByteArray; so = SharedObject.getLocal(OGlobal.AppName); if (so.data.iData == undefined){ this.iCache = new OCache(); } else { try { a = so.data.iData; a.uncompress(); this.iCache = a.readObject(); } catch(error:Error) { this.iCache = new OCache(); }; }; so.close(); } public function NewGame():void{ this.iPlayer.iGParams[this.iPlayer.iMode].iLevel = 0; this.iPlayer.iGParams[this.iPlayer.iMode].iScore = 0; this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = 0; this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = null; this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++; } public function get prLevel():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevel); } public function get prSoundVolume():Number{ return (this.iCache.GetCategoryItem(catGlobal, strgSoundVolume)); } public function get prPlayerName():String{ return ((this.iPlayer) ? this.iPlayer.iName : ""); } public function get prScore():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iScore); } public function NextLevel():Boolean{ this.iPlayer.iGParams[this.iPlayer.iMode].iLevel++; return (true); } public function set prPlayersData(_arg1):void{ this.iCache.SetItem(catPlayers, _arg1); } public function Read(_arg1:String, _arg2:String){ return (this.iCache.GetCategoryItem(_arg1, _arg2)); } public function get prSavedGame():String{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame); } public function set prResX(_arg1:int):void{ this.iCache.SetCategoryItem(catGlobal, strgResX, _arg1); } public function get prRNDFactor():int{ return (this.iPlayer.iRNDFactor); } public function get prMusicVolume():Number{ return (this.iCache.GetCategoryItem(catGlobal, strgMusicVolume)); } public function Write(_arg1:String, _arg2:String, _arg3):void{ this.iCache.SetCategoryItem(_arg1, _arg2, _arg3); } public function Start():void{ this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++; } public function get prPassword():String{ return ((this.iPlayer.iPassword) ? this.iPlayer.iPassword : ""); } public function get prMode():int{ return (this.iPlayer.iMode); } public function End():void{ this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd++; } public function set prSoundVolume(_arg1:Number):void{ OSound.SoundVolume = _arg1; this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, _arg1); } public function SetLevelScore(_arg1:int):void{ this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = _arg1; } public function GetLocalScores(_arg1:int, _arg2:int):OScoreParams{ return (this.iScores.GetScore(_arg1, _arg2)); } public function GetPersonalScores(_arg1:int, _arg2:int):OScoreParams{ return (this.iPlayer.iScoreTable.GetScore(_arg1, _arg2)); } public function AddScoreInTable(_arg1:int):Boolean{ var _local2:Boolean; _local2 = false; if (this.iScores.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel)){ this.iCache.SetCategoryItem(OGame.catGlobal, OGame.strgLocalScores, this.iScores); _local2 = true; }; if (this.iPlayer.iScoreTable.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel, true)){ this.iCache.SetCategoryItem(OGame.catPlayers, this.prPlayerName, this.iPlayer); _local2 = true; }; return (_local2); } public function get prResX():int{ return (this.iCache.GetCategoryItem(catGlobal, strgResX)); } public function get prResY():int{ return (this.iCache.GetCategoryItem(catGlobal, strgResY)); } public function set prPlayerName(_arg1:String):void{ var _local2:OPlayer; _local2 = this.iCache.GetCategoryItem(catPlayers, _arg1); if (!_local2){ _local2 = new OPlayer(_arg1, "", this.iModes, this.iSTableSize); this.iCache.SetCategoryItem(catPlayers, _arg1, _local2); }; this.iPlayer = _local2; this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _arg1); } public function DefaultInitLocalScores():void{ this.iScores.Clear(0); this.iScores.AddScore("Emily", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Michael", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Jacob", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Isabella", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Madison", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.SortOn(0); } public function SaveCache():Boolean{ var _local1:SharedObject; var _local2:String; _local1 = SharedObject.getLocal(OGlobal.AppName); _local1.data.iData = this.iCache.Pack(); _local2 = _local1.flush(); _local1.close(); return ((_local2 == SharedObjectFlushStatus.FLUSHED)); } public function set prResY(_arg1:int):void{ this.iCache.SetCategoryItem(catGlobal, strgResY, _arg1); } public function SetSaveGame(_arg1:String):void{ this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = _arg1; } public function get prGamesEndCount():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd); } public function set prMusicVolume(_arg1:Number):void{ OSound.MusicVolume = _arg1; this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, _arg1); } public function get prFullScreen():Boolean{ return (this.iCache.GetCategoryItem(catGlobal, strgFullScreen)); } public function ClearLocalScores(_arg1:int):void{ this.iScores.Clear(_arg1); } } }//package ENGINE.GAME
Section 17
//OGameParams (ENGINE.GAME.OGameParams) package ENGINE.GAME { public class OGameParams { public var iLevel:int; public var iScore:int; public var iSavedGame:String; public var iCGamesEnd:int; public var iLevelScore:int; public var iCGamesStart:int; } }//package ENGINE.GAME
Section 18
//OPlayer (ENGINE.GAME.OPlayer) package ENGINE.GAME { public class OPlayer { public var iPassword:String; public var iScoreTable:OScoresTable; public var iGParams:Array; public var iMode:int; public var iRNDFactor:int; public var iName:String; public function OPlayer(_arg1:String=null, _arg2:String=null, _arg3:int=1, _arg4:int=10, _arg5:int=10){ var _local6:int; super(); this.iName = _arg1; this.iPassword = _arg2; this.iGParams = new Array(_arg3); this.iRNDFactor = Math.round((Math.random() * (_arg5 - 1))); _local6 = 0; while (_local6 < _arg3) { this.iGParams[_local6] = new OGameParams(); _local6++; }; this.iScoreTable = new OScoresTable(_arg3, _arg4); } } }//package ENGINE.GAME
Section 19
//OScoreParams (ENGINE.GAME.OScoreParams) package ENGINE.GAME { public class OScoreParams { public var iScore:int; public var iName:String; public var iLevel:int; public var iTime:Number; public function OScoreParams(_arg1:String=null, _arg2:int=0, _arg3:int=0){ var _local4:Date; super(); this.iName = _arg1; this.iScore = _arg2; _local4 = new Date(); this.iTime = _local4.time; } } }//package ENGINE.GAME
Section 20
//OScoresTable (ENGINE.GAME.OScoresTable) package ENGINE.GAME { public class OScoresTable { public var iTable:Array; public var iMaxElements:int; public function OScoresTable(_arg1:int=1, _arg2:int=10){ var _local3:int; super(); this.iMaxElements = _arg2; this.iTable = new Array(); _local3 = 0; while (_local3 < _arg1) { this.iTable[_local3] = new Array(); _local3++; }; } public function FindByName(_arg1:int, _arg2:String):int{ var _local3:int; _local3 = 0; while (_local3 < this.iTable[_arg1].length) { if (this.iTable[_arg1][_local3].iName == _arg2){ return (_local3); }; _local3++; }; return (-1); } public function Clear(_arg1:int):void{ this.iTable[_arg1] = new Array(); } public function GetRecord(_arg1:int):int{ if (!this.iTable[_arg1].length){ return (0); }; return (this.iTable[_arg1][0].iScore); } public function AddScore(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean=false):Boolean{ var _local6:Array; var _local7:int; _local6 = this.iTable[_arg3]; if ((((_local6.length < this.iMaxElements)) || ((_local6[(_local6.length - 1)].iScore < _arg2)))){ _local7 = (_arg5) ? -1 : this.FindByName(_arg3, _arg1); if (_local7 >= 0){ if (_arg2 < _local6[_local7].iScore){ return (false); }; _local6[_local7] = new OScoreParams(_arg1, _arg2, _arg4); this.SortOn(_arg3); return (true); }; if (_local6.length < this.iMaxElements){ _local6[_local6.length] = new OScoreParams(_arg1, _arg2, _arg4); this.SortOn(_arg3); return (true); }; if (_local6[(_local6.length - 1)].iScore > _arg2){ return (false); }; _local6[(_local6.length - 1)] = new OScoreParams(_arg1, _arg2, _arg4); this.SortOn(_arg3); return (true); }; return (false); } public function IsRecord(_arg1:int, _arg2:int):Boolean{ if (!this.iTable[_arg1].length){ return (true); }; return ((_arg2 >= this.iTable[_arg1][0].iScore)); } public function GetScore(_arg1:int, _arg2:int):OScoreParams{ return (this.iTable[_arg1][_arg2]); } public function SortOn(_arg1:int):void{ this.iTable[_arg1] = this.iTable[_arg1].sortOn("iScore", (Array.DESCENDING | Array.NUMERIC)); } } }//package ENGINE.GAME
Section 21
//OA_Alpha (ENGINE.INTERFACE.ANIMATORS.OA_Alpha) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OA_Alpha extends OAnimator { public var iEAlpha:Number; private var iDAlpha:Number; public var iSAlpha:Number; private var iEndAlpha:Number; public var iPIter:int; public function OA_Alpha(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:Number; _local1 = ((this.iSAlpha)>=0) ? this.iSAlpha : this.iTarget.alpha; this.iEndAlpha = ((this.iEAlpha)>=0) ? this.iEAlpha : this.iTarget.alpha; this.iDAlpha = ((this.iEndAlpha - _local1) / iPIter); this.iTarget.visible = true; this.iTarget.alpha = _local1; return (((Math.abs(this.iDAlpha) > 0.001)) ? stPlay : stEnd); } override public function Play():void{ var _local1:Number; _local1 = (this.iTarget.alpha + this.iDAlpha); if ((((((this.iDAlpha > 0)) && ((_local1 >= this.iEndAlpha)))) || ((((this.iDAlpha <= 0)) && ((_local1 <= this.iEndAlpha)))))){ this.iTarget.alpha = this.iEndAlpha; if (this.iTarget.alpha == 0){ this.iTarget.visible = false; }; this.State = OAnimator.stEnd; } else { this.iTarget.alpha = _local1; }; } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_Alpha{ return (new OA_Alpha(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 22
//OA_AlphaFade (ENGINE.INTERFACE.ANIMATORS.OA_AlphaFade) package ENGINE.INTERFACE.ANIMATORS { import flash.display.*; import ENGINE.INTERFACE.*; public class OA_AlphaFade extends OAnimator { public var iEAlpha:Number; public var iEInd:Array; private var iEndAlpha:Array; private var iCurAlpha:Number; private var iDAlpha:Array; private var iStartAlpha:Array; public var iSInd:Array; public var iSAlpha:Number; public var iPIter:int; public function OA_AlphaFade(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:int; var _local2:int; var _local3:DisplayObject; var _local4:DisplayObject; if ((((this.iSInd == null)) && ((this.iEInd == null)))){ return (OAnimator.stEnd); }; if (this.iSInd.length != this.iEInd.length){ return (OAnimator.stEnd); }; _local1 = this.iSInd.length; this.iStartAlpha = new Array(_local1); this.iEndAlpha = new Array(_local1); this.iDAlpha = new Array(_local1); _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iSInd[_local2]); _local4 = this.iTarget.getChildAt(this.iEInd[_local2]); this.iStartAlpha[_local2] = ((this.iSAlpha)>=0) ? this.iSAlpha : _local3.alpha; this.iEndAlpha[_local2] = ((this.iEAlpha)>=0) ? this.iEAlpha : _local4.alpha; this.iDAlpha[_local2] = ((this.iEndAlpha[_local2] - this.iStartAlpha[_local2]) / iPIter); _local3.alpha = this.iStartAlpha[_local2]; _local3.visible = true; _local4.alpha = this.iEndAlpha[_local2]; _local4.visible = true; _local2++; }; this.iCurAlpha = this.iStartAlpha[0]; return (OAnimator.stPlay); } override public function Play():void{ var _local1:DisplayObject; var _local2:DisplayObject; var _local3:int; var _local4:int; this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]); _local3 = this.iSInd.length; if ((((((this.iDAlpha[0] > 0)) && ((this.iCurAlpha >= this.iEndAlpha[0])))) || ((((this.iDAlpha[0] <= 0)) && ((this.iCurAlpha <= this.iEndAlpha[0])))))){ _local4 = 0; while (_local4 < _local3) { _local1 = this.iTarget.getChildAt(this.iSInd[_local4]); _local2 = this.iTarget.getChildAt(this.iEInd[_local4]); _local1.alpha = this.iEndAlpha[_local4]; if (_local1.alpha == 0){ _local1.visible = false; }; _local2.alpha = this.iStartAlpha[_local4]; if (_local2.alpha == 0){ _local2.visible = false; }; _local4++; }; this.State = OAnimator.stEnd; } else { _local4 = 0; while (_local4 < _local3) { _local1 = this.iTarget.getChildAt(this.iSInd[_local4]); _local2 = this.iTarget.getChildAt(this.iEInd[_local4]); _local1.alpha = (_local1.alpha + this.iDAlpha[_local4]); _local2.alpha = (_local2.alpha - this.iDAlpha[_local4]); _local4++; }; }; } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_AlphaFade{ return (new OA_AlphaFade(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 23
//OA_AlphaInd (ENGINE.INTERFACE.ANIMATORS.OA_AlphaInd) package ENGINE.INTERFACE.ANIMATORS { import flash.display.*; import ENGINE.INTERFACE.*; public class OA_AlphaInd extends OAnimator { public var iEAlpha:Number; private var iCurAlpha:Number; private var iEndAlpha:Array; private var iDAlpha:Array; public var iInd:Array; public var iSAlpha:Number; public var iPIter:int; public function OA_AlphaInd(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:int; var _local2:int; var _local3:DisplayObject; var _local4:Number; if (((!(this.iInd)) || ((this.iInd.length == 0)))){ return (stEnd); }; _local1 = this.iInd.length; this.iEndAlpha = new Array(_local1); this.iDAlpha = new Array(_local1); _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iInd[_local2]); _local4 = ((this.iSAlpha)>=0) ? this.iSAlpha : _local3.alpha; this.iEndAlpha[_local2] = ((this.iEAlpha)>=0) ? this.iEAlpha : _local3.alpha; this.iDAlpha[_local2] = ((this.iEndAlpha[_local2] - _local4) / iPIter); _local3.visible = true; _local3.alpha = _local4; _local2++; }; this.iCurAlpha = this.iTarget.getChildAt(this.iInd[0]).alpha; return (((Math.abs(this.iDAlpha[0]) > 0.001)) ? stPlay : stEnd); } override public function Play():void{ var _local1:int; var _local2:int; var _local3:DisplayObject; this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]); _local1 = this.iInd.length; if ((((((this.iDAlpha[0] > 0)) && ((this.iCurAlpha >= this.iEndAlpha[0])))) || ((((this.iDAlpha[0] <= 0)) && ((this.iCurAlpha <= this.iEndAlpha[0])))))){ _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iInd[_local2]); _local3.alpha = this.iEndAlpha[_local2]; _local3.visible = (_local3.alpha > 0); _local2++; }; this.State = stEnd; } else { _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iInd[_local2]); _local3.alpha = (_local3.alpha + this.iDAlpha[_local2]); _local2++; }; }; } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_AlphaInd{ return (new OA_AlphaInd(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 24
//OA_Scale (ENGINE.INTERFACE.ANIMATORS.OA_Scale) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OA_Scale extends OAnimator { public var iSScale:Number; private var iEndScale:Number; public var iEScale:Number; private var iDScale:Number; public var iPIter:int; public function OA_Scale(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = ((this.iSScale)>=0) ? this.iSScale : this.iTarget.scaleX; this.iEndScale = ((this.iEScale)>=0) ? this.iEScale : this.iTarget.scaleX; this.iDScale = ((this.iEndScale - _local1) / iPIter); _local2 = this.iTarget.prWidth; _local3 = this.iTarget.prHeight; this.iTarget.scaleX = _local1; this.iTarget.scaleY = _local1; this.iTarget.Move(((_local2 - this.iTarget.prWidth) / 2), ((_local3 - this.iTarget.prHeight) / 2)); return (((Math.abs(this.iDScale) > 1E-5)) ? stPlay : stEnd); } override public function Play():void{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = this.iTarget.prWidth; _local2 = this.iTarget.prHeight; _local3 = (this.iTarget.scaleX + this.iDScale); if ((((((this.iDScale > 0)) && ((_local3 >= this.iEndScale)))) || ((((this.iDScale <= 0)) && ((_local3 <= this.iEndScale)))))){ this.iTarget.scaleX = this.iEndScale; this.iTarget.scaleY = this.iEndScale; this.State = OAnimator.stEnd; } else { this.iTarget.scaleX = (this.iTarget.scaleX + this.iDScale); this.iTarget.scaleY = (this.iTarget.scaleY + this.iDScale); }; this.iTarget.Move(((_local1 - this.iTarget.prWidth) / 2), ((_local2 - this.iTarget.prHeight) / 2)); } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_Scale{ return (new OA_Scale(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 25
//OAnimator (ENGINE.INTERFACE.ANIMATORS.OAnimator) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OAnimator { private var iState:int; protected var iTarget:OIObject; public static const stStart:int = 1; public static const stEnd:int = 3; public static const stPause:int = 0; public static const stReturn:int = 4; public static const stPlay:int = 2; public function OAnimator(_arg1:Object, _arg2:OIObject=null){ var _local3:String; super(); for (_local3 in _arg1) { if (this.hasOwnProperty(_local3)){ this[_local3] = _arg1[_local3]; }; }; this.iTarget = _arg2; this.State = stPause; } public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stStart: this.State = this.Start(); break; case stReturn: this.State = Return(); break; }; } public function Play():void{ this.State = stEnd; } public function set prTarget(_arg1:OIObject):void{ this.iTarget = _arg1; } protected function Start():int{ return (stPlay); } public function get State():int{ return (this.iState); } public function Return():int{ return (stPlay); } public function OnEnterFrame():void{ if (this.iState == stPlay){ Play(); }; } } }//package ENGINE.INTERFACE.ANIMATORS
Section 26
//OAnimatorManager (ENGINE.INTERFACE.ANIMATORS.OAnimatorManager) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OAnimatorManager { private var iPlaying:Array; private var iTarget:OIObject; public static const anActivate:int = 2; public static const anDeactivate:int = 3; public static const anShow:int = 0; public static const iAnimatorsCount:int = 10; public static const anHide:int = 1; public static const anPress:int = 8; public static const anRoolOver:int = 6; public static const anUnpress:int = 9; public static const anFocusOut:int = 5; public static const anRoolOut:int = 7; public static const anUncheck:int = 10; public static const anCheck:int = 9; public static const anFocusIn:int = 4; public static const iNullAnimators:Array = [null, null, null, null, null, null, null, null, null, null]; public function OAnimatorManager(_arg1:OIObject){ this.iTarget = _arg1; this.iPlaying = new Array(); } public function get prAnimation():Boolean{ return ((iPlaying.length > 0)); } public function AddAnimator(_arg1:Object):void{ var _local2:*; if (_arg1 == null){ return; }; if (this.iPlaying.length > 0){ this.iPlaying[0].Return(); }; _local2 = _arg1.F(_arg1); _local2.prTarget = this.iTarget; this.iPlaying.push(_local2); } public function OnEnterFrame():void{ if (this.iPlaying.length == 0){ return; }; switch (this.iPlaying[0].State){ case OAnimator.stEnd: this.iPlaying[0] = null; this.iPlaying.splice(0, 1); break; case OAnimator.stPause: this.iPlaying[0].State = OAnimator.stStart; break; case OAnimator.stPlay: this.iPlaying[0].Play(); break; }; } public function Free():void{ this.iTarget = null; this.iPlaying = null; } } }//package ENGINE.INTERFACE.ANIMATORS
Section 27
//OHtmlTextField (ENGINE.INTERFACE.ELEMENTS.OHtmlTextField) package ENGINE.INTERFACE.ELEMENTS { import ENGINE.DISPLAY.*; import flash.display.*; import flash.text.*; import ENGINE.CORE.*; public class OHtmlTextField extends TextField { private var iTextFormat:TextFormat; public function OHtmlTextField(_arg1:Number, _arg2:Number, _arg3, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Array, _arg8:String, _arg9:Number, _arg10:Number, _arg11:Boolean=true){ var _local12:Number; var _local13:Sprite; super(); _local12 = (_arg11) ? OGlobal.Scale : 1; this.type = TextFieldType.DYNAMIC; this.autoSize = TextFieldAutoSize.NONE; this.multiline = true; this.wordWrap = true; this.selectable = false; if (_arg3){ _local13 = ((_arg3 is Sprite)) ? (_arg3 as Sprite) : new ((_arg3 as Class)); if ((_local13.getChildAt(0) is TextField)){ this.iTextFormat = (_local13.getChildAt(0) as TextField).getTextFormat(); } else { this.iTextFormat = this.defaultTextFormat; }; } else { this.iTextFormat = this.defaultTextFormat; }; this.iTextFormat.size = (_arg4 * _local12); this.iTextFormat.letterSpacing = (_arg5 * _local12); this.iTextFormat.color = ODisplay.HSBToRGB(_arg7[0], _arg7[1], _arg7[2]); this.iTextFormat.align = TextFormatAlign.LEFT; this.defaultTextFormat = this.iTextFormat; this.prText = _arg8; this.width = (_arg1 * _local12); this.height = (_arg2 * _local12); this.x = (_arg9 * _local12); this.y = (_arg10 * _local12); this.border = _arg6; } public function set prText(_arg1:String):void{ this.htmlText = _arg1; } public function set prFormat(_arg1:TextFormat):void{ this.iTextFormat = _arg1; this.defaultTextFormat = _arg1; this.setTextFormat(this.iTextFormat); } public function get prText():String{ return (this.htmlText); } public function get prFormat():TextFormat{ return (this.iTextFormat); } } }//package ENGINE.INTERFACE.ELEMENTS
Section 28
//OInputTextField (ENGINE.INTERFACE.ELEMENTS.OInputTextField) package ENGINE.INTERFACE.ELEMENTS { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import flash.text.*; import ENGINE.CORE.*; public class OInputTextField extends TextField { private var iTextFormat:TextFormat; public function OInputTextField(_arg1:Number, _arg2:Number, _arg3, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Array, _arg8:String, _arg9:int, _arg10:Number, _arg11:Number){ var _local12:Number; var _local13:Sprite; super(); _local12 = OGlobal.Scale; this.type = TextFieldType.INPUT; this.autoSize = TextFieldAutoSize.NONE; this.embedFonts = true; _local13 = ((_arg3 is Sprite)) ? (_arg3 as Sprite) : new ((_arg3 as Class)); if ((_local13.getChildAt(0) is TextField)){ this.iTextFormat = (_local13.getChildAt(0) as TextField).getTextFormat(); } else { this.iTextFormat = this.defaultTextFormat; }; this.iTextFormat.size = (_arg4 * _local12); this.iTextFormat.letterSpacing = (_arg5 * _local12); this.iTextFormat.color = ODisplay.HSBToRGB(_arg7[0], _arg7[1], _arg7[2]); this.defaultTextFormat = this.iTextFormat; this.prText = _arg8; this.width = (_arg1 * _local12); this.height = (_arg2 * _local12); this.x = (_arg10 * _local12); this.y = (_arg11 * _local12); this.border = _arg6; this.maxChars = _arg9; this.restrict = "A-Za-z0-9 @._\\-"; this.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, OnFocusIn); } public function set prText(_arg1:String):void{ this.text = (((!(_arg1)) || ((_arg1 == "")))) ? " " : _arg1; } protected function OnFocusIn(_arg1:FocusEvent):void{ this.setTextFormat(this.iTextFormat); } public function set prFormat(_arg1:TextFormat):void{ this.iTextFormat = _arg1; this.defaultTextFormat = _arg1; this.setTextFormat(this.iTextFormat); } public function get prText():String{ var _local1:String; _local1 = this.text; while (_local1.charAt() == " ") { _local1 = _local1.substr(1); }; while (_local1.charAt((_local1.length - 1)) == " ") { _local1 = _local1.substr(0, (_local1.length - 1)); }; return (_local1); } public function get prFormat():TextFormat{ return (this.iTextFormat); } } }//package ENGINE.INTERFACE.ELEMENTS
Section 29
//OListBoxElement (ENGINE.INTERFACE.ELEMENTS.OListBoxElement) package ENGINE.INTERFACE.ELEMENTS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ANIMATORS.*; public class OListBoxElement extends OButton { public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:3}, null, null, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0.6, iInd:[1], iPIter:3}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:1, iInd:[1], iPIter:3}, {F:OA_AlphaInd.Make, iSAlpha:0, iEAlpha:1, iInd:[0], iPIter:9}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0, iInd:[0], iPIter:9}]; public function OListBoxElement(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = (_arg2) ? _arg2 : iDefAnimators; super(_arg1, _local3); } override public function OnMouseUp(_arg1:MouseEvent):void{ } override public function OnRollOut(_arg1:MouseEvent):void{ this.prRool = false; } override public function OnMouseDown(_arg1:MouseEvent):void{ if (((this.prPress) && ((this.parent is OIObject)))){ (this.parent as OIObject).OnPress(_arg1, this); return; }; super.OnMouseDown(_arg1); } } }//package ENGINE.INTERFACE.ELEMENTS
Section 30
//OAlert (ENGINE.INTERFACE.OAlert) package ENGINE.INTERFACE { import flash.events.*; public class OAlert extends ODialog { protected var iMessages:Array; public var iButtons:Array; public function OAlert(_arg1:Array, _arg2:Array, _arg3:Array=null){ var _local4:Array; this.iMessages = _arg2; _local4 = (_arg3) ? _arg3 : ODialog.iDefAnimators; super(_arg1, _local4); } override public function Init():void{ this.iButtons = new Array(); super.Init(); } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:int; var _local4:int; if (((!(this.iMessages)) || (!(this.iButtons)))){ this.prVisible = false; return; }; _local3 = 0; _local4 = 0; while (_local4 < this.iButtons.length) { if ((((_arg2 == this.iButtons[_local4])) && ((_local4 < this.iMessages.length)))){ if ((this.parent is OIObject)){ (this.parent as OIObject).OnPress(null, iMessages[_local4]); }; this.prVisible = false; return; }; _local4++; }; } override public function Free():void{ this.iButtons = null; super.Free(); } } }//package ENGINE.INTERFACE
Section 31
//OApplication (ENGINE.INTERFACE.OApplication) package ENGINE.INTERFACE { import flash.events.*; import flash.display.*; import ENGINE.CORE.*; import flash.external.*; public class OApplication extends OWindow { private var iStaged:Boolean;// = false protected var iBackground:OBackground; protected var iMenuItem:Array; public function OApplication(_arg1:String){ iStaged = false; OGlobal.AppName = _arg1; if (this.stage){ OGlobal.SetDomain(); this.InitStage(); }; super(null); if (!this.iStaged){ this.addEventListener(Event.ENTER_FRAME, NotStagedEnterFrame); }; } private function NotStagedEnterFrame(_arg1:Event):void{ if (!iStaged){ if (!this.stage){ return; }; OGlobal.SetDomain(); this.InitStage(); this.Init(); this.removeEventListener(Event.ENTER_FRAME, NotStagedEnterFrame); this.iStaged = true; }; } override public function Init():void{ if (!this.stage){ return; }; super.Init(); this.iMenuItem = new Array(); this.iStaged = true; this.visible = true; } protected function OnMenuItem():void{ } public function get prMenuItem():int{ return ((this.iMenuItem.length) ? this.iMenuItem.pop() : -1); } public function set prMenuItem(_arg1:int):void{ this.iMenuItem.push(_arg1); } public function OnResize(_arg1:Event):void{ this.Free(); this.InitStage(); this.Init(); } override public function Free():void{ OGlobal.prStage.removeEventListener(Event.DEACTIVATE, OnDeactivate); OGlobal.prStage.removeEventListener(Event.RESIZE, OnResize); this.iMenuItem = null; super.Free(); } public function InitBackground(_arg1:Array, _arg2:int=0):void{ this.iBackground = new OBackground(_arg1, _arg2); this.addChildAt(this.iBackground, 0); } protected function OnDeactivate(_arg1:Event):void{ } public function InitStage(_arg1:Stage=null):void{ var _local2:String; var _local3:int; if (((_arg1) || (this.stage))){ OGlobal.prStage = (_arg1) ? _arg1 : this.stage; }; if (!OGlobal.prStage){ return; }; OGlobal.prStage.scaleMode = StageScaleMode.NO_SCALE; OGlobal.prStage.align = StageAlign.TOP_LEFT; OGlobal.prStage.quality = StageQuality.BEST; OGlobal.prStage.stageFocusRect = false; OGlobal.Rescale(this); OGlobal.FPS = 60; if (ExternalInterface.available){ _local2 = ("function getInternetExplorerVersion() { var rv = -1; if (navigator.appName == \"Microsoft Internet Explorer\") { var ua = navigator.userAgent;" + "var re = new RegExp(\"MSIE ([0-9]{1,}[.0-9]{0,})\"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; }"); _local3 = ExternalInterface.call(_local2); if (_local3 > 0){ OGlobal.FPS = (OGlobal.FPS * 2); }; }; OGlobal.prStage.frameRate = OGlobal.FPS; OGlobal.prStage.addEventListener(Event.RESIZE, OnResize); OGlobal.prStage.addEventListener(Event.DEACTIVATE, OnDeactivate); } } }//package ENGINE.INTERFACE
Section 32
//OBackground (ENGINE.INTERFACE.OBackground) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.CORE.*; public class OBackground extends OSprite { protected var iImages:Array; protected var iIInd:int;// = 0 public function OBackground(_arg1:Array, _arg2:int=0){ iIInd = 0; super(); this.iImages = _arg1; this.prIInd = _arg2; } public function Make():void{ var _local1:Sprite; var _local2:BitmapData; var _local3:OBM; var _local4:Rectangle; var _local5:Rectangle; var _local6:int; var _local7:int; var _local8:Number; var _local9:int; var _local10:Bitmap; var _local11:int; var _local12:OBitmap; if (this.iImages == null){ return; }; this.Free(); if ((this.iImages[this.iIInd] is Class)){ _local1 = new (this.iImages[this.iIInd]); _local2 = new BitmapData(_local1.width, _local1.height, false, 4294967295); _local2.draw(_local1); }; if ((this.iImages[this.iIInd] is BitmapData)){ _local2 = this.iImages[this.iIInd]; _local1 = new Sprite(); _local10 = new Bitmap(_local2); _local1.addChild(_local10); }; _local3 = new OBM(_local2, 0, 0, _local1.width, _local1.height); _local4 = OGlobal.ViewporRect; _local5 = OGlobal.StageRect; this.x = -(_local4.x); this.y = -(_local4.y); _local6 = Math.floor((_local5.width / _local1.width)); if (_local6 == 0){ return; }; _local7 = Math.floor((_local5.height / _local1.height)); if (_local7 == 0){ return; }; if ((_local5.width - (_local6 * _local1.width)) > 0){ _local6++; }; if ((_local5.height - (_local7 * _local1.height)) > 0){ _local7++; }; _local8 = OGlobal.Scale; _local9 = 0; while (_local9 < _local7) { _local11 = 0; while (_local11 < _local6) { _local12 = new OBitmap(_local3, ((_local11 * _local1.width) / _local8), ((_local9 * _local1.height) / _local8)); this.addChild(_local12); _local11++; }; _local9++; }; } override public function Free():void{ super.Free(); } public function set prIInd(_arg1:int):void{ this.iIInd = _arg1; if (this.iImages == null){ this.iIInd = -1; return; }; if (this.iIInd >= (this.iImages.length - 1)){ this.iIInd = (this.iImages.length - 1); }; Make(); } public function get prIInd():int{ return (this.iIInd); } } }//package ENGINE.INTERFACE
Section 33
//OButton (ENGINE.INTERFACE.OButton) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.ANIMATORS.*; public class OButton extends OIObject { public var iHit:OSprite; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.6, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Scale.Make, iSScale:1, iEScale:0.8, iPIter:6}, {F:OA_Scale.Make, iSScale:0.8, iEScale:1, iPIter:6}]; public function OButton(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = ((_arg2)==null) ? OButton.iDefAnimators : _arg2; super(_arg1, _local3); } override public function OnMouseUp(_arg1:MouseEvent):void{ this.prPress = false; } override public function OnRollOver(_arg1:MouseEvent):void{ this.prRool = true; } override public function Init():void{ this.useHandCursor = true; this.buttonMode = true; super.Init(); if (this.iHit){ this.iHit.visible = false; this.hitArea = this.iHit; }; } override public function OnRollOut(_arg1:MouseEvent):void{ if (this.prPress){ this.prPress = false; }; this.prRool = false; } override public function Free():void{ this.iHit = null; super.Free(); } override public function OnMouseDown(_arg1:MouseEvent):void{ this.prPress = true; if ((this.parent is OIObject)){ (this.parent as OIObject).OnPress(_arg1, this); }; } } }//package ENGINE.INTERFACE
Section 34
//OCounter (ENGINE.INTERFACE.OCounter) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ANIMATORS.*; public class OCounter extends OIObject { public var iSeparator:OIObject; public var iDigits0:Array; public var iDigits:Array; protected var iValue:int; protected var iValue0:int; protected var iWidth:Number; protected var iHeight:Number; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, null, null, null, null]; public function OCounter(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Array=null){ var _local5:Array; this.iWidth = _arg2; this.iHeight = _arg3; _local5 = (_arg4) ? _arg4 : iDefAnimators; super(_arg1, _local5); } public function set prValue0(_arg1:int):void{ this.iValue0 = Math.max(_arg1, 0); if (!this.iDigits0){ return; }; this.iValue0 = Math.min(this.iValue0, (Math.pow(10, this.iDigits0.length) - 1)); Draw(); } public function set prValue(_arg1:int):void{ this.iValue = Math.max(_arg1, 0); if (!this.iDigits){ return; }; this.iValue = Math.min(this.iValue, (Math.pow(10, this.iDigits.length) - 1)); Draw(); } override public function Init():void{ this.iDigits = new Array(); this.iDigits0 = new Array(); super.Init(); } private function Draw():void{ var _local1:Number; var _local2:String; var _local3:String; var _local4:int; var _local5:Number; var _local6:int; _local1 = 0; _local2 = this.iValue0.toString(); _local3 = this.iValue.toString(); _local4 = 0; while (_local4 < this.iDigits0.length) { this.iDigits0[_local4].prAnimationEnabled = this.iAEnabled; _local4++; }; _local4 = 0; while (_local4 < this.iDigits.length) { this.iDigits[_local4].prAnimationEnabled = this.iAEnabled; _local4++; }; if (this.iDigits0.length){ _local4 = (_local2.length - 1); while (_local4 >= 0) { this.iDigits0[_local4].prValue = (_local2.charCodeAt(_local4) - 47); _local4--; }; _local6 = (this.iDigits0.length - _local2.length); _local4 = 0; while (_local4 < _local6) { if (this.iDigits0[_local4].prValue){ this.iDigits0[_local4].prValue = 0; }; _local4++; }; }; if (this.iDigits.length){ _local4 = 0; while (_local4 < _local3.length) { this.iDigits[_local4].prValue = (_local3.charCodeAt(_local4) - 47); _local4++; }; _local6 = this.iDigits.length; _local4 = _local3.length; while (_local4 < _local6) { if (this.iDigits[_local4].prValue){ this.iDigits[_local4].prValue = 0; }; _local4++; }; }; if (this.iDigits0.length){ _local4 = (_local2.length - 1); while (_local4 >= 0) { _local1 = (_local1 + this.iDigits0[_local4].prWidth); _local4--; }; }; if (this.iSeparator){ _local1 = (_local1 + this.iSeparator.prWidth); }; if (this.iDigits.length){ _local4 = 0; while (_local4 < _local3.length) { _local1 = (_local1 + this.iDigits[_local4].prWidth); _local4++; }; }; _local5 = ((this.iWidth - _local1) / 2); if (this.iDigits0.length){ _local4 = 0; while (_local4 < this.iDigits0.length) { if (this.iDigits0[_local4].prValue){ this.iDigits0[_local4].PosValue(_local5, ((this.iWidth - this.iDigits0[_local4].prHeight) / 2)); _local5 = (_local5 + this.iDigits0[_local4].prWidth); }; _local4++; }; }; if (this.iSeparator){ this.iSeparator.Pos(_local5, ((this.iHeight - this.iSeparator.prHeight) / 2)); _local5 = (_local5 + this.iSeparator.prWidth); }; if (this.iDigits.length){ _local4 = 0; while (_local4 < this.iDigits.length) { if (this.iDigits[_local4].prValue){ this.iDigits[_local4].PosValue(_local5, ((this.iHeight - this.iDigits[_local4].prHeight) / 2)); _local5 = (_local5 + this.iDigits[_local4].prWidth); }; _local4++; }; }; } public function get prValue0():int{ return (this.iValue0); } override public function Free():void{ this.iDigits = null; this.iDigits0 = null; this.iSeparator = null; super.Free(); } public function get prValue():int{ return (this.iValue); } } }//package ENGINE.INTERFACE
Section 35
//ODialog (ENGINE.INTERFACE.ODialog) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ANIMATORS.*; public class ODialog extends OWindow { public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:12}, null, null, null, null, null, null]; public function ODialog(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = (_arg2) ? _arg2 : ODialog.iDefAnimators; super(_arg1, _local3); } override public function Init():void{ super.Init(); this.SetVisible(false); this.PosCenter(); this.prVisible = true; } } }//package ENGINE.INTERFACE
Section 36
//OInput (ENGINE.INTERFACE.OInput) package ENGINE.INTERFACE { import flash.events.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; public class OInput extends OIObject { public var iText:OInputTextField; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.5, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, null, null]; public function OInput(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = ((_arg2)==null) ? OInput.iDefAnimators : _arg2; super(_arg1, _local3); } public function set prText(_arg1:String):void{ this.iText.prText = _arg1; } override public function Init():void{ super.Init(); this.addEventListener(KeyboardEvent.KEY_UP, OnKeyUp); } public function get prText():String{ return (this.iText.prText); } protected function OnKeyUp(_arg1:KeyboardEvent):void{ if ((((_arg1.keyCode == 13)) && ((this.parent is OWindow)))){ (this.parent as OWindow).OnPress(null, this); }; } } }//package ENGINE.INTERFACE
Section 37
//OInterface (ENGINE.INTERFACE.OInterface) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; public class OInterface { public static const iDefLBButtonAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.6, iPIter:4}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:4}, {F:OA_Scale.Make, iSScale:1, iEScale:0.8, iPIter:4}, {F:OA_Scale.Make, iSScale:0.8, iEScale:1, iPIter:4}]; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:12}, null, null, null, null, null, null]; public static const iDefSlowAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:30}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:30}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:30}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:30}, null, null, null, null, null, null]; public static function OHtmlTextFieldMake(_arg1:Array):OHtmlTextField{ return (new OHtmlTextField(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10])); } public static function OIObjectMake(_arg1:Array):OIObject{ var _local2:OIObject; _local2 = new OIObject(_arg1[1], _arg1[2]); _local2.Pos(_arg1[3], _arg1[4]); return (_local2); } public static function OProgressMake(_arg1:Array):OProgress{ return (new OProgress(_arg1[1], _arg1[2])); } public static function OInputTextFieldMake(_arg1:Array):OInputTextField{ return (new OInputTextField(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[11])); } public static function OTabMake(_arg1:Array):OTab{ return (new OTab(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5])); } public static function OCounterMake(_arg1:Array):OCounter{ return (new OCounter(_arg1[1], _arg1[2], _arg1[3], _arg1[4])); } } }//package ENGINE.INTERFACE
Section 38
//OIObject (ENGINE.INTERFACE.OIObject) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.CORE.*; public class OIObject extends OSprite { protected var iTrigger:uint; protected var iAEnabled:Boolean;// = true protected var iAManager:OAnimatorManager; protected var iState:int; protected var iAParams:Array; protected var iParam:Array; public static var trActive:uint = 2; public static var trPress:uint = 16; public static var trRool:uint = 8; public static var trFocus:uint = 3; public static var trVisible:uint = 1; public function OIObject(_arg1:Array, _arg2:Array=null){ iTrigger = (trVisible | trActive); iAEnabled = true; super(); this.iParam = _arg1; this.iAParams = _arg2; this.Init(); } public function get prMouseEnabled():Boolean{ return (((this.prVisible) && (this.prActive))); } public function get prRool():Boolean{ return (((this.iTrigger & trRool) > 0)); } public function set prFocus(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trFocus); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anFocusIn]); }; } else { this.iTrigger = (this.iTrigger & ~(trFocus)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anFocusOut]); }; }; } override public function get prVisible():Boolean{ return (((this.iTrigger & trVisible) > 0)); } public function set prRool(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trRool); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOver]); }; } else { this.iTrigger = (this.iTrigger & ~(trRool)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOut]); }; }; } override public function set prVisible(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trVisible); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anShow], false); }; } else { this.iTrigger = (this.iTrigger & ~(trVisible)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anHide], false); }; }; if (((!(this.iAManager)) || (!(this.iAEnabled)))){ this.visible = _arg1; }; this.mouseEnabled = this.prMouseEnabled; this.mouseChildren = this.mouseEnabled; } public function OnRollOver(_arg1:MouseEvent):void{ this.prRool = true; } public function Init():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:DisplayObject; var _local5:String; if (this.iParam){ _local1 = this.iParam.length; _local2 = 0; while (_local2 < _local1) { _local3 = this.iParam[_local2].length; _local4 = this.iParam[_local2][0](this.iParam[_local2]); _local5 = this.iParam[_local2][(_local3 - 3)]; if (_local5){ if ((this[_local5] is Array)){ this[_local5][this.iParam[_local2][(_local3 - 2)]] = _local4; } else { this[_local5] = _local4; }; }; if ((_local4 is OIObject)){ (_local4 as OIObject).SetVisible(this.iParam[_local2][(_local3 - 1)]); } else { if ((_local4 is IDisplayObject)){ (_local4 as IDisplayObject).prVisible = this.iParam[_local2][(_local3 - 1)]; } else { _local4.visible = this.iParam[_local2][(_local3 - 1)]; }; }; this.addChild(_local4); _local2++; }; }; this.iAManager = (this.iAParams) ? new OAnimatorManager(this) : null; this.tabEnabled = false; this.addEventListener(Event.ENTER_FRAME, OnEnterFrame); this.addEventListener(MouseEvent.ROLL_OVER, OnRollOver); this.addEventListener(MouseEvent.ROLL_OUT, OnRollOut); this.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); this.addEventListener(MouseEvent.MOUSE_UP, OnMouseUp); } public function get prAnimationEnabled():Boolean{ return (this.iAEnabled); } public function OnMouseUp(_arg1:MouseEvent):void{ this.prPress = false; } public function set prActive(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trActive); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anActivate]); }; } else { this.iTrigger = (this.iTrigger & ~(trActive)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anDeactivate]); }; }; this.mouseEnabled = this.prMouseEnabled; this.mouseChildren = this.mouseEnabled; } public function get prPress():Boolean{ return (((this.iTrigger & trPress) > 0)); } public function get State():int{ return (this.iState); } public function OnPress(_arg1:Event, _arg2):void{ } public function OnRollOut(_arg1:MouseEvent):void{ this.prRool = false; } override public function Free():void{ this.removeEventListener(MouseEvent.MOUSE_UP, OnMouseUp); this.removeEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); this.removeEventListener(MouseEvent.ROLL_OUT, OnRollOut); this.removeEventListener(MouseEvent.ROLL_OVER, OnRollOver); this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame); super.Free(); if (this.iAManager){ this.iAManager.Free(); }; this.iAManager = null; } public function get prAnimation():Boolean{ var _local1:int; if (((this.iAManager) && (this.iAManager.prAnimation))){ return (true); }; _local1 = 0; while (_local1 < this.numChildren) { if (!(this.getChildAt(_local1) is OIObject)){ } else { if ((this.getChildAt(_local1) as OIObject).prAnimation){ return (true); }; }; _local1++; }; return (false); } public function get prActive():Boolean{ return (((this.iTrigger & trActive) > 0)); } public function PosCenter(_arg1:Number=800, _arg2:Number=600):void{ var _local3:Rectangle; _local3 = this.getBounds(this); this.Pos(OGlobal.ScaleFloor((((_arg1 - this.prWidth) - (OGlobal.ToLocal(_local3.x) * 2)) / 2)), OGlobal.ScaleFloor((((_arg2 - this.prHeight) - (OGlobal.ToLocal(_local3.y) * 2)) / 2))); } public function AddAnimator(_arg1:Object, _arg2:Boolean=true):void{ var _local3:Boolean; _local3 = (_arg2) ? ((((this.iAManager) && (this.prVisible))) && (this.iAEnabled)) : ((this.iAManager) && (this.iAEnabled)); if (_local3){ this.iAManager.AddAnimator(_arg1); }; } public function set prAnimationEnabled(_arg1:Boolean):void{ this.iAEnabled = _arg1; } public function set prPress(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trPress); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anPress]); }; } else { this.iTrigger = (this.iTrigger & ~(trPress)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anUnpress]); }; }; } public function OnMouseDown(_arg1:MouseEvent):void{ this.prPress = true; } public function OnEnterFrame(_arg1:Event):void{ if (this.iAManager){ this.iAManager.OnEnterFrame(); }; } public function SetVisible(_arg1:Boolean):void{ this.prAnimationEnabled = false; this.prVisible = _arg1; this.prAnimationEnabled = true; } public function set prAnimatorParams(_arg1:Array):void{ this.iAParams = _arg1; if (!this.iAManager){ this.iAManager = new OAnimatorManager(this); }; } public function set State(_arg1:int):void{ this.iState = _arg1; } public function get prAnimatorParams():Array{ return (this.iAParams); } public function get prFocus():Boolean{ return (((this.iTrigger & trFocus) > 0)); } } }//package ENGINE.INTERFACE
Section 39
//OListBox (ENGINE.INTERFACE.OListBox) package ENGINE.INTERFACE { import flash.events.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; import ENGINE.CORE.*; public class OListBox extends OIObject { private var iLBParams:Array; private var iEGenP:Function; private var iElements:Array; public var iDown:OButton; private var iEGen:Array; public var iUp:OButton; private var iEShowInd:int; private var iSelection:Boolean;// = true private var iECoord:Array; private var iECount:int; private var iCycling:Boolean; private var iECurInd:int; private var iPageScrool:Boolean; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0.6, iInd:[0], iPIter:6}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:1, iInd:[0], iPIter:6}, null, null]; public function OListBox(_arg1:Array, _arg2:Array, _arg3:Function, _arg4:Array, _arg5:Array, _arg6:Array=null){ var _local7:Array; iSelection = true; _local7 = (_arg6) ? _arg6 : iDefAnimators; this.iEGen = _arg2; this.iEGenP = _arg3; this.iECoord = _arg4; this.iLBParams = _arg5; this.iECount = this.iECoord.length; super(_arg1, _local7); } public function SetCurrentElement(_arg1, _arg2:Array=null):void{ var _local3:int; if (((!(_arg1)) && (!(_arg2)))){ this.FreeElements(); this.iLBParams = null; this.iECurInd = 0; this.iEShowInd = 0; return; }; if (_arg2){ this.iLBParams = _arg2; }; if (!this.iLBParams){ return; }; this.iECurInd = 0; _local3 = 0; while (_local3 < this.iLBParams.length) { if (_arg1 == this.iLBParams[_local3]){ this.iECurInd = _local3; break; }; _local3++; }; this.iEShowInd = this.iECurInd; if ((this.iEShowInd + this.iECount) >= this.iLBParams.length){ this.iEShowInd = (this.iLBParams.length - this.iECount); }; if (this.iEShowInd < 0){ this.iEShowInd = 0; }; InitElements(); } protected function UnpressElements(_arg1:OListBoxElement):void{ var _local2:int; _local2 = 0; while (_local2 < this.iElements.length) { if (!this.iElements[_local2]){ } else { if (this.iElements[_local2] == _arg1){ this.iECurInd = (this.iEShowInd + _local2); } else { if (this.iElements[_local2].prPress){ this.iElements[_local2].prPress = false; }; }; }; _local2++; }; } public function get prPageScrool():Boolean{ return (this.iPageScrool); } protected function InitElements():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Boolean; this.FreeElements(); if (this.iLBParams == null){ return; }; _local1 = 0; _local2 = (((this.iEShowInd + this.iECount) <= this.iLBParams.length)) ? (this.iEShowInd + this.iECount) : this.iLBParams.length; _local3 = this.iEShowInd; while (_local3 < _local2) { this.iEGenP(this.iEGen, this.iLBParams[_local3]); this.iElements[_local1] = this.iEGen[0](this.iEGen); this.iElements[_local1].Pos(OGlobal.ScaleFloor(this.iECoord[_local1][0]), OGlobal.ScaleFloor(this.iECoord[_local1][1])); this.iElements[_local1].mouseEnabled = this.iSelection; this.addChild(this.iElements[_local1]); if ((((this.iECurInd == _local3)) && (this.iSelection))){ this.iElements[_local1].prPress = true; }; _local1++; _local3++; }; if (((this.iUp) && (this.iDown))){ if (this.iCycling){ _local4 = (this.iLBParams) ? (this.iLBParams.length > this.iECount) : false; if (this.iUp.prVisible != _local4){ this.iUp.prVisible = _local4; }; if (this.iDown.prVisible != _local4){ this.iDown.prVisible = _local4; }; } else { if ((((this.iEShowInd == 0)) && (this.iUp.prVisible))){ if (this.iUp.prPress){ this.iUp.prPress = false; }; this.iUp.prVisible = false; }; if ((((this.iEShowInd > 0)) && (!(this.iUp.prVisible)))){ this.iUp.prVisible = true; }; if (((((this.iEShowInd + this.iECount) >= this.iLBParams.length)) && (this.iDown.prVisible))){ if (this.iDown.prPress){ this.iDown.prPress = false; }; this.iDown.prVisible = false; }; if (((((this.iEShowInd + this.iECount) < this.iLBParams.length)) && (!(this.iDown.prVisible)))){ this.iDown.prVisible = true; }; }; }; } public function set prPageScrool(_arg1:Boolean):void{ this.iPageScrool = _arg1; } override public function Free():void{ this.iUp = null; this.iDown = null; this.iElements = null; super.Free(); } public function set prCurrentInd(_arg1:int):void{ if (!this.iLBParams){ return; }; this.SetCurrentElement(this.iLBParams[_arg1]); } override public function Init():void{ super.Init(); this.iElements = new Array(); this.InitElements(); } public function set prLBParams(_arg1:Array):void{ this.iLBParams = _arg1; this.iECurInd = 0; this.iEShowInd = 0; this.InitElements(); } public function get prCurrentInd():int{ return (this.iECurInd); } public function set prSelection(_arg1:Boolean):void{ this.iSelection = _arg1; InitElements(); } public function set prCycling(_arg1:Boolean):void{ this.iCycling = _arg1; InitElements(); } override public function OnPress(_arg1:Event, _arg2):void{ if ((_arg2 is OListBoxElement)){ this.UnpressElements((_arg2 as OListBoxElement)); }; if ((((_arg2 == this.iUp)) && (this.SkipElements((this.iPageScrool) ? -(this.iECount) : -1)))){ this.InitElements(); }; if ((((_arg2 == this.iDown)) && (this.SkipElements((this.iPageScrool) ? this.iECount : 1)))){ this.InitElements(); }; if ((this.parent is OIObject)){ (this.parent as OIObject).OnPress(_arg1, this); }; } public function get prSelection():Boolean{ return (this.iSelection); } protected function FreeElements():void{ var _local1:int; _local1 = 0; while (_local1 < this.iElements.length) { if (!this.iElements[_local1]){ } else { this.removeChild(this.iElements[_local1]); this.iElements[_local1].Free(); this.iElements[_local1] = null; }; _local1++; }; } protected function SkipElements(_arg1:int):Boolean{ var _local2:int; if (!this.iLBParams){ return (false); }; _local2 = (this.iEShowInd + _arg1); if ((_local2 + this.iECount) >= this.iLBParams.length){ _local2 = (this.iCycling) ? (_local2 - this.iLBParams.length) : (this.iLBParams.length - this.iECount); }; if (_local2 < 0){ _local2 = (this.iCycling) ? (this.iLBParams.length + _local2) : 0; }; if (this.iEShowInd == _local2){ return (false); }; this.iEShowInd = _local2; if (!this.iSelection){ this.iECurInd = this.iEShowInd; }; return (true); } public function get prCurrentLBParam(){ return ((this.iLBParams) ? this.iLBParams[this.iECurInd] : null); } public function get prCycling():Boolean{ return (this.iCycling); } } }//package ENGINE.INTERFACE
Section 40
//OProgress (ENGINE.INTERFACE.OProgress) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.geom.*; public class OProgress extends OIObject { public var iProgressBG:OBitmap; private var iPBG:OBitmap; public var iProgress:OBitmap; private var iValue:Number; public function OProgress(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } public function set prValue(_arg1:Number):void{ var _local2:int; var _local3:Rectangle; var _local4:Rectangle; if (_arg1 < 0){ _arg1 = 0; } else { if (_arg1 > 100){ _arg1 = 100; }; }; if (this.iValue != _arg1){ _local2 = Math.round(((iProgressBG.prOBM.iBM.width * _arg1) / 100)); _local3 = new Rectangle(0, 0, _local2, this.iProgressBG.prOBM.iBM.height); _local4 = new Rectangle(_local2, 0, (iProgressBG.prOBM.iBM.width - _local2), this.iProgressBG.prOBM.iBM.height); this.iProgressBG.prOBM.iBM.fillRect(this.iPBG.prOBM.iBM.rect, 0); this.iProgressBG.prOBM.iBM.copyPixels(this.iProgress.prOBM.iBM, _local3, new Point(0, 0)); this.iProgressBG.prOBM.iBM.copyPixels(this.iPBG.prOBM.iBM, _local4, new Point(_local2, 0)); }; this.iValue = _arg1; } override public function Init():void{ super.Init(); if (this.iProgressBG){ this.iPBG = this.iProgressBG.Clone(); }; } override public function Free():void{ this.iProgressBG = null; this.iProgress = null; super.Free(); } public function get prValue():Number{ return (this.iValue); } } }//package ENGINE.INTERFACE
Section 41
//OTab (ENGINE.INTERFACE.OTab) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import ENGINE.INTERFACE.ANIMATORS.*; public class OTab extends OIObject { private var iVAnimator:Object; private var iCurInd:int; protected var iWidth:Number; protected var iHeight:Number; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, null, null, null, null]; public static const iDefVAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:3}; public function OTab(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Object=null, _arg5:Array=null){ var _local6:Array; this.iWidth = _arg2; this.iHeight = _arg3; this.iVAnimator = (_arg4) ? _arg4 : iDefVAnimator; _local6 = (_arg5) ? _arg5 : iDefAnimators; super(_arg1, _local6); } override public function get prWidth():Number{ return (this.iWidth); } public function get prElements():int{ return (this.numChildren); } public function set prValue(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; } else { if (_arg1 >= this.numChildren){ _arg1 = (this.numChildren - 1); }; }; if (((this.iAEnabled) && (this.iVAnimator))){ if (this.iCurInd == _arg1){ return; }; this.iVAnimator.iSInd = [this.iCurInd]; this.iVAnimator.iEInd = [_arg1]; this.AddAnimator(this.iVAnimator, false); } else { if ((this.getChildAt(this.iCurInd) is IDisplayObject)){ (this.getChildAt(this.iCurInd) as IDisplayObject).prVisible = false; }; if ((this.getChildAt(_arg1) is IDisplayObject)){ (this.getChildAt(_arg1) as IDisplayObject).prVisible = true; }; }; this.iCurInd = _arg1; } override public function Init():void{ super.Init(); (this.getChildAt(0) as IDisplayObject).prVisible = true; } public function get prValue():int{ return (this.iCurInd); } override public function get prHeight():Number{ return (this.iHeight); } public function PosValue(_arg1:Number, _arg2:Number):void{ (this.getChildAt(this.iCurInd) as IDisplayObject).Pos((_arg1 - this.prX), (_arg2 - this.prY)); } } }//package ENGINE.INTERFACE
Section 42
//OWindow (ENGINE.INTERFACE.OWindow) package ENGINE.INTERFACE { public class OWindow extends OIObject { public function OWindow(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } } }//package ENGINE.INTERFACE
Section 43
//OEffectGel (ENGINE.SKIN.OEffectGel) package ENGINE.SKIN { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import ENGINE.CORE.*; import flash.filters.*; public class OEffectGel extends OEffect { private var iColor:uint;// = 0 private var iF2B:BlurFilter; private var iF2GG1:GradientGlowFilter; private var iF2GG2:GradientGlowFilter; private var iF0S:DropShadowFilter; private var iF1G:GlowFilter; private var iBorder:Number;// = 0 private var iF1S:DropShadowFilter; public function OEffectGel(){ iColor = 0; iBorder = 0; super(); } override public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{ var _local5:OBM; var _local6:Number; var _local7:Number; var _local8:Sprite; var _local9:Sprite; var _local10:ColorTransform; var _local11:Bitmap; var _local12:Bitmap; var _local13:Bitmap; var _local14:Sprite; var _local15:Bitmap; var _local16:Bitmap; var _local17:BitmapData; var _local18:Bitmap; _local5 = OBM.Make([null, _arg1, _arg2, _arg3, _arg4, 0]); _local6 = OGlobal.Scale; _local7 = 0.85; _local8 = new Sprite(); _local9 = new Sprite(); _local9.x = iBorder; _local9.y = iBorder; _local9.alpha = _local7; _local8.addChild(_local9); _local10 = new ColorTransform(0, 0, 0); _local10.color = this.iColor; _local11 = new Bitmap(_local5.iBM); _local11.transform.colorTransform = _local10; _local9.addChild(_local11); if (this.iF0S.distance > 0){ _local18 = new Bitmap(_local5.iBM); _local18.blendMode = "multiply"; _local18.filters = [this.iF0S]; _local9.addChild(_local18); }; _local12 = new Bitmap(_local5.iBM); _local12.blendMode = "multiply"; _local12.filters = [this.iF1S]; _local9.addChild(_local12); _local13 = new Bitmap(_local5.iBM); _local13.blendMode = "multiply"; _local13.filters = [this.iF1G]; _local9.addChild(_local13); _local14 = new Sprite(); _local14.blendMode = "layer"; _local14.filters = [this.iF2B]; _local9.addChild(_local14); _local15 = new Bitmap(_local5.iBM); _local15.blendMode = "screen"; _local15.filters = [this.iF2GG1]; _local14.addChild(_local15); _local16 = new Bitmap(_local5.iBM); _local16.blendMode = "erase"; _local16.filters = [this.iF2GG2]; _local14.addChild(_local16); _local17 = new BitmapData((_local8.width + (this.iBorder * 2)), (_local8.height + (this.iBorder * 2)), true, 0); _local17.draw(_local8); return (new OBM(_local17, (-(this.iBorder) + _local5.iX), (-(this.iBorder) + _local5.iY), _local5.iWidth, _local5.iHeight)); } override public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{ var _local4:Object; var _local5:Object; var _local6:Number; var _local7:uint; var _local8:Number; var _local9:Number; var _local10:int; var _local11:int; var _local12:Array; var _local13:Array; _local4 = this.iColors.GetItem(_arg1); _local5 = this.iFilters.GetItem(_arg2); if (_local5 == null){ return; }; _local6 = (OGlobal.Scale * _arg3); if (_local4 == null){ _local4 = new Object(); if (_arg1.search(/,/) < 0){ _local4.iCH = Number(_arg1); if (_local4.iCH == undefined){ return; }; _local4.iCH = (_local4.iCH % 360); _local10 = Math.floor((_local4.iCH / 30)); _local11 = ((_local10 + 1) % 12); _local12 = [50, 50, 60, 60, 50, 50, 40, 40, 30, 30, 40, 40]; _local4.iCS = ((_local12[_local10] + ((_local12[_local11] - _local12[_local10]) * ((_local4.iCH / 30) - _local10))) * 0.01); _local4.iCB = 1; _local4.iSH = (((_local10 % 2))==0) ? (_local4.iCH - 15) : (_local4.iCH + 15); if (_local4.iSH < 0){ _local4.iSH = (_local4.iSH + 360); }; _local4.iSS = 0.9; _local4.iSB = 0.6; } else { _local13 = _arg1.split(/,/); _local4.iCH = _local13[0]; _local4.iCS = _local13[1]; _local4.iCB = _local13[2]; _local4.iSH = _local13[3]; _local4.iSS = _local13[4]; _local4.iSB = _local13[5]; }; }; _local7 = ODisplay.HSBToRGB(_local4.iSH, _local4.iSS, _local4.iSB); this.iF0S = new DropShadowFilter((_local5.iF0SD * _local6), _local5.iAngle, ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, (_local4.iCB * 0.5)), 0.75, (_local5.iF0SB * _local6), (_local5.iF0SB * _local6), 1, 2, false, true, true); this.iF1S = new DropShadowFilter((_local5.iF1SD * _local6), _local5.iAngle, _local7, 0.85, (_local5.iF1SB * _local6), (_local5.iF1SB * _local6), 1.5, 3, true, true, true); this.iF1G = new GlowFilter(_local7, _local5.iF1GA, (_local5.iF1GB * _local6), (_local5.iF1GB * _local6), 2, 3, true, true); _local8 = ((_local6)<1) ? (_local5.iF2GGC1 * _local6) : _local5.iF2GGC1; this.iF2GG1 = new GradientGlowFilter((_local5.iF2GGD1 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local8, 0xFF], (_local5.iF2GGB1 * _local6), (_local5.iF2GGB1 * _local6), 1, 1, "inner", true); _local9 = ((_local6)<1) ? (_local5.iF2GGC2 * _local6) : _local5.iF2GGC2; this.iF2GG2 = new GradientGlowFilter((_local5.iF2GGD2 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local9, 0xFF], (_local5.iF2GGB2 * _local6), (_local5.iF2GGB2 * _local6), 1, 1, "inner", true); this.iF2B = new BlurFilter((_local5.iF2B * _local6), (_local5.iF2B * _local6)); this.iColor = ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, _local4.iCB); this.iBorder = Math.ceil((_local5.iBorder * _local6)); } } }//package ENGINE.SKIN
Section 44
//OMultiplayer (ENGINE.SMARTFOX.OMultiplayer) package ENGINE.SMARTFOX { import it.gotoandplay.smartfoxserver.handlers.*; import it.gotoandplay.smartfoxserver.data.*; import it.gotoandplay.smartfoxserver.*; import it.gotoandplay.smartfoxserver.util.*; import ENGINE.CORE.*; import flash.utils.*; public class OMultiplayer extends SmartFoxClient { private var iCmd:String; private var iError:String; private var iConnection:Boolean;// = false private var iUsersCount:int; private var iErrorsCount:int; private var iPassword:String; private var iAdress:String; private var iXTName:String; private var iTimer:int; private var iGameParams:Array; private var iCMessages:Array; private var iOpponentID:int; private var iOpponentName:String; private var iName:String; private var iTurn:Array; private var iState:int; private var iGRoomParams:Array; private var iZoneName:String; public static const stInGame:int = 13; public static const stLogin:int = 3; public static const cmdJoinGameRoom:String = "jgr"; public static const cmdZoneUsersCount:String = "zuc"; public static const stNone:int = 0; public static const stMainRoomError:int = 6; public static const stGameError:int = 12; public static const cmdJoinGame:String = "jgm"; public static const cmdJoinMainRoom:String = "jmr"; public static const stConnection:int = 1; public static const stLoginError:int = 4; public static const cmdMakeTurn:String = "m"; public static const cmdCmd:String = "cmd"; public static const stConnectionError:int = 2; public static const stInZone:int = 7; public static const stInGameRoom:int = 10; public static const cmdChatMessage:String = "c"; public static const stJoinGameRoom:int = 8; public static const stGameRoomError:int = 9; public static const stJoinGame:int = 11; public static const stJoinMainRoom:int = 5; public function OMultiplayer(_arg1:Boolean=false){ iConnection = false; super(_arg1); this.State = stNone; } private function OnConnectionLost(_arg1:SFSEvent):void{ this.iConnection = false; this.State = stNone; } public function get prActiveRoomID():int{ return (this.activeRoomId); } public function get prErrorsCount():int{ return (this.iErrorsCount); } public function get prError():String{ return (this.iError); } public function get prChatMessage():String{ return (((this.iCMessages.length)==0) ? null : this.iCMessages.shift()); } public function ClearChatMessage(_arg1:Boolean=false):void{ if (_arg1){ this.iCMessages = new Array(); } else { if (this.iCMessages[0]){ this.iCMessages.shift(); }; }; } public function Init(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String=""):void{ if (((!(OGlobal.CheckDomain(_arg1))) || (!((this.iState == stNone))))){ return; }; this.iAdress = _arg2; this.iZoneName = _arg3; this.iXTName = _arg4; this.iName = _arg5; this.iPassword = _arg6; this.iTurn = new Array(); this.iCMessages = new Array(); addEventListener(SFSEvent.onConnection, OnConnection); addEventListener(SFSEvent.onConnectionLost, OnConnectionLost); addEventListener(SFSEvent.onExtensionResponse, OnExtensionResponse); this.State = stConnection; } private function OnConnection(_arg1:SFSEvent):void{ if (!_arg1.params.success){ this.iError = _arg1.params.error; this.iErrorsCount++; this.iConnection = false; }; this.State = (_arg1.params.success) ? stLogin : stConnectionError; } public function set prGRoomParams(_arg1:Array):void{ this.iGRoomParams = _arg1; } public function ClearOpponentTurn(_arg1:Boolean=false):void{ if (_arg1){ this.iTurn = new Array(); } else { if (this.iTurn[0]){ this.iTurn.shift(); }; }; } private function OnExtensionResponse(_arg1:SFSEvent):void{ var _local2:Array; if (_arg1.params.type != "str"){ return; }; _local2 = _arg1.params.dataObj; if (_local2 == null){ return; }; switch (_local2[0]){ case "logOK": this.myUserId = int(_local2[2]); this.myUserName = _local2[3]; this.amIModerator = (Number(_local2[4]) > 0); this.State = stJoinMainRoom; break; case "logKO": this.iError = _local2[2]; this.State = stLoginError; this.iErrorsCount++; break; case cmdJoinMainRoom: if (_local2[2]){ this.activeRoomId = _local2[3]; this.State = stInZone; } else { this.State = stMainRoomError; }; break; case cmdZoneUsersCount: this.iUsersCount = _local2[2]; break; case cmdJoinGameRoom: if (_local2[2] < 0){ this.activeRoomId = -1; this.State = OMultiplayer.stGameRoomError; } else { this.activeRoomId = _local2[2]; this.State = stInGameRoom; }; break; case cmdJoinGame: if (_local2[2] < 0){ this.activeRoomId = -1; this.playerId = -1; this.iOpponentID = -1; this.iOpponentName = null; this.State = OMultiplayer.stGameError; } else { this.activeRoomId = _local2[2]; this.playerId = _local2[3]; this.iOpponentID = _local2[4]; this.iOpponentName = _local2[5]; this.State = OMultiplayer.stInGame; }; break; case cmdMakeTurn: this.iTurn.push(_local2[2]); break; case cmdChatMessage: this.iCMessages.push(_local2[2]); break; case cmdCmd: this.iCmd = _local2[2]; break; }; } public function ChatMessage(_arg1:Array=null):void{ this.sendXtMessage(this.iXTName, OMultiplayer.cmdChatMessage, (_arg1) ? [_arg1.toString()] : ["0"], "str"); } public function get State():int{ return (this.iState); } public function set prGameParams(_arg1:Array):void{ this.iGameParams = _arg1; } public function get prUsersCount():int{ return (this.iUsersCount); } public function Free():void{ if (this.iConnection){ this.disconnect(); }; this.iConnection = false; this.iCMessages = null; removeEventListener(SFSEvent.onConnection, OnConnection); removeEventListener(SFSEvent.onConnectionLost, OnConnectionLost); removeEventListener(SFSEvent.onExtensionResponse, OnExtensionResponse); } public function Turn(_arg1:Array=null):void{ if (this.iState > stLoginError){ this.sendXtMessage(this.iXTName, OMultiplayer.cmdMakeTurn, (_arg1) ? [_arg1.toString(), this.iOpponentID] : ["0", this.iOpponentID], "str"); }; } public function get prOpponentTurn():String{ return (((this.iTurn.length)>0) ? this.iTurn[0] : null); } public function get prGRoomParams():Array{ return (this.iGRoomParams); } public function get prOpponentName():String{ return ((this.iOpponentName) ? this.iOpponentName.slice(0, (this.iOpponentName.length - 3)) : "..."); } public function get prGameParams():Array{ return (this.iGameParams); } public function ClearCmd():void{ this.iCmd = null; } public function OnEnterFrame():void{ if (((!(this.isConnected)) && ((this.iState > stConnection)))){ this.iState = stNone; }; switch (this.iState){ case stInZone: if ((getTimer() - this.iTimer) > 180000){ this.cmdSend(cmdZoneUsersCount); this.iTimer = getTimer(); }; break; }; } public function get prCmd():String{ return (this.iCmd); } public function get prFullOpponentName():String{ return ((this.iOpponentName) ? this.iOpponentName : "..."); } public function get prPlayerID():int{ return (this.playerId); } public function set State(_arg1:int):void{ var aState = _arg1; if ((((aState > stConnectionError)) && (!(this.isConnected)))){ return; }; this.iState = aState; switch (aState){ case stNone: this.iError = null; this.iUsersCount = 0; this.myUserId = -1; this.myUserName = null; this.amIModerator = false; this.playerId = -1; this.activeRoomId = -1; this.Free(); break; case stConnection: try { this.connect(this.iAdress, 9339); this.iConnection = true; } catch(error:Error) { OSystem.iUserText2 = "connect error"; this.State = stConnectionError; }; break; case stLogin: this.login(this.iZoneName, this.iName, this.iPassword); break; case stJoinMainRoom: this.cmdSend(cmdJoinMainRoom); break; case stInZone: this.playerId = -1; this.iOpponentID = -1; this.iOpponentName = null; this.iTimer = getTimer(); this.cmdSend(cmdZoneUsersCount); break; case stJoinGameRoom: this.cmdSend(cmdJoinGameRoom, this.iGRoomParams); break; case stJoinGame: this.cmdSend(cmdJoinGame, this.iGameParams); break; }; } public function cmdSend(_arg1:String, _arg2:Array=null):void{ if (this.iState > stLoginError){ this.sendXtMessage(this.iXTName, _arg1, (_arg2) ? _arg2 : [], "str"); }; } } }//package ENGINE.SMARTFOX
Section 45
//Room (it.gotoandplay.smartfoxserver.data.Room) package it.gotoandplay.smartfoxserver.data { public class Room { private var maxUsers:int; private var userList:Array; private var name:String; private var userCount:int; private var specCount:int; private var id:int; private var myPlayerIndex:int; private var priv:Boolean; private var temp:Boolean; private var limbo:Boolean; private var maxSpectators:int; private var game:Boolean; private var variables:Array; public function Room(_arg1:int, _arg2:String, _arg3:int, _arg4:int, _arg5:Boolean, _arg6:Boolean, _arg7:Boolean, _arg8:Boolean, _arg9:int=0, _arg10:int=0){ this.id = _arg1; this.name = _arg2; this.maxSpectators = _arg4; this.maxUsers = _arg3; this.temp = _arg5; this.game = _arg6; this.priv = _arg7; this.limbo = _arg8; this.userCount = _arg9; this.specCount = _arg10; this.userList = []; this.variables = []; } public function getVariable(_arg1:String):Object{ return (variables[_arg1]); } public function addUser(_arg1:User, _arg2:int):void{ userList[_arg2] = _arg1; userCount++; } public function getName():String{ return (this.name); } public function getId():int{ return (this.id); } public function setIsLimbo(_arg1:Boolean):void{ this.limbo = _arg1; } public function clearVariables():void{ this.variables = []; } public function isTemp():Boolean{ return (this.temp); } public function getMaxSpectators():int{ return (this.maxSpectators); } public function setVariables(_arg1:Array):void{ this.variables = _arg1; } public function isGame():Boolean{ return (this.game); } public function getUser(_arg1):User{ var _local2:User; var _local3:String; var _local4:User; _local2 = null; if (typeof(_arg1) == "number"){ _local2 = userList[_arg1]; } else { if (typeof(_arg1) == "string"){ for (_local3 in userList) { _local4 = this.userList[_local3]; if (_local4.getName() == _arg1){ _local2 = _local4; break; }; }; }; }; return (_local2); } public function setUserCount(_arg1:int):void{ this.userCount = _arg1; } public function getVariables():Array{ return (variables); } public function getUserCount():int{ return (this.userCount); } public function isLimbo():Boolean{ return (this.limbo); } public function getSpectatorCount():int{ return (this.specCount); } public function setSpectatorCount(_arg1:int):void{ this.specCount = _arg1; } public function setMyPlayerIndex(_arg1:int):void{ this.myPlayerIndex = _arg1; } public function removeUser(_arg1:int):void{ delete userList[_arg1]; userCount--; } public function getMyPlayerIndex():int{ return (this.myPlayerIndex); } public function isPrivate():Boolean{ return (this.priv); } public function getMaxUsers():int{ return (this.maxUsers); } public function getUserList():Array{ return (this.userList); } } }//package it.gotoandplay.smartfoxserver.data
Section 46
//User (it.gotoandplay.smartfoxserver.data.User) package it.gotoandplay.smartfoxserver.data { public class User { private var isSpec:Boolean; private var name:String; private var id:int; private var pId:int; private var variables:Array; private var isMod:Boolean; public function User(_arg1:int, _arg2:String){ this.id = _arg1; this.name = _arg2; this.variables = []; this.isSpec = false; this.isMod = false; } public function setModerator(_arg1:Boolean):void{ this.isMod = _arg1; } public function getName():String{ return (this.name); } public function getVariables():Array{ return (this.variables); } public function getId():int{ return (this.id); } public function getPlayerId():int{ return (this.pId); } public function setPlayerId(_arg1:int):void{ this.pId = _arg1; } public function setIsSpectator(_arg1:Boolean):void{ this.isSpec = _arg1; } public function isSpectator():Boolean{ return (this.isSpec); } public function clearVariables():void{ this.variables = []; } public function getVariable(_arg1:String):Object{ return (this.variables[_arg1]); } public function setVariables(_arg1:Array):void{ this.variables = _arg1; } public function isModerator():Boolean{ return (this.isMod); } } }//package it.gotoandplay.smartfoxserver.data
Section 47
//ExtHandler (it.gotoandplay.smartfoxserver.handlers.ExtHandler) package it.gotoandplay.smartfoxserver.handlers { import it.gotoandplay.smartfoxserver.*; import it.gotoandplay.smartfoxserver.util.*; public class ExtHandler implements IMessageHandler { private var sfs:SmartFoxClient; public function ExtHandler(_arg1:SmartFoxClient){ this.sfs = _arg1; } public function handleMessage(_arg1:Object, _arg2:String):void{ var _local3:Object; var _local4:SFSEvent; var _local5:XML; var _local6:String; var _local7:int; var _local8:String; var _local9:Object; if (_arg2 == SmartFoxClient.XTMSG_TYPE_XML){ _local5 = (_arg1 as XML); _local6 = _local5.body.@action; _local7 = int(_local5.body.@id); if (_local6 == "xtRes"){ _local8 = _local5.body.toString(); _local9 = ObjectSerializer.getInstance().deserialize(_local8); _local3 = {}; _local3.dataObj = _local9; _local3.type = _arg2; _local4 = new SFSEvent(SFSEvent.onExtensionResponse, _local3); sfs.dispatchEvent(_local4); }; } else { if (_arg2 == SmartFoxClient.XTMSG_TYPE_JSON){ _local3 = {}; _local3.dataObj = _arg1.o; _local3.type = _arg2; _local4 = new SFSEvent(SFSEvent.onExtensionResponse, _local3); sfs.dispatchEvent(_local4); } else { if (_arg2 == SmartFoxClient.XTMSG_TYPE_STR){ _local3 = {}; _local3.dataObj = _arg1; _local3.type = _arg2; _local4 = new SFSEvent(SFSEvent.onExtensionResponse, _local3); sfs.dispatchEvent(_local4); }; }; }; } } }//package it.gotoandplay.smartfoxserver.handlers
Section 48
//IMessageHandler (it.gotoandplay.smartfoxserver.handlers.IMessageHandler) package it.gotoandplay.smartfoxserver.handlers { public interface IMessageHandler { function handleMessage(_arg1:Object, _arg2:String):void; } }//package it.gotoandplay.smartfoxserver.handlers
Section 49
//SysHandler (it.gotoandplay.smartfoxserver.handlers.SysHandler) package it.gotoandplay.smartfoxserver.handlers { import it.gotoandplay.smartfoxserver.data.*; import it.gotoandplay.smartfoxserver.*; import it.gotoandplay.smartfoxserver.util.*; import flash.utils.*; public class SysHandler implements IMessageHandler { private var sfs:SmartFoxClient; private var handlersTable:Array; public function SysHandler(_arg1:SmartFoxClient){ this.sfs = _arg1; handlersTable = []; handlersTable["apiOK"] = this.handleApiOK; handlersTable["apiKO"] = this.handleApiKO; handlersTable["logOK"] = this.handleLoginOk; handlersTable["logKO"] = this.handleLoginKo; handlersTable["rmList"] = this.handleRoomList; handlersTable["uCount"] = this.handleUserCountChange; handlersTable["joinOK"] = this.handleJoinOk; handlersTable["joinKO"] = this.handleJoinKo; handlersTable["uER"] = this.handleUserEnterRoom; handlersTable["userGone"] = this.handleUserLeaverRoom; handlersTable["pubMsg"] = this.handlePublicMessage; handlersTable["prvMsg"] = this.handlePrivateMessage; handlersTable["dmnMsg"] = this.handleAdminMessage; handlersTable["modMsg"] = this.handleModMessage; handlersTable["dataObj"] = this.handleASObject; handlersTable["rVarsUpdate"] = this.handleRoomVarsUpdate; handlersTable["roomAdd"] = this.handleRoomAdded; handlersTable["roomDel"] = this.handleRoomDeleted; handlersTable["rndK"] = this.handleRandomKey; handlersTable["roundTripRes"] = this.handleRoundTripBench; handlersTable["uVarsUpdate"] = this.handleUserVarsUpdate; handlersTable["createRmKO"] = this.handleCreateRoomError; handlersTable["bList"] = this.handleBuddyList; handlersTable["bUpd"] = this.handleBuddyListUpdate; handlersTable["bAdd"] = this.handleBuddyAdded; handlersTable["roomB"] = this.handleBuddyRoom; handlersTable["leaveRoom"] = this.handleLeaveRoom; handlersTable["swSpec"] = this.handleSpectatorSwitched; } private function handleRoomDeleted(_arg1:Object):void{ var _local2:int; var _local3:Array; var _local4:Object; var _local5:SFSEvent; _local2 = int(_arg1.body.rm.@id); _local3 = sfs.getAllRooms(); _local4 = {}; _local4.room = _local3[_local2]; delete _local3[_local2]; _local5 = new SFSEvent(SFSEvent.onRoomDeleted, _local4); sfs.dispatchEvent(_local5); } public function handleMessage(_arg1:Object, _arg2:String):void{ var _local3:XML; var _local4:String; var _local5:Function; _local3 = (_arg1 as XML); _local4 = _local3.body.@action; _local5 = handlersTable[_local4]; if (_local5 != null){ _local5.apply(this, [_arg1]); } else { trace(("Unknown sys command: " + _local4)); }; } public function handleUserEnterRoom(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:Boolean; var _local6:Boolean; var _local7:int; var _local8:XMLList; var _local9:Room; var _local10:User; var _local11:Object; var _local12:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.u.@i); _local4 = _arg1.body.u.n; _local5 = (_arg1.body.u.@m == "1"); _local6 = (_arg1.body.u.@s == "1"); _local7 = ((_arg1.body.u.@p)!=null) ? int(_arg1.body.u.@p) : -1; _local8 = _arg1.body.u.vars["var"]; _local9 = sfs.getRoom(_local2); _local10 = new User(_local3, _local4); _local10.setModerator(_local5); _local10.setIsSpectator(_local6); _local10.setPlayerId(_local7); _local9.addUser(_local10, _local3); if (_arg1.body.u.vars.toString().length > 0){ populateVariables(_local10.getVariables(), _arg1.body.u); }; _local11 = {}; _local11.roomId = _local2; _local11.user = _local10; _local12 = new SFSEvent(SFSEvent.onUserEnterRoom, _local11); sfs.dispatchEvent(_local12); } public function handleUserVarsUpdate(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:User; var _local5:Array; var _local6:Object; var _local7:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.user.@id); _local4 = sfs.getRoom(_local2).getUser(_local3); _local5 = []; if (_arg1.body.vars.toString().length > 0){ populateVariables(_local4.getVariables(), _arg1.body, _local5); }; _local6 = {}; _local6.user = _local4; _local6.changedVars = _local5; _local7 = new SFSEvent(SFSEvent.onUserVariablesUpdate, _local6); sfs.dispatchEvent(_local7); } public function handleUserLeaverRoom(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:Room; var _local5:String; var _local6:Object; var _local7:SFSEvent; _local2 = int(_arg1.body.user.@id); _local3 = int(_arg1.body.@r); _local4 = sfs.getRoom(_local3); _local5 = _local4.getUser(_local2).getName(); _local4.removeUser(_local2); _local6 = {}; _local6.roomId = _local3; _local6.userId = _local2; _local6.userName = _local5; _local7 = new SFSEvent(SFSEvent.onUserLeaveRoom, _local6); sfs.dispatchEvent(_local7); } public function handlePrivateMessage(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:User; var _local6:Object; var _local7:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.user.@id); _local4 = _arg1.body.txt; _local5 = sfs.getRoom(_local2).getUser(_local3); _local6 = {}; _local6.message = Entities.decodeEntities(_local4); _local6.sender = _local5; _local6.roomId = _local2; _local6.userId = _local3; _local7 = new SFSEvent(SFSEvent.onPrivateMessage, _local6); sfs.dispatchEvent(_local7); } private function handleCreateRoomError(_arg1:Object):void{ var _local2:String; var _local3:Object; var _local4:SFSEvent; _local2 = _arg1.body.room.@e; _local3 = {}; _local3.error = _local2; _local4 = new SFSEvent(SFSEvent.onCreateRoomError, _local3); sfs.dispatchEvent(_local4); } private function handleBuddyRoom(_arg1:Object):void{ var _local2:String; var _local3:Array; var _local4:int; var _local5:Object; var _local6:SFSEvent; _local2 = _arg1.body.br.@r; _local3 = _local2.split(","); _local4 = 0; while (_local4 < _local3.length) { _local3[_local4] = int(_local3[_local4]); _local4++; }; _local5 = {}; _local5.idList = _local3; _local6 = new SFSEvent(SFSEvent.onBuddyRoom, _local5); sfs.dispatchEvent(_local6); } private function handleBuddyListUpdate(_arg1:Object):void{ var _local2:Object; var _local3:SFSEvent; var _local4:Object; var _local5:XMLList; var _local6:Object; var _local7:Boolean; var _local8:String; var _local9:XML; _local2 = {}; _local3 = null; if (_arg1.body.b != null){ _local4 = {}; _local4.isOnline = ((_arg1.body.b.@s == "1")) ? true : false; _local4.name = _arg1.body.b.n.toString(); _local4.id = _arg1.body.b.@i; _local4.variables = {}; _local5 = _arg1.body.b.vs; if (_local5.toString().length > 0){ for each (_local9 in _local5.v) { _local4.variables[_local9.@n.toString()] = _local9.v.toString(); }; }; _local6 = null; _local7 = false; for (_local8 in sfs.buddyList) { _local6 = sfs.buddyList[_local8]; if (_local6.name == _local4.name){ sfs.buddyList[_local8] = _local4; _local7 = true; break; }; }; _local2.buddy = _local4; _local3 = new SFSEvent(SFSEvent.onBuddyListUpdate, _local2); sfs.dispatchEvent(_local3); } else { _local2.error = _arg1.body.err.toString(); _local3 = new SFSEvent(SFSEvent.onBuddyListError, _local2); sfs.dispatchEvent(_local3); }; } public function handleUserCountChange(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:Room; var _local6:Object; var _local7:SFSEvent; _local2 = int(_arg1.body.@u); _local3 = int(_arg1.body.@s); _local4 = int(_arg1.body.@r); _local5 = sfs.getAllRooms()[_local4]; if (_local5 != null){ _local5.setUserCount(_local2); _local5.setSpectatorCount(_local3); _local6 = {}; _local6.room = _local5; _local7 = new SFSEvent(SFSEvent.onUserCountChange, _local6); sfs.dispatchEvent(_local7); }; } private function handleRandomKey(_arg1:Object):void{ var _local2:String; var _local3:Object; var _local4:SFSEvent; _local2 = _arg1.body.k.toString(); _local3 = {}; _local3.key = _local2; _local4 = new SFSEvent(SFSEvent.onRandomKey, _local3); sfs.dispatchEvent(_local4); } public function handlePublicMessage(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:User; var _local6:Object; var _local7:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.user.@id); _local4 = _arg1.body.txt; _local5 = sfs.getRoom(_local2).getUser(_local3); _local6 = {}; _local6.message = Entities.decodeEntities(_local4); _local6.sender = _local5; _local6.roomId = _local2; _local7 = new SFSEvent(SFSEvent.onPublicMessage, _local6); sfs.dispatchEvent(_local7); } public function handleAdminMessage(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:Object; var _local6:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.user.@id); _local4 = _arg1.body.txt; _local5 = {}; _local5.message = Entities.decodeEntities(_local4); _local6 = new SFSEvent(SFSEvent.onAdminMessage, _local5); sfs.dispatchEvent(_local6); } public function dispatchDisconnection():void{ var _local1:SFSEvent; _local1 = new SFSEvent(SFSEvent.onConnectionLost, null); sfs.dispatchEvent(_local1); } private function handleSpectatorSwitched(_arg1:Object):void{ var _local2:int; var _local3:Object; var _local4:SFSEvent; _local2 = int(_arg1.body.rm.@id); sfs.playerId = int(_arg1.body.pid.@id); _local3 = {}; _local3.success = (sfs.playerId > 0); _local3.newId = sfs.playerId; _local3.room = sfs.getRoom(_local2); _local4 = new SFSEvent(SFSEvent.onSpectatorSwitched, _local3); sfs.dispatchEvent(_local4); } public function handleLoginOk(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:Object; var _local6:SFSEvent; _local2 = int(_arg1.body.login.@id); _local3 = int(_arg1.body.login.@mod); _local4 = _arg1.body.login.@n; sfs.amIModerator = (_local3 == 1); sfs.myUserId = _local2; sfs.myUserName = _local4; sfs.playerId = -1; _local5 = {}; _local5.success = true; _local5.name = _local4; _local5.error = ""; _local6 = new SFSEvent(SFSEvent.onLogin, _local5); sfs.dispatchEvent(_local6); sfs.getRoomList(); } public function handleRoomVarsUpdate(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:Room; var _local5:Array; var _local6:Object; var _local7:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.user.@id); _local4 = sfs.getRoom(_local2); _local5 = []; if (_arg1.body.vars.toString().length > 0){ populateVariables(_local4.getVariables(), _arg1.body, _local5); }; _local6 = {}; _local6.room = _local4; _local6.changedVars = _local5; _local7 = new SFSEvent(SFSEvent.onRoomVariablesUpdate, _local6); sfs.dispatchEvent(_local7); } public function handleRoomList(_arg1:Object):void{ var _local2:Array; var _local3:XML; var _local4:Object; var _local5:SFSEvent; var _local6:int; var _local7:Room; _local2 = sfs.getAllRooms(); for each (_local3 in _arg1.body.rmList.rm) { _local6 = int(_local3.@id); _local7 = new Room(_local6, _local3.n, int(_local3.@maxu), int(_local3.@maxs), (_local3.@temp == "1"), (_local3.@game == "1"), (_local3.@priv == "1"), (_local3.@lmb == "1"), int(_local3.@ucnt), int(_local3.@scnt)); if (_local3.vars.toString().length > 0){ populateVariables(_local7.getVariables(), _local3); }; _local2[_local6] = _local7; }; _local4 = {}; _local4.roomList = _local2; _local5 = new SFSEvent(SFSEvent.onRoomListUpdate, _local4); sfs.dispatchEvent(_local5); } private function handleBuddyAdded(_arg1:Object):void{ var _local2:Object; var _local3:XMLList; var _local4:Object; var _local5:SFSEvent; var _local6:XML; _local2 = {}; _local2.isOnline = ((_arg1.body.b.@s == "1")) ? true : false; _local2.name = _arg1.body.b.n.toString(); _local2.id = _arg1.body.b.@i; _local2.variables = {}; _local3 = _arg1.body.b.vs; if (_local3.toString().length > 0){ for each (_local6 in _local3.v) { _local2.variables[_local6.@n.toString()] = _local6.v.toString(); }; }; sfs.buddyList.push(_local2); _local4 = {}; _local4.list = sfs.buddyList; _local5 = new SFSEvent(SFSEvent.onBuddyList, _local4); sfs.dispatchEvent(_local5); } private function handleRoomAdded(_arg1:Object):void{ var _local2:int; var _local3:String; var _local4:int; var _local5:int; var _local6:Boolean; var _local7:Boolean; var _local8:Boolean; var _local9:Boolean; var _local10:Room; var _local11:Array; var _local12:Object; var _local13:SFSEvent; _local2 = int(_arg1.body.rm.@id); _local3 = _arg1.body.rm.name; _local4 = int(_arg1.body.rm.@max); _local5 = int(_arg1.body.rm.@spec); _local6 = ((_arg1.body.rm.@temp == "1")) ? true : false; _local7 = ((_arg1.body.rm.@game == "1")) ? true : false; _local8 = ((_arg1.body.rm.@priv == "1")) ? true : false; _local9 = ((_arg1.body.rm.@limbo == "1")) ? true : false; _local10 = new Room(_local2, _local3, _local4, _local5, _local6, _local7, _local8, _local9); _local11 = sfs.getAllRooms(); _local11[_local2] = _local10; if (_arg1.body.rm.vars.toString().length > 0){ populateVariables(_local10.getVariables(), _arg1.body.rm); }; _local12 = {}; _local12.room = _local10; _local13 = new SFSEvent(SFSEvent.onRoomAdded, _local12); sfs.dispatchEvent(_local13); } private function populateVariables(_arg1:Array, _arg2:Object, _arg3:Array=null):void{ var _local4:XML; var _local5:String; var _local6:String; var _local7:String; for each (_local4 in _arg2.vars["var"]) { _local5 = _local4.@n; _local6 = _local4.@t; _local7 = _local4; if (_arg3 != null){ _arg3.push(_local5); _arg3[_local5] = true; }; if (_local6 == "b"){ _arg1[_local5] = Boolean(_local7); } else { if (_local6 == "n"){ _arg1[_local5] = Number(_local7); } else { if (_local6 == "s"){ _arg1[_local5] = _local7; } else { if (_local6 == "x"){ delete _arg1[_local5]; }; }; }; }; }; } private function handleLeaveRoom(_arg1:Object):void{ var _local2:int; var _local3:Object; var _local4:SFSEvent; _local2 = int(_arg1.body.rm.@id); _local3 = {}; _local3.roomId = _local2; _local4 = new SFSEvent(SFSEvent.onRoomLeft, _local3); sfs.dispatchEvent(_local4); } public function handleLoginKo(_arg1:Object):void{ var _local2:Object; var _local3:SFSEvent; _local2 = {}; _local2.success = false; _local2.error = _arg1.body.login.@e; _local3 = new SFSEvent(SFSEvent.onLogin, _local2); sfs.dispatchEvent(_local3); } public function handleModMessage(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:User; var _local6:Object; var _local7:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.user.@id); _local4 = _arg1.body.txt; _local5 = sfs.getRoom(_local2).getUser(_local3); _local6 = {}; _local6.message = Entities.decodeEntities(_local4); _local6.sender = _local5; _local7 = new SFSEvent(SFSEvent.onModeratorMessage, _local6); sfs.dispatchEvent(_local7); } public function handleApiOK(_arg1:Object):void{ var _local2:SFSEvent; sfs.isConnected = true; _local2 = new SFSEvent(SFSEvent.onConnection, {success:true}); sfs.dispatchEvent(_local2); } private function handleRoundTripBench(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:Object; var _local5:SFSEvent; _local2 = getTimer(); _local3 = (_local2 - sfs.getBenchStartTime()); _local4 = {}; _local4.elapsed = _local3; _local5 = new SFSEvent(SFSEvent.onRoundTripResponse, _local4); sfs.dispatchEvent(_local5); } public function handleJoinOk(_arg1:Object):void{ var _local2:int; var _local3:XMLList; var _local4:XMLList; var _local5:int; var _local6:Room; var _local7:XML; var _local8:Object; var _local9:SFSEvent; var _local10:String; var _local11:int; var _local12:Boolean; var _local13:Boolean; var _local14:int; var _local15:User; _local2 = int(_arg1.body.@r); _local3 = _arg1.body; _local4 = _arg1.body.uLs.u; _local5 = int(_arg1.body.pid.@id); sfs.activeRoomId = _local2; _local6 = sfs.getRoom(_local2); sfs.playerId = _local5; _local6.setMyPlayerIndex(_local5); if (_local3.vars.toString().length > 0){ _local6.clearVariables(); populateVariables(_local6.getVariables(), _local3); }; for each (_local7 in _local4) { _local10 = _local7.n; _local11 = int(_local7.@i); _local12 = ((_local7.@m == "1")) ? true : false; _local13 = ((_local7.@s == "1")) ? true : false; _local14 = ((_local7.p == undefined)) ? -1 : int(_local7.p); _local15 = new User(_local11, _local10); _local15.setModerator(_local12); _local15.setIsSpectator(_local13); _local15.setPlayerId(_local14); if (_local7.vars.toString().length > 0){ populateVariables(_local15.getVariables(), _local7); }; _local6.addUser(_local15, _local11); }; sfs.changingRoom = false; _local8 = {}; _local8.room = _local6; _local9 = new SFSEvent(SFSEvent.onJoinRoom, _local8); sfs.dispatchEvent(_local9); } public function handleJoinKo(_arg1:Object):void{ var _local2:Object; var _local3:SFSEvent; sfs.changingRoom = false; _local2 = {}; _local2.error = _arg1.body.error.@msg; _local3 = new SFSEvent(SFSEvent.onJoinRoomError, _local2); sfs.dispatchEvent(_local3); } public function handleASObject(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:User; var _local6:Object; var _local7:Object; var _local8:SFSEvent; _local2 = int(_arg1.body.@r); _local3 = int(_arg1.body.user.@id); _local4 = _arg1.body.dataObj; _local5 = sfs.getRoom(_local2).getUser(_local3); _local6 = ObjectSerializer.getInstance().deserialize(new XML(_local4)); _local7 = {}; _local7.obj = _local6; _local7.sender = _local5; _local8 = new SFSEvent(SFSEvent.onObjectReceived, _local7); sfs.dispatchEvent(_local8); } private function handleBuddyList(_arg1:Object):void{ var _local2:XMLList; var _local3:Object; var _local4:Object; var _local5:SFSEvent; var _local6:XML; var _local7:XMLList; var _local8:XML; _local2 = _arg1.body.bList; _local4 = {}; _local5 = null; if (((!((_local2 == null))) && (!((_local2.b.length == null))))){ if (_local2.toString().length > 0){ for each (_local6 in _local2.b) { _local3 = {}; _local3.isOnline = ((_local6.@s == "1")) ? true : false; _local3.name = _local6.n.toString(); _local3.id = _local6.@i; _local3.variables = {}; _local7 = _local6.vs; if (_local7.toString().length > 0){ for each (_local8 in _local7.v) { _local3.variables[_local8.@n.toString()] = _local8.v.toString(); }; }; sfs.buddyList.push(_local3); }; }; _local4.list = sfs.buddyList; _local5 = new SFSEvent(SFSEvent.onBuddyList, _local4); sfs.dispatchEvent(_local5); } else { _local4.error = _arg1.body.err.toString(); _local5 = new SFSEvent(SFSEvent.onBuddyListError, _local4); sfs.dispatchEvent(_local5); }; } public function handleApiKO(_arg1:Object):void{ var _local2:Object; var _local3:SFSEvent; _local2 = {}; _local2.success = false; _local2.error = "API are obsolete, please upgrade"; _local3 = new SFSEvent(SFSEvent.onConnection, _local2); sfs.dispatchEvent(_local3); } } }//package it.gotoandplay.smartfoxserver.handlers
Section 50
//JSON (it.gotoandplay.smartfoxserver.json.JSON) package it.gotoandplay.smartfoxserver.json { public class JSON { public static function decode(_arg1:String):Object{ var _local2:JSONDecoder; _local2 = new JSONDecoder(_arg1); return (_local2.getObject()); } public static function encode(_arg1:Object):String{ var _local2:JSONEncoder; _local2 = new JSONEncoder(_arg1); return (_local2.getString()); } } }//package it.gotoandplay.smartfoxserver.json
Section 51
//JSONDecoder (it.gotoandplay.smartfoxserver.json.JSONDecoder) package it.gotoandplay.smartfoxserver.json { public class JSONDecoder { private var tokenizer:JSONTokenizer; private var token:JSONToken; private var obj:Object; public function JSONDecoder(_arg1:String){ tokenizer = new JSONTokenizer(_arg1); nextToken(); obj = parseValue(); } private function parseValue():Object{ switch (token.type){ case JSONTokenType.LEFT_BRACE: return (parseObject()); case JSONTokenType.LEFT_BRACKET: return (parseArray()); case JSONTokenType.STRING: case JSONTokenType.NUMBER: case JSONTokenType.TRUE: case JSONTokenType.FALSE: case JSONTokenType.NULL: return (token.value); default: tokenizer.parseError(("Unexpected " + token.value)); }; return (null); } private function nextToken():JSONToken{ return ((token = tokenizer.getNextToken())); } private function parseObject():Object{ var _local1:Object; var _local2:String; _local1 = new Object(); nextToken(); if (token.type == JSONTokenType.RIGHT_BRACE){ return (_local1); }; while (true) { if (token.type == JSONTokenType.STRING){ _local2 = String(token.value); nextToken(); if (token.type == JSONTokenType.COLON){ nextToken(); _local1[_local2] = parseValue(); nextToken(); if (token.type == JSONTokenType.RIGHT_BRACE){ return (_local1); }; if (token.type == JSONTokenType.COMMA){ nextToken(); } else { tokenizer.parseError(("Expecting } or , but found " + token.value)); }; } else { tokenizer.parseError(("Expecting : but found " + token.value)); }; } else { tokenizer.parseError(("Expecting string but found " + token.value)); }; }; return (null); } private function parseArray():Array{ var _local1:Array; _local1 = new Array(); nextToken(); if (token.type == JSONTokenType.RIGHT_BRACKET){ return (_local1); }; while (true) { _local1.push(parseValue()); nextToken(); if (token.type == JSONTokenType.RIGHT_BRACKET){ return (_local1); }; if (token.type == JSONTokenType.COMMA){ nextToken(); } else { tokenizer.parseError(("Expecting ] or , but found " + token.value)); }; }; return (null); } public function getObject():Object{ return (obj); } } }//package it.gotoandplay.smartfoxserver.json
Section 52
//JSONEncoder (it.gotoandplay.smartfoxserver.json.JSONEncoder) package it.gotoandplay.smartfoxserver.json { public class JSONEncoder { private var jsonString:String; public function JSONEncoder(_arg1:Object){ jsonString = convertToString(_arg1); } private function arrayToString(_arg1:Array):String{ var _local2:String; var _local3:int; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { if (_local2.length > 0){ _local2 = (_local2 + ","); }; _local2 = (_local2 + convertToString(_arg1[_local3])); _local3++; }; return ((("[" + _local2) + "]")); } private function convertToString(_arg1:Object):String{ if ((_arg1 is String)){ return (escapeString((_arg1 as String))); }; if ((_arg1 is Number)){ return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null"); } else { if ((_arg1 is Boolean)){ return ((_arg1) ? "true" : "false"); } else { if ((_arg1 is Array)){ return (arrayToString((_arg1 as Array))); }; if ((((_arg1 is Object)) && (!((_arg1 == null))))){ return (objectToString(_arg1)); }; }; }; return ("null"); } private function escapeString(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:Number; var _local5:int; var _local6:String; var _local7:String; _local2 = ""; _local4 = _arg1.length; _local5 = 0; while (_local5 < _local4) { _local3 = _arg1.charAt(_local5); switch (_local3){ case "\"": _local2 = (_local2 + "\\\""); break; case "\\": _local2 = (_local2 + "\\\\"); break; case "\b": _local2 = (_local2 + "\\b"); break; case "\f": _local2 = (_local2 + "\\f"); break; case "\n": _local2 = (_local2 + "\\n"); break; case "\r": _local2 = (_local2 + "\\r"); break; case "\t": _local2 = (_local2 + "\\t"); break; default: if (_local3 < " "){ _local6 = _local3.charCodeAt(0).toString(16); _local7 = ((_local6.length == 2)) ? "00" : "000"; _local2 = (_local2 + (("\\u" + _local7) + _local6)); } else { _local2 = (_local2 + _local3); }; }; _local5++; }; return ((("\"" + _local2) + "\"")); } private function objectToString(_arg1:Object):String{ var _local2:String; var _local3:Object; var _local4:String; _local2 = ""; for (_local4 in _arg1) { _local3 = _arg1[_local4]; if ((_local3 is Function)){ } else { if (_local2.length > 0){ _local2 = (_local2 + ","); }; _local2 = (_local2 + ((escapeString(_local4) + ":") + convertToString(_local3))); }; }; return ((("{" + _local2) + "}")); } public function getString():String{ return (jsonString); } } }//package it.gotoandplay.smartfoxserver.json
Section 53
//JSONParseError (it.gotoandplay.smartfoxserver.json.JSONParseError) package it.gotoandplay.smartfoxserver.json { public class JSONParseError extends Error { private var _text:String; private var _location:int; public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){ super(_arg1); _location = _arg2; _text = _arg3; } public function get text():String{ return (_text); } public function get location():int{ return (_location); } } }//package it.gotoandplay.smartfoxserver.json
Section 54
//JSONToken (it.gotoandplay.smartfoxserver.json.JSONToken) package it.gotoandplay.smartfoxserver.json { public class JSONToken { private var _value:Object; private var _type:int; public function JSONToken(_arg1:int=-1, _arg2:Object=null){ _type = _arg1; _value = _arg2; } public function set value(_arg1:Object):void{ _value = _arg1; } public function get value():Object{ return (_value); } public function set type(_arg1:int):void{ _type = _arg1; } public function get type():int{ return (_type); } } }//package it.gotoandplay.smartfoxserver.json
Section 55
//JSONTokenizer (it.gotoandplay.smartfoxserver.json.JSONTokenizer) package it.gotoandplay.smartfoxserver.json { public class JSONTokenizer { private var loc:int; private var ch:String; private var obj:Object; private var jsonString:String; public function JSONTokenizer(_arg1:String){ jsonString = _arg1; loc = 0; nextChar(); } private function skipComments():void{ if (ch == "/"){ nextChar(); switch (ch){ case "/": do { nextChar(); } while (((!((ch == "\n"))) && (!((ch == ""))))); nextChar(); break; case "*": nextChar(); while (true) { if (ch == "*"){ nextChar(); if (ch == "/"){ nextChar(); break; }; } else { nextChar(); }; if (ch == ""){ parseError("Multi-line comment not closed"); }; }; break; default: parseError((("Unexpected " + ch) + " encountered (expecting '/' or '*' )")); }; }; } private function isDigit(_arg1:String):Boolean{ return ((((_arg1 >= "0")) && ((_arg1 <= "9")))); } private function readNumber():JSONToken{ var _local1:JSONToken; var _local2:String; var _local3:Number; _local1 = new JSONToken(); _local1.type = JSONTokenType.NUMBER; _local2 = ""; if (ch == "-"){ _local2 = (_local2 + "-"); nextChar(); }; while (isDigit(ch)) { _local2 = (_local2 + ch); nextChar(); }; if (ch == "."){ _local2 = (_local2 + "."); nextChar(); while (isDigit(ch)) { _local2 = (_local2 + ch); nextChar(); }; }; _local3 = Number(_local2); if (isFinite(_local3)){ _local1.value = _local3; return (_local1); }; parseError((("Number " + _local3) + " is not valid!")); return (null); } private function nextChar():String{ return ((ch = jsonString.charAt(loc++))); } private function isHexDigit(_arg1:String):Boolean{ var _local2:String; _local2 = _arg1.toUpperCase(); return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F")))))); } public function getNextToken():JSONToken{ var _local1:JSONToken; var _local2:String; var _local3:String; var _local4:String; _local1 = new JSONToken(); skipIgnored(); switch (ch){ case "{": _local1.type = JSONTokenType.LEFT_BRACE; _local1.value = "{"; nextChar(); break; case "}": _local1.type = JSONTokenType.RIGHT_BRACE; _local1.value = "}"; nextChar(); break; case "[": _local1.type = JSONTokenType.LEFT_BRACKET; _local1.value = "["; nextChar(); break; case "]": _local1.type = JSONTokenType.RIGHT_BRACKET; _local1.value = "]"; nextChar(); break; case ",": _local1.type = JSONTokenType.COMMA; _local1.value = ","; nextChar(); break; case ":": _local1.type = JSONTokenType.COLON; _local1.value = ":"; nextChar(); break; case "t": _local2 = ((("t" + nextChar()) + nextChar()) + nextChar()); if (_local2 == "true"){ _local1.type = JSONTokenType.TRUE; _local1.value = true; nextChar(); } else { parseError(("Expecting 'true' but found " + _local2)); }; break; case "f": _local3 = (((("f" + nextChar()) + nextChar()) + nextChar()) + nextChar()); if (_local3 == "false"){ _local1.type = JSONTokenType.FALSE; _local1.value = false; nextChar(); } else { parseError(("Expecting 'false' but found " + _local3)); }; break; case "n": _local4 = ((("n" + nextChar()) + nextChar()) + nextChar()); if (_local4 == "null"){ _local1.type = JSONTokenType.NULL; _local1.value = null; nextChar(); } else { parseError(("Expecting 'null' but found " + _local4)); }; break; case "\"": _local1 = readString(); break; default: if (((isDigit(ch)) || ((ch == "-")))){ _local1 = readNumber(); } else { if (ch == ""){ return (null); }; parseError((("Unexpected " + ch) + " encountered")); }; }; return (_local1); } private function skipWhite():void{ while (isSpace(ch)) { nextChar(); }; } public function parseError(_arg1:String):void{ throw (new JSONParseError(_arg1, loc, jsonString)); } private function skipIgnored():void{ skipWhite(); skipComments(); skipWhite(); } private function isSpace(_arg1:String):Boolean{ return ((((_arg1 == " ")) || ((_arg1 == "\t")))); } private function readString():JSONToken{ var _local1:JSONToken; var _local2:String; var _local3:String; var _local4:int; _local1 = new JSONToken(); _local1.type = JSONTokenType.STRING; _local2 = ""; nextChar(); while (((!((ch == "\""))) && (!((ch == ""))))) { if (ch == "\\"){ nextChar(); switch (ch){ case "\"": _local2 = (_local2 + "\""); break; case "/": _local2 = (_local2 + "/"); break; case "\\": _local2 = (_local2 + "\\"); break; case "b": _local2 = (_local2 + "\b"); break; case "f": _local2 = (_local2 + "\f"); break; case "n": _local2 = (_local2 + "\n"); break; case "r": _local2 = (_local2 + "\r"); break; case "t": _local2 = (_local2 + "\t"); break; case "u": _local3 = ""; _local4 = 0; while (_local4 < 4) { if (!isHexDigit(nextChar())){ parseError((" Excepted a hex digit, but found: " + ch)); }; _local3 = (_local3 + ch); _local4++; }; _local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16))); break; default: _local2 = (_local2 + ("\\" + ch)); }; } else { _local2 = (_local2 + ch); }; nextChar(); }; if (ch == ""){ parseError("Unterminated string literal"); }; nextChar(); _local1.value = _local2; return (_local1); } } }//package it.gotoandplay.smartfoxserver.json
Section 56
//JSONTokenType (it.gotoandplay.smartfoxserver.json.JSONTokenType) package it.gotoandplay.smartfoxserver.json { public class JSONTokenType { public static const NUMBER:int = 11; public static const FALSE:int = 8; public static const RIGHT_BRACKET:int = 4; public static const NULL:int = 9; public static const TRUE:int = 7; public static const RIGHT_BRACE:int = 2; public static const UNKNOWN:int = -1; public static const COMMA:int = 0; public static const LEFT_BRACKET:int = 3; public static const STRING:int = 10; public static const LEFT_BRACE:int = 1; public static const COLON:int = 6; } }//package it.gotoandplay.smartfoxserver.json
Section 57
//Entities (it.gotoandplay.smartfoxserver.util.Entities) package it.gotoandplay.smartfoxserver.util { public class Entities { private static var hexTable:Array = new Array(); private static var ascTab:Array = []; private static var ascTabRev:Array = []; public static function decodeEntities(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:String; var _local5:String; var _local6:String; var _local7:int; _local7 = 0; _local2 = ""; while (_local7 < _arg1.length) { _local3 = _arg1.charAt(_local7); if (_local3 == "&"){ _local4 = _local3; do { _local7++; _local5 = _arg1.charAt(_local7); _local4 = (_local4 + _local5); } while (_local5 != ";"); _local6 = ascTabRev[_local4]; if (_local6 != null){ _local2 = (_local2 + _local6); } else { _local2 = (_local2 + String.fromCharCode(getCharCode(_local4))); }; } else { _local2 = (_local2 + _local3); }; _local7++; }; trace(((("DECODE: " + _arg1) + ", ") + _local2)); return (_local2); } public static function encodeEntities(_arg1:String):String{ var _local2:String; var _local3:int; var _local4:String; var _local5:int; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1.charAt(_local3); _local5 = _arg1.charCodeAt(_local3); if ((((((_local5 == 9)) || ((_local5 == 10)))) || ((_local5 == 13)))){ _local2 = (_local2 + _local4); } else { if ((((_local5 >= 32)) && ((_local5 <= 126)))){ if (ascTab[_local4] != null){ _local2 = (_local2 + ascTab[_local4]); } else { _local2 = (_local2 + _local4); }; } else { _local2 = (_local2 + _local4); }; }; _local3++; }; return (_local2); } public static function getCharCode(_arg1:String):Number{ var _local2:String; _local2 = _arg1.substr(3, _arg1.length); _local2 = _local2.substr(0, (_local2.length - 1)); return (Number(("0x" + _local2))); } ascTab[">"] = "&gt;"; ascTab["<"] = "&lt;"; ascTab["&"] = "&amp;"; ascTab["'"] = "&apos;"; ascTab["\""] = "&quot;"; ascTabRev["&gt;"] = ">"; ascTabRev["&lt;"] = "<"; ascTabRev["&amp;"] = "&"; ascTabRev["&apos;"] = "'"; ascTabRev["&quot;"] = "\""; hexTable["0"] = 0; hexTable["1"] = 1; hexTable["2"] = 2; hexTable["3"] = 3; hexTable["4"] = 4; hexTable["5"] = 5; hexTable["6"] = 6; hexTable["7"] = 7; hexTable["8"] = 8; hexTable["9"] = 9; hexTable["A"] = 10; hexTable["B"] = 11; hexTable["C"] = 12; hexTable["D"] = 13; hexTable["E"] = 14; hexTable["F"] = 15; } }//package it.gotoandplay.smartfoxserver.util
Section 58
//ObjectSerializer (it.gotoandplay.smartfoxserver.util.ObjectSerializer) package it.gotoandplay.smartfoxserver.util { public class ObjectSerializer { private var eof:String; private var debug:Boolean; private var tabs:String; private static var instance:ObjectSerializer; public function ObjectSerializer(_arg1:Boolean=false){ this.tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t"; setDebug(_arg1); } public function serialize(_arg1:Object):String{ var _local2:Object; _local2 = {}; obj2xml(_arg1, _local2); return (_local2.xmlStr); } private function obj2xml(_arg1:Object, _arg2:Object, _arg3:int=0, _arg4:String=""):void{ var _local5:String; var _local6:String; var _local7:String; var _local8:*; if (_arg3 == 0){ _arg2.xmlStr = ("<dataObj>" + this.eof); } else { if (this.debug){ _arg2.xmlStr = (_arg2.xmlStr + this.tabs.substr(0, _arg3)); }; _local6 = ((_arg1 is Array)) ? "a" : "o"; _arg2.xmlStr = (_arg2.xmlStr + ((((("<obj t='" + _local6) + "' o='") + _arg4) + "'>") + this.eof)); }; for (_local5 in _arg1) { _local7 = typeof(_arg1[_local5]); _local8 = _arg1[_local5]; if ((((((((_local7 == "boolean")) || ((_local7 == "number")))) || ((_local7 == "string")))) || ((_local7 == "null")))){ if (_local7 == "boolean"){ _local8 = Number(_local8); } else { if (_local7 == "null"){ _local7 = "x"; _local8 = ""; } else { if (_local7 == "string"){ _local8 = Entities.encodeEntities(_local8); }; }; }; if (this.debug){ _arg2.xmlStr = (_arg2.xmlStr + this.tabs.substr(0, (_arg3 + 1))); }; _arg2.xmlStr = (_arg2.xmlStr + ((((((("<var n='" + _local5) + "' t='") + _local7.substr(0, 1)) + "'>") + _local8) + "</var>") + this.eof)); } else { if (_local7 == "object"){ obj2xml(_local8, _arg2, (_arg3 + 1), _local5); if (this.debug){ _arg2.xmlStr = (_arg2.xmlStr + this.tabs.substr(0, (_arg3 + 1))); }; _arg2.xmlStr = (_arg2.xmlStr + ("</obj>" + this.eof)); }; }; }; if (_arg3 == 0){ _arg2.xmlStr = (_arg2.xmlStr + ("</dataObj>" + this.eof)); }; } private function setDebug(_arg1:Boolean):void{ this.debug = _arg1; if (this.debug){ this.eof = "\n"; } else { this.eof = ""; }; } private function xml2obj(_arg1:XML, _arg2:Object):void{ var _local3:int; var _local4:XMLList; var _local5:String; var _local6:XML; var _local7:String; var _local8:String; var _local9:String; var _local10:String; var _local11:String; _local3 = 0; _local4 = _arg1.children(); for each (_local6 in _local4) { _local5 = _local6.name().toString(); if (_local5 == "obj"){ _local7 = _local6.@o; _local8 = _local6.@t; if (_local8 == "a"){ _arg2[_local7] = []; } else { if (_local8 == "o"){ _arg2[_local7] = {}; }; }; xml2obj(_local6, _arg2[_local7]); } else { if (_local5 == "var"){ _local9 = _local6.@n; _local10 = _local6.@t; _local11 = _local6.toString(); if (_local10 == "b"){ _arg2[_local9] = ((_local11 == "0")) ? false : true; } else { if (_local10 == "n"){ _arg2[_local9] = Number(_local11); } else { if (_local10 == "s"){ _arg2[_local9] = _local11; } else { if (_local10 == "x"){ _arg2[_local9] = null; }; }; }; }; }; }; }; } private function encodeEntities(_arg1:String):String{ return (_arg1); } public function deserialize(_arg1:String):Object{ var _local2:XML; var _local3:Object; _local2 = new XML(_arg1); _local3 = {}; xml2obj(_local2, _local3); return (_local3); } public static function getInstance(_arg1:Boolean=false):ObjectSerializer{ if (instance == null){ instance = new ObjectSerializer(_arg1); }; return (instance); } } }//package it.gotoandplay.smartfoxserver.util
Section 59
//SFSEvent (it.gotoandplay.smartfoxserver.SFSEvent) package it.gotoandplay.smartfoxserver { import flash.events.*; public class SFSEvent extends Event { public var params:Object; public static const onRoomLeft:String = "onRoomLeft"; public static const onBuddyListUpdate:String = "onBuddyListUpdate"; public static const onUserLeaveRoom:String = "onUserLeaveRoom"; public static const onRoomListUpdate:String = "onRoomListUpdate"; public static const onRoundTripResponse:String = "onRoundTripResponse"; public static const onExtensionResponse:String = "onExtensionResponse"; public static const onConnection:String = "onConnection"; public static const onBuddyListError:String = "onBuddyListError"; public static const onJoinRoom:String = "onJoinRoom"; public static const onUserEnterRoom:String = "onUserEnterRoom"; public static const onBuddyRoom:String = "onBuddyRoom"; public static const onAdminMessage:String = "onAdminMessage"; public static const onPublicMessage:String = "onPublicMessage"; public static const onModeratorMessage:String = "onModMessage"; public static const onPrivateMessage:String = "onPrivateMessage"; public static const onJoinRoomError:String = "onJoinRoomError"; public static const onRoomAdded:String = "onRoomAdded"; public static const onLogin:String = "onLogin"; public static const onSpectatorSwitched:String = "onSpectatorSwitched"; public static const onRoomDeleted:String = "onRoomDeleted"; public static const onConnectionLost:String = "onConnectionLost"; public static const onBuddyList:String = "onBuddyList"; public static const onRoomVariablesUpdate:String = "onRoomVariablesUpdate"; public static const onCreateRoomError:String = "onCreateRoomError"; public static const onUserCountChange:String = "onUserCountChange"; public static const onUserVariablesUpdate:String = "onUserVariablesUpdate"; public static const onRandomKey:String = "onRandomKey"; public static const onObjectReceived:String = "onObjectReceived"; public function SFSEvent(_arg1:String, _arg2:Object){ super(_arg1); this.params = _arg2; } override public function toString():String{ return (formatToString("SFSEvent", "type", "bubbles", "cancelable", "eventPhase", "params")); } override public function clone():Event{ return (new SFSEvent(this.type, this.params)); } } }//package it.gotoandplay.smartfoxserver
Section 60
//SmartFoxClient (it.gotoandplay.smartfoxserver.SmartFoxClient) package it.gotoandplay.smartfoxserver { import flash.events.*; import it.gotoandplay.smartfoxserver.handlers.*; import it.gotoandplay.smartfoxserver.data.*; import it.gotoandplay.smartfoxserver.util.*; import flash.utils.*; import it.gotoandplay.smartfoxserver.json.*; import flash.net.*; public class SmartFoxClient extends EventDispatcher { private var connected:Boolean; private var benchStartTime:int; public var myUserId:int; private var roomList:Array; private var minVersion:Number; public var buddyVars:Array; public var debug:Boolean; private var byteBuffer:ByteArray; private var subVersion:Number; public var buddyList:Array; private var messageHandlers:Array; private var majVersion:Number; private var socketConnection:Socket; private var sysHandler:SysHandler; public var myUserName:String; public var playerId:int; public var amIModerator:Boolean; public var changingRoom:Boolean; private var extHandler:ExtHandler; public var activeRoomId:int; private static const EOM:int = 0; private static const MSG_JSON:String = "{"; public static const XTMSG_TYPE_STR:String = "str"; public static const MODMSG_TO_USER:String = "u"; public static const MODMSG_TO_ZONE:String = "z"; private static const MSG_STR:String = "%"; private static const MSG_XML:String = "<"; public static const XTMSG_TYPE_JSON:String = "json"; public static const XTMSG_TYPE_XML:String = "xml"; public static const MODMSG_TO_ROOM:String = "r"; public function SmartFoxClient(_arg1:Boolean=false){ this.majVersion = 1; this.minVersion = 3; this.subVersion = 4; this.activeRoomId = -1; this.debug = _arg1; this.messageHandlers = []; setupMessageHandlers(); socketConnection = new Socket(); socketConnection.addEventListener(Event.CONNECT, handleSocketConnection); socketConnection.addEventListener(Event.CLOSE, handleSocketDisconnection); socketConnection.addEventListener(ErrorEvent.ERROR, handleSocketError); socketConnection.addEventListener(IOErrorEvent.IO_ERROR, handleIOError); socketConnection.addEventListener(ProgressEvent.SOCKET_DATA, handleSocketData); socketConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleSecurityError); byteBuffer = new ByteArray(); } private function getXmlUserVariable(_arg1:Object):String{ var _local2:String; var _local3:*; var _local4:String; var _local5:String; var _local6:String; _local2 = "<vars>"; for (_local6 in _arg1) { _local3 = _arg1[_local6]; _local5 = typeof(_local3); if (_local5 == "boolean"){ _local4 = "b"; _local3 = (_local3) ? "1" : "0"; } else { if (_local5 == "number"){ _local4 = "n"; } else { if (_local5 == "string"){ _local4 = "s"; } else { if (_local5 == "null"){ _local4 = "x"; }; }; }; }; if (_local4 != null){ _local2 = (_local2 + (((((("<var n='" + _local6) + "' t='") + _local4) + "'><![CDATA[") + _local3) + "]]></var>")); }; }; _local2 = (_local2 + "</vars>"); return (_local2); } private function checkBuddyDuplicates(_arg1:String):Boolean{ var _local2:Boolean; var _local3:Object; _local2 = false; for each (_local3 in buddyList) { if (_local3.name == _arg1){ _local2 = true; break; }; }; return (_local2); } public function getBuddyRoom(_arg1:Object):void{ if (_arg1.id != -1){ send({t:"sys", bid:_arg1.id}, "roomB", -1, (("<b id='" + _arg1.id) + "' />")); }; } private function handleSocketData(_arg1:Event):void{ var _local2:int; var _local3:int; _local2 = socketConnection.bytesAvailable; while (--_local2 >= 0) { _local3 = socketConnection.readByte(); if (_local3 != 0){ byteBuffer.writeByte(_local3); } else { handleMessage(byteBuffer.toString()); byteBuffer = new ByteArray(); }; }; } private function handleSocketError(_arg1:Event):void{ trace("SOCKET ERROR!!!"); } private function getXmlRoomVariable(_arg1:Object):String{ var _local2:String; var _local3:*; var _local4:String; var _local5:String; var _local6:String; _local2 = _arg1.name.toString(); _local3 = _arg1.val.toString(); _local4 = (_arg1.priv) ? "1" : "0"; _local5 = (_arg1.persistent) ? "1" : "0"; _local6 = null; if (typeof(_local3) == "boolean"){ _local6 = "b"; _local3 = (_local3) ? "1" : "0"; } else { if (typeof(_local3) == "number"){ _local6 = "n"; } else { if (typeof(_local3) == "string"){ _local6 = "s"; } else { if (typeof(_local3) == "null"){ _local6 = "x"; }; }; }; }; if (_local6 != null){ return ((((((((((("<var n='" + _local2) + "' t='") + _local6) + "' pr='") + _local4) + "' pe='") + _local5) + "'><![CDATA[") + _local3) + "]]></var>")); }; return (""); } private function handleSocketDisconnection(_arg1:Event):void{ var _local2:SFSEvent; initialize(); _local2 = new SFSEvent(SFSEvent.onConnectionLost, {}); dispatchEvent(_local2); } private function xmlReceived(_arg1:String):void{ var _local2:XML; var _local3:String; var _local4:String; var _local5:int; var _local6:IMessageHandler; _local2 = new XML(_arg1); _local3 = _local2.@t; _local4 = _local2.body.@action; _local5 = _local2.body.@r; _local6 = messageHandlers[_local3]; if (_local6 != null){ _local6.handleMessage(_local2, XTMSG_TYPE_XML); }; } public function switchSpectator(_arg1:int=-1):void{ if (_arg1 == -1){ _arg1 = activeRoomId; }; send({t:"sys"}, "swSpec", _arg1, ""); } public function roundTripBench():void{ this.benchStartTime = getTimer(); send({t:"sys"}, "roundTrip", activeRoomId, ""); } public function joinRoom(_arg1, _arg2:String="", _arg3:Boolean=false, _arg4:Boolean=false, _arg5:int=-1):void{ var _local6:int; var _local7:int; var _local8:Room; var _local9:Object; var _local10:String; var _local11:int; var _local12:String; _local6 = -1; _local7 = (_arg3) ? 1 : 0; if (!this.changingRoom){ if (typeof(_arg1) == "number"){ _local6 = int(_arg1); } else { if (typeof(_arg1) == "string"){ for each (_local8 in roomList) { if (_local8.getName() == _arg1){ _local6 = _local8.getId(); break; }; }; }; }; if (_local6 != -1){ _local9 = {t:"sys"}; _local10 = (_arg4) ? "0" : "1"; _local11 = ((_arg5 > -1)) ? _arg5 : activeRoomId; if (activeRoomId == -1){ _local10 = "0"; _local11 = -1; }; _local12 = (((((((((("<room id='" + _local6) + "' pwd='") + _arg2) + "' spec='") + _local7) + "' leave='") + _local10) + "' old='") + _local11) + "' />"); send(_local9, "joinRoom", activeRoomId, _local12); changingRoom = true; } else { trace("SmartFoxError: requested room to join does not exist!"); }; }; } public function getActiveRoom():Room{ return (roomList[activeRoomId]); } private function makeXmlHeader(_arg1:Object):String{ var _local2:String; var _local3:String; _local2 = "<msg"; for (_local3 in _arg1) { _local2 = (_local2 + ((((" " + _local3) + "='") + _arg1[_local3]) + "'")); }; _local2 = (_local2 + ">"); return (_local2); } private function strReceived(_arg1:String):void{ var _local2:Array; var _local3:String; var _local4:IMessageHandler; _local2 = _arg1.substr(1, (_arg1.length - 2)).split(MSG_STR); _local3 = _local2[0]; _local4 = messageHandlers[_local3]; if (_local4 != null){ _local4.handleMessage(_local2.splice(1, (_local2.length - 1)), XTMSG_TYPE_STR); }; } public function getRoomByName(_arg1:String):Room{ var _local2:Room; var _local3:Room; _local2 = null; for each (_local3 in roomList) { if (_local3.getName() == _arg1){ _local2 = _local3; break; }; }; return (_local2); } public function loadBuddyList():void{ send({t:"sys"}, "loadB", -1, ""); } public function leaveRoom(_arg1:int):void{ var _local2:Object; var _local3:String; _local2 = {t:"sys"}; _local3 = (("<rm id='" + _arg1) + "' />"); send(_local2, "leaveRoom", _arg1, _local3); } private function addMessageHandler(_arg1:String, _arg2:IMessageHandler):void{ if (this.messageHandlers[_arg1] == null){ this.messageHandlers[_arg1] = _arg2; } else { trace((("Warning, message handler called: " + _arg1) + " already exist!")); }; } public function getAllRooms():Array{ return (roomList); } public function setBuddyVariables(_arg1:Array):void{ var _local2:Object; var _local3:String; var _local4:String; var _local5:String; _local2 = {t:"sys"}; _local3 = "<vars>"; for (_local4 in _arg1) { _local5 = _arg1[_local4]; if (buddyVars[_local4] != _local5){ buddyVars[_local4] = _local5; _local3 = (_local3 + (((("<var n='" + _local4) + "'><![CDATA[") + _local5) + "]]></var>")); }; }; _local3 = (_local3 + "</vars>"); this.send(_local2, "setBvars", -1, _local3); } public function getRoom(_arg1:int):Room{ return (roomList[_arg1]); } private function handleSecurityError(_arg1:Event):void{ trace("SECURITY ERROR!!!"); } private function handleIOError(_arg1:Event):void{ var _local2:SFSEvent; var _local3:Object; if (!connected){ _local3 = {}; _local3.success = false; _local3.error = "I/O Error"; _local2 = new SFSEvent(SFSEvent.onConnection, _local3); dispatchEvent(_local2); } else { trace("I/O Error during connected session"); }; } private function setupMessageHandlers():void{ sysHandler = new SysHandler(this); extHandler = new ExtHandler(this); addMessageHandler("sys", sysHandler); addMessageHandler("xt", extHandler); } public function login(_arg1:String, _arg2:String, _arg3:String):void{ var _local4:Object; var _local5:String; _local4 = {t:"sys"}; _local5 = (((((("<login z='" + _arg1) + "'><nick><![CDATA[") + _arg2) + "]]></nick><pword><![CDATA[") + _arg3) + "]]></pword></login>"); send(_local4, "login", 0, _local5); } public function autoJoin():void{ var _local1:Object; _local1 = {t:"sys"}; this.send(_local1, "autoJoin", (this.activeRoomId) ? this.activeRoomId : -1, ""); } private function send(_arg1:Object, _arg2:String, _arg3:Number, _arg4:String):void{ var _local5:String; _local5 = makeXmlHeader(_arg1); _local5 = (_local5 + ((((((("<body action='" + _arg2) + "' r='") + _arg3) + "'>") + _arg4) + "</body>") + closeHeader())); if (this.debug){ trace((("[Sending]: " + _local5) + "\n")); }; writeToSocket(_local5); } public function getRoomList():void{ var _local1:Object; _local1 = {t:"sys"}; send(_local1, "getRmList", activeRoomId, ""); } private function initialize():void{ this.changingRoom = false; this.amIModerator = false; this.playerId = -1; this.connected = false; this.roomList = []; this.buddyList = []; this.buddyVars = []; } public function setRoomVariables(_arg1:Array, _arg2:int=-1, _arg3:Boolean=true):void{ var _local4:Object; var _local5:String; var _local6:Object; if (_arg2 == -1){ _arg2 = activeRoomId; }; _local4 = {t:"sys"}; if (_arg3){ _local5 = "<vars>"; } else { _local5 = "<vars so='0'>"; }; for each (_local6 in _arg1) { _local5 = (_local5 + getXmlRoomVariable(_local6)); }; _local5 = (_local5 + "</vars>"); send(_local4, "setRvars", _arg2, _local5); } public function disconnect():void{ socketConnection.close(); connected = false; sysHandler.dispatchDisconnection(); } public function sendJson(_arg1:String):void{ if (this.debug){ trace((("[Sending - JSON]: " + _arg1) + "\n")); }; writeToSocket(_arg1); } private function closeHeader():String{ return ("</msg>"); } public function getVersion():String{ return (((((this.majVersion + ".") + this.minVersion) + ".") + this.subVersion)); } public function setUserVariables(_arg1:Object, _arg2:int=-1):void{ var _local3:Object; var _local4:Room; var _local5:User; var _local6:String; if (_arg2 == -1){ _arg2 = activeRoomId; }; _local3 = {t:"sys"}; _local4 = getActiveRoom(); _local5 = _local4.getUser(myUserId); _local6 = getXmlUserVariable(_arg1); send(_local3, "setUvars", _arg2, _local6); } public function addBuddy(_arg1:String):void{ var _local2:String; if (((!((_arg1 == myUserName))) && (!(checkBuddyDuplicates(_arg1))))){ _local2 = (("<n>" + _arg1) + "</n>"); send({t:"sys"}, "addB", -1, _local2); }; } public function sendPrivateMessage(_arg1:String, _arg2:int, _arg3:int=-1):void{ var _local4:Object; var _local5:String; if (_arg3 == -1){ _arg3 = activeRoomId; }; _local4 = {t:"sys"}; _local5 = (((("<txt rcp='" + _arg2) + "'><![CDATA[") + Entities.encodeEntities(_arg1)) + "]]></txt>"); send(_local4, "prvMsg", _arg3, _local5); } public function sendPublicMessage(_arg1:String, _arg2:int=-1):void{ var _local3:Object; var _local4:String; if (_arg2 == -1){ _arg2 = activeRoomId; }; _local3 = {t:"sys"}; _local4 = (("<txt><![CDATA[" + Entities.encodeEntities(_arg1)) + "]]></txt>"); send(_local3, "pubMsg", _arg2, _local4); } public function clearBuddyList():void{ var _local1:Object; var _local2:SFSEvent; buddyList = []; send({t:"sys"}, "clearB", -1, ""); _local1 = {}; _local1.list = buddyList; _local2 = new SFSEvent(SFSEvent.onBuddyList, _local1); dispatchEvent(_local2); } public function sendString(_arg1:String):void{ if (this.debug){ trace((("[Sending - STR]: " + _arg1) + "\n")); }; writeToSocket(_arg1); } public function removeBuddy(_arg1:String):void{ var _local2:Boolean; var _local3:Object; var _local4:String; var _local5:Object; var _local6:String; var _local7:Object; var _local8:SFSEvent; _local2 = false; for (_local4 in buddyList) { _local3 = buddyList[_local4]; if (_local3.name == _arg1){ delete buddyList[_local4]; _local2 = true; break; }; }; if (_local2){ _local5 = {t:"sys"}; _local6 = (("<n>" + _arg1) + "</n>"); send(_local5, "remB", -1, _local6); _local7 = {}; _local7.list = buddyList; _local8 = new SFSEvent(SFSEvent.onBuddyList, _local7); dispatchEvent(_local8); }; } private function handleMessage(_arg1:String):void{ var _local2:String; if (this.debug){ trace((((("[ RECEIVED ]: " + _arg1) + ", (len: ") + _arg1.length) + ")")); }; _local2 = _arg1.charAt(0); if (_local2 == MSG_XML){ if ((((_arg1.substr(0, 4) == "<msg")) && (!((_arg1.substr(-6) == "</msg>"))))){ _arg1 = (_arg1 + "</body></msg>"); }; xmlReceived(_arg1); } else { if (_local2 == MSG_STR){ strReceived(_arg1); } else { if (_local2 == MSG_JSON){ jsonReceived(_arg1); }; }; }; } public function sendXtMessage(_arg1:String, _arg2:String, _arg3, _arg4:String="xml", _arg5:int=-1):void{ var _local6:Object; var _local7:Object; var _local8:String; var _local9:String; var _local10:Number; var _local11:Object; var _local12:Object; var _local13:String; if (_arg5 == -1){ _arg5 = activeRoomId; }; if (_arg4 == XTMSG_TYPE_XML){ _local6 = {t:"xt"}; _local7 = {name:_arg1, cmd:_arg2, param:_arg3}; _local8 = (("<![CDATA[" + ObjectSerializer.getInstance().serialize(_local7)) + "]]>"); send(_local6, "xtReq", _arg5, _local8); } else { if (_arg4 == XTMSG_TYPE_STR){ _local9 = (((((("%xt%" + _arg1) + "%") + _arg2) + "%") + _arg5) + "%"); _local10 = 0; while (_local10 < _arg3.length) { _local9 = (_local9 + (_arg3[_local10].toString() + "%")); _local10++; }; sendString(_local9); } else { if (_arg4 == XTMSG_TYPE_JSON){ _local11 = {}; _local11.x = _arg1; _local11.c = _arg2; _local11.r = _arg5; _local11.p = _arg3; _local12 = {}; _local12.t = "xt"; _local12.b = _local11; _local13 = JSON.encode(_local12); sendJson(_local13); }; }; }; } private function writeToSocket(_arg1:String):void{ var _local2:ByteArray; _local2 = new ByteArray(); _local2.writeMultiByte(_arg1, "utf-8"); _local2.writeByte(0); socketConnection.writeBytes(_local2); socketConnection.flush(); } public function sendObjectToGroup(_arg1:Object, _arg2:Array, _arg3:int):void{ var _local4:String; var _local5:String; var _local6:Object; var _local7:String; if (_arg3 == -1){ _arg3 = activeRoomId; }; _local4 = ""; for (_local5 in _arg2) { if (!isNaN(_arg2[_local5])){ _local4 = (_local4 + (_arg2[_local5] + ",")); }; }; _local4 = _local4.substr(0, (_local4.length - 1)); _arg1._$$_ = _local4; _local6 = {t:"sys"}; _local7 = (("<![CDATA[" + ObjectSerializer.getInstance().serialize(_arg1)) + "]]>"); send(_local6, "asObjG", _arg3, _local7); } public function getRandomKey():void{ send({t:"sys"}, "rndK", -1, ""); } public function sendObject(_arg1:Object, _arg2:int=-1):void{ var _local3:String; var _local4:Object; if (_arg2 == -1){ _arg2 = activeRoomId; }; _local3 = (("<![CDATA[" + ObjectSerializer.getInstance().serialize(_arg1)) + "]]>"); _local4 = {t:"sys"}; send(_local4, "asObj", _arg2, _local3); } private function jsonReceived(_arg1:String):void{ var _local2:Object; var _local3:String; var _local4:IMessageHandler; _local2 = JSON.decode(_arg1); _local3 = _local2["t"]; _local4 = messageHandlers[_local3]; if (_local4 != null){ _local4.handleMessage(_local2["b"], XTMSG_TYPE_JSON); }; } public function connect(_arg1:String, _arg2:int):void{ if (!connected){ initialize(); socketConnection.connect(_arg1, _arg2); } else { trace("*** ALREADY CONNECTED ***"); }; } public function sendModeratorMessage(_arg1:String, _arg2:int, _arg3:int=-1):void{ var _local4:Object; var _local5:String; _local4 = {t:"sys"}; _local5 = (((((("<txt t='" + _arg2) + "' id='") + _arg3) + "'><![CDATA[") + Entities.encodeEntities(_arg1)) + "]]></txt>"); send(_local4, "modMsg", activeRoomId, _local5); } public function getBenchStartTime():int{ return (this.benchStartTime); } public function createRoom(_arg1:Object, _arg2:int=-1):void{ var _local3:Object; var _local4:String; var _local5:String; var _local6:String; var _local7:String; var _local8:String; var _local9:String; if (_arg2 == -1){ _arg2 = activeRoomId; }; _local3 = {t:"sys"}; _local4 = (_arg1.isGame) ? "1" : "0"; _local5 = "1"; _local6 = ((_arg1.maxUsers == null)) ? "0" : String(_arg1.maxUsers); _local7 = ((_arg1.maxSpectators == null)) ? "0" : String(_arg1.maxSpectators); if (((_arg1.isGame) && (!((_arg1.exitCurrent == null))))){ _local5 = (_arg1.exitCurrent) ? "1" : "0"; }; _local8 = (((((("<room tmp='1' gam='" + _local4) + "' spec='") + _local7) + "' exit='") + _local5) + "'>"); _local8 = (_local8 + (("<name><![CDATA[" + ((_arg1.name == null)) ? "" : _arg1.name) + "]]></name>")); _local8 = (_local8 + (("<pwd><![CDATA[" + ((_arg1.password == null)) ? "" : _arg1.password) + "]]></pwd>")); _local8 = (_local8 + (("<max>" + _local6) + "</max>")); if (_arg1.uCount != null){ _local8 = (_local8 + (("<uCnt>" + (_arg1.uCount) ? "1" : "0") + "</uCnt>")); }; if (_arg1.extension != null){ _local8 = (_local8 + ("<xt n='" + _arg1.extension.name)); _local8 = (_local8 + (("' s='" + _arg1.extension.script) + "' />")); }; if (_arg1.vars == null){ _local8 = (_local8 + "<vars></vars>"); } else { _local8 = (_local8 + "<vars>"); for (_local9 in _arg1.vars) { _local8 = (_local8 + getXmlRoomVariable(_arg1.vars[_local9])); }; _local8 = (_local8 + "</vars>"); }; _local8 = (_local8 + "</room>"); send(_local3, "createRoom", _arg2, _local8); } private function handleSocketConnection(_arg1:Event):void{ var _local2:Object; var _local3:String; _local2 = {t:"sys"}; _local3 = (((("<ver v='" + this.majVersion.toString()) + this.minVersion.toString()) + this.subVersion.toString()) + "' />"); send(_local2, "verChk", 0, _local3); } public function set isConnected(_arg1:Boolean):void{ this.connected = _arg1; } public function get isConnected():Boolean{ return (this.connected); } } }//package it.gotoandplay.smartfoxserver
Section 61
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "2.0.1.0"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 62
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 63
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexSprite(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 64
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 65
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function set height(_arg1:Number):void; function get scaleY():Number; function move(_arg1:Number, _arg2:Number):void; function get scaleX():Number; function set mask(_arg1:DisplayObject):void; function set scaleX(_arg1:Number):void; function set name(_arg1:String):void; function set scaleY(_arg1:Number):void; function get visible():Boolean; function get measuredWidth():Number; function set visible(_arg1:Boolean):void; function get alpha():Number; function get height():Number; function get width():Number; function get parent():DisplayObjectContainer; function get mask():DisplayObject; function set x(_arg1:Number):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set y(_arg1:Number):void; function get x():Number; function get y():Number; function set alpha(_arg1:Number):void; } }//package mx.core
Section 66
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function get repeaters():Array; function get instanceIndices():Array; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 67
//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 68
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 69
//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject { private var _measuredWidth:Number; private var _measuredHeight:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function SpriteAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 70
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import flash.utils.*; import mx.core.*; public class NameUtil { mx_internal static const VERSION:String = "2.0.1.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local3:DisplayObject; var _local4:String; var _local5:Array; _local3 = _arg1; while (_local3 != null) { if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){ break; }; _local4 = _local3.name; if ((_local3 is IRepeaterClient)){ _local5 = IRepeaterClient(_local3).instanceIndices; if (_local5){ _local4 = (_local4 + (("[" + _local5.join("][")) + "]")); }; }; _local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2); _local3 = _local3.parent; }; return (_local2); } public static function createUniqueName(_arg1:Object):String{ var _local2:String; var _local3:int; var _local4:int; if (!_arg1){ return (null); }; _local2 = getQualifiedClassName(_arg1); _local3 = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; _local4 = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 71
//OCalculationQuadraticEquation (RES.OBJECTS.MATHLIB.LIBALGEBRA.OCalculationQuadraticEquation) package RES.OBJECTS.MATHLIB.LIBALGEBRA { import RES.OBJECTS.MATHLIB.LIBCOLLISION.*; public class OCalculationQuadraticEquation { private var d:Number;// = 0 private var iResult:Array; private var iResult1:Array; private var iResult2:Array; public function OCalculationQuadraticEquation():void{ d = 0; iResult = []; iResult1 = [0]; iResult2 = [0, 0]; super(); } public function Calculation(_arg1:Number, _arg2:Number, _arg3:Number):Array{ if (_arg1 == 0){ if (_arg2 != 0){ iResult1[0] = (-(_arg3) / _arg2); iResult1[0] = OLLimits.NumberLimit(iResult1[0]); iResult1[0] = OLLimits.Zero(iResult1[0]); iResult1[0] = OLLimits.One(iResult1[0]); return (iResult1); }; return (iResult); //unresolved jump }; d = ((_arg2 * _arg2) - ((4 * _arg1) * _arg3)); d = OLLimits.NumberLimit(d); d = OLLimits.Zero(d); if (d < 0){ return (iResult); }; if (d == 0){ iResult1[0] = (-(_arg2) / (2 * _arg1)); iResult1[0] = OLLimits.NumberLimit(iResult1[0]); iResult1[0] = OLLimits.Zero(iResult1[0]); iResult1[0] = OLLimits.One(iResult1[0]); return (iResult1); }; d = Math.sqrt(d); _arg1 = (2 * _arg1); _arg2 = -(_arg2); iResult2[0] = ((_arg2 - d) / _arg1); iResult2[0] = OLLimits.NumberLimit(iResult2[0]); iResult2[0] = OLLimits.Zero(iResult2[0]); iResult2[0] = OLLimits.One(iResult2[0]); iResult2[1] = ((_arg2 + d) / _arg1); iResult2[1] = OLLimits.NumberLimit(iResult2[1]); iResult2[1] = OLLimits.Zero(iResult2[1]); iResult2[1] = OLLimits.One(iResult2[1]); return (iResult2); } } }//package RES.OBJECTS.MATHLIB.LIBALGEBRA
Section 72
//OVectorProjection (RES.OBJECTS.MATHLIB.LIBALGEBRA.OVectorProjection) package RES.OBJECTS.MATHLIB.LIBALGEBRA { import flash.geom.*; public class OVectorProjection { public var iProjectionResult:Point; public function OVectorProjection(){ iProjectionResult = new Point(); } public function Calculation(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Point{ iProjectionResult.x = _arg1; iProjectionResult.y = _arg2; iProjectionResult.normalize(((_arg1 * _arg3) + (_arg2 * _arg4))); return (iProjectionResult); } } }//package RES.OBJECTS.MATHLIB.LIBALGEBRA
Section 73
//OLLimits (RES.OBJECTS.MATHLIB.LIBCOLLISION.OLLimits) package RES.OBJECTS.MATHLIB.LIBCOLLISION { public class OLLimits { public static function Zero(_arg1:Number):Number{ var _local2:Number; var _local3:Number; _local2 = 1E-8; _local3 = -1E-8; if ((((_arg1 <= _local2)) && ((_arg1 >= _local3)))){ return (0); }; return (_arg1); } public static function NumberLimit(_arg1:Number):Number{ var _local2:int; _local2 = 1000000000; _arg1 = Math.floor((_arg1 * _local2)); return ((_arg1 / _local2)); } public static function One(_arg1:Number):Number{ var _local2:Number; var _local3:Number; _local2 = 0.99999999; _local3 = 1; if ((((_arg1 > _local2)) && ((_arg1 < _local3)))){ return (1); }; return (_arg1); } } }//package RES.OBJECTS.MATHLIB.LIBCOLLISION
Section 74
//OTimeCollisionPointWithPoint (RES.OBJECTS.MATHLIB.LIBCOLLISION.OTimeCollisionPointWithPoint) package RES.OBJECTS.MATHLIB.LIBCOLLISION { import RES.OBJECTS.MATHLIB.LIBALGEBRA.*; import RES.OBJECTS.MATHLIB.POINTSLIB.*; public class OTimeCollisionPointWithPoint { private var iCalculationQuadraticEquation:OCalculationQuadraticEquation; private var dVx:Number;// = 0 private var dVy:Number;// = 0 private var a:Number;// = 0 private var b:Number;// = 0 private var c:Number;// = 0 private var tret:Array; private var ret1:Array; private var ret2:Array; private var r:Number;// = 0 private var dX:Number;// = 0 private var dY:Number;// = 0 private var ret:Array; public function OTimeCollisionPointWithPoint(_arg1:OCalculationQuadraticEquation=null):void{ dVx = 0; dVy = 0; dX = 0; dY = 0; a = 0; b = 0; c = 0; r = 0; ret = []; ret1 = [0]; ret2 = [0, 0]; super(); if (_arg1){ iCalculationQuadraticEquation = _arg1; } else { iCalculationQuadraticEquation = new OCalculationQuadraticEquation(); }; } public function Calculation(_arg1:ODinamicPoint, _arg2:ODinamicPoint):Array{ dVx = (_arg1.iSpeedX - _arg2.iSpeedX); dVx = OLLimits.Zero(dVx); dVy = (_arg1.iSpeedY - _arg2.iSpeedY); dVy = OLLimits.Zero(dVy); dX = (_arg1.x - _arg2.x); dX = OLLimits.Zero(dX); dY = (_arg1.y - _arg2.y); dY = OLLimits.Zero(dY); r = (_arg1.iRadius + _arg2.iRadius); if (((dX * -(dVx)) + (dY * -(dVy))) <= 0){ return (ret); }; if ((((dVx == 0)) && ((dX == 0)))){ ret1[0] = ((Math.abs(dY) - r) / Math.abs(dVy)); ret1[0] = OLLimits.NumberLimit(ret1[0]); ret1[0] = OLLimits.Zero(ret1[0]); tret = ret1; } else { if ((((dVy == 0)) && ((dY == 0)))){ ret1[0] = ((Math.abs(dX) - r) / Math.abs(dVx)); ret1[0] = OLLimits.NumberLimit(ret1[0]); ret1[0] = OLLimits.Zero(ret1[0]); tret = ret1; } else { a = ((dVx * dVx) + (dVy * dVy)); b = (2 * ((dX * dVx) + (dY * dVy))); c = (((dX * dX) + (dY * dY)) - (r * r)); tret = iCalculationQuadraticEquation.Calculation(a, b, c); }; }; switch (tret.length){ case 2: if (tret[0] < 0){ if (tret[1] < 0){ return (ret); }; ret1[0] = tret[1]; return (ret1); } else { if (tret[1] < 0){ ret1[0] = tret[0]; return (ret1); }; return (tret); }; case 1: if (tret[0] < 0){ return (ret); }; return (tret); case 0: return (tret); }; return (ret); } } }//package RES.OBJECTS.MATHLIB.LIBCOLLISION
Section 75
//OTimeCollisionPointWithSegment (RES.OBJECTS.MATHLIB.LIBCOLLISION.OTimeCollisionPointWithSegment) package RES.OBJECTS.MATHLIB.LIBCOLLISION { import flash.geom.*; import RES.OBJECTS.MATHLIB.LIBALGEBRA.*; import RES.OBJECTS.MATHLIB.POINTSLIB.*; public class OTimeCollisionPointWithSegment { private var tdp:ODinamicPoint; private var tpx:Number; private var ret:Array; private var tx1:Number; private var tx2:Number; private var ret1:Array; private var ret2:Array; private var tymin:Number; private var p0x:Number; private var p0y:Number; private var tymax:Number; private var tpro:Point; private var nx:Number; private var ny:Number; private var ty1:Number; private var ty2:Number; private var txmin:Number; private var iTimeCollisionPointWithPoint:OTimeCollisionPointWithPoint; private var tsx:Number; private var txmax:Number; private var tsy:Number; private var ta:Array; private var iVectorProjection:OVectorProjection; private var tpy:Number; public function OTimeCollisionPointWithSegment(_arg1:OTimeCollisionPointWithPoint=null, _arg2:OVectorProjection=null):void{ ret = []; ret1 = [0]; ret2 = [0, 0]; super(); if (_arg1){ iTimeCollisionPointWithPoint = _arg1; } else { iTimeCollisionPointWithPoint = new OTimeCollisionPointWithPoint(); }; if (_arg2){ iVectorProjection = _arg2; } else { iVectorProjection = new OVectorProjection(); }; tdp = new ODinamicPoint(); } public function Calculation(_arg1:ODinamicPoint, _arg2:OSegment):Array{ p0x = _arg2.iPoints[0].x; p0y = _arg2.iPoints[0].y; nx = _arg2.nx1_0; ny = _arg2.ny1_0; tpro = iVectorProjection.Calculation(nx, ny, (_arg1.x - p0x), (_arg1.y - p0y)); tpx = tpro.x; tpy = tpro.y; tdp.x = (p0x + tpx); tdp.y = (p0y + tpy); tpro = iVectorProjection.Calculation(nx, ny, _arg1.iSpeedX, _arg1.iSpeedY); tdp.iSpeedX = tpro.x; tdp.iSpeedY = tpro.y; ta = iTimeCollisionPointWithPoint.Calculation(_arg1, tdp); switch (ta.length){ case 2: tx1 = (tdp.x + (tdp.iSpeedX * ta[0])); tx2 = (tdp.x + (tdp.iSpeedX * ta[1])); ty1 = (tdp.y + (tdp.iSpeedY * ta[0])); ty2 = (tdp.y + (tdp.iSpeedY * ta[1])); if ((((((((_arg2.minx > tx1)) || ((_arg2.maxx < tx1)))) || ((_arg2.miny > ty1)))) || ((_arg2.maxy < ty1)))){ if ((((((((_arg2.minx > tx2)) || ((_arg2.maxx < tx2)))) || ((_arg2.miny > ty2)))) || ((_arg2.maxy < ty2)))){ return (ret); }; ret1[0] = ta[1]; return (ret1); } else { if ((((((((_arg2.minx > tx2)) || ((_arg2.maxx < tx2)))) || ((_arg2.miny > ty2)))) || ((_arg2.maxy < ty2)))){ ret1[0] = ta[0]; return (ret1); }; return (ta); }; case 1: tx1 = (tdp.x + (tdp.iSpeedX * ta[0])); ty1 = (tdp.y + (tdp.iSpeedY * ta[0])); if ((((((((_arg2.minx > tx1)) || ((_arg2.maxx < tx1)))) || ((_arg2.miny > ty1)))) || ((_arg2.maxy < ty1)))){ return (ret); }; return (ta); case 0: return (ta); }; return (ta); } } }//package RES.OBJECTS.MATHLIB.LIBCOLLISION
Section 76
//ODinamicPoint (RES.OBJECTS.MATHLIB.POINTSLIB.ODinamicPoint) package RES.OBJECTS.MATHLIB.POINTSLIB { import flash.geom.*; public class ODinamicPoint extends Point { public var iNSpeedX:Number; public var iNSpeedY:Number; public var iRadius:Number; public var iSpeedX:Number; public var iSpeedY:Number; private var tp:Point; public function ODinamicPoint(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ super(_arg1, _arg2); tp = new Point(); SetSpeed(_arg3, _arg4); iRadius = _arg5; } public function get Radius():Number{ return (iRadius); } public function get SpeedX():Number{ return (iSpeedX); } public function get SpeedY():Number{ return (iSpeedY); } public function SetSpeed(_arg1:Number, _arg2:Number):void{ iSpeedX = _arg1; iSpeedY = _arg2; tp.x = iSpeedX; tp.y = iSpeedY; tp.normalize(1); iNSpeedX = tp.x; iNSpeedY = tp.y; } public function Move(_arg1:Number=1):void{ x = (x + (iSpeedX * _arg1)); y = (y + (iSpeedY * _arg1)); } } }//package RES.OBJECTS.MATHLIB.POINTSLIB
Section 77
//OSegment (RES.OBJECTS.MATHLIB.POINTSLIB.OSegment) package RES.OBJECTS.MATHLIB.POINTSLIB { import flash.geom.*; public class OSegment { public var perpendicular90:Point; public var dx1_0:Number; public var maxx:Number; public var maxy:Number; public var nx1_0:Number; public var vector1:Point; public var perpendicular270:Point; public var minx:Number; public var miny:Number; public var iPoints:Array; public var dy1_0:Number; public var ny1_0:Number; public function OSegment(_arg1:Point, _arg2:Point){ Init(_arg1, _arg2); } public function Init(_arg1:Point, _arg2:Point):void{ iPoints = [_arg1, _arg2]; dx1_0 = (_arg2.x - _arg1.x); dy1_0 = (_arg2.y - _arg1.y); vector1 = new Point(dx1_0, dy1_0); perpendicular90 = new Point(dy1_0, -(dx1_0)); perpendicular270 = new Point(-(dy1_0), dx1_0); vector1.normalize(1); nx1_0 = vector1.x; ny1_0 = vector1.y; minx = Math.min(_arg2.x, _arg1.x); maxx = Math.max(_arg2.x, _arg1.x); miny = Math.min(_arg2.y, _arg1.y); maxy = Math.max(_arg2.y, _arg1.y); } } }//package RES.OBJECTS.MATHLIB.POINTSLIB
Section 78
//OBitmapFactory (RES.OBJECTS.OGAME.OGRAPHIC.OBitmapFactory) package RES.OBJECTS.OGAME.OGRAPHIC { import ENGINE.DISPLAY.*; import flash.display.*; import ENGINE.CORE.*; public class OBitmapFactory { private var iScale:Number; private var iAddCoinsBitmaps:Object; private var iBaseCoinsBitmaps:Object; public function OBitmapFactory(_arg1:Array, _arg2:Array, _arg3:Number){ iScale = _arg3; iBaseCoinsBitmaps = CreateBitmaps(_arg1); iAddCoinsBitmaps = CreateBitmaps(_arg2); } public function GetBitmap(_arg1:int, _arg2:int):OBitmap{ var _local3:OBitmap; _local3 = new OBitmap(); if (_arg1 == 0){ _local3.CopyFrom(iBaseCoinsBitmaps[_arg2.toString()]); } else { _local3.CopyFrom(iAddCoinsBitmaps[_arg2.toString()]); }; return (_local3); } private function CreateBitmaps(_arg1:Array):Object{ var _local2:Object; var _local3:int; var _local4:int; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Bitmap; var _local9:BitmapData; var _local10:OBM; var _local11:OBitmap; _local2 = new Object(); _local4 = _arg1.length; _local3 = 0; while (_local3 < _local4) { _local6 = ((_arg1[_local3][0] * iScale) * OGlobal.Scale); _local5 = _arg1[_local3][1]; _local8 = new (_arg1[_local3][3]); _local7 = (_local8.width / (2 * _local6)); _local9 = Filter(_local8.bitmapData, _local7); _local10 = new OBM(_local9); _local11 = new OBitmap(_local10); _local2[_local5.toString()] = _local11; _local3++; }; return (_local2); } private function Filter(_arg1:BitmapData, _arg2:Number):BitmapData{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:Number; var _local8:Number; var _local9:int; var _local10:int; var _local11:BitmapData; var _local12:Number; var _local13:int; var _local14:int; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:uint; var _local20:int; var _local21:int; 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 _local30:uint; _local3 = _arg1.width; _local4 = _arg1.height; _local5 = (_local3 / _arg2); _local6 = (_local4 / _arg2); _local7 = (_local3 - (_local5 * _arg2)); _local8 = (_local4 - (_local6 * _arg2)); _local9 = (_local5 + ((_local7)>0) ? 1 : 0); _local10 = (_local6 + ((_local8)>0) ? 1 : 0); _local11 = new BitmapData(_local9, _local10, true); _local12 = (_arg2 * _arg2); _local13 = 0; while (_local13 < _local9) { _local14 = 0; while (_local14 < _local10) { _local15 = 0; _local16 = 0; _local17 = 0; _local18 = 0; _local19 = 0; _local20 = 0; _local21 = 0; _local22 = 0; _local23 = (_local14 * _arg2); _local24 = ((_local14 + 1) * _arg2); _local25 = (_local13 * _arg2); _local26 = ((_local13 + 1) * _arg2); _local27 = 0; while ((((_local27 < _arg2)) && ((_local20 < (_local3 - 1))))) { _local21 = 0; _local28 = 0; while ((((_local28 < _arg2)) && ((_local21 < (_local4 - 1))))) { _local20 = int(((_local13 * _arg2) + _local27)); _local21 = int(((_local14 * _arg2) + _local28)); _local29 = 1; if ((((_local25 < _local20)) && ((_local26 > _local20)))){ _local29 = (_local29 * (_local26 - _local20)); } else { if (_local25 > _local20){ _local29 = (_local29 * Math.abs(((_local20 + 1) - _local25))); }; }; if ((((_local23 < _local21)) && ((_local24 > _local21)))){ _local29 = (_local29 * (_local24 - _local21)); } else { if (_local23 > _local21){ _local29 = (_local29 * Math.abs(((_local21 + 1) - _local23))); }; }; _local30 = _arg1.getPixel32(_local20, _local21); _local16 = (_local16 + ((_local30 & 0xFF) * _local29)); _local17 = (_local17 + (((_local30 & 0xFF00) >> 8) * _local29)); _local18 = (_local18 + (((_local30 & 0xFF0000) >> 16) * _local29)); _local15 = (_local15 + ((_local30 & 4278190080) * _local29)); _local22 = (_local22 + _local29); _local28++; }; _local27++; }; _local16 = (_local16 / _local22); _local17 = ((_local17 / _local22) << 8); _local18 = ((_local18 / _local22) << 16); _local15 = (_local15 / _local22); _local19 = (((_local16 + _local17) + _local18) + _local15); _local11.setPixel32(_local13, _local14, _local19); _local14++; }; _local13++; }; return (_local11); } } }//package RES.OBJECTS.OGAME.OGRAPHIC
Section 79
//OGCoin (RES.OBJECTS.OGAME.OGRAPHIC.OGCoin) package RES.OBJECTS.OGAME.OGRAPHIC { import ENGINE.DISPLAY.*; import flash.display.*; import ENGINE.CORE.*; public class OGCoin extends OSprite { private var iBorder:OBitmap; private var iBitmap:OBitmap; private var iMask:Sprite; private var iTBorder:int; private var iA:Number; private var iRadius:Number; private var iHit:Sprite; private var iHint:OGHint; private var iDA:Number;// = -0.05 private var iState:int; public var iLIndex:int; public var iMode:int; private var iIndex:int; public static const modSelectHint:int = 0; public static const modDeselectHint:int = 1; public static const stNormal:int = 0; public static const stDeleting:int = 3; public static const stDeleted:int = 4; public static const stSelect:int = 1; public static const stDeselect:int = 2; public function OGCoin(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:OBitmap, _arg6:int, _arg7:OGHint, _arg8:int){ iDA = -0.05; super(); this.prX = _arg1; this.prY = _arg2; iRadius = (_arg3 * OGlobal.Scale); iLIndex = _arg4; iBitmap = _arg5; iBitmap.x = (-(iBitmap.width) / 2); iBitmap.y = (-(iBitmap.height) / 2); addChild(iBitmap); iTBorder = _arg8; iIndex = _arg6; if (iIndex == 0){ MakeBorder("red"); } else { MakeBorder("blue"); }; iMask = new Sprite(); iMask.graphics.beginFill(0); iMask.graphics.drawCircle(0, 0, iRadius); iMask.graphics.endFill(); addChild(iMask); iBitmap.mask = iMask; iHit = new Sprite(); iHit.graphics.beginFill(0); iHit.graphics.drawCircle(0, 0, iRadius); iHit.graphics.endFill(); iHit.alpha = 0; addChild(iHit); hitArea = iHit; iHint = _arg7; iMode = modDeselectHint; State = stNormal; } private function Select():void{ iA = 1; addChildAt(iBorder, 1); } public function MoveCoin(_arg1:Number, _arg2:Number):void{ this.prX = _arg1; this.prY = _arg2; } public function get State():int{ return (iState); } public function get Hit():Sprite{ return (iHit); } override public function Free():void{ while (numChildren > 0) { removeChildAt(0); }; iBitmap = null; iBorder = null; iMask = null; iHit = null; super.Free(); } private function MakeBorder(_arg1:String):void{ var _local2:int; var _local3:Number; var _local4:Sprite; _local2 = (iTBorder - (iTBorder * 0.2)); _local3 = (iRadius / OGlobal.Scale); _local4 = new Sprite(); _local4.graphics.beginFill(0); _local4.graphics.drawCircle(0, 0, _local3); _local4.graphics.drawCircle(0, 0, (_local3 - _local2)); _local4.graphics.endFill(); iBorder = ODisplay.OBitmapMake([null, [ODisplay.SpriteLib, _local4], 1, "GEL", _arg1, "border", (_local2 * 0.15), 0, 0, null, 0, false]); iBorder.x = (-(iBorder.width) / 2); iBorder.y = (-(iBorder.height) / 2); } public function OnEnterFrame():void{ switch (iState){ case stNormal: break; case stSelect: break; case stDeselect: break; case stDeleting: iA = (iA + iDA); if (iA >= 1){ iDA = (iDA * -1); iA = 1; }; if (iA <= 0){ iDA = (iDA * -1); iA = 0; removeChild(iBorder); }; iBitmap.alpha = iA; iBorder.alpha = iA; if (iA == 1){ State = stDeleted; }; break; case stDeleted: break; }; } private function Deselect():void{ removeChild(iBorder); } public function get Hint():OGHint{ return (iHint); } public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stNormal: break; case stSelect: Select(); break; case stDeselect: Deselect(); break; case stDeleting: break; case stDeleted: break; }; } } }//package RES.OBJECTS.OGAME.OGRAPHIC
Section 80
//OGField (RES.OBJECTS.OGAME.OGRAPHIC.OGField) package RES.OBJECTS.OGAME.OGRAPHIC { import ENGINE.DISPLAY.*; import flash.events.*; import RES.OBJECTS.*; import RES.OBJECTS.OGAME.*; import RES.OBJECTS.Particle.*; public class OGField extends OSprite { private var iReplyFlag:Boolean; private var iTBorder:int; private var iGameManager:OGameManager; private var iHeigth:int; private var iDeletingCoins:Array; private var iBackground:OBitmap; private var iGCoins:Array; private var iPCont:CParticleContainer; private var iWidth:int; public function OGField(_arg1:int, _arg2:int, _arg3:OGameManager, _arg4:Boolean){ iWidth = _arg1; iHeigth = _arg2; iGameManager = _arg3; iReplyFlag = _arg4; iGCoins = new Array(); iDeletingCoins = new Array(); iTBorder = (iWidth * 0.016); if (iTBorder < 5){ iTBorder = 5; }; iBackground = CoinzS.MyFrame([null, (iWidth + (2 * iTBorder)), (iHeigth + (2 * iTBorder)), (iTBorder * iTBorder), iTBorder, "aqua1", "white", 0.25, -(iTBorder), -(iTBorder), null, 0, true]); addChild(iBackground); if (iReplyFlag){ mouseEnabled = false; mouseChildren = false; } else { CPrototypeFactory._createParticleBitmaps(7); iPCont = new CParticleContainer(); addChild(iPCont); }; } public function GetCoin(_arg1:int):OGCoin{ return (iGCoins[_arg1]); } public function DeselectCoin(_arg1:int):void{ var _local2:OGCoin; _local2 = iGCoins[_arg1]; _local2.State = OGCoin.stDeselect; } public function DelCoin(_arg1:int):void{ var _local2:OGCoin; _local2 = iGCoins[_arg1]; _local2.removeEventListener(MouseEvent.CLICK, OnClick); _local2.State = OGCoin.stDeleting; if ((((_local2.Hint.State == OGHint.stAppearance)) || ((_local2.Hint.State == OGHint.stShow)))){ _local2.Hint.State = OGHint.stFading; }; iDeletingCoins.push(_local2); _local2 = iGCoins.pop(); if (_arg1 < iGCoins.length){ iGCoins[_arg1] = _local2; iGCoins[_arg1].iLIndex = _arg1; }; } public function get CountCoins():int{ return (iGCoins.length); } private function OnOver(_arg1:MouseEvent):void{ var _local2:OGCoin; _local2 = OGCoin(_arg1.currentTarget); iGameManager.SelectHint(_local2.iLIndex); } override public function Free():void{ var _local1:OGCoin; while (numChildren > 0) { removeChildAt(0); }; if (iGCoins){ while (iGCoins.length > 0) { _local1 = iGCoins.shift(); _local1.Free(); _local1 = null; }; }; iGCoins = null; iBackground = null; iPCont = null; super.Free(); } public function AddCoin(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int, _arg5:int, _arg6:int):void{ var _local7:OBitmap; var _local8:OGHint; var _local9:OGCoin; _local7 = iGameManager.iBitmapFactory.GetBitmap(_arg6, _arg5); _local8 = new OGHint(iGameManager.iHintFactory.GetHint(_arg6, _arg5), this); _local9 = new OGCoin(_arg1, _arg2, _arg3, _arg4, _local7, _arg6, _local8, iTBorder); iGCoins.push(_local9); _local9.addEventListener(MouseEvent.CLICK, OnClick); _local9.addEventListener(MouseEvent.ROLL_OVER, OnOver); _local9.addEventListener(MouseEvent.ROLL_OUT, OnOut); addChild(_local9); } public function SelectCoin(_arg1:int):void{ var _local2:OGCoin; _local2 = iGCoins[_arg1]; _local2.State = OGCoin.stSelect; } private function OnOut(_arg1:MouseEvent):void{ var _local2:OGCoin; _local2 = OGCoin(_arg1.currentTarget); iGameManager.DeselectHint(_local2.iLIndex); } public function OnEnterFrame():void{ var _local1:OGCoin; var _local2:int; _local2 = 0; while (_local2 < iDeletingCoins.length) { _local1 = iDeletingCoins[_local2]; _local1.OnEnterFrame(); if (_local1.State == OGCoin.stDeleted){ iDeletingCoins.splice(_local2, 1); removeChild(_local1); if (!iReplyFlag){ _local2 = 0; while (_local2 < 3) { iPCont.addSimpleParticle(_local2, _local1.prX, _local1.prY); _local2++; }; }; _local1.Free(); _local1 = null; }; _local2++; }; } private function OnClick(_arg1:MouseEvent):void{ var _local2:OGCoin; _local2 = OGCoin(_arg1.currentTarget); iGameManager.Click(_local2.iLIndex); } public function get DeletedAll():Boolean{ if (iDeletingCoins.length == 0){ return (true); }; return (false); } } }//package RES.OBJECTS.OGAME.OGRAPHIC
Section 81
//OGHint (RES.OBJECTS.OGAME.OGRAPHIC.OGHint) package RES.OBJECTS.OGAME.OGRAPHIC { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; public class OGHint extends OSprite { private var iA:Number; private var iContainer:DisplayObjectContainer; private var iHint:OBitmap; private var iDA:Number; private var iState:int; public static const stFading:int = 2; public static const stHide:int = 3; public static const stAppearance:int = 0; public static const stShow:int = 1; public function OGHint(_arg1:OBitmap, _arg2:DisplayObjectContainer){ var _local3:Sprite; super(); iHint = _arg1; addChild(iHint); iContainer = _arg2; alpha = 0; _local3 = new Sprite(); _local3.graphics.beginFill(0); _local3.graphics.drawCircle(0, 0, 0.01); _local3.graphics.endFill(); _local3.alpha = 0; addChild(_local3); hitArea = _local3; addEventListener(Event.ENTER_FRAME, OnEnterFrame); State = stHide; } public function get State():int{ return (iState); } private function OnEnterFrame(_arg1:Event):void{ switch (iState){ case stAppearance: iA = (iA + iDA); if (iA > 1){ iA = 1; }; alpha = iA; if (iA == 1){ State = stShow; }; break; case stShow: break; case stFading: iA = (iA + iDA); if (iA < 0){ iA = 0; }; alpha = iA; if (iA == 0){ State = stHide; }; break; case stHide: break; }; } public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stAppearance: iA = alpha; iDA = 0.05; iContainer.addChild(this); break; case stShow: break; case stFading: iA = alpha; iDA = -0.05; break; case stHide: if (iContainer.contains(this)){ iContainer.removeChild(this); }; break; }; } } }//package RES.OBJECTS.OGAME.OGRAPHIC
Section 82
//OHintFactory (RES.OBJECTS.OGAME.OGRAPHIC.OHintFactory) package RES.OBJECTS.OGAME.OGRAPHIC { import ENGINE.DISPLAY.*; import RES.OBJECTS.OGAME.*; public class OHintFactory { private var iScale:Number; private var iAddCoinsHints:Object; private var iBaseCoinsHints:Object; public function OHintFactory(_arg1:OCurrency, _arg2:OCurrency, _arg3:Number){ iScale = _arg3; iBaseCoinsHints = CreateHints(_arg1, "red"); iAddCoinsHints = CreateHints(_arg2, "blue"); } private function CreateHints(_arg1:OCurrency, _arg2:String):Object{ var _local3:Object; var _local4:int; var _local5:int; var _local6:Number; var _local7:Number; var _local8:String; var _local9:OBitmap; var _local10:int; var _local11:String; _local3 = new Object(); _local5 = _arg1.DataCoins.length; _local4 = 0; while (_local4 < _local5) { _local6 = _arg1.DataCoins[_local4][1]; _local8 = (_local6 / 100).toString(); _local10 = _local8.indexOf("."); if (_local10 != -1){ _local11 = _local8.substr((_local10 + 1)); if (_local11.length == 1){ _local8 = (_local8 + "0"); }; } else { _local8 = (_local8 + ".00"); }; _local9 = CoinzS.Header([null, 50, 22, _arg2, _local8, 0, 0, null, 0, true]); _local3[_local6.toString()] = _local9; _local4++; }; return (_local3); } public function GetHint(_arg1:int, _arg2:int):OBitmap{ var _local3:OBitmap; _local3 = new OBitmap(); if (_arg1 == 0){ _local3.CopyFrom(iBaseCoinsHints[_arg2.toString()]); } else { _local3.CopyFrom(iAddCoinsHints[_arg2.toString()]); }; return (_local3); } public static function GetColorsArray(_arg1:String, _arg2:String, _arg3:String, _arg4:String):Array{ var _local5:Array; var _local6:int; var _local7:int; var _local8:int; _local5 = new Array(); _local7 = _arg1.indexOf("="); _local6 = 0; while (_local6 < _local7) { if (_arg1.charAt(_local6) != " "){ _local5.push(_arg2); }; _local6++; }; _local5.push(_arg3); _local8 = _arg1.length; _local6 = (_local7 + 1); while (_local6 < _local8) { if (_arg1.charAt(_local6) != " "){ _local5.push(_arg4); }; _local6++; }; return (_local5); } public static function GenerateColorsArray(_arg1:String, _arg2:Array):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; _local3 = new Array(); _local4 = 0; _local6 = _arg1.length; _local5 = 0; while (_local5 < _local6) { if (_arg1.charAt(_local5) != " "){ _local3.push(_arg2[_local4]); } else { if (_local3.length > 0){ _local4++; }; }; _local5++; }; return (_local3); } } }//package RES.OBJECTS.OGAME.OGRAPHIC
Section 83
//OCurrency (RES.OBJECTS.OGAME.OCurrency) package RES.OBJECTS.OGAME { public class OCurrency { private var iExchangeValue:Number; private var iDataCoins:Array; private var iName:String; private var iMinNominal:int; public function OCurrency(_arg1:Array){ iName = _arg1[0]; iExchangeValue = _arg1[1]; iDataCoins = _arg1[2]; iMinNominal = iDataCoins[0][1]; } public function get NumCoins():uint{ return (iDataCoins.length); } public function get Name():String{ return (iName); } public function get ExchangeValue():Number{ return (iExchangeValue); } public function GetDataCoin(_arg1:int):Array{ if ((((_arg1 >= NumCoins)) || ((_arg1 < 0)))){ return (null); }; return (iDataCoins[_arg1]); } public function get DataCoins():Array{ return (iDataCoins); } public function get MinNominal():int{ return (iMinNominal); } public function set ExchangeValue(_arg1:Number):void{ iExchangeValue = _arg1; } } }//package RES.OBJECTS.OGAME
Section 84
//OFallCoinsSoundPlay (RES.OBJECTS.OGAME.OFallCoinsSoundPlay) package RES.OBJECTS.OGAME { import ENGINE.CORE.*; import flash.utils.*; public class OFallCoinsSoundPlay { private const iFallRepeatDelay:int = 300; private const iFallBeginDelay:int = 500; private var iState:int; private var iT:int; public static const stFallReapeat:int = 2; public static const stWait:int = 0; public static const stFallBegin:int = 1; public static const stFallEnd:int = 3; public function OFallCoinsSoundPlay(){ State = stWait; } public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stWait: break; case stFallBegin: OSound.PlaySound(CoinzL.OSFallBegin); iT = getTimer(); break; case stFallReapeat: OSound.PlaySound(CoinzL.OSFallRepeat); iT = getTimer(); break; case stFallEnd: OSound.PlaySound(CoinzL.OSFallEnd); State = stWait; break; }; } public function OnEnterFrame():void{ switch (iState){ case stWait: break; case stFallBegin: if ((getTimer() - iT) > iFallBeginDelay){ State = stFallReapeat; }; break; case stFallReapeat: if ((getTimer() - iT) > iFallRepeatDelay){ OSound.PlaySound(CoinzL.OSFallRepeat); iT = getTimer(); }; break; case stFallEnd: break; }; } public function get State():int{ return (iState); } } }//package RES.OBJECTS.OGAME
Section 85
//OGameManager (RES.OBJECTS.OGAME.OGameManager) package RES.OBJECTS.OGAME { import RES.OBJECTS.OGAME.OGRAPHIC.*; import ENGINE.CORE.*; import RES.OBJECTS.UTILS.*; public class OGameManager { private const iSpeed:Number = 10; private var iBaseCurrency:OCurrency; private var iReplyFlag:Boolean; private var iOGlass:OGlass; private var iSum:Number; private var iLogicSize:int; private var iSumMoney0:Number; public var iCounterEF:int; private var iMoney0:Array; private var iSumMoney1:Number; private var iExchangeValue:Number; private var iMoney1:Array; private var iBaseCoins:Array; public var iHintFactory:OHintFactory; private var iScale:Number; private var iAddCoins:Array; private var iIDString:String; private var iListCoins:OListCoins; private var iGField:OGField; private var iCounterBaseCoins:int; private var iSumOld:Number; private var iState:int; private var iAddCurrency:OCurrency; private var iFallCoinsSoundPlay:OFallCoinsSoundPlay; private var iSumBaseCoins:Number; private var iScore:int; private var iLevelFailed:Boolean; private var iHintString:String; private var iLastSavedEF:int; private var iRecordString:String; private var iExchangeString:String; private var iGraphicSize:int; public var iBitmapFactory:OBitmapFactory; private var iEnableHint:Boolean; public static const stGenerate:int = 1; public static const stNone:int = 0; public static const stMove:int = 2; public static const stDelete:int = 4; public static const stWait:int = 3; public function OGameManager(_arg1:int, _arg2:int, _arg3:Array, _arg4:Array, _arg5:Array, _arg6:int, _arg7:Boolean){ var _local8:OCurrency; var _local9:OCurrency; var _local10:int; super(); iLogicSize = _arg1; iGraphicSize = _arg2; iScale = (iGraphicSize / iLogicSize); _local8 = new OCurrency(_arg3); _local9 = new OCurrency(_arg4); iIDString = (((((_local8.Name + (_local8.ExchangeValue * 100).toString()) + _local9.Name) + (_local9.ExchangeValue * 100).toString()) + "SIZE") + iLogicSize.toString()); iRecordString = ""; iReplyFlag = _arg7; _local10 = ((_local8.ExchangeValue > _local9.ExchangeValue)) ? 0 : 1; if (_local10 == 0){ iBaseCurrency = _local9; iAddCurrency = _local8; iExchangeValue = (_local8.ExchangeValue / _local9.ExchangeValue); } else { iBaseCurrency = _local8; iAddCurrency = _local9; iExchangeValue = (_local9.ExchangeValue / _local8.ExchangeValue); }; iExchangeValue = Round2(iExchangeValue); iListCoins = new OListCoins(iBaseCurrency.DataCoins, iAddCurrency.DataCoins, _arg6, _arg5, iLogicSize, iLogicSize, iExchangeValue); iCounterBaseCoins = iListCoins.NumBaseCoins; iSumBaseCoins = iListCoins.SumBaseCoins; iOGlass = new OGlass(iLogicSize, iLogicSize, iListCoins.MinRadius, iListCoins.MaxRadius, 1000, iListCoins); iBitmapFactory = new OBitmapFactory(iBaseCurrency.DataCoins, iAddCurrency.DataCoins, iScale); iHintFactory = new OHintFactory(iBaseCurrency, iAddCurrency, iScale); iMoney0 = new Array(); iMoney1 = new Array(); iSumMoney0 = 0; iSumMoney1 = 0; iSum = 0; iSumOld = 0; iScore = 0; iLevelFailed = false; iExchangeString = (((((" 1 " + iBaseCurrency.Name) + " = ") + iExchangeValue.toString()) + " ") + iAddCurrency.Name); iCounterEF = 0; iLastSavedEF = 0; iGField = new OGField(iGraphicSize, iGraphicSize, this, iReplyFlag); iEnableHint = true; if (!iReplyFlag){ iFallCoinsSoundPlay = new OFallCoinsSoundPlay(); }; iBaseCoins = new Array(); iAddCoins = new Array(); State = stNone; } public function DeselectHint(_arg1:int):void{ var _local2:OGCoin; if (iEnableHint){ if (_arg1 < iGField.CountCoins){ _local2 = iGField.GetCoin(_arg1); if (_local2.iMode == OGCoin.modSelectHint){ _local2.iMode = OGCoin.modDeselectHint; _local2.Hint.State = OGHint.stFading; }; }; }; } public function get IDString():String{ return (iIDString); } private function DeselectCoin(_arg1:int, _arg2:Boolean=true):void{ var _local3:int; var _local4:OLCoin; _local4 = iOGlass.GetCoin(_arg1); if (_local4.iIndex == 0){ _local3 = iMoney0.indexOf(_local4); iMoney0.splice(_local3, 1); iSumMoney0 = (iSumMoney0 - _local4.iValue); } else { _local3 = iMoney1.indexOf(_local4); iMoney1.splice(_local3, 1); iSumMoney1 = (iSumMoney1 - _local4.iValue); }; iGField.DeselectCoin(_arg1); if (_arg2){ CheckSum(); }; } public function get BaseCurrency():OCurrency{ return (iBaseCurrency); } public function Reset():void{ var _local1:OLCoin; if (!iReplyFlag){ Record(OLOpponentPlay.RESET); }; while (iMoney0.length > 0) { _local1 = iMoney0[0]; DeselectCoin(_local1.iLIndex, false); }; while (iMoney1.length > 0) { _local1 = iMoney1[0]; DeselectCoin(_local1.iLIndex, false); }; iSum = (iSumMoney1 = 0); } public function get CounterBaseCoins():int{ return (iCounterBaseCoins); } public function get ExchangeString():String{ return (iExchangeString); } private function CheckSum():void{ var _local1:Number; iSum = Math.round((iSumMoney0 * iExchangeValue)); _local1 = (iSum % iAddCurrency.MinNominal); iSum = (iSum - _local1); if (_local1 >= (iAddCurrency.MinNominal / 2)){ iSum = (iSum + iAddCurrency.MinNominal); }; if ((((iSum == iSumMoney1)) && (!((iSum == 0))))){ State = stDelete; }; } public function get RateOfExchange():Number{ return (iExchangeValue); } private function IsExistCoins(_arg1:int, _arg2:Array):Boolean{ var _local3:Boolean; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; _local3 = false; _local8 = _arg2.length; _local5 = 0; while (_local5 < _local8) { _local4 = _arg1; _local6 = _local5; while (_local6 < _local8) { _local7 = _arg2[_local6]; if (_local7 > _local4){ } else { if (_local7 == _local4){ _local3 = true; break; }; if (_local7 < _local4){ _local4 = (_local4 - _local7); }; }; _local6++; }; if (_local3){ break; }; _local5++; }; return (_local3); } public function Click(_arg1:int):void{ var _local2:OGCoin; if (!iReplyFlag){ Record(_arg1); OSound.PlaySound(CoinzL.OSSelectCoin); }; _local2 = iGField.GetCoin(_arg1); if (_local2.State != OGCoin.stSelect){ SelectCoin(_arg1); } else { DeselectCoin(_arg1); }; } private function Record(_arg1:int):void{ var _local2:int; _local2 = (iCounterEF - iLastSavedEF); if (_local2 > 1200){ _local2 = 1200; }; iRecordString = (iRecordString + (AIConvertChar.ToDoubleChar(_local2) + AIConvertChar.ToDoubleChar(_arg1))); iLastSavedEF = iCounterEF; } public function get Score():int{ return (iScore); } public function get ChangeHintString():Boolean{ var _local1:Boolean; _local1 = false; if (iSumOld != iSumMoney0){ iSumOld = iSumMoney0; _local1 = true; }; return (_local1); } public function get State():int{ return (iState); } private function Round2(_arg1:Number):Number{ return ((Math.round((_arg1 * 100)) / 100)); } public function get SumAddMoneySelect():Number{ return (iSumMoney1); } private function SummaBaseCoins():int{ var _local1:int; var _local2:int; var _local3:int; _local2 = iBaseCoins.length; _local3 = 0; _local1 = 0; while (_local1 < _local2) { _local3 = (_local3 + iBaseCoins[_local1]); _local1++; }; return (_local3); } public function get SumBaseMoney():Number{ return (iSumMoney0); } public function Free():void{ iBaseCurrency = null; iAddCurrency = null; iListCoins = null; iOGlass = null; iBitmapFactory = null; iMoney0 = null; iMoney1 = null; iGField.Free(); iGField = null; } private function AddScore(_arg1:int):void{ var _local2:int; _local2 = 0; if (_arg1 > 10){ _local2 = ((_arg1 - 10) * 200); _arg1 = 10; }; switch (_arg1){ case 2: _local2 = (_local2 + 100); break; case 3: _local2 = (_local2 + 300); break; case 4: _local2 = (_local2 + 600); break; case 5: _local2 = (_local2 + 900); break; case 6: _local2 = (_local2 + 1200); break; case 7: _local2 = (_local2 + 1400); break; case 8: _local2 = (_local2 + 1600); break; case 9: _local2 = (_local2 + 1800); break; case 10: _local2 = (_local2 + 2000); break; }; iScore = (iScore + _local2); } public function set EnableHint(_arg1:Boolean):void{ iEnableHint = _arg1; } public function get HintString():String{ return ((iHintString = (((((((iSumMoney0 / 100).toString() + " ") + iBaseCurrency.Name) + " = ") + (iSum / 100).toString()) + " ") + iAddCurrency.Name))); } public function get AddCurrency():OCurrency{ return (iAddCurrency); } public function SelectHint(_arg1:int):void{ var _local2:OGCoin; if (iEnableHint){ if (_arg1 < iGField.CountCoins){ _local2 = iGField.GetCoin(_arg1); if (_local2.iMode == OGCoin.modDeselectHint){ _local2.iMode = OGCoin.modSelectHint; _local2.Hint.Pos(_local2.prX, _local2.prY); _local2.Hint.State = OGHint.stAppearance; }; }; }; } public function get SumBaseCoins():String{ return ((((iSumBaseCoins / 100).toString() + " ") + iBaseCurrency.Name)); } public function get LevelFailed():Boolean{ return (iLevelFailed); } public function get EnableHint():Boolean{ return (iEnableHint); } private function SelectCoin(_arg1:int):void{ var _local2:OLCoin; _local2 = iOGlass.GetCoin(_arg1); if (_local2.iIndex == 0){ iMoney0.push(_local2); iSumMoney0 = (iSumMoney0 + _local2.iValue); } else { iMoney1.push(_local2); iSumMoney1 = (iSumMoney1 + _local2.iValue); }; iGField.SelectCoin(_arg1); CheckSum(); } private function IsExistCombination():Boolean{ var _local1:Boolean; var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; ScanGlass(); _local1 = false; _local2 = SummaBaseCoins(); _local3 = 1; while (_local3 <= _local2) { if (IsExistCoins(_local3, iBaseCoins)){ _local4 = Math.round((_local3 * iExchangeValue)); _local5 = (_local4 % iAddCurrency.MinNominal); _local4 = (_local4 - _local5); if (_local5 >= (iAddCurrency.MinNominal / 2)){ _local4 = (_local4 + iAddCurrency.MinNominal); }; if (IsExistCoins(_local4, iAddCoins)){ _local1 = true; break; }; }; _local3++; }; return (_local1); } private function Delete(_arg1:Array):void{ var _local2:OLCoin; var _local3:OGCoin; var _local4:int; while (_arg1.length > 0) { _local2 = _arg1.shift(); iOGlass.DelBall(_local2.iLIndex); _local3 = iGField.GetCoin(_local2.iLIndex); iGField.DelCoin(_local2.iLIndex); }; } private function CheckLevelFailed():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:OLCoin; var _local5:int; var _local6:Number; _local1 = int.MAX_VALUE; _local2 = 0; _local3 = iOGlass.Count; _local5 = 0; while (_local5 < _local3) { _local4 = iOGlass.GetCoin(_local5); if (_local4.iIndex == 0){ if (_local4.iValue < _local1){ _local1 = _local4.iValue; }; } else { _local2 = (_local2 + _local4.iValue); }; _local5++; }; if (_local3 > 0){ _local6 = Math.round((_local1 * iExchangeValue)); if ((((_local6 > _local2)) && (!((iCounterBaseCoins == 0))))){ iLevelFailed = true; }; }; if (!IsExistCombination()){ iLevelFailed = true; }; } public function get Field():OGField{ return (iGField); } public function OnEnterFrame():void{ var _local1:Array; var _local2:int; var _local3:OGCoin; var _local4:OLCoin; iGField.OnEnterFrame(); if (iFallCoinsSoundPlay){ iFallCoinsSoundPlay.OnEnterFrame(); }; switch (iState){ case stGenerate: _local1 = iOGlass.Generate(); if (_local1 != null){ _local2 = 0; while (_local2 < _local1.length) { iGField.AddCoin((_local1[_local2].iX * iScale), (_local1[_local2].iY * iScale), (_local1[_local2].iRadius * iScale), _local1[_local2].iLIndex, _local1[_local2].iValue, _local1[_local2].iIndex); _local2++; }; }; State = stMove; break; case stMove: if (iOGlass.Iterate(iSpeed)){ _local2 = 0; while (_local2 < iGField.CountCoins) { _local4 = iOGlass.GetCoin(_local2); _local3 = iGField.GetCoin(_local2); _local3.MoveCoin((_local4.iX * iScale), (_local4.iY * iScale)); _local2++; }; State = stGenerate; } else { State = stWait; }; break; case stWait: break; case stDelete: if (iGField.DeletedAll){ State = stGenerate; }; break; }; } private function ScanGlass():void{ var _local1:int; var _local2:int; var _local3:OLCoin; iBaseCoins.splice(0, iBaseCoins.length); iAddCoins.splice(0, iAddCoins.length); _local2 = iOGlass.Count; _local1 = 0; while (_local1 < _local2) { _local3 = iOGlass.GetCoin(_local1); if (_local3.iIndex == 0){ iBaseCoins.push(_local3.iValue); } else { iAddCoins.push(_local3.iValue); }; _local1++; }; iBaseCoins.sort((Array.NUMERIC | Array.DESCENDING)); iAddCoins.sort((Array.NUMERIC | Array.DESCENDING)); } public function get RecordString():String{ return (iRecordString); } public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stGenerate: break; case stMove: if (iFallCoinsSoundPlay){ if (iFallCoinsSoundPlay.State == OFallCoinsSoundPlay.stWait){ iFallCoinsSoundPlay.State = OFallCoinsSoundPlay.stFallBegin; }; }; break; case stWait: CheckLevelFailed(); if (iFallCoinsSoundPlay){ iFallCoinsSoundPlay.State = OFallCoinsSoundPlay.stFallEnd; }; break; case stDelete: iCounterBaseCoins = (iCounterBaseCoins - iMoney0.length); AddScore((iMoney0.length + iMoney1.length)); Delete(iMoney0); Delete(iMoney1); iSumBaseCoins = (iSumBaseCoins - iSumMoney0); iSumMoney0 = 0; iSumMoney1 = 0; iSum = 0; if (!iReplyFlag){ OSound.PlaySound(CoinzL.OSDeleteCoins); }; break; }; } public function get SumAddMoney():Number{ return (iSum); } } }//package RES.OBJECTS.OGAME
Section 86
//OGGame (RES.OBJECTS.OGAME.OGGame) package RES.OBJECTS.OGAME { import RES.OBJECTS.OGAME.OGRAPHIC.*; import RES.OBJECTS.UTILS.*; public class OGGame { private var iLOpponentPlay:OLOpponentPlay; private var iState:int; private var iGameManager:OGameManager; public static const stLevelFailed:int = 2; public static const stPlay:int = 0; public static const stLevelComplete:int = 1; public function OGGame(_arg1:int, _arg2:int, _arg3:Array, _arg4:Array, _arg5:Array, _arg6:int, _arg7:Boolean=false, _arg8:String=null){ iGameManager = new OGameManager(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); if (_arg7){ iLOpponentPlay = new OLOpponentPlay(iGameManager, _arg8); }; State = stPlay; } public function Click(_arg1:int):void{ iGameManager.Click(_arg1); } public function get SumBaseMoney():Number{ return (iGameManager.SumBaseMoney); } public function get RecordString():String{ return (iGameManager.RecordString); } public function get SumAddMoneySelect():Number{ return (iGameManager.SumAddMoneySelect); } public function get AddCurrency():OCurrency{ return (iGameManager.AddCurrency); } public function get IDString():String{ return (iGameManager.IDString); } public function get SumBaseCoins():String{ return (iGameManager.SumBaseCoins); } public function get EnableHint():Boolean{ return (iGameManager.EnableHint); } public function Free():void{ iGameManager.Free(); iGameManager = null; } public function get HintString():String{ return (iGameManager.HintString); } public function get Field():OGField{ return (iGameManager.Field); } public function OnEnterFrame():void{ iGameManager.iCounterEF++; switch (iState){ case stPlay: if ((((iGameManager.CounterBaseCoins == 0)) && ((iGameManager.State == OGameManager.stWait)))){ State = stLevelComplete; } else { if (iGameManager.LevelFailed){ State = stLevelFailed; }; }; break; }; iGameManager.OnEnterFrame(); if (iLOpponentPlay){ iLOpponentPlay.OnTimer(); }; } public function IsWait():Boolean{ if (iGameManager.State == OGameManager.stWait){ return (true); }; return (false); } public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stPlay: iGameManager.State = OGameManager.stGenerate; break; case stLevelComplete: break; }; } public function set EnableHint(_arg1:Boolean):void{ iGameManager.EnableHint = _arg1; } public function OnHint():void{ if (iGameManager.EnableHint){ iGameManager.EnableHint = false; } else { iGameManager.EnableHint = true; }; } public function get BaseCurrency():OCurrency{ return (iGameManager.BaseCurrency); } public function get SumAddMoney():Number{ return (iGameManager.SumAddMoney); } public function get State():int{ return (iState); } public function get ExchangeString():String{ return (iGameManager.ExchangeString); } public function Reset():void{ iGameManager.Reset(); } public function get ChangeHintString():Boolean{ return (iGameManager.ChangeHintString); } public function get Score():int{ return (iGameManager.Score); } public function get RateOfExchange():Number{ return (iGameManager.RateOfExchange); } } }//package RES.OBJECTS.OGAME
Section 87
//OGlass (RES.OBJECTS.OGAME.OGlass) package RES.OBJECTS.OGAME { import flash.geom.*; import RES.OBJECTS.MATHLIB.LIBCOLLISION.*; import RES.OBJECTS.MATHLIB.POINTSLIB.*; public class OGlass { private var Rmin:Number; private var iDX:Number; private var width:Number; private var iNumAbscisses:int; private var iSegmentRight:OSegment; private var iS:Point; private var Rmax:Number; private var iSegmentLeft:OSegment; private var balls:Array; private var iSegmentBottom:OSegment; private var iListCoins:OListCoins; private var height:Number; private var balls_length:int; private var iDP:ODinamicPoint; private var iTimeCollisionPointWithSegment:OTimeCollisionPointWithSegment; private var iD:Point; private var iMinTimeCollision:OMinTimeCollision; private var iAbscisses:Array; private var iDY:Number; public function OGlass(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:OListCoins){ iD = new Point(); iS = new Point(); iDP = new ODinamicPoint(); super(); width = _arg1; height = _arg2; Rmin = _arg3; Rmax = _arg4; iListCoins = _arg6; InitAbscisses(); balls = new Array(_arg5); balls_length = 0; iMinTimeCollision = new OMinTimeCollision(); iTimeCollisionPointWithSegment = new OTimeCollisionPointWithSegment(); iSegmentRight = new OSegment(new Point(width, 0), new Point(width, height)); iSegmentBottom = new OSegment(new Point(width, height), new Point(0, height)); iSegmentLeft = new OSegment(new Point(0, height), new Point(0, 0)); } private function Zero(_arg1:Number, _arg2:Number):Number{ if ((((_arg1 < _arg2)) && ((_arg1 > -(_arg2))))){ return (0); }; return (_arg1); } private function InitAbscisses():void{ var _local1:Number; var _local2:Number; var _local3:int; var _local4:Number; _local1 = (Rmax * 2); iNumAbscisses = int((width / _local1)); _local2 = ((width - (iNumAbscisses * _local1)) / (iNumAbscisses + 1)); _local4 = 0; iAbscisses = new Array(iNumAbscisses); _local3 = 0; while (_local3 < iNumAbscisses) { _local4 = (_local4 + (_local2 + Rmax)); iAbscisses[_local3] = _local4; _local4 = (_local4 + Rmax); _local3++; }; } public function Iterate(_arg1:Number):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:int; var _local8:OLCoin; var _local9:OLCoin; var _local10:Number; var _local11:Boolean; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local5 = 0; _local6 = 0; while (_local6 < balls_length) { _local8 = balls[_local6]; iS.x = 0; iS.y = _arg1; iMinTimeCollision.Reset(); _local10 = (((_local8.iRadius + Rmax) + _arg1) + 1); _local7 = 0; while (_local7 < balls_length) { if (_local6 == _local7){ } else { _local9 = balls[_local7]; iD.x = (_local8.iX - _local9.iX); iD.y = (_local8.iY - _local9.iY); if (iD.length <= _local10){ iMinTimeCollision.CalculateTimeCollision(_local8.iX, _local8.iY, iS.x, iS.y, _local8.iRadius, _local9.iX, _local9.iY, 0, 0, _local9.iRadius); }; }; _local7++; }; iDP.x = _local8.iX; iDP.y = _local8.iY; iDP.iSpeedX = iS.x; iDP.iSpeedY = iS.y; iDP.iRadius = _local8.iRadius; _local3 = Analis(iTimeCollisionPointWithSegment.Calculation(iDP, iSegmentBottom)); _local11 = false; if (_local3 < iMinTimeCollision.MinTime){ _local12 = _local3; } else { _local12 = iMinTimeCollision.MinTime; _local11 = true; }; if (_local12 < 1){ iS.normalize((iS.length * _local12)); _local8.iY = (_local8.iY + iS.y); if (_local11){ _local13 = Math.sqrt(((_arg1 * _arg1) - (iS.y * iS.y))); _local14 = (_local8.iX - iMinTimeCollision.MinX); _local15 = (_local8.iY - iMinTimeCollision.MinY); _local16 = -(_local15); _local17 = _local14; _local18 = _local15; _local19 = -(_local14); if (_local17 >= 0){ iS.x = _local16; iS.y = _local17; } else { iS.x = _local18; iS.y = _local19; }; iS.normalize(_local13); iMinTimeCollision.Reset(); _local7 = 0; while (_local7 < balls_length) { if (_local6 == _local7){ } else { _local9 = balls[_local7]; iD.x = (_local8.iX - _local9.iX); iD.y = (_local8.iY - _local9.iY); if (iD.length <= _local10){ iMinTimeCollision.CalculateTimeCollision(_local8.iX, _local8.iY, iS.x, iS.y, _local8.iRadius, _local9.iX, _local9.iY, 0, 0, _local9.iRadius); }; }; _local7++; }; iDP.x = _local8.iX; iDP.y = _local8.iY; iDP.iSpeedX = iS.x; iDP.iSpeedY = iS.y; iDP.iRadius = _local8.iRadius; _local2 = Analis(iTimeCollisionPointWithSegment.Calculation(iDP, iSegmentRight)); _local3 = Analis(iTimeCollisionPointWithSegment.Calculation(iDP, iSegmentBottom)); _local4 = Analis(iTimeCollisionPointWithSegment.Calculation(iDP, iSegmentLeft)); _local20 = Math.min(_local2, _local3, _local4); _local20 = Math.min(_local20, iMinTimeCollision.MinTime); if (_local20 < 1){ iS.normalize((iS.length * _local20)); }; _local8.iX = (_local8.iX + iS.x); _local8.iY = (_local8.iY + iS.y); }; } else { _local8.iY = (_local8.iY + iS.y); }; iDX = Zero(iS.x, 1E-8); iDY = Zero(iS.y, 1E-8); if ((((iDX == 0)) && ((iDY == 0)))){ _local5++; }; _local6++; }; if (_local5 == balls_length){ return (false); }; return (true); } private function Analis(_arg1:Array):Number{ var _local2:Number; switch (_arg1.length){ case 0: _local2 = Number.MAX_VALUE; break; case 1: _local2 = _arg1[0]; break; case 2: _local2 = Math.min(_arg1[0], _arg1[1]); break; }; return (_local2); } public function DelBall(_arg1:int):void{ var _local2:int; var _local3:OLCoin; _local2 = _arg1; _local3 = balls[_local2]; if (_local3.iIndex == 0){ iListCoins.iBaseCoinsArea = (iListCoins.iBaseCoinsArea - _local3.iArea); }; balls_length--; if (_local2 < balls_length){ balls[_local2] = balls[balls_length]; balls[_local2].iLIndex = _local2; }; } public function Generate():Array{ var _local1:Array; var _local2:int; var _local3:int; var _local4:int; var _local5:OLCoin; var _local6:OLCoin; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local1 = new Array(); _local2 = 0; while (_local2 < iNumAbscisses) { _local9 = iListCoins.GetFirstCoinRadius(); _local3 = 0; for (;_local3 < iNumAbscisses;_local3++) { _local7 = iAbscisses[_local3]; _local8 = _local9; _local4 = 0; while (_local4 < balls_length) { _local6 = balls[_local4]; _local10 = (_local9 + _local6.iRadius); iD.x = (_local7 - _local6.iX); iD.y = (_local8 - _local6.iY); if (iD.length < _local10){ break; }; _local4++; }; if (_local4 < balls_length){ continue; } else { _local5 = iListCoins.GetCoin(); _local5.iX = _local7; _local5.iY = _local8; _local5.iLIndex = balls_length; balls[balls_length] = _local5; balls_length++; _local1.push(_local5); break; }; }; if (_local3 == iNumAbscisses){ break; }; _local2++; }; return (_local1); } public function GetCoin(_arg1:int):OLCoin{ return (balls[_arg1]); } public function get Count():int{ return (balls_length); } } }//package RES.OBJECTS.OGAME
Section 88
//OLCoin (RES.OBJECTS.OGAME.OLCoin) package RES.OBJECTS.OGAME { public class OLCoin { public var iValue:int; public var iIndex:int; public var iX:Number; public var iY:Number; public var iImage:Class; public var iRadius:Number; public var iLIndex:int; public var iArea:Number; public function OLCoin(_arg1:int, _arg2:Number, _arg3:int, _arg4:Class){ iIndex = _arg1; iRadius = _arg2; iValue = _arg3; iImage = _arg4; iArea = ((Math.PI * iRadius) * iRadius); } } }//package RES.OBJECTS.OGAME
Section 89
//OListCoins (RES.OBJECTS.OGAME.OListCoins) package RES.OBJECTS.OGAME { import ENGINE.CORE.*; public class OListCoins { private const iQUOTA:Number = 0.45; private const iLimitBaseCoinsArea:Number = 0.2; private var iBaseCoinsValues:Array; private var iRandom:ORandomInt; private var iExchangeValue:Number; private var iList:Array; private var iSumBaseCoins:Number; private var iAddCoinsValues:Array; private var iCoins0:Array; private var iCoins1:Array; private var iBaseCoinsCounts:Array; private var iGlassArea:Number; private var iBaseCoinsVer:Array; private var iSizeList:int; private var iMinR:Number; private var iSLimit:Number; private var iNumBaseCoins:int; private var iAddCoinsCounts:Array; private var iSTotal:Number; private var iWidth:int; private var iSummBaseCoins:Number; private var iCurCoinInd:int; public var iBaseCoinsArea:Number; private var iMaxR:Number; private var iHeight:int; public function OListCoins(_arg1:Array, _arg2:Array, _arg3:int, _arg4:Array, _arg5:int, _arg6:int, _arg7:Number){ iCoins0 = _arg1; iCoins1 = _arg2; iRandom = new ORandomInt(); iRandom.SeedRand(_arg3); iBaseCoinsVer = _arg4; iWidth = _arg5; iHeight = _arg6; iExchangeValue = _arg7; iSTotal = (iWidth * iHeight); iSLimit = (iSTotal * iQUOTA); iGlassArea = (iWidth * iHeight); iBaseCoinsArea = 0; iList = new Array(); iSummBaseCoins = 0; Init(); } public function get MaxRadius():Number{ return (iMaxR); } public function GetCoin():OLCoin{ var _local1:OLCoin; _local1 = iList[iCurCoinInd]; if (_local1.iIndex == 0){ iBaseCoinsArea = (iBaseCoinsArea + _local1.iArea); }; iList.splice(iCurCoinInd, 1); return (_local1); } private function WhatCoinInd():int{ var _local1:int; var _local2:int; var _local3:int; var _local4:OLCoin; _local3 = iList.length; if ((iBaseCoinsArea / iGlassArea) < iLimitBaseCoinsArea){ _local2 = 0; while (_local2 < _local3) { _local4 = iList[_local2]; if (_local4.iIndex == 0){ _local1 = _local2; break; }; _local2++; }; } else { _local2 = 0; while (_local2 < _local3) { _local4 = iList[_local2]; if (_local4.iIndex == 1){ _local1 = _local2; break; }; _local2++; }; }; return (_local1); } private function CalculateSumBaseCoins():int{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local1 = 0; _local5 = iCoins0.length; _local3 = 0; while (_local3 < _local5) { _local2 = iBaseCoinsVer[_local3]; _local4 = 0; while (_local4 < _local2) { _local1 = (_local1 + iCoins0[_local3][1]); _local4++; }; _local3++; }; return (_local1); } private function FillAddCoins():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; _local4 = iCoins1.length; _local2 = 0; while (_local2 < _local4) { _local1 = iAddCoinsCounts[_local2]; _local3 = 0; while (_local3 < _local1) { iList.push(new OLCoin(1, iCoins1[_local2][0], iCoins1[_local2][1], iCoins1[_local2][3])); _local3++; }; _local2++; }; } private function CalculateMinValueAddCoins():int{ var _local1:int; var _local2:int; var _local3:int; _local1 = int.MAX_VALUE; _local3 = iCoins1.length; _local2 = 0; while (_local2 < _local3) { if (iCoins1[_local2][1] < _local1){ _local1 = iCoins1[_local2][1]; }; _local2++; }; return (_local1); } private function Init():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:OLCoin; var _local5:Number; var _local6:int; iMinR = Number.MAX_VALUE; iMaxR = 0; _local2 = iCoins0.length; _local1 = 0; while (_local1 < _local2) { if (iCoins0[_local1][0] < iMinR){ iMinR = iCoins0[_local1][0]; }; if (iCoins0[_local1][0] > iMaxR){ iMaxR = iCoins0[_local1][0]; }; _local1++; }; _local2 = iCoins1.length; _local1 = 0; while (_local1 < _local2) { if (iCoins1[_local1][0] < iMinR){ iMinR = iCoins1[_local1][0]; }; if (iCoins1[_local1][0] > iMaxR){ iMaxR = iCoins1[_local1][0]; }; _local1++; }; FillBaseCoins(); iNumBaseCoins = iList.length; _local3 = 0; _local1 = 0; while (_local1 < iNumBaseCoins) { _local4 = iList[_local1]; _local3 = (_local3 + ((Math.PI * _local4.iRadius) * _local4.iRadius)); _local1++; }; InitStartArrays(); GenerateAddVer(); FillAddCoins(); Mix(iNumBaseCoins, (iList.length - iNumBaseCoins)); _local5 = (iSTotal - _local3); _local6 = 0; _local1 = iNumBaseCoins; while (_local1 < iList.length) { _local4 = iList[_local1]; _local5 = (_local5 - ((Math.PI * _local4.iRadius) * _local4.iRadius)); if (_local5 > iSLimit){ _local6++; } else { break; }; _local1++; }; iSizeList = (iNumBaseCoins + _local6); Mix(0, iSizeList); } private function Mix(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:OLCoin; var _local6:int; var _local7:int; _local3 = (_arg1 + _arg2); _local6 = 0; while (_local6 < 3) { _local7 = _arg1; while (_local7 < _local3) { _local4 = (iRandom.RandVal(_arg2) + _arg1); _local5 = iList[_local7]; iList[_local7] = iList[_local4]; iList[_local4] = _local5; _local7++; }; _local6++; }; } public function GetFirstCoinRadius():Number{ var _local1:OLCoin; if (iList.length == 0){ FillAddCoins(); Mix(0, iList.length); }; iCurCoinInd = WhatCoinInd(); _local1 = iList[iCurCoinInd]; return (_local1.iRadius); } private function GenerateAddVer():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local3 = iCoins0.length; _local1 = 0; while (_local1 < _local3) { _local5 = iBaseCoinsVer[_local1]; _local2 = 0; while (_local2 < _local5) { _local4 = iCoins0[_local1][1]; CalculateAddCoinsVer(_local4); _local2++; }; _local1++; }; } public function get SumBaseCoins():Number{ return (iSummBaseCoins); } private function CalculateAddCoinsVer(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:int; _local2 = Math.round((_arg1 * iExchangeValue)); _local4 = iAddCoinsValues.length; _local3 = (_local4 - 1); while (_local3 >= 0) { iAddCoinsCounts[_local3] = (iAddCoinsCounts[_local3] + int((_local2 / iAddCoinsValues[_local3]))); _local2 = (_local2 % iAddCoinsValues[_local3]); _local3--; }; } public function get MinRadius():Number{ return (iMinR); } public function get NumBaseCoins():int{ return (iNumBaseCoins); } private function InitStartArrays():void{ var _local1:int; var _local2:int; iAddCoinsValues = new Array(); iAddCoinsCounts = new Array(); _local1 = iCoins1.length; _local2 = (_local1 - 1); while (_local2 >= 0) { iAddCoinsValues[_local2] = iCoins1[_local2][1]; iAddCoinsCounts[_local2] = 0; _local2--; }; } private function GetAddGenerateSumBaseCoins():int{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local1 = 0; _local2 = CalculateSumBaseCoins(); _local3 = CalculateMinValueAddCoins(); _local4 = Math.round((_local3 / iExchangeValue)); _local5 = int((_local2 % _local3)); if (_local5 > 0){ _local1 = (_local4 - _local5); }; return (_local1); } private function FillBaseCoins():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:OLCoin; var _local5:int; _local5 = iCoins0.length; _local2 = 0; while (_local2 < _local5) { _local1 = iBaseCoinsVer[_local2]; _local3 = 0; while (_local3 < _local1) { _local4 = new OLCoin(0, iCoins0[_local2][0], iCoins0[_local2][1], iCoins0[_local2][3]); iSummBaseCoins = (iSummBaseCoins + _local4.iValue); iList.push(_local4); _local3++; }; _local2++; }; } } }//package RES.OBJECTS.OGAME
Section 90
//OListCurrency (RES.OBJECTS.OGAME.OListCurrency) package RES.OBJECTS.OGAME { public class OListCurrency { public static var USD10:Class = OListCurrency_USD10; public static var USD25:Class = OListCurrency_USD25; public static var ILS50:Class = OListCurrency_ILS50; private static var iPGK:Array = ["PGK", 0.35, [[28.2, 1, 25, PGK1], [34.75, 2, 20, PGK2], [31.2, 5, 15, PGK5], [37.95, 10, 15, PGK10], [45.8, 20, 10, PGK20], [48, 50, 10, PGK50], [37.95, 100, 5, PGK100]]]; private static var iUAH:Array = ["UAH", 5.05, [[25.6, 1, 25, UAH1], [27, 2, 20, UAH2], [38, 5, 15, UAH5], [25, 10, 15, UAH10], [33, 25, 10, UAH25], [36, 50, 10, UAH50], [41, 100, 5, UAH100]]]; public static var RUB500:Class = OListCurrency_RUB500; public static var JPY500:Class = OListCurrency_JPY500; public static var PGK100:Class = OListCurrency_PGK100; public static var PGK10:Class = OListCurrency_PGK10; public static var UAH10:Class = OListCurrency_UAH10; private static var iUSD:Array = ["USD", 1, [[30.4, 1, 25, USD1], [33.9, 5, 15, USD5], [28.6, 10, 15, USD10], [38.8, 25, 10, USD25], [48.9, 50, 10, USD50], [42.4, 100, 5, USD100]]]; public static var ILS100:Class = OListCurrency_ILS100; public static var PGK20:Class = OListCurrency_PGK20; public static var UAH1:Class = OListCurrency_UAH1; public static var UAH2:Class = OListCurrency_UAH2; public static var UAH5:Class = OListCurrency_UAH5; public static var BRL100:Class = OListCurrency_BRL100; public static var UAH25:Class = OListCurrency_UAH25; public static var USD50:Class = OListCurrency_USD50; private static var iILS:Array = ["ILS", 4.05, [[27.2, 1, 25, ILS1], [30.4, 5, 20, ILS5], [35.2, 10, 15, ILS10], [41.6, 50, 10, ILS50], [28.8, 100, 5, ILS100], [38.4, 500, 5, ILS500], [36.8, 1000, 5, ILS1000]]]; public static var SGD10:Class = OListCurrency_SGD10; public static var XCD100:Class = OListCurrency_XCD100; private static var iEUR:Array = ["EUR", 0.69, [[25.9, 1, 25, EUR1], [29.9, 2, 20, EUR2], [33.9, 5, 15, EUR5], [31.5, 10, 15, EUR10], [35.5, 20, 10, EUR20], [38.7, 50, 10, EUR50], [37.1, 100, 5, EUR100], [41.1, 200, 5, EUR200]]]; public static var XCD5:Class = OListCurrency_XCD5; public static var XCD1:Class = OListCurrency_XCD1; public static var PLN2:Class = OListCurrency_PLN2; public static var ILS1:Class = OListCurrency_ILS1; public static var PLN5:Class = OListCurrency_PLN5; public static var ILS5:Class = OListCurrency_ILS5; public static var PLN1:Class = OListCurrency_PLN1; public static var XCD10:Class = OListCurrency_XCD10; public static var XCD2:Class = OListCurrency_XCD2; public static var SGD20:Class = OListCurrency_SGD20; public static var PLN200:Class = OListCurrency_PLN200; public static var LTL500:Class = OListCurrency_LTL500; private static var iLTL:Array = ["LTL", 3.04, [[28.8, 1, 25, LTL1], [33.6, 2, 20, LTL2], [38.4, 5, 20, LTL5], [27.2, 10, 15, LTL10], [32, 20, 15, LTL20], [36.8, 50, 10, LTL50], [35.2, 100, 5, LTL100], [40, 200, 5, LTL200], [43.2, 500, 5, LTL500]]]; public static var XCD25:Class = OListCurrency_XCD25; private static var iList:Array = [iUAH, iUSD, iEUR, iBRL, iPLN, iILS, iLTL, iRUB, iAUD, iSGD, iPGK, iXCD, iJPY]; public static var JPY5:Class = OListCurrency_JPY5; public static var RUB10:Class = OListCurrency_RUB10; public static var AUD10:Class = OListCurrency_AUD10; public static var USD100:Class = OListCurrency_USD100; public static var JPY1:Class = OListCurrency_JPY1; public static var AUD20:Class = OListCurrency_AUD20; public static var EUR1:Class = OListCurrency_EUR1; private static var iPLN:Array = ["PLN", 2.44, [[24, 1, 25, PLN1], [27.2, 2, 20, PLN2], [30.4, 5, 15, PLN5], [26.6, 10, 15, PLN10], [28.8, 20, 10, PLN20], [32, 50, 10, PLN50], [36.8, 100, 5, PLN100], [33.6, 200, 5, PLN200], [38.4, 500, 5, PLN500]]]; public static var EUR5:Class = OListCurrency_EUR5; public static var PGK50:Class = OListCurrency_PGK50; public static var EUR2:Class = OListCurrency_EUR2; private static var iJPY:Array = ["JPY", 106.59, [[32, 100, 25, JPY1], [35.2, 500, 20, JPY5], [37.6, 1000, 15, JPY10], [33.6, 5000, 15, JPY50], [36.15, 10000, 10, JPY100], [42.4, 50000, 5, JPY500]]]; public static var UAH50:Class = OListCurrency_UAH50; public static var EUR200:Class = OListCurrency_EUR200; public static var LTL10:Class = OListCurrency_LTL10; public static var PLN100:Class = OListCurrency_PLN100; public static var LTL1:Class = OListCurrency_LTL1; public static var LTL2:Class = OListCurrency_LTL2; private static var iBRL:Array = ["BRL", 3.02, [[28.5, 1, 25, BRL1], [37, 5, 15, BRL5], [33, 10, 15, BRL10], [41.5, 25, 10, BRL25], [37.5, 50, 10, BRL50], [45, 100, 5, BRL100]]]; public static var LTL5:Class = OListCurrency_LTL5; public static var LTL20:Class = OListCurrency_LTL20; public static var SGD50:Class = OListCurrency_SGD50; public static var EUR100:Class = OListCurrency_EUR100; public static var BRL10:Class = OListCurrency_BRL10; public static var AUD200:Class = OListCurrency_AUD200; public static var AUD50:Class = OListCurrency_AUD50; public static var RUB200:Class = OListCurrency_RUB200; public static var UAH100:Class = OListCurrency_UAH100; public static var RUB100:Class = OListCurrency_RUB100; public static var RUB50:Class = OListCurrency_RUB50; public static var BRL25:Class = OListCurrency_BRL25; public static var EUR10:Class = OListCurrency_EUR10; public static var JPY100:Class = OListCurrency_JPY100; private static var iRUB:Array = ["RUB", 24.72, [[24, 1, 25, RUB1], [30.4, 5, 20, RUB5], [28.8, 10, 15, RUB10], [32, 50, 10, RUB50], [33.6, 100, 10, RUB100], [36.8, 200, 5, RUB200], [40, 500, 5, RUB500]]]; public static var LTL50:Class = OListCurrency_LTL50; public static var EUR20:Class = OListCurrency_EUR20; public static var AUD100:Class = OListCurrency_AUD100; public static var ILS500:Class = OListCurrency_ILS500; private static var iSGD:Array = ["SGD", 1.42, [[25.4, 1, 25, SGD1], [26.8, 5, 20, SGD5], [29.6, 10, 15, SGD10], [34.15, 20, 15, SGD20], [39.45, 50, 10, SGD50], [35.8, 100, 5, SGD100]]]; public static var JPY10:Class = OListCurrency_JPY10; public static var LTL200:Class = OListCurrency_LTL200; public static var PLN10:Class = OListCurrency_PLN10; public static var PGK1:Class = OListCurrency_PGK1; public static var PGK2:Class = OListCurrency_PGK2; public static var PGK5:Class = OListCurrency_PGK5; private static var iAUD:Array = ["AUD", 0.9, [[27.2, 1, 25, AUD1], [33.6, 2, 20, AUD2], [30.4, 5, 15, AUD5], [36.8, 10, 15, AUD10], [44.8, 20, 10, AUD20], [49.6, 50, 5, AUD50], [40, 100, 5, AUD100], [33.6, 200, 5, AUD200]]]; public static var SGD100:Class = OListCurrency_SGD100; public static var USD1:Class = OListCurrency_USD1; public static var USD5:Class = OListCurrency_USD5; public static var PLN20:Class = OListCurrency_PLN20; public static var BRL50:Class = OListCurrency_BRL50; public static var AUD1:Class = OListCurrency_AUD1; public static var AUD2:Class = OListCurrency_AUD2; public static var AUD5:Class = OListCurrency_AUD5; public static var LTL100:Class = OListCurrency_LTL100; public static var JPY50:Class = OListCurrency_JPY50; public static var ILS10:Class = OListCurrency_ILS10; private static var iXCD:Array = ["XCD", 2.72, [[29.45, 1, 25, XCD1], [34.3, 2, 20, XCD2], [36.95, 5, 15, XCD5], [28.85, 10, 10, XCD10], [38.35, 25, 10, XCD25], [42.4, 100, 5, XCD100]]]; public static var RUB1:Class = OListCurrency_RUB1; public static var RUB5:Class = OListCurrency_RUB5; public static var BRL5:Class = OListCurrency_BRL5; public static var BRL1:Class = OListCurrency_BRL1; public static var EUR50:Class = OListCurrency_EUR50; public static var SGD1:Class = OListCurrency_SGD1; public static var SGD5:Class = OListCurrency_SGD5; public static var PLN500:Class = OListCurrency_PLN500; public static var PLN50:Class = OListCurrency_PLN50; public static var ILS1000:Class = OListCurrency_ILS1000; public static function GetUSD():Array{ return (iUSD); } public static function GetEUR():Array{ return (iEUR); } public static function get Count():int{ return (iList.length); } public static function GetCurrency(_arg1:int):Array{ return (iList[(_arg1 % iList.length)]); } } }//package RES.OBJECTS.OGAME
Section 91
//OListCurrency_AUD1 (RES.OBJECTS.OGAME.OListCurrency_AUD1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 92
//OListCurrency_AUD10 (RES.OBJECTS.OGAME.OListCurrency_AUD10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 93
//OListCurrency_AUD100 (RES.OBJECTS.OGAME.OListCurrency_AUD100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 94
//OListCurrency_AUD2 (RES.OBJECTS.OGAME.OListCurrency_AUD2) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD2 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 95
//OListCurrency_AUD20 (RES.OBJECTS.OGAME.OListCurrency_AUD20) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD20 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 96
//OListCurrency_AUD200 (RES.OBJECTS.OGAME.OListCurrency_AUD200) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD200 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 97
//OListCurrency_AUD5 (RES.OBJECTS.OGAME.OListCurrency_AUD5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 98
//OListCurrency_AUD50 (RES.OBJECTS.OGAME.OListCurrency_AUD50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_AUD50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 99
//OListCurrency_BRL1 (RES.OBJECTS.OGAME.OListCurrency_BRL1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_BRL1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 100
//OListCurrency_BRL10 (RES.OBJECTS.OGAME.OListCurrency_BRL10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_BRL10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 101
//OListCurrency_BRL100 (RES.OBJECTS.OGAME.OListCurrency_BRL100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_BRL100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 102
//OListCurrency_BRL25 (RES.OBJECTS.OGAME.OListCurrency_BRL25) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_BRL25 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 103
//OListCurrency_BRL5 (RES.OBJECTS.OGAME.OListCurrency_BRL5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_BRL5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 104
//OListCurrency_BRL50 (RES.OBJECTS.OGAME.OListCurrency_BRL50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_BRL50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 105
//OListCurrency_EUR1 (RES.OBJECTS.OGAME.OListCurrency_EUR1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 106
//OListCurrency_EUR10 (RES.OBJECTS.OGAME.OListCurrency_EUR10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 107
//OListCurrency_EUR100 (RES.OBJECTS.OGAME.OListCurrency_EUR100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 108
//OListCurrency_EUR2 (RES.OBJECTS.OGAME.OListCurrency_EUR2) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR2 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 109
//OListCurrency_EUR20 (RES.OBJECTS.OGAME.OListCurrency_EUR20) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR20 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 110
//OListCurrency_EUR200 (RES.OBJECTS.OGAME.OListCurrency_EUR200) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR200 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 111
//OListCurrency_EUR5 (RES.OBJECTS.OGAME.OListCurrency_EUR5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 112
//OListCurrency_EUR50 (RES.OBJECTS.OGAME.OListCurrency_EUR50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_EUR50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 113
//OListCurrency_ILS1 (RES.OBJECTS.OGAME.OListCurrency_ILS1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_ILS1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 114
//OListCurrency_ILS10 (RES.OBJECTS.OGAME.OListCurrency_ILS10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_ILS10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 115
//OListCurrency_ILS100 (RES.OBJECTS.OGAME.OListCurrency_ILS100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_ILS100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 116
//OListCurrency_ILS1000 (RES.OBJECTS.OGAME.OListCurrency_ILS1000) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_ILS1000 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 117
//OListCurrency_ILS5 (RES.OBJECTS.OGAME.OListCurrency_ILS5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_ILS5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 118
//OListCurrency_ILS50 (RES.OBJECTS.OGAME.OListCurrency_ILS50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_ILS50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 119
//OListCurrency_ILS500 (RES.OBJECTS.OGAME.OListCurrency_ILS500) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_ILS500 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 120
//OListCurrency_JPY1 (RES.OBJECTS.OGAME.OListCurrency_JPY1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_JPY1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 121
//OListCurrency_JPY10 (RES.OBJECTS.OGAME.OListCurrency_JPY10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_JPY10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 122
//OListCurrency_JPY100 (RES.OBJECTS.OGAME.OListCurrency_JPY100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_JPY100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 123
//OListCurrency_JPY5 (RES.OBJECTS.OGAME.OListCurrency_JPY5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_JPY5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 124
//OListCurrency_JPY50 (RES.OBJECTS.OGAME.OListCurrency_JPY50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_JPY50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 125
//OListCurrency_JPY500 (RES.OBJECTS.OGAME.OListCurrency_JPY500) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_JPY500 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 126
//OListCurrency_LTL1 (RES.OBJECTS.OGAME.OListCurrency_LTL1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 127
//OListCurrency_LTL10 (RES.OBJECTS.OGAME.OListCurrency_LTL10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 128
//OListCurrency_LTL100 (RES.OBJECTS.OGAME.OListCurrency_LTL100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 129
//OListCurrency_LTL2 (RES.OBJECTS.OGAME.OListCurrency_LTL2) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL2 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 130
//OListCurrency_LTL20 (RES.OBJECTS.OGAME.OListCurrency_LTL20) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL20 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 131
//OListCurrency_LTL200 (RES.OBJECTS.OGAME.OListCurrency_LTL200) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL200 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 132
//OListCurrency_LTL5 (RES.OBJECTS.OGAME.OListCurrency_LTL5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 133
//OListCurrency_LTL50 (RES.OBJECTS.OGAME.OListCurrency_LTL50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 134
//OListCurrency_LTL500 (RES.OBJECTS.OGAME.OListCurrency_LTL500) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_LTL500 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 135
//OListCurrency_PGK1 (RES.OBJECTS.OGAME.OListCurrency_PGK1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PGK1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 136
//OListCurrency_PGK10 (RES.OBJECTS.OGAME.OListCurrency_PGK10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PGK10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 137
//OListCurrency_PGK100 (RES.OBJECTS.OGAME.OListCurrency_PGK100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PGK100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 138
//OListCurrency_PGK2 (RES.OBJECTS.OGAME.OListCurrency_PGK2) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PGK2 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 139
//OListCurrency_PGK20 (RES.OBJECTS.OGAME.OListCurrency_PGK20) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PGK20 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 140
//OListCurrency_PGK5 (RES.OBJECTS.OGAME.OListCurrency_PGK5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PGK5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 141
//OListCurrency_PGK50 (RES.OBJECTS.OGAME.OListCurrency_PGK50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PGK50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 142
//OListCurrency_PLN1 (RES.OBJECTS.OGAME.OListCurrency_PLN1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 143
//OListCurrency_PLN10 (RES.OBJECTS.OGAME.OListCurrency_PLN10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 144
//OListCurrency_PLN100 (RES.OBJECTS.OGAME.OListCurrency_PLN100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 145
//OListCurrency_PLN2 (RES.OBJECTS.OGAME.OListCurrency_PLN2) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN2 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 146
//OListCurrency_PLN20 (RES.OBJECTS.OGAME.OListCurrency_PLN20) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN20 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 147
//OListCurrency_PLN200 (RES.OBJECTS.OGAME.OListCurrency_PLN200) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN200 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 148
//OListCurrency_PLN5 (RES.OBJECTS.OGAME.OListCurrency_PLN5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 149
//OListCurrency_PLN50 (RES.OBJECTS.OGAME.OListCurrency_PLN50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 150
//OListCurrency_PLN500 (RES.OBJECTS.OGAME.OListCurrency_PLN500) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_PLN500 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 151
//OListCurrency_RUB1 (RES.OBJECTS.OGAME.OListCurrency_RUB1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_RUB1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 152
//OListCurrency_RUB10 (RES.OBJECTS.OGAME.OListCurrency_RUB10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_RUB10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 153
//OListCurrency_RUB100 (RES.OBJECTS.OGAME.OListCurrency_RUB100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_RUB100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 154
//OListCurrency_RUB200 (RES.OBJECTS.OGAME.OListCurrency_RUB200) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_RUB200 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 155
//OListCurrency_RUB5 (RES.OBJECTS.OGAME.OListCurrency_RUB5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_RUB5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 156
//OListCurrency_RUB50 (RES.OBJECTS.OGAME.OListCurrency_RUB50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_RUB50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 157
//OListCurrency_RUB500 (RES.OBJECTS.OGAME.OListCurrency_RUB500) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_RUB500 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 158
//OListCurrency_SGD1 (RES.OBJECTS.OGAME.OListCurrency_SGD1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_SGD1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 159
//OListCurrency_SGD10 (RES.OBJECTS.OGAME.OListCurrency_SGD10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_SGD10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 160
//OListCurrency_SGD100 (RES.OBJECTS.OGAME.OListCurrency_SGD100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_SGD100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 161
//OListCurrency_SGD20 (RES.OBJECTS.OGAME.OListCurrency_SGD20) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_SGD20 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 162
//OListCurrency_SGD5 (RES.OBJECTS.OGAME.OListCurrency_SGD5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_SGD5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 163
//OListCurrency_SGD50 (RES.OBJECTS.OGAME.OListCurrency_SGD50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_SGD50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 164
//OListCurrency_UAH1 (RES.OBJECTS.OGAME.OListCurrency_UAH1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_UAH1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 165
//OListCurrency_UAH10 (RES.OBJECTS.OGAME.OListCurrency_UAH10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_UAH10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 166
//OListCurrency_UAH100 (RES.OBJECTS.OGAME.OListCurrency_UAH100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_UAH100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 167
//OListCurrency_UAH2 (RES.OBJECTS.OGAME.OListCurrency_UAH2) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_UAH2 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 168
//OListCurrency_UAH25 (RES.OBJECTS.OGAME.OListCurrency_UAH25) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_UAH25 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 169
//OListCurrency_UAH5 (RES.OBJECTS.OGAME.OListCurrency_UAH5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_UAH5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 170
//OListCurrency_UAH50 (RES.OBJECTS.OGAME.OListCurrency_UAH50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_UAH50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 171
//OListCurrency_USD1 (RES.OBJECTS.OGAME.OListCurrency_USD1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_USD1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 172
//OListCurrency_USD10 (RES.OBJECTS.OGAME.OListCurrency_USD10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_USD10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 173
//OListCurrency_USD100 (RES.OBJECTS.OGAME.OListCurrency_USD100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_USD100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 174
//OListCurrency_USD25 (RES.OBJECTS.OGAME.OListCurrency_USD25) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_USD25 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 175
//OListCurrency_USD5 (RES.OBJECTS.OGAME.OListCurrency_USD5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_USD5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 176
//OListCurrency_USD50 (RES.OBJECTS.OGAME.OListCurrency_USD50) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_USD50 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 177
//OListCurrency_XCD1 (RES.OBJECTS.OGAME.OListCurrency_XCD1) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_XCD1 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 178
//OListCurrency_XCD10 (RES.OBJECTS.OGAME.OListCurrency_XCD10) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_XCD10 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 179
//OListCurrency_XCD100 (RES.OBJECTS.OGAME.OListCurrency_XCD100) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_XCD100 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 180
//OListCurrency_XCD2 (RES.OBJECTS.OGAME.OListCurrency_XCD2) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_XCD2 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 181
//OListCurrency_XCD25 (RES.OBJECTS.OGAME.OListCurrency_XCD25) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_XCD25 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 182
//OListCurrency_XCD5 (RES.OBJECTS.OGAME.OListCurrency_XCD5) package RES.OBJECTS.OGAME { import mx.core.*; public class OListCurrency_XCD5 extends BitmapAsset { } }//package RES.OBJECTS.OGAME
Section 183
//OMinTimeCollision (RES.OBJECTS.OGAME.OMinTimeCollision) package RES.OBJECTS.OGAME { public class OMinTimeCollision { private const iZero:Number = 1E-8; private var iResult1:Array; private var iResult2:Array; private var iMinTime:Number; private var ret:Array; private var tret:Array; private var ret1:Array; private var ret2:Array; private var dVx:Number;// = 0 private var dVy:Number;// = 0 private var iMinR:Number; private var iMinX:Number; private var iMinY:Number; private var a:Number;// = 0 private var c:Number;// = 0 private var iResult:Array; private var b:Number;// = 0 private var d:Number;// = 0 private var r:Number;// = 0 private var dX:Number;// = 0 private var dY:Number;// = 0 public function OMinTimeCollision(){ dVx = 0; dVy = 0; dX = 0; dY = 0; a = 0; b = 0; c = 0; r = 0; ret = []; ret1 = [0]; ret2 = [0, 0]; d = 0; iResult = []; iResult1 = [0]; iResult2 = [0, 0]; super(); Reset(); } public function get MinTime():Number{ return (iMinTime); } public function Reset():void{ iMinTime = Number.MAX_VALUE; iMinX = 0; iMinY = 0; iMinR = 0; } public function CalculateTimeCollision(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number):void{ dVx = (_arg3 - _arg8); dVx = Zero(dVx, iZero); dVy = (_arg4 - _arg9); dVy = Zero(dVy, iZero); dX = (_arg1 - _arg6); dX = Zero(dX, iZero); dY = (_arg2 - _arg7); dY = Zero(dY, iZero); r = (_arg5 + _arg10); if (((dX * -(dVx)) + (dY * -(dVy))) <= 0){ return; }; if ((((dVx == 0)) && ((dX == 0)))){ ret1[0] = ((Math.abs(dY) - r) / Math.abs(dVy)); ret1[0] = NumberLimit(ret1[0]); ret1[0] = Zero(ret1[0], iZero); tret = ret1; } else { if ((((dVy == 0)) && ((dY == 0)))){ ret1[0] = ((Math.abs(dX) - r) / Math.abs(dVx)); ret1[0] = NumberLimit(ret1[0]); ret1[0] = Zero(ret1[0], iZero); tret = ret1; } else { a = ((dVx * dVx) + (dVy * dVy)); b = (2 * ((dX * dVx) + (dY * dVy))); c = (((dX * dX) + (dY * dY)) - (r * r)); tret = CalculationQuadraticEquation(a, b, c); }; }; switch (tret.length){ case 2: if (tret[0] < 0){ if (tret[1] < 0){ return; }; ret1[0] = tret[1]; Analis(ret1, _arg6, _arg7, _arg10); } else { if (tret[1] < 0){ ret1[0] = tret[0]; Analis(ret1, _arg6, _arg7, _arg10); } else { Analis(tret, _arg6, _arg7, _arg10); }; }; case 1: if (tret[0] < 0){ return; }; Analis(tret, _arg6, _arg7, _arg10); case 0: return; }; } private function NumberLimit(_arg1:Number):Number{ var _local2:int; _local2 = 1000000000; _arg1 = Math.floor((_arg1 * _local2)); return ((_arg1 / _local2)); } private function One(_arg1:Number):Number{ var _local2:Number; var _local3:Number; _local2 = 0.99999999; _local3 = 1; if ((((_arg1 > _local2)) && ((_arg1 < _local3)))){ return (1); }; return (_arg1); } private function Zero(_arg1:Number, _arg2:Number):Number{ if ((((_arg1 <= _arg2)) && ((_arg1 >= -(_arg2))))){ return (0); }; return (_arg1); } private function CalculationQuadraticEquation(_arg1:Number, _arg2:Number, _arg3:Number):Array{ if (_arg1 == 0){ if (_arg2 != 0){ iResult1[0] = (-(_arg3) / _arg2); iResult1[0] = NumberLimit(iResult1[0]); iResult1[0] = Zero(iResult1[0], iZero); iResult1[0] = One(iResult1[0]); return (iResult1); }; return (iResult); } else { d = ((_arg2 * _arg2) - ((4 * _arg1) * _arg3)); d = NumberLimit(d); d = Zero(d, iZero); if (d < 0){ return (iResult); }; if (d == 0){ iResult1[0] = (-(_arg2) / (2 * _arg1)); iResult1[0] = NumberLimit(iResult1[0]); iResult1[0] = Zero(iResult1[0], iZero); iResult1[0] = One(iResult1[0]); return (iResult1); }; d = Math.sqrt(d); _arg1 = (2 * _arg1); _arg2 = -(_arg2); iResult2[0] = ((_arg2 - d) / _arg1); iResult2[0] = NumberLimit(iResult2[0]); iResult2[0] = Zero(iResult2[0], iZero); iResult2[0] = One(iResult2[0]); iResult2[1] = ((_arg2 + d) / _arg1); iResult2[1] = NumberLimit(iResult2[1]); iResult2[1] = Zero(iResult2[1], iZero); }; 1[!NULL!].One(!NULL!)[!NULL!] = !NULL!; return (iResult2); } public function get MinR():Number{ return (iMinR); } public function get MinX():Number{ return (iMinX); } public function get MinY():Number{ return (iMinY); } private function Analis(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Number):void{ var _local5:Number; switch (_arg1.length){ case 0: return; case 1: _local5 = _arg1[0]; break; case 2: _local5 = Math.min(_arg1[0], _arg1[1]); break; }; if (_local5 < iMinTime){ iMinTime = _local5; iMinX = _arg2; iMinY = _arg3; iMinR = _arg4; } else { if (_local5 == iMinTime){ if (_arg3 > iMinY){ iMinTime = _local5; iMinX = _arg2; iMinY = _arg3; iMinR = _arg4; }; }; }; } } }//package RES.OBJECTS.OGAME
Section 184
//OLLevels (RES.OBJECTS.OLEVELS.OLLevels) package RES.OBJECTS.OLEVELS { public class OLLevels { private static var iLevelList:Array = [[2, 1, [3, 2, 1, 0, 0, 0, 0, 0, 0], 250], [1, 0, [3, 2, 2, 1, 0, 0, 0, 0, 0], 300], [3, 0, [3, 3, 2, 2, 1, 0, 0, 0, 0], 350], [3, 12, [0, 4, 3, 3, 2, 2, 1, 0, 0], 400], [8, 12, [4, 4, 3, 3, 2, 2, 0, 0, 0], 450], [8, 9, [4, 4, 3, 3, 2, 2, 1, 1, 0], 450], [9, 7, [4, 4, 3, 3, 2, 2, 0, 0, 0], 450], [6, 7, [5, 4, 4, 3, 3, 2, 2, 0, 0], 450], [4, 6, [5, 5, 4, 4, 3, 3, 2, 2, 1], 450], [4, 11, [5, 5, 4, 4, 3, 3, 2, 2, 1], 450], [10, 11, [5, 5, 4, 4, 3, 3, 2, 0, 0], 450], [10, 5, [6, 5, 5, 4, 4, 3, 3, 0, 0], 450], [2, 5, [6, 6, 5, 5, 4, 4, 3, 3, 0], 450], [2, 8, [6, 6, 5, 5, 4, 4, 3, 3, 0], 450], [8, 1, [6, 6, 5, 5, 4, 4, 3, 3, 0], 450], [1, 9, [7, 6, 6, 5, 5, 4, 0, 0, 0], 450], [9, 4, [7, 7, 6, 6, 5, 5, 0, 0, 0], 450], [4, 11, [7, 7, 6, 6, 5, 5, 4, 4, 3], 450], [11, 3, [7, 7, 6, 6, 5, 5, 0, 0, 0], 450], [3, 6, [8, 7, 7, 6, 6, 5, 0, 0, 0], 450], [6, 5, [8, 8, 7, 7, 6, 6, 5, 5, 4], 450], [5, 0, [8, 8, 7, 7, 6, 6, 5, 0, 0], 450], [0, 7, [8, 8, 7, 7, 6, 6, 5, 0, 0], 450], [7, 12, [0, 0, 0, 10, 10, 9, 9, 0, 0], 450], [10, 12, [9, 9, 8, 8, 7, 7, 6, 0, 0], 450], [10, 4, [9, 9, 8, 8, 7, 7, 6, 0, 0], 450], [2, 4, [9, 9, 8, 8, 7, 7, 6, 6, 0], 450], [2, 11, [10, 9, 9, 8, 8, 7, 7, 6, 0], 450], [8, 11, [10, 10, 9, 9, 8, 8, 7, 7, 0], 450], [8, 3, [10, 10, 9, 9, 8, 8, 7, 7, 0], 450], [1, 3, [10, 10, 9, 9, 8, 8, 0, 0, 0], 450], [1, 6, [11, 10, 10, 9, 9, 8, 0, 0, 0], 450], [9, 6, [11, 11, 10, 10, 9, 9, 0, 0, 0], 450], [9, 5, [11, 11, 10, 10, 9, 9, 0, 0, 0], 450], [5, 12, [0, 0, 0, 11, 11, 11, 11, 0, 0], 450]]; public static function _LevelList(_arg1:int):Array{ return (iLevelList[(_arg1 % iLevelList.length)]); } public static function get LevelCount():int{ return (iLevelList.length); } } }//package RES.OBJECTS.OLEVELS
Section 185
//CExplodeParticle (RES.OBJECTS.Particle.CExplodeParticle) package RES.OBJECTS.Particle { public class CExplodeParticle extends CSimpleFallParticle { public static const MOVE_DOWN:int = 1; public static const MOVE_LEFT:int = 2; public static const MOVE_UP:int = 0; public static const MOVE_RIGHT:int = 3; public function CExplodeParticle(_arg1:int, _arg2:CParticleContainer, _arg3:int){ super(_arg1, _arg2); super.dAlpha = ((Math.random() * 0.2) + 0.02); switch (_arg3){ case CExplodeParticle.MOVE_UP: super.dx = ((Math.random() * 2) - 1); super.dy = ((-(Math.random()) * 4) - 1); break; case CExplodeParticle.MOVE_DOWN: super.dx = ((Math.random() * 2) - 1); super.dy = ((Math.random() * 4) + 1); break; case CExplodeParticle.MOVE_LEFT: super.dx = ((-(Math.random()) * 4) - 1); super.dy = ((Math.random() * 2) - 1); break; case CExplodeParticle.MOVE_RIGHT: super.dx = ((Math.random() * 4) + 1); super.dy = ((Math.random() * 2) - 1); break; }; } } }//package RES.OBJECTS.Particle
Section 186
//CParticle (RES.OBJECTS.Particle.CParticle) package RES.OBJECTS.Particle { public interface CParticle { function onTimer():void; } }//package RES.OBJECTS.Particle
Section 187
//CParticleContainer (RES.OBJECTS.Particle.CParticleContainer) package RES.OBJECTS.Particle { import ENGINE.DISPLAY.*; import flash.events.*; public class CParticleContainer extends OSprite { private var aParticlesList:Array; public function CParticleContainer(){ aParticlesList = new Array(); super(); addEventListener(Event.ENTER_FRAME, onTimer); } public function _createExplodeParticles(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:CParticle; var _local7:int; var _local8:int; _local7 = _arg2; while (_local7 < _arg4) { _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_UP); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _local7; (_local6 as CExplodeParticle).prY = _arg3; this.addChild((_local6 as OSprite)); _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_DOWN); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _local7; (_local6 as CExplodeParticle).prY = _arg5; this.addChild((_local6 as OSprite)); _local7 = (_local7 + 4); }; _local7 = _arg3; while (_local7 < _arg5) { _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_LEFT); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _arg2; (_local6 as CExplodeParticle).prY = _local7; this.addChild((_local6 as OSprite)); _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_RIGHT); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _arg4; (_local6 as CExplodeParticle).prY = _local7; this.addChild((_local6 as OSprite)); _local7 = (_local7 + 4); }; } public function removeParticle(_arg1:CParticle):void{ var _local2:int; _local2 = 0; while (_local2 < aParticlesList.length) { if (aParticlesList[_local2] == _arg1){ this.removeChild((_arg1 as OSprite)); aParticlesList.splice(_local2, 1); return; }; _local2++; }; } public function addSimpleParticle(_arg1:int, _arg2:int, _arg3:int):void{ var _local4:CParticle; _local4 = new CSimpleFallParticle(_arg1, this); aParticlesList.push(_local4); (_local4 as CSimpleFallParticle).prX = _arg2; (_local4 as CSimpleFallParticle).prY = _arg3; this.addChild((_local4 as OSprite)); } override public function Free():void{ this.removeEventListener(Event.ENTER_FRAME, onTimer); super.Free(); } public function onTimer(_arg1:Event):void{ var _local2:int; _local2 = 0; while (_local2 < aParticlesList.length) { (aParticlesList[_local2] as CParticle).onTimer(); _local2++; }; } public function addRunParticle(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:CParticle; _local5 = new CSimpleRunParticle(_arg1, this, _arg2, _arg3, _arg4); aParticlesList.push(_local5); (_local5 as CSimpleRunParticle).prX = _arg2; (_local5 as CSimpleRunParticle).prY = _arg3; this.addChild((_local5 as OSprite)); } public function addSimpleDigitParticle(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:CParticle; _local5 = new CSimpleDigitParticle(_arg2, _arg1, this); aParticlesList.push(_local5); (_local5 as CSimpleDigitParticle).prX = _arg3; (_local5 as CSimpleDigitParticle).prY = _arg4; this.addChild((_local5 as OSprite)); } } }//package RES.OBJECTS.Particle
Section 188
//CSimpleDigitParticle (RES.OBJECTS.Particle.CSimpleDigitParticle) package RES.OBJECTS.Particle { import ENGINE.DISPLAY.*; import flash.geom.*; import RES.OBJECTS.*; public class CSimpleDigitParticle extends OSprite implements CParticle { private var TotalTime:int;// = 100 protected var dAlpha:Number; private var gBitmap:OBitmap; private var cParticleContainer:CParticleContainer; protected var dy:Number; protected var dr:Number; protected var dx:Number; private var iTime:int; protected var dVelY:Number; protected var dVelX:Number; public function CSimpleDigitParticle(_arg1:int, _arg2:int, _arg3:CParticleContainer){ var _local4:Point; var _local5:Number; var _local6:Number; TotalTime = 100; this.cParticleContainer = _arg3; super(); gBitmap = new OBitmap(); gBitmap.CopyFrom(CPrototypeFactory.aParticles[(_arg2 - 1)][(_arg1 % CPrototypeFactory.aParticles[0].length)]); this.addChild(gBitmap); this.dx = ((Math.random() * 3) - 1.5); this.dy = ((Math.random() * 3) - 1.5); _local4 = new Point(dx, dy); _local5 = (_local4.length * 0.15); if (Math.random() < 0.5){ _local4.normalize((_local4.length * 1.15)); } else { _local4.normalize((_local4.length * 0.85)); }; dx = _local4.x; dy = _local4.y; dVelX = (dx / 100); dVelY = (dy / 100); _local6 = (TotalTime * 0.15); if (Math.random() < 0.5){ TotalTime = (TotalTime - _local6); } else { TotalTime = (TotalTime + _local6); }; this.dAlpha = (1 / ((2 * TotalTime) / 3)); this.alpha = 1; iTime = 0; } public function onTimer():void{ iTime++; if (iTime > (TotalTime / 3)){ this.alpha = (this.alpha - this.dAlpha); }; if ((((iTime > TotalTime)) || ((this.alpha <= 0.2)))){ cParticleContainer.removeParticle(this); }; this.Move(dx, dy); dx = (dx - dVelX); dy = (dy - dVelY); } } }//package RES.OBJECTS.Particle
Section 189
//CSimpleFallParticle (RES.OBJECTS.Particle.CSimpleFallParticle) package RES.OBJECTS.Particle { import ENGINE.DISPLAY.*; import RES.OBJECTS.*; public class CSimpleFallParticle extends OSprite implements CParticle { private const TotalTime:int = 50; protected var dAlpha:Number; private var gBitmap:OBitmap; private var cParticleContainer:CParticleContainer; protected var dy:Number; protected var dr:Number; protected var dx:Number; private var iTime:int; protected var dVelY:Number; protected var dVelX:Number; public function CSimpleFallParticle(_arg1:int, _arg2:CParticleContainer){ this.cParticleContainer = _arg2; super(); gBitmap = new OBitmap(); gBitmap.CopyFrom(CPrototypeFactory.aParticles[(_arg1 % CPrototypeFactory.aParticles.length)]); this.addChild(gBitmap); this.dx = ((Math.random() * 4) - 2); this.dy = ((Math.random() * 4) - 2); this.dVelX = (dx / TotalTime); this.dVelY = (dy / TotalTime); this.dAlpha = (1 / ((2 * TotalTime) / 3)); this.alpha = 1; iTime = 0; } public function onTimer():void{ iTime++; if (iTime > (TotalTime / 3)){ this.alpha = (this.alpha - this.dAlpha); }; if ((((iTime > TotalTime)) || ((this.alpha <= 0.2)))){ cParticleContainer.removeParticle(this); }; this.Move(dx, dy); dx = (dx - dVelX); dy = (dy - dVelY); } } }//package RES.OBJECTS.Particle
Section 190
//CSimpleRunParticle (RES.OBJECTS.Particle.CSimpleRunParticle) package RES.OBJECTS.Particle { import ENGINE.DISPLAY.*; import RES.OBJECTS.*; public class CSimpleRunParticle extends OSprite implements CParticle { private const TotalTime:int = 50; private var iRadius:Number; protected var dAlpha:Number; private var gBitmap:OBitmap; private var cParticleContainer:CParticleContainer; private var x0:Number; private var dAngle:Number; private var iTime:int; private var y0:Number; private var iAngle:Number; public function CSimpleRunParticle(_arg1:int, _arg2:CParticleContainer, _arg3:Number, _arg4:Number, _arg5:Number){ this.cParticleContainer = _arg2; super(); gBitmap = new OBitmap(); gBitmap.CopyFrom(CPrototypeFactory.aParticles[(_arg1 % CPrototypeFactory.aParticles.length)]); this.addChild(gBitmap); iRadius = _arg5; x0 = _arg3; y0 = _arg4; iAngle = ((((2 * Math.PI) / 12) * (_arg1 % 12)) * 2); dAngle = ((2 * Math.PI) / TotalTime); this.dAlpha = (1 / (TotalTime / 3)); this.alpha = 1; iTime = 0; } public function onTimer():void{ iTime++; if (iTime > ((2 * TotalTime) / 3)){ this.alpha = (this.alpha - this.dAlpha); }; if ((((iTime > TotalTime)) || ((this.alpha <= 0.2)))){ cParticleContainer.removeParticle(this); }; iAngle = (iAngle + dAngle); this.Pos((x0 + (iRadius * Math.cos(iAngle))), (y0 - (iRadius * Math.sin(iAngle)))); } } }//package RES.OBJECTS.Particle
Section 191
//AIConvertChar (RES.OBJECTS.UTILS.AIConvertChar) package RES.OBJECTS.UTILS { public class AIConvertChar { public static const ABC:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; public static function ToTriadChar(_arg1:int):String{ var _local2:int; var _local3:String; _local2 = _arg1; _local3 = ""; do { _local3 = (_local3 + ABC.charAt((_local2 % ABC.length))); _local2 = (_local2 / ABC.length); } while (_local2 != 0); while (_local3.length < 3) { _local3 = (_local3 + "A"); }; return (_local3); } public static function ToChar(_arg1:int):String{ var _local2:int; var _local3:String; _local2 = _arg1; _local3 = ""; do { _local3 = ABC.charAt((_local2 % ABC.length)); _local2 = (_local2 / ABC.length); } while (_local2 != 0); return (_local3); } public static function FromChar(_arg1:String):int{ var _local2:String; var _local3:int; _local2 = _arg1; _local3 = 0; while (_local2 != "") { _local3 = (_local3 * ABC.length); _local3 = (_local3 + ABC.indexOf(_local2.substr((_local2.length - 1), 1))); _local2 = _local2.substr(0, (_local2.length - 1)); }; return (_local3); } public static function ToDoubleChar(_arg1:int):String{ var _local2:int; var _local3:String; _local2 = _arg1; _local3 = ""; do { _local3 = (_local3 + ABC.charAt((_local2 % ABC.length))); _local2 = (_local2 / ABC.length); } while (_local2 != 0); while (_local3.length < 2) { _local3 = (_local3 + "A"); }; return (_local3); } } }//package RES.OBJECTS.UTILS
Section 192
//OFlairSplash (RES.OBJECTS.UTILS.OFlairSplash) package RES.OBJECTS.UTILS { import flash.events.*; import flash.display.*; public class OFlairSplash extends Sprite { private var iMin:Number; private var iNumSplash:int; private var d:DisplayObject; private var iCounterSplash:int; private var iDA:Number; private var iDisplayObjects:Array; private var iSplashMode:Boolean; private var iA:Number; public function OFlairSplash(_arg1:Number=1, _arg2:Number=-0.05, _arg3:Number=0.2, _arg4:int=2147483647){ iDisplayObjects = new Array(); iSplashMode = false; iA = _arg1; iDA = _arg2; iMin = _arg3; iNumSplash = _arg4; } public function set Splash(_arg1:Boolean):void{ iSplashMode = _arg1; if (iSplashMode){ iCounterSplash = 0; addEventListener(Event.ENTER_FRAME, OnEnterFrame); }; } public function set DeltaAlpha(_arg1:Number):void{ if (!iSplashMode){ iDA = _arg1; }; } public function set Alpha(_arg1:Number):void{ if (!iSplashMode){ iA = _arg1; }; } public function get Splash():Boolean{ return (iSplashMode); } public function set MinAlpha(_arg1:Number):void{ if (!iSplashMode){ iMin = _arg1; }; } public function Free():void{ iDisplayObjects = null; removeEventListener(Event.ENTER_FRAME, OnEnterFrame); } public function AddDisplayObject(_arg1:DisplayObject):void{ iDisplayObjects.push(_arg1); } private function OnEnterFrame(_arg1:Event):void{ if (iSplashMode){ iA = (iA + iDA); if ((((iA <= iMin)) || ((iA >= 1)))){ iDA = (iDA * -1); if (iA < iMin){ iA = iMin; }; if (iA > 1){ iA = 1; }; if (iNumSplash != int.MAX_VALUE){ iCounterSplash++; }; }; for each (d in iDisplayObjects) { d.alpha = iA; }; if (iCounterSplash == iNumSplash){ iSplashMode = false; removeEventListener(Event.ENTER_FRAME, OnEnterFrame); }; }; } public function set NumSplash(_arg1:Number):void{ if (!iSplashMode){ iNumSplash = _arg1; }; } } }//package RES.OBJECTS.UTILS
Section 193
//OLOpponentPlay (RES.OBJECTS.UTILS.OLOpponentPlay) package RES.OBJECTS.UTILS { import RES.OBJECTS.OGAME.*; public class OLOpponentPlay { private var iTCount:int; private var iIndex:int; private var iState:int; private var iGameManager:OGameManager; private var iTDelay:int; private var iRecord:String; public static const stPlay:int = 1; public static const stNone:int = 0; public static const stEnd:int = 2; public static const RESET:int = 1000; public function OLOpponentPlay(_arg1:OGameManager, _arg2:String){ iGameManager = _arg1; iRecord = _arg2; this.State = stPlay; } private function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stNone: break; case stPlay: ParseCommand(); break; case stEnd: break; }; } public function OnTimer():void{ switch (iState){ case stNone: break; case stPlay: if ((iGameManager.iCounterEF - iTCount) == iTDelay){ Action(); ParseCommand(); }; break; case stEnd: break; }; } public function AddCommand(_arg1:String):void{ this.iRecord = (this.iRecord + _arg1); } public function Free():void{ } private function get State():int{ return (iState); } private function Action():void{ if (iIndex != RESET){ iGameManager.Click(iIndex); } else { iGameManager.Reset(); }; } private function ParseCommand():void{ if (iRecord.length == 0){ this.State = stEnd; return; }; iTCount = iGameManager.iCounterEF; iTDelay = AIConvertChar.FromChar(iRecord.slice(0, 2)); iRecord = iRecord.substr(2); iIndex = AIConvertChar.FromChar(iRecord.slice(0, 2)); iRecord = iRecord.substr(2); if (iTDelay == 0){ Action(); ParseCommand(); }; } } }//package RES.OBJECTS.UTILS
Section 194
//OLUtils (RES.OBJECTS.UTILS.OLUtils) package RES.OBJECTS.UTILS { import flash.geom.*; public class OLUtils { public static function CloneArray(_arg1:Array):Array{ var _local2:Array; var _local3:int; _local2 = new Array(); _local3 = 0; while (_local3 < _arg1.length) { if ((_arg1[_local3] is Array)){ _local2.push(CloneArray(_arg1[_local3])); } else { _local2.push(_arg1[_local3]); }; _local3++; }; return (_local2); } public static function XYtoAB(_arg1:Array):Array{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = (_arg1[0][0] - _arg1[1][0]); _local3 = (_arg1[0][1] - _arg1[1][1]); _local4 = (_local3 / _local2); _local5 = (_arg1[0][1] - (_arg1[0][0] * _local4)); return ([_local4, _local5]); } public static function Basis(_arg1:Array):Point{ var _local2:Point; var _local3:Point; var _local4:Point; var _local5:Number; var _local6:Number; var _local7:Point; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Point; _local2 = _arg1[0]; _local3 = _arg1[1]; _local4 = _arg1[2].clone(); _local4.normalize(1); _local5 = _arg1[3]; _local6 = (((_local3.x - _local2.x) * _local4.x) + ((_local3.y - _local2.y) * _local4.y)); _local7 = new Point(((_local6 * _local4.x) + _local2.x), ((_local6 * _local4.y) + _local2.y)); _local8 = Math.abs(((-((_local3.x - _local2.x)) * _local4.y) + ((_local3.y - _local2.y) * _local4.x))); if (_local8 > _local5){ return (null); }; _local9 = Math.sqrt((Math.pow(_local5, 2) - Math.pow(_local8, 2))); _local10 = (_local6 - _local9); if (_local10 <= _arg1[2].length){ _local4.normalize(_local10); _local11 = new Point((_local2.x + _local4.x), (_local2.y + _local4.y)); }; return (_local11); } } }//package RES.OBJECTS.UTILS
Section 195
//OXML (RES.OBJECTS.XMLLOADER.OXML) package RES.OBJECTS.XMLLOADER { import flash.events.*; import RES.OBJECTS.OGAME.*; import flash.net.*; public class OXML { private var iProcess:int; private var iLoader:URLLoader; private var iCurrencyList:Object; private var iState:int; private var iXML:XML; private var iLevelXML:Array; public static const STATE_NONE:int = 0; public static const STATE_ON_ERROR:int = 2; public static const STATE_ON_COMPLETE:int = 1; public static const STATE_ON_PROGRESS:int = 3; public function OXML(){ this.iState = STATE_NONE; this.iLevelXML = null; this.iCurrencyList = null; } private function ONIOError(_arg1:IOErrorEvent):void{ this.iState = STATE_ON_ERROR; this.iLoader.removeEventListener(Event.COMPLETE, this.OnComplete); this.iLoader.removeEventListener(ProgressEvent.PROGRESS, this.OnProcess); this.iLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.ONIOError); } public function Load(_arg1:String):void{ var aPath = _arg1; this.iXML = null; this.iProcess = 0; this.iLoader = new URLLoader(); this.iLoader.addEventListener(Event.COMPLETE, this.OnComplete); this.iLoader.addEventListener(ProgressEvent.PROGRESS, this.OnProcess); this.iLoader.addEventListener(IOErrorEvent.IO_ERROR, this.ONIOError); try { this.iLoader.load(new URLRequest(aPath)); this.iState = STATE_ON_PROGRESS; } catch(error:Error) { this.iState = STATE_ON_ERROR; this.iLoader.removeEventListener(Event.COMPLETE, this.OnComplete); this.iLoader.removeEventListener(ProgressEvent.PROGRESS, this.OnProcess); this.iLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.ONIOError); }; } public function get Process():int{ return (this.iProcess); } private function OnComplete(_arg1:Event):void{ var _local2:URLLoader; _local2 = URLLoader(_arg1.target); this.iLoader.removeEventListener(Event.COMPLETE, this.OnComplete); this.iLoader.removeEventListener(ProgressEvent.PROGRESS, this.OnProcess); this.iLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.ONIOError); this.iXML = new XML(_local2.data); this.iLevelXML = OXML.generateLevels(this.iXML); this.iCurrencyList = OXML.generateCurrency(this.iXML); this.iState = STATE_ON_COMPLETE; } public function get LevelList():Array{ return (this.iLevelXML); } public function get CurrencyList():Object{ return (this.iCurrencyList); } private function OnProcess(_arg1:ProgressEvent):void{ this.iProcess = ((_arg1.bytesLoaded * 100) / _arg1.bytesTotal); } public function get State():int{ return (this.iState); } private static function generateLevels(_arg1:XML):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:int; var _local6:Array; var _local7:String; var _local8:String; var _local9:int; var _local10:int; var _local11:int; _local2 = new Array(); _local5 = _arg1.level.length(); _local3 = 0; while (_local3 < _local5) { _local7 = _arg1.level[_local3].@name1; _local8 = _arg1.level[_local3].@name2; _local10 = -1; _local11 = -1; _local4 = 0; while (_local4 < OListCurrency.Count) { if (OListCurrency.GetCurrency(_local4)[0] == _local7){ _local10 = _local4; }; if (OListCurrency.GetCurrency(_local4)[0] == _local8){ _local11 = _local4; }; if ((((_local10 >= 0)) && ((_local11 >= 0)))){ break; }; _local4++; }; _local6 = splitInt(_arg1.level[_local3].@ver); _local9 = _arg1.level[_local3].@size; _local2.push([_local10, _local11, _local6, _local9]); _local3++; }; return (_local2); } private static function splitInt(_arg1:String):Array{ var _local2:int; var _local3:Array; var _local4:String; _local3 = new Array(); _local4 = ""; _local2 = 0; while (_local2 < _arg1.length) { if (_arg1.charAt(_local2) == ","){ _local3.push(int(_local4)); _local4 = ""; } else { _local4 = (_local4 + _arg1.charAt(_local2)); }; _local2++; }; _local3.push(int(_local4)); return (_local3); } private static function generateCurrency(_arg1:XML):Object{ var _local2:Object; var _local3:int; var _local4:int; var _local5:String; var _local6:Number; _local2 = new Object(); _local4 = _arg1.currency.length(); _local3 = 0; while (_local3 < _local4) { _local5 = _arg1.currency[_local3].@name; _local6 = _arg1.currency[_local3].@value; _local2[_local5] = _local6; _local3++; }; return (_local2); } } }//package RES.OBJECTS.XMLLOADER
Section 196
//CPrototypeFactory (RES.OBJECTS.CPrototypeFactory) package RES.OBJECTS { import ENGINE.DISPLAY.*; import flash.display.*; public class CPrototypeFactory { public static var aStars:Array; private static var iCellsIndex:int; public static var aLetters:Array; public static var aCells:Array; public static var aParticles:Array; private static var aAlphabet:Array; public static var aSimpleCells:Array; public static function createSimpleCellsBitmaps(_arg1:int):void{ CPrototypeFactory.createStar(_arg1); } public static function _createParticleBitmaps(_arg1:int):void{ var _local2:Array; var _local3:Array; var _local4:int; CPrototypeFactory.aParticles = new Array(); _local2 = [ODisplay.SpriteLib, CoinzL.FallParticle]; _local3 = [ODisplay.SpriteScale, _local2, 1, 0, 0, 0]; _local4 = 0; while (_local4 < _arg1) { CPrototypeFactory.aParticles.push(ODisplay.OBitmapMake([null, _local3, 1, "GEL", CoinzL.iGameColor[_local4], "text 30", 1, 0, 0])); _local4++; }; } public static function _createDigitParticleBitmaps(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:Array; var _local5:Sprite; var _local6:Sprite; var _local7:Array; var _local8:Array; var _local9:int; CPrototypeFactory.aParticles = new Array(); _local3 = 0; while (_local3 < _arg2) { _local4 = new Array(); _local5 = ODisplay.SpriteText([ODisplay.SpriteText, CoinzL.OFont, 15, 0, (_local3 + 1).toString()]); ODisplay.SpriteText([ODisplay.SpriteText, CoinzL.OFont, 15, 0, (_local3 + 1).toString()]).x = (_local5.x - (_local5.width / 2)); _local5.y = (_local5.y - (_local5.height / 2)); _local6 = new Sprite(); _local6.addChild(_local5); _local7 = [ODisplay.SpriteLib, _local6]; _local8 = [ODisplay.SpriteScale, _local7, 1, 0, 0, 0]; _local9 = 0; while (_local9 < _arg1) { _local4.push(ODisplay.OBitmapMake([null, _local8, 1, "GEL", CoinzL.iGameColor[_local9], "text 30", 1, 0, 0])); _local9++; }; CPrototypeFactory.aParticles.push(_local4); _local3++; }; } public static function _createBitmaps(_arg1:int):void{ CPrototypeFactory._createParticleBitmaps(_arg1); } private static function createStar(_arg1:int):void{ } } }//package RES.OBJECTS
Section 197
//OCheckBox (RES.OBJECTS.OCheckBox) package RES.OBJECTS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; public class OCheckBox extends OIObject { public var iCheck:OBitmap; private var iCheckFlag:Boolean; public var iHit:OButton; public var iUnCheck:OBitmap; public function OCheckBox(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); iCheck.prVisible = true; iUnCheck.prVisible = false; iCheckFlag = true; } public function set Checked(_arg1:Boolean):void{ iCheckFlag = _arg1; iCheck.prVisible = _arg1; iUnCheck.prVisible = !(_arg1); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == iHit){ iCheckFlag = !(iCheckFlag); iCheck.prVisible = iCheckFlag; iUnCheck.prVisible = !(iCheckFlag); }; super.OnPress(_arg1, _arg2); if (((this.parent) && ((this.parent is OIObject)))){ OIObject(this.parent).OnPress(_arg1, this); }; } public function get Checked():Boolean{ return (iCheckFlag); } } }//package RES.OBJECTS
Section 198
//OInfoObject (RES.OBJECTS.OInfoObject) package RES.OBJECTS { import flash.events.*; import ENGINE.INTERFACE.*; public class OInfoObject extends OIObject { public function OInfoObject(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } override public function OnPress(_arg1:Event, _arg2):void{ (this.parent as OIObject).OnPress(_arg1, _arg2); } } }//package RES.OBJECTS
Section 199
//ORecord (RES.OBJECTS.ORecord) package RES.OBJECTS { import flash.geom.*; public class ORecord { private var iRecLenAct:int;// = 2 private var sAlphabet:String; private var iStr:String; private var iRecLenTime:int;// = 3 private var iCount:int;// = 62 private var iPos:int; private var iArr:Array; public static const actDelHint:int = 2700; public static const actComplete:int = 2900; public static const actBonus:int = 3000; public static const actFailed:int = 2800; public static const actAddHint:int = 2600; public static const actSetNumber:int = 2000; public static const FramesPurSecond:int = 12; public function ORecord(){ iRecLenTime = 3; iRecLenAct = 2; iCount = 62; super(); this.iPos = -1; iArr = new Array(); } public function WriteFrames(_arg1:int):void{ if (_arg1 > 0){ this.WriteTime(_arg1); } else { this.WriteTime(1); }; } public function WriteAddHint():void{ WriteAction(actAddHint); } public function get Length():int{ return (iArr.length); } public function ReadAction():int{ if (((!(this.iArr)) || ((this.iPos >= this.iArr.length)))){ return (-1); }; return (this.iArr[this.iPos++].y); } private function WriteAction(_arg1:int):void{ iStr = (iStr + ValueToCode(_arg1)); } public function WriteDeltaScore(_arg1:int):void{ WriteAction(_arg1); } public function WriteFailed():void{ WriteAction(actFailed); } public function set prStr(_arg1:String):void{ this.iStr = _arg1; } public function WriteBonus(_arg1:int):void{ var _local2:int; _local2 = (_arg1 / 10); if (_local2 >= (Math.pow(iCount, iRecLenAct) - actBonus)){ _local2 = ((Math.pow(iCount, iRecLenAct) - actBonus) - 1); }; WriteAction((actBonus + _local2)); } public function WriteStart():void{ this.iStr = ""; this.iPos = 0; this.sAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; } public function WriteSetNumber(_arg1:int):void{ WriteAction((actSetNumber + _arg1)); } public function get prStr():String{ return (this.iStr); } private function CodeToValue(_arg1:String):int{ var _local2:int; var _local3:int; _local2 = 0; _local3 = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + (sAlphabet.indexOf(_arg1.charAt(_local3)) * Math.pow(iCount, ((_arg1.length - _local3) - 1)))); _local3++; }; return (_local2); } public function ReadTime():int{ if (((!(this.iArr)) || ((this.iPos >= this.iArr.length)))){ return (-1); }; return (this.iArr[this.iPos].x); } public function WriteTime(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local2 = ((_arg1)<Math.pow(iCount, iRecLenTime)) ? _arg1 : (Math.pow(iCount, iRecLenTime) - 1); _local3 = (_local2 % iCount); _local4 = (((_local2 - _local3) / iCount) % iCount); _local5 = ((((_local2 - _local3) - (_local4 * iCount)) / (iCount * iCount)) % iCount); iStr = (iStr + ((sAlphabet.charAt(_local5) + sAlphabet.charAt(_local4)) + sAlphabet.charAt(_local3))); } public function ReadStart():void{ var _local1:int; var _local2:int; var _local3:Point; this.sAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; this.iPos = 0; _local1 = (iStr.length / (iRecLenTime + iRecLenAct)); _local2 = 0; while (_local2 < _local1) { _local3 = new Point(); _local3.x = CodeToValue(iStr.substr((_local2 * (iRecLenTime + iRecLenAct)), iRecLenTime)); _local3.y = CodeToValue(iStr.substr(((_local2 * (iRecLenAct + iRecLenTime)) + iRecLenTime), iRecLenAct)); iArr.push(_local3); _local2++; }; } public function WriteComplte():void{ WriteAction(actComplete); } public function get Over():Boolean{ return ((iPos >= Length)); } private function ValueToCode(_arg1:int):String{ var _local2:String; var _local3:int; var _local4:int; _local2 = ""; _local3 = (_arg1 % iCount); _local4 = (((_arg1 - _local3) / iCount) % iCount); _local2 = (_local2 + (sAlphabet.charAt(_local4) + sAlphabet.charAt(_local3))); return (_local2); } public function WriteDelHint():void{ WriteAction(actDelHint); } public function ReadFrames():int{ if (((!(this.iArr)) || ((this.iPos >= this.iArr.length)))){ return (-1); }; return (this.iArr[this.iPos].x); } } }//package RES.OBJECTS
Section 200
//OWChoosePlayer (RES.WINDOWS.OWChoosePlayer) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; public class OWChoosePlayer extends ODialog { public var iCancel:OButton; public var iDelete:OButton; public var iNew:OButton; private var iData; public var iListBox:OListBox; public var iAccept:OButton; private var iCurPlayer:String; public function OWChoosePlayer(){ super(CoinzL.OWChoosePlayer); } override public function Init():void{ super.Init(); this.iData = CoinzL.iGAME.prPlayersData; this.iCurPlayer = CoinzL.iGAME.prPlayerName; this.iListBox.SetCurrentElement(CoinzL.iGAME.prPlayerName, CoinzL.iGAME.prPlayerNames); } override public function set prActive(_arg1:Boolean):void{ if (_arg1){ this.iListBox.SetCurrentElement(CoinzL.iGAME.prPlayerName, CoinzL.iGAME.prPlayerNames); }; super.prActive = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ if (!this.prMouseEnabled){ return; }; if (_arg2 == this.iNew){ (this.parent as OWindow).OnPress(null, CoinzL.miEnterNewName); this.prActive = false; return; }; if (_arg2 == this.iDelete){ (this.parent as OWindow).OnPress(null, CoinzL.miDeletePlayerConfirm); this.prActive = false; return; }; if (_arg2 == this.iCancel){ CoinzL.iGAME.prPlayersData = this.iData; CoinzL.iGAME.prPlayerName = this.iCurPlayer; (this.parent as OWindow).OnPress(null, CoinzL.miMenu); this.prVisible = false; return; }; if (_arg2 == this.iAccept){ if (CoinzL.iMP.isConnected){ CoinzL.iMP.disconnect(); }; (this.parent as OWindow).OnPress(null, CoinzL.miMenu); this.prVisible = false; return; }; if ((((_arg2 == this.iListBox)) && (!((CoinzL.iGAME.prPlayerName == this.iListBox.prCurrentLBParam))))){ CoinzL.iGAME.prPlayerName = this.iListBox.prCurrentLBParam; return; }; } override public function Free():void{ this.iListBox = null; this.iNew = null; this.iDelete = null; this.iAccept = null; this.iCancel = null; super.Free(); } } }//package RES.WINDOWS
Section 201
//OWDemo (RES.WINDOWS.OWDemo) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import flash.geom.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.OGAME.*; import RES.OBJECTS.OGAME.OGRAPHIC.*; import flash.utils.*; import RES.OBJECTS.UTILS.*; public class OWDemo extends OIObject { private const iSpeed:int = 5; private var iFlairSplash:OFlairSplash; private var iDPP:Point; private var iSpeedCursor:Point; private var iTimer:int; private var iSPC:Point; private var iPlayProgram:Array; private var iHint:OIObject; private var iDelay:int; private var iHintLeft:OIObject; private var iExchangeString:OIObject; private var iCursor:OBitmap; private var iGame:OGGame; public static const stStart:int = 1; public static const comClick:int = 4; public static const comMove:int = 2; public static const stMove:int = 2; public static const comWait:int = 3; public static const comEnd:int = 5; public static const iVer:Array = [4, 2, 0, 0, 0, 0, 0, 0, 0]; public static const stDoubleClick:int = 5; public static const comStart:int = 1; public static const stClick:int = 4; public static const stEndAnimation:int = 6; public static const stWait:int = 3; public static const stNone:int = 0; public static const stEnd:int = 7; public function OWDemo(){ iSPC = new Point(150, 150); super([]); } private function NextStep():void{ var _local1:Array; var _local2:OGCoin; _local1 = iPlayProgram.shift(); if (_local1 == null){ return; }; switch (_local1[0]){ case comStart: this.State = stStart; break; case comMove: _local2 = iGame.Field.GetCoin(_local1[1]); iDPP.x = _local2.prX; iDPP.y = _local2.prY; this.State = stMove; break; case comClick: iGame.Click(_local1[1]); this.State = stClick; break; case comWait: iDelay = _local1[1]; this.State = stWait; break; case comEnd: iDelay = _local1[1]; this.State = stEndAnimation; break; }; } override public function Free():void{ super.Free(); } public function MoveCursor(_arg1:Point):Boolean{ var _local2:Point; var _local3:Point; _local2 = _arg1; _local3 = new Point((_local2.x - iCursor.prX), (_local2.y - iCursor.prY)); iSpeedCursor.x = (_local3.x * Math.abs((iSpeed / _local3.length))); iSpeedCursor.y = (_local3.y * Math.abs((iSpeed / _local3.length))); iCursor.prX = (iCursor.prX + iSpeedCursor.x); iCursor.prY = (iCursor.prY + iSpeedCursor.y); return ((((Math.abs((iCursor.prX - _local2.x)) < 4)) && ((Math.abs((iCursor.prY - _local2.y)) < 4)))); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); iGame.OnEnterFrame(); if (iGame.ChangeHintString){ GetHintString(); GetHintLeftString(); }; switch (this.iState){ case stNone: break; case stStart: if (((iGame.IsWait()) && ((iFlairSplash.Splash == false)))){ iFlairSplash.Free(); iFlairSplash = null; NextStep(); }; break; case stMove: if (MoveCursor(iDPP)){ NextStep(); }; break; case stWait: if ((getTimer() - iTimer) > iDelay){ NextStep(); }; break; case stClick: NextStep(); break; case stEndAnimation: if (((((getTimer() - iTimer) > iDelay)) && ((iFlairSplash.Splash == false)))){ iFlairSplash.Free(); iFlairSplash = null; State = stEnd; }; break; case stEnd: break; }; } override public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stNone: break; case stStart: iTimer = getTimer(); NewField(); iCursor.Pos(iSPC.x, iSPC.y); this.addChild(iCursor); StartSplash(0, 0.05, 0, 1); break; case stMove: break; case stWait: iTimer = getTimer(); break; case stClick: iTimer = getTimer(); break; case stEndAnimation: StartSplash(1, -0.05, 0, 1); iTimer = getTimer(); break; case stEnd: DeleteField(); break; }; } override public function Init():void{ super.Init(); iCursor = ODisplay.OBitmapSpriteFillRect([ODisplay.OBitmapSpriteFillRect, 30, 30, [ODisplay.SpriteLib, CoinzL.OCursor], "GEL", "white", "border", 1, 0, 0, null, 0, true]); iSpeedCursor = new Point(); iDPP = new Point(); } private function StartSplash(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int):void{ iFlairSplash = new OFlairSplash(_arg1, _arg2, _arg3, _arg4); iGame.Field.alpha = _arg1; iExchangeString.alpha = _arg1; iHint.alpha = _arg1; iHintLeft.alpha = _arg1; iCursor.alpha = _arg1; iFlairSplash.AddDisplayObject(iGame.Field); iFlairSplash.AddDisplayObject(iExchangeString); iFlairSplash.AddDisplayObject(iHint); iFlairSplash.AddDisplayObject(iHintLeft); iFlairSplash.AddDisplayObject(iCursor); iFlairSplash.Splash = true; } private function GetHintString():void{ var _local1:String; var _local2:Array; if (iHint){ removeChild(iHint); iHint = null; }; _local1 = iGame.HintString; _local2 = OHintFactory.GenerateColorsArray(_local1, ["red", "red", "green", "blue", "blue"]); iHint = CoinzS.ColorHeader([CoinzS.ColorHeader, 200, 20, _local2, _local1, OInterface.iDefAnimators, 0, 217, null, 0, true]); addChild(iHint); } public function Play(_arg1:Array):void{ iPlayProgram = GeneratePlayProgram(_arg1[0], _arg1[1]); NextStep(); } private function NewField():void{ var _local1:String; var _local2:Array; iGame = new OGGame(200, 200, OListCurrency.GetUSD(), OListCurrency.GetEUR(), iVer, 30066); iGame.Field.mouseEnabled = false; iGame.Field.mouseChildren = false; iGame.Field.Pos(0, 12); addChild(iGame.Field); _local1 = (CoinzL.strExchange + iGame.ExchangeString); _local2 = OHintFactory.GenerateColorsArray(_local1, ["green", "green", "red", "red", "green", "blue", "blue"]); iExchangeString = CoinzS.ColorHeader([null, 200, 20, _local2, _local1, OInterface.iDefAnimators, 0, -46, null, 0, false]); addChild(iExchangeString); GetHintString(); GetHintLeftString(); } private function GetHintLeftString():void{ var _local1:String; var _local2:Array; if (iHintLeft){ removeChild(iHintLeft); iHintLeft = null; }; _local1 = ((iGame.SumBaseCoins + " ") + CoinzL.strLeftToExchange); _local2 = OHintFactory.GenerateColorsArray(_local1, ["red", "red", "green", "green", "green"]); iHintLeft = CoinzS.ColorHeader([null, 200, 20, _local2, _local1, OInterface.iDefAnimators, 0, -23, null, 0, true]); addChild(iHintLeft); } private function GeneratePlayProgram(_arg1:Array, _arg2:Array):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:int; _local3 = new Array(); _local3.push([comStart]); _local4 = 0; _local5 = 0; _local5 = 0; while (_local5 < _arg2.length) { _local6 = _arg2[_local5]; while (_local6 > 0) { _local7 = _arg1[_local4]; _local3.push([comMove, _local7]); _local3.push([comWait, 500]); _local3.push([comClick, _local7]); _local4++; _local6--; }; _local3.push([comWait, 2000]); _local5++; }; _local3.push([comEnd, 0]); return (_local3); } private function DeleteField():void{ removeChild(iGame.Field); iGame.Free(); iGame = null; removeChild(iExchangeString); iExchangeString = null; if (iHint){ removeChild(iHint); iHint = null; }; } } }//package RES.WINDOWS
Section 202
//OWEnterName (RES.WINDOWS.OWEnterName) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; public class OWEnterName extends ODialog { public var iCancel:OButton; private var iHasCancel:Boolean; public var iName:OInput; public var iAccept:OButton; public function OWEnterName(_arg1:Boolean=true){ this.iHasCancel = _arg1; super(CoinzL.OWEnterName); } override public function Init():void{ super.Init(); this.iName.prText = (CoinzL.iGAME.prPlayerName) ? CoinzL.iGAME.prPlayerName : ""; if (!this.iHasCancel){ this.iCancel.visible = false; this.iAccept.prX = 155; }; } public function set prName(_arg1:String):void{ this.iName.prText = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:String; if (!this.prMouseEnabled){ return; }; if (_arg2 == this.iCancel){ this.prVisible = false; return; }; if (_arg2 == this.iAccept){ if (this.iName.prText.length > 0){ _local3 = OUtils.ClearString(this.iName.prText.toUpperCase()); if (_local3.length == 0){ this.iName.prText = ""; return; }; CoinzL.iGAME.prPlayerName = _local3; this.prVisible = false; }; this.iName.prText = ""; }; } override public function Free():void{ super.Free(); this.iName = null; this.iAccept = null; this.iCancel = null; } public function get prName():String{ return (this.iName.prText); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); SetNameFocus(); } private function SetNameFocus():void{ if (!this.stage){ return; }; if (this.stage.focus == this.iName.iText){ return; }; this.iName.iText.setSelection(this.iName.iText.length, this.iName.iText.length); this.stage.focus = this.iName.iText; } } }//package RES.WINDOWS
Section 203
//OWGame (RES.WINDOWS.OWGame) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; import RES.OBJECTS.*; import RES.OBJECTS.OGAME.*; import RES.OBJECTS.OGAME.OGRAPHIC.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; import ENGINE.SMARTFOX.*; import ENGINE.AD.*; import RES.OBJECTS.XMLLOADER.*; import RES.OBJECTS.UTILS.*; import RES.OBJECTS.OLEVELS.*; public class OWGame extends OWindow { private var iGame:OGGame; private var iSize:int; public var iScoreCounter:OCounter; public var iAllSpr:OSprite; private var iITimer:int; private var iCurrencyData1:Array; public var iReset:OButton; private var iNameO:String; private var iCurrencyData2:Array; private var iIDString:String; private var iInfoP:OWInfoPanel; private var iLevelVal:int; public var iHint:OIObject; public var iName:OIObject; public var iLevel:OIObject; private var iXMLLoader:OXML; public var iScoreCounterO:OCounter; private var iOppScore:int; private var iVer:Array; public var iHintLeft:OIObject; private var iDX:int; private var iInfo:OIObject; private var iDY:int; private var iOpponentRecord:String; private var iExchangeString:OIObject; public var iLevelCounter:OCounter; private var iShowTime:int; private var iOppEndGame:Boolean; private var iDAlpha:Number;// = 0.025 public var iGameName:OIObject; public var iPanelBorder:OBitmap; private var iMultiPlayer:Boolean; public var iSite:OIObject; public var iMenu:OButton; private var iRecordO:String; public var iInvisibleButton:OButton; private var iRNDIndex:int; public var iScore:OIObject; private var iSaveKoef:Number;// = 0.5 private var iGameO:OGGame; private var iRecO:ORecord; public var iScoreO:OIObject; public var iHintButton:OButton; public var iBorder:OBitmap; public static const stStart:int = 4; public static const stLevelNotComplete:int = 8; public static const stGameFieldHide:int = 11; public static const stPause:int = 10; public static const stShowResults:int = 9; public static const stLoadLevel:int = 3; public static const stGoToPlay:int = 1; public static const stConnection:int = 2; public static const stLoadLevelData:int = 12; public static const stShowGoal:int = 5; public static const stPlay:int = 6; public static const stLevelComplete:int = 7; public static const stShow:int = 0; private static var iRInd:int = 0; public function OWGame(){ iDAlpha = 0.025; iSaveKoef = 0.5; super(CoinzL.OWGame, ODialog.iDefAnimators); } private function get prGameIndex():int{ return (((CoinzL.GameType * 10) + iRNDIndex)); } private function AddAllSpr():void{ this.iAllSpr = new OSprite(); this.iAllSpr.graphics.beginFill(0); this.iAllSpr.graphics.drawRect(0, 0, 800, 600); this.iAllSpr.graphics.endFill(); this.iAllSpr.alpha = 0; this.iAllSpr.hitArea = this.iAllSpr; this.addChild(this.iAllSpr); this.addEventListener(MouseEvent.CLICK, OnClick); OGlobal.prStage.addEventListener(KeyboardEvent.KEY_DOWN, OnKeyDown); } private function SplashInfoMessage():Boolean{ var _local1:Boolean; _local1 = false; if (this.iInfo.prAnimation){ return (false); }; this.iInfo.alpha = (this.iInfo.alpha + this.iDAlpha); if ((((this.iDAlpha > 0)) && ((this.iInfo.alpha >= 1)))){ this.iInfo.alpha = 1; this.iDAlpha = (this.iDAlpha * -1); }; if ((((this.iDAlpha < 0)) && ((this.iInfo.alpha <= 0)))){ this.iInfo.alpha = 0; this.iDAlpha = (this.iDAlpha * -1); _local1 = true; }; return (_local1); } override public function Free():void{ super.Free(); } private function OnKeyDown(_arg1:KeyboardEvent):void{ switch (this.State){ case stLevelComplete: case stLevelNotComplete: State = stGameFieldHide; if (contains(iAllSpr)){ removeChild(iAllSpr); }; OGlobal.prStage.removeEventListener(KeyboardEvent.KEY_DOWN, OnKeyDown); break; }; } private function InitCurrencyData(_arg1:int):void{ var _local2:Array; var _local3:String; var _local4:String; var _local5:Number; var _local6:Number; if (iXMLLoader.LevelList){ _local2 = iXMLLoader.LevelList[(_arg1 % iXMLLoader.LevelList.length)]; } else { _local2 = OLLevels._LevelList(_arg1); }; iCurrencyData1 = OLUtils.CloneArray(OListCurrency.GetCurrency(_local2[0])); iCurrencyData2 = OLUtils.CloneArray(OListCurrency.GetCurrency(_local2[1])); iVer = _local2[2]; iSize = _local2[3]; _local3 = iCurrencyData1[0]; _local4 = iCurrencyData2[0]; if (iXMLLoader.CurrencyList){ iCurrencyData1[1] = iXMLLoader.CurrencyList[_local3]; iCurrencyData2[1] = iXMLLoader.CurrencyList[_local4]; }; _local5 = (iCurrencyData1[1] * 100); _local6 = (iCurrencyData2[1] * 100); iIDString = (((((_local3 + _local5.toString()) + _local4) + _local6.toString()) + "SIZE") + iSize.toString()); } private function OnClick(_arg1:MouseEvent):void{ switch (this.State){ case stLevelComplete: case stLevelNotComplete: State = stGameFieldHide; if (contains(iAllSpr)){ removeChild(iAllSpr); }; this.removeEventListener(MouseEvent.CLICK, OnClick); break; case stShowGoal: iInfo.removeEventListener(MouseEvent.CLICK, OnClick); iInfo.buttonMode = false; this.AddInfo(null, true); State = stPlay; break; }; } private function AddInfo(_arg1:OIObject, _arg2:Boolean=true, _arg3:Boolean=false):void{ if (this.iInfo){ this.removeChild(this.iInfo); this.iInfo.Free(); this.iInfo = null; }; if (_arg1){ this.iInfo = _arg1; this.iInfo.Pos(0, 0); this.iInfo.Pos(0, (300 - (this.iInfo.prHeight / 2))); if (_arg3){ this.iInfo.Pos(-100, (300 - (this.iInfo.prHeight / 2))); }; if (_arg2){ this.iInfo.SetVisible(false); this.iInfo.prVisible = true; }; this.addChild(this.iInfo); }; } private function PlayOpponent():void{ if (((iMultiPlayer) && (!(iOppEndGame)))){ iGameO.OnEnterFrame(); if (((!((iGameO.State == OGGame.stLevelComplete))) && (!((iGameO.State == OGGame.stLevelFailed))))){ iScoreCounterO.prValue = iGameO.Score; }; if ((((iGameO.State == OGGame.stLevelComplete)) || ((iGameO.State == OGGame.stLevelFailed)))){ iInfoP.prScore = iGameO.Score; if (iGameO.State == OGGame.stLevelComplete){ iInfoP.State = OWInfoPanel.stCompleteLevel; } else { iInfoP.State = OWInfoPanel.stFailedLevel; }; SetVisibleGameOpponent(false); iOppEndGame = true; }; }; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:Boolean; var _local4:Array; switch (this.iState){ case stShow: if (!this.prAnimation){ if (iLevelVal > 0){ this.State = stLoadLevelData; } else { this.State = stGoToPlay; }; }; break; case stGoToPlay: if (!this.iInfo.prVisible){ this.AddInfo(null); this.State = stLoadLevelData; }; break; case stLoadLevelData: _local3 = SplashInfoMessage(); if (((_local3) && ((((iXMLLoader.State == OXML.STATE_ON_COMPLETE)) || (((getTimer() - iITimer) > 5000)))))){ State = stConnection; }; break; case stConnection: _local2 = getTimer(); _local3 = this.SplashInfoMessage(); if (((((_local2 - this.iITimer) > 5000)) && (_local3))){ this.State = stStart; }; if (((((_local2 - this.iITimer) > 2000)) && ((CoinzL.iMP.State == OMultiplayer.stInZone)))){ this.State = stLoadLevel; }; break; case stLoadLevel: _local3 = this.SplashInfoMessage(); if (((_local3) && (CoinzL.iMP.prOpponentTurn))){ _local4 = CoinzL.iMP.prOpponentTurn.split(","); if (_local4.length > 2){ this.State = stStart; break; }; iMultiPlayer = !((((_local4[0] == "none")) && ((_local4[1] == "none")))); this.iRecordO = ((((_local4[0] == "none")) && ((_local4[1] == "none")))) ? null : _local4[1]; this.iNameO = (this.iRecordO) ? _local4[0] : null; this.State = stStart; break; }; if ((getTimer() - iITimer) > 10000){ State = stStart; }; break; case stStart: if ((getTimer() - iITimer) > 2000){ this.State = stPlay; }; break; case stPlay: iGame.OnEnterFrame(); PlayOpponent(); iScoreCounter.prValue = iGame.Score; if (iGame.ChangeHintString){ GetHintString(); GetHintLeftString(); }; if (iGame.State == OGGame.stLevelComplete){ State = stLevelComplete; }; if (iGame.State == OGGame.stLevelFailed){ State = stLevelNotComplete; }; break; case stLevelComplete: case stLevelNotComplete: iGame.OnEnterFrame(); iScoreCounter.prValue = iGame.Score; PlayOpponent(); break; case stGameFieldHide: this.State = stShowResults; break; case stShowResults: if (((!(this.iInfo.prVisible)) && (!(this.iInfo.prAnimation)))){ this.State = stConnection; }; break; }; super.OnEnterFrame(_arg1); } override public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stShow: break; case stGoToPlay: this.AddInfo(new OWInstruction()); break; case stLoadLevelData: iITimer = getTimer(); iXMLLoader = new OXML(); iXMLLoader.Load(CoinzL.PATH_LEVEL); AddInfo(CoinzS.ColorHeader(CoinzL.OWGameLoadingData)); break; case stConnection: this.AddBanner(true, 800, 260); iLevelVal = CoinzL.iGAME.prLevel; InitCurrencyData(iLevelVal); CoinzL.iMP.ClearOpponentTurn(true); this.iITimer = getTimer(); this.AddInfo(CoinzS.ColorHeader(CoinzL.OWGameConnection), true); if (CoinzL.iMP.State == OMultiplayer.stInZone){ this.State = stLoadLevel; } else { if (CoinzL.iMP.State != OMultiplayer.stConnection){ CoinzL.iMP.State = OMultiplayer.stNone; CoinzL.iMP.Init(CoinzL.sDomain, CoinzL.sServer, CoinzL.sZone, CoinzL.sXTName, CoinzL.iGAME.prPlayerName); }; }; break; case stLoadLevel: CoinzL.iMP.ClearOpponentTurn(true); CoinzL.iMP.Turn(["rdl", (CoinzL.iGAME.prLevel % OLLevels.LevelCount), ((((int((CoinzL.iGAME.prLevel / OLLevels.LevelCount)).toString() + "/") + iIDString) + "/") + iRNDIndex.toString()), CoinzL.iGAME.prPlayerName]); break; case stStart: iLevelCounter.prValue = (iLevelVal + 1); if (!this.iNameO){ CoinzL.OWGameNewLevelWithNoOpponent[0][4] = ((CoinzL.strLevel + " # ") + (iLevelVal + 1).toString()); this.AddInfo(OInterface.OIObjectMake(CoinzL.OWGameNewLevelWithHoutOpponent), true); if (CoinzL.iMP.State == OMultiplayer.stInZone){ iInfoP.State = OWInfoPanel.stUserNotFound; } else { iInfoP.State = OWInfoPanel.stConnect; }; } else { CoinzL.OWGameNewLevel[0][4] = ((CoinzL.strLevel + " # ") + (iLevelVal + 1).toString()); CoinzL.OWGameNewLevel[2][4] = this.iNameO; this.AddInfo(OInterface.OIObjectMake(CoinzL.OWGameNewLevelWithOpponent), true); iInfoP.prOpponent = this.iNameO; iInfoP.State = OWInfoPanel.stOpponent; }; iITimer = getTimer(); break; case stPlay: this.AddBanner(false); this.AddInfo(null); NewGame(); if (iMultiPlayer){ NewGameOpponent(); SetVisibleGameOpponent(true); }; SetVisibleGame(true); OSound.PlaySound(CoinzL.OSStartLevel); iITimer = getTimer(); break; case stLevelComplete: iOppScore = (((iMultiPlayer) && (!((iGameO.State == OGGame.stLevelComplete))))) ? iScoreCounterO.prValue : 0; CoinzL.iGAME.Write(OGame.catTmp, "Score", iScoreCounter.prValue); CoinzL.iGAME.Write(OGame.catTmp, "Bonus", iOppScore); CoinzL.iGAME.Write(OGame.catTmp, "Result", (iScoreCounter.prValue + iOppScore)); CoinzL.OWResults[5][6] = CoinzL.strNextLevel; CoinzL.iMP.Turn(["wrl", (CoinzL.iGAME.prLevel % OLLevels.LevelCount), ((((int((CoinzL.iGAME.prLevel / OLLevels.LevelCount)).toString() + "/") + iGame.IDString) + "/") + iRNDIndex.toString()), CoinzL.iGAME.prPlayerName, iGame.RecordString]); iITimer = getTimer(); this.AddInfo(OInterface.OIObjectMake(CoinzL.OWGameCL), true); CoinzL.iGAME.NextLevel(); AddAllSpr(); OSound.PlaySound(CoinzL.OSLevelComplete); break; case stLevelNotComplete: CoinzL.iGAME.Write(OGame.catTmp, "Score", 0); CoinzL.iGAME.Write(OGame.catTmp, "Bonus", 0); CoinzL.iGAME.Write(OGame.catTmp, "Result", 0); CoinzL.OWResults[5][6] = CoinzL.strPlayAgain; if (iGame.Score > 0){ CoinzL.iMP.Turn(["wrl", (CoinzL.iGAME.prLevel % OLLevels.LevelCount), ((((int((CoinzL.iGAME.prLevel / OLLevels.LevelCount)).toString() + "/") + iGame.IDString) + "/") + iRNDIndex.toString()), CoinzL.iGAME.prPlayerName, iGame.RecordString]); }; iITimer = getTimer(); this.AddInfo(OInterface.OIObjectMake(CoinzL.OWGameNCL), true); AddAllSpr(); OSound.PlaySound(CoinzL.OSBubbleBang04); break; case stGameFieldHide: SetVisibleGame(false); if (iMultiPlayer){ SetVisibleGameOpponent(false); }; this.iInfo.prVisible = false; break; case stShowResults: if (iGame){ removeChild(iGame.Field); iGame.Free(); iGame = null; }; if (iGameO){ removeChild(iGameO.Field); iGameO.Free(); iGameO = null; }; this.AddInfo(new OWResults()); break; }; } private function AddBanner(_arg1:Boolean, _arg2:int=0, _arg3:int=0):void{ if (CoinzL.sDebug == true){ return; }; if (_arg1){ OAdBanners.AddTBanner(this, 0, 0, _arg2, _arg3); OAdBanners.AddBBanner(this, 0, (600 - _arg3), _arg2, _arg3); } else { OAdBanners.RemoveTBanner(this); OAdBanners.RemoveBBanner(this); }; } private function NewGameOpponent():void{ iScoreCounterO.prValue = 0; iGameO = new OGGame(iSize, 230, iCurrencyData1, iCurrencyData2, iVer, prSeed, true, iRecordO); iGameO.Field.Pos(550, 152); addChildAt(iGameO.Field, (numChildren - 3)); iOppEndGame = false; } override public function Init():void{ super.Init(); this.iInfoP = new OWInfoPanel(); this.iInfoP.Pos(540, 0); this.iInfoP.prVisible = false; this.addChild(this.iInfoP); this.State = stShow; this.iRNDIndex = (Math.random() * 10); CPrototypeFactory._createParticleBitmaps(7); this.iSite.addEventListener(MouseEvent.CLICK, OnClickSite); iLevelVal = CoinzL.iGAME.prLevel; } private function GetHintString():void{ var _local1:String; var _local2:Array; if (iHint){ removeChild(iHint); iHint = null; }; _local1 = iGame.HintString; _local2 = OHintFactory.GenerateColorsArray(_local1, ["red", "red", "green", "blue", "blue"]); iHint = CoinzS.ColorHeader([null, iSize, 35, _local2, _local1, OInterface.iDefAnimators, iDX, ((iDY + iSize) + 10), null, 0, true]); addChild(iHint); } override public function set prActive(_arg1:Boolean):void{ if (_arg1){ this.State = stShow; }; super.prActive = _arg1; } private function SetVisibleGameOpponent(_arg1:Boolean):void{ if (iScoreO){ iScoreO.prVisible = _arg1; }; if (iScoreCounterO){ iScoreCounterO.prVisible = _arg1; }; if (iGameO){ iGameO.Field.prVisible = _arg1; }; } private function get prLevelIndex():int{ return ((((iLevelVal + 1) * 10) + iRNDIndex)); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iMenu){ (this.parent as OWindow).OnPress(null, CoinzL.miMenu); this.prVisible = false; return; }; if (_arg2 == this.iReset){ iGame.Reset(); OSound.PlaySound(CoinzL.OSReset); }; if (_arg2 == this.iHintButton){ iGame.OnHint(); OSound.PlaySound(CoinzL.OSCheck); }; if (_arg2 == this.iInvisibleButton){ navigateToURL(new URLRequest(CoinzL.strConnect2URL)); }; } private function NewGame():void{ var _local1:String; var _local2:Array; iScoreCounter.prValue = 0; iScoreCounterO.prValue = 0; iGame = new OGGame(iSize, iSize, iCurrencyData1, iCurrencyData2, iVer, prSeed); iDX = ((550 - iSize) / 2); iDY = ((600 - iSize) / 2); iGame.Field.Pos(iDX, iDY); addChild(iGame.Field); _local1 = (CoinzL.strExchange + iGame.ExchangeString); _local2 = OHintFactory.GenerateColorsArray(_local1, ["green", "green", "red", "red", "green", "blue", "blue"]); iExchangeString = CoinzS.ColorHeader([null, iSize, 25, _local2, _local1, OInterface.iDefAnimators, iDX, (iDY - 80), null, 0, true]); addChild(iExchangeString); GetHintString(); GetHintLeftString(); } private function GetHintLeftString():void{ var _local1:String; var _local2:Array; if (iHintLeft){ removeChild(iHintLeft); iHintLeft = null; }; _local1 = ((iGame.SumBaseCoins + " ") + CoinzL.strLeftToExchange); _local2 = OHintFactory.GenerateColorsArray(_local1, ["red", "red", "red", "red", "red"]); iHintLeft = CoinzS.ColorHeader([null, iSize, 25, _local2, _local1, OInterface.iDefAnimators, iDX, (iDY - 45), null, 0, true]); addChild(iHintLeft); } private function get prSeed():int{ return ((29989 + (7 * (((CoinzL.iGAME.prLevel + 1) * 10) + iRNDIndex)))); } private function OnClickSite(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(CoinzL.strConnect2URL)); } private function ScoreCalc(_arg1:Number):int{ return (_arg1); } private function SetVisibleGame(_arg1:Boolean):void{ if (iGame){ iGame.Field.prVisible = _arg1; }; if (iReset){ iReset.prVisible = _arg1; }; if (((iExchangeString) && (!(_arg1)))){ iExchangeString.prVisible = _arg1; }; if (((iHint) && (!(_arg1)))){ iHint.prVisible = _arg1; }; if (((iHintLeft) && (!(_arg1)))){ iHintLeft.prVisible = _arg1; }; if (iGameName){ iGameName.prVisible = _arg1; }; if (iSite){ iSite.prVisible = _arg1; }; if (iMenu){ iMenu.prVisible = _arg1; }; if (iLevel){ iLevel.prVisible = _arg1; }; if (iLevelCounter){ iLevelCounter.prVisible = _arg1; }; if (iScore){ iScore.prVisible = _arg1; }; if (iScoreCounter){ iScoreCounter.prVisible = _arg1; }; if (iInfoP){ iInfoP.prVisible = _arg1; }; if (iHintButton){ iHintButton.prVisible = _arg1; }; if (iName){ iName.prVisible = _arg1; }; if (iPanelBorder){ iPanelBorder.prVisible = _arg1; }; } } }//package RES.WINDOWS
Section 204
//OWHighScores (RES.WINDOWS.OWHighScores) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; public class OWHighScores extends ODialog { public var iType:OListBox; public var iClose:OButton; public var iPublish:OButton; public var iClear:OButton; public var iGlobal:OButton; public var iTable:OTab; public function OWHighScores(){ var _local1:OScoreParams; var _local2:int; _local2 = 0; while (_local2 < 5) { _local1 = CoinzL.iGAME.GetLocalScores(0, _local2); CoinzL.OWHighScoreLocal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : ""; CoinzL.OWHighScoreLocal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : ""; _local1 = CoinzL.iGAME.GetPersonalScores(0, _local2); CoinzL.OWHighScorePersonal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : ""; CoinzL.OWHighScorePersonal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : ""; _local2++; }; super(CoinzL.OWHighScores); } override public function set prActive(_arg1:Boolean):void{ var _local2:OScoreParams; if (_arg1){ _local2 = CoinzL.iGAME.GetLocalScores(0, 0); if (!_local2){ (iTable.getChildAt(0) as OSprite).Free(); }; _local2 = CoinzL.iGAME.GetPersonalScores(0, 0); if (!_local2){ (iTable.getChildAt(1) as OSprite).Free(); }; }; super.prActive = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iClose){ this.prVisible = false; return; }; if (_arg2 == this.iType){ this.iTable.prValue = this.iType.prCurrentInd; return; }; if (_arg2 == this.iClear){ (this.parent as OWindow).OnPress(null, CoinzL.miDeleteScoresConfirm); this.prActive = false; return; }; (this.parent as OWindow).OnPress(null, CoinzL.miCommingSoon); this.prActive = false; } override public function Free():void{ this.iType = null; this.iTable = null; this.iGlobal = null; this.iPublish = null; this.iClear = null; this.iClose = null; super.Free(); } } }//package RES.WINDOWS
Section 205
//OWInfoPanel (RES.WINDOWS.OWInfoPanel) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.*; import flash.utils.*; import flash.net.*; public class OWInfoPanel extends OIObject { private var iTimer:int; private var iTDelta:int; private var iMode:int; private var iInfo:OInfoObject; private var iScore:int; private var iOpponent:String; public static const stFailedLevel:int = 7; public static const stConnect:int = 1; public static const stEndLevel:int = 5; public static const stCompleteLevel:int = 6; public static const stInGame:int = 3; public static const stNone:int = 0; public static const stUserNotFound:int = 2; public static const stOpponent:int = 4; public function OWInfoPanel(){ super(null, OInterface.iDefAnimators); } public function set prOpponent(_arg1:String):void{ this.iOpponent = _arg1; } private function ShowConnect():void{ var _local1:String; _local1 = CoinzL.OWColors[((this.iMode + 2) % CoinzL.OWColors.length)]; CoinzL.OWInfoPConnect[0][3] = _local1; CoinzL.OWInfoPConnect[1][3] = _local1; CoinzL.OWInfoPConnect[1][4] = _local1; switch ((this.iMode % 3)){ case 0: CoinzL.OWInfoPConnect[0][4] = CoinzL.strConnect1; CoinzL.OWInfoPConnect[1][6] = CoinzL.strPlayOnline1; break; case 1: CoinzL.OWInfoPConnect[0][4] = CoinzL.strConnect2; CoinzL.OWInfoPConnect[1][6] = CoinzL.strMoreGames1; break; case 2: CoinzL.OWInfoPConnect[0][4] = CoinzL.strConnect3; CoinzL.OWInfoPConnect[1][6] = CoinzL.strSendMail; break; }; this.InitObject(CoinzL.OWInfoPConnect); } private function ShowUserNotFound():void{ var _local1:String; var _local2:String; var _local3:Array; var _local4:Array; _local1 = CoinzL.iMP.prOpponentTurn; CoinzL.iMP.ClearOpponentTurn(true); CoinzL.iMP.Turn(["rdr"]); if (_local1){ _local3 = _local1.split(/,/); if (_local3.length == 2){ return; }; }; iTDelta = 30000; _local2 = CoinzL.OWColors[Math.round((Math.random() * (CoinzL.OWColors.length - 1)))]; CoinzL.OWInfoPUserNotFound[0][3] = _local2; CoinzL.OWInfoPUserNotFound[1][3] = _local2; switch ((this.iMode % 5)){ case 0: CoinzL.OWInfoPUserNotFound[0][4] = CoinzL.iMP.prUsersCount; CoinzL.OWInfoPUserNotFound[0][6] = 200; CoinzL.OWInfoPUserNotFound[1][6] = (CoinzL.OWInfoPUserNotFound[0][6] + 70); CoinzL.OWInfoPUserNotFound[1][4] = CoinzL.strPlayersOnline1; break; default: if (!_local1){ return; }; _local4 = _local1.split(/,/); CoinzL.OWInfoPUserNotFound[0][4] = ((int(_local4[0]) + 1).toString() + CoinzL.strPlace); CoinzL.OWInfoPUserNotFound[0][6] = 180; CoinzL.OWInfoPUserNotFound[1][6] = (CoinzL.OWInfoPUserNotFound[0][6] + 90); CoinzL.OWInfoPUserNotFound[1][4] = ((_local4[1] + CoinzL.strHasReiting) + _local4[2]); break; }; this.InitObject(CoinzL.OWInfoPUserNotFound); } override public function Init():void{ super.Init(); } public function set prScore(_arg1:int):void{ this.iScore = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:String; var _local4:URLRequest; switch ((this.iMode % 3)){ case 0: _local3 = CoinzL.strConnect1URL; break; case 1: _local3 = CoinzL.strConnect2URL; break; case 2: _local3 = CoinzL.strConnect3URL; break; }; _local4 = new URLRequest(_local3); navigateToURL(_local4); } override public function Free():void{ this.iInfo = null; super.Free(); } private function InitObject(_arg1:Array):void{ if (this.iInfo){ this.removeChild(this.iInfo); this.iInfo.Free(); this.iInfo = null; }; if (!_arg1){ return; }; this.iInfo = new OInfoObject(_arg1, OInterface.iDefSlowAnimators); this.addChild(this.iInfo); this.iInfo.SetVisible(false); this.iInfo.prVisible = true; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; super.OnEnterFrame(_arg1); switch (this.iState){ case stConnect: _local2 = getTimer(); if ((_local2 - this.iTimer) >= 30000){ this.iMode++; this.ShowConnect(); this.iTimer = _local2; }; break; case stUserNotFound: _local2 = getTimer(); if ((_local2 - this.iTimer) >= iTDelta){ this.iMode++; this.ShowUserNotFound(); this.iTimer = _local2; }; break; }; } override public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stNone: this.InitObject(null); break; case stConnect: this.iMode = 0; this.ShowConnect(); this.iTimer = getTimer(); break; case stUserNotFound: this.iMode = 0; iTDelta = 1000; this.ShowUserNotFound(); this.iTimer = getTimer(); break; case stInGame: CoinzL.OWInfoP[0][2] = 27; CoinzL.OWInfoP[0][3] = "yellow"; CoinzL.OWInfoP[0][6] = 240; CoinzL.OWInfoP[0][4] = ((((CoinzL.strOpponent1 + "\n") + this.iOpponent) + "\n") + CoinzL.strOpponent2); this.InitObject(CoinzL.OWInfoP); this.iTimer = getTimer(); break; case stOpponent: CoinzL.OWInfoPPlayer[0][4] = this.iOpponent; this.InitObject(CoinzL.OWInfoPPlayer); break; case stEndLevel: CoinzL.OWInfoP[0][2] = 27; CoinzL.OWInfoP[0][3] = "magenta"; CoinzL.OWInfoP[0][6] = 240; CoinzL.OWInfoP[0][4] = ((this.iOpponent + CoinzL.strLevelScore) + this.iScore); this.InitObject(CoinzL.OWInfoP); this.iTimer = getTimer(); break; case stCompleteLevel: CoinzL.OWInfoP[0][2] = 27; CoinzL.OWInfoP[0][3] = "yellow1"; CoinzL.OWInfoP[0][6] = 240; CoinzL.OWInfoP[0][4] = ((this.iOpponent + CoinzL.strCompleteLevel) + this.iScore); this.InitObject(CoinzL.OWInfoP); this.iTimer = getTimer(); break; case stFailedLevel: CoinzL.OWInfoP[0][2] = 27; CoinzL.OWInfoP[0][3] = "red"; CoinzL.OWInfoP[0][6] = 240; CoinzL.OWInfoP[0][4] = ((this.iOpponent + CoinzL.strFailedLevel) + this.iScore); this.InitObject(CoinzL.OWInfoP); this.iTimer = getTimer(); break; }; } } }//package RES.WINDOWS
Section 206
//OWInstruction (RES.WINDOWS.OWInstruction) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.*; public class OWInstruction extends OWindow { private const iNumCoins1:Array; private const iTestPlayProgram1:Array; private const iIndCoins1:Array; private var list:Array; private var iDemo:OWDemo; public var iClose:OButton; private var iTimer:int; public var iInfoText:OIObject; private var iPlayIndex:int;// = 0 private static const stNone:int = 0; private static const stPlay:int = 1; public function OWInstruction(){ iPlayIndex = 0; iIndCoins1 = [3, 7, 2, 5, 1, 3, 2, 4, 0, 3, 4, 6, 1, 0, 2, 4]; iNumCoins1 = [2, 2, 4, 4, 2, 2]; iTestPlayProgram1 = [iIndCoins1, iNumCoins1]; list = [iTestPlayProgram1]; super(CoinzL.OWInstructions); } override public function Init():void{ CPrototypeFactory._createParticleBitmaps(7); super.Init(); iDemo = new OWDemo(); iDemo.Pos(300, 130); addChild(iDemo); iPlayIndex = 0; State = stNone; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iClose){ (this.parent as OWindow).OnPress(null, CoinzL.miLastWindow); this.prVisible = false; }; } override public function Free():void{ if (iDemo){ iDemo.Free(); iDemo = null; }; super.Free(); } override public function OnEnterFrame(_arg1:Event):void{ switch (State){ case stPlay: if (iDemo.State == OWDemo.stEnd){ State = stPlay; }; break; }; } override public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stNone: State = stPlay; break; case stPlay: if (iInfoText){ this.removeChild(iInfoText); }; CoinzL.OWInstructions[2][1] = CoinzL.OWInstructionsInfo[iPlayIndex]; iInfoText = CoinzL.OWInstructions[2][0](CoinzL.OWInstructions[2]); this.addChild(iInfoText); iDemo.Play(list[iPlayIndex]); iPlayIndex++; if (iPlayIndex > 0){ iPlayIndex = 0; }; break; }; } } }//package RES.WINDOWS
Section 207
//OWIntro (RES.WINDOWS.OWIntro) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; public class OWIntro extends OWindow { public var iHeader:OBitmap; private var iTimer:Number; public var iHit:OSprite; public var iFooter:OBitmap; public var iAlpha:Array; public var iName:Array; public static var stShowFooter:int = 2; public static var stHide:int = 5; public static var stNormal:int = 4; public static var stShowName:int = 3; public static var stShowHeader:int = 1; public static var stInvisible:int = 6; public static var stBeforeShow:int = 0; public function OWIntro(){ super(CoinzL.OWIntroParam); } override public function Init():void{ var _local1:int; var _local2:Number; var _local3:int; this.iName = new Array(); super.Init(); this.iHeader.alpha = 0; this.iFooter.alpha = 0; _local1 = this.iName.length; this.iAlpha = new Array(_local1); _local2 = (300 - (this.iName[0].prHeight / 2)); _local3 = 0; while (_local3 < (_local1 / 2)) { this.iName[_local3].prY = _local2; this.iName[((_local1 - _local3) - 1)].prY = _local2; this.iAlpha[_local3] = (-(((_local1 / 2) - _local3)) * 0.3); this.iAlpha[((_local1 - _local3) - 1)] = (-(((_local1 / 2) - _local3)) * 0.3); this.iName[_local3].alpha = 0; this.iName[((_local1 - _local3) - 1)].alpha = 0; _local3++; }; this.hitArea = this.iHit; this.State = stBeforeShow; } override public function Free():void{ super.Free(); this.iHeader = null; this.iFooter = null; this.iName = null; } override public function OnMouseDown(_arg1:MouseEvent):void{ if (this.iState < OWIntro.stShowFooter){ return; }; this.prVisible = false; super.OnMouseDown(_arg1); } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; switch (this.iState){ case stBeforeShow: if (this.iTimer-- <= 0){ this.State = stShowHeader; }; break; case stShowHeader: if (this.iHeader.alpha >= 1){ this.iHeader.alpha = 1; this.State = stShowFooter; } else { this.iHeader.alpha = (this.iHeader.alpha + 0.025); }; break; case stShowFooter: if (this.iFooter.alpha >= 1){ this.iFooter.alpha = 1; this.State = stShowName; } else { this.iFooter.alpha = (this.iFooter.alpha + 0.025); }; break; case stShowName: if (this.iName[0].alpha >= 1){ this.State = stNormal; } else { _local2 = 0; while (_local2 < this.iName.length) { this.iAlpha[_local2] = (this.iAlpha[_local2] + 0.025); if (this.iAlpha[_local2] > 1){ this.iAlpha[_local2] = 1; }; if (this.iAlpha[_local2] >= 0){ this.iName[_local2].alpha = this.iAlpha[_local2]; }; _local2++; }; }; break; case stNormal: if (this.iTimer-- <= 0){ this.State = stHide; }; break; case stHide: if (this.iFooter.alpha <= 0){ this.State = stInvisible; } else { this.iHeader.alpha = (this.iHeader.alpha - 0.05); this.iFooter.alpha = (this.iFooter.alpha - 0.05); _local2 = 0; while (_local2 < this.iName.length) { this.iName[_local2].alpha = (this.iName[_local2].alpha - 0.05); _local2++; }; }; break; }; } override public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stBeforeShow: this.iTimer = 20; break; case stNormal: this.iTimer = 180; break; case stInvisible: this.prVisible = false; break; }; } } }//package RES.WINDOWS
Section 208
//OWMenu (RES.WINDOWS.OWMenu) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import flash.utils.*; import flash.net.*; import ENGINE.SMARTFOX.*; public class OWMenu extends ODialog { public var iPlayers:OIObject; public var iMoreGames:OButton; public var iOptions:OButton; public var iBName:OButton; public var iGameName:OIObject; public var iCPlayers:OCounter; public var iTimer:int; public var iPlayOnlineStrategy:OButton; public var iHighScores:OButton; public var iInstructions:OButton; public var iInfo:OIObject; public var iLevelEditor:OButton; public function OWMenu(){ super(CoinzL.OWMenu); } override public function set prVisible(_arg1:Boolean):void{ super.prVisible = _arg1; } override public function Init():void{ CoinzL.OWMenu[0][4] = ((CoinzL.strWelcome + " ") + CoinzL.iGAME.prPlayerName); super.Init(); if (CoinzL.iMP.prUsersCount == 0){ this.iPlayers.prAnimationEnabled = false; this.iPlayers.prVisible = false; this.iPlayers.prAnimationEnabled = true; this.iCPlayers.prAnimationEnabled = false; this.iCPlayers.prVisible = false; this.iPlayers.prAnimationEnabled = true; }; this.iCPlayers.prAnimationEnabled = false; this.iCPlayers.prValue = CoinzL.iMP.prUsersCount; this.iPlayers.prAnimationEnabled = true; this.iCPlayers.Pos((this.iPlayOnlineStrategy.prX + 20), this.iCPlayers.prY); this.iPlayers.Pos((this.iCPlayers.prX + 90), this.iPlayers.prY); this.ShowUserReiting(true); } override public function set prActive(_arg1:Boolean):void{ super.prActive = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iBName){ (this.parent as OWindow).OnPress(null, CoinzL.miChoosePlayer); this.prVisible = false; return; }; if (_arg2 == this.iPlayOnlineStrategy){ (this.parent as OWindow).OnPress(null, CoinzL.miGameMP); CoinzL.GameType = CoinzL.STRATEGY; this.prVisible = false; return; }; if (_arg2 == this.iLevelEditor){ (this.parent as OWindow).OnPress(null, CoinzL.miLevelEditor); CoinzL.GameType = CoinzL.STRATEGY; this.prVisible = false; return; }; if (_arg2 == this.iOptions){ (this.parent as OWindow).OnPress(null, CoinzL.miOptions); this.prActive = false; return; }; if (_arg2 == this.iInstructions){ (this.parent as OWindow).OnPress(null, CoinzL.miInstructions); this.prActive = false; return; }; if (_arg2 == this.iHighScores){ (this.parent as OWindow).OnPress(null, CoinzL.miHighScores); this.prActive = false; return; }; if (_arg2 == this.iMoreGames){ navigateToURL(new URLRequest(CoinzL.sURLSite)); return; }; (this.parent as OWindow).OnPress(null, CoinzL.miCommingSoon); this.prActive = false; } override public function Free():void{ this.iBName = null; this.iGameName = null; this.iCPlayers = null; this.iPlayers = null; this.iPlayOnlineStrategy = null; this.iOptions = null; this.iInstructions = null; this.iHighScores = null; this.iMoreGames = null; super.Free(); } private function InitObject(_arg1:Array):void{ if (this.iInfo){ this.removeChild(this.iInfo); this.iInfo.Free(); this.iInfo = null; }; if (!_arg1){ return; }; this.iInfo = new OIObject(_arg1, OInterface.iDefSlowAnimators); this.addChild(this.iInfo); this.iInfo.SetVisible(false); this.iInfo.prVisible = true; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; if (this.iCPlayers.prValue != CoinzL.iMP.prUsersCount){ if (CoinzL.iMP.prUsersCount > 0){ if (!this.iPlayers.prVisible){ this.iCPlayers.prVisible = true; this.iPlayers.prVisible = true; }; } else { if (this.iPlayers.prVisible){ this.iCPlayers.prVisible = false; this.iPlayers.prVisible = false; }; }; this.iCPlayers.prValue = CoinzL.iMP.prUsersCount; }; _local2 = getTimer(); if ((_local2 - this.iTimer) > 30000){ ShowUserReiting(false); }; super.OnEnterFrame(_arg1); } private function ShowUserReiting(_arg1:Boolean):void{ var _local2:String; var _local3:String; var _local4:Array; _local2 = CoinzL.OWColors[Math.round((Math.random() * (CoinzL.OWColors.length - 1)))]; CoinzL.OWMenuReiting[0][3] = _local2; if (_arg1){ CoinzL.iMP.ClearOpponentTurn(true); CoinzL.OWMenuReiting[0][4] = ((CoinzL.iGAME.prPlayerName + CoinzL.strReiting2) + CoinzL.iGAME.prScore.toString()); this.InitObject(CoinzL.OWMenuReiting); }; this.iTimer = getTimer(); if (CoinzL.iMP.State != OMultiplayer.stInZone){ return; }; _local3 = CoinzL.iMP.prOpponentTurn; CoinzL.iMP.ClearOpponentTurn(true); CoinzL.iMP.Turn(["rdr"]); if (!_local3){ return; }; _local4 = _local3.split(/,/); CoinzL.OWMenuReiting[0][4] = (((((int(_local4[0]) + 1).toString() + CoinzL.strReiting1) + _local4[1]) + CoinzL.strReiting2) + _local4[2]); this.InitObject(CoinzL.OWMenuReiting); } } }//package RES.WINDOWS
Section 209
//OWOptions (RES.WINDOWS.OWOptions) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import flash.system.*; public class OWOptions extends ODialog { public var iResolution:OListBox; public var iFullScreen:OListBox; public var iSound:OListBox; private var iSResList:Array; private var iSRes:Array; public var iCancel:OButton; public var iMusic:OListBox; public var iAccept:OButton; public function OWOptions(){ super(CoinzL.OWOptions); } private function AddResolution(_arg1:int, _arg2:int):void{ if ((((_arg1 <= Capabilities.screenResolutionX)) && ((_arg2 <= Capabilities.screenResolutionY)))){ this.iSRes.push([_arg1, _arg2]); this.iSResList.push(((_arg1.toString() + " X ") + _arg2.toString())); }; } override public function Init():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:int; var _local5:int; var _local6:Number; CoinzL.OWOptions[0][2] = 340; CoinzL.OWOptions[5][11] = 190; CoinzL.OWOptions[6][8] = 260; CoinzL.OWOptions[7][8] = 260; super.Init(); this.iResolution.prVisible = false; this.iSound.prCurrentInd = int((CoinzL.iGAME.prSoundVolume * 10)); this.iMusic.prCurrentInd = int((CoinzL.iGAME.prMusicVolume * 10)); this.InitResolutions(); this.iResolution.prLBParams = this.iSResList; _local1 = OGlobal.prStage.stageWidth; _local2 = OGlobal.prStage.stageHeight; _local3 = 10000; _local4 = 0; _local5 = 0; while (_local5 < this.iSRes.length) { _local6 = (Math.abs((this.iSRes[_local5][0] - _local1)) + Math.abs((this.iSRes[_local5][1] - _local2))); if (_local6 < _local3){ _local4 = _local5; _local3 = _local6; }; _local5++; }; this.iResolution.prCurrentInd = _local4; this.iFullScreen.prCurrentInd = ((((OGlobal.prStage.stageWidth == Capabilities.screenResolutionX)) && ((OGlobal.prStage.stageHeight == Capabilities.screenResolutionY)))) ? 1 : 0; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iCancel){ this.prVisible = false; return; }; if (_arg2 == this.iAccept){ this.prVisible = false; CoinzL.iGAME.prSoundVolume = (this.iSound.prCurrentInd / 10); CoinzL.iGAME.prMusicVolume = (this.iMusic.prCurrentInd / 10); CoinzL.iGAME.prResX = this.iSRes[this.iResolution.prCurrentInd][0]; CoinzL.iGAME.prResY = this.iSRes[this.iResolution.prCurrentInd][1]; CoinzL.iGAME.prFullScreen = (this.iFullScreen.prCurrentInd) ? true : false; fscommand("fullscreen", CoinzL.iGAME.prFullScreen.toString()); return; }; } override public function Free():void{ this.iSound = null; this.iMusic = null; this.iResolution = null; this.iFullScreen = null; this.iAccept = null; this.iCancel = null; this.iSRes = null; this.iSResList = null; super.Free(); } private function InitResolutions():void{ this.iSRes = new Array(); this.iSResList = new Array(); AddResolution(640, 480); AddResolution(800, 600); AddResolution(0x0400, 600); AddResolution(0x0400, 0x0300); AddResolution(0x0500, 0x0300); AddResolution(0x0500, 0x0400); AddResolution(Capabilities.screenResolutionX, Capabilities.screenResolutionY); } } }//package RES.WINDOWS
Section 210
//OWResults (RES.WINDOWS.OWResults) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; import ENGINE.CORE.*; import flash.utils.*; public class OWResults extends OAlert { private var iWInd:int;// = 0 private var iTimer:Timer; private var iDelta:Number;// = 0.025 public static const stScore:int = 3; public static const stHits:int = 1; public static const stStart:int = 0; public static const stMisses:int = 2; public function OWResults(){ var _local1:int; var _local2:int; var _local3:int; iWInd = 0; iDelta = 0.025; _local1 = CoinzL.iGAME.Read(OGame.catTmp, "Score"); CoinzL.OWResultsLevelScore[1][5] = _local1.toString(); _local1 = CoinzL.iGAME.Read(OGame.catTmp, "Bonus"); CoinzL.OWResultsBonusScore[1][5] = _local1.toString(); _local1 = CoinzL.iGAME.Read(OGame.catTmp, "Result"); CoinzL.OWResultsTotalScore[1][5] = _local1.toString(); CoinzL.iGAME.AddScore(_local1); CoinzL.iGAME.AddScoreInTable(_local1); _local2 = CoinzL.iGAME.prMode; CoinzL.iGAME.prMode = 0; CoinzL.iGAME.AddScore(_local1); CoinzL.iGAME.AddScoreInTable(_local1); CoinzL.iGAME.prMode = _local2; _local3 = CoinzL.iGAME.prScore; CoinzL.OWResultsRaiting[1][4] = _local3.toString(); CoinzL.iMP.Turn(["wrr", CoinzL.iGAME.prPlayerName, _local3]); super(CoinzL.OWResults, null); } override public function Init():void{ super.Init(); this.Pos(0, 0); this.iTimer = new Timer(500, 8); this.iTimer.addEventListener(TimerEvent.TIMER, OnTimer); this.iTimer.start(); } override public function Free():void{ this.iTimer.stop(); this.iTimer.removeEventListener(TimerEvent.TIMER, OnTimer); this.iTimer = null; super.Free(); } private function OnKeyDown(_arg1:KeyboardEvent):void{ this.prVisible = false; OGlobal.prStage.removeEventListener(KeyboardEvent.KEY_DOWN, OnKeyDown); } private function OnTimer(_arg1:TimerEvent):void{ switch (this.iTimer.currentCount){ case 1: (this.getChildAt(0) as OIObject).prVisible = true; break; case 2: (this.getChildAt(1) as OIObject).prVisible = true; OSound.PlaySound(CoinzL.OSSelectCoin); break; case 3: (this.getChildAt(2) as OIObject).prVisible = true; OSound.PlaySound(CoinzL.OSSelectCoin); break; case 4: (this.getChildAt(3) as OIObject).prVisible = true; OSound.PlaySound(CoinzL.OSSelectCoin); break; case 5: (this.getChildAt(4) as OIObject).prVisible = true; (this.getChildAt(5) as OIObject).prVisible = true; OSound.PlaySound(CoinzL.OSDeleteCoins); OGlobal.prStage.addEventListener(KeyboardEvent.KEY_DOWN, OnKeyDown); break; }; } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); } } }//package RES.WINDOWS
Section 211
//Coinz (Coinz) package { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import RES.WINDOWS.*; import ENGINE.SMARTFOX.*; import ENGINE.AD.*; public class Coinz extends OApplication { private var iSystem:OSystem; public var iField:OSprite; private var iWindow:OWindow; public function Coinz(){ super("Coinz"); CoinzL.iGAME; OSound.PlayListAdd("music.mp3"); OSound.PlayMusic(); OAdBanners.InitTBanner(CoinzL.sTBannerPrefix, CoinzL.sBannerID); OAdBanners.InitBBanner(CoinzL.sBBannerPrefix, CoinzL.sBannerID); } protected function OnResize1(_arg1:Event):void{ var _local2:Stage; _local2 = Stage(_arg1.target); } override protected function OnMenuItem():void{ var _local1:int; var _local2:DisplayObject; var _local3:OWHighScores; _local1 = this.prMenuItem; switch (_local1){ case CoinzL.miNullWindow: return; case CoinzL.miLastWindow: _local2 = this.getChildAt((this.numChildren - 1)); this.iWindow = ((_local2 is OWindow)) ? (_local2 as OWindow) : null; if (this.iWindow){ this.iWindow.prActive = true; return; }; this.iWindow = new OWMenu(); this.prMenuItem = CoinzL.miNullWindow; break; case CoinzL.miIntro: this.iWindow = new OWIntro(); if (CoinzL.iGAME.prPlayerName == ""){ this.prMenuItem = CoinzL.miEnterNameFirst; } else { this.prMenuItem = CoinzL.miMenu; }; break; case CoinzL.miEnterNameFirst: this.iWindow = new OWEnterName(false); this.prMenuItem = CoinzL.miMenu; break; case CoinzL.miEnterNewName: this.iWindow = new OWEnterName(true); (this.iWindow as OWEnterName).prName = ""; this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miMenu: switch (CoinzL.iMP.State){ case OMultiplayer.stNone: CoinzL.iMP.Init(CoinzL.sDomain, CoinzL.sServer, CoinzL.sZone, CoinzL.sXTName, CoinzL.iGAME.prPlayerName); break; case OMultiplayer.stConnectionError: if (CoinzL.iMP.prErrorsCount < 5){ CoinzL.iMP.State = OMultiplayer.stNone; CoinzL.iMP.Init(CoinzL.sDomain, CoinzL.sServer, CoinzL.sZone, CoinzL.sXTName, CoinzL.iGAME.prPlayerName); }; break; }; this.iWindow = new OWMenu(); this.prMenuItem = CoinzL.miNullWindow; break; case CoinzL.miCommingSoon: this.iWindow = new OAlert(CoinzL.OWCommingSoon, null); this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miChoosePlayer: this.iWindow = new OWChoosePlayer(); this.prMenuItem = CoinzL.miMenu; break; case CoinzL.miDeletePlayerConfirm: this.iWindow = new OAlert(CoinzL.OWDeletePlayerConfirm, [CoinzL.miDeletePlayer, CoinzL.miLastWindow]); this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miDeletePlayer: CoinzL.iGAME.DeletePlayer(CoinzL.iGAME.prPlayerName); if (CoinzL.iGAME.prPlayerName != ""){ this.OnMenuItem(); return; }; this.iWindow = new OWEnterName(false); this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miOptions: this.iWindow = new OWOptions(); this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miHighScores: this.iWindow = new OWHighScores(); this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miDeleteScoresConfirm: this.iWindow = new OAlert(CoinzL.OWDeleteScoresConfirm, [CoinzL.miDeleteScores, CoinzL.miLastWindow]); this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miDeleteScores: _local3 = (this.getChildAt((this.numChildren - 1)) as OWHighScores); if (_local3.iTable.prValue == 0){ CoinzL.iGAME.ClearLocalScores(0); } else { CoinzL.iGAME.ClearPersonalScores(0); }; this.OnMenuItem(); return; case CoinzL.miGameMP: this.iWindow = new OWGame(); this.prMenuItem = CoinzL.miMenu; break; case CoinzL.miResultsMP: this.iWindow = new OWResults(); this.prMenuItem = CoinzL.miLastWindow; break; case CoinzL.miInstructions: this.iWindow = new OWInstruction(); this.prMenuItem = CoinzL.miLastWindow; break; }; this.addChild(this.iWindow); } override public function Init():void{ if (((((!(this.stage)) || ((this.stage.stageHeight == 0)))) || ((this.stage.stageWidth == 0)))){ return; }; this.InitBackground([CoinzL.OBG02], 0); if (CoinzL.sDebug){ this.iSystem = new OSystem(); this.addChild(this.iSystem); }; super.Init(); this.prMenuItem = CoinzL.miIntro; OnMenuItem(); OGlobal.prStage.addEventListener(Event.RESIZE, OnResize1); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg1 == null){ this.prMenuItem = _arg2; }; } override protected function OnDeactivate(_arg1:Event):void{ CoinzL.iGAME.SaveCache(); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); CoinzL.iMP.OnEnterFrame(); if (CoinzL.sDebug){ OSystem.iUserText1 = (((((((" : " + CoinzL.iMP.State.toString()) + " : ") + CoinzL.iMP.prActiveRoomID.toString()) + " ") + CoinzL.iMP.prPlayerID.toString()) + " : ") + CoinzL.iMP.prError); }; if (this.iWindow){ if (this.iWindow.prAnimation){ return; }; if (!this.iWindow.prVisible){ this.removeChild(this.iWindow); this.iWindow.Free(); this.iWindow = null; this.OnMenuItem(); } else { if (!this.iWindow.prActive){ this.OnMenuItem(); }; }; }; } } }//package
Section 212
//CoinzL (CoinzL) package { import ENGINE.DISPLAY.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.GAME.*; import ENGINE.CORE.*; import ENGINE.SMARTFOX.*; public class CoinzL { public static const strCancel:String = "Cancel"; public static const OSSmileSInd:int = 12; public static const strLoadingData:String = "Loading data..."; public static const miDeletePlayer:int = 9; public static const iGameColor:Array = ["white", "red", "yellow", "green", "aqua", "blue", "magenta"]; public static const miDeleteScoresConfirm:int = 18; private static const OWSelectGameGameModeColor:Array = ["60", "30", "180", "70", "190", "220", "280", "100", "40", "150", "170", "250", "50", "260", "140", "330", "300", "350", "80", "120"]; public static const strDefPlayerName:String = "WELL"; public static const strResults1:String = "Results:"; public static const strHint:String = "Hint"; public static const strPresents:String = "presents"; public static const OSBubbleBangSInd:int = 0; public static const miCommingSoon:int = 6; public static const strConnect1URL:String = "http://www.wellgames.com/free_online/coinz/?g=coinz"; public static const strLoadingLevel:String = "loading level..."; public static const strResults:String = "Results"; public static const strChoosePlayer:String = "Choose a Player"; public static const sBBannerPrefix:String = "bottom/"; public static const strCommingSoon:String = "Coming Soon..."; public static const strConnect2URL:String = "http://www.wellgames.com/?g=coinz"; public static const miLastWindow:int = 1; public static const strInputText:String = "Input Text"; public static const strFullScreen:String = "Full Screen"; private static const iWOptionsVolume:Array = [CoinzL.strOff, "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]; public static const strClickToCont:String = "click to continue"; public static const ARCADE:int = 2; public static const strSite:String = "WELLGAMES.COM"; public static const miMenu:int = 5; public static const SQUARE:int = 0; public static const strNextLevel:String = "Next Level"; public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/free_online/coinz/?g=coinz"; public static const strMoreGames:String = "More Games"; public static const strPlace:String = " Place"; public static const strPlayAgain:String = "Play Again"; public static const strSound:String = "Sound Volume"; public static const miOptions:int = 10; public static const sURLSite:String = "http://www.wellgames.com/?g=coinz"; public static const miDeleteScores:int = 19; public static const strNewPlayer:String = "NEW PLAYER!"; public static const strHighScores:String = "High Scores"; public static const miDeletePlayerConfirm:int = 8; public static const miInstructions:int = 24; public static const strOff:String = "Off"; public static const strReiting2:String = "'s Rating Is "; public static const strWindow:String = "Window"; public static const strDeleteScoresConfirm:String = "Are you sure you want to delete score table?"; public static const strReiting1:String = " Place: "; public static const strHowToPlay:String = "How To Play"; public static const sServer:String = "www.wellgames.com"; public static const strHasReiting:String = "'s Rating Is "; public static const strReset:String = "Reset"; public static const sDebug:Boolean = false; public static const strNew:String = "New"; public static const strLevelScoreR:String = "Level Score: "; public static const strLeftToExchange:String = "left to exchange"; public static const sTBannerPrefix:String = "top/"; public static const OWInstrInfo2:Array = [[CoinzS.Header, 550, 23, "yellow1", CoinzL.strInstructionsText2, 0, 0, null, 0, true]]; public static const OWInstrInfo3:Array = [[CoinzS.Header, 550, 23, "yellow1", CoinzL.strInstructionsText3, 50, 0, null, 0, true]]; public static const OWInstrInfo1:Array = [[CoinzS.Header, 550, 20, "yellow1", CoinzL.strInstructionsText1, 0, 0, null, 0, true]]; public static const strFailed:String = "Failed"; public static const miGameMP:int = 21; public static const strConnect2:String = "Try Other Multiplayer Games!"; public static const strConnect3:String = ("Tell A Friend\nAbout\n" + strGameName); public static const miResultsMP:int = 22; public static const strConnect1:String = "Play With Other Gamers In Multiplayer Mode!"; public static const sXTName:String = "cz"; public static const strGainedScore:String = "gained score :"; public static const OWInstructionsInfo:Array = [OWInstrInfo1, OWInstrInfo2, OWInstrInfo3]; public static const HEXAGON:int = 1; public static const DEMO:int = 3; public static const sURLGame:String = "http://www.wellgames.com/free_online/coinz/?g=coinz"; public static const miEnterNewName:int = 4; public static const TRIANGLE:int = 2; public static const miIntro:int = 2; private static const OWHighScoresType:Array = [CoinzL.strLocal, CoinzL.strPersonal]; public static const strClose:String = "Close"; public static const strPrToCont:String = "press to continue"; public static const strEnterName:String = "please enter your name:"; public static const strFailedLevel:String = " Has Failed The Level With Score "; public static const strMoreGames1:String = "More Games"; public static const strLevelConfirm1:String = "score"; public static const strLevelConfirm2:String = "to get to the next level you must beat your opponent"; private static const OWGoalColors:Array = ["60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60", "60"]; public static const strMusic:String = "Music Volume"; public static const strInstructions:String = "Instruction"; public static const strLevelScore:String = "'s Level Score Is "; public static const OWInstructionsText:Array = [strInstructionsText1, strInstructionsText2, strInstructionsText3]; public static const strComplete:String = "complete!"; public static const miResultsSP:int = 15; public static const strAccept:String = "Accept"; public static const strClear:String = "Clear"; public static const miSSaver:int = 25; public static const strConnectionToServer:String = "Connecting To Server..."; public static const strSendMail:String = "Send Mail"; public static const strPlayersOnline1:String = "Players Online"; public static const strLevel1:String = "Level:"; public static const sZone:String = "Coinz"; public static const strDeletePlayerConfirm:String = "Are you sure you want to delete this profile?"; public static const strBonusScore:String = "bonus score :"; public static const PATH_LEVEL:String = "levels.xml"; public static const miLevelEditor:int = 26; public static const OSSmileEInd:int = 14; public static const sBannerID:String = "coinz"; public static const strGameName:String = "COINZ!"; public static const strScore:String = "Score:"; public static const strYes:String = "Yes"; public static const miNullWindow:int = 0; public static const sDomain:String = "wellgames.com"; public static const strCompleteLevel:String = " Has Completed The Level With Score "; public static const miHighScores:int = 17; public static const strLevelEditor:String = "Level Editor"; public static const strTimeIsUp:String = "Time is up"; public static const strOptions:String = "Options"; public static const strMenu:String = "Menu"; public static const strDelete:String = "Delete"; public static const strOpponent1:String = "Opponent"; public static const strOpponent2:String = "In Game"; private static const iWOptionsOnOff:Array = [CoinzL.strOff, CoinzL.strOn]; public static const OSBubbleBangEInd:int = 10; public static const strYourRaiting:String = "Your Rating:"; public static const strLevelConfirm:String = "To get to the next level you need more than"; public static const STRATEGY:int = 1; public static const strPlayOnline1:String = "Play Online!"; public static const strChangePlayer:String = "click to change player"; public static const strExchange:String = "Exchange rate:"; public static const strCommingSoonI:String = "This option is not available at the moment"; public static const strPersonal:String = "Personal"; public static const miChoosePlayer:int = 7; public static const miEnterNameFirst:int = 3; private static const OSoundParams:Array = [CoinzL.OSStartLevel, CoinzL.OSDeleteCoins, CoinzL.OSSelectCoin, CoinzL.OSLevelComplete, CoinzL.OSCheck, CoinzL.OSReset, CoinzL.OSFallCoins, CoinzL.OSBubbleBang04, CoinzL.OSFallBegin, CoinzL.OSFallRepeat, CoinzL.OSFallEnd]; public static const strLocal:String = "Local"; public static const strPlayOnline:String = "Play Online!"; public static const strInstructionsText1:String = "Your goal is clear the field of the more expensive currency by exchanging it with the less expensive. Click on a coin and see its exchange rate on the bottom. Select required amount of less expensive coins to make them disappear."; public static const strInstructionsText2:String = ""; public static const strInstructionsText3:String = ""; public static const strNo:String = "No"; public static const strLevel:String = "Level"; public static const OSOops:int = 15; public static const strOn:String = "On"; public static const strWelcome:String = "Welcome"; public static const strPlayersOnline:String = "Players Online"; private static var OGNumberCounterO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OGNumberCounterElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OGNumberCounterElementO, 11, 0, "iDigits", 1, true]], 18, 35]; public static var OGTimer:Array = [[CoinzS.MySmallBorder, 180, 40, "red", 0, 0, "iTimeBorder", 0, false], [CoinzS.SmallFrame, 180, 40, "red", "330", 0, 0, "iTimeFon", 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, CoinzL.OFreeze], 0.25, "GEL", "blue", "spanel", 0.15, 25, 25, "iFreeze", 0, false], [ODisplay.IDisplayObjectMake, OWGameTimeF, 40, 5, "iMinuteCounter1", 0, false], [ODisplay.IDisplayObjectMake, OWGameTimeF, 57, 5, "iMinuteCounter2", 0, false], [CoinzS.Header, 10, 40, "red", ":", 88, -5, "iTimeDel", 0, false], [ODisplay.IDisplayObjectMake, OWGameTimeF, 108, 5, "iSecondCounter1", 0, false], [ODisplay.IDisplayObjectMake, OWGameTimeF, 125, 5, "iSecondCounter2", 0, false]]; public static var OWInfoP:Array = [[CoinzS.Header, 250, 27, "yellow", CoinzL.strConnect1, 5, 265, null, 0, true]]; public static var OChecked:Class = CoinzL_OChecked; private static var OWGameSite:Array = [[CoinzS.Header, 250, 27, "blue", strSite, 0, 0, null, 0, true]]; public static var OIRight:Class = CoinzL_OIRight; public static var OSFallBegin:Class = CoinzL_OSFallBegin; public static var OWHighScores:Array = [[CoinzS.BigFrame, 600, 440, "yellow", "white", 0, 0, null, 0, true], [CoinzS.Header, 600, 50, "yellow", CoinzL.strHighScores, 0, 20, null, 0, true], [CoinzS.ListBoxTextHSlider, 280, 50, "aqua1", false, 190, 40, "aqua1", "", CoinzL.OWHighScoresType, 160, 75, "iType", 0, true], [CoinzS.SmallBorder, 540, 200, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, CoinzL.OWHighScoreTabF, 45, 145, "iTable", 0, true], [CoinzS.MakeTextButton, 150, 60, "red", "red", 30, CoinzL.strClear, 110, 350, "iClear", 0, true], [CoinzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, CoinzL.strClose, 340, 350, "iClose", 0, true]]; public static var OWDeleteScoresConfirm:Array = [[CoinzS.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [CoinzS.Header, 420, 30, "aqua1", CoinzL.strDeleteScoresConfirm, 0, 85, null, 0, true], [CoinzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, CoinzL.strYes, 50, 190, "iButtons", 0, true], [CoinzS.MakeTextButton, 150, 60, "red", "red", 30, CoinzL.strNo, 220, 190, "iButtons", 1, true]]; public static var OWGameConnection:Array = [CoinzS.ColorHeader, 800, 50, CoinzL.OWColors, CoinzL.strConnectionToServer, OInterface.iDefSlowAnimators]; public static var OWEnterName:Array = [[CoinzS.BigFrame, 460, 290, "aqua1", "white", 0, 0, null, 0, true], [CoinzS.Header, 460, 50, "aqua1", CoinzL.strNewPlayer, 0, 20, null, 0, true], [CoinzS.Header, 460, 30, "yellow", CoinzL.strEnterName, 0, 90, null, 0, true], [CoinzS.InputText, 400, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 130, "iName", 0, true], [CoinzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, CoinzL.strAccept, 70, 210, "iAccept", 0, true], [CoinzS.MakeTextButton, 150, 60, "red", "red", 30, CoinzL.strCancel, 240, 210, "iCancel", 0, true]]; private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, CoinzL.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, CoinzL.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, CoinzL.OTimerAnimator, null]; public static var OCursor:Class = CoinzL_OCursor; private static var OWGameCompletedLevel:Array = [[CoinzS.Header, 500, 60, "yellow", strLevel, 23, 0, null, 0, true], [CoinzS.Header, 500, 60, "yellow", strComplete, 23, 60, null, 0, true], [CoinzS.Header, 500, 35, "yellow", strClickToCont, 23, 130, null, 0, true]]; public static var OSDeleteCoins:Class = CoinzL_OSDeleteCoins; public static var FindColors1:Array = ["0", "30", "60", "90"]; public static var OWCommingSoon:Array = [[CoinzS.BigFrame, 530, 290, "yellow1", "yellow", 0, 0, null, 0, true], [CoinzS.Header, 530, 50, "red", CoinzL.strCommingSoon, 0, 20, null, 0, true], [CoinzS.Header, 530, 30, "magenta", CoinzL.strCommingSoonI, 0, 125, null, 0, true], [CoinzS.MakeTextButton, 150, 60, "aqua1", "aqua1", 30, CoinzL.strClose, 190, 210, null, 0, true]]; public static var OWGameLoadingData:Array = [CoinzS.ColorHeader, 800, 50, CoinzL.OWColors, CoinzL.strLoadingData, OInterface.iDefSlowAnimators]; public static var FindColors2:Array = ["150", "180", "210", "240"]; public static var FindColorsO:Array = ["240", "240", "240", "240"]; public static var recLevel:String; public static var OSFallEnd:Class = CoinzL_OSFallEnd; public static var OWResults:Array = [[CoinzS.ColorHeader, 800, 90, OWRecordColor, strResults, OInterface.iDefSlowAnimators, 0, 0, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 50, 130, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 50, 195, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 50, 270, null, 0, false], [OInterface.OIObjectMake, OWResultsRaiting, OInterface.iDefSlowAnimators, 0, 330, null, 0, false], [CoinzS.MakeTextButton, 320, 60, "yellow", "yellow", 30, CoinzL.strNextLevel, 240, 540, "iButtons", 0, false]]; public static var OWGameLoadLevelElement:Array = [OInterface.OTabMake, [[CoinzS.Header, 30, 50, "yellow", " ", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "0", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "1", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "2", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "3", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "4", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "5", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "6", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "7", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "8", 0, 0, null, 0, false], [CoinzS.Header, 30, 50, "yellow", "9", 0, 0, null, 0, false]], 30, 50, CoinzL.OWGameCounterAnimator, null]; public static var OWResultsLevelScore:Array = [[CoinzS.TextAlign, 695, 50, 50, "yellow", strGainedScore, 0, 1, 0, 0, null, 0, true], [CoinzS.TextAlign, 695, 50, 50, "yellow", "9", 2, 1, 0, 0, null, 0, true]]; public static var OWGameNCL:Array = [OInterface.OIObjectMake, OWGameNotCompletedLevel, OInterface.iDefAnimators, 0, 0, null, 0, true]; public static var OILeft:Class = CoinzL_OILeft; public static var OWGameTimeElement:Array = [OInterface.OTabMake, [[CoinzS.Header, 17, 30, "red", " ", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "0", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "1", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "2", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "3", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "4", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "5", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "6", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "7", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "8", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "red", "9", 0, 0, null, 0, false]], 17, 30, null, null]; public static var OWGameNewLevelWithNoOpponent:Array = [[CoinzS.ColorHeader, 800, 60, OWSelectGameGameModeColor, strSite, OInterface.iDefAnimators, 0, 0, null, 0, true]]; public static var OWResultsRaiting:Array = [[CoinzS.ColorText, 60, OWPlayersColor, strYourRaiting, OInterface.iDefSlowAnimators, 180, 0, null, 0, true], [CoinzS.Header, 800, 60, "aqua1", "9", 0, 70, null, 0, true]]; private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15}; public static var OFont:Class = CoinzL_OFont; private static var OWGameTimeF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameTimeElement, 0, 0, "iDigits", 0, true]], 17, 30]; public static var OWResultsBonusScore:Array = [[CoinzS.TextAlign, 695, 50, 50, "red", strBonusScore, 0, 1, 0, 0, null, 0, true], [CoinzS.TextAlign, 695, 50, 50, "red", "9", 2, 1, 0, 0, null, 0, true]]; public static var OWResultsTotalScore:Array = [[CoinzS.TextAlign, 695, 50, 50, "yellow1", strLevelScoreR, 0, 1, 0, 0, null, 0, true], [CoinzS.TextAlign, 695, 50, 50, "yellow1", "9", 2, 1, 0, 0, null, 0, true]]; public static var OSStartLevel:Class = CoinzL_OSStartLevel; public static var OWGameNewLevelWithOpponent:Array = [OInterface.OIObjectMake, OWGameNewLevel, OInterface.iDefAnimators, 0, 0, null, 0, false]; private static var OGMoneyCounterElement:Array = [OInterface.OTabMake, [[CoinzS.Header, 17, 25, "yellow", " ", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "0", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "1", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "2", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "3", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "4", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "5", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "6", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "7", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "8", 0, 0, null, 0, false], [CoinzS.Header, 17, 25, "yellow", "9", 0, 0, null, 0, false]], 17, 25, CoinzL.OWGameCounterAnimator, null]; private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams); private static var OWGameLoadLevel:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameLoadLevelElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameLoadLevelElement, 30, 0, "iDigits", 1, true]], 100, 50]; public static var OGNumberCounterElementO:Array = [OInterface.OTabMake, [[CoinzS.Header, 9, 20, "240", " ", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "0", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "1", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "2", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "3", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "4", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "5", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "6", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "7", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "8", 0, 0, null, 0, false], [CoinzS.Header, 9, 20, "240", "9", 0, 0, null, 0, false]], 9, 35, CoinzL.OWGameCounterAnimator, null]; public static var OSLevelComplete:Class = CoinzL_OSLevelComplete; public static var OSCheck:Class = CoinzL_OSCheck; public static var OWColors:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"]; public static var OWIntroParam:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [CoinzS.Header, 800, 50, "aqua1", CoinzL.strSite, 0, 160, "iHeader", 0, true], [CoinzS.Header, 800, 40, "aqua1", CoinzL.strPresents, 0, 400, "iFooter", 0, true], [CoinzS.Text, 120, "aqua1", "C", 193, 0, "iName", 0, true], [CoinzS.Text, 120, "yellow", "O", 270, 0, "iName", 1, true], [CoinzS.Text, 120, "green", "I", 360, 0, "iName", 2, true], [CoinzS.Text, 120, "red", "N", 410, 0, "iName", 3, true], [CoinzS.Text, 120, "magenta", "Z", 492, 0, "iName", 4, true], [CoinzS.Text, 120, "green", "!", 568, 0, "iName", 5, true]]; public static var OIDown:Class = CoinzL_OIDown; public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[CoinzS.Header, 11, 20, "yellow1", " ", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "0", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "1", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "2", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "3", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "4", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "5", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "6", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "7", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "8", 0, 0, null, 0, false], [CoinzS.Header, 11, 20, "yellow1", "9", 0, 0, null, 0, false]], 11, 20, CoinzL.OWGameCounterAnimator, null]; public static var OWColors1:Array = ["30", "0", "90", "60", "150", "120", "210", "180", "270", "240", "330", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"]; public static var OWColors2:Array = ["330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0"]; public static var OWColors3:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"]; public static var OSReset:Class = CoinzL_OSReset; private static var iGameType:int = 0; public static var OBG02:Class = CoinzL_OBG02; public static var OWGameNewLevel:Array = [[CoinzS.ColorHeader, 800, 60, OWSelectGameGameModeColor, strSite, OInterface.iDefAnimators, 0, 0, null, 0, true], [CoinzS.ColorHeader, 800, 50, CoinzL.OWColors, strOpponent1, OInterface.iDefAnimators, 0, 70, null, 0, true], [CoinzS.ColorHeader, 800, 50, CoinzL.OWColors2, strSite, OInterface.iDefAnimators, 0, 130, null, 0, true]]; public static var OWChoosePlayer:Array = [[CoinzS.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [CoinzS.Header, 500, 50, "aqua1", CoinzL.strChoosePlayer, 0, 20, null, 0, true], [CoinzS.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [CoinzS.MakeTextButton, 150, 60, "yellow", "yellow", 30, CoinzL.strNew, 30, 340, "iNew", 0, true], [CoinzS.MakeTextButton, 150, 60, "magenta", "magenta", 30, CoinzL.strDelete, 320, 340, "iDelete", 0, true], [CoinzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, CoinzL.strAccept, 90, 420, "iAccept", 0, true], [CoinzS.MakeTextButton, 150, 60, "red", "red", 30, CoinzL.strCancel, 260, 420, "iCancel", 0, true]]; public static var OWDeletePlayerConfirm:Array = [[CoinzS.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [CoinzS.Header, 420, 30, "aqua1", CoinzL.strDeletePlayerConfirm, 0, 85, null, 0, true], [CoinzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, CoinzL.strYes, 50, 190, "iButtons", 0, true], [CoinzS.MakeTextButton, 150, 60, "red", "red", 30, CoinzL.strNo, 220, 190, "iButtons", 1, true]]; public static var OSBubbleBang01:Class = CoinzL_OSBubbleBang01; public static var OWSSaver:Array = [[CoinzS.MakeNFTextButton, 75, 25, "yellow", "yellow", 25, CoinzL.strMenu, 0, 0, "iMenu", 0, true], [CoinzS.MakeNFTextButton, 225, 25, "aqua1", "aqua1", 25, CoinzL.strSite, 0, 0, "iSite", 0, true]]; public static var OSBubbleBang05:Class = CoinzL_OSBubbleBang05; public static var OSBubbleBang02:Class = CoinzL_OSBubbleBang02; public static var OWGameLevelElement:Array = [OInterface.OTabMake, [[CoinzS.Header, 14, 22, "yellow", " ", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "0", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "1", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "2", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "3", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "4", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "5", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "6", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "7", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "8", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow", "9", 0, 0, null, 0, false]], 14, 22, CoinzL.OWGameCounterAnimator, null]; public static var OSBubbleBang04:Class = CoinzL_OSBubbleBang04; public static var OSBubbleBang06:Class = CoinzL_OSBubbleBang06; public static var OWGame:Array = [[CoinzS.ColorHeader, 250, 58, OWGameNameColor, strGameName, OInterface.iDefAnimators, 543, -7, "iGameName", 0, false], [CoinzS.MakeTextButton, 230, 40, "white", "white", 25, CoinzL.strMenu, 550, 550, "iMenu", 0, false], [OInterface.OIObjectMake, OWGameSite, OInterface.iDefAnimators, 540, 63, "iSite", 0, false], [CoinzS.ColorHeader, 80, 22, OWColors2, strScore, OInterface.iDefAnimators, 590, 393, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 710, 398, "iScoreCounter", 0, false], [CoinzS.ColorHeader, 80, 22, OWColors3, strLevel1, OInterface.iDefAnimators, 610, 423, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelF, 710, 428, "iLevelCounter", 0, false], [CoinzS.ColorHeader, 80, 20, OWColors1, strScore, OInterface.iDefAnimators, 595, 115, "iScoreO", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 670, 120, "iScoreCounterO", 0, false], [CoinzS.MakeTextButton, 230, 40, "130", "white", 25, CoinzL.strHint, 550, 460, "iHintButton", 0, false], [CoinzS.MakeTextButton, 230, 40, "270", "white", 25, CoinzL.strReset, 550, 505, "iReset", 0, false], [CoinzS.InvisibleButton, 240, 85, 542, 7, "iInvisibleButton", 0, true]]; public static var OIUp:Class = CoinzL_OIUp; public static var OSFallRepeat:Class = CoinzL_OSFallRepeat; public static var OWResultsRaitingS:Array = [[CoinzS.Header, 800, 80, "aqua1", "9", 0, 0, null, 0, true]]; public static var OWResultsScoreT:Array = [[CoinzS.Header, 800, 60, "yellow1", ((strLevel + " ") + strScore), 0, 0, null, 0, true]]; public static var OWRecordColor:Array = ["0", "60", "90", "150", "180", "240", "300", "360", "0", "60", "90", "150", "180", "240", "300", "360"]; private static var OWPlayersCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 67, 0, "iDigits", 4, true]], 85, 30]; private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 14, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 28, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 42, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 56, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 70, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 84, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 122, 0, "iDigits", 8, true]], 14, 22]; private static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[CoinzS.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [CoinzS.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, CoinzL.OTimerAnimator, null]; public static var OSSelectCoin:Class = CoinzL_OSSelectCoin; public static var OWGameNameColor:Array = ["aqua1", "yellow", "aqua", "magenta", "yellow1", "yellow", "magenta1", "aqua1", "red1", "green", "aqua1", "yellow", "green", "red", "magenta", "aqua", "white", "aqua1", "yellow", "green", "red", "magenta", "aqua", "white", "aqua1", "yellow", "green", "red", "magenta", "aqua"]; private static var OWGameNotCompletedLevel:Array = [[CoinzS.Header, 500, 60, "red", strLevel, 23, 0, null, 0, true], [CoinzS.Header, 500, 60, "red", strFailed, 23, 60, null, 0, true], [CoinzS.Header, 500, 35, "red", strClickToCont, 23, 130, null, 0, true]]; public static var OWInfoPUserNotFound:Array = [[CoinzS.Header, 250, 27, "yellow", CoinzL.strConnect1, 5, 200, null, 0, true], [CoinzS.Header, 250, 27, "yellow", CoinzL.strConnect1, 5, 265, null, 0, true]]; public static var OWPlayersColor:Array = ["180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150"]; public static var OWInputParam:Array = [[CoinzS.BigFrame, 600, 400, "yellow1", "yellow", 0, 0, null, 0, true], [CoinzS.Header, 600, 40, "aqua1", CoinzL.strInputText, 0, 30, null, 0, true], [CoinzS.MakeTextButton, 150, 60, "aqua1", "aqua1", 30, CoinzL.strClose, 225, 310, "iClose", 0, true]]; public static var OGNumberCounterElement:Array = [OInterface.OTabMake, [[CoinzS.Header, 15, 28, "120", " ", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "0", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "1", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "2", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "3", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "4", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "5", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "6", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "7", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "8", 0, 0, null, 0, false], [CoinzS.Header, 15, 28, "120", "9", 0, 0, null, 0, false]], 15, 28, CoinzL.OWGameCounterAnimator, null]; public static var OWLevelEditor:Array = [[CoinzS.MakeTextButton, 200, 50, "white", "white", 25, CoinzL.strMenu, 558, 490, "iMenu", 0, false]]; public static var OGMoneyCounter:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OGMoneyCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OGMoneyCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OGMoneyCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OGMoneyCounterElement, 51, 0, "iDigits", 3, true]], 51, 25]; public static var OWResultsColor:Array = ["yellow", "yellow", "yellow", "yellow", "yellow", "yellow", "yellow"]; public static var OWMenuReiting:Array = [[CoinzS.Header, 800, 30, "yellow", "W", 0, 375, null, 0, true]]; public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[CoinzS.Header, 14, 22, "yellow1", " ", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "0", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "1", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "2", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "3", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "4", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "5", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "6", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "7", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "8", 0, 0, null, 0, false], [CoinzS.Header, 14, 22, "yellow1", "9", 0, 0, null, 0, false]], 14, 22, CoinzL.OWGameCounterAnimator, null]; public static var OWInfoPConnect:Array = [[CoinzS.Header, 250, 27, "yellow", CoinzL.strConnect1, 5, 200, null, 0, true], [CoinzS.MakeTextButton, 230, 45, "yellow", "yellow", 25, CoinzL.strPlayOnline, 10, 310, null, 0, true]]; public static var OWLoadProgress:Array = [[CoinzS.ColorHeader, 800, 50, OWColors3, strLoadingLevel, OInterface.iDefAnimators, 0, 0, null, 0, true], [ODisplay.IDisplayObjectMake, OWGameLoadLevel, 350, 100, "iProgress", 0, true]]; public static var FallParticle:Class = CoinzL_FallParticle; public static var OWHighScoreLocal:Array = [[CoinzS.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, 35, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, 35, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, 70, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, 70, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, 105, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, 105, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, 140, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, 140, null, 0, true]]; public static var OWGameNewLevelWithHoutOpponent:Array = [OInterface.OIObjectMake, OWGameNewLevelWithNoOpponent, OInterface.iDefAnimators, 0, 0, null, 0, false]; public static var OUnchecked:Class = CoinzL_OUnchecked; public static var OWMenu:Array = [[CoinzS.Header, 800, 40, "magenta1", CoinzL.strWelcome, 0, 10, null, 0, true], [CoinzS.Header, 800, 30, "white", CoinzL.strChangePlayer, 0, 55, null, 0, true], [CoinzS.ColorHeader, 800, 90, CoinzL.OWGameNameColor, CoinzL.strGameName, null, 0, 80, "iGameName", 0, true], [CoinzS.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 196, "iCPlayers", 0, true], [CoinzS.ColorText, 30, CoinzL.OWPlayersColor, CoinzL.strPlayersOnline, null, 20, 190, "iPlayers", 0, true], [CoinzS.MakeTextButton, 400, 100, "yellow", "yellow1", 50, CoinzL.strPlayOnline, 200, 250, "iPlayOnlineStrategy", 0, true], [CoinzS.MakeTextButton, 300, 60, "green", "green", 30, CoinzL.strOptions, 70, 440, "iOptions", 0, true], [CoinzS.MakeTextButton, 300, 60, "red1", "red1", 30, CoinzL.strInstructions, 430, 440, "iInstructions", 0, true], [CoinzS.MakeTextButton, 300, 60, "aqua", "aqua", 30, CoinzL.strHighScores, 30, 520, "iHighScores", 0, true], [CoinzS.MakeTextButton, 300, 60, "magenta", "magenta", 30, CoinzL.strMoreGames, 470, 520, "iMoreGames", 0, true]]; public static var OWHighScorePersonal:Array = [[CoinzS.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, 35, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, 35, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, 70, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, 70, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, 105, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, 105, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, 140, null, 0, true], [CoinzS.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, 140, null, 0, true]]; private static var OGNumberCounter:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OGNumberCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OGNumberCounterElement, 15, 0, "iDigits", 1, true]], 30, 28]; private static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 11, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 22, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 33, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 44, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 55, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 66, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 77, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 88, 0, "iDigits", 8, true]], 88, 20]; public static var OWOptions:Array = [[CoinzS.BigFrame, 540, 390, "aqua1", "white", 0, 0, null, 0, true], [CoinzS.Header, 540, 50, "aqua1", CoinzL.strOptions, 0, 20, null, 0, true], [CoinzS.ListBoxTextHSlider, 520, 50, "magenta", false, 90, 40, "magenta", CoinzL.strSound, CoinzL.iWOptionsVolume, 10, 90, "iSound", 0, true], [CoinzS.ListBoxTextHSlider, 520, 50, "yellow", false, 90, 40, "yellow", CoinzL.strMusic, CoinzL.iWOptionsVolume, 10, 140, "iMusic", 0, true], [CoinzS.ListBoxTextHSlider, 520, 50, "green1", false, 200, 40, "green1", CoinzL.strWindow, null, 10, 190, "iResolution", 0, true], [CoinzS.ListBoxTextHSlider, 520, 50, "red1", false, 90, 40, "red1", CoinzL.strFullScreen, CoinzL.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [CoinzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, CoinzL.strAccept, 110, 310, "iAccept", 0, true], [CoinzS.MakeTextButton, 150, 60, "red", "red", 30, CoinzL.strCancel, 280, 310, "iCancel", 0, true]]; public static var OWGameHint:Array = [CoinzS.ColorHeader, 500, 25, OWColors1, "", OInterface.iDefAnimators, 17, 560, null, 0, true]; public static var OWInstructions:Array = [[CoinzS.BigFrame, 700, 580, "yellow", "white", 50, 10, null, 0, true], [CoinzS.Header, 600, 60, "yellow", CoinzL.strHowToPlay, 100, 25, null, 0, true], [OInterface.OIObjectMake, [], null, 125, 432, "iInfoText", 0, true], [CoinzS.MakeTextButton, 200, 50, "yellow", "aqua1", 30, CoinzL.strClose, 300, 520, "iClose", 0, true]]; public static var OSFallCoins:Class = CoinzL_OSFallCoins; public static var OWGameCounterAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:4}; public static var iMP:OMultiplayer = new OMultiplayer(sDebug); public static var OFreeze:Class = CoinzL_OFreeze; public static var OWInfoPPlayer:Array = [[CoinzS.ColorHeader, 250, 20, CoinzL.OWPlayersColor, CoinzL.strLevel, null, 5, 90, null, 0, true]]; private static var OWGameLevelF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameLevelElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameLevelElement, 14, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameLevelElement, 28, 0, "iDigits", 2, true]], 14, 22]; public static var OWGameCL:Array = [OInterface.OIObjectMake, OWGameCompletedLevel, OInterface.iDefAnimators, 0, 0, null, 0, true]; public static var iGAME:OGame = new OCGame(); public static function set GameType(_arg1:int):void{ iGameType = _arg1; iGAME.prMode = iGameType; } public static function get GameType():int{ return (iGameType); } } }//package
Section 213
//CoinzL_FallParticle (CoinzL_FallParticle) package { import mx.core.*; public class CoinzL_FallParticle extends SpriteAsset { } }//package
Section 214
//CoinzL_OBG02 (CoinzL_OBG02) package { import mx.core.*; public class CoinzL_OBG02 extends SpriteAsset { } }//package
Section 215
//CoinzL_OChecked (CoinzL_OChecked) package { import mx.core.*; public class CoinzL_OChecked extends SpriteAsset { } }//package
Section 216
//CoinzL_OCursor (CoinzL_OCursor) package { import mx.core.*; public class CoinzL_OCursor extends SpriteAsset { } }//package
Section 217
//CoinzL_OFont (CoinzL_OFont) package { import mx.core.*; public class CoinzL_OFont extends SpriteAsset { } }//package
Section 218
//CoinzL_OFreeze (CoinzL_OFreeze) package { import mx.core.*; public class CoinzL_OFreeze extends SpriteAsset { } }//package
Section 219
//CoinzL_OIDown (CoinzL_OIDown) package { import mx.core.*; public class CoinzL_OIDown extends SpriteAsset { } }//package
Section 220
//CoinzL_OILeft (CoinzL_OILeft) package { import mx.core.*; public class CoinzL_OILeft extends SpriteAsset { } }//package
Section 221
//CoinzL_OIRight (CoinzL_OIRight) package { import mx.core.*; public class CoinzL_OIRight extends SpriteAsset { } }//package
Section 222
//CoinzL_OIUp (CoinzL_OIUp) package { import mx.core.*; public class CoinzL_OIUp extends SpriteAsset { } }//package
Section 223
//CoinzL_OSBubbleBang01 (CoinzL_OSBubbleBang01) package { import mx.core.*; public class CoinzL_OSBubbleBang01 extends SoundAsset { } }//package
Section 224
//CoinzL_OSBubbleBang02 (CoinzL_OSBubbleBang02) package { import mx.core.*; public class CoinzL_OSBubbleBang02 extends SoundAsset { } }//package
Section 225
//CoinzL_OSBubbleBang04 (CoinzL_OSBubbleBang04) package { import mx.core.*; public class CoinzL_OSBubbleBang04 extends SoundAsset { } }//package
Section 226
//CoinzL_OSBubbleBang05 (CoinzL_OSBubbleBang05) package { import mx.core.*; public class CoinzL_OSBubbleBang05 extends SoundAsset { } }//package
Section 227
//CoinzL_OSBubbleBang06 (CoinzL_OSBubbleBang06) package { import mx.core.*; public class CoinzL_OSBubbleBang06 extends SoundAsset { } }//package
Section 228
//CoinzL_OSCheck (CoinzL_OSCheck) package { import mx.core.*; public class CoinzL_OSCheck extends SoundAsset { } }//package
Section 229
//CoinzL_OSDeleteCoins (CoinzL_OSDeleteCoins) package { import mx.core.*; public class CoinzL_OSDeleteCoins extends SoundAsset { } }//package
Section 230
//CoinzL_OSFallBegin (CoinzL_OSFallBegin) package { import mx.core.*; public class CoinzL_OSFallBegin extends SoundAsset { } }//package
Section 231
//CoinzL_OSFallCoins (CoinzL_OSFallCoins) package { import mx.core.*; public class CoinzL_OSFallCoins extends SoundAsset { } }//package
Section 232
//CoinzL_OSFallEnd (CoinzL_OSFallEnd) package { import mx.core.*; public class CoinzL_OSFallEnd extends SoundAsset { } }//package
Section 233
//CoinzL_OSFallRepeat (CoinzL_OSFallRepeat) package { import mx.core.*; public class CoinzL_OSFallRepeat extends SoundAsset { } }//package
Section 234
//CoinzL_OSLevelComplete (CoinzL_OSLevelComplete) package { import mx.core.*; public class CoinzL_OSLevelComplete extends SoundAsset { } }//package
Section 235
//CoinzL_OSReset (CoinzL_OSReset) package { import mx.core.*; public class CoinzL_OSReset extends SoundAsset { } }//package
Section 236
//CoinzL_OSSelectCoin (CoinzL_OSSelectCoin) package { import mx.core.*; public class CoinzL_OSSelectCoin extends SoundAsset { } }//package
Section 237
//CoinzL_OSStartLevel (CoinzL_OSStartLevel) package { import mx.core.*; public class CoinzL_OSStartLevel extends SoundAsset { } }//package
Section 238
//CoinzL_OUnchecked (CoinzL_OUnchecked) package { import mx.core.*; public class CoinzL_OUnchecked extends SpriteAsset { } }//package
Section 239
//CoinzS (CoinzS) package { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; import RES.OBJECTS.*; import ENGINE.DISPLAY.EFFECTS.*; import flash.text.*; import ENGINE.CORE.*; import ENGINE.SKIN.*; public class CoinzS { public static var iRegistered:Boolean = CoinzS.Register(); public static function MyFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], _arg1[3], _arg1[4], "GEL", _arg1[5], "border", 1, _arg1[6], "spanel ns", _arg1[7], OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])])); } private static function Register():Boolean{ OEffects.RegisterEffect("GEL", new OEffectGel()); OEffects.RegisterColor("GEL", "red", {iCH:0, iCS:0.5, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "red1", {iCH:30, iCS:0.5, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "yellow", {iCH:60, iCS:0.6, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "yellow1", {iCH:90, iCS:0.6, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "green", {iCH:120, iCS:0.5, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "green1", {iCH:150, iCS:0.5, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "aqua", {iCH:180, iCS:0.4, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "aqua1", {iCH:210, iCS:0.4, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "blue", {iCH:240, iCS:0.3, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "blue1", {iCH:270, iCS:0.3, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "magenta", {iCH:300, iCS:0.4, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "magenta1", {iCH:330, iCS:0.4, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "white", {iCH:0, iCS:0, iCB:0.97, iSH:0, iSS:0, iSB:0.7}); OEffects.RegisterFilter("GEL", "bpanel", {iBorder:24, iAngle:90, iF0SD:16, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "text 20", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2}); OEffects.RegisterFilter("GEL", "text 30", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2}); OEffects.RegisterFilter("GEL", "text 40", {iBorder:8, iAngle:90, iF0SD:4, iF0SB:8, iF1SD:6, iF1SB:7, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:5, iF2GGC1:230, iF2GGD2:3, iF2GGB2:6, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "text 50", {iBorder:12, iAngle:90, iF0SD:5, iF0SB:10, iF1SD:7, iF1SB:8, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:6, iF2GGC1:240, iF2GGD2:4, iF2GGB2:6, iF2GGC2:130, iF2B:2}); OEffects.RegisterFilter("GEL", "text 60", {iBorder:14, iAngle:90, iF0SD:6, iF0SB:12, iF1SD:8, iF1SB:10, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:8, iF2GGC1:230, iF2GGD2:4, iF2GGB2:8, iF2GGC2:150, iF2B:2}); OEffects.RegisterFilter("GEL", "text 70", {iBorder:14, iAngle:90, iF0SD:6, iF0SB:12, iF1SD:9, iF1SB:10, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:10, iF2GGC1:230, iF2GGD2:4, iF2GGB2:10, iF2GGC2:155, iF2B:2}); OEffects.RegisterFilter("GEL", "text 80", {iBorder:15, iAngle:90, iF0SD:7, iF0SB:13, iF1SD:11, iF1SB:11, iF1GB:1, iF1GA:1, iF2GGD1:-2, iF2GGB1:12, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:160, iF2B:2}); OEffects.RegisterFilter("GEL", "text 90", {iBorder:16, iAngle:90, iF0SD:8, iF0SB:14, iF1SD:12, iF1SB:12, iF1GB:1, iF1GA:1, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:14, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "spanel", {iBorder:16, iAngle:90, iF0SD:8, iF0SB:14, iF1SD:12, iF1SB:12, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:14, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "border", {iBorder:8, iAngle:60, iF0SD:3, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2}); OEffects.RegisterFilter("GEL", "bpanel ns", {iBorder:8, iAngle:90, iF0SD:0, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "spanel ns", {iBorder:16, iAngle:90, iF0SD:0, iF0SB:16, iF1SD:12, iF1SB:16, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:180, iF2B:2}); OEffects.RegisterFilter("GEL", "border ns", {iBorder:8, iAngle:60, iF0SD:0, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2}); return (true); } public static function TextAlignMy(_arg1:Array):OBitmap{ var _local2:Number; var _local3:int; var _local4:String; _local2 = Math.round((1 + (_arg1[2] / 70))); _local3 = Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90)); _local4 = ("text " + String(_local3)); return (ODisplay.OBitmapTextAlign([null, CoinzL.OFont, _arg1[3], _local2, _arg1[5], _arg1[6], _arg1[7], "GEL", _arg1[4], _local4, _arg1[8], _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[9]), OGlobal.ScaleFloor(_arg1[10])])); } public static function MakeSpriteButton(_arg1:Array):OButton{ var _local2:Array; var _local3:OButton; _local2 = [[ODisplay.OBitmapSpriteFillRect, _arg1[1], _arg1[2], [ODisplay.SpriteLib, _arg1[5]], "GEL", _arg1[3], _arg1[6], _arg1[7], 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local3 = new OButton(_local2); _local3.Pos(OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])); return (_local3); } public static function SmallFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], 24, 5, "GEL", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function Text(_arg1:Array):OBitmap{ var _local2:Number; var _local3:String; _local2 = Math.round((1 + (_arg1[1] / 70))); _local3 = ("text " + String(Math.min((Math.round((_arg1[1] / 10)) * 10), 90))); return (ODisplay.OBitmapText([null, CoinzL.OFont, _arg1[1], _local2, _arg1[3], "GEL", _arg1[2], _local3, 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])])); } public static function ListBoxTextHSlider(_arg1:Array):OListBox{ var _local2:Number; var _local3:Number; var _local4:String; var _local5:Rectangle; var _local6:Number; var _local7:Array; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:OListBox; _local2 = _arg1[6]; _local3 = Math.round((1 + (_local2 / 70))); _local4 = ("text " + String((Math.round((_local2 / 10)) * 10))); _local5 = ODisplay.TextRect(CoinzL.OFont, _local2, _local3, _arg1[8]); _local6 = (_arg1[6] - 10); _local7 = (_arg1[4]) ? [[CoinzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array(); _local8 = [[ODisplay.OBitmapText, CoinzL.OFont, _local2, _local3, _arg1[8], "GEL", _arg1[3], _local4, 1, 15, ((_arg1[2] - _local5.height) * 0.5), null, 0, true], [CoinzS.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], CoinzL.OILeft, "text 60", 1, ((_arg1[1] - _arg1[5]) - 75), ((_arg1[2] - _local6) * 0.5), "iUp", 0, false], [CoinzS.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], CoinzL.OIRight, "text 60", 1, (_arg1[1] - 45), ((_arg1[2] - _local6) * 0.5), "iDown", 0, false]]; _local7 = _local7.concat(_local8); _local9 = [CoinzS.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[7], "w", _arg1[7], 0, 0]; _local10 = [[((_arg1[1] - 45) - _arg1[5]), ((_arg1[2] - _arg1[6]) * 0.5)]]; _local11 = new OListBox(_local7, _local9, CoinzS.ListBoxTextElementP, _local10, null); _local11.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local11.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local11.prSelection = false; _local11.prCycling = true; _local11.prLBParams = _arg1[9]; _local11.Pos(OGlobal.ScaleFloor(_arg1[10]), OGlobal.ScaleFloor(_arg1[11])); return (_local11); } public static function ColorText(_arg1:Array):OIObject{ var _local2:Number; var _local3:String; var _local4:Sprite; var _local5:TextField; var _local6:TextFormat; var _local7:Array; var _local8:int; var _local9:int; var _local10:OIObject; var _local11:String; var _local12:Rectangle; _local2 = Math.round((1 + (_arg1[1] / 70))); _local3 = ("text " + String(Math.min((Math.round((_arg1[1] / 10)) * 10), 90))); _local4 = ((CoinzL.OFont is Sprite)) ? (CoinzL.OFont as Sprite) : new ((CoinzL.OFont as Class)); if (!(_local4.getChildAt(0) is TextField)){ return (null); }; _local5 = (_local4.getChildAt(0) as TextField); _local5.autoSize = TextFieldAutoSize.LEFT; _local5.text = _arg1[3]; _local6 = _local5.defaultTextFormat; _local6.size = _arg1[1]; _local6.letterSpacing = _local2; _local5.setTextFormat(_local6); _local7 = new Array(); _local8 = 0; _local9 = 0; while (_local9 < _local5.length) { _local11 = _arg1[3].substr(_local9, 1); if (_local11 == " "){ } else { _local12 = _local5.getCharBoundaries(_local9); var _temp1 = _local8; _local8 = (_local8 + 1); _local7.push([ODisplay.OBitmapMake, [ODisplay.SpriteText, CoinzL.OFont, _arg1[1], _local2, _local11], 1, "GEL", _arg1[2][_temp1], _local3, 1, _local12.x, _local12.y, null, 0, true]); }; _local9++; }; _local10 = new OIObject(_local7, _arg1[4]); _local10.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local10); } public static function MakeCheckBox(_arg1:Array):OCheckBox{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Sprite; var _local7:Sprite; var _local8:Array; var _local9:OCheckBox; _local2 = ((_arg1[2] <= 60)) ? 1 : 1.2; _local3 = Math.min(_arg1[1], _arg1[2]); _local4 = (_local3 / 150); _local5 = (100 * _local4); _local6 = new (_arg1[4]); _local7 = new (_arg1[5]); _local8 = [[ODisplay.OBitmapRoundFrame, _arg1[1], _arg1[2], (_arg1[2] / 4), (_arg1[2] / 12), "GEL", _arg1[3], "border", 0.5, _arg1[3], "spanel ns", 0.5, OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0), null, 0, true], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _arg1[4]], _local4, "GEL", _arg1[3], "border", 1, ((_arg1[1] - _local5) / 2), ((_arg1[2] - _local5) / 2), "iCheck", 0, true], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _arg1[5]], _local4, "GEL", _arg1[3], "border", 1, ((_arg1[1] - _local5) / 2), ((_arg1[2] - _local5) / 2), "iUnCheck", 0, true], [InvisibleButton, _arg1[1], _arg1[2], 0, 0, "iHit", 0, true]]; _local9 = new OCheckBox(_local8); _local9.Pos(OGlobal.ScaleFloor(_arg1[6]), OGlobal.ScaleFloor(_arg1[7])); return (_local9); } public static function Frame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], _arg1[3], _arg1[4], "GEL", _arg1[5], "border", 1, _arg1[6], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])])); } public static function ListBoxTextVSlider(_arg1:Array):OListBox{ var _local2:Number; var _local3:Number; var _local4:String; var _local5:Rectangle; var _local6:Array; var _local7:Number; var _local8:Number; var _local9:Array; var _local10:Array; var _local11:Array; var _local12:OListBox; _local2 = _arg1[6]; _local3 = Math.round((1 + (_local2 / 70))); _local4 = ("text " + String((Math.round((_local2 / 10)) * 10))); _local5 = ODisplay.TextRect(CoinzL.OFont, _local2, _local3, _arg1[9]); _local6 = [[((_arg1[1] - _arg1[5]) * 0.5), _arg1[7]]]; _local7 = (_arg1[6] - 10); _local8 = (_local6[0][1] + ((_arg1[6] - _local7) * 0.5)); _local9 = (_arg1[4]) ? [[CoinzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array(); _local10 = [[ODisplay.OBitmapText, CoinzL.OFont, _local2, _local3, _arg1[9], "GEL", _arg1[3], _local4, 1, ((_arg1[1] - _local5.width) * 0.5), _arg1[10], null, 0, true], [CoinzS.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], CoinzL.OILeft, "text 60", 1, (_local6[0][0] - _local7), _local8, "iUp", 0, false], [CoinzS.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], CoinzL.OIRight, "text 60", 1, (_local6[0][0] + _arg1[5]), _local8, "iDown", 0, false]]; _local9 = _local9.concat(_local10); _local11 = [CoinzS.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[8], "w", _arg1[8], 0, 0]; _local12 = new OListBox(_local9, _local11, CoinzS.ListBoxTextElementP, _local6, null); _local12.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local12.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local12.prSelection = false; _local12.prCycling = true; _local12.prLBParams = _arg1[11]; _local12.Pos(OGlobal.ScaleFloor(_arg1[12]), OGlobal.ScaleFloor(_arg1[13])); return (_local12); } public static function InvisibleButton(_arg1:Array):OButton{ var _local2:Array; var _local3:OButton; _local2 = [[OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local3 = new OButton(_local2, OAnimatorManager.iNullAnimators); _local3.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); _local3.prVisible = true; _local3.prActive = true; return (_local3); } public static function MakeNFTextButton(_arg1:Array):OButton{ var _local2:Number; var _local3:String; var _local4:Array; var _local5:OButton; _local2 = Math.round((1 + (_arg1[5] / 70))); _local3 = ("text " + String(Math.max((Math.round((_arg1[5] / 10)) * 10), 30))); _local4 = [[ODisplay.OBitmapTextInRect, CoinzL.OFont, _arg1[5], _local2, _arg1[6], "GEL", _arg1[3], _local3, 1, _arg1[1], _arg1[2], 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (24 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local5 = new OButton(_local4); _local5.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local5); } public static function ActiveFrame(_arg1:Array):OSprite{ var _local2:OBitmap; var _local3:OSprite; _local2 = ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], 20, 3, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", 1, OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)]); _local3 = new OSprite(); _local3.addChild(_local2); _local3.Pos(_arg1[4], _arg1[5]); return (_local3); } public static function ListBoxTextElement(_arg1:Array):OListBoxElement{ var _local2:Number; var _local3:Number; var _local4:String; var _local5:Array; var _local6:OListBoxElement; _local2 = (_arg1[2] - 10); if (_local2 < 30){ _local2 = 30; }; _local3 = Math.round((1 + (_local2 / 70))); _local4 = ("text " + String((Math.round((_local2 / 10)) * 10))); _local5 = [[ODisplay.OBitmapMake, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], 12, 6], 1, "GEL", _arg1[3], "border", 1, 0, 0, null, 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteTextInRect, CoinzL.OFont, _local2, _local3, _arg1[4], _arg1[1], _arg1[2]], 1, "GEL", _arg1[5], _local4, 1, 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (12 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local6 = new OListBoxElement(_local5); _local6.Pos(OGlobal.ScaleFloor(_arg1[6]), OGlobal.ScaleFloor(_arg1[7])); return (_local6); } public static function Header(_arg1:Array):OBitmap{ var _local2:Number; var _local3:String; _local2 = Math.round((1 + (_arg1[2] / 70))); _local3 = ("text " + String(Math.min((Math.round((_arg1[2] / 10)) * 10), 90))); return (ODisplay.OBitmapTextInRect([null, CoinzL.OFont, _arg1[2], _local2, _arg1[4], "GEL", _arg1[3], _local3, 1, _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function MySmallBorder(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundBorder([null, _arg1[1], _arg1[2], 24, 4, "GEL", _arg1[3], "border", 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])])); } public static function ColorHeader(_arg1:Array):OIObject{ var _local2:Number; var _local3:String; var _local4:Sprite; var _local5:TextField; var _local6:TextFormat; var _local7:Rectangle; var _local8:Number; var _local9:Array; var _local10:int; var _local11:int; var _local12:OIObject; var _local13:String; var _local14:Rectangle; _local2 = Math.round((1 + (_arg1[2] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90)))); _local4 = ((CoinzL.OFont is Sprite)) ? (CoinzL.OFont as Sprite) : new ((CoinzL.OFont as Class)); if (!(_local4.getChildAt(0) is TextField)){ return (null); }; _local5 = (_local4.getChildAt(0) as TextField); _local5.autoSize = TextFieldAutoSize.LEFT; _local5.text = _arg1[4]; _local6 = _local5.defaultTextFormat; _local6.size = _arg1[2]; _local6.letterSpacing = _local2; _local5.setTextFormat(_local6); _local7 = _local5.getBounds(_local4); _local8 = ((_arg1[1] - _local7.width) / 2); _local9 = new Array(); _local10 = 0; _local11 = 0; while (_local11 < _local5.length) { _local13 = _arg1[4].substr(_local11, 1); if (_local13 == " "){ } else { _local14 = _local5.getCharBoundaries(_local11); var _temp1 = _local10; _local10 = (_local10 + 1); _local9.push([ODisplay.OBitmapMake, [ODisplay.SpriteText, CoinzL.OFont, _arg1[2], _local2, _local13], 1, "GEL", _arg1[3][_temp1], _local3, 1, (_local14.x + _local8), _local14.y, null, 0, true]); }; _local11++; }; _local12 = new OIObject(_local9, _arg1[5]); _local12.Pos(OGlobal.ScaleFloor(_arg1[6]), OGlobal.ScaleFloor(_arg1[7])); return (_local12); } public static function SmallBorder(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundBorder([null, _arg1[1], _arg1[2], 24, 6, "GEL", _arg1[3], "border", 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])])); } public static function BigFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], 64, 8, "GEL", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function ListBoxTextElementP(_arg1:Array, _arg2:String):void{ _arg1[4] = _arg2; } public static function InputText(_arg1:Array):OInput{ var _local2:Array; var _local3:OInput; _local2 = [[CoinzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true], [OInterface.OInputTextFieldMake, (_arg1[1] - 10), (_arg1[2] - 10), CoinzL.OFont, (_arg1[2] - 30), 1, false, _arg1[5], _arg1[4], _arg1[6], 5, 8, "iText", 0, true]]; _local3 = new OInput(_local2); _local3.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local3); } public static function TextAlign(_arg1:Array):OBitmap{ var _local2:Number; var _local3:int; var _local4:String; _local2 = Math.round((1 + (_arg1[2] / 70))); _local3 = Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90)); _local4 = ("text " + String(_local3)); return (ODisplay.OBitmapTextAlign([null, CoinzL.OFont, _arg1[3], _local2, _arg1[5], _arg1[6], _arg1[7], "GEL", _arg1[4], _local4, 1, _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])])); } public static function ListBoxText(_arg1:Array):OListBox{ var _local2:Number; var _local3:Number; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:int; var _local8:OListBox; _local2 = (_arg1[1] + 80); _local3 = ((_arg1[2] * _arg1[5]) + 30); _local4 = [[CoinzS.SmallBorder, _local2, _local3, _arg1[3], 0, 0, null, 0, true], [CoinzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], CoinzL.OIUp, "text 60", 1, (_local2 - 50), 20, "iUp", 0, false], [CoinzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], CoinzL.OIDown, "text 60", 1, (_local2 - 50), (_local3 - 50), "iDown", 0, false]]; _local5 = [CoinzS.ListBoxTextElement, _arg1[1], _arg1[2], _arg1[3], "w", _arg1[4], 0, 0]; _local6 = new Array(_arg1[5]); _local7 = 0; while (_local7 < _arg1[5]) { _local6[_local7] = [15, ((_local7 * _arg1[2]) + 15)]; _local7++; }; _local8 = new OListBox(_local4, _local5, CoinzS.ListBoxTextElementP, _local6, null); _local8.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local8.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local8.prLBParams = _arg1[6]; _local8.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local8); } public static function MakeTextButton(_arg1:Array):OButton{ var _local2:Number; var _local3:String; var _local4:Array; var _local5:OButton; _local2 = Math.round((1 + (_arg1[5] / 70))); _local3 = ("text " + String((Math.round((_arg1[5] / 10)) * 10))); _local4 = [[ODisplay.OBitmapRoundFrameText, _arg1[1], _arg1[2], 24, 5, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", 1, CoinzL.OFont, _arg1[5], _local2, _arg1[6], "GEL", _arg1[3], _local3, 1, 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (24 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local5 = new OButton(_local4); _local5.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local5); } public static function SmallRectBorder(_arg1:Array):OBitmap{ var _local2:int; var _local3:OSprite; var _local4:Number; _local2 = 5; _local3 = new OSprite(); _local3.graphics.beginFill(0); _local3.graphics.drawRect(0, 0, _arg1[1], _arg1[2]); _local3.graphics.drawRect(_local2, _local2, (_arg1[1] - (2 * _local2)), (_arg1[2] - (2 * _local2))); _local3.graphics.endFill(); _local4 = 0.5; return (ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, _local3], 1, 0, 0, 0], 1, "GEL", _arg1[3], "border", _local4, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])])); } } }//package
Section 240
//OCGame (OCGame) package { import ENGINE.GAME.*; public class OCGame extends OGame { public function OCGame(){ super(3, 5); } override public function DefaultInitLocalScores():void{ this.iScores.Clear(0); this.iScores.AddScore("Emily", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Michael", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Jacob", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Isabella", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Madison", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.SortOn(0); } } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip {CoinzL_OUnchecked} [Unchecked]Uses:1
Symbol 3 FontUsed by:4
Symbol 4 EditableTextUses:3Used by:5
Symbol 5 MovieClip {CoinzL_OFont} [OFont]Uses:4
Symbol 6 Sound {CoinzL_OSFallEnd} [CoinzL_OSFallEnd]
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip {CoinzL_OChecked} [Checked]Uses:7
Symbol 9 Sound {CoinzL_OSBubbleBang06} [CoinzL_OSBubbleBang06]
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip {CoinzL_OILeft} [OILeft]Uses:10
Symbol 12 Sound {CoinzL_OSFallBegin} [CoinzL_OSFallBegin]
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClip {CoinzL_OIRight} [OIRight]Uses:13
Symbol 15 BitmapUsed by:16
Symbol 16 GraphicUses:15Used by:17
Symbol 17 MovieClip {CoinzL_OBG02} [OBG01]Uses:16
Symbol 18 Sound {CoinzL_OSDeleteCoins} [CoinzL_OSDeleteCoins]
Symbol 19 Sound {CoinzL_OSCheck} [CoinzL_OSCheck]
Symbol 20 Sound {CoinzL_OSReset} [CoinzL_OSReset]
Symbol 21 Sound {CoinzL_OSLevelComplete} [CoinzL_OSLevelComplete]
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClip {CoinzL_OIDown} [OIDown]Uses:22
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClip {CoinzL_FallParticle} [FallParticle]Uses:24
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClip {CoinzL_OIUp} [OIUp]Uses:26
Symbol 28 Sound {CoinzL_OSBubbleBang01} [CoinzL_OSBubbleBang01]
Symbol 29 Sound {CoinzL_OSFallRepeat} [CoinzL_OSFallRepeat]
Symbol 30 Sound {CoinzL_OSFallCoins} [CoinzL_OSFallCoins]
Symbol 31 Sound {CoinzL_OSBubbleBang04} [CoinzL_OSBubbleBang04]
Symbol 32 Sound {CoinzL_OSSelectCoin} [CoinzL_OSSelectCoin]
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClip {CoinzL_OCursor} [OCursor]Uses:33
Symbol 35 Sound {CoinzL_OSBubbleBang02} [CoinzL_OSBubbleBang02]
Symbol 36 Sound {CoinzL_OSStartLevel} [CoinzL_OSStartLevel]
Symbol 37 Sound {CoinzL_OSBubbleBang05} [CoinzL_OSBubbleBang05]
Symbol 38 BitmapUsed by:39
Symbol 39 GraphicUses:38Used by:40
Symbol 40 MovieClip {CoinzL_OFreeze} [Freeze]Uses:39
Symbol 41 Bitmap {RES.OBJECTS.OGAME.OListCurrency_USD5}
Symbol 42 Bitmap {RES.OBJECTS.OGAME.OListCurrency_RUB500}
Symbol 43 Bitmap {RES.OBJECTS.OGAME.OListCurrency_JPY5}
Symbol 44 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL50}
Symbol 45 Bitmap {RES.OBJECTS.OGAME.OListCurrency_RUB50}
Symbol 46 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN5}
Symbol 47 Bitmap {RES.OBJECTS.OGAME.OListCurrency_BRL1}
Symbol 48 Bitmap {RES.OBJECTS.OGAME.OListCurrency_JPY50}
Symbol 49 Bitmap {RES.OBJECTS.OGAME.OListCurrency_ILS100}
Symbol 50 Bitmap {RES.OBJECTS.OGAME.OListCurrency_BRL50}
Symbol 51 Bitmap {RES.OBJECTS.OGAME.OListCurrency_SGD20}
Symbol 52 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD20}
Symbol 53 Bitmap {RES.OBJECTS.OGAME.OListCurrency_RUB100}
Symbol 54 Bitmap {RES.OBJECTS.OGAME.OListCurrency_BRL5}
Symbol 55 Bitmap {RES.OBJECTS.OGAME.OListCurrency_SGD50}
Symbol 56 Bitmap {RES.OBJECTS.OGAME.OListCurrency_ILS10}
Symbol 57 Bitmap {RES.OBJECTS.OGAME.OListCurrency_BRL25}
Symbol 58 Bitmap {RES.OBJECTS.OGAME.OListCurrency_BRL100}
Symbol 59 Bitmap {RES.OBJECTS.OGAME.OListCurrency_ILS500}
Symbol 60 Bitmap {RES.OBJECTS.OGAME.OListCurrency_JPY100}
Symbol 61 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR2}
Symbol 62 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PGK10}
Symbol 63 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN100}
Symbol 64 Bitmap {RES.OBJECTS.OGAME.OListCurrency_XCD5}
Symbol 65 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL2}
Symbol 66 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD2}
Symbol 67 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN200}
Symbol 68 Bitmap {RES.OBJECTS.OGAME.OListCurrency_SGD1}
Symbol 69 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL5}
Symbol 70 Bitmap {RES.OBJECTS.OGAME.OListCurrency_UAH5}
Symbol 71 Bitmap {RES.OBJECTS.OGAME.OListCurrency_SGD10}
Symbol 72 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PGK5}
Symbol 73 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL100}
Symbol 74 Bitmap {RES.OBJECTS.OGAME.OListCurrency_ILS50}
Symbol 75 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR100}
Symbol 76 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN50}
Symbol 77 Bitmap {RES.OBJECTS.OGAME.OListCurrency_XCD25}
Symbol 78 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PGK50}
Symbol 79 Bitmap {RES.OBJECTS.OGAME.OListCurrency_RUB5}
Symbol 80 Bitmap {RES.OBJECTS.OGAME.OListCurrency_USD100}
Symbol 81 Bitmap {RES.OBJECTS.OGAME.OListCurrency_SGD100}
Symbol 82 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR20}
Symbol 83 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PGK1}
Symbol 84 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL1}
Symbol 85 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN500}
Symbol 86 Bitmap {RES.OBJECTS.OGAME.OListCurrency_JPY1}
Symbol 87 Bitmap {RES.OBJECTS.OGAME.OListCurrency_XCD1}
Symbol 88 Bitmap {RES.OBJECTS.OGAME.OListCurrency_UAH25}
Symbol 89 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR50}
Symbol 90 Bitmap {RES.OBJECTS.OGAME.OListCurrency_UAH10}
Symbol 91 Bitmap {RES.OBJECTS.OGAME.OListCurrency_ILS5}
Symbol 92 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR5}
Symbol 93 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL20}
Symbol 94 Bitmap {RES.OBJECTS.OGAME.OListCurrency_USD10}
Symbol 95 Bitmap {RES.OBJECTS.OGAME.OListCurrency_RUB10}
Symbol 96 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD1}
Symbol 97 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PGK2}
Symbol 98 Bitmap {RES.OBJECTS.OGAME.OListCurrency_RUB200}
Symbol 99 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN1}
Symbol 100 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR1}
Symbol 101 Bitmap {RES.OBJECTS.OGAME.OListCurrency_USD25}
Symbol 102 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN20}
Symbol 103 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL10}
Symbol 104 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR10}
Symbol 105 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN10}
Symbol 106 Bitmap {RES.OBJECTS.OGAME.OListCurrency_EUR200}
Symbol 107 Bitmap {RES.OBJECTS.OGAME.OListCurrency_XCD100}
Symbol 108 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD200}
Symbol 109 Bitmap {RES.OBJECTS.OGAME.OListCurrency_USD50}
Symbol 110 Bitmap {RES.OBJECTS.OGAME.OListCurrency_SGD5}
Symbol 111 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD100}
Symbol 112 Bitmap {RES.OBJECTS.OGAME.OListCurrency_BRL10}
Symbol 113 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PGK100}
Symbol 114 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD10}
Symbol 115 Bitmap {RES.OBJECTS.OGAME.OListCurrency_JPY500}
Symbol 116 Bitmap {RES.OBJECTS.OGAME.OListCurrency_RUB1}
Symbol 117 Bitmap {RES.OBJECTS.OGAME.OListCurrency_UAH50}
Symbol 118 Bitmap {RES.OBJECTS.OGAME.OListCurrency_ILS1000}
Symbol 119 Bitmap {RES.OBJECTS.OGAME.OListCurrency_UAH1}
Symbol 120 Bitmap {RES.OBJECTS.OGAME.OListCurrency_UAH2}
Symbol 121 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PGK20}
Symbol 122 Bitmap {RES.OBJECTS.OGAME.OListCurrency_USD1}
Symbol 123 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL200}
Symbol 124 Bitmap {RES.OBJECTS.OGAME.OListCurrency_JPY10}
Symbol 125 Bitmap {RES.OBJECTS.OGAME.OListCurrency_XCD10}
Symbol 126 Bitmap {RES.OBJECTS.OGAME.OListCurrency_UAH100}
Symbol 127 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD50}
Symbol 128 Bitmap {RES.OBJECTS.OGAME.OListCurrency_ILS1}
Symbol 129 Bitmap {RES.OBJECTS.OGAME.OListCurrency_LTL500}
Symbol 130 Bitmap {RES.OBJECTS.OGAME.OListCurrency_PLN2}
Symbol 131 Bitmap {RES.OBJECTS.OGAME.OListCurrency_AUD5}
Symbol 132 Bitmap {RES.OBJECTS.OGAME.OListCurrency_XCD2}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1457 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 2 as "Unchecked"
ExportAssets (56)Timeline Frame 1Symbol 5 as "OFont"
ExportAssets (56)Timeline Frame 1Symbol 6 as "CoinzL_OSFallEnd"
ExportAssets (56)Timeline Frame 1Symbol 8 as "Checked"
ExportAssets (56)Timeline Frame 1Symbol 9 as "CoinzL_OSBubbleBang06"
ExportAssets (56)Timeline Frame 1Symbol 11 as "OILeft"
ExportAssets (56)Timeline Frame 1Symbol 12 as "CoinzL_OSFallBegin"
ExportAssets (56)Timeline Frame 1Symbol 14 as "OIRight"
ExportAssets (56)Timeline Frame 1Symbol 17 as "OBG01"
ExportAssets (56)Timeline Frame 1Symbol 18 as "CoinzL_OSDeleteCoins"
ExportAssets (56)Timeline Frame 1Symbol 19 as "CoinzL_OSCheck"
ExportAssets (56)Timeline Frame 1Symbol 20 as "CoinzL_OSReset"
ExportAssets (56)Timeline Frame 1Symbol 21 as "CoinzL_OSLevelComplete"
ExportAssets (56)Timeline Frame 1Symbol 23 as "OIDown"
ExportAssets (56)Timeline Frame 1Symbol 25 as "FallParticle"
ExportAssets (56)Timeline Frame 1Symbol 27 as "OIUp"
ExportAssets (56)Timeline Frame 1Symbol 28 as "CoinzL_OSBubbleBang01"
ExportAssets (56)Timeline Frame 1Symbol 29 as "CoinzL_OSFallRepeat"
ExportAssets (56)Timeline Frame 1Symbol 30 as "CoinzL_OSFallCoins"
ExportAssets (56)Timeline Frame 1Symbol 31 as "CoinzL_OSBubbleBang04"
ExportAssets (56)Timeline Frame 1Symbol 32 as "CoinzL_OSSelectCoin"
ExportAssets (56)Timeline Frame 1Symbol 34 as "OCursor"
ExportAssets (56)Timeline Frame 1Symbol 35 as "CoinzL_OSBubbleBang02"
ExportAssets (56)Timeline Frame 1Symbol 36 as "CoinzL_OSStartLevel"
ExportAssets (56)Timeline Frame 1Symbol 37 as "CoinzL_OSBubbleBang05"
ExportAssets (56)Timeline Frame 1Symbol 40 as "Freeze"
SerialNumber (41)Timeline Frame 1

Labels

"Coinz"Frame 1




http://swfchan.com/10/47619/info.shtml
Created: 1/5 -2019 12:26:12 Last modified: 1/5 -2019 12:26:12 Server time: 22/12 -2024 23:25:39