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

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

316.swf

This is the info page for
Flash #83997

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


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

TEXT

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(_arg1:Number=1):void{ OGlobal.iOldScale = OGlobal.iScale; OGlobal.iScale = _arg1; 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 flash.filters.*; 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); } public static function MakeBevelFilter(_arg1:Array):BevelFilter{ return (new BevelFilter(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[11], _arg1[12])); } } }//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 MakeFill(_arg1:Array):OBM{ var _local2:Sprite; var _local3:Sprite; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Rectangle; var _local8:Sprite; var _local9:int; var _local10:int; var _local11:Number; var _local12:Number; var _local13:BitmapData; var _local14:Matrix; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local4 = (OGlobal.Scale * _arg1[2]); _local5 = OGlobal.ToGlobal(_arg1[4]); _local6 = OGlobal.ToGlobal(_arg1[5]); _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); _local2.removeChild(_local3); _local8 = new Sprite(); _local8.graphics.beginBitmapFill(_arg1[3]); _local8.graphics.drawRect((_local7.x - 1), (_local7.y - 1), (_local7.width + 2), (_local7.height + 2)); _local8.graphics.endFill(); _local8.mask = _local3; _local2.addChild(_local8); _local9 = ((_local7.width + 4) + (_arg1[6] * 2)); _local10 = ((_local7.height + 4) + (_arg1[6] * 2)); _local11 = Math.floor(_local7.x); _local12 = Math.floor(_local7.y); _local13 = new BitmapData(_local9, _local10, true, 0); _local14 = new Matrix(1, 0, 0, 1, ((-(_local11) + 1) + _arg1[6]), ((-(_local12) + 1) + _arg1[6])); _local13.draw(_local2, _local14); return (new OBM(_local13, (((_local11 - _local5) - 1) - _arg1[6]), (((_local12 - _local6) - 1) - _arg1[6]), _local7.width, _local7.height)); } 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 SpriteErase(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Sprite; var _local4:Sprite; var _local5:Sprite; _local2 = new Sprite(); _local3 = new Sprite(); _local3.blendMode = BlendMode.LAYER; _local4 = _arg1[1][0](_arg1[1]); _local5 = _arg1[2][0](_arg1[2]); _local5.blendMode = BlendMode.ERASE; _local3.addChild(_local4); _local3.addChild(_local5); _local2.addChild(_local3); return (_local2); } 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 OBitmapXBorderSprite(_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[15], _arg1[16]], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[9]], _arg1[10], _arg1[1], _arg1[2]], _arg1[9], _arg1[11], _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[16]]]])); } 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 lineStyle(_arg1:Number, _arg2:uint=0, _arg3:Number=1, _arg4:Boolean=false, _arg5:String="normal", _arg6:String=null, _arg7:String=null, _arg8:Number=3):void{ this.graphics.lineStyle((_arg1 * OGlobal.Scale), _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, (_arg8 * OGlobal.Scale)); } public function drawCircle(_arg1:Number, _arg2:Number, _arg3:Number):void{ this.graphics.drawCircle((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale), (_arg3 * OGlobal.Scale)); } 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
//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 s:String; var b:int; var aStage = _arg1; if (((aStage) || (this.stage))){ OGlobal.prStage = (aStage) ? aStage : 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){ s = ("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; }"); b = 0; try { b = ExternalInterface.call(s); } catch(e:Error) { OGlobal.prStage.frameRate = OGlobal.FPS; }; if (b > 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 31
//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 32
//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 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 OnMouseUp(_arg1:MouseEvent):void{ this.prPress = false; } 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 33
//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 34
//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 35
//OInput (ENGINE.INTERFACE.OInput) package ENGINE.INTERFACE { import flash.events.*; import ENGINE.INTERFACE.ELEMENTS.*; import ENGINE.INTERFACE.ANIMATORS.*; 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 36
//OInterface (ENGINE.INTERFACE.OInterface) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ELEMENTS.*; import ENGINE.INTERFACE.ANIMATORS.*; 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 37
//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 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 OnMouseUp(_arg1:MouseEvent):void{ this.prPress = false; } 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 38
//OListBox (ENGINE.INTERFACE.OListBox) package ENGINE.INTERFACE { import flash.events.*; import ENGINE.INTERFACE.ELEMENTS.*; import ENGINE.INTERFACE.ANIMATORS.*; 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 39
//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 40
//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 41
//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 42
//OEffectInk (ENGINE.SKIN.OEffectInk) package ENGINE.SKIN { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import flash.filters.*; import ENGINE.CORE.*; public class OEffectInk extends OEffect { private var iShadow:DropShadowFilter; private var iAlpha:Number;// = 1 private var iBlur:BlurFilter; private var iColor:uint;// = 0 private var iBorder:Number;// = 0 public function OEffectInk(){ iColor = 0; iAlpha = 1; 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:Array; var _local13:BitmapData; _local5 = OBM.Make([null, _arg1, _arg2, _arg3, _arg4, 0]); _local6 = OGlobal.Scale; _local7 = this.iAlpha; _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; _local12 = new Array(); if (this.iBlur){ _local12.push(this.iBlur); }; if (this.iShadow){ _local12.push(this.iShadow); }; _local11.filters = _local12; _local9.addChild(_local11); _local13 = new BitmapData((_local8.width + (this.iBorder * 2)), (_local8.height + (this.iBorder * 2)), true, 0); _local13.draw(_local8); return (new OBM(_local13, (-(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:int; var _local8:int; var _local9:Array; var _local10: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); _local7 = Math.floor((_local4.iCH / 30)); _local8 = ((_local7 + 1) % 12); _local9 = [75, 75, 90, 90, 75, 75, 60, 60, 45, 45, 60, 60]; _local4.iCS = ((_local9[_local7] + ((_local9[_local8] - _local9[_local7]) * ((_local4.iCH / 30) - _local7))) * 0.01); _local4.iCB = 0.9; _local4.iCA = 0.9; } else { _local10 = _arg1.split(/,/); _local4.iCH = _local10[0]; _local4.iCS = _local10[1]; _local4.iCB = _local10[2]; _local4.iCA = _local10[3]; }; }; if (_local5.iFSD > 0){ this.iShadow = new DropShadowFilter((_local5.iFSD * _local6), _local5.iAngle, ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, (_local4.iCB * 0.5)), (0.25 * _local4.iCA), (_local5.iFSB * _local6), (_local5.iFSB * _local6), 1, 2, false, true, true); } else { this.iShadow = null; }; if (_local5.iFB > 0){ this.iBlur = new BlurFilter((_local5.iFB * _local6), (_local5.iFB * _local6)); } else { this.iBlur = null; }; this.iColor = ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, _local4.iCB); this.iAlpha = _local4.iCA; this.iBorder = Math.ceil((_local5.iBorder * _local6)); } } }//package ENGINE.SKIN
Section 43
//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 44
//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 45
//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 46
//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 47
//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 48
//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 49
//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 50
//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 51
//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 52
//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 53
//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 54
//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 55
//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 56
//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 57
//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 58
//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 59
//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 60
//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 61
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 62
//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 63
//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 64
//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 65
//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 66
//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 67
//OButtonSimple (RES.GAME.OButtonSimple) package RES.GAME { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; public class OButtonSimple extends OButton { private var iDAlpha:int; private var ibState:int; public var iText:OBitmap; private var isFlashing:Boolean; public var SpriteState:Array; private static const stDown:int = 2; private static const stOver:int = 1; private static const stEmp:int = 3; private static const stUp:int = 0; public function OButtonSimple(_arg1:Array, _arg2:Array=null){ var _local3:OSprite; iDAlpha = 0; isFlashing = false; SpriteState = new Array(); super(_arg1, _arg2); _local3 = SpriteState[0]; iText.x = ((_local3.width - iText.width) / 2); iText.y = ((_local3.height - (iText.height - 2)) / 2); _local3.prVisible = true; iText.prVisible = true; } public function get Flashing():int{ return (iDAlpha); } override public function set prVisible(_arg1:Boolean):void{ this.iDAlpha = 0; Flashing = 0; super.prVisible = _arg1; } public function set Flashing(_arg1:int):void{ if (_arg1 == 0){ isFlashing = false; } else { isFlashing = true; iDAlpha = _arg1; }; } override public function OnRollOver(_arg1:MouseEvent):void{ State = stOver; Flashing = 0; } public function InitState():void{ State = stUp; } override public function OnMouseUp(_arg1:MouseEvent):void{ if (State == stDown){ State = stEmp; super.OnMouseDown(_arg1); }; } override public function get State():int{ return (ibState); } override public function OnRollOut(_arg1:MouseEvent):void{ if (State != stEmp){ State = stUp; }; } override public function Free():void{ Flashing = 0; super.Free(); } private function _Flashing():void{ this.alpha = (this.alpha + (iDAlpha / 100)); if ((((this.iDAlpha > 0)) && ((this.alpha >= 1)))){ this.alpha = 1; if (!isFlashing){ this.iDAlpha = 0; } else { this.iDAlpha = (this.iDAlpha * -1); }; }; if ((((this.iDAlpha < 0)) && ((this.alpha <= 0)))){ this.alpha = 0; this.iDAlpha = (this.iDAlpha * -1); }; } override public function OnMouseDown(_arg1:MouseEvent):void{ State = stDown; } override public function OnEnterFrame(_arg1:Event):void{ if (iDAlpha != 0){ _Flashing(); }; super.OnEnterFrame(_arg1); } override public function set State(_arg1:int):void{ (SpriteState[ibState] as OSprite).prVisible = false; ibState = _arg1; (SpriteState[ibState] as OSprite).prVisible = true; } } }//package RES.GAME
Section 68
//OButtonUrl (RES.GAME.OButtonUrl) package RES.GAME { import ENGINE.DISPLAY.*; import flash.events.*; import flash.geom.*; import ENGINE.INTERFACE.*; import flash.utils.*; public class OButtonUrl extends OButton { private var iEndPoint:Point; private var iLink:String; private var isMove:Boolean; private var iT:Number; public var sprBeforePress:OBitmap; public var sprAfterPress:OBitmap; private var iTimer:Number; private var iSpeed:Point; private var ibLastState:int;// = 0 public var sprCurrentPress:OBitmap; private var iStartPoint:Point; public static const stBeforePress:int = 0; public static const stAfterPress:int = 2; public static const stMove:int = 4; public static const stCurrentPress:int = 1; public static const stNormal:int = 3; public function OButtonUrl(_arg1:Array, _arg2:Array=null){ ibLastState = 0; super(_arg1, _arg2); } override public function Init():void{ super.Init(); this.State = stBeforePress; } public function set Link(_arg1:String):void{ iLink = _arg1; } override public function OnMouseUp(_arg1:MouseEvent):void{ if (this.State == stCurrentPress){ this.State = stAfterPress; super.OnMouseDown(_arg1); }; } public function get Link():String{ return (iLink); } override public function get State():int{ return (iState); } override public function OnRollOut(_arg1:MouseEvent):void{ if (this.State == stCurrentPress){ this.State = ibLastState; }; } public function MoveAnimation(_arg1:Number, _arg2:Number, _arg3:Number):void{ iSpeed = new Point(((_arg1 - this.x) / _arg3), ((_arg2 - this.y) / _arg3)); iStartPoint = new Point(this.x, this.y); iEndPoint = new Point(_arg1, _arg2); this.iT = _arg3; this.State = stMove; } override public function set mouseEnabled(_arg1:Boolean):void{ super.mouseEnabled = _arg1; } override public function OnMouseDown(_arg1:MouseEvent):void{ this.State = stCurrentPress; } public function get isAnimation():Boolean{ return (isMove); } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; switch (iState){ case stNormal: break; case stMove: _local2 = (getTimer() - iTimer); this.y = (iStartPoint.y + (iSpeed.y * _local2)); if (_local2 >= iT){ this.y = iEndPoint.y; isMove = false; this.State = stNormal; }; break; }; super.OnEnterFrame(_arg1); } override public function set State(_arg1:int):void{ ibLastState = iState; iState = _arg1; switch (_arg1){ case stBeforePress: if (sprCurrentPress.prVisible){ sprCurrentPress.prVisible = false; }; if (sprAfterPress.prVisible){ sprAfterPress.prVisible = false; }; sprBeforePress.prVisible = true; break; case stCurrentPress: if (sprBeforePress.prVisible){ sprBeforePress.prVisible = false; }; if (sprAfterPress.prVisible){ sprAfterPress.prVisible = false; }; sprCurrentPress.prVisible = true; break; case stAfterPress: if (sprBeforePress.prVisible){ sprBeforePress.prVisible = false; }; if (sprCurrentPress.prVisible){ sprCurrentPress.prVisible = false; }; sprAfterPress.prVisible = true; break; case stNormal: break; case stMove: iTimer = getTimer(); isMove = true; break; }; } } }//package RES.GAME
Section 69
//OField (RES.GAME.OField) package RES.GAME { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; public class OField extends OWindow { private var isInstruction:Boolean; private var iIDPress:int; private var iTimer:int; private var scores:Array; public var iPositionsY:Array; private var buttons:Array; private var links:Array; private var iRightCord:int;// = 780 public static const stPress:int = 1; public static const stStartLevel:int = 3; public static const stNormal:int = 0; public static const stEndLevel:int = 2; public static const stErrorLoad:int = 6; public static const stInitArray:int = 5; public static const stLoadLevel:int = 4; public function OField(_arg1:Boolean=false){ iPositionsY = [20, 90, 160]; iRightCord = 780; super(null, ODialog.iDefAnimators); isInstruction = _arg1; } public function ShowScores():void{ var _local1:int; _local1 = 0; while (_local1 < scores.length) { scores[_local1].prVisible = true; links[_local1].prVisible = true; if (isInstruction){ (links[_local1] as OButtonUrl).mouseEnabled = false; }; _local1++; }; this.State = stNormal; } override public function Init():void{ super.Init(); buttons = new Array(3); scores = new Array(3); links = new Array(3); } public function SetPress(_arg1:int):void{ (buttons[_arg1] as OButton).OnMouseDown(null); (buttons[_arg1] as OButton).OnMouseUp(null); } public function MoveElements():void{ var _local1:Array; var _local2:int; _local1 = (isInstruction) ? SearcherzL.arrayInstruction[SearcherzL.iLanguage][5] : SearcherzL.iPhrases[5]; _local2 = 0; while (_local2 < buttons.length) { (buttons[_local2] as OGameButton).MoveAnimation(buttons[_local1[_local2]].x, buttons[_local1[_local2]].y, 1000); (scores[_local2] as ScoreOIObject).MoveAnimation(scores[_local1[_local2]].x, scores[_local1[_local2]].y, 1000); (links[_local2] as OButtonUrl).MoveAnimation(links[_local1[_local2]].x, links[_local1[_local2]].y, 1000); _local2++; }; } override public function get prPress():Boolean{ if (State == stPress){ return (true); }; return (false); } override public function get State():int{ return (iState); } public function set RightCord(_arg1:int):void{ iRightCord = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:int; _local3 = 0; while (_local3 < 3) { if ((_arg2 as OButton) == (buttons[_local3] as OButton)){ iIDPress = (isInstruction) ? SearcherzL.arrayInstruction[SearcherzL.iLanguage][5][_local3] : SearcherzL.iPhrases[5][_local3]; this.State = stPress; return; }; if ((_arg2 as OButton) == (links[_local3] as OButton)){ navigateToURL(new URLRequest((links[_local3] as OButtonUrl).Link)); return; }; _local3++; }; } public function HideElements():void{ var _local1:int; _local1 = 0; while (_local1 < buttons.length) { buttons[_local1].prVisible = false; scores[_local1].prVisible = false; links[_local1].prVisible = false; _local1++; }; } override public function Free():void{ var _local1:uint; _local1 = 0; while (_local1 < buttons.length) { this.removeChild(buttons[_local1]); buttons[_local1].Free(); buttons[_local1] = null; this.removeChild(scores[_local1]); scores[_local1].Free(); scores[_local1] = null; this.removeChild(links[_local1]); links[_local1].Free(); links[_local1] = null; _local1++; }; super.Free(); } public function CreateElements():void{ var _local1:int; var _local2:String; var _local3:Array; var _local4:String; var _local5:int; var _local6:uint; var _local7:int; if (isInstruction){ _local3 = SearcherzL.arrayInstruction[SearcherzL.iLanguage]; } else { _local3 = SearcherzL.iPhrases; }; _local1 = 0; while (_local1 < buttons.length) { _local2 = _local3[(_local3[5][_local1] + 2)][0]; links[_local1] = SearcherzS.MakeUrlButton([null, 0, SearcherzL.strOpenInGoogle, 1, 0, iPositionsY[_local1]]); (links[_local1] as OButton).SetVisible(false); _local4 = SearcherzL.strGoogleLink[SearcherzL.iLanguage]; _local5 = _local4.indexOf("*"); (links[_local1] as OButtonUrl).Link = ((_local4.substr(0, _local5) + escapeMultiByte(_local2)) + _local4.substr((_local5 + 1), ((_local4.length - _local5) - 1))); links[_local1].x = (((iRightCord * OGlobal.Scale) - links[_local1].width) - (10 * OGlobal.Scale)); this.addChild(links[_local1]); _local2 = (_local2.substr(0, 1).toUpperCase() + _local2.substr(1, (_local2.length - 1))); buttons[_local1] = SearcherzS.MakeGameButton([null, 4, _local2, 0, iPositionsY[_local1], _local3[1], buttons]); (buttons[_local1] as OButton).SetVisible(false); this.addChild(buttons[_local1]); _local2 = _local3[(_local3[5][_local1] + 2)][1]; _local6 = _local2.length; _local7 = (_local6 - 4); while (_local7 >= 0) { _local2 = ((_local2.substr(0, (_local7 + 1)) + " ") + _local2.substr((_local7 + 1), ((_local2.length - _local7) - 1))); _local7 = (_local7 - 3); }; _local2 = (_local2 + (" " + SearcherzL.strResultat[SearcherzL.iLanguage])); scores[_local1] = SearcherzS.MakeScores([null, 0, _local2, 0, iPositionsY[_local1]]); scores[_local1].x = (links[_local1].x - scores[_local1].width); (scores[_local1] as OIObject).SetVisible(false); this.addChild(scores[_local1]); if (isInstruction){ (buttons[_local1] as OButton).prAnimatorParams = OInterface.iDefSlowAnimators; (scores[_local1] as OIObject).prAnimatorParams = OInterface.iDefSlowAnimators; (links[_local1] as OButton).prAnimatorParams = OInterface.iDefSlowAnimators; }; _local1++; }; } public function ShowPhrases():void{ var _local1:int; _local1 = 0; while (_local1 < buttons.length) { buttons[_local1].prVisible = true; if (isInstruction){ buttons[_local1].mouseEnabled = false; }; _local1++; }; } public function FreeElements():void{ var _local1:int; _local1 = 0; while (_local1 < buttons.length) { this.removeChild(buttons[_local1]); this.removeChild(scores[_local1]); buttons[_local1] = null; scores[_local1] = null; _local1++; }; } public function get isAnimation():Boolean{ var _local1:Boolean; var _local2:int; _local1 = true; _local2 = 0; while (_local2 < buttons.length) { if (buttons[_local2].isAnimation == _local1){ return (_local1); }; if (buttons[_local2].prAnimation == _local1){ return (_local1); }; if (scores[_local2].isAnimation == _local1){ return (_local1); }; if (scores[_local2].prAnimation == _local1){ return (_local1); }; if (links[_local2].isAnimation == _local1){ return (_local1); }; if (links[_local2].prAnimation == _local1){ return (_local1); }; _local2++; }; return (!(_local1)); } override public function OnEnterFrame(_arg1:Event):void{ switch (iState){ case stNormal: break; case stPress: break; case stEndLevel: break; }; } public function get IDPress():int{ return (iIDPress); } override public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stStartLevel: break; case stNormal: break; case stPress: break; case stEndLevel: break; }; } } }//package RES.GAME
Section 70
//OGameButton (RES.GAME.OGameButton) package RES.GAME { import ENGINE.DISPLAY.*; import flash.events.*; import flash.geom.*; import ENGINE.INTERFACE.*; import flash.utils.*; public class OGameButton extends OButton { private var iEndPoint:Point; private var iT:Number; private var isMove:Boolean; public var sprNotPress:OBitmap; private var iTimer:Number; private var iSpeed:Point; public var sprPress:OBitmap; private var iStartPoint:Point; private var iButtons:Array; public static const stNotPress:int = 0; public static const stAfterPress:int = 2; public static const stPress:int = 1; public static const stMove:int = 4; public static const stNormal:int = 3; public function OGameButton(_arg1:Array, _arg2:Array=null){ var _local3:OButton; super(_arg1, _arg2); this.State = stNotPress; for each (_local3 in Buttons) { _local3.mouseEnabled = true; }; isMove = false; } override public function OnRollOver(_arg1:MouseEvent):void{ this.alpha = 0.7; } override public function OnMouseUp(_arg1:MouseEvent):void{ var _local2:OButton; if (this.State == stPress){ this.State = stAfterPress; for each (_local2 in Buttons) { _local2.mouseEnabled = false; }; super.OnMouseDown(_arg1); }; } override public function get State():int{ return (iState); } public function get Buttons():Array{ return (iButtons); } override public function OnRollOut(_arg1:MouseEvent):void{ if (this.State == stPress){ this.State = stNotPress; }; this.alpha = 1; } public function MoveAnimation(_arg1:Number, _arg2:Number, _arg3:Number):void{ iSpeed = new Point(((_arg1 - this.x) / _arg3), ((_arg2 - this.y) / _arg3)); iStartPoint = new Point(this.x, this.y); iEndPoint = new Point(_arg1, _arg2); this.iT = _arg3; this.State = stMove; } override public function OnMouseDown(_arg1:MouseEvent):void{ this.State = stPress; } public function get isAnimation():Boolean{ return (isMove); } public function set Buttons(_arg1:Array):void{ iButtons = _arg1; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; switch (iState){ case stNormal: break; case stMove: _local2 = (getTimer() - iTimer); this.y = (iStartPoint.y + (iSpeed.y * _local2)); if (_local2 >= iT){ this.y = iEndPoint.y; isMove = false; this.State = stNormal; }; break; }; super.OnEnterFrame(_arg1); } override public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stNotPress: if (sprPress.prVisible){ sprPress.prVisible = false; }; sprNotPress.prVisible = true; break; case stPress: if (sprNotPress.prVisible){ sprNotPress.prVisible = false; }; sprPress.prVisible = true; break; case stAfterPress: this.State = stNormal; break; case stNormal: break; case stMove: iTimer = getTimer(); isMove = true; break; }; } } }//package RES.GAME
Section 71
//OGraph (RES.GAME.OGraph) package RES.GAME { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; public class OGraph extends OIObject { private var iSpriteNameRand:OSprite; private var BayesianNetBest:Array; public var minX:int;// = 0 private var iSpriteName:OSprite; private var isReScale:Boolean; private var iStartRel:Point; private var iScale:Point; private var BayesianNetRand:Array; private var d:int;// = 1 private var iOriginalSize:Point; private var iName:String; private var iSprite:OSprite; private var iNameBest:String; private var iMessageNameBest:OIObject; private var iMessageNameRand:OIObject; private var iNameRand:String; private var iStepAxisValue:Point; private var iStr:String; private var iMessageName:OIObject; private var iThickness:int; private var iStrBest:String; private var iStrRand:String; private var iIndexBest:int; private var iAxisValues:Array; private var iStart:Point; private var isPlay:Boolean;// = false private var iSpriteBest:OSprite; private var iRelativeCoord:Point; private var iRelativeCoordBest:Point; private var iIndexRand:int; private var iStepPx:Point; private var iSpriteNameBest:OSprite; private var iSpriteRand:OSprite; private var iRelativeCoordRand:Point; private var iMaxValue:Point; public function OGraph(_arg1:Array, _arg2:Array=null){ minX = 0; isPlay = false; d = 1; iOriginalSize = new Point(); iOriginalSize.x = (_arg1.pop() as int); iOriginalSize.y = (_arg1.pop() as int); iStepPx = new Point(); iStepPx.y = (_arg1.pop() as int); iStepPx.x = (_arg1.pop() as int); super(_arg1, _arg2); } private function ClearAxisValues():void{ var _local1:OBitmap; for each (_local1 in iAxisValues) { this.removeChild(_local1); _local1 = null; }; } private function CreateAxisValues():void{ var _local1:OBitmap; var _local2:int; var _local3:int; var _local4:int; var _local5:int; minX = 0; iAxisValues = new Array(); _local2 = 0; _local3 = (this.iOriginalSize.y * OGlobal.Scale); _local4 = 0; _local5 = 0; while (_local5 <= 10) { _local1 = SearcherzS.Text([null, 0, [_local2.toString()], 0, 0, 0]); _local1.x = ((_local4 - (_local1.width / 2)) + ((iStepPx.x * _local5) * OGlobal.Scale)); _local1.y = _local3; _local1.visible = true; this.addChild(_local1); iAxisValues.push(_local1); _local2 = (_local2 + iStepAxisValue.x); _local5++; }; iMaxValue.x = (_local2 - iStepAxisValue.x); _local3 = (this.iOriginalSize.y * OGlobal.Scale); _local4 = 0; _local2 = 0; _local5 = 0; while (_local5 < 5) { if (_local2 == 0){ _local2 = (_local2 + iStepAxisValue.y); } else { _local1 = SearcherzS.Text([null, 0, [_local2.toString()], 0, 0, 0]); _local1.x = (_local4 - _local1.width); if (_local1.width > minX){ minX = _local1.width; }; _local1.y = ((_local3 - (_local1.height / 2)) - ((iStepPx.y * _local5) * OGlobal.Scale)); _local1.visible = true; this.addChild(_local1); iAxisValues.push(_local1); _local2 = (_local2 + iStepAxisValue.y); }; _local5++; }; iMaxValue.y = (_local2 - iStepAxisValue.y); } public function AddScore(_arg1:String):void{ var _local2:String; var _local3:int; var _local4:Boolean; var _local5:Boolean; iStr = (iStr + _arg1); if (!isPlay){ SearcherzL.iRecord.AddProgress(_arg1); }; CastGraph("c", _arg1); _local4 = false; _local5 = false; if (iIndexBest < iStrBest.length){ _local2 = iStrBest.substr(iIndexBest, 1); CastGraph("b", _local2); iIndexBest++; } else { if (iStrBest.length > 0){ _local2 = "1"; iStrBest = (iStrBest + _local2); iIndexBest++; CastGraph("b", _local2); }; }; if (iIndexRand < iStrRand.length){ _local2 = iStrRand.substr(iIndexRand, 1); CastGraph("r", _local2); iIndexRand++; } else { if (iStrRand.length > 0){ _local2 = "1"; iStrRand = (iStrRand + _local2); iIndexRand++; CastGraph("r", _local2); }; }; if (iRelativeCoord.x >= iMaxValue.x){ ReScale("x"); }; if ((((((iRelativeCoord.y >= iMaxValue.y)) || ((iRelativeCoordBest.y >= iMaxValue.y)))) || ((iRelativeCoordRand.y >= iMaxValue.y)))){ ReScale("y"); }; if (isReScale){ Update(); } else { iSprite.lineTo((iStart.x + (iRelativeCoord.x * iScale.x)), (iStart.y - (iRelativeCoord.y * iScale.y))); iSpriteBest.lineTo((iStart.x + (iRelativeCoordBest.x * iScale.x)), ((iStart.y - d) - (iRelativeCoordBest.y * iScale.y))); iSpriteRand.lineTo((iStart.x + (iRelativeCoordRand.x * iScale.x)), ((iStart.y + d) - (iRelativeCoordRand.y * iScale.y))); }; } private function ReScale(_arg1:String):void{ switch (_arg1){ case "x": iStepAxisValue.x++; ClearAxisValues(); CreateAxisValues(); iScale.x = (iOriginalSize.x / iMaxValue.x); break; case "y": iStepAxisValue.y = (iStepAxisValue.y + 5); ClearAxisValues(); CreateAxisValues(); iScale.y = (iOriginalSize.y / iMaxValue.y); break; }; isReScale = true; } private function Update():void{ var _local1:String; var _local2:int; isReScale = false; InitSprites(); _local2 = 0; while (_local2 < iStr.length) { _local1 = iStr.substr(_local2, 1); CastGraph("c", _local1); iSprite.lineTo((iStart.x + (iRelativeCoord.x * iScale.x)), (iStart.y - (iRelativeCoord.y * iScale.y))); if (iIndexBest < iStrBest.length){ _local1 = iStrBest.substr(iIndexBest, 1); CastGraph("b", _local1); iSpriteBest.lineTo((iStart.x + (iRelativeCoordBest.x * iScale.x)), ((iStart.y - d) - (iRelativeCoordBest.y * iScale.y))); iIndexBest++; }; if (iIndexRand < iStrRand.length){ _local1 = iStrRand.substr(iIndexRand, 1); CastGraph("r", _local1); iSpriteRand.lineTo((iStart.x + (iRelativeCoordRand.x * iScale.x)), ((iStart.y + d) - (iRelativeCoordRand.y * iScale.y))); iIndexRand++; }; _local2++; }; } private function InitSprites():void{ iSprite.graphics.clear(); iSprite.graphics.lineStyle(iThickness, 0xFF0000, 1, true, LineScaleMode.NONE, CapsStyle.ROUND, JointStyle.MITER, 3); iSprite.moveTo(iStart.x, iStart.y); iRelativeCoord.x = 0; iRelativeCoord.y = 0; iSpriteBest.graphics.clear(); iSpriteBest.graphics.lineStyle(iThickness, 0xFF, 1, true, LineScaleMode.NONE, CapsStyle.ROUND, JointStyle.MITER, 3); iSpriteBest.moveTo(iStart.x, (iStart.y - d)); iRelativeCoordBest.x = 0; iRelativeCoordBest.y = 0; iIndexBest = 0; iSpriteRand.graphics.clear(); iSpriteRand.graphics.lineStyle(iThickness, 0xFF00, 1, true, LineScaleMode.NONE, CapsStyle.ROUND, JointStyle.MITER, 3); iSpriteRand.moveTo(iStart.x, (iStart.y + d)); iRelativeCoordRand.x = 0; iRelativeCoordRand.y = 0; iIndexRand = 0; } public function InitPole():void{ InitSprites(); CreateAxisValues(); iScale.x = (iOriginalSize.x / iMaxValue.x); iScale.y = (iOriginalSize.y / iMaxValue.y); Play(); CreateNameSprite("c"); } override public function Init():void{ super.Init(); iSprite = new OSprite(); iSprite.x = this.x; iSprite.y = this.y; iSpriteBest = new OSprite(); iSpriteBest.x = this.x; iSpriteBest.y = this.y; iSpriteRand = new OSprite(); iSpriteRand.x = this.x; iSpriteRand.y = this.y; this.addChild(iSpriteRand); this.addChild(iSpriteBest); this.addChild(iSprite); iMaxValue = new Point(); iStart = new Point(0, iOriginalSize.y); iScale = new Point(); iStartRel = new Point(0, 0); iRelativeCoord = new Point(); iRelativeCoordBest = new Point(); iRelativeCoordRand = new Point(); iStr = ""; iStrBest = ""; iStrRand = ""; iIndexBest = 0; iIndexRand = 0; iName = SearcherzL.iGAME.prPlayerName; iNameBest = ""; iNameRand = ""; iAxisValues = new Array(); iStepAxisValue = new Point(1, 10); iThickness = ((OGlobal.Scale)<0.75) ? 1 : ((OGlobal.Scale)>1.5) ? 3 : 2; d = iThickness; } private function CastGraph(_arg1:String, _arg2:String):void{ switch (_arg1){ case "c": switch (_arg2){ case "2": iRelativeCoord.y = (iRelativeCoord.y + ORecord.POINTS_FOR_WRONG_ANWER); if (iRelativeCoord.y < 0){ iRelativeCoord.y = 0; }; iRelativeCoord.x = (iRelativeCoord.x + 1); break; case "1": iRelativeCoord.y = (iRelativeCoord.y + ORecord.POINTS_FOR_AVERAGE_ANWER); iRelativeCoord.x = (iRelativeCoord.x + 1); break; case "0": iRelativeCoord.y = (iRelativeCoord.y + ORecord.POINTS_FOR_CORRECT_ANWER); iRelativeCoord.x = (iRelativeCoord.x + 1); break; }; break; case "b": switch (_arg2){ case "2": iRelativeCoordBest.y = (iRelativeCoordBest.y + ORecord.POINTS_FOR_WRONG_ANWER); if (iRelativeCoordBest.y < 0){ iRelativeCoordBest.y = 0; }; iRelativeCoordBest.x = (iRelativeCoordBest.x + 1); break; case "1": iRelativeCoordBest.y = (iRelativeCoordBest.y + ORecord.POINTS_FOR_AVERAGE_ANWER); iRelativeCoordBest.x = (iRelativeCoordBest.x + 1); break; case "0": iRelativeCoordBest.y = (iRelativeCoordBest.y + ORecord.POINTS_FOR_CORRECT_ANWER); iRelativeCoordBest.x = (iRelativeCoordBest.x + 1); break; }; break; case "r": switch (_arg2){ case "2": iRelativeCoordRand.y = (iRelativeCoordRand.y + ORecord.POINTS_FOR_WRONG_ANWER); if (iRelativeCoordRand.y < 0){ iRelativeCoordRand.y = 0; }; iRelativeCoordRand.x = (iRelativeCoordRand.x + 1); break; case "1": iRelativeCoordRand.y = (iRelativeCoordRand.y + ORecord.POINTS_FOR_AVERAGE_ANWER); iRelativeCoordRand.x = (iRelativeCoordRand.x + 1); break; case "0": iRelativeCoordRand.y = (iRelativeCoordRand.y + ORecord.POINTS_FOR_CORRECT_ANWER); iRelativeCoordRand.x = (iRelativeCoordRand.x + 1); break; }; break; }; } public function Play():void{ var _local1:String; var _local2:int; _local1 = SearcherzL.iRecord.GameStr; if (_local1.length > 0){ InitSprites(); isPlay = true; iStr = ""; _local2 = 0; while (_local2 < _local1.length) { AddScore(_local1.substr(_local2, 1)); _local2++; }; isPlay = false; }; } public function set Name(_arg1:String):void{ iName = _arg1; } public function SetRandPlayer(_arg1:String="", _arg2:String=""):void{ iStrRand = _arg1; iIndexRand = 0; iNameRand = _arg2; CreateNameSprite("r"); } private function onMouseOut(_arg1:MouseEvent):void{ if (_arg1.target == iSpriteName){ iMessageName.prVisible = false; }; if (_arg1.target == iSpriteNameBest){ iMessageNameBest.prVisible = false; }; if (_arg1.target == iSpriteNameRand){ iMessageNameRand.prVisible = false; }; } private function CreateNameSprite(_arg1:String):void{ var _local2:OBitmap; switch (_arg1){ case "c": if (iSpriteName != null){ iSpriteName.visible = false; this.removeChild(iSpriteName); iSpriteName = null; }; if (iName != ""){ iSpriteName = new OSprite(); iSpriteName.graphics.lineStyle(iThickness, 0xFF0000, 1, true, LineScaleMode.NONE, CapsStyle.ROUND, JointStyle.MITER, 3); iSpriteName.moveTo(0, 15); iSpriteName.lineTo(20, 15); _local2 = SearcherzS.Text([null, 0, [iName], 0, 0, 0]); _local2.x = (25 * OGlobal.Scale); _local2.y = ((15 * OGlobal.Scale) - (_local2.height / 2)); iSpriteName.addChild(_local2); iSpriteName.x = ((((iOriginalSize.x * 1) / 4) * OGlobal.Scale) - (iSpriteName.width / 2)); iSpriteName.y = ((iOriginalSize.y * OGlobal.Scale) + 15); this.addChild(iSpriteName); iMessageName = SearcherzS.MakeMessageBox([null, 0, SearcherzL.strYou, 0, 0]); iMessageName.SetVisible(false); iMessageName.x = (iSpriteName.x + iSpriteName.width); iMessageName.y = (iSpriteName.y - iMessageName.height); this.addChild(iMessageName); iSpriteName.mouseEnabled = true; iSpriteName.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); iSpriteName.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); }; break; case "b": if (iSpriteNameBest != null){ iSpriteNameBest.visible = false; this.removeChild(iSpriteNameBest); iSpriteNameBest = null; }; if (iNameBest != ""){ iSpriteNameBest = new OSprite(); iSpriteNameBest.graphics.lineStyle(iThickness, 0xFF, 1, true, LineScaleMode.NONE, CapsStyle.ROUND, JointStyle.MITER, 3); iSpriteNameBest.moveTo(0, 15); iSpriteNameBest.lineTo(20, 15); _local2 = SearcherzS.Text([null, 0, [iNameBest], 0, 0, 0]); _local2.x = (25 * OGlobal.Scale); _local2.y = ((15 * OGlobal.Scale) - (_local2.height / 2)); iSpriteNameBest.addChild(_local2); iSpriteNameBest.x = ((((iOriginalSize.x * 3) / 4) * OGlobal.Scale) - (iSpriteNameBest.width / 2)); iSpriteNameBest.y = ((iOriginalSize.y * OGlobal.Scale) + 15); this.addChild(iSpriteNameBest); iMessageNameBest = SearcherzS.MakeMessageBox([null, 0, SearcherzL.strBest, 0, 0]); iMessageNameBest.SetVisible(false); iMessageNameBest.x = (iSpriteNameBest.x + iSpriteNameBest.width); iMessageNameBest.y = (iSpriteNameBest.y - iMessageNameBest.height); this.addChild(iMessageNameBest); iSpriteNameBest.mouseEnabled = true; iSpriteNameBest.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); iSpriteNameBest.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); }; break; case "r": if (iSpriteNameRand != null){ iSpriteNameRand.visible = false; this.removeChild(iSpriteNameRand); iSpriteNameRand = null; }; if (iNameRand != ""){ iSpriteNameRand = new OSprite(); iSpriteNameRand.graphics.lineStyle(iThickness, 0xFF00, 1, true, LineScaleMode.NONE, CapsStyle.ROUND, JointStyle.MITER, 3); iSpriteNameRand.moveTo(0, 15); iSpriteNameRand.lineTo(20, 15); _local2 = SearcherzS.Text([null, 0, [iNameRand], 0, 0, 0]); _local2.x = (25 * OGlobal.Scale); _local2.y = ((15 * OGlobal.Scale) - (_local2.height / 2)); iSpriteNameRand.addChild(_local2); iSpriteNameRand.x = ((((iOriginalSize.x * 2) / 4) * OGlobal.Scale) - (iSpriteNameRand.width / 2)); iSpriteNameRand.y = ((iOriginalSize.y * OGlobal.Scale) + 15); this.addChild(iSpriteNameRand); iMessageNameRand = SearcherzS.MakeMessageBox([null, 0, SearcherzL.strRandom, 0, 0]); iMessageNameRand.SetVisible(false); iMessageNameRand.x = (iSpriteNameRand.x + iSpriteNameRand.width); iMessageNameRand.y = (iSpriteNameRand.y - iMessageNameRand.height); this.addChild(iMessageNameRand); iSpriteNameRand.mouseEnabled = true; iSpriteNameRand.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); iSpriteNameRand.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); }; break; }; } public function get prScore():int{ return (((iRelativeCoord)==null) ? 0 : iRelativeCoord.y); } public function SetBestPlayer(_arg1:String="", _arg2:String=""):void{ iStrBest = _arg1; iIndexRand = 0; iNameBest = _arg2; CreateNameSprite("b"); } private function onMouseOver(_arg1:MouseEvent):void{ if (_arg1.target == iSpriteName){ iMessageName.prVisible = true; }; if (_arg1.target == iSpriteNameBest){ iMessageNameBest.prVisible = true; }; if (_arg1.target == iSpriteNameRand){ iMessageNameRand.prVisible = true; }; } } }//package RES.GAME
Section 72
//OLogic (RES.GAME.OLogic) package RES.GAME { import flash.events.*; import flash.display.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class OLogic { private var sLoad:String; private var iO; private var iRandom:ORandomInt; private var index:int; private var loader:Loader; private var FileName:String; private var iLoader:URLLoader; private var iTimer:int; private var iList:Array; private var iState:uint; private var iIndex:uint; private var iNewWords:Array; private static const stStart:uint = 0; private static const stLoad:uint = 1; private static const stInitArray:uint = 4; public static const MAX_TIME_TO_LOAD_DATA:int = 10000; private static const stEnd:uint = 5; private static const stComplite:uint = 2; private static const stError:uint = 3; public function OLogic(_arg1:int){ iRandom = new ORandomInt(); iRandom.SeedRand(_arg1); index = 0; } private function IOError(_arg1:Event):void{ this.State = stError; } private function CreateList_v2():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Array; iList = new Array(); while (iNewWords.length > 0) { _local2 = iRandom.RandOnInterval(0, (iNewWords.length - 1)); iList.push(iNewWords[_local2]); _local4 = (iNewWords as Array).splice(_local2, 1); }; } private function OnError(_arg1:Event):void{ this.State = stError; } private function CreateList_v12():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Array; iList = new Array(); while (iNewWords.length > 1) { _local2 = iRandom.RandOnInterval(1, (iNewWords.length - 1)); _local3 = iRandom.RandOnInterval(2, (iNewWords[_local2].length - 1)); iList.push(iNewWords[_local2][_local3]); _local4 = (iNewWords[_local2] as Array).splice(_local3, 1); iNewWords[_local2][1] = (iNewWords[_local2][1] - _local4[0][1]); if (iNewWords[_local2].length == 2){ _local4 = iNewWords.splice(_local2, 1); iNewWords[0] = (iNewWords[0] - _local4[0][0]); }; }; } private function PreparationWords():void{ var _local1:int; var _local2:int; var _local3:Array; var _local4:Number; var _local5:Array; var _local6:String; var _local7:int; var _local8:int; var _local9:Boolean; _local1 = Math.round((50 * ((OGlobal.Scale)>=1) ? 1 : OGlobal.Scale)); SearcherzL.iPhrases = new Array(); SearcherzL.iPhrases.push(iList[iIndex][0]); SearcherzL.iPhrases.push(iList[iIndex][0].length); _local2 = 0; while (_local2 < 3) { _local6 = iList[iIndex][((2 * _local2) + 2)]; _local7 = _local6.length; if (_local6.length > _local1){ _local9 = true; while (_local9) { _local8 = _local6.lastIndexOf(" ", (_local7 - 1)); if (_local8 == -1){ _local8 = _local7; _local9 = false; } else { if (_local8 > _local1){ _local7 = _local8; } else { _local9 = false; }; }; }; _local6 = ((_local6.substr(0, _local8) + "\n") + _local6.substr((_local8 + 1), ((_local6.length - 1) - _local8))); }; SearcherzL.iPhrases.push([_local6, iList[iIndex][((2 * _local2) + 3)]]); _local2++; }; _local4 = (60 * Math.random()); if (_local4 < 10){ _local3 = [0, 1, 2]; } else { if (_local4 < 20){ _local3 = [0, 2, 1]; } else { if (_local4 < 30){ _local3 = [1, 0, 2]; } else { if (_local4 < 40){ _local3 = [1, 2, 0]; } else { if (_local4 < 50){ _local3 = [2, 0, 1]; } else { _local3 = [2, 1, 0]; }; }; }; }; }; SearcherzL.iPhrases.push(_local3); _local5 = SearcherzL.iPhrases; } public function LoadData():void{ if (Security.sandboxType == Security.LOCAL_WITH_FILE){ this.State = stLoad; } else { this.State = stStart; }; } private function CreateList():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Array; iList = new Array(); while (iNewWords.length > 1) { _local1 = iRandom.RandOnInterval(1, iNewWords[0]); _local2 = 1; while (_local1 > iNewWords[_local2][0]) { _local1 = (_local1 - iNewWords[_local2][0]); _local2++; }; _local3 = 2; _local1 = iRandom.RandOnInterval(1, iNewWords[_local2][1]); while (_local1 > iNewWords[_local2][_local3][1]) { _local1 = (_local1 - iNewWords[_local2][_local3][1]); _local3++; }; iList.push(iNewWords[_local2][_local3]); _local4 = (iNewWords[_local2] as Array).splice(_local3, 1); iNewWords[_local2][1] = (iNewWords[_local2][1] - _local4[0][1]); if (iNewWords[_local2].length == 2){ _local4 = iNewWords.splice(_local2, 1); iNewWords[0] = (iNewWords[0] - _local4[0][0]); }; }; } private function Complite(_arg1:Event):void{ sLoad = iLoader.data; this.State = stInitArray; } public function CreateArray_v2():void{ var _local1:Array; var _local2:String; var _local3:Array; var _local4:Array; var _local5:int; var _local6:Array; _local1 = sLoad.split(";"); iNewWords = new Array(); for each (_local2 in _local1) { _local3 = _local2.split(":"); _local4 = new Array(); _local4.push(int(_local3[0])); _local4.push(new int(0)); _local5 = 1; while (_local5 < _local3.length) { _local6 = _local3[_local5].split(","); _local6[1] = int(_local6[1]); _local6[3] = int(_local6[3]); _local6[5] = int(_local6[5]); _local6[7] = int(_local6[7]); iNewWords.push(_local6); _local5++; }; }; } public function NextPhrases():void{ iIndex = SearcherzL.iIndex[SearcherzL.iLanguage]; if (iIndex >= iList.length){ iIndex = 0; SearcherzL.iIndex[SearcherzL.iLanguage] = 0; }; PreparationWords(); } private function set State(_arg1:uint):void{ var url:URLRequest; var request:URLRequest; var value = _arg1; iState = value; switch (iState){ case stStart: trace("Start"); if (loader){ loader.contentLoaderInfo.removeEventListener(Event.INIT, OnComplite); loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, OnError); loader = null; }; loader = new Loader(); url = new URLRequest(SearcherzL.urlDataLoader[index]); try { loader.load(url); } catch(error:Error) { this.State = stError; }; loader.contentLoaderInfo.addEventListener(Event.INIT, OnComplite); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, OnError); break; case stLoad: trace("Load"); if (Security.sandboxType != Security.LOCAL_WITH_FILE){ iO = loader.content; iO.StartLoad(SearcherzL.iLangCodes[SearcherzL.iLanguage]); } else { if (iLoader){ iLoader.removeEventListener(Event.COMPLETE, Complite); iLoader.removeEventListener(IOErrorEvent.IO_ERROR, IOError); iLoader = null; }; this.FileName = SearcherzL.fileName; this.FileName = ((this.FileName.substr(0, (this.FileName.length - 4)) + ("_" + SearcherzL.iLangCodes[SearcherzL.iLanguage])) + this.FileName.substr((this.FileName.length - 4), 4)); request = new URLRequest(FileName); iLoader = new URLLoader(); try { iLoader.load(request); } catch(error:Error) { this.State = stError; }; iLoader.addEventListener(Event.COMPLETE, Complite); iLoader.addEventListener(IOErrorEvent.IO_ERROR, IOError); }; iTimer = getTimer(); break; case stComplite: sLoad = new String(iO.StrFromFile); iO = null; loader.unload(); this.State = stInitArray; break; case stError: if (Security.sandboxType != Security.LOCAL_WITH_FILE){ index++; if (index < SearcherzL.urlDataLoader.length){ this.State = stStart; }; }; break; case stInitArray: CreateArray_v2(); CreateList_v2(); iNewWords = null; State = stEnd; break; case stEnd: break; }; } public function CreateArray():void{ var _local1:Array; var _local2:String; var _local3:Array; var _local4:Array; var _local5:int; var _local6:Array; _local1 = sLoad.split(";"); iNewWords = new Array(); iNewWords.push(new int(0)); for each (_local2 in _local1) { _local3 = _local2.split(":"); _local4 = new Array(); _local4.push(int(_local3[0])); _local4.push(new int(0)); _local5 = 1; while (_local5 < _local3.length) { _local6 = _local3[_local5].split(","); _local6[1] = int(_local6[1]); _local6[3] = int(_local6[3]); _local6[5] = int(_local6[5]); _local6[7] = int(_local6[7]); _local4.push(_local6); _local4[1] = (_local4[1] + _local6[1]); _local5++; }; iNewWords[0] = (iNewWords[0] + _local4[0]); iNewWords.push(_local4); }; } public function get isLoad():int{ if (iO != null){ if (iO.isLoad == 1){ this.State = stComplite; } else { if (iO.isLoad == -1){ this.State = stError; }; }; }; if (State == stEnd){ return (1); }; if (State == stError){ return (-1); }; if ((getTimer() - iTimer) > MAX_TIME_TO_LOAD_DATA){ this.State = stError; }; return (0); } private function get State():uint{ return (iState); } private function OnComplite(_arg1:Event):void{ this.State = stLoad; } } }//package RES.GAME
Section 73
//OLoginForm (RES.GAME.OLoginForm) package RES.GAME { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import ENGINE.SMARTFOX.*; public class OLoginForm extends OIObject { public var iLabelName:OBitmap; public var iPlay:OButton; public var iBackground:OSprite; public var iInput:OInput; public function OLoginForm(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } private function keyHandler(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case 13: OnPress(_arg1, "1"); break; case 27: OnPress(_arg1, "0"); break; }; trace(((((((_arg1.target + "(") + _arg1.currentTarget) + "): ") + _arg1.keyCode) + "/") + _arg1.charCode)); } override public function Init():void{ super.Init(); iInput.prText = ""; SearcherzL.tf.text = ""; this.iInput.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler); iInput.x = ((iBackground.width / 2) - (iInput.width / 2)); iInput.y = ((iBackground.height / 2) - (iInput.height / 2)); iLabelName.x = ((iBackground.width / 2) - (iLabelName.width / 2)); iLabelName.y = ((iInput.y - iLabelName.height) - (10 * OGlobal.Scale)); iPlay.x = ((iBackground.width / 2) - (iPlay.width / 2)); iPlay.y = ((iInput.y + iInput.height) + (10 * OGlobal.Scale)); } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:String; var _local4:String; if (((((_arg2 as String) == "1")) || (((_arg2 as OButton) == iPlay)))){ _local3 = OUtils.ClearString(this.iInput.prText.toUpperCase()); _local4 = removeSpaces(_local3); if (_local4.length > 0){ SearcherzL.iGAME.prPlayerName = _local4; SearcherzL.iMP.State = OMultiplayer.stNone; (this.parent as OWindow).prVisible = false; } else { this.iInput.prText = ""; if ((_arg2 as OButton) == iPlay){ (this.iPlay as OButtonSimple).InitState(); }; }; }; if ((_arg2 as String) == "0"){ (this.parent as OWindow).prVisible = false; (this.parent.parent as OWindow).OnPress(null, SearcherzL.miMenu); }; } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); SetNameFocus(); } private function removeSpaces(_arg1:String):String{ var _local2:String; var _local3:int; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1.charAt(_local3) != " "){ _local2 = (_local2 + _arg1.charAt(_local3)); }; _local3++; }; return (_local2); } private function SetNameFocus():void{ if (!this.stage){ return; }; if (this.stage.focus == this.iInput.iText){ return; }; this.iInput.iText.setSelection(this.iInput.iText.length, this.iInput.iText.length); this.stage.focus = this.iInput.iText; } } }//package RES.GAME
Section 74
//ORadioButton (RES.GAME.ORadioButton) package RES.GAME { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; public class ORadioButton extends OButton { private var isCheck:Boolean; public var ID:int; public var iText:OBitmap; private var biState:int; private var iGroupRef:ORadioButtonGroup; public var SpriteState:Array; private static const stDown:int = 3; private static const stSelectDown:int = 6; private static const stSelectOver:int = 5; private static const stOver:int = 2; private static const stSelectDisabled:int = 7; private static const stUp:int = 1; private static const stDisabled:int = 0; private static const stSelectUp:int = 4; public function ORadioButton(_arg1:Array, _arg2:Array=null){ SpriteState = new Array(); super(_arg1, _arg2); BState = stUp; ID = -1; CheckState = false; } public function set CheckState(_arg1:Boolean):void{ if (isCheck != _arg1){ if (isCheck){ BState = stUp; } else { BState = stSelectUp; }; isCheck = _arg1; }; } override public function OnRollOver(_arg1:MouseEvent):void{ BState = (BState + 1); } override public function OnMouseUp(_arg1:MouseEvent):void{ if (BState == stSelectDown){ BState = (BState - 2); } else { if (BState == stDown){ if (iGroupRef == null){ BState = (BState + 1); } else { iGroupRef.NewCheck(ID); }; }; }; } private function get BState():int{ return (biState); } public function set GroupRef(_arg1:ORadioButtonGroup):void{ iGroupRef = _arg1; } public function get CheckState():Boolean{ return (isCheck); } override public function OnRollOut(_arg1:MouseEvent):void{ if ((((BState == stDown)) || ((BState == stSelectDown)))){ BState = (BState - 2); } else { if ((((BState == stOver)) || ((BState == stSelectOver)))){ BState = (BState - 1); }; }; } override public function OnMouseDown(_arg1:MouseEvent):void{ BState = (BState + 1); } private function set BState(_arg1:int):void{ (SpriteState[biState] as OSprite).prVisible = false; biState = _arg1; (SpriteState[biState] as OSprite).prVisible = true; } } }//package RES.GAME
Section 75
//ORadioButtonGroup (RES.GAME.ORadioButtonGroup) package RES.GAME { public class ORadioButtonGroup { public var CheckID:int; public var isChange:Boolean;// = false private var iRadioButtons:Array; public function ORadioButtonGroup(_arg1:Array){ var _local2:int; isChange = false; super(); iRadioButtons = _arg1; _local2 = 0; while (_local2 < iRadioButtons.length) { (iRadioButtons[_local2] as ORadioButton).ID = _local2; (iRadioButtons[_local2] as ORadioButton).GroupRef = this; (iRadioButtons[_local2] as ORadioButton).CheckState = false; _local2++; }; CheckID = -1; } public function NewCheck(_arg1:int):void{ if (CheckID != -1){ (iRadioButtons[CheckID] as ORadioButton).CheckState = false; }; CheckID = _arg1; (iRadioButtons[CheckID] as ORadioButton).CheckState = true; isChange = true; } public function SetFirstCheck(_arg1:int):void{ if (CheckID != -1){ (iRadioButtons[CheckID] as ORadioButton).CheckState = false; }; CheckID = _arg1; (iRadioButtons[CheckID] as ORadioButton).CheckState = true; } } }//package RES.GAME
Section 76
//ORecord (RES.GAME.ORecord) package RES.GAME { import ENGINE.CORE.*; import ENGINE.AD.*; import ENGINE.SMARTFOX.*; public class ORecord { private var isPlayMode:Boolean; private var iLocalProgress:String; private var iTempProgressA:Array; private var iTempProrgess:String; private var flagR:int; public static const POINTS_FOR_CORRECT_ANWER:int = 10; public static const POINTS_FOR_AVERAGE_ANWER:int = 0; public static const POINTS_FOR_WRONG_ANWER:int = -5; private static const strEncode:String = "zaqwsxcderfvbgtyhnmjuiklop$"; public function ORecord(){ iTempProrgess = new String(); iLocalProgress = new String(); flagR = 0; } public function DecodeStr(_arg1:String):String{ var _local2:String; var _local3:int; _local2 = new String(); _local3 = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + DecodeSymbol(_arg1.substr(_local3, 1))); _local3++; }; return (_local2); } public function get isConected():Boolean{ return ((SearcherzL.iMP.State == OMultiplayer.stInZone)); } private function DecodeSymbol(_arg1:String):String{ var _local2:int; var _local3:String; var _local4:int; _local2 = ORecord.strEncode.indexOf(_arg1); if (_local2 < 0){ return (_arg1); }; _local3 = new String(); while (true) { _local4 = (_local2 % 3); _local3 = (_local4.toString() + _local3); _local2 = int((_local2 / 3)); if (_local2 == 0){ break; }; }; while (_local3.length < 3) { _local3 = ("0" + _local3); }; return (_local3); } public function Connect(_arg1:String):void{ if (!this.isConected){ SearcherzL.iMP.Init(OGlobal.Domain, SearcherzL.sServer, SearcherzL.sZone, SearcherzL.sXTName, _arg1); }; } public function SaveRaitingOnServer():void{ SaveToServer(); if (this.isConected){ SearcherzL.iMP.Turn(["svr", SearcherzL.iSeed]); }; } public function AddProgress(_arg1:String):void{ var _local2:String; if (isPlayMode){ return; }; iTempProrgess = (iTempProrgess + _arg1); switch (_arg1){ case "0": SearcherzL.iGAME.AddScore(POINTS_FOR_CORRECT_ANWER); break; case "1": SearcherzL.iGAME.AddScore(POINTS_FOR_AVERAGE_ANWER); break; case "2": if (((!((SearcherzL.iGAME.prScore == 0))) && ((SearcherzL.iGAME.prScore < -(POINTS_FOR_WRONG_ANWER))))){ SearcherzL.iGAME.AddScore(-(SearcherzL.iGAME.prScore)); } else { if (SearcherzL.iGAME.prScore != 0){ SearcherzL.iGAME.AddScore(POINTS_FOR_WRONG_ANWER); }; }; break; }; if (iTempProrgess.length == 3){ _local2 = EncodeSymbol(iTempProrgess); SearcherzL.iStr[SearcherzL.iLanguage] = (SearcherzL.iStr[SearcherzL.iLanguage] + _local2.toString()); iTempProrgess = ""; SaveToServer(); }; } public function ReadGameData():void{ SearcherzL.iMP.Turn(["rgd", SearcherzL.iLanguage, SearcherzL.iSeed]); } public function SaveLocalData(_arg1:Boolean=true):void{ var _local2:int; SearcherzL.iGAME.Write("Str", ("temp" + SearcherzL.iLanguage.toString()), iTempProrgess); SearcherzL.iGAME.Write("Lang", "curLang", SearcherzL.iLanguage.toString()); if (!_arg1){ return; }; if (SearcherzL.iGAME.prPlayerName == ""){ return; }; _local2 = 0; while (_local2 < SearcherzL.Languages.length) { SearcherzL.iGAME.Write("Str", _local2.toString(), (SearcherzL.iStr[_local2] as String)); SearcherzL.iGAME.Write("Index", _local2.toString(), (SearcherzL.iIndex[_local2] as int)); _local2++; }; SearcherzL.iGAME.Write("Seed", "0", SearcherzL.iSeed); } public function SaveToServer():void{ if (this.isConected){ SearcherzL.iMP.Turn(["wgd", SearcherzL.iLanguage, SearcherzL.iSeed, (SearcherzL.iStr[SearcherzL.iLanguage] + iTempProrgess), ((SearcherzL.iStr[SearcherzL.iLanguage].length * 3) + iTempProrgess.length), SearcherzL.iGAME.prScore, SearcherzL.iGAME.prPlayerName]); }; } public function get GameData():Array{ var _local1:String; var _local2:Array; _local1 = SearcherzL.iMP.prOpponentTurn; SearcherzL.iMP.ClearOpponentTurn(true); _local2 = _local1.split(","); if (_local2[1] != "null"){ _local2[1] = SearcherzL.iRecord.DecodeStr(_local2[1]); }; if (_local2[3] != "null"){ _local2[3] = SearcherzL.iRecord.DecodeStr(_local2[3]); }; return (_local2); } public function get PlayMode():Boolean{ return (isPlayMode); } public function ReadLocalData(_arg1:Boolean=true):void{ var _local2:Object; var _local3:int; var _local4:String; OAdBanners.InitTBanner(SearcherzL.sTBannerPrefix[SearcherzL.iLanguage], SearcherzL.sBannerID); OAdBanners.InitBBanner(SearcherzL.sBBannerPrefix[SearcherzL.iLanguage], SearcherzL.sBannerID); _local2 = SearcherzL.iGAME.Read("Str", ("temp" + SearcherzL.iLanguage.toString())); if (((!((_local2 == null))) && (!((SearcherzL.iGAME.prPlayerName == ""))))){ iTempProrgess = new String(_local2); } else { iTempProrgess = new String(); }; if (!_arg1){ return; }; if (SearcherzL.iIndex == null){ SearcherzL.iIndex = new Array(SearcherzL.Languages.length); _local3 = 0; while (_local3 < SearcherzL.Languages.length) { _local2 = SearcherzL.iGAME.Read("Index", _local3.toString()); if (((!((_local2 == 0))) && (!((SearcherzL.iGAME.prPlayerName == ""))))){ SearcherzL.iIndex[_local3] = (_local2 as int); } else { SearcherzL.iIndex[_local3] = 0; }; _local3++; }; }; if (SearcherzL.iStr == null){ SearcherzL.iStr = new Array(SearcherzL.Languages.length); _local3 = 0; while (_local3 < SearcherzL.Languages.length) { _local2 = SearcherzL.iGAME.Read("Str", _local3.toString()); if (((!((_local2 == null))) && (!((SearcherzL.iGAME.prPlayerName == ""))))){ SearcherzL.iStr[_local3] = new String(_local2); } else { SearcherzL.iStr[_local3] = new String(); }; _local3++; }; }; _local2 = SearcherzL.iGAME.Read("Seed", "0"); if (((!((_local2 == null))) && (!((SearcherzL.iGAME.prPlayerName == ""))))){ SearcherzL.iSeed = (_local2 as uint); } else { SearcherzL.iSeed = 0; }; } public function get isCompliteGameData():Boolean{ if (SearcherzL.iMP.prOpponentTurn){ return (true); }; return (false); } public function Clear():void{ var _local1:int; SearcherzL.iSeed = 0; _local1 = 0; while (_local1 < SearcherzL.Languages.length) { SearcherzL.iStr[_local1] = new String(); SearcherzL.iIndex[_local1] = 0; _local1++; }; iTempProrgess = new String(); SaveLocalData(); } public function set PlayMode(_arg1:Boolean):void{ isPlayMode = _arg1; } private function EncodeSymbol(_arg1:String):String{ var _local2:int; var _local3:int; _local2 = 0; _local3 = 0; while (_local3 < 3) { _local2 = (_local2 + (int(_arg1.substr((2 - _local3), 1)) * Math.pow(3, _local3))); _local3++; }; return (new String(ORecord.strEncode.substr(_local2, 1))); } public function get GameStr():String{ var _local1:String; var _local2:String; var _local3:int; _local1 = new String(); if (!isPlayMode){ _local2 = SearcherzL.iStr[SearcherzL.iLanguage]; _local3 = 0; while (_local3 < _local2.length) { _local1 = (_local1 + DecodeSymbol(_local2.substr(_local3, 1))); _local3++; }; _local1 = (_local1 + iTempProrgess); trace(((_local2 + " -- ") + _local1)); } else { trace("PLAYMODE"); _local1 = SearcherzL.arrayForGraph[0]; }; return (_local1); } } }//package RES.GAME
Section 77
//OSearchBarText (RES.GAME.OSearchBarText) package RES.GAME { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import flash.utils.*; public class OSearchBarText extends OIObject { private var iTimer:uint; public var iTextSearch:Array; private var index:uint; private var iMaxTimer:uint; public static const stNormal:uint = 0; public static const stShow:uint = 1; public function OSearchBarText(_arg1:Array, _arg2:Array=null){ iTextSearch = new Array(); super(_arg1, _arg2); } override public function set prVisible(_arg1:Boolean):void{ var _local2:OBitmap; for each (_local2 in iTextSearch) { _local2.prVisible = _arg1; }; } public function Show():void{ this.State = stShow; } override public function get prAnimation():Boolean{ if (State == stShow){ return (true); }; return (false); } override public function OnEnterFrame(_arg1:Event):void{ var _local2:uint; switch (iState){ case stShow: _local2 = getTimer(); if ((_local2 - iTimer) > iMaxTimer){ iTextSearch[index].prVisible = true; iTimer = getTimer(); iMaxTimer = (50 + (200 * Math.random())); index++; if (index >= iTextSearch.length){ this.State = stNormal; }; }; break; }; } public function MyPos(_arg1:Number, _arg2:Number):void{ this.x = (_arg1 + (5 * ((OGlobal.Scale)<=1) ? 1 : OGlobal.Scale)); this.y = (_arg2 - (this.height / 2)); } override public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stShow: index = 0; iTimer = getTimer(); iMaxTimer = (50 + (200 * Math.random())); break; }; } } }//package RES.GAME
Section 78
//ScoreOIObject (RES.GAME.ScoreOIObject) package RES.GAME { import flash.events.*; import flash.geom.*; import ENGINE.INTERFACE.*; import flash.utils.*; public class ScoreOIObject extends OIObject { private var iEndPoint:Point; private var iT:Number; private var isMove:Boolean; private var iTimer:Number; private var iSpeed:Point; private var iStartPoint:Point; public static const stNormal:int = 0; public static const stMove:int = 1; public function ScoreOIObject(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } public function MoveAnimation(_arg1:Number, _arg2:Number, _arg3:Number):void{ iSpeed = new Point(((_arg1 - this.x) / _arg3), ((_arg2 - this.y) / _arg3)); iStartPoint = new Point(this.x, this.y); iEndPoint = new Point(_arg1, _arg2); this.iT = _arg3; this.State = stMove; } public function get isAnimation():Boolean{ return (isMove); } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; switch (iState){ case stNormal: break; case stMove: _local2 = (getTimer() - iTimer); this.y = (iStartPoint.y + (iSpeed.y * _local2)); if (_local2 >= iT){ this.y = iEndPoint.y; isMove = false; this.State = stNormal; }; break; }; super.OnEnterFrame(_arg1); } override public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stNormal: break; case stMove: iTimer = getTimer(); isMove = true; break; }; } } }//package RES.GAME
Section 79
//OWGame (RES.WINDOWS.OWGame) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import RES.GAME.*; import flash.text.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; import ENGINE.AD.*; public class OWGame extends OWindow { public var iField:OField; private var iMaxTimeTF:int;// = 20000 private var iTimer:int; private var iTempConnect:int; public var iGraph:OGraph; public var iLogic:OLogic; public var iBackground:OSprite; private var tf:TextField; public var iTextSearch:OIObject; private var iInfo:OIObject; private var iDTimeTF:int;// = 1000 private var iTimerConnect:int; public var iSearchBar:OBitmap; public var iBack:OButton; public var iNext:OButton; public var iGameName:OIObject; private var isFlashing:Boolean; public var iCopyright:OButton; private var iTimeTF:int;// = 2000 private var iTemp:int; public static const stShowSearchBarText:uint = 6; public static const stStartLevel:uint = 5; public static const stNormal:uint = 8; public static const stEndLoadData:uint = 2; public static const stShowScore:uint = 9; public static const stLoadData:uint = 1; public static const stStartGame:uint = 4; public static const stWait:uint = 10; public static const stErrorLoadData:uint = 3; public static const stInit:uint = 0; public static const stEndLevel:uint = 11; public static const stShowPhrases:uint = 7; public function OWGame(){ iTimeTF = 2000; iMaxTimeTF = 20000; iDTimeTF = 1000; super(SearcherzL.OWGame, OInterface.iDefAnimators); } private function SetElementsPos():void{ var _local1:int; var _local2:int; var _local3:int; _local1 = (800 * OGlobal.Scale); iCopyright.x = ((400 * OGlobal.Scale) - (iCopyright.width / 2)); iCopyright.y = (((600 * OGlobal.Scale) - iCopyright.height) - (10 * OGlobal.Scale)); iBack.x = ((700 * OGlobal.Scale) - (iBack.width / 2)); iBack.y = (((600 * OGlobal.Scale) - iBack.height) - (10 * OGlobal.Scale)); iNext.x = ((100 * OGlobal.Scale) - (iNext.width / 2)); _local2 = ((iGameName.width + iSearchBar.width) + 25); iGameName.x = ((_local1 / 2) - (_local2 / 2)); iSearchBar.x = (((_local1 / 2) + (_local2 / 2)) - iSearchBar.width); _local3 = iBackground.y; iNext.y = ((_local3 - iNext.height) - 5); iSearchBar.y = ((_local3 - iSearchBar.height) - 5); iGameName.y = (_local3 - (iGameName.height * 0.9)); iField.x = (8 + (10 * OGlobal.Scale)); iField.y = ((iBackground.y + iBackground.height) + (10 * OGlobal.Scale)); iGraph.x = (iField.x + iGraph.minX); iGraph.y = ((iField.getBounds(this).y + iField.height) + (20 * OGlobal.Scale)); } override public function get State():int{ return (iState); } override public function Free():void{ if (iField != null){ this.removeChild(iField); iField.Free(); iField = null; }; if (iTextSearch != null){ this.removeChild(iTextSearch); iTextSearch.Free(); iTextSearch = null; }; iBack = null; iCopyright = null; iGameName = null; iBackground = null; SearcherzL.iRecord.SaveRaitingOnServer(); super.Free(); } private function AddInfo(_arg1:OIObject, _arg2:Boolean=true):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.x = (((800 * OGlobal.Scale) / 2) - (iInfo.width / 2)); this.iInfo.y = (((600 * OGlobal.Scale) / 2) - (iInfo.height / 2)); if (_arg2){ this.iInfo.SetVisible(false); this.iInfo.prVisible = true; }; this.addChild(this.iInfo); }; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:Array; super.OnEnterFrame(_arg1); switch (iState){ case stInit: _local2 = getTimer(); switch (iTemp){ case 0: if ((_local2 - iTimer) > 2000){ iInfo.prVisible = false; iTemp = 2; }; break; case 1: break; case 2: if (iInfo.alpha == 0){ AddInfo(null); this.State = stLoadData; }; break; }; break; case stLoadData: _local2 = getTimer(); if ((((iLogic.isLoad == 1)) && (((_local2 - iTimer) > 2000)))){ this.State = stEndLoadData; }; if ((((iLogic.isLoad == -1)) && (((_local2 - iTimer) > 2000)))){ this.State = stEndLoadData; }; break; case stEndLoadData: if (this.iInfo.alpha == 0){ AddInfo(null); this.AddBanner(false); if (iLogic.isLoad == 1){ this.State = stStartGame; }; if (iLogic.isLoad == -1){ this.State = stErrorLoadData; }; }; break; case stErrorLoadData: _local2 = getTimer(); if ((_local2 - iTimer) > 5000){ this.prVisible = false; (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); this.State = stNormal; }; break; case stStartGame: SearcherzL.iGAME.NewGame(); SearcherzL.iGAME.AddScore(iGraph.prScore); _local2 = getTimer(); if (((((_local2 - iTimer) > 300)) && ((iTemp == 0)))){ SetVisibleGame(true); iTemp = 1; }; if (((((_local2 - iTimer) > 500)) && ((iTemp == 1)))){ this.State = stStartLevel; }; break; case stStartLevel: this.State = stShowSearchBarText; break; case stShowSearchBarText: if (!iTextSearch.prAnimation){ this.State = stShowPhrases; }; break; case stShowPhrases: this.State = stNormal; break; case stNormal: if (iField.prPress){ this.State = stShowScore; }; break; case stShowScore: switch (iTemp){ case 0: _local2 = getTimer(); if ((_local2 - iTimer) > 1000){ iField.ShowScores(); iTemp = 1; }; break; case 1: if (!iField.isAnimation){ iTemp = 2; iTimer = getTimer(); }; break; case 2: _local2 = getTimer(); if ((_local2 - iTimer) > 500){ iField.MoveElements(); iTemp = 3; }; break; case 3: if (!iField.isAnimation){ iTemp = 4; iTimer = getTimer(); (iGraph as OGraph).AddScore(iField.IDPress.toString()); this.iNext.prVisible = true; this.State = stWait; }; break; case 4: _local2 = getTimer(); if ((_local2 - iTimer) > 3000){ this.State = stEndLevel; }; break; }; break; case stEndLevel: _local2 = getTimer(); if ((_local2 - iTimer) > 800){ iField.FreeElements(); this.State = stStartLevel; }; break; case stWait: _local2 = getTimer(); if (((((_local2 - iTimer) > this.iTimeTF)) && (isFlashing))){ (iNext as OButtonSimple).Flashing = 2; isFlashing = false; }; break; }; switch (iTempConnect){ case 0: _local2 = getTimer(); if (SearcherzL.iRecord.isConected){ SearcherzL.iRecord.ReadGameData(); iTimerConnect = getTimer(); iTempConnect = 1; break; }; if ((_local2 - iTimerConnect) > 5000){ iTempConnect = 2; break; }; break; case 1: _local2 = getTimer(); if (SearcherzL.iRecord.isCompliteGameData){ _local3 = SearcherzL.iRecord.GameData; if (_local3[0] != "null"){ iGraph.SetBestPlayer(_local3[1], _local3[0]); }; if (_local3[2] != "null"){ iGraph.SetRandPlayer(_local3[3], _local3[2]); }; iGraph.Play(); iTempConnect = 3; break; }; if ((_local2 - iTimerConnect) > 5000){ iTempConnect = 2; break; }; break; case 2: SearcherzL.iRecord.Connect(SearcherzL.iGAME.prPlayerName); iTimerConnect = getTimer(); iTempConnect = 0; break; }; } override public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stInit: SearcherzL.iRecord.Connect(SearcherzL.iGAME.prPlayerName); iLogic.LoadData(); this.AddBanner(true, 800, 260); iTemp = 0; iTempConnect = 0; iTimer = getTimer(); iTimerConnect = getTimer(); this.AddInfo(SearcherzS.MakeInfoText(SearcherzL.OWConnectionStr), true); break; case stLoadData: this.AddInfo(SearcherzS.MakeInfoText(SearcherzL.OWLoadingDataStr), true); iTimer = getTimer(); break; case stEndLoadData: this.iInfo.prVisible = false; break; case stErrorLoadData: this.AddInfo(SearcherzS.MakeInfoText(SearcherzL.OWErrorLoadingStr), true); iTimer = getTimer(); break; case stStartGame: iTimer = getTimer(); iTemp = 0; break; case stStartLevel: iLogic.NextPhrases(); NewSearchBarText(); iField.CreateElements(); break; case stShowSearchBarText: (iTextSearch as OSearchBarText).Show(); break; case stShowPhrases: iField.ShowPhrases(); break; case stNormal: break; case stShowScore: iTimer = getTimer(); iTemp = 0; var _local2 = SearcherzL.iIndex; var _local3 = SearcherzL.iLanguage; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; break; case stEndLevel: iField.HideElements(); iNext.prVisible = false; (iNext as OButtonSimple).InitState(); iTimer = getTimer(); break; case stWait: if (iTimeTF < iMaxTimeTF){ this.iTimeTF = (this.iTimeTF + iDTimeTF); }; iTimer = getTimer(); isFlashing = true; break; }; } private function AddBanner(_arg1:Boolean, _arg2:int=0, _arg3:int=0):void{ if (SearcherzL.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); }; } override public function Init():void{ var _local1:Number; iField = new OField(); SearcherzL.iPhrases = [null, null, ["0\n0", 0], ["1\n1", 0], ["2\n2", 0], [0, 1, 2]]; iField.CreateElements(); this.addChild(iField); _local1 = (((((590 * OGlobal.Scale) - 20) - (((((80 + 30) + 30) + 160) * OGlobal.Scale) + 40)) - 50) / OGlobal.Scale); SearcherzL.OWGame[(SearcherzL.OWGame.length - 1)][2] = (int(((_local1 / 20) + (((_local1 % 20))<15) ? 0 : 1)) * 20); super.Init(); if (SearcherzL.iSeed == 0){ SearcherzL.iSeed = getTimer(); }; iLogic = new OLogic(SearcherzL.iSeed); iGraph.InitPole(); SetElementsPos(); this.State = stInit; } private function NewSearchBarText():void{ var _local1:String; if (iTextSearch != null){ this.removeChild(iTextSearch); iTextSearch = null; }; _local1 = SearcherzL.iPhrases[0]; iTextSearch = (SearcherzS.MakeTextForSearchBar([null, 2, _local1, 0, 0]) as OSearchBarText); this.addChild(iTextSearch); (iTextSearch as OSearchBarText).MyPos(iSearchBar.x, (iSearchBar.y + (iSearchBar.height / 2))); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iCopyright){ navigateToURL(new URLRequest(SearcherzL.strConnect1URL[SearcherzL.iLanguage])); return; }; if (_arg2 == this.iNext){ this.State = stEndLevel; return; }; this.prVisible = false; (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); } private function SetVisibleGame(_arg1:Boolean):void{ if (iGameName){ iGameName.prVisible = _arg1; }; if (iBackground){ iBackground.prVisible = _arg1; }; if (iBack){ iBack.prVisible = _arg1; }; if (iCopyright){ iCopyright.prVisible = _arg1; }; if (iSearchBar){ iSearchBar.prVisible = _arg1; }; if (iGraph){ iGraph.prVisible = _arg1; }; } } }//package RES.WINDOWS
Section 80
//OWHighScores (RES.WINDOWS.OWHighScores) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; import flash.text.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; public class OWHighScores extends OWindow { private var iScoresElements:Array; public var iGameName:OIObject; public var iHeader:OBitmap; private var iTimer:int; public var iCopyright:OButton; public var iBackground:OSprite; private var iToShow:int; public var iBack:OButton; private var iScores:Array; private static const stStart:uint = 0; private static const stLoadScores:uint = 1; private static const stNormal:uint = 4; private static const stCreateElements:uint = 2; private static const stShowElements:uint = 3; private static const stConvertLoaded:uint = 5; public function OWHighScores(){ super(SearcherzL.OWHightScores, OInterface.iDefAnimators); } override public function Init():void{ super.Init(); SetElementsPos(); this.State = stStart; } private function ConvertFromLoad(_arg1:String):void{ var _local2:Array; var _local3:int; iScores = new Array(); _local2 = _arg1.split(","); _local3 = 0; while (_local3 < (_local2.length / 3)) { iScores.push([_local2[((_local3 * 3) + 2)], _local2[((_local3 * 3) + 1)]]); _local3++; }; this.State = stCreateElements; } private function SetElementsPos():void{ var _local1:int; var _local2:int; _local1 = (800 * OGlobal.Scale); iCopyright.x = ((400 * OGlobal.Scale) - (iCopyright.width / 2)); iCopyright.y = (((600 * OGlobal.Scale) - iCopyright.height) - (10 * OGlobal.Scale)); iGameName.x = ((_local1 / 4) - (iGameName.width / 2)); iHeader.x = (((3 * _local1) / 4) - (iHeader.width / 2)); iBack.x = ((700 * OGlobal.Scale) - (iBack.width / 2)); iBack.y = (((600 * OGlobal.Scale) - iBack.height) - (10 * OGlobal.Scale)); _local2 = iBackground.y; iHeader.y = (((2 * _local2) / 3) - (iHeader.height / 2)); iGameName.y = (((2 * _local2) / 3) - (iGameName.height / 2)); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iCopyright){ navigateToURL(new URLRequest(SearcherzL.strConnect1URL[SearcherzL.iLanguage])); return; }; this.prVisible = false; (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); } private function CreateElements():void{ var _local1:int; var _local2:OIObject; var _local3:OIObject; var _local4:int; _local1 = ((iBackground.y + iBackground.height) + (10 * OGlobal.Scale)); iScoresElements = new Array(); _local4 = 0; while (_local4 < iScores.length) { _local2 = SearcherzS.MakeAlignText([null, 4, [iScores[_local4][0]], 0, false, TextFormatAlign.LEFT, (150 / OGlobal.Scale), 0, 0]); _local2.SetVisible(false); _local3 = SearcherzS.MakeAlignText([null, 4, [iScores[_local4][1]], 0, false, TextFormatAlign.RIGHT, (100 / OGlobal.Scale), 0, 0]); _local3.SetVisible(false); _local2.x = ((400 * OGlobal.Scale) - 150); _local2.y = _local1; _local3.x = (((400 * OGlobal.Scale) + 150) - _local3.width); _local3.y = _local1; _local1 = (_local1 + (Math.max(_local2.height, _local3.height) + (5 * OGlobal.Scale))); iScoresElements.push([_local2, _local3]); this.addChild(_local2); this.addChild(_local3); _local4++; }; this.State = stShowElements; } private function LoadLocalScores():void{ var _local1:OScoreParams; var _local2:int; iScores = new Array(); _local2 = 0; while (_local2 < 10) { _local1 = SearcherzL.iGAME.GetLocalScores(6, _local2); iScores.push([_local1.iName, _local1.iScore]); _local2++; }; this.State = stCreateElements; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; super.OnEnterFrame(_arg1); switch (iState){ case stStart: break; case stLoadScores: if (SearcherzL.iMP.prOpponentTurn){ ConvertFromLoad(new String(SearcherzL.iMP.prOpponentTurn)); SearcherzL.iMP.ClearOpponentTurn(true); }; break; case stShowElements: _local2 = getTimer(); if ((_local2 - iTimer) > 100){ iScoresElements[iToShow][0].prVisible = true; iScoresElements[iToShow][1].prVisible = true; iTimer = getTimer(); iToShow++; if (iToShow >= iScoresElements.length){ this.State = stNormal; }; }; break; }; } override public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stStart: if (SearcherzL.iRecord.isConected){ trace(("LANG = " + SearcherzL.iLanguage)); SearcherzL.iMP.Turn(["gtt", SearcherzL.iLanguage]); this.State = stLoadScores; } else { LoadLocalScores(); }; break; case stLoadScores: break; case stCreateElements: CreateElements(); break; case stShowElements: iTimer = getTimer(); iToShow = 0; break; case stNormal: break; }; } } }//package RES.WINDOWS
Section 81
//OWInstructions (RES.WINDOWS.OWInstructions) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import RES.GAME.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; public class OWInstructions extends OWindow { public var iGameName:OIObject; private var iField:OField; public var iText:Array; public var iHeader:OBitmap; private var isLogin:Boolean; private var iTimer:int; private var tempPhrases:Array; public var iLoginForm:OLoginForm; public var iGraph:OGraph; public var iCopyright:OButton; public var iBackground:OSprite; private var tempStr:String; public var iBack:OButton; public function OWInstructions(_arg1:Boolean=false){ var _local2:int; this.isLogin = _arg1; _local2 = SearcherzL.OWInstructions.length; SearcherzL.OWInstructions[(_local2 - 1)][(SearcherzL.OWInstructions[(_local2 - 1)].length - 1)] = _arg1; super(SearcherzL.OWInstructions, OInterface.iDefAnimators); } private function SetElementsPos():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:int; _local1 = (800 * OGlobal.Scale); iCopyright.x = ((400 * OGlobal.Scale) - (iCopyright.width / 2)); iCopyright.y = (((600 * OGlobal.Scale) - iCopyright.height) - (10 * OGlobal.Scale)); iGameName.x = ((_local1 / 4) - (iGameName.width / 2)); iHeader.x = (((3 * _local1) / 4) - (iHeader.width / 2)); iBack.x = ((700 * OGlobal.Scale) - (iBack.width / 2)); iBack.y = (((600 * OGlobal.Scale) - iBack.height) - (10 * OGlobal.Scale)); _local2 = iBackground.y; iHeader.y = (((2 * _local2) / 3) - (iHeader.height / 2)); iGameName.y = (((2 * _local2) / 3) - (iGameName.height / 2)); _local1 = ((isLogin) ? 600 : 800 * OGlobal.Scale); _local3 = Math.max(iText[0].height, iText[1].height, iText[2].height); _local3 = Math.round(((_local3 * 2) * OGlobal.Scale)); _local4 = 0; while (_local4 < 3) { iText[_local4].x = ((_local1 / 2) - (iText[_local4].width / 2)); iText[_local4].y = (((_local2 + iBackground.height) + (_local3 / 2)) - (iText[_local4].height / 2)); (iText[_local4] as OIObject).prAnimatorParams = OInterface.iDefSlowAnimators; _local4++; }; iField.x = (8 + (10 * OGlobal.Scale)); iField.y = ((_local2 + iBackground.height) + _local3); iGraph.x = (iField.x + iGraph.minX); iGraph.y = ((_local2 + iBackground.height) + _local3); } override public function Init():void{ SearcherzL.OWInstructions[(SearcherzL.OWInstructions.length - 1)][2] = ((86 + (40 * OGlobal.Scale)) / OGlobal.Scale); if (isLogin){ SearcherzL.OWInstructions[3][6] = 500; SearcherzL.OWInstructions[4][6] = 500; SearcherzL.OWInstructions[5][6] = 500; SearcherzL.OWInstructions[6][1] = 530; } else { SearcherzL.OWInstructions[3][6] = 700; SearcherzL.OWInstructions[4][6] = 700; SearcherzL.OWInstructions[5][6] = 700; SearcherzL.OWInstructions[6][1] = 730; }; iText = new Array(); super.Init(); SearcherzL.iRecord.PlayMode = true; iField = new OField(true); this.addChild(iField); if (isLogin){ iField.RightCord = 580; }; tempPhrases = SearcherzL.iPhrases; iField.CreateElements(); iGraph.Name = SearcherzL.strYou[SearcherzL.iLanguage]; iGraph.InitPole(); iGraph.prAnimatorParams = OInterface.iDefSlowAnimators; SetElementsPos(); this.State = 0; } override public function get State():int{ return (iState); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iCopyright){ navigateToURL(new URLRequest(SearcherzL.strConnect1URL[SearcherzL.iLanguage])); return; }; this.prVisible = false; (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); } override public function Free():void{ SearcherzL.iRecord.PlayMode = false; super.Free(); } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; super.OnEnterFrame(_arg1); _local2 = getTimer(); switch (iState){ case 0: if ((_local2 - iTimer) > 100){ this.State = 1; }; break; case 1: if ((_local2 - iTimer) > 1500){ this.State = 2; }; break; case 2: if (!iField.isAnimation){ this.State = 3; }; break; case 3: if ((_local2 - iTimer) > 2000){ this.State = 4; }; break; case 4: if ((_local2 - iTimer) > 1500){ this.State = 5; }; break; case 5: if (!(iText[0] as OIObject).prAnimation){ this.State = 6; }; break; case 6: if ((_local2 - iTimer) > 1000){ this.State = 7; }; break; case 7: if ((_local2 - iTimer) > 4000){ this.State = 8; }; break; case 8: if (((!(iField.isAnimation)) && (!(iText[1].prAnimation)))){ this.State = 9; }; break; case 9: if ((_local2 - iTimer) > 8000){ this.State = 10; }; break; case 10: if (((!(iGraph.prAnimation)) && (!(iText[2].prAnimation)))){ this.State = 0; }; break; }; } override public function set State(_arg1:int):void{ var _local2:int; var _local3:int; iState = _arg1; switch (iState){ case 0: iGraph.SetBestPlayer(SearcherzL.arrayForGraph[1], SearcherzL.strBest[SearcherzL.iLanguage]); iGraph.SetRandPlayer(SearcherzL.arrayForGraph[2], SearcherzL.strRandom[SearcherzL.iLanguage]); iGraph.Play(); iField.FreeElements(); iField.CreateElements(); iTimer = getTimer(); break; case 1: iTimer = getTimer(); iText[0].prVisible = true; break; case 2: iTimer = getTimer(); iField.ShowPhrases(); break; case 3: iTimer = getTimer(); break; case 4: iTimer = getTimer(); _local2 = int((Math.random() * 2)); _local3 = 0; while (_local3 < 3) { if (SearcherzL.arrayInstruction[SearcherzL.iLanguage][5][_local3] == _local2){ break; }; _local3++; }; iField.SetPress(_local3); break; case 5: iTimer = getTimer(); iText[0].prVisible = false; break; case 6: iTimer = getTimer(); iText[1].prVisible = true; iField.ShowScores(); break; case 7: iTimer = getTimer(); iField.MoveElements(); (iGraph as OGraph).AddScore(iField.IDPress.toString()); break; case 8: iField.HideElements(); iText[1].prVisible = false; break; case 9: iTimer = getTimer(); iText[2].prVisible = true; iGraph.prVisible = true; break; case 10: iTimer = getTimer(); iText[2].prVisible = false; iGraph.prVisible = false; break; }; } } }//package RES.WINDOWS
Section 82
//OWMenu (RES.WINDOWS.OWMenu) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import RES.GAME.*; import ENGINE.CORE.*; import flash.net.*; import ENGINE.SMARTFOX.*; public class OWMenu extends OWindow { public var iMoreGames:OButton; public var iRadioButtons:Array; public var iRadioButtonsLabel:OBitmap; public var iName:OBitmap; public var iInstructions:OButton; public var iTopBackground:OSprite; public var iRadioButtonsGroupe:ORadioButtonGroup; public var iGameName:OIObject; public var iExit:OButton; public var iPlay:OButton; public var iCopyright:OButton; public var iDelimiter:OBitmap; public var iHighScores:OButton; public var iEnter:OButton; public var iOptions:OButton; public function OWMenu(){ iRadioButtons = new Array(); super(SearcherzL.OWMenu, OInterface.iDefAnimators); iRadioButtonsGroupe = new ORadioButtonGroup(iRadioButtons); iRadioButtonsGroupe.SetFirstCheck(SearcherzL.iLanguage); } override public function set prVisible(_arg1:Boolean):void{ super.prVisible = _arg1; } override public function Free():void{ this.iOptions = null; this.iInstructions = null; this.iHighScores = null; this.iMoreGames = null; super.Free(); } private function SetUrlButtonsPos():void{ var _local1:int; var _local2:int; var _local3:int; _local1 = ((50 * OGlobal.Scale) * OGlobal.Scale); _local2 = (800 * OGlobal.Scale); _local3 = (((((_local1 * 5) + iOptions.width) + iInstructions.width) + iHighScores.width) + iMoreGames.width); iOptions.x = (((_local2 / 2) - (_local3 / 2)) + _local1); iInstructions.x = ((((_local2 / 2) - (_local3 / 2)) + (2 * _local1)) + iOptions.width); iHighScores.x = (((((_local2 / 2) - (_local3 / 2)) + (3 * _local1)) + iOptions.width) + iInstructions.width); iMoreGames.x = ((((((_local2 / 2) - (_local3 / 2)) + (4 * _local1)) + iOptions.width) + iInstructions.width) + iHighScores.width); } private function SetRadioButtonsPos():void{ var _local1:Array; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:ORadioButton; _local1 = [0, 0, 0]; _local2 = 0; while (_local2 < iRadioButtons.length) { _local7 = (iRadioButtons[_local2] as ORadioButton); if (_local7.width > _local1[(_local2 % 3)]){ _local1[(_local2 % 3)] = _local7.width; }; _local2++; }; _local3 = ((30 * OGlobal.Scale) * OGlobal.Scale); _local4 = (30 * OGlobal.Scale); if (_local4 < 15){ _local4 = 15; }; _local5 = (800 * OGlobal.Scale); _local6 = ((((_local1[0] + _local1[1]) + _local1[2]) + iRadioButtonsLabel.width) + (5 * _local3)); iRadioButtonsLabel.x = (((_local5 / 2) - (_local6 / 2)) + _local3); _local2 = 0; while (_local2 < iRadioButtons.length) { if ((_local2 % 3) == 0){ iRadioButtons[_local2].x = ((((_local5 / 2) - (_local6 / 2)) + iRadioButtonsLabel.width) + (2 * _local3)); if (_local2 >= 3){ iRadioButtons[_local2].y = (iRadioButtons[(_local2 - 3)].y + _local4); }; } else { if ((_local2 % 3) == 1){ iRadioButtons[_local2].x = (((((_local5 / 2) - (_local6 / 2)) + iRadioButtonsLabel.width) + (3 * _local3)) + _local1[0]); if (_local2 >= 3){ iRadioButtons[_local2].y = (iRadioButtons[(_local2 - 3)].y + _local4); }; } else { iRadioButtons[_local2].x = ((((((_local5 / 2) - (_local6 / 2)) + iRadioButtonsLabel.width) + (4 * _local3)) + _local1[0]) + _local1[1]); if (_local2 >= 3){ iRadioButtons[_local2].y = (iRadioButtons[(_local2 - 3)].y + _local4); }; }; }; _local2++; }; } override public function OnEnterFrame(_arg1:Event):void{ if (iRadioButtonsGroupe.isChange){ iRadioButtonsGroupe.isChange = false; SearcherzL.iRecord.SaveLocalData(false); SearcherzL.iLanguage = iRadioButtonsGroupe.CheckID; SearcherzL.iRecord.ReadLocalData(false); this.prVisible = false; (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); }; super.OnEnterFrame(_arg1); } override public function Init():void{ SearcherzL.OWMenu[0][2][0] = SearcherzL.iGAME.prPlayerName; super.Init(); SetUrlButtonsPos(); SetRadioButtonsPos(); SetOtherElementsPos(); if (SearcherzL.iGAME.prPlayerName != ""){ iExit.SetVisible(true); iDelimiter.prVisible = true; iName.prVisible = true; SearcherzL.iRecord.Connect(SearcherzL.iGAME.prPlayerName); } else { iEnter.SetVisible(true); SearcherzL.iRecord.Connect(("Robot" + int((Math.random() * 999)).toString())); }; } private function SetOtherElementsPos():void{ var _local1:int; _local1 = (800 * OGlobal.Scale); iCopyright.x = ((_local1 / 2) - (iCopyright.width / 2)); iPlay.x = ((_local1 / 2) - (iPlay.width / 2)); iGameName.x = ((_local1 / 2) - (iGameName.width / 2)); iEnter.x = (_local1 - iEnter.width); iEnter.y = 0; iTopBackground.y = (iEnter.height - 2); iGameName.y = iTopBackground.y; iExit.x = (_local1 - iExit.width); iDelimiter.x = (iExit.x - iDelimiter.width); iName.x = (iDelimiter.x - iName.width); } override public function set prActive(_arg1:Boolean):void{ super.prActive = _arg1; } private function ClearData():void{ SearcherzL.iRecord.Clear(); SearcherzL.iRecord.SaveLocalData(); SearcherzL.iMP.State = OMultiplayer.stNone; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iOptions){ (this.parent as OWindow).OnPress(null, SearcherzL.miOptions); this.prVisible = false; return; }; if (_arg2 == this.iInstructions){ (this.parent as OWindow).OnPress(null, SearcherzL.miInstructions); this.prVisible = false; return; }; if (_arg2 == this.iHighScores){ (this.parent as OWindow).OnPress(null, SearcherzL.miHighScores); this.prVisible = false; return; }; if (_arg2 == this.iMoreGames){ navigateToURL(new URLRequest(SearcherzL.strConnect2URL[SearcherzL.iLanguage])); return; }; if (_arg2 == this.iCopyright){ navigateToURL(new URLRequest(SearcherzL.strConnect1URL[SearcherzL.iLanguage])); return; }; if ((((_arg2 == this.iPlay)) || ((_arg2 == this.iEnter)))){ if (SearcherzL.iGAME.prPlayerName != ""){ (this.parent as OWindow).OnPress(null, SearcherzL.miGame); this.prVisible = false; return; }; (this.parent as OWindow).OnPress(null, SearcherzL.miStartInstructions); this.prVisible = false; return; }; if (_arg2 == this.iExit){ SearcherzL.iGAME.prPlayerName = ""; ClearData(); (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); this.prVisible = false; return; }; } } }//package RES.WINDOWS
Section 83
//OWOptions (RES.WINDOWS.OWOptions) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import flash.net.*; import flash.system.*; public class OWOptions extends OWindow { public var iGameName:OIObject; public var iFullScreen:OListBox; public var iSound:OListBox; public var iHeader:OBitmap; public var iMusic:OListBox; public var iCopyright:OButton; public var iBackground:OSprite; public var iAccept:OButton; public var iBack:OButton; public function OWOptions(){ super(SearcherzL.OWOptions, OInterface.iDefAnimators); } override public function Init():void{ super.Init(); SetElementsPos(); this.iSound.prCurrentInd = int((SearcherzL.iGAME.prSoundVolume * 10)); this.iMusic.prCurrentInd = int((SearcherzL.iGAME.prMusicVolume * 10)); this.iFullScreen.prCurrentInd = ((((OGlobal.prStage.stageWidth == Capabilities.screenResolutionX)) && ((OGlobal.prStage.stageHeight == Capabilities.screenResolutionY)))) ? 1 : 0; } private function SetElementsPos():void{ var _local1:int; var _local2:int; _local1 = (800 * OGlobal.Scale); iCopyright.x = ((400 * OGlobal.Scale) - (iCopyright.width / 2)); iCopyright.y = (((600 * OGlobal.Scale) - iCopyright.height) - (10 * OGlobal.Scale)); iGameName.x = ((_local1 / 4) - (iGameName.width / 2)); iHeader.x = (((3 * _local1) / 4) - (iHeader.width / 2)); _local2 = iBackground.y; iHeader.y = (((2 * _local2) / 3) - (iHeader.height / 2)); iGameName.y = (((2 * _local2) / 3) - (iGameName.height / 2)); iSound.x = ((_local1 / 2) - (iSound.width / 2)); iSound.y = ((iBackground.y + iBackground.height) + (iSound.height / 2)); iMusic.x = ((_local1 / 2) - (iMusic.width / 2)); iMusic.y = (iSound.y + iSound.height); iFullScreen.x = ((_local1 / 2) - (iFullScreen.width / 2)); iFullScreen.y = (iMusic.y + iMusic.height); _local2 = (iFullScreen.y + (iFullScreen.height * 2)); iBack.x = ((_local1 / 2) + (20 * OGlobal.Scale)); iBack.y = _local2; iAccept.x = (((_local1 / 2) - iAccept.width) - (20 * OGlobal.Scale)); iAccept.y = _local2; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iCopyright){ navigateToURL(new URLRequest(SearcherzL.strConnect1URL[SearcherzL.iLanguage])); return; }; if (_arg2 == this.iBack){ this.prVisible = false; (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); }; if (_arg2 == this.iAccept){ this.prVisible = false; (this.parent as OWindow).OnPress(null, SearcherzL.miMenu); SearcherzL.iGAME.prSoundVolume = (this.iSound.prCurrentInd / 10); SearcherzL.iGAME.prMusicVolume = (this.iMusic.prCurrentInd / 10); SearcherzL.iGAME.prFullScreen = (this.iFullScreen.prCurrentInd) ? true : false; fscommand("fullscreen", SearcherzL.iGAME.prFullScreen.toString()); }; } override public function Free():void{ this.iSound = null; this.iMusic = null; this.iFullScreen = null; this.iAccept = null; this.iBack = null; super.Free(); } } }//package RES.WINDOWS
Section 84
//OCGame (OCGame) package { import ENGINE.GAME.*; public class OCGame extends OGame { override public function DefaultInitLocalScores():void{ this.iScores.Clear(6); this.iScores.AddScore("Alexey", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Viki", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Alla", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Mix", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Dog", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Vovan", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Max", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Dana", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Lilu", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.AddScore("Lapa", int(((Math.random() * 5000) + 1000)), 6, 0); this.iScores.SortOn(6); } } }//package
Section 85
//Searcherz (Searcherz) package { import flash.events.*; import ENGINE.INTERFACE.*; import flash.text.*; import ENGINE.CORE.*; import RES.WINDOWS.*; public class Searcherz extends OApplication { private var iSystem:OSystem; private var b:Boolean;// = false private var iWindow:OWindow; public function Searcherz(){ b = false; super("Searcher"); SearcherzL.iGAME; OSound.PlayListAdd("music.mp3"); OSound.PlayMusic(); } override protected function OnMenuItem():void{ var _local1:int; _local1 = this.prMenuItem; switch (_local1){ case SearcherzL.miNullWindow: return; case SearcherzL.miLastWindow: if (this.iWindow){ this.iWindow.prActive = true; return; }; this.iWindow = new OWMenu(); this.prMenuItem = SearcherzL.miNullWindow; break; case SearcherzL.miMenu: this.iWindow = new OWMenu(); this.prMenuItem = SearcherzL.miNullWindow; break; case SearcherzL.miInstructions: this.iWindow = new OWInstructions(); this.prMenuItem = SearcherzL.miNullWindow; break; case SearcherzL.miStartInstructions: this.iWindow = new OWInstructions(true); this.prMenuItem = SearcherzL.miGame; break; case SearcherzL.miOptions: this.iWindow = new OWOptions(); this.prMenuItem = SearcherzL.miNullWindow; break; case SearcherzL.miHighScores: this.iWindow = new OWHighScores(); this.prMenuItem = SearcherzL.miNullWindow; break; case SearcherzL.miGame: this.iWindow = new OWGame(); this.prMenuItem = SearcherzL.miNullWindow; break; }; this.addChild(this.iWindow); } override public function Init():void{ SearcherzL.tf.x = 0; SearcherzL.tf.y = 0; SearcherzL.tf.autoSize = TextFieldAutoSize.LEFT; SearcherzL.tf.text = "START"; if (((((!(this.stage)) || ((this.stage.stageHeight == 0)))) || ((this.stage.stageWidth == 0)))){ return; }; if (SearcherzL.iLanguage == -1){ if (!GetFlashVars()){ if (!GetLangFromUrl()){ GetLangFromLocal(); }; }; }; this.InitBackground([SearcherzL.OBG01], 0); if (SearcherzL.sDebug){ this.iSystem = new OSystem(); this.addChild(this.iSystem); }; super.Init(); this.prMenuItem = SearcherzL.miMenu; OnMenuItem(); SearcherzL.iRecord.ReadLocalData(); SearcherzL.tf.x = 0; SearcherzL.tf.y = 0; SearcherzL.tf.autoSize = TextFieldAutoSize.LEFT; SearcherzL.tf.text = "START"; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg1 == null){ this.prMenuItem = _arg2; }; } private function GetLangFromUrl():Boolean{ var _local1:String; var _local2:int; var _local3:String; if (OGlobal.CheckDomain(SearcherzL.sDomain)){ _local1 = OGlobal.prStage.loaderInfo.url; _local2 = _local1.indexOf(SearcherzL.sDomain); _local2 = _local1.indexOf("/", (_local2 + 1)); _local3 = _local1.substr((_local2 + 1), 2); switch (_local3){ case "en": SearcherzL.iLanguage = 0; break; case "ru": SearcherzL.iLanguage = 1; break; case "de": SearcherzL.iLanguage = 2; break; case "fr": SearcherzL.iLanguage = 3; break; case "it": SearcherzL.iLanguage = 0; break; case "es": SearcherzL.iLanguage = 0; break; default: return (false); }; return (true); }; return (false); } override public function OnResize(_arg1:Event):void{ super.OnResize(_arg1); } override public function Free():void{ super.Free(); } private function GetFlashVars():Boolean{ var _local1:String; if (OGlobal.prStage.loaderInfo.parameters["Lang"] != null){ _local1 = OGlobal.prStage.loaderInfo.parameters["Lang"]; switch (_local1){ case "en": SearcherzL.iLanguage = 0; break; case "ru": SearcherzL.iLanguage = 1; break; case "de": SearcherzL.iLanguage = 2; break; case "fr": SearcherzL.iLanguage = 3; break; case "it": SearcherzL.iLanguage = 0; break; case "es": SearcherzL.iLanguage = 0; break; default: return (false); }; return (true); }; if (this.loaderInfo.parameters["Lang"]){ _local1 = this.loaderInfo.parameters["Lang"]; switch (_local1){ case "en": SearcherzL.iLanguage = 0; break; case "ru": SearcherzL.iLanguage = 1; break; case "de": SearcherzL.iLanguage = 2; break; case "fr": SearcherzL.iLanguage = 3; break; case "it": SearcherzL.iLanguage = 0; break; case "es": SearcherzL.iLanguage = 0; break; default: return (false); }; return (true); }; return (false); } private function GetLangFromLocal():Boolean{ var _local1:Object; var _local2:int; _local1 = SearcherzL.iGAME.Read("Lang", "curLang"); if (_local1 != null){ _local2 = int(_local1); if ((((_local2 >= 0)) && ((_local2 < SearcherzL.Languages.length)))){ SearcherzL.iLanguage = _local2; return (true); }; } else { SearcherzL.iLanguage = 0; }; return (true); } override protected function OnDeactivate(_arg1:Event):void{ SearcherzL.iRecord.SaveLocalData(); SearcherzL.iGAME.SaveCache(); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); SearcherzL.iMP.OnEnterFrame(); 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 86
//SearcherzL (SearcherzL) package { import RES.GAME.*; import ENGINE.GAME.*; import flash.text.*; import ENGINE.SMARTFOX.*; public class SearcherzL { public static const miEnterNewName:int = 4; public static const strLoadingData:Array = ["Loading data...", "Загрузка данных...", "Daten werden geladen...", "Chargement des données...", "Caricamento dati...", "Carga de datos..."]; public static const fileName:String = "ForGame2.txt"; public static const miDeletePlayer:int = 9; public static const miIntro:int = 2; public static const strYou:Array = ["You", "Вы", "Du", "Vous", "Tu", "Usted"]; public static const miDeleteScoresConfirm:int = 18; public static const strEnterName:Array = ["Your name:", "Ваше имя:", "Ihr name:", "Votre prénom:", "Il tuo nome:", "Tu nombre:"]; public static const strRandom:Array = ["Random", "Случайный", "Zufallsspieler", "Occasionnel", "Random", "Eventual"]; public static const strResultat:Array = ["results", "результатов", "Ergebnisse", "résultats", "risultati", "resultados"]; public static const strMusic:Array = ["Music Volume", "Музыка", "Musik", "Volume de musique", "Musica", "Música"]; public static const arrayInstruction:Array = [["car", "3", ["car games", "148000000"], ["car insurance", "54500000"], ["career builder", "36600000"], [2, 1, 0]], ["комп", "4", ["компьютеры", "54200000"], ["комплименты", "2630000"], ["компас", "2500000"], [1, 0, 2]], ["frei", "4", ["freiburg", "24800000"], ["freizeitparks", "1770000"], ["freimaurer", "585000"], [1, 2, 0]], ["avan", "4", ["avantages", "24300000"], ["avanquest", "2690000"], ["avantime", "1120000"], [2, 0, 1]], ["affe", "4", ["affetto", "3360000"], ["affezionato", "541000"], ["afferente", "308000"], [1, 0, 2]], ["sobr", "4", ["sobretodo", "50200000"], ["sobres", "7540000"], ["sobrenatural", "3000000"], [2, 1, 0]]]; public static const strInstructions:Array = ["Instructions", "Инструкции", "Anleitung", "Instructions", "Istruzioni", "Instrucciones"]; public static const strConnect1URL:Array = ["http://www.wellgames.com/", "http://www.wellgames.com/ru/index.html", "http://www.wellgames.com/de/index.html", "http://www.wellgames.com/fr/index.html", "http://www.wellgames.com/", "http://www.wellgames.com/"]; public static const miCommingSoon:int = 6; public static const strCopyright:Array = ["© Wellgames.com 2009"]; public static const strAccept:Array = ["Accept", "Принять", "Ok", "Accepter", "Ok", "Aceptar"]; public static const sBBannerPrefix:Array = ["bottom/", "ru/bottom/", "de/bottom/", "fr/bottom/", "bottom/", "bottom/"]; public static const strConnectionToServer:Array = ["Connecting to Server...", "Соединение с Сервером...", "Verbindung zum Server...", "Adjonction au serveur...", "Connessione al Server...", "Conexion con el Servidor..."]; public static const strBack:Array = ["Back", "Назад", "Zurück", "Retour", "Indietro", "Espalda"]; public static const sZone:String = "searcherz"; public static const strNext:Array = ["Next", "Далее", "Weiter", "En outre", "Inoltre", "Además"]; public static const sBannerID:String = "searcherz"; public static const strConnect2URL:Array = ["http://www.wellgames.com/?g=searcherz", "http://www.wellgames.com/ru/?g=searcherz", "http://www.wellgames.com/de/?g=searcherz", "http://www.wellgames.com/fr/?g=searcherz", "http://www.wellgames.com/?g=searcherz", "http://www.wellgames.com/?g=searcherz"]; public static const strHightScores:Array = ["High Scores", "Лучшие результаты", "Top-Punkte", "Compte plus haut", "Alta Scores", "Partituras alta"]; public static const miLastWindow:int = 1; public static const strGoogleLink:Array = ["http://www.google.com/search?hl=en&q=*&btnG=Google+Search", "http://www.google.ru/search?hl=ru&q=*&btnG=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA+%D0%B2+Google&lr=&aq=f&oq=", "http://www.google.de/search?hl=de&q=*&btnG=Google-Suche&meta=&aq=f&oq=", "http://www.google.fr/search?hl=fr&q=*&btnG=Recherche+Google&meta=&aq=f&oq=", "http://www.google.it/search?hl=it&q=*&btnG=Cerca+con+Google&meta=", "http://www.google.es/search?hl=es&q=*&btnG=Buscar+con+Google&meta=&aq=f&oq="]; public static const strExit:Array = ["Sign out", "Выйти", "Abmelden", "Déconnexion", "Esci", "Salir"]; private static const iWOptionsVolume:Array = [SearcherzL.strOff, ["10%"], ["20%"], ["30%"], ["40%"], ["50%"], ["60%"], ["70%"], ["80%"], ["90%"], ["100%"]]; public static const miStartInstructions:int = 25; public static const strFullScreen:Array = ["Full Screen", "Во весь экран", "Vollbild", "Plein écran", "Schermo intero", "Pantalla completa"]; public static const strGameName:Array = ["Searcherz!"]; public static const textInstructions1:Array = ["Your task is very easy but still so exciting! Each level you should find out the word or word combination most frequently asked in search engines.", "Ваша задача очень простая и в то же время такая увлекательная! На каждом уровне вам необходимо найти слово или словосочетание, наиболее часто запрашиваемое в поисковых системах.", "Ihre Aufgabe ist so einfach und zu gleicher Zeit so spannend! Sie müssen auf jedem Level ein Wort (oder eine Wortgruppe) aussuchen, das am häufigsten in Suchmaschinen eingegeben wird.", "Votre but est très simple et en même temps si captivant! Vous avez besoin de trouver le mot ou l'expression qui sont les plus demandés aux moteurs de la recherche.", "Il vostro compito è molto semplice e allo stesso tempo, quali il affascinante! Ad ogni livello, è necessario trovare una parola o una frase, сhe la più delle volte richiesti nei sistemi di ricerca.", "Vuestro objetivo está muy sencillo y al mismo tiempo tan fascinante! En cada nivel es necesarios de encontrar la palabra o la combinación de palabras,que es el más requerido en los sistemas de prospección."]; public static const textInstructions2:Array = ["If your answer coincides with the most popular one, you'll get 10 points. For the less popular variant you will be punished by 3 points. And for the medium you'll get 0.", "Если ваш ответ совпадает с самым популярным запросом, вы получаете 10 очков. За наименее популярый ответ вы теряете 5 очка, а за средний по популярности ответ вы получаете 0 очков.", "Wenn Ihre Antwort mit der häufigsten Anfrage überein stimmt, bekommen Sie 10 Punkte. Sollten Sie eine am wenigsten angefragte Wortgruppe aussuchen, verlieren Sie 5 Punkte. Und für das Mittelergebnis bekomen Sie keine Punkte.", "Si votre réponse coïncide la demande la plus demandée vous recevez 10 points. Vous perdez 5 points pour la réponse le moins populaire, vous ni recevez ni perdez les points si votre réponse est moyen de la populariré.", "Se la tua risposta coincide a uno dei più popolari richiesta, si ottengono 10 punti.. Per la risposta meno popolari, si perde 5 punti, mentre la media per la popolarità della risposta si ottiene 0 punti.", "Si su respuesta coincide con el más popular demanda, recibe 10 puntos. Pierde 5 puntos por el repuesta menos popular, por la popular media respuesta recibe 0 punto."]; public static const textInstructions3:Array = ["You could compare the statistics of your answers with other players at the bottom of the game screen. Your success will be shown in red, the results of the most prosperouse player - in blue and in green you'll see the statistics of the random player.", "В нижней части экрана вы можете сравнивать статистику ваших ответов с результатами других игроков. График ваших ответов показан красной линией, ответы игрока с наилучшим результатом - синей, а зеленым цветом показана статистика случайного игрока.", "Unten auf dem Spielfeld gibt es graphische Darstellung Ihrer Statistik und der Statistik Ihrer Gegner. Rote Linie zeigt Ihre Ergebnisse, blaue Linie zeigt den Spieler mit den besten Ergebnissen und die grüne Linie zeigt einen zufälligen Spieler.", "Au bas de l'ecran vous pouvez comparer la statistique de vos réponses avec les résultats d'autres joueurs. Votre statistique est présentée par la ligne rouge, les réponses du meilleur joueur présentées par la ligne bleue et la statistique du joueur occasionnel se présente par la ligne verte.", "Nella parte inferiore dello schermo, è possibile confrontare le statistiche delle risposte con gli altri giocatori.. Grafico le tue risposte mostrano una linea rossa, le risposte del giocatore con il miglior risultato - blu, e verde mostra le statistiche di un giocatore casuale.", "Puede comparar su estática de repuestas con los resultados de otros jugadores en lo bajo de pantalla. El gráfica de sus repuestas es mostrado por la línea roja, las respuestas del jugador con el resultado mejor está azul, y la estadística del jugador eventual es mostrada en el color verde."]; public static const strLanguages:Array = ["Languages:", "Языки:", "Sprachen:", "Langues:", "Lingue:", "Idiomas:"]; public static const strPlay:Array = ["Play", "Играть", "Spielen", "Jouer", "Giocare", "Jugar"]; public static const strOpenInGoogle:Array = ["open in Google", "открыть в Google", "in Google öffnen", "ouvrir à Google", "aprire in Google", "abrir en Google"]; public static const miNullWindow:int = 0; public static const sDomain:String = "wellgames.com"; public static const miMenu:int = 5; public static const miHighScores:int = 17; public static const strEnter:Array = ["Sign in", "Войти", "Anmelden", "Connexion", "Accedi", "Acceder"]; public static const strOptions:Array = ["Options", "Опции", "Optionen", "Options", "Opzioni", "Opciones"]; public static const strErrorLoadData:Array = ["Error loading data!", "Ошибка загрузки данных!", "Download-Fehler!", "L'erreur du chargement des données!", "Errore durante il caricamento dati!", "Error de la carga de datos!"]; public static const miSelectLanguage:int = 22; public static const iMinFontSize:int = 12; public static const strMoreGames:Array = ["More Games", "Другие игры", "Mehr Spiele", "Plus de jeux", "Più Giochi", "Más Juegos"]; public static const urlDataLoader:Array = ["http://wellgames.com/free_online/searcherz/searcherz_loader/SearcherzLData.swf"]; private static const iWOptionsOnOff:Array = [SearcherzL.strOff, SearcherzL.strOn]; public static const strSound:Array = ["Sound Volume", "Звуки", "Sounds", "Volume du son", "Suoni", "Sonidos"]; public static const miOptions:int = 10; public static const miDeleteScores:int = 19; public static const miDeletePlayerConfirm:int = 8; public static const miInstructions:int = 24; public static const arrayForGraph:Array = [["1101001122120001"], ["0100221100010010120"], ["0122110011012200111"]]; public static const strOff:Array = ["Off", "Нет", "Aus", "Non", "Off", "Si"]; public static const miChoosePlayer:int = 7; public static const sServer:String = "www.wellgames.com"; public static const sDebug:Boolean = false; public static const miEnterNameFirst:int = 3; public static const miGame:int = 21; public static const strBest:Array = ["Best", "Лучший", "Bester", "Le meilleur", "Il migliore", "El Mejor"]; public static const iRealFontSize:int = 12; public static const sTBannerPrefix:Array = ["top/", "ru/top/", "de/top/", "fr/top/", "top/", "top/"]; public static const sXTName:String = "SR"; public static const strOn:Array = ["On", "Да", "Ein", "Oui", "On", "No"]; public static var OButton_stUp:Class = SearcherzL_OButton_stUp; public static var iRecord:ORecord = new ORecord(); public static var iPhrases:Array; public static var OButton_stDown:Class = SearcherzL_OButton_stDown; public static var ORadioButton_stSelectDown:Class = SearcherzL_ORadioButton_stSelectDown; public static var OButton_stOver:Class = SearcherzL_OButton_stOver; public static var tf:TextField = new TextField(); public static var iLangCodes:Array = ["EN", "RU", "DE", "FR", "IT", "ES"]; public static var iSeed:uint = 0; public static var OWErrorLoadingStr:Array = [SearcherzS.MakeInfoText, 4, strErrorLoadData, 1, 0, 0]; public static var OListBR_stDown:Class = SearcherzL_OListBR_stDown; public static var ORadioButton_stSelectOver:Class = SearcherzL_ORadioButton_stSelectOver; public static var OFont2:Class = SearcherzL_OFont2; public static var OWGameNameColor:Array = ["120", "90", "60", "30", "0", "330", "300", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "300", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "300", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "300", "270", "240", "210", "180", "150"]; public static var OWHightScores:Array = [[SearcherzS.ColorText, 28, OWGameNameColor, strGameName, 0, null, 50, 10, "iGameName", 0, true], [SearcherzS.Header, 8, strHightScores, 1, 550, 30, "iHeader", 0, true], [SearcherzS.MakeSpriteBackground, 0, 80, "iBackground", 0, true], [SearcherzS.MakeSpriteButton, 0, strBack, 1, [OButton_stUp, OButton_stOver, OButton_stDown, OButton_stEmp], 620, 540, "iBack", 0, true], [SearcherzS.MakeTextButton, -2, strCopyright, 0, false, 330, 550, "iCopyright", 0, true]]; public static var ORadioButton_stDown:Class = SearcherzL_ORadioButton_stDown; public static var iLanguage:int = -1; public static var ORadioButton_stOver:Class = SearcherzL_ORadioButton_stOver; public static var iStr:Array; public static var ORadioButton_stSelectDisabled:Class = SearcherzL_ORadioButton_stSelectDisabled; public static var ORadioButton_stUp:Class = SearcherzL_ORadioButton_stUp; public static var OFont:Class = SearcherzL_OFont; public static var OListBR_stUp:Class = SearcherzL_OListBR_stUp; public static var OButton_stEmp:Class = SearcherzL_OButton_stEmp; public static var OListBL_stDown:Class = SearcherzL_OListBL_stDown; public static var OWLoadingDataStr:Array = [SearcherzS.MakeInfoText, 4, strLoadingData, 1, 0, 0]; public static var OWMenu:Array = [[SearcherzS.Text, 0, [""], 0, true, 0, 0, "iName", 0, false], [SearcherzS.Text, 0, ["|"], 0, false, 0, 0, "iDelimiter", 0, false], [SearcherzS.MakeUrlButton, 0, strExit, 1, 0, 0, "iExit", 0, false], [SearcherzS.MakeUrlButton, 0, strEnter, 1, 0, 0, "iEnter", 0, false], [SearcherzS.MakeSpriteTop, 0, 40, "iTopBackground", 0, true], [SearcherzS.ColorText, 78, SearcherzL.OWGameNameColor, SearcherzL.strGameName, 0, null, 200, 20, "iGameName", 0, true], [SearcherzS.MakeSpriteButton, 1, strPlay, 1, [OButton_stUp, OButton_stOver, OButton_stDown, OButton_stEmp], 350, 180, "iPlay", 0, true], [SearcherzS.Text, 0, strLanguages, 1, false, 200, 265, "iRadioButtonsLabel", 0, true], [SearcherzS.MakeRadioButton, 0, Languages[0], 300, 250, 0, "iRadioButtons", 0, true], [SearcherzS.MakeRadioButton, 0, Languages[1], 400, 250, 0, "iRadioButtons", 1, true], [SearcherzS.MakeRadioButton, 0, Languages[2], 500, 250, 0, "iRadioButtons", 2, true], [SearcherzS.MakeRadioButton, 0, Languages[3], 300, 280, 0, "iRadioButtons", 3, true], [SearcherzS.MakeRadioButton, 0, Languages[4], 400, 280, 0, "iRadioButtons", 4, true], [SearcherzS.MakeRadioButton, 0, Languages[5], 500, 280, 0, "iRadioButtons", 5, true], [SearcherzS.MakeUrlButton, 0, strOptions, 1, 180, 450, "iOptions", 0, true], [SearcherzS.MakeUrlButton, 0, strInstructions, 1, 285, 450, "iInstructions", 0, true], [SearcherzS.MakeUrlButton, 0, strHightScores, 1, 410, 450, "iHighScores", 0, true], [SearcherzS.MakeUrlButton, 0, strMoreGames, 1, 540, 450, "iMoreGames", 0, true], [SearcherzS.MakeTextButton, -2, strCopyright, 0, false, 330, 550, "iCopyright", 0, true]]; public static var OWConnectionStr:Array = [SearcherzS.MakeInfoText, 4, strConnectionToServer, 1, 0, 0]; public static var OListBL_stUp:Class = SearcherzL_OListBL_stUp; public static var ORadioButton_stDisabled:Class = SearcherzL_ORadioButton_stDisabled; public static var OWOptions:Array = [[SearcherzS.ColorText, 28, OWGameNameColor, strGameName, 0, null, 50, 10, "iGameName", 0, true], [SearcherzS.Header, 8, strOptions, 1, 550, 30, "iHeader", 0, true], [SearcherzS.MakeSpriteBackground, 0, 80, "iBackground", 0, true], [SearcherzS.ListBoxTextHSlider, 300, 40, 4, 2, 70, SearcherzL.strSound, SearcherzL.iWOptionsVolume, 0, 0, "iSound", 0, true], [SearcherzS.ListBoxTextHSlider, 300, 40, 4, 2, 70, SearcherzL.strMusic, SearcherzL.iWOptionsVolume, 0, 0, "iMusic", 0, true], [SearcherzS.ListBoxTextHSlider, 300, 40, 4, 2, 70, SearcherzL.strFullScreen, SearcherzL.iWOptionsOnOff, 0, 0, "iFullScreen", 0, true], [SearcherzS.MakeSpriteButton, 0, strAccept, 1, [OButton_stUp, OButton_stOver, OButton_stDown, OButton_stEmp], 620, 540, "iAccept", 0, true], [SearcherzS.MakeSpriteButton, 0, strBack, 1, [OButton_stUp, OButton_stOver, OButton_stDown, OButton_stEmp], 620, 540, "iBack", 0, true], [SearcherzS.MakeTextButton, -2, strCopyright, 0, false, 330, 550, "iCopyright", 0, true]]; public static var OWInstructions:Array = [[SearcherzS.ColorText, 28, OWGameNameColor, strGameName, 0, null, 50, 10, "iGameName", 0, true], [SearcherzS.Header, 8, strInstructions, 1, 550, 30, "iHeader", 0, false], [SearcherzS.MakeSpriteBackground, 0, 80, "iBackground", 0, true], [SearcherzS.MakeAlignText, 1, textInstructions1, 1, false, TextFormatAlign.CENTER, 700, 0, 0, "iText", 0, false], [SearcherzS.MakeAlignText, 1, textInstructions2, 1, false, TextFormatAlign.CENTER, 700, 0, 0, "iText", 1, false], [SearcherzS.MakeAlignText, 1, textInstructions3, 1, false, TextFormatAlign.CENTER, 700, 0, 0, "iText", 2, false], [SearcherzS.MakeGraphPole, 730, 140, "black", 0, 0, "iGraph", 0, false], [SearcherzS.MakeSpriteButton, 0, strBack, 1, [OButton_stUp, OButton_stOver, OButton_stDown, OButton_stEmp], 620, 540, "iBack", 0, true], [SearcherzS.MakeTextButton, -2, strCopyright, 0, false, 330, 550, "iCopyright", 0, true], [SearcherzS.MakeLoginForm, 192, 150, 13, strEnterName, 1, strEnter, 1, 600, 150, "iLoginForm", 0, false]]; public static var iMP:OMultiplayer = new OMultiplayer(sDebug); public static var OBG01:Class = SearcherzL_OBG01; public static var ORadioButton_stSelectUp:Class = SearcherzL_ORadioButton_stSelectUp; public static var iGAME:OGame = new OCGame(); public static var iIndex:Array; public static var OWGame:Array = [[SearcherzS.ColorText, 28, OWGameNameColor, strGameName, 0, null, 50, 10, "iGameName", 0, false], [SearcherzS.MakeSpriteBackground, 0, 80, "iBackground", 0, false], [SearcherzS.MakeSpriteButton, 0, strBack, 1, [OButton_stUp, OButton_stOver, OButton_stDown, OButton_stEmp], 0, 0, "iBack", 0, false], [SearcherzS.MakeSpriteButton, 0, strNext, 1, [OButton_stUp, OButton_stOver, OButton_stDown, OButton_stEmp], 0, 0, "iNext", 0, false], [SearcherzS.MakeTextButton, -2, strCopyright, 0, false, 330, 550, "iCopyright", 0, false], [SearcherzS.SearchBar, 2, 7, 1, "search", 350, 30, "iSearchBar", 0, false], [SearcherzS.MakeGraphPole, 730, 140, "black", 0, 250, "iGraph", 0, false]]; public static var Languages:Array = ["English", "Русский", "Deutsch", "Français", "Italiano", "Español"]; } }//package
Section 87
//SearcherzL_OBG01 (SearcherzL_OBG01) package { import mx.core.*; public class SearcherzL_OBG01 extends SpriteAsset { } }//package
Section 88
//SearcherzL_OButton_stDown (SearcherzL_OButton_stDown) package { import mx.core.*; public class SearcherzL_OButton_stDown extends SpriteAsset { } }//package
Section 89
//SearcherzL_OButton_stEmp (SearcherzL_OButton_stEmp) package { import mx.core.*; public class SearcherzL_OButton_stEmp extends SpriteAsset { } }//package
Section 90
//SearcherzL_OButton_stOver (SearcherzL_OButton_stOver) package { import mx.core.*; public class SearcherzL_OButton_stOver extends SpriteAsset { } }//package
Section 91
//SearcherzL_OButton_stUp (SearcherzL_OButton_stUp) package { import mx.core.*; public class SearcherzL_OButton_stUp extends SpriteAsset { } }//package
Section 92
//SearcherzL_OFont (SearcherzL_OFont) package { import mx.core.*; public class SearcherzL_OFont extends SpriteAsset { } }//package
Section 93
//SearcherzL_OFont2 (SearcherzL_OFont2) package { import mx.core.*; public class SearcherzL_OFont2 extends SpriteAsset { } }//package
Section 94
//SearcherzL_OListBL_stDown (SearcherzL_OListBL_stDown) package { import mx.core.*; public class SearcherzL_OListBL_stDown extends SpriteAsset { } }//package
Section 95
//SearcherzL_OListBL_stUp (SearcherzL_OListBL_stUp) package { import mx.core.*; public class SearcherzL_OListBL_stUp extends SpriteAsset { } }//package
Section 96
//SearcherzL_OListBR_stDown (SearcherzL_OListBR_stDown) package { import mx.core.*; public class SearcherzL_OListBR_stDown extends SpriteAsset { } }//package
Section 97
//SearcherzL_OListBR_stUp (SearcherzL_OListBR_stUp) package { import mx.core.*; public class SearcherzL_OListBR_stUp extends SpriteAsset { } }//package
Section 98
//SearcherzL_ORadioButton_stDisabled (SearcherzL_ORadioButton_stDisabled) package { import mx.core.*; public class SearcherzL_ORadioButton_stDisabled extends SpriteAsset { } }//package
Section 99
//SearcherzL_ORadioButton_stDown (SearcherzL_ORadioButton_stDown) package { import mx.core.*; public class SearcherzL_ORadioButton_stDown extends SpriteAsset { } }//package
Section 100
//SearcherzL_ORadioButton_stOver (SearcherzL_ORadioButton_stOver) package { import mx.core.*; public class SearcherzL_ORadioButton_stOver extends SpriteAsset { } }//package
Section 101
//SearcherzL_ORadioButton_stSelectDisabled (SearcherzL_ORadioButton_stSelectDisabled) package { import mx.core.*; public class SearcherzL_ORadioButton_stSelectDisabled extends SpriteAsset { } }//package
Section 102
//SearcherzL_ORadioButton_stSelectDown (SearcherzL_ORadioButton_stSelectDown) package { import mx.core.*; public class SearcherzL_ORadioButton_stSelectDown extends SpriteAsset { } }//package
Section 103
//SearcherzL_ORadioButton_stSelectOver (SearcherzL_ORadioButton_stSelectOver) package { import mx.core.*; public class SearcherzL_ORadioButton_stSelectOver extends SpriteAsset { } }//package
Section 104
//SearcherzL_ORadioButton_stSelectUp (SearcherzL_ORadioButton_stSelectUp) package { import mx.core.*; public class SearcherzL_ORadioButton_stSelectUp extends SpriteAsset { } }//package
Section 105
//SearcherzL_ORadioButton_stUp (SearcherzL_ORadioButton_stUp) package { import mx.core.*; public class SearcherzL_ORadioButton_stUp extends SpriteAsset { } }//package
Section 106
//SearcherzS (SearcherzS) package { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ELEMENTS.*; import RES.GAME.*; import ENGINE.DISPLAY.EFFECTS.*; import flash.text.*; import ENGINE.CORE.*; import ENGINE.SKIN.*; public class SearcherzS { public static var iRegistered:Boolean = SearcherzS.Register(); public static function MakeSpriteBackground(_arg1:Array):OSprite{ var _local2:OSprite; var _local3:Array; var _local4:OSprite; _local2 = new OSprite(); _local2.graphics.beginFill(15792121); _local2.graphics.drawRect(8, 0, 784, 28); _local2.graphics.endFill(); _local2.graphics.beginFill(7049434); _local2.graphics.drawRect(8, 0, 784, 1); _local2.graphics.endFill(); _local3 = [null, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _local2], OGlobal.Scale, 0, 0, 0]], 0, 0, null, 0, true]; _local4 = OSprite.Make(_local3); _local4.Pos(OGlobal.ScaleFloor(_arg1[1]), OGlobal.ScaleFloor(_arg1[2])); return (_local4); } private static function Register():Boolean{ OEffects.RegisterEffect("INC", new OEffectInk()); OEffects.RegisterColor("INC", "aLink", {iCH:240, iCS:1, iCB:0.8, iCA:1}); OEffects.RegisterColor("INC", "aActive", {iCH:0, iCS:1, iCB:1, iCA:1}); OEffects.RegisterColor("INC", "aVisible", {iCH:271, iCS:0.81, iCB:0.55, iCA:1}); OEffects.RegisterColor("INC", "header", {iCH:220, iCS:0.75, iCB:0.8, iCA:1}); OEffects.RegisterColor("INC", "black", {iCH:0, iCS:0, iCB:0, iCA:1}); OEffects.RegisterColor("INC", "score", {iCH:240, iCS:0.42, iCB:0.8, iCA:1}); OEffects.RegisterColor("INC", "grey", {iCH:0, iCS:0, iCB:0.8, iCA:1}); OEffects.RegisterColor("INC", "search", {iCH:209, iCS:0.31, iCB:0.73, iCA:1}); OEffects.RegisterColor("INC", "red", {iCH:0, iCS:0.75, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "red1", {iCH:30, iCS:0.75, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "yellow", {iCH:60, iCS:0.9, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "yellow1", {iCH:90, iCS:0.9, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "green", {iCH:120, iCS:0.75, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "green1", {iCH:150, iCS:0.75, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "aqua", {iCH:180, iCS:0.6, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "aqua1", {iCH:210, iCS:0.6, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "blue", {iCH:240, iCS:0.45, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "blue1", {iCH:270, iCS:0.45, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "magenta", {iCH:300, iCS:0.6, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "magenta1", {iCH:330, iCS:0.6, iCB:0.9, iCA:0.9}); OEffects.RegisterColor("INC", "white", {iCH:0, iCS:0, iCB:0.75, iCA:0.9}); OEffects.RegisterColor("INC", "white1", {iCH:220, iCS:0, iCB:1, iCA:1}); OEffects.RegisterFilter("INC", "bpanel", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "text 30", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "text 40", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "text 50", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "text 60", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "text 90", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "spanel", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "border", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "border1", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "bpanel ns", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "spanel ns", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); OEffects.RegisterFilter("INC", "border ns", {iBorder:1, iAngle:45, iFSD:0, iFSB:0, iFB:0}); return (true); } public static function SmallCellFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], _arg1[7], _arg1[8], "INC", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function MakeSpriteButton(_arg1:Array):OButton{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:Number; var _local7:Array; var _local8:Boolean; var _local9:OButtonSimple; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2][((_arg1[3] == 0)) ? 0 : SearcherzL.iLanguage]; _local3.autoSize = TextFieldAutoSize.LEFT; _local3.mouseEnabled = false; _local4 = new TextFormat(); _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = (_local2 / (_arg1[1] + SearcherzL.iRealFontSize)); _local7 = [[OSprite.Make, [[ODisplay.SpriteRoundRect, _local5.width, _local5.height, 0]], 0, 0, "iHit", 0, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _arg1[4][0]], _local6, 0, 0, 0]], 0, 0, "SpriteState", 0, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _arg1[4][1]], _local6, 0, 0, 0]], 0, 0, "SpriteState", 1, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _arg1[4][2]], _local6, 0, 0, 0]], 0, 0, "SpriteState", 2, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _arg1[4][3]], _local6, 0, 0, 0]], 0, 0, "SpriteState", 3, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, 0, 0, "iText", 0, false]]; _local8 = false; if (OGlobal.Scale != 1){ OGlobal.ClearScale(); _local8 = true; }; _local9 = new OButtonSimple(_local7, OInterface.iDefAnimators); if (_local8){ OGlobal.RestoreScale(); }; _local9.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local9); } public static function Text(_arg1:Array):OBitmap{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:OBitmap; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2][((_arg1[3] == 0)) ? 0 : SearcherzL.iLanguage]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.font = "arial"; _local4.bold = _arg1[4]; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); OGlobal.ClearScale(); _local6 = ODisplay.OBitmapMake([null, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, 0, 0, null, 0, true]); OGlobal.RestoreScale(); _local6.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local6); } public static function MakeScores(_arg1:Array):OIObject{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:int; var _local7:Array; var _local8:OIObject; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = "["; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.font = "arial"; _local4.size = (_local2 + 2); _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = _local5.width; OGlobal.ClearScale(); _local7 = []; _local7.push([ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, 0, 0, null, 0, true]); _local3 = new TextField(); _local3.text = _arg1[2]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local7.push([ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "score", "text 30", 0, _local6, 1, null, 0, true]); _local6 = (_local6 + _local5.width); _local3 = new TextField(); _local3.text = "]"; _local3.autoSize = TextFieldAutoSize.LEFT; _local4.size = (_local2 + 2); _local4.underline = false; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local7.push([ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, _local6, 0, null, 0, true]); _local8 = new ScoreOIObject(_local7, OInterface.iDefAnimators); OGlobal.RestoreScale(); _local8.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); return (_local8); } public static function ColorText(_arg1:Array):OIObject{ var _local2:int; var _local3:Number; var _local4:String; var _local5:Sprite; var _local6:TextField; var _local7:TextFormat; var _local8:Array; var _local9:int; var _local10:int; var _local11:OIObject; var _local12:String; var _local13:Rectangle; _local2 = SearcherzL.iRealFontSize; _local2 = (_local2 + _arg1[1]); _local3 = Math.round((1 + (_local2 / 70))); _local4 = ("text " + String(Math.max(30, Math.min((Math.round((_local2 / 10)) * 10), 90)))); _local5 = ((SearcherzL.OFont is Sprite)) ? (SearcherzL.OFont as Sprite) : new ((SearcherzL.OFont as Class)); if (!(_local5.getChildAt(0) is TextField)){ return (null); }; _local6 = (_local5.getChildAt(0) as TextField); _local6.autoSize = TextFieldAutoSize.CENTER; _local6.text = _arg1[3][((_arg1[4] == 0)) ? 0 : SearcherzL.iLanguage]; _local7 = _local6.defaultTextFormat; _local7.size = _local2; _local7.letterSpacing = _local3; _local6.setTextFormat(_local7); _local8 = new Array(); _local9 = 0; _local10 = 0; while (_local10 < _local6.length) { _local12 = _arg1[3][((_arg1[4] == 0)) ? 0 : SearcherzL.iLanguage].substr(_local10, 1); if (_local12 == " "){ } else { _local13 = _local6.getCharBoundaries(_local10); var _temp1 = _local9; _local9 = (_local9 + 1); _local8.push([ODisplay.OBitmapMake, [ODisplay.SpriteText, SearcherzL.OFont, _local2, _local3, _local12], 1, "INC", _arg1[2][(_temp1 % _arg1[2].length)], _local4, 0, _local13.x, _local13.y, null, 0, true]); }; _local10++; }; _local11 = new OIObject(_local8, _arg1[5]); _local11.Pos(OGlobal.ScaleFloor(_arg1[6]), OGlobal.ScaleFloor(_arg1[7])); return (_local11); } public static function MakeUrlButton(_arg1:Array):OButton{ var _local2:StyleSheet; var _local3:int; var _local4:Object; var _local5:TextField; var _local6:OSprite; var _local7:Array; var _local8:OButtonUrl; _local2 = new StyleSheet(); _local3 = (SearcherzL.iRealFontSize + _arg1[1]); _local4 = new Object(); _local4.fontFamily = "arial,sans-serif"; _local4.fontSize = _local3; _local4.textDecoration = "underline"; _local4.color = "0x000000"; _local2.setStyle("UrlButtonStyle", _local4); _local5 = new TextField(); _local5.mouseEnabled = false; _local5.autoSize = TextFieldAutoSize.LEFT; _local5.styleSheet = _local2; _local5.htmlText = (("<UrlButtonStyle>" + _arg1[2][((_arg1[3] == 0)) ? 0 : SearcherzL.iLanguage].toString()) + "<UrlButtonStyle>"); _local6 = new OSprite(); _local6.addChild(_local5); OGlobal.ClearScale(); _local7 = [[OSprite.Make, [[ODisplay.SpriteRoundRect, _local6.width, _local6.height, 0]], 0, 0, "iHit", 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local6], 1, "INC", "aLink", "text 30", 0, 0, 0, "sprBeforePress", 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local6], 1, "INC", "aActive", "text 30", 0, 0, 0, "sprCurrentPress", 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local6], 1, "INC", "aVisible", "text 30", 0, 0, 0, "sprAfterPress", 0, false]]; _local8 = new OButtonUrl(_local7, OInterface.iDefAnimators); OGlobal.RestoreScale(); _local8.Pos(OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])); return (_local8); } public static function CustomSmallCellFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], _arg1[7], _arg1[8], "INC", _arg1[3], "border", _arg1[9], _arg1[4], "spanel ns", _arg1[10], OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function ListBoxTextHSlider(_arg1:Array):OListBox{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:int; var _local7:int; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:OListBox; _local2 = (SearcherzL.iRealFontSize + _arg1[3]); _local3 = new TextField(); _local3.text = _arg1[6][((_arg1[6].length)>1) ? SearcherzL.iLanguage : 0]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.color = 0; _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = 15; _local7 = 14; _local8 = [[ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, 0, ((_arg1[2] - _local5.height) * 0.5), null, 0, true], [SearcherzS.MakeSpriteButton, 0, [""], 0, [SearcherzL.OListBL_stUp, SearcherzL.OListBL_stUp, SearcherzL.OListBL_stDown, SearcherzL.OListBL_stUp], ((_arg1[1] - _arg1[5]) - (2 * _local7)), ((_arg1[2] - _local6) * 0.5), "iUp", 0, false], [SearcherzS.MakeSpriteButton, 0, [""], 0, [SearcherzL.OListBR_stUp, SearcherzL.OListBR_stUp, SearcherzL.OListBR_stDown, SearcherzL.OListBR_stUp], (_arg1[1] - _local7), ((_arg1[2] - _local6) * 0.5), "iDown", 0, false]]; _local9 = [SearcherzS.ListBoxTextElement, _arg1[5], _arg1[2], _arg1[4], "w", 0, 0]; _local10 = [[(((_arg1[1] - _arg1[5]) - _local7) / OGlobal.Scale), 0]]; OGlobal.ClearScale(); _local11 = new OListBox(_local8, _local9, SearcherzS.ListBoxTextElementP, _local10, null, OInterface.iDefAnimators); OGlobal.RestoreScale(); _local11.iUp.prAnimatorParams = OInterface.iDefAnimators; _local11.iDown.prAnimatorParams = OInterface.iDefAnimators; _local11.prSelection = false; _local11.prCycling = true; _local11.prLBParams = _arg1[7]; _local11.Pos(OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])); return (_local11); } public static function MakeLoginForm(_arg1:Array):OIObject{ var _local2:OSprite; var _local3:Array; var _local4:OIObject; _local2 = new OSprite(); _local2.graphics.lineStyle(1, 12835327); _local2.graphics.drawRect(0, 0, _arg1[1], _arg1[2]); _local2.graphics.lineStyle(0, 15265530); _local2.graphics.beginFill(15265530); _local2.graphics.drawRect(5, 5, (_arg1[1] - 10), (_arg1[2] - 10)); _local2.graphics.endFill(); _local3 = [[OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _local2], OGlobal.Scale, 0, 0, 0]], 0, 0, "iBackground", 0, true], [SearcherzS.Text, 4, _arg1[4], _arg1[5], false, 0, 0, "iLabelName", 0, true], [SearcherzS.InputText, Math.round((_arg1[3] * OGlobal.Scale)), 1, 0, 0, 0, "iInput", 0, true], [SearcherzS.MakeSpriteButton, 0, _arg1[6], _arg1[7], [SearcherzL.OButton_stUp, SearcherzL.OButton_stOver, SearcherzL.OButton_stDown, SearcherzL.OButton_stEmp], 0, 0, "iPlay", 0, true]]; _local4 = new OLoginForm(_local3, OInterface.iDefAnimators); _local4.Pos(OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])); return (_local4); } public static function MakeAlignText(_arg1:Array):OIObject{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:Array; var _local7:OIObject; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2][((_arg1[3] == 0)) ? 0 : SearcherzL.iLanguage]; _local3.autoSize = TextFieldAutoSize.LEFT; _local3.multiline = true; _local3.wordWrap = true; _local3.width = (_arg1[6] * OGlobal.Scale); _local4 = new TextFormat(); _local4.font = "arial"; _local4.bold = _arg1[4]; _local4.size = _local2; _local4.align = _arg1[5]; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); OGlobal.ClearScale(); _local6 = [[ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, 0, 0, null, 0, true]]; _local7 = new OIObject(_local6, OInterface.iDefAnimators); OGlobal.RestoreScale(); _local7.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local7); } public static function MakeRadioButton(_arg1:Array):OButton{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:Number; var _local7:Array; var _local8:ORadioButton; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2]; _local3.autoSize = TextFieldAutoSize.LEFT; _local3.mouseEnabled = false; _local4 = new TextFormat(); _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); OGlobal.ClearScale(); _local6 = (_local2 / (_arg1[1] + SearcherzL.iRealFontSize)); _local7 = [[OSprite.Make, [[ODisplay.SpriteRoundRect, _local5.width, _local5.height, 0]], (20 * _local6), -3, "iHit", 0, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stDisabled], _local6, 0, 0, 0]], 0, 0, "SpriteState", 0, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stUp], _local6, 0, 0, 0]], 0, 0, "SpriteState", 1, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stOver], _local6, 0, 0, 0]], 0, 0, "SpriteState", 2, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stDown], _local6, 0, 0, 0]], 0, 0, "SpriteState", 3, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stSelectUp], _local6, 0, 0, 0]], 0, 0, "SpriteState", 4, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stSelectOver], _local6, 0, 0, 0]], 0, 0, "SpriteState", 5, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stSelectDown], _local6, 0, 0, 0]], 0, 0, "SpriteState", 6, false], [OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, SearcherzL.ORadioButton_stSelectDisabled], _local6, 0, 0, 0]], 0, 0, "SpriteState", 7, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, (20 * _local6), (-3 + _arg1[5]), "iText", 0, true]]; _local8 = new ORadioButton(_local7, OInterface.iDefAnimators); OGlobal.RestoreScale(); _local8.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); return (_local8); } public static function MakeSpriteTop(_arg1:Array):OSprite{ var _local2:OSprite; var _local3:Array; var _local4:OSprite; _local2 = new OSprite(); _local2.graphics.beginFill(13228017); _local2.graphics.drawRect(0, 0, 800, 1); _local2.graphics.endFill(); _local3 = [null, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _local2], OGlobal.Scale, 0, 0, 0]], 0, 0, null, 0, true]; _local4 = OSprite.Make(_local3); _local4.Pos(OGlobal.ScaleFloor(_arg1[1]), OGlobal.ScaleFloor(_arg1[2])); return (_local4); } public static function SearchBar(_arg1:Array):OBitmap{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OBitmap; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = "a"; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = ODisplay.OBitmapRoundFrame([null, ((_local3.width * _arg1[2]) / OGlobal.Scale), ((_local3.height * _arg1[3]) / OGlobal.Scale), 3, 1, "INC", _arg1[4], "border", 1, "white1", "spanel ns", 1, 0, 0]); _local5.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local5); } public static function Header(_arg1:Array):OBitmap{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:OBitmap; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2][((_arg1[3] == 0)) ? 0 : SearcherzL.iLanguage]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.font = "arial"; _local4.size = _local2; _local4.letterSpacing = 1; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); OGlobal.ClearScale(); _local6 = ODisplay.OBitmapMake([null, [ODisplay.SpriteLib, _local5], 1, "INC", "header", "text 30", 0, 0, 0, null, 0, true]); OGlobal.RestoreScale(); _local6.Pos(OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])); return (_local6); } public static function ListBoxTextElementP(_arg1:Array, _arg2:Array):void{ _arg1[4] = _arg2[((_arg2.length)>1) ? SearcherzL.iLanguage : 0]; } public static function MakeInfoText(_arg1:Array):OIObject{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:Array; var _local7:OIObject; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2][((_arg1[3])==1) ? SearcherzL.iLanguage : 0]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.color = 0; _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = [[ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "aLink", "text 30", 0, 0, 0, null, 0, true]]; OGlobal.ClearScale(); _local7 = new OIObject(_local6, OInterface.iDefSlowAnimators); OGlobal.RestoreScale(); _local7.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); return (_local7); } public static function ListBoxTextElement(_arg1:Array):OListBoxElement{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:Boolean; var _local7:Array; var _local8:OListBoxElement; _local2 = (SearcherzL.iRealFontSize + _arg1[3]); _local3 = new TextField(); _local3.text = _arg1[4]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.color = 0; _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = false; if (OGlobal.Scale != 1){ OGlobal.ClearScale(); _local6 = true; }; _local7 = [[ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, ((_arg1[1] - _local5.width) / 2), ((_arg1[2] - _local5.height) / 2), null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (12 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local8 = new OListBoxElement(_local7); if (_local6){ OGlobal.RestoreScale(); _local6 = false; }; _local8.Pos(_arg1[5], _arg1[6]); return (_local8); } public static function MakeGameButton(_arg1:Array):OButton{ var _local2:StyleSheet; var _local3:int; var _local4:Object; var _local5:TextField; var _local6:String; var _local7:OSprite; var _local8:Array; var _local9:OGameButton; _local2 = new StyleSheet(); _local3 = (SearcherzL.iRealFontSize + _arg1[1]); _local4 = new Object(); _local4.fontFamily = "arial,sans-serif"; _local4.fontSize = _local3; _local4.textDecoration = "underline"; _local4.color = "0x000000"; _local2.setStyle("UrlButtonStyle", _local4); _local5 = new TextField(); _local5.mouseEnabled = false; _local5.autoSize = TextFieldAutoSize.LEFT; _local5.styleSheet = _local2; _local6 = _arg1[2].toString(); _local5.htmlText = (((("<UrlButtonStyle><b>" + _local6.substr(0, _arg1[5])) + "</b>") + _local6.substr(_arg1[5], (_local6.length - _arg1[5]))) + "</UrlButtonStyle>"); _local7 = new OSprite(); _local7.addChild(_local5); OGlobal.ClearScale(); _local8 = [[OSprite.Make, [[ODisplay.SpriteRoundRect, _local7.width, _local7.height, 0]], 0, 0, "iHit", 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local7], 1, "INC", "aLink", "text 30", 0, 0, 0, "sprNotPress", 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local7], 1, "INC", "aActive", "text 30", 0, 0, 0, "sprPress", 0, false]]; _local9 = new OGameButton(_local8, OInterface.iDefAnimators); _local9.Buttons = _arg1[6]; OGlobal.RestoreScale(); _local9.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); return (_local9); } public static function MakeTextButton(_arg1:Array):OButton{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:Array; var _local7:OButton; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2][((_arg1[3] == 0)) ? 0 : SearcherzL.iLanguage]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.font = "arial"; _local4.bold = _arg1[4]; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = [[OSprite.Make, [[ODisplay.SpriteRoundRect, _local5.width, _local5.height, 0]], 0, 0, "iHit", 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, 0, 0, null, 0, true]]; OGlobal.ClearScale(); _local7 = new OButton(_local6, OInterface.iDefAnimators); OGlobal.RestoreScale(); _local7.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local7); } public static function InputText(_arg1:Array):OInput{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:Array; var _local7:OInput; _local2 = (SearcherzL.iRealFontSize + _arg1[3]); _local3 = new TextField(); _local3.text = "j"; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = [[SearcherzS.SearchBar, (_arg1[3] + 3), _arg1[1], _arg1[2], "search", 0, 0, null, 0, true], [OInterface.OInputTextFieldMake, ((_arg1[1] * _local3.width) / OGlobal.Scale), ((_arg1[2] * (_local3.height + 5)) / OGlobal.Scale), SearcherzL.OFont2, ((_local2 + 1) / OGlobal.Scale), 1, false, [0, 0, 0], "", _arg1[1], (3 / OGlobal.Scale), (1 / OGlobal.Scale), "iText", 0, true]]; _local7 = new OInput(_local6, OInterface.iDefAnimators); _local7.x = _arg1[4]; _local7.y = _arg1[5]; _local7.iText.embedFonts = false; return (_local7); } public static function MakeGraphPole(_arg1:Array):OIObject{ var _local2:int; var _local3:int; var _local4:int; var _local5:Array; var _local6:OIObject; _local3 = int((_arg1[1] / 10)); _local4 = int((_arg1[2] / 20)); _local5 = [[ODisplay.OBitmapRoundBorder, (_arg1[1] + 2), (_arg1[2] + 2), 3, 1, "INC", _arg1[3], "border", 1, -1, -1, null, 0, true]]; _local2 = 1; while (_local2 < 10) { _local5.push([ODisplay.OBitmapRoundRect, 1, _arg1[2], 0, "INC", "grey", "border", 1, (_local2 * _local3), 0, null, 0, true]); _local5.push([ODisplay.OBitmapRoundRect, 1, 6, 0, "INC", _arg1[3], "border", 1, (_local2 * _local3), (_arg1[2] - 6), null, 0, true]); _local5.push([ODisplay.OBitmapRoundRect, 1, 6, 0, "INC", _arg1[3], "border", 1, (_local2 * _local3), 0, null, 0, true]); _local2++; }; _local2 = 1; while (_local2 < 20) { if ((_local2 % 5) == 0){ _local5.push([ODisplay.OBitmapRoundRect, _arg1[1], 1, 0, "INC", "grey", "border", 1, 0, (_local2 * _local4), null, 0, true]); _local5.push([ODisplay.OBitmapRoundRect, 6, 1, 0, "INC", _arg1[3], "border", 1, 0, (_local2 * _local4), null, 0, true]); _local5.push([ODisplay.OBitmapRoundRect, 6, 1, 0, "INC", _arg1[3], "border", 1, (_arg1[1] - 6), (_local2 * _local4), null, 0, true]); } else { _local5.push([ODisplay.OBitmapRoundRect, 4, 1, 0, "INC", _arg1[3], "border", 1, 0, (_local2 * _local4), null, 0, true]); _local5.push([ODisplay.OBitmapRoundRect, 4, 1, 0, "INC", _arg1[3], "border", 1, (_arg1[1] - 4), (_local2 * _local4), null, 0, true]); }; _local2++; }; _local5.push(_local3, (_local4 * 5), _arg1[2], _arg1[1]); _local6 = new OGraph(_local5, OInterface.iDefAnimators); _local6.Pos(OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])); return (_local6); } public static function MakeMessageBox(_arg1:Array):OIObject{ var _local2:int; var _local3:TextField; var _local4:TextFormat; var _local5:OSprite; var _local6:OSprite; var _local7:Array; var _local8:OIObject; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = new TextField(); _local3.text = _arg1[2][((_arg1[2].length)>1) ? SearcherzL.iLanguage : 0]; _local3.autoSize = TextFieldAutoSize.LEFT; _local4 = new TextFormat(); _local4.color = 0; _local4.font = "arial"; _local4.size = _local2; _local3.setTextFormat(_local4); _local5 = new OSprite(); _local5.addChild(_local3); _local6 = new OSprite(); _local6.graphics.beginFill(16777185); _local6.graphics.lineStyle(1, 0); _local6.graphics.drawRect(0, 0, (_local3.width + 6), (_local3.height + 2)); _local6.graphics.endFill(); _local7 = [[OSprite.Make, [[ODisplay.SpriteScale, [ODisplay.SpriteLib, _local6], OGlobal.Scale, 0, 0, 0]], 0, 0, null, 0, true], [ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local5], 1, "INC", "black", "text 30", 0, 3, 1, null, 0, true]]; OGlobal.ClearScale(); _local8 = new OIObject(_local7, OInterface.iDefSlowAnimators); OGlobal.RestoreScale(); _local8.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); return (_local8); } public static function SmallCellRect(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundRect([null, _arg1[1], _arg1[2], _arg1[7], "INC", _arg1[3], "spanel ns", _arg1[4], OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function MakeTextForSearchBar(_arg1:Array):OIObject{ var _local2:int; var _local3:String; var _local4:TextField; var _local5:TextFormat; var _local6:Sprite; var _local7:TextField; var _local8:OSprite; var _local9:Array; var _local10:int; var _local11:int; var _local12:OIObject; _local2 = (SearcherzL.iRealFontSize + _arg1[1]); _local3 = _arg1[2]; _local4 = new TextField(); _local4.text = ""; _local4.autoSize = TextFieldAutoSize.LEFT; _local5 = new TextFormat(); _local5.font = "arial"; _local5.size = _local2; _local6 = ((SearcherzL.OFont2 is Sprite)) ? (SearcherzL.OFont2 as Sprite) : new ((SearcherzL.OFont2 as Class)); if (!(_local6.getChildAt(0) is TextField)){ return (null); }; _local7 = (_local6.getChildAt(0) as TextField); _local9 = new Array(); _local10 = 0; _local11 = 0; while (_local11 < _local3.length) { _local4 = new TextField(); _local4.autoSize = TextFieldAutoSize.LEFT; _local4.text = _local3.substr(_local11, 1); _local4.setTextFormat(_local5); _local8 = new OSprite(); _local8.addChild(_local4); _local9.push([ODisplay.OBitmapMake, [ODisplay.SpriteLib, _local8], 1, "INC", "black", "text 30", 0, _local10, 0, "iTextSearch", _local11, false]); _local10 = (_local10 + _local4.getCharBoundaries(0).width); _local11++; }; OGlobal.ClearScale(); _local12 = new OSearchBarText(_local9, OInterface.iDefAnimators); OGlobal.RestoreScale(); _local12.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); return (_local12); } } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClipUses:1Used by:3
Symbol 3 MovieClip {SearcherzL_OButton_stOver} [OButton_stOver]Uses:2
Symbol 4 GraphicUsed by:7 32
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:7 14 30 35
Symbol 7 MovieClipUses:4 6Used by:8
Symbol 8 MovieClip {SearcherzL_ORadioButton_stSelectDown} [stSelectDown]Uses:7
Symbol 9 GraphicUsed by:12
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClipUses:10Used by:12 44 51 52
Symbol 12 MovieClip {SearcherzL_OListBL_stDown} [OListBL_stDown]Uses:9 11
Symbol 13 GraphicUsed by:14 45
Symbol 14 MovieClipUses:13 6Used by:15
Symbol 15 MovieClip {SearcherzL_ORadioButton_stSelectDisabled} [stSelectDisabled]Uses:14
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:18
Symbol 18 MovieClip {SearcherzL_ORadioButton_stUp} [stUp]Uses:17
Symbol 19 FontUsed by:20
Symbol 20 EditableTextUses:19Used by:21
Symbol 21 MovieClip {SearcherzL_OFont} [OFont]Uses:20
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:24
Symbol 24 MovieClip {SearcherzL_OButton_stDown} [OButton_stDown]Uses:23
Symbol 25 GraphicUsed by:26 30
Symbol 26 MovieClipUses:25Used by:27
Symbol 27 MovieClip {SearcherzL_ORadioButton_stOver} [stOver]Uses:26
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClip {SearcherzL_OBG01} [OBG01]Uses:28
Symbol 30 MovieClipUses:25 6Used by:31
Symbol 31 MovieClip {SearcherzL_ORadioButton_stSelectOver} [stSelectOver]Uses:30
Symbol 32 MovieClipUses:4Used by:33
Symbol 33 MovieClip {SearcherzL_ORadioButton_stDown} [stDown]Uses:32
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34 6Used by:36
Symbol 36 MovieClip {SearcherzL_ORadioButton_stSelectUp} [stSelectUp]Uses:35
Symbol 37 FontUsed by:38
Symbol 38 EditableTextUses:37Used by:39
Symbol 39 MovieClip {SearcherzL_OFont2} [OFont2]Uses:38
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClipUses:40Used by:42
Symbol 42 MovieClip {SearcherzL_OButton_stUp} [OButton_stUp]Uses:41
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClip {SearcherzL_OListBR_stDown} [OListBR_stDown]Uses:43 11
Symbol 45 MovieClipUses:13Used by:46
Symbol 46 MovieClip {SearcherzL_ORadioButton_stDisabled} [stDisabled]Uses:45
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClipUses:47Used by:49
Symbol 49 MovieClip {SearcherzL_OButton_stEmp} [OButton_stEmp]Uses:48
Symbol 50 GraphicUsed by:51 52
Symbol 51 MovieClip {SearcherzL_OListBL_stUp} [OListBL_stUp]Uses:50 11
Symbol 52 MovieClip {SearcherzL_OListBR_stUp} [OListBR_stUp]Uses:50 11

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 3 as "OButton_stOver"
ExportAssets (56)Timeline Frame 1Symbol 8 as "stSelectDown"
ExportAssets (56)Timeline Frame 1Symbol 12 as "OListBL_stDown"
ExportAssets (56)Timeline Frame 1Symbol 15 as "stSelectDisabled"
ExportAssets (56)Timeline Frame 1Symbol 18 as "stUp"
ExportAssets (56)Timeline Frame 1Symbol 21 as "OFont"
ExportAssets (56)Timeline Frame 1Symbol 24 as "OButton_stDown"
ExportAssets (56)Timeline Frame 1Symbol 27 as "stOver"
ExportAssets (56)Timeline Frame 1Symbol 29 as "OBG01"
ExportAssets (56)Timeline Frame 1Symbol 31 as "stSelectOver"
ExportAssets (56)Timeline Frame 1Symbol 33 as "stDown"
ExportAssets (56)Timeline Frame 1Symbol 36 as "stSelectUp"
ExportAssets (56)Timeline Frame 1Symbol 39 as "OFont2"
ExportAssets (56)Timeline Frame 1Symbol 42 as "OButton_stUp"
ExportAssets (56)Timeline Frame 1Symbol 44 as "OListBR_stDown"
ExportAssets (56)Timeline Frame 1Symbol 46 as "stDisabled"
ExportAssets (56)Timeline Frame 1Symbol 49 as "OButton_stEmp"
ExportAssets (56)Timeline Frame 1Symbol 51 as "OListBL_stUp"
ExportAssets (56)Timeline Frame 1Symbol 52 as "OListBR_stUp"
SerialNumber (41)Timeline Frame 1

Labels

"Searcherz"Frame 1




http://swfchan.com/17/83997/info.shtml
Created: 31/3 -2019 15:16:42 Last modified: 31/3 -2019 15:16:42 Server time: 05/11 -2024 10:52:57