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

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

Gemz.swf

This is the info page for
Flash #99108

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


Text
<p align="center"><font face="SkazkaForSerge" size="34" color="#000000" letterSpacing="1.000000" kerning="0"><a href=" "><b>TEXT</b></a></font></p>

ActionScript [AS3]

Section 1
//OAdBanner (ENGINE.AD.OAdBanner) package ENGINE.AD { import flash.events.*; import flash.display.*; import flash.net.*; public class OAdBanner { private var iManager:DisplayObject; private var iID:String; private var iBanner:DisplayObject; private var iPrefix:String; private var iLoader:Loader; private static const strURL:String = "http://wellgames.com/ad/"; public function OAdBanner(_arg1:String, _arg2:String){ this.iPrefix = _arg1; this.iID = _arg2; this.iLoader = new Loader(); this.iLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, OnIOError); this.iLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, OnComplete); this.iLoader.load(new URLRequest(this.prURL)); } private function OnIOError(_arg1:IOErrorEvent):void{ } public function DeleteBanner():void{ this.iBanner = null; } private function get prURL():String{ return ((((((OAdBanner.strURL + this.iPrefix) + "AdBanner.swf?r=") + this.iPrefix) + this.iID) + "&i=-1")); } public function get prBanner():DisplayObject{ return (this.iBanner); } public function CreateBanner():void{ if (this.iManager){ this.iBanner = this.iManager["prBanner"]; }; } private function OnComplete(_arg1:Event):void{ this.iManager = this.iLoader.content; } } }//package ENGINE.AD
Section 2
//OAdBanners (ENGINE.AD.OAdBanners) package ENGINE.AD { import flash.display.*; import ENGINE.CORE.*; public class OAdBanners { public static var iBBanner:OAdBanner; public static var iTBanner:OAdBanner; public static function InitTBanner(_arg1:String, _arg2:String):void{ OAdBanners.iTBanner = new OAdBanner(_arg1, _arg2); } public static function RemoveBBanner(_arg1:DisplayObjectContainer):void{ var _local2:Sprite; _local2 = (OAdBanners.iBBanner.prBanner as Sprite); if (((_local2) && (_arg1.contains(_local2)))){ _arg1.removeChild(_local2); }; OAdBanners.iBBanner.DeleteBanner(); } public static function AddBBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{ var _local6:Sprite; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; OAdBanners.iBBanner.CreateBanner(); _local6 = (OAdBanners.iBBanner.prBanner as Sprite); if (!_local6){ return; }; _local7 = OGlobal.ToGlobal(_arg2); _local8 = OGlobal.ToGlobal(_arg3); _local9 = OGlobal.ToGlobal(_arg4); _local10 = OGlobal.ToGlobal(_arg5); _local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2))); _local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2))); _arg1.addChild(_local6); } public static function RemoveTBanner(_arg1:DisplayObjectContainer):void{ var _local2:Sprite; _local2 = (OAdBanners.iTBanner.prBanner as Sprite); if (((_local2) && (_arg1.contains(_local2)))){ _arg1.removeChild(_local2); }; OAdBanners.iTBanner.DeleteBanner(); } public static function InitBBanner(_arg1:String, _arg2:String):void{ OAdBanners.iBBanner = new OAdBanner(_arg1, _arg2); } public static function AddTBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{ var _local6:Sprite; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; OAdBanners.iTBanner.CreateBanner(); _local6 = (OAdBanners.iTBanner.prBanner as Sprite); if (!_local6){ return; }; _local7 = OGlobal.ToGlobal(_arg2); _local8 = OGlobal.ToGlobal(_arg3); _local9 = OGlobal.ToGlobal(_arg4); _local10 = OGlobal.ToGlobal(_arg5); _local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2))); _local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2))); _arg1.addChild(_local6); } } }//package ENGINE.AD
Section 3
//OCache (ENGINE.CORE.OCache) package ENGINE.CORE { import flash.utils.*; public dynamic class OCache { public function Pack():ByteArray{ var _local1:ByteArray; _local1 = new ByteArray(); _local1.writeObject(this); _local1.compress(); return (_local1); } public function AddCategoryArr(_arg1:String, _arg2:String):Array{ var _local3:OCache; _local3 = ((this[_arg1])==undefined) ? AddCategory(_arg1) : this[_arg1]; return (_local3.AddArr(_arg2)); } public function GetArrItem(_arg1:String, _arg2:int){ if ((((this[_arg1] == undefined)) || ((this[_arg1][_arg2] == undefined)))){ return (null); }; return (this[_arg1][_arg2]); } public function DeleteArrItem(_arg1:String, _arg2:int):void{ if (this[_arg1] == undefined){ return; }; this[_arg1].splice(_arg2, 1); } public function IsCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):Boolean{ if (this[_arg1] == undefined){ return (false); }; return (this[_arg1].IsArrItem(_arg2, _arg3)); } public function GetCategoryItem(_arg1:String, _arg2:String){ if (this[_arg1] == undefined){ return (null); }; return (this[_arg1].GetItem(_arg2)); } public function SetCategoryItem(_arg1:String, _arg2:String, _arg3):void{ if (this[_arg1] == undefined){ this[_arg1] = new OCache(); }; this[_arg1].SetItem(_arg2, _arg3); } public function SetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int, _arg4):void{ if (this[_arg1] == undefined){ this[_arg1] = new OCache(); }; this[_arg1].SetArrItem(_arg2, _arg3, _arg4); } public function IsCategoryItem(_arg1:String, _arg2:String):Boolean{ if (this[_arg1] == undefined){ return (false); }; return (this[_arg1].IsItem(_arg2)); } public function DeleteCategoryItem(_arg1:String, _arg2:String):void{ if (this[_arg1] == undefined){ return; }; this[_arg1].DeleteItem(_arg2); } public function AddCategory(_arg1:String):OCache{ this[_arg1] = new OCache(); return (this[_arg1]); } public function GetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int){ if (this[_arg1] == undefined){ return (null); }; return (GetArrItem(_arg2, _arg3)); } public function GetCategoryNames(_arg1:String):Array{ var _local2:Array; var _local3:String; if (this[_arg1] == undefined){ return (null); }; _local2 = new Array(); for (_local3 in this[_arg1]) { _local2.push(_local3); }; return ((_local2.length) ? _local2.sort() : null); } public function AddArr(_arg1:String):Array{ this[_arg1] = new Array(); return (this[_arg1]); } public function GetItem(_arg1:String){ if (this[_arg1] == undefined){ return (null); }; return (this[_arg1]); } public function IsArrItem(_arg1:String, _arg2:int):Boolean{ return (((!((this[_arg1] == undefined))) && (!((this[_arg1][_arg2] == undefined))))); } public function DeleteCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):void{ if (this[_arg1] == undefined){ return; }; this[_arg1].DeleteArrItem(_arg2, _arg3); } public function Clear():void{ var _local1:String; for (_local1 in this) { delete this[_local1]; }; } public function SetArrItem(_arg1:String, _arg2:int, _arg3):void{ if (this[_arg1] == undefined){ this[_arg1] = new Array(); }; this[_arg1][_arg2] = _arg3; } public function SetItem(_arg1:String, _arg2):void{ this[_arg1] = _arg2; } public function GetNames():Array{ var _local1:Array; var _local2:String; _local1 = new Array(); for (_local2 in this) { _local1.push(_local2); }; return ((_local1.length) ? _local1.sort() : null); } public function IsItem(_arg1:String):Boolean{ return (!((this[_arg1] == undefined))); } public function DeleteItem(_arg1:String):void{ if (this[_arg1] == undefined){ return; }; delete this[_arg1]; } } }//package ENGINE.CORE
Section 4
//OGlobal (ENGINE.CORE.OGlobal) package ENGINE.CORE { import flash.display.*; import flash.geom.*; import flash.net.*; public class OGlobal { private static var iFPS:int = 60; private static var iDomain:String; private static var iSRect:Rectangle = new Rectangle(); private static var iVRect:Rectangle = new Rectangle(0, 0, 800, 600); private static var iStage:Stage; private static var iScale:Number = 1; private static var iAppName:String; private static var iOldScale:Number = 1; public static function get FPS():int{ return (OGlobal.iFPS); } public static function CheckDomain(_arg1:String):Boolean{ var _local2:int; _local2 = OGlobal.iDomain.indexOf(_arg1); return ((((_local2 >= 0)) && ((_local2 <= 4)))); } public static function ToLocal(_arg1:Number):Number{ return ((_arg1 / OGlobal.iScale)); } public static function set FPS(_arg1:int):void{ OGlobal.iFPS = _arg1; if (OGlobal.iStage){ OGlobal.iStage.frameRate = _arg1; }; } public static function Rescale(_arg1:Sprite, _arg2:Boolean=true):void{ var _local3:Number; _local3 = (((OGlobal.iStage.stageWidth / OGlobal.iStage.stageHeight))<=(800 / 600)) ? (OGlobal.iStage.stageWidth / 800) : (OGlobal.iStage.stageHeight / 600); OGlobal.iSRect.x = 0; OGlobal.iSRect.y = 0; OGlobal.iSRect.width = OGlobal.iStage.stageWidth; OGlobal.iSRect.height = OGlobal.iStage.stageHeight; OGlobal.iVRect.width = Math.round((800 * _local3)); OGlobal.iVRect.height = Math.round((600 * _local3)); OGlobal.iVRect.x = Math.floor(((OGlobal.iStage.stageWidth - OGlobal.iVRect.width) / 2)); OGlobal.iVRect.y = Math.floor(((OGlobal.iStage.stageHeight - OGlobal.iVRect.height) / 2)); if (_arg2){ _arg1.x = OGlobal.iVRect.x; _arg1.y = OGlobal.iVRect.y; }; OGlobal.iScale = _local3; } public static function get prStage():Stage{ return (OGlobal.iStage); } public static function ClearScale():void{ OGlobal.iOldScale = OGlobal.iScale; OGlobal.iScale = 1; OGlobal.iVRect = OGlobal.iSRect.clone(); } public static function ToGlobal(_arg1:Number):Number{ return ((_arg1 * OGlobal.iScale)); } public static function set AppName(_arg1:String):void{ OGlobal.iAppName = ("WellGames_" + _arg1); } public static function get Domain():String{ return (OGlobal.iDomain); } public static function SetDomain():void{ var _local1:LocalConnection; _local1 = new LocalConnection(); OGlobal.iDomain = _local1.domain; } public static function get StageRect():Rectangle{ return (OGlobal.iSRect); } public static function ScaleFloor(_arg1:Number):Number{ return ((Math.floor((_arg1 * OGlobal.iScale)) / OGlobal.iScale)); } public static function get Scale():Number{ return (OGlobal.iScale); } public static function get ViewporRect():Rectangle{ return (OGlobal.iVRect); } public static function get AppName():String{ return (OGlobal.iAppName); } public static function set prStage(_arg1:Stage):void{ OGlobal.iStage = _arg1; } public static function RestoreScale():void{ OGlobal.iScale = OGlobal.iOldScale; } public static function ScaleMod(_arg1:Number):Number{ var _local2:Number; _local2 = (_arg1 * OGlobal.iScale); return (((_local2 - Math.floor(_local2)) / OGlobal.iScale)); } } }//package ENGINE.CORE
Section 5
//ORandomInt (ENGINE.CORE.ORandomInt) package ENGINE.CORE { import flash.utils.*; public class ORandomInt { private var iNextRandom:int; public function ORandomInt(){ iNextRandom = getTimer(); } public function RandNumber():Number{ var _local1:Number; _local1 = Rand(); return ((_local1 / 32767)); } public function Rand():int{ iNextRandom = ((iNextRandom * 1103515245) + 12345); return (((iNextRandom >> 16) & 32767)); } public function get NextRandom():int{ return (this.iNextRandom); } public function RandOnInterval(_arg1:Number=0, _arg2:Number=1):int{ return ((_arg1 + (Rand() % ((1 + _arg2) - _arg1)))); } public function RandVal(_arg1:int):int{ var _local2:Number; _local2 = Rand(); return ((_local2 % _arg1)); } public function SeedRand(_arg1:int=0):void{ if (_arg1 == 0){ iNextRandom = getTimer(); } else { iNextRandom = _arg1; }; } } }//package ENGINE.CORE
Section 6
//OSound (ENGINE.CORE.OSound) package ENGINE.CORE { import flash.events.*; import flash.utils.*; import flash.net.*; import flash.media.*; public class OSound { private static var iMusicInd:int = 0; private static var iSoundsObjects:Array; private static var iSounds:Dictionary = new Dictionary(true); private static var iMusicPlayList:Array = new Array(); private static var iSoundVolume:Number = 1; private static var iMusicChannel:SoundChannel; private static var iMusicVolume:Number = 1; private static var iMusic:Sound; public static function PlaySoundInd(_arg1:int, _arg2:Number=0):Boolean{ if (OSound.iSoundVolume == 0){ return (false); }; _arg1 = Math.max(_arg1, 0); _arg1 = Math.min(_arg1, (OSound.iSoundsObjects.length - 1)); return (OSound.PlaySound(OSound.iSoundsObjects[_arg1], _arg2)); } public static function set MusicVolume(_arg1:Number):void{ var _local2:SoundTransform; OSound.iMusicVolume = _arg1; if (OSound.iMusicChannel){ if (_arg1 == 0){ OSound.StopMusic(); } else { _local2 = OSound.iMusicChannel.soundTransform; _local2.volume = _arg1; OSound.iMusicChannel.soundTransform = _local2; }; } else { if (OSound.iMusicVolume > 0){ OSound.PlayMusic(); }; }; } private static function OnMusicLoadComplete(_arg1:Event):void{ if (OSound.iMusicVolume == 0){ return; }; OSound.iMusicChannel = iMusic.play(0, 0, new SoundTransform(OSound.iMusicVolume, 0)); OSound.RemoveMusic(); OSound.iMusicChannel.addEventListener(Event.SOUND_COMPLETE, OnMusicComplete); } public static function set SoundVolume(_arg1:Number):void{ OSound.iSoundVolume = _arg1; } private static function OnMusicLoadIOError(_arg1:Event):void{ OSound.RemoveMusic(); OSound.iMusicPlayList.splice(OSound.iMusicInd, 1); OSound.iMusicInd = ((OSound.iMusicInd > (OSound.iMusicPlayList.length - 1))) ? (OSound.iMusicPlayList.length - 1) : OSound.iMusicInd; OSound.PlayMusic(); } private static function OnMusicComplete(_arg1:Event):void{ PlayMusic(); } public static function PlaySound(_arg1:Class, _arg2:Number=0):Boolean{ var _local3:Sound; if (OSound.iSoundVolume == 0){ return (false); }; _local3 = OSound.iSounds[_arg1]; if (_local3 != null){ _local3.play(0, 0, new SoundTransform(OSound.iSoundVolume, _arg2)); }; return (!((_local3 == null))); } private static function RemoveMusic():void{ if (OSound.iMusic){ OSound.iMusic.removeEventListener(Event.COMPLETE, OSound.OnMusicLoadComplete); OSound.iMusic.removeEventListener(IOErrorEvent.IO_ERROR, OSound.OnMusicLoadIOError); OSound.iMusic = null; }; } public static function StopMusic():void{ if (OSound.iMusicChannel){ OSound.iMusicChannel.removeEventListener(Event.SOUND_COMPLETE, OnMusicComplete); OSound.iMusicChannel.stop(); OSound.iMusicChannel = null; }; } public static function get SoundVolume():Number{ return (OSound.iSoundVolume); } public static function PlayListClear():void{ OSound.iMusicPlayList = new Array(); } public static function PlayListAdd(_arg1:String):void{ OSound.iMusicPlayList.push(_arg1); OSound.iMusicInd = (OSound.iMusicPlayList.length - 1); } public static function PlayMusic():void{ var _local1:URLRequest; if ((((OSound.iMusicVolume == 0)) || (!(OSound.iMusicPlayList.length)))){ return; }; OSound.StopMusic(); OSound.iMusicInd = ((OSound.iMusicInd + 1) % OSound.iMusicPlayList.length); _local1 = 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); OSound.iMusic.load(_local1); } public static function RegisterEmbedSounds(_arg1:Array):Boolean{ var _local2:int; var _local3:Sound; OSound.iSoundsObjects = _arg1; _local2 = 0; while (_local2 < _arg1.length) { _local3 = (new (_arg1[_local2]) as Sound); OSound.iSounds[_arg1[_local2]] = _local3; _local2++; }; return (true); } public static function PlaySoundRandom(_arg1:Number=0, _arg2:int=0, _arg3:int=-1):Boolean{ var _local4:int; if (OSound.iSoundVolume == 0){ return (false); }; _arg2 = Math.max(_arg2, 0); _arg2 = Math.min(_arg2, (OSound.iSoundsObjects.length - 1)); if (_arg3 < 0){ _arg3 = (OSound.iSoundsObjects.length - 1); }; _arg3 = Math.max(_arg3, 0); _arg3 = Math.min(_arg3, (OSound.iSoundsObjects.length - 1)); _local4 = OUtils.Random(_arg2, _arg3); return (OSound.PlaySound(OSound.iSoundsObjects[_local4], _arg1)); } public static function get MusicVolume():Number{ return (OSound.iMusicVolume); } } }//package ENGINE.CORE
Section 7
//OSystem (ENGINE.CORE.OSystem) package ENGINE.CORE { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; import flash.system.*; public class OSystem extends Sprite { private var iLastTime:int; private var iCount:int; private var iText:TextField; private var iSTimer:String; public static var iUserText1:String = ""; public static var iUserText:String = ""; public static var iUserText2:String = ""; public function OSystem(){ this.iText = new TextField(); this.iText.autoSize = TextFieldAutoSize.LEFT; this.iText.mouseEnabled = false; this.addChild(this.iText); this.addEventListener(Event.ENTER_FRAME, OnEnterFrame); this.iLastTime = getTimer(); this.iSTimer = ""; } public function OnEnterFrame(_arg1:Event):void{ var _local2:uint; var _local3:int; _local2 = System.totalMemory; _local3 = (getTimer() - this.iLastTime); this.iCount++; if (_local3 >= 1000){ this.iSTimer = String((Math.round(((_local3 / this.iCount) * 100)) / 100)); this.iLastTime = getTimer(); this.iCount = 0; }; iText.text = ((((((((((_local2.toString() + " ") + this.iSTimer) + " ") + OGlobal.prStage.frameRate) + " | ") + OSystem.iUserText) + " ") + OSystem.iUserText1) + " ") + OSystem.iUserText2); } } }//package ENGINE.CORE
Section 8
//OUtils (ENGINE.CORE.OUtils) package ENGINE.CORE { import ENGINE.DISPLAY.*; import flash.geom.*; public class OUtils { public static function AddZero(_arg1:String, _arg2:int):String{ var _local3:String; var _local4:int; _local3 = ""; _local4 = _arg1.length; while (_local4 < _arg2) { _local3 = (_local3 + "0"); _local4++; }; _local3 = (_local3 + _arg1); return (_local3); } public static function Random(_arg1:Number, _arg2:Number):Number{ return ((_arg1 + ((_arg2 - _arg1) * Math.random()))); } public static function StringToTarget(_arg1:Class, _arg2:int, _arg3:String, _arg4:String, _arg5:int):String{ var _local6:Number; var _local7:Rectangle; var _local8:String; var _local9:String; var _local10:int; _local6 = Math.round((1 + (_arg2 / 70))); _local8 = ((_arg4)==null) ? "" : ((" (" + _arg4) + ")"); _local9 = (_arg3 + _local8); _local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9); if (_local7.width <= _arg5){ return (_local9); }; _local8 = ("..." + _local8); _local10 = (_arg3.length - 1); while (_local10 > 0) { _local9 = (_arg3.substr(0, _local10) + _local8); _local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9); if (_local7.width <= _arg5){ return (_local9); }; _local10--; }; return ((_arg3.substr(0, 1) + _local8)); } public static function ClearString(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:int; _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 "; _local3 = ""; _local4 = 0; while (_local4 < _arg1.length) { if (_local2.indexOf(_arg1.charAt(_local4)) > -1){ _local3 = (_local3 + _arg1.charAt(_local4)); }; _local4++; }; return (_local3); } } }//package ENGINE.CORE
Section 9
//OEffect (ENGINE.DISPLAY.EFFECTS.OEffect) package ENGINE.DISPLAY.EFFECTS { import ENGINE.DISPLAY.*; import ENGINE.CORE.*; public class OEffect { protected var iColors:OCache; protected var iFilters:OCache; public function OEffect(){ this.iColors = new OCache(); this.iFilters = new OCache(); } public function RegisterColor(_arg1:String, _arg2):void{ this.iColors.SetItem(_arg1, _arg2); } public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{ } public function RegisterFilter(_arg1:String, _arg2):void{ this.iFilters.SetItem(_arg1, _arg2); } public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{ return (null); } } }//package ENGINE.DISPLAY.EFFECTS
Section 10
//OEffects (ENGINE.DISPLAY.EFFECTS.OEffects) package ENGINE.DISPLAY.EFFECTS { import ENGINE.DISPLAY.*; import ENGINE.CORE.*; public class OEffects { private static var iEffects:OCache = new OCache(); public static function RegisterColor(_arg1:String, _arg2:String, _arg3):void{ var _local4:OEffect; _local4 = iEffects.GetItem(_arg1); if (_local4 == null){ return; }; _local4.RegisterColor(_arg2, _arg3); } public static function RegisterEffect(_arg1:String, _arg2:OEffect):void{ iEffects.SetItem(_arg1, _arg2); } public static function Make(_arg1:Array):OBM{ var _local2:OEffect; _local2 = iEffects.GetItem(_arg1[3]); if (_local2 == null){ return (null); }; _local2.Init(_arg1[4], _arg1[5], _arg1[6]); return (_local2.Apply(_arg1[1], _arg1[2], _arg1[7], _arg1[8])); } public static function GetEffect(_arg1:String):OEffect{ return (iEffects.GetItem(_arg1)); } public static function RegisterFilter(_arg1:String, _arg2:String, _arg3):void{ var _local4:OEffect; _local4 = iEffects.GetItem(_arg1); if (_local4 == null){ return; }; _local4.RegisterFilter(_arg2, _arg3); } public static function Apply(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBM{ var _local9:OEffect; _local9 = iEffects.GetItem(_arg3); if (_local9 == null){ return (null); }; _local9.Init(_arg4, _arg5, _arg6); return (_local9.Apply([ODisplay.SpriteLib, _arg1], _arg2, _arg7, _arg8)); } } }//package ENGINE.DISPLAY.EFFECTS
Section 11
//IDisplayObject (ENGINE.DISPLAY.IDisplayObject) package ENGINE.DISPLAY { public interface IDisplayObject { function set prVisible(_arg1:Boolean):void; function get prWidth():Number; function get prHeight():Number; function set prX(_arg1:Number):void; function set prY(_arg1:Number):void; function get prVisible():Boolean; function Move(_arg1:Number, _arg2:Number):void; function Pos(_arg1:Number, _arg2:Number):void; function get prX():Number; function get prY():Number; } }//package ENGINE.DISPLAY
Section 12
//OBitmap (ENGINE.DISPLAY.OBitmap) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import flash.text.*; import ENGINE.CORE.*; public class OBitmap extends Bitmap implements IDisplayObject { protected var iY:Number;// = 0 protected var iX:Number;// = 0 protected var iOBM:OBM;// = null public function OBitmap(_arg1:OBM=null, _arg2:Number=0, _arg3:Number=0){ iX = 0; iY = 0; iOBM = null; super(); this.iX = _arg2; this.iY = _arg3; Init(_arg1); } public function get prVisible():Boolean{ return (this.visible); } public function set prX(_arg1:Number):void{ this.iX = _arg1; Pos(this.iX, this.iY); } public function Clear():void{ this.Init(null); } public function set prOBM(_arg1:OBM):void{ this.Init(_arg1); } public function Pos(_arg1:Number, _arg2:Number):void{ this.iX = _arg1; this.iY = _arg2; if (this.iOBM){ this.x = ((this.iX * OGlobal.Scale) + this.iOBM.iX); this.y = ((this.iY * OGlobal.Scale) + this.iOBM.iY); } else { this.x = (this.iX * OGlobal.Scale); this.y = (this.iY * OGlobal.Scale); }; } public function set prY(_arg1:Number):void{ this.iY = _arg1; Pos(this.iX, this.iY); } public function Init(_arg1:OBM):void{ this.iOBM = _arg1; this.bitmapData = (_arg1) ? _arg1.iBM : null; this.Pos(this.iX, this.iY); } public function set prVisible(_arg1:Boolean):void{ this.visible = _arg1; } public function Clone():OBitmap{ return (new OBitmap(this.iOBM.Clone(), this.iX, this.iY)); } public function get prX():Number{ return (this.iX); } public function get prY():Number{ return (this.iY); } public function get prOBM():OBM{ return (this.iOBM); } public function get prHeight():Number{ return ((this.iOBM) ? (this.iOBM.iHeight / OGlobal.Scale) : 0); } public function get prWidth():Number{ return ((this.iOBM) ? (this.iOBM.iWidth / OGlobal.Scale) : 0); } public function CopyFrom(_arg1:OBitmap):void{ this.iX = _arg1.iX; this.iY = _arg1.iY; this.Init(_arg1.iOBM); } public function Move(_arg1:Number, _arg2:Number):void{ Pos((this.iX + _arg1), (this.iY + _arg2)); } public static function MakeEffectFromListP(_arg1:Array):OBitmap{ var _local2:Sprite; var _local3:Sprite; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); _local3 = (_local2.getChildAt(_arg1[2]) as Sprite); return (OBitmap.MakeEffect(_local3, _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _local3.x, _local3.y)); } public static function MakeEffectP(_arg1:Array):OBitmap{ return (OBitmap.MakeEffect(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8])); } public static function MakeEffectTextInRectP(_arg1:Array):OBitmap{ var _local2:Sprite; var _local3:Rectangle; var _local4:Number; var _local5:Number; var _local6:TextField; var _local7:TextFormat; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if ((_local2.getChildAt(0) is TextField)){ _local6 = (_local2.getChildAt(0) as TextField); _local6.autoSize = TextFieldAutoSize.LEFT; _local6.text = _arg1[4]; _local7 = _local6.defaultTextFormat; _local7.size = _arg1[2]; _local7.letterSpacing = _arg1[3]; _local6.setTextFormat(_local7); } else { return (null); }; _local3 = _local2.getBounds(_local2); _local4 = ((_arg1[9] - _local3.width) / 2); _local5 = ((_arg1[10] - _local3.height) / 2); return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], (_arg1[11] + _local4), (_arg1[12] + _local5))); } public static function MakeEffectTextP(_arg1:Array):OBitmap{ var _local2:Sprite; var _local3:TextField; var _local4:TextFormat; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if ((_local2.getChildAt(0) is TextField)){ _local3 = (_local2.getChildAt(0) as TextField); _local3.autoSize = TextFieldAutoSize.LEFT; _local3.text = _arg1[4]; _local4 = _local3.defaultTextFormat; _local4.size = _arg1[2]; _local4.letterSpacing = _arg1[3]; _local3.setTextFormat(_local4); } else { return (null); }; return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10])); } public static function MakeRoundRectBorderEffectP(_arg1:Array):OBitmap{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); _local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4])); return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10])); } public static function MakeEffectInRectP(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Sprite; var _local4:Rectangle; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local2 = Math.min(_arg1[7], _arg1[8]); _local3 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); _local4 = _local3.getBounds(_local3); _local5 = Math.max(_local4.width, _local4.height); _local6 = ((_local2 / _local5) * _arg1[2]); _local7 = ((_arg1[7] - (_local4.width * _local6)) / 2); _local8 = ((_arg1[8] - (_local4.height * _local6)) / 2); return (OBitmap.MakeEffect(_local3, _local6, _arg1[3], _arg1[4], _arg1[5], _arg1[6], (_arg1[9] + _local7), (_arg1[10] + _local8))); } public static function MakeTmp(_arg1, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):OBitmap{ var _local6:OBM; _local6 = OBM.Make([null, [ODisplay.SpriteLib, _arg1], _arg2, _arg3, _arg4, _arg5]); return (new OBitmap(_local6, _arg3, _arg4)); } public static function MakeP(_arg1:Array):OBitmap{ return (OBitmap.MakeTmp(_arg1[1], _arg1[2], _arg1[3], _arg1[4])); } public static function MakeRoundRectEffectP(_arg1:Array):OBitmap{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); return (OBitmap.MakeEffect(_local2, 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9])); } public static function Make(_arg1:Array):OBitmap{ return (new OBitmap(_arg1[1][0](_arg1[1]), _arg1[2], _arg1[3])); } public static function MakeEffect(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBitmap{ var _local9:OBM; _local9 = OEffects.Apply(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); return (new OBitmap(_local9, _arg7, _arg8)); } } }//package ENGINE.DISPLAY
Section 13
//OBM (ENGINE.DISPLAY.OBM) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.CORE.*; public class OBM { public var iX:Number; public var iHeight:Number; public var iBM:BitmapData; public var iY:Number; public var iWidth:Number; public function OBM(_arg1:BitmapData=null, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ this.iBM = _arg1; this.iX = _arg2; this.iY = _arg3; this.iWidth = _arg4; this.iHeight = _arg5; } public function Clone():OBM{ var _local1:BitmapData; _local1 = this.iBM.clone(); return (new OBM(_local1, this.iX, this.iY, this.iWidth, this.iHeight)); } public static function Make(_arg1:Array):OBM{ var _local2:Sprite; var _local3:Sprite; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Rectangle; var _local8:int; var _local9:int; var _local10:Number; var _local11:Number; var _local12:BitmapData; var _local13:Matrix; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local4 = (OGlobal.Scale * _arg1[2]); _local5 = OGlobal.ToGlobal(_arg1[3]); _local6 = OGlobal.ToGlobal(_arg1[4]); _local3.scaleX = _local4; _local3.scaleY = _local4; _local3.x = (_local3.x * OGlobal.Scale); _local3.y = (_local3.y * OGlobal.Scale); _local3.x = (_local3.x + _local5); _local3.y = (_local3.y + _local6); _local2.addChild(_local3); _local7 = _local3.getBounds(_local2); _local8 = ((_local7.width + 4) + (_arg1[5] * 2)); _local9 = ((_local7.height + 4) + (_arg1[5] * 2)); _local10 = Math.floor(_local7.x); _local11 = Math.floor(_local7.y); _local12 = new BitmapData(_local8, _local9, true, 0); _local13 = new Matrix(1, 0, 0, 1, ((-(_local10) + 1) + _arg1[5]), ((-(_local11) + 1) + _arg1[5])); _local12.draw(_local2, _local13); return (new OBM(_local12, (((_local10 - _local5) - 1) - _arg1[5]), (((_local11 - _local6) - 1) - _arg1[5]), _local7.width, _local7.height)); } } }//package ENGINE.DISPLAY
Section 14
//ODisplay (ENGINE.DISPLAY.ODisplay) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import flash.text.*; import ENGINE.CORE.*; public class ODisplay { public static function HSBToRGB(_arg1:Number, _arg2:Number, _arg3:Number):uint{ var _local4:int; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:int; var _local12:int; _arg1 = (_arg1 % 360); if (_arg2 > 1){ _arg2 = 1; }; if (_arg3 > 1){ _arg3 = 1; }; if (_arg2 == 0){ _local4 = (_arg3 * 0xFF); return ((((_local4 << 16) | (_local4 << 8)) | _local4)); }; if (_arg1 == 360){ _arg1 = 0; } else { _arg1 = (_arg1 / 60); }; _local5 = Math.floor(_arg1); _local6 = (_arg1 - _local5); _local7 = (_arg3 * (1 - _arg2)); _local8 = (_arg3 * (1 - (_arg2 * _local6))); _local9 = (_arg3 * (1 - (_arg2 * (1 - _local6)))); switch (_local5){ case 0: _local10 = (_arg3 * 0xFF); _local11 = (_local9 * 0xFF); _local12 = (_local7 * 0xFF); break; case 1: _local10 = (_local8 * 0xFF); _local11 = (_arg3 * 0xFF); _local12 = (_local7 * 0xFF); break; case 2: _local10 = (_local7 * 0xFF); _local11 = (_arg3 * 0xFF); _local12 = (_local9 * 0xFF); break; case 3: _local10 = (_local7 * 0xFF); _local11 = (_local8 * 0xFF); _local12 = (_arg3 * 0xFF); break; case 4: _local10 = (_local9 * 0xFF); _local11 = (_local7 * 0xFF); _local12 = (_arg3 * 0xFF); break; case 5: _local10 = (_arg3 * 0xFF); _local11 = (_local7 * 0xFF); _local12 = (_local8 * 0xFF); break; }; return ((((_local10 << 16) | (_local11 << 8)) | _local12)); } public static function OBitmapAngleFrameSprite(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]])); } public static function OBitmapXBorder(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function OBitmapAngleFrameText(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]])); } public static function OBitmapRoundFrameText(_arg1:Array):OBitmap{ if (_arg1[4]){ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]])); }; return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]])); } public static function SpriteFillRect(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Sprite; var _local4:Rectangle; var _local5:Number; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local2.addChild(_local3); _local4 = _local3.getBounds(_local2); _local5 = (Math.max(_arg1[2], _arg1[3]) / Math.max(_local4.width, _local4.height)); _local3.scaleX = _local5; _local3.scaleY = _local5; _local4 = _local3.getBounds(_local2); _local2.removeChild(_local3); _local3.x = (_local3.x + ((_arg1[2] - _local4.width) / 2)); _local3.y = (_local3.y + ((_arg1[3] - _local4.height) / 2)); return (_local3); } public static function TextRect(_arg1, _arg2:Number, _arg3:Number, _arg4:String):Rectangle{ var _local5:Sprite; var _local6:TextField; var _local7:TextFormat; _local5 = ((_arg1 is Sprite)) ? (_arg1 as Sprite) : new ((_arg1 as Class)); if ((_local5.getChildAt(0) is TextField)){ _local6 = (_local5.getChildAt(0) as TextField); _local6.autoSize = TextFieldAutoSize.LEFT; _local6.text = _arg4; _local7 = _local6.defaultTextFormat; _local7.size = _arg2; _local7.letterSpacing = _arg3; _local6.setTextFormat(_local7); } else { return (null); }; return (_local5.getBounds(_local5)); } public static function OBitmapXBorderText(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[17], _arg1[18]], [null, [ODisplay.SpriteTextInRect, _arg1[9], _arg1[10], _arg1[11], _arg1[12], _arg1[1], _arg1[2]], 1, _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18]]]])); } public static function OBitmapRoundRect(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]])); } public static function OBitmapAngleFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]])); } public static function HSBAToRGBA(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):uint{ var _local5:uint; var _local6:uint; _local5 = HSBToRGB(_arg1, _arg2, _arg3); _local6 = (0xFF * _arg4); _local6 = (_local6 << 24); return ((_local5 + _local6)); } public static function OBitmapTextAlign(_arg1:Array):OBitmap{ return (OBitmapMake([null, [ODisplay.SpriteTextAlign, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[11], _arg1[12]], 1, _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[13], _arg1[14]])); } public static function OBitmapList(_arg1:Array):OBitmap{ var _local2:OBM; var _local3:Number; var _local4:Number; var _local5:int; var _local6:OBM; var _local7:Matrix; _local2 = OEffects.Make(_arg1[1][0]); _local3 = (_local2.iX + (_arg1[1][0][7] * OGlobal.Scale)); _local4 = (_local2.iY + (_arg1[1][0][8] * OGlobal.Scale)); _local5 = 1; while (_local5 < _arg1[1].length) { _local6 = OEffects.Make(_arg1[1][_local5]); _local7 = new Matrix(1, 0, 0, 1, (((_arg1[1][_local5][7] * OGlobal.Scale) + _local6.iX) - _local3), (((_arg1[1][_local5][8] * OGlobal.Scale) + _local6.iY) - _local4)); _local2.iBM.draw(_local6.iBM, _local7); _local5++; }; return (new OBitmap(_local2, _arg1[1][0][7], _arg1[1][0][8])); } public static function SpriteLibList(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if (_arg1[2] >= _local2.numChildren){ return (null); }; return ((_local2.getChildAt(_arg1[2]) as Sprite)); } public static function SpriteXBorder(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.lineStyle(_arg1[4]); _local2.graphics.moveTo(0, _arg1[3]); _local2.graphics.lineTo(_arg1[1], _arg1[3]); _local2.graphics.moveTo(0, (_arg1[2] - _arg1[3])); _local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3])); _local2.graphics.moveTo(_arg1[3], 0); _local2.graphics.lineTo(_arg1[3], _arg1[2]); _local2.graphics.moveTo((_arg1[1] - _arg1[3]), 0); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]); return (_local2); } public static function SpriteLib(_arg1:Array):Sprite{ return (((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class))); } public static function OBitmapAngleBorder(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function OBitmapRoundBorder(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function SpriteScale(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = _arg1[1][0](_arg1[1]); _local2.scaleX = _arg1[2]; _local2.scaleY = _arg1[2]; return (_local2); } public static function IDisplayObjectMake(_arg1:Array){ var _local2:IDisplayObject; _local2 = _arg1[1][0](_arg1[1]); _local2.Pos(_arg1[2], _arg1[3]); return (_local2); } public static function SpriteAlign(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Sprite; var _local4:Rectangle; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local3.scaleX = _arg1[2]; _local3.scaleY = _arg1[2]; _local2.addChild(_local3); _local4 = _local3.getBounds(_local2); _local2.removeChild(_local3); switch (_arg1[3]){ case 1: _local3.x = (_local3.x + ((_arg1[5] - _local4.width) / 2)); break; case 2: _local3.x = (_local3.x + (_arg1[5] - _local4.width)); break; }; switch (_arg1[4]){ case 1: _local3.y = (_local3.y + ((_arg1[6] - _local4.height) / 2)); break; case 2: _local3.y = (_local3.y + (_arg1[6] - _local4.height)); break; }; return (_local3); } public static function OBitmapAngleRect(_arg1:Array):OBitmap{ return (OBitmapMake([null, [SpriteAngleRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]])); } public static function SpriteRect(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRect(0, 0, _arg1[1], _arg1[2]); return (_local2); } public static function OBitmapSpriteFillRect(_arg1:Array):OBitmap{ var _local2:Sprite; _local2 = ODisplay.SpriteFillRect([null, _arg1[3], _arg1[1], _arg1[2]]); return (OBitmapMake([null, [ODisplay.SpriteFillRect, _arg1[3], _arg1[1], _arg1[2]], _local2.scaleX, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]])); } public static function OBitmapText(_arg1:Array):OBitmap{ return (OBitmapMake([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]])); } public static function OBitmapMake(_arg1:Array):OBitmap{ return (new OBitmap(OEffects.Make(_arg1), _arg1[7], _arg1[8])); } public static function SpriteRoundRect(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); return (_local2); } public static function SpriteInRect(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Sprite; var _local4:Rectangle; _local2 = new Sprite(); _local3 = _arg1[1][0](_arg1[1]); _local3.scaleX = _arg1[2]; _local3.scaleY = _arg1[2]; _local2.addChild(_local3); _local4 = _local3.getBounds(_local2); _local2.removeChild(_local3); _local3.x = (_local3.x + ((_arg1[3] - _local4.width) / 2)); _local3.y = (_local3.y + ((_arg1[4] - _local4.height) / 2)); return (_local3); } public static function SpriteScaleRotate(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Number; var _local4:Number; var _local5:Matrix; var _local6:Matrix; var _local7:Sprite; _local2 = _arg1[1][0](_arg1[1]); _local3 = (_arg1[4] * _arg1[2]); _local4 = (_arg1[5] * _arg1[2]); _local5 = new Matrix(); _local5.scale(_arg1[2], _arg1[2]); _local5.translate(-(_local3), -(_local4)); _local5.rotate(((Math.PI / 180) * _arg1[3])); _local6 = new Matrix(); _local6.translate(_local3, _local4); _local5.concat(_local6); _local7 = new Sprite(); _local7.addChild(_local2); _local2.transform.matrix = _local5; return (_local7); } public static function OBitmapRoundFrameSprite(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]])); } public static function SpriteText(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:TextField; var _local4:TextFormat; _local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)); if ((_local2.getChildAt(0) is TextField)){ _local3 = (_local2.getChildAt(0) as TextField); _local3.autoSize = TextFieldAutoSize.LEFT; _local3.text = _arg1[4]; _local4 = _local3.defaultTextFormat; _local4.size = _arg1[2]; _local4.letterSpacing = _arg1[3]; _local3.setTextFormat(_local4); } else { return (null); }; return (_local2); } public static function SpriteTextAlign(_arg1:Array):Sprite{ return (ODisplay.SpriteAlign([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8]])); } public static function OBitmapTextInRect(_arg1:Array):OBitmap{ return (OBitmapMake([null, [ODisplay.SpriteTextInRect, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[9], _arg1[10]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[11], _arg1[12]])); } public static function SpriteRoundBorder(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]); _local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4])); return (_local2); } public static function SpriteAngleRect(_arg1:Array):Sprite{ var _local2:Sprite; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.moveTo(_arg1[3], 0); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0); _local2.graphics.lineTo(_arg1[1], _arg1[3]); _local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3])); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]); _local2.graphics.lineTo(_arg1[3], _arg1[2]); _local2.graphics.lineTo(0, (_arg1[2] - _arg1[3])); _local2.graphics.lineTo(0, _arg1[3]); _local2.graphics.endFill(); return (_local2); } public static function SpriteAngleBorder(_arg1:Array):Sprite{ var _local2:Sprite; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.moveTo(_arg1[3], 0); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0); _local2.graphics.lineTo(_arg1[1], _arg1[3]); _local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3])); _local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]); _local2.graphics.lineTo(_arg1[3], _arg1[2]); _local2.graphics.lineTo(0, (_arg1[2] - _arg1[3])); _local2.graphics.lineTo(0, _arg1[3]); _local3 = (_arg1[1] - (_arg1[4] * 2)); _local4 = (_arg1[2] - (_arg1[4] * 2)); _local5 = ((_arg1[3] * _local3) / _arg1[1]); _local2.graphics.moveTo((_arg1[4] + _local5), (_arg1[4] + 0)); _local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + 0)); _local2.graphics.lineTo((_arg1[4] + _local3), (_arg1[4] + _local5)); _local2.graphics.lineTo((_arg1[4] + _local3), ((_arg1[4] + _local4) - _local5)); _local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + _local4)); _local2.graphics.lineTo((_arg1[4] + _local5), (_arg1[4] + _local4)); _local2.graphics.lineTo((_arg1[4] + 0), ((_arg1[4] + _local4) - _local5)); _local2.graphics.lineTo((_arg1[4] + 0), (_arg1[4] + _local5)); return (_local2); } public static function SpriteTextInRect(_arg1:Array):Sprite{ return (ODisplay.SpriteInRect([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6]])); } public static function OBitmapRoundFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]])); } } }//package ENGINE.DISPLAY
Section 15
//OSprite (ENGINE.DISPLAY.OSprite) package ENGINE.DISPLAY { import flash.display.*; import ENGINE.CORE.*; public class OSprite extends Sprite implements IDisplayObject { private var iY:Number;// = 0 private var iX:Number;// = 0 public function OSprite(){ iX = 0; iY = 0; super(); } public function get prVisible():Boolean{ return (this.visible); } public function set prX(_arg1:Number):void{ this.iX = _arg1; this.x = (_arg1 * OGlobal.Scale); } public function set prY(_arg1:Number):void{ this.iY = _arg1; this.y = (_arg1 * OGlobal.Scale); } public function Pos(_arg1:Number, _arg2:Number):void{ this.iX = _arg1; this.iY = _arg2; this.x = (this.iX * OGlobal.Scale); this.y = (this.iY * OGlobal.Scale); } public function set prVisible(_arg1:Boolean):void{ this.visible = _arg1; } public function moveTo(_arg1:Number, _arg2:Number):void{ this.graphics.moveTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale)); } public function get prX():Number{ return (this.iX); } public function get prY():Number{ return (this.iY); } public function Free():void{ var _local1:DisplayObject; while (this.numChildren) { _local1 = this.getChildAt(0); if ((_local1 is OSprite)){ (_local1 as OSprite).Free(); }; this.removeChildAt(0); }; } public function lineTo(_arg1:Number, _arg2:Number):void{ this.graphics.lineTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale)); } public function get prHeight():Number{ return ((this.height / OGlobal.Scale)); } public function get prWidth():Number{ return ((this.width / OGlobal.Scale)); } public function Move(_arg1:Number, _arg2:Number):void{ Pos((this.iX + _arg1), (this.iY + _arg2)); } public static function Make(_arg1:Array):OSprite{ var _local2:OSprite; var _local3:int; var _local4:int; _local2 = new (OSprite); _local3 = _arg1[1].length; _local4 = 0; while (_local4 < _local3) { _local2.addChild(_arg1[1][_local4][0](_arg1[1][_local4])); _local4++; }; _local2.Pos(_arg1[2], _arg1[3]); return (_local2); } } }//package ENGINE.DISPLAY
Section 16
//OGame (ENGINE.GAME.OGame) package ENGINE.GAME { import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; public class OGame { protected var iSTableSize:int; protected var iCache:OCache; protected var iPlayer:OPlayer; protected var iRNDFactor:int; protected var iModes:int; protected var iScores:OScoresTable; public static const catGlobal:String = "Global"; public static const catTmp:String = "Tmp"; protected static const strgMusicVolume:String = "Music Volume"; protected static const strgResX:String = "ResX"; protected static const strgResY:String = "ResY"; protected static const strgСurPlayer:String = "Current Player"; protected static const strgFullScreen:String = "Full Screen"; protected static const strgSoundVolume:String = "Sound Volume"; protected static const strgLocalScores:String = "Local Scores"; public static const catPlayers:String = "Players"; public function OGame(_arg1:int=1, _arg2:int=10, _arg3:int=10){ var _local4:String; super(); this.iModes = _arg1; this.iSTableSize = _arg2; registerClassAlias("OCacheClass", OCache); registerClassAlias("OGameParamsClass", OGameParams); registerClassAlias("OScoreParamsClass", OScoreParams); registerClassAlias("OScoresTableClass", OScoresTable); registerClassAlias("OPlayerClass", OPlayer); this.LoadCache(); _local4 = this.iCache.GetCategoryItem(catGlobal, strgСurPlayer); if (_local4){ this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local4); this.iScores = this.iCache.GetCategoryItem(catGlobal, strgLocalScores); this.InitAfterLoadCache(); } else { this.iScores = new OScoresTable(_arg1, this.iSTableSize); this.DefaultInitLocalScores(); this.iCache.SetCategoryItem(catGlobal, strgLocalScores, this.iScores); this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, 1); this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, 1); this.iCache.SetCategoryItem(catGlobal, strgResX, OGlobal.StageRect.width); this.iCache.SetCategoryItem(catGlobal, strgResY, OGlobal.StageRect.height); this.iCache.SetCategoryItem(catGlobal, strgFullScreen, false); }; OSound.SoundVolume = this.prSoundVolume; OSound.MusicVolume = this.prMusicVolume; } public function set prFullScreen(_arg1:Boolean):void{ this.iCache.SetCategoryItem(catGlobal, strgFullScreen, _arg1); } public function set prMode(_arg1:int):void{ this.iPlayer.iMode = _arg1; } public function get prGamesStartCount():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart); } public function get prLevelScore():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore); } public function set prPassword(_arg1:String):void{ this.iPlayer.iPassword = _arg1; } public function DeletePlayer(_arg1:String):String{ var _local2:String; var _local3:Array; _local2 = (this.iPlayer) ? this.iPlayer.iName : ""; this.iCache.DeleteCategoryItem(catPlayers, _arg1); if (_arg1 == _local2){ _local3 = this.iCache.GetCategoryNames(catPlayers); if (!_local3){ this.iPlayer = null; return (null); }; this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local3[0]); this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _local3[0]); }; return ((this.iPlayer) ? this.iPlayer.iName : null); } public function get prPlayerNames():Array{ return (this.iCache.GetCategoryNames(catPlayers)); } public function ClearPersonalScores(_arg1:int):void{ this.iPlayer.iScoreTable.Clear(_arg1); } public function GetPersonalRecord(_arg1:int):int{ return (this.iPlayer.iScoreTable.GetRecord(_arg1)); } public function InitAfterLoadCache():void{ } public function AddScore(_arg1:int):void{ this.iPlayer.iGParams[this.iPlayer.iMode].iScore = (this.iPlayer.iGParams[this.iPlayer.iMode].iScore + _arg1); } public function get prPlayersData(){ var _local1:OCache; var _local2:ByteArray; _local1 = this.iCache.GetItem(catPlayers); _local2 = _local1.Pack(); _local2.uncompress(); _local1 = _local2.readObject(); return (_local1); } public function IsPersonalRecord(_arg1:int, _arg2:int):Boolean{ return (this.iPlayer.iScoreTable.IsRecord(_arg1, _arg2)); } public function LoadCache():void{ var so:SharedObject; var a:ByteArray; so = SharedObject.getLocal(OGlobal.AppName); if (so.data.iData == undefined){ this.iCache = new OCache(); } else { try { a = so.data.iData; a.uncompress(); this.iCache = a.readObject(); } catch(error:Error) { this.iCache = new OCache(); }; }; so.close(); } public function NewGame():void{ this.iPlayer.iGParams[this.iPlayer.iMode].iLevel = 0; this.iPlayer.iGParams[this.iPlayer.iMode].iScore = 0; this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = 0; this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = null; this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++; } public function get prLevel():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevel); } public function get prSoundVolume():Number{ return (this.iCache.GetCategoryItem(catGlobal, strgSoundVolume)); } public function get prPlayerName():String{ return ((this.iPlayer) ? this.iPlayer.iName : ""); } public function get prScore():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iScore); } public function NextLevel():Boolean{ this.iPlayer.iGParams[this.iPlayer.iMode].iLevel++; return (true); } public function set prPlayersData(_arg1):void{ this.iCache.SetItem(catPlayers, _arg1); } public function Read(_arg1:String, _arg2:String){ return (this.iCache.GetCategoryItem(_arg1, _arg2)); } public function get prSavedGame():String{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame); } public function set prResX(_arg1:int):void{ this.iCache.SetCategoryItem(catGlobal, strgResX, _arg1); } public function get prRNDFactor():int{ return (this.iPlayer.iRNDFactor); } public function get prMusicVolume():Number{ return (this.iCache.GetCategoryItem(catGlobal, strgMusicVolume)); } public function Write(_arg1:String, _arg2:String, _arg3):void{ this.iCache.SetCategoryItem(_arg1, _arg2, _arg3); } public function Start():void{ this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++; } public function get prPassword():String{ return ((this.iPlayer.iPassword) ? this.iPlayer.iPassword : ""); } public function get prMode():int{ return (this.iPlayer.iMode); } public function End():void{ this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd++; } public function set prSoundVolume(_arg1:Number):void{ OSound.SoundVolume = _arg1; this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, _arg1); } public function SetLevelScore(_arg1:int):void{ this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = _arg1; } public function GetLocalScores(_arg1:int, _arg2:int):OScoreParams{ return (this.iScores.GetScore(_arg1, _arg2)); } public function GetPersonalScores(_arg1:int, _arg2:int):OScoreParams{ return (this.iPlayer.iScoreTable.GetScore(_arg1, _arg2)); } public function AddScoreInTable(_arg1:int):Boolean{ var _local2:Boolean; _local2 = false; if (this.iScores.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel)){ this.iCache.SetCategoryItem(OGame.catGlobal, OGame.strgLocalScores, this.iScores); _local2 = true; }; if (this.iPlayer.iScoreTable.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel, true)){ this.iCache.SetCategoryItem(OGame.catPlayers, this.prPlayerName, this.iPlayer); _local2 = true; }; return (_local2); } public function get prResX():int{ return (this.iCache.GetCategoryItem(catGlobal, strgResX)); } public function get prResY():int{ return (this.iCache.GetCategoryItem(catGlobal, strgResY)); } public function set prPlayerName(_arg1:String):void{ var _local2:OPlayer; _local2 = this.iCache.GetCategoryItem(catPlayers, _arg1); if (!_local2){ _local2 = new OPlayer(_arg1, "", this.iModes, this.iSTableSize); this.iCache.SetCategoryItem(catPlayers, _arg1, _local2); }; this.iPlayer = _local2; this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _arg1); } public function DefaultInitLocalScores():void{ this.iScores.Clear(0); this.iScores.AddScore("Emily", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Michael", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Jacob", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Isabella", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Madison", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3))); this.iScores.SortOn(0); } public function SaveCache():Boolean{ var _local1:SharedObject; var _local2:String; _local1 = SharedObject.getLocal(OGlobal.AppName); _local1.data.iData = this.iCache.Pack(); _local2 = _local1.flush(); _local1.close(); return ((_local2 == SharedObjectFlushStatus.FLUSHED)); } public function set prResY(_arg1:int):void{ this.iCache.SetCategoryItem(catGlobal, strgResY, _arg1); } public function SetSaveGame(_arg1:String):void{ this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = _arg1; } public function get prGamesEndCount():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd); } public function set prMusicVolume(_arg1:Number):void{ OSound.MusicVolume = _arg1; this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, _arg1); } public function get prFullScreen():Boolean{ return (this.iCache.GetCategoryItem(catGlobal, strgFullScreen)); } public function ClearLocalScores(_arg1:int):void{ this.iScores.Clear(_arg1); } } }//package ENGINE.GAME
Section 17
//OGameParams (ENGINE.GAME.OGameParams) package ENGINE.GAME { public class OGameParams { public var iLevel:int; public var iScore:int; public var iSavedGame:String; public var iCGamesEnd:int; public var iLevelScore:int; public var iCGamesStart:int; } }//package ENGINE.GAME
Section 18
//OPlayer (ENGINE.GAME.OPlayer) package ENGINE.GAME { public class OPlayer { public var iPassword:String; public var iScoreTable:OScoresTable; public var iGParams:Array; public var iMode:int; public var iRNDFactor:int; public var iName:String; public function OPlayer(_arg1:String=null, _arg2:String=null, _arg3:int=1, _arg4:int=10, _arg5:int=10){ var _local6:int; super(); this.iName = _arg1; this.iPassword = _arg2; this.iGParams = new Array(_arg3); this.iRNDFactor = Math.round((Math.random() * (_arg5 - 1))); _local6 = 0; while (_local6 < _arg3) { this.iGParams[_local6] = new OGameParams(); _local6++; }; this.iScoreTable = new OScoresTable(_arg3, _arg4); } } }//package ENGINE.GAME
Section 19
//OScoreParams (ENGINE.GAME.OScoreParams) package ENGINE.GAME { public class OScoreParams { public var iScore:int; public var iName:String; public var iLevel:int; public var iTime:Number; public function OScoreParams(_arg1:String=null, _arg2:int=0, _arg3:int=0){ var _local4:Date; super(); this.iName = _arg1; this.iScore = _arg2; _local4 = new Date(); this.iTime = _local4.time; } } }//package ENGINE.GAME
Section 20
//OScoresTable (ENGINE.GAME.OScoresTable) package ENGINE.GAME { public class OScoresTable { public var iTable:Array; public var iMaxElements:int; public function OScoresTable(_arg1:int=1, _arg2:int=10){ var _local3:int; super(); this.iMaxElements = _arg2; this.iTable = new Array(); _local3 = 0; while (_local3 < _arg1) { this.iTable[_local3] = new Array(); _local3++; }; } public function FindByName(_arg1:int, _arg2:String):int{ var _local3:int; _local3 = 0; while (_local3 < this.iTable[_arg1].length) { if (this.iTable[_arg1][_local3].iName == _arg2){ return (_local3); }; _local3++; }; return (-1); } public function Clear(_arg1:int):void{ this.iTable[_arg1] = new Array(); } public function GetRecord(_arg1:int):int{ if (!this.iTable[_arg1].length){ return (0); }; return (this.iTable[_arg1][0].iScore); } public function AddScore(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean=false):Boolean{ var _local6:Array; var _local7:int; _local6 = this.iTable[_arg3]; if ((((_local6.length < this.iMaxElements)) || ((_local6[(_local6.length - 1)].iScore < _arg2)))){ _local7 = (_arg5) ? -1 : this.FindByName(_arg3, _arg1); if (_local7 >= 0){ if (_arg2 < _local6[_local7].iScore){ return (false); }; _local6[_local7] = new OScoreParams(_arg1, _arg2, _arg4); this.SortOn(_arg3); return (true); }; if (_local6.length < this.iMaxElements){ _local6[_local6.length] = new OScoreParams(_arg1, _arg2, _arg4); this.SortOn(_arg3); return (true); }; if (_local6[(_local6.length - 1)].iScore > _arg2){ return (false); }; _local6[(_local6.length - 1)] = new OScoreParams(_arg1, _arg2, _arg4); this.SortOn(_arg3); return (true); }; return (false); } public function IsRecord(_arg1:int, _arg2:int):Boolean{ if (!this.iTable[_arg1].length){ return (true); }; return ((_arg2 >= this.iTable[_arg1][0].iScore)); } public function GetScore(_arg1:int, _arg2:int):OScoreParams{ return (this.iTable[_arg1][_arg2]); } public function SortOn(_arg1:int):void{ this.iTable[_arg1] = this.iTable[_arg1].sortOn("iScore", (Array.DESCENDING | Array.NUMERIC)); } } }//package ENGINE.GAME
Section 21
//OA_Alpha (ENGINE.INTERFACE.ANIMATORS.OA_Alpha) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OA_Alpha extends OAnimator { public var iEAlpha:Number; private var iDAlpha:Number; public var iSAlpha:Number; private var iEndAlpha:Number; public var iPIter:int; public function OA_Alpha(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:Number; _local1 = ((this.iSAlpha)>=0) ? this.iSAlpha : this.iTarget.alpha; this.iEndAlpha = ((this.iEAlpha)>=0) ? this.iEAlpha : this.iTarget.alpha; this.iDAlpha = ((this.iEndAlpha - _local1) / iPIter); this.iTarget.visible = true; this.iTarget.alpha = _local1; return (((Math.abs(this.iDAlpha) > 0.001)) ? stPlay : stEnd); } override public function Play():void{ var _local1:Number; _local1 = (this.iTarget.alpha + this.iDAlpha); if ((((((this.iDAlpha > 0)) && ((_local1 >= this.iEndAlpha)))) || ((((this.iDAlpha <= 0)) && ((_local1 <= this.iEndAlpha)))))){ this.iTarget.alpha = this.iEndAlpha; if (this.iTarget.alpha == 0){ this.iTarget.visible = false; }; this.State = OAnimator.stEnd; } else { this.iTarget.alpha = _local1; }; } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_Alpha{ return (new OA_Alpha(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 22
//OA_AlphaFade (ENGINE.INTERFACE.ANIMATORS.OA_AlphaFade) package ENGINE.INTERFACE.ANIMATORS { import flash.display.*; import ENGINE.INTERFACE.*; public class OA_AlphaFade extends OAnimator { public var iEAlpha:Number; public var iEInd:Array; private var iEndAlpha:Array; private var iCurAlpha:Number; private var iDAlpha:Array; private var iStartAlpha:Array; public var iSInd:Array; public var iSAlpha:Number; public var iPIter:int; public function OA_AlphaFade(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:int; var _local2:int; var _local3:DisplayObject; var _local4:DisplayObject; if ((((this.iSInd == null)) && ((this.iEInd == null)))){ return (OAnimator.stEnd); }; if (this.iSInd.length != this.iEInd.length){ return (OAnimator.stEnd); }; _local1 = this.iSInd.length; this.iStartAlpha = new Array(_local1); this.iEndAlpha = new Array(_local1); this.iDAlpha = new Array(_local1); _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iSInd[_local2]); _local4 = this.iTarget.getChildAt(this.iEInd[_local2]); this.iStartAlpha[_local2] = ((this.iSAlpha)>=0) ? this.iSAlpha : _local3.alpha; this.iEndAlpha[_local2] = ((this.iEAlpha)>=0) ? this.iEAlpha : _local4.alpha; this.iDAlpha[_local2] = ((this.iEndAlpha[_local2] - this.iStartAlpha[_local2]) / iPIter); _local3.alpha = this.iStartAlpha[_local2]; _local3.visible = true; _local4.alpha = this.iEndAlpha[_local2]; _local4.visible = true; _local2++; }; this.iCurAlpha = this.iStartAlpha[0]; return (OAnimator.stPlay); } override public function Play():void{ var _local1:DisplayObject; var _local2:DisplayObject; var _local3:int; var _local4:int; this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]); _local3 = this.iSInd.length; if ((((((this.iDAlpha[0] > 0)) && ((this.iCurAlpha >= this.iEndAlpha[0])))) || ((((this.iDAlpha[0] <= 0)) && ((this.iCurAlpha <= this.iEndAlpha[0])))))){ _local4 = 0; while (_local4 < _local3) { _local1 = this.iTarget.getChildAt(this.iSInd[_local4]); _local2 = this.iTarget.getChildAt(this.iEInd[_local4]); _local1.alpha = this.iEndAlpha[_local4]; if (_local1.alpha == 0){ _local1.visible = false; }; _local2.alpha = this.iStartAlpha[_local4]; if (_local2.alpha == 0){ _local2.visible = false; }; _local4++; }; this.State = OAnimator.stEnd; } else { _local4 = 0; while (_local4 < _local3) { _local1 = this.iTarget.getChildAt(this.iSInd[_local4]); _local2 = this.iTarget.getChildAt(this.iEInd[_local4]); _local1.alpha = (_local1.alpha + this.iDAlpha[_local4]); _local2.alpha = (_local2.alpha - this.iDAlpha[_local4]); _local4++; }; }; } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_AlphaFade{ return (new OA_AlphaFade(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 23
//OA_AlphaInd (ENGINE.INTERFACE.ANIMATORS.OA_AlphaInd) package ENGINE.INTERFACE.ANIMATORS { import flash.display.*; import ENGINE.INTERFACE.*; public class OA_AlphaInd extends OAnimator { public var iEAlpha:Number; private var iCurAlpha:Number; private var iEndAlpha:Array; private var iDAlpha:Array; public var iInd:Array; public var iSAlpha:Number; public var iPIter:int; public function OA_AlphaInd(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:int; var _local2:int; var _local3:DisplayObject; var _local4:Number; if (((!(this.iInd)) || ((this.iInd.length == 0)))){ return (stEnd); }; _local1 = this.iInd.length; this.iEndAlpha = new Array(_local1); this.iDAlpha = new Array(_local1); _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iInd[_local2]); _local4 = ((this.iSAlpha)>=0) ? this.iSAlpha : _local3.alpha; this.iEndAlpha[_local2] = ((this.iEAlpha)>=0) ? this.iEAlpha : _local3.alpha; this.iDAlpha[_local2] = ((this.iEndAlpha[_local2] - _local4) / iPIter); _local3.visible = true; _local3.alpha = _local4; _local2++; }; this.iCurAlpha = this.iTarget.getChildAt(this.iInd[0]).alpha; return (((Math.abs(this.iDAlpha[0]) > 0.001)) ? stPlay : stEnd); } override public function Play():void{ var _local1:int; var _local2:int; var _local3:DisplayObject; this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]); _local1 = this.iInd.length; if ((((((this.iDAlpha[0] > 0)) && ((this.iCurAlpha >= this.iEndAlpha[0])))) || ((((this.iDAlpha[0] <= 0)) && ((this.iCurAlpha <= this.iEndAlpha[0])))))){ _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iInd[_local2]); _local3.alpha = this.iEndAlpha[_local2]; _local3.visible = (_local3.alpha > 0); _local2++; }; this.State = stEnd; } else { _local2 = 0; while (_local2 < _local1) { _local3 = this.iTarget.getChildAt(this.iInd[_local2]); _local3.alpha = (_local3.alpha + this.iDAlpha[_local2]); _local2++; }; }; } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_AlphaInd{ return (new OA_AlphaInd(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 24
//OA_Scale (ENGINE.INTERFACE.ANIMATORS.OA_Scale) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OA_Scale extends OAnimator { public var iSScale:Number; private var iEndScale:Number; public var iEScale:Number; private var iDScale:Number; public var iPIter:int; public function OA_Scale(_arg1:Object, _arg2:OIObject=null){ super(_arg1, _arg2); } override protected function Start():int{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = ((this.iSScale)>=0) ? this.iSScale : this.iTarget.scaleX; this.iEndScale = ((this.iEScale)>=0) ? this.iEScale : this.iTarget.scaleX; this.iDScale = ((this.iEndScale - _local1) / iPIter); _local2 = this.iTarget.prWidth; _local3 = this.iTarget.prHeight; this.iTarget.scaleX = _local1; this.iTarget.scaleY = _local1; this.iTarget.Move(((_local2 - this.iTarget.prWidth) / 2), ((_local3 - this.iTarget.prHeight) / 2)); return (((Math.abs(this.iDScale) > 1E-5)) ? stPlay : stEnd); } override public function Play():void{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = this.iTarget.prWidth; _local2 = this.iTarget.prHeight; _local3 = (this.iTarget.scaleX + this.iDScale); if ((((((this.iDScale > 0)) && ((_local3 >= this.iEndScale)))) || ((((this.iDScale <= 0)) && ((_local3 <= this.iEndScale)))))){ this.iTarget.scaleX = this.iEndScale; this.iTarget.scaleY = this.iEndScale; this.State = OAnimator.stEnd; } else { this.iTarget.scaleX = (this.iTarget.scaleX + this.iDScale); this.iTarget.scaleY = (this.iTarget.scaleY + this.iDScale); }; this.iTarget.Move(((_local1 - this.iTarget.prWidth) / 2), ((_local2 - this.iTarget.prHeight) / 2)); } public static function Make(_arg1:Object, _arg2:OIObject=null):OA_Scale{ return (new OA_Scale(_arg1, _arg2)); } } }//package ENGINE.INTERFACE.ANIMATORS
Section 25
//OAnimator (ENGINE.INTERFACE.ANIMATORS.OAnimator) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OAnimator { private var iState:int; protected var iTarget:OIObject; public static const stStart:int = 1; public static const stEnd:int = 3; public static const stPause:int = 0; public static const stReturn:int = 4; public static const stPlay:int = 2; public function OAnimator(_arg1:Object, _arg2:OIObject=null){ var _local3:String; super(); for (_local3 in _arg1) { if (this.hasOwnProperty(_local3)){ this[_local3] = _arg1[_local3]; }; }; this.iTarget = _arg2; this.State = stPause; } public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stStart: this.State = this.Start(); break; case stReturn: this.State = Return(); break; }; } public function Play():void{ this.State = stEnd; } public function set prTarget(_arg1:OIObject):void{ this.iTarget = _arg1; } protected function Start():int{ return (stPlay); } public function get State():int{ return (this.iState); } public function Return():int{ return (stPlay); } public function OnEnterFrame():void{ if (this.iState == stPlay){ Play(); }; } } }//package ENGINE.INTERFACE.ANIMATORS
Section 26
//OAnimatorManager (ENGINE.INTERFACE.ANIMATORS.OAnimatorManager) package ENGINE.INTERFACE.ANIMATORS { import ENGINE.INTERFACE.*; public class OAnimatorManager { private var iPlaying:Array; private var iTarget:OIObject; public static const anActivate:int = 2; public static const anDeactivate:int = 3; public static const anShow:int = 0; public static const iAnimatorsCount:int = 10; public static const anHide:int = 1; public static const anPress:int = 8; public static const anRoolOver:int = 6; public static const anUnpress:int = 9; public static const anFocusOut:int = 5; public static const anRoolOut:int = 7; public static const anUncheck:int = 10; public static const anCheck:int = 9; public static const anFocusIn:int = 4; public static const iNullAnimators:Array = [null, null, null, null, null, null, null, null, null, null]; public function OAnimatorManager(_arg1:OIObject){ this.iTarget = _arg1; this.iPlaying = new Array(); } public function get prAnimation():Boolean{ return ((iPlaying.length > 0)); } public function AddAnimator(_arg1:Object):void{ var _local2:*; if (_arg1 == null){ return; }; if (this.iPlaying.length > 0){ this.iPlaying[0].Return(); }; _local2 = _arg1.F(_arg1); _local2.prTarget = this.iTarget; this.iPlaying.push(_local2); } public function OnEnterFrame():void{ if (this.iPlaying.length == 0){ return; }; switch (this.iPlaying[0].State){ case OAnimator.stEnd: this.iPlaying[0] = null; this.iPlaying.splice(0, 1); break; case OAnimator.stPause: this.iPlaying[0].State = OAnimator.stStart; break; case OAnimator.stPlay: this.iPlaying[0].Play(); break; }; } public function Free():void{ this.iTarget = null; this.iPlaying = null; } } }//package ENGINE.INTERFACE.ANIMATORS
Section 27
//OHtmlTextField (ENGINE.INTERFACE.ELEMENTS.OHtmlTextField) package ENGINE.INTERFACE.ELEMENTS { import ENGINE.DISPLAY.*; import flash.display.*; import flash.text.*; import ENGINE.CORE.*; public class OHtmlTextField extends TextField { private var iTextFormat:TextFormat; public function OHtmlTextField(_arg1:Number, _arg2:Number, _arg3, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Array, _arg8:String, _arg9:Number, _arg10:Number, _arg11:Boolean=true){ var _local12:Number; var _local13:Sprite; super(); _local12 = (_arg11) ? OGlobal.Scale : 1; this.type = TextFieldType.DYNAMIC; this.autoSize = TextFieldAutoSize.NONE; this.multiline = true; this.wordWrap = true; this.selectable = false; if (_arg3){ _local13 = ((_arg3 is Sprite)) ? (_arg3 as Sprite) : new ((_arg3 as Class)); if ((_local13.getChildAt(0) is TextField)){ this.iTextFormat = (_local13.getChildAt(0) as TextField).getTextFormat(); } else { this.iTextFormat = this.defaultTextFormat; }; } else { this.iTextFormat = this.defaultTextFormat; }; this.iTextFormat.size = (_arg4 * _local12); this.iTextFormat.letterSpacing = (_arg5 * _local12); this.iTextFormat.color = ODisplay.HSBToRGB(_arg7[0], _arg7[1], _arg7[2]); this.iTextFormat.align = TextFormatAlign.LEFT; this.defaultTextFormat = this.iTextFormat; this.prText = _arg8; this.width = (_arg1 * _local12); this.height = (_arg2 * _local12); this.x = (_arg9 * _local12); this.y = (_arg10 * _local12); this.border = _arg6; } public function set prText(_arg1:String):void{ this.htmlText = _arg1; } public function set prFormat(_arg1:TextFormat):void{ this.iTextFormat = _arg1; this.defaultTextFormat = _arg1; this.setTextFormat(this.iTextFormat); } public function get prText():String{ return (this.htmlText); } public function get prFormat():TextFormat{ return (this.iTextFormat); } } }//package ENGINE.INTERFACE.ELEMENTS
Section 28
//OInputTextField (ENGINE.INTERFACE.ELEMENTS.OInputTextField) package ENGINE.INTERFACE.ELEMENTS { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import flash.text.*; import ENGINE.CORE.*; public class OInputTextField extends TextField { private var iTextFormat:TextFormat; public function OInputTextField(_arg1:Number, _arg2:Number, _arg3, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Array, _arg8:String, _arg9:int, _arg10:Number, _arg11:Number){ var _local12:Number; var _local13:Sprite; super(); _local12 = OGlobal.Scale; this.type = TextFieldType.INPUT; this.autoSize = TextFieldAutoSize.NONE; this.embedFonts = true; _local13 = ((_arg3 is Sprite)) ? (_arg3 as Sprite) : new ((_arg3 as Class)); if ((_local13.getChildAt(0) is TextField)){ this.iTextFormat = (_local13.getChildAt(0) as TextField).getTextFormat(); } else { this.iTextFormat = this.defaultTextFormat; }; this.iTextFormat.size = (_arg4 * _local12); this.iTextFormat.letterSpacing = (_arg5 * _local12); this.iTextFormat.color = ODisplay.HSBToRGB(_arg7[0], _arg7[1], _arg7[2]); this.defaultTextFormat = this.iTextFormat; this.prText = _arg8; this.width = (_arg1 * _local12); this.height = (_arg2 * _local12); this.x = (_arg10 * _local12); this.y = (_arg11 * _local12); this.border = _arg6; this.maxChars = _arg9; this.restrict = "A-Za-z0-9 @._\\-"; this.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, OnFocusIn); } public function set prText(_arg1:String):void{ this.text = (((!(_arg1)) || ((_arg1 == "")))) ? " " : _arg1; } protected function OnFocusIn(_arg1:FocusEvent):void{ this.setTextFormat(this.iTextFormat); } public function set prFormat(_arg1:TextFormat):void{ this.iTextFormat = _arg1; this.defaultTextFormat = _arg1; this.setTextFormat(this.iTextFormat); } public function get prText():String{ var _local1:String; _local1 = this.text; while (_local1.charAt() == " ") { _local1 = _local1.substr(1); }; while (_local1.charAt((_local1.length - 1)) == " ") { _local1 = _local1.substr(0, (_local1.length - 1)); }; return (_local1); } public function get prFormat():TextFormat{ return (this.iTextFormat); } } }//package ENGINE.INTERFACE.ELEMENTS
Section 29
//OListBoxElement (ENGINE.INTERFACE.ELEMENTS.OListBoxElement) package ENGINE.INTERFACE.ELEMENTS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ANIMATORS.*; public class OListBoxElement extends OButton { public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:3}, null, null, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0.6, iInd:[1], iPIter:3}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:1, iInd:[1], iPIter:3}, {F:OA_AlphaInd.Make, iSAlpha:0, iEAlpha:1, iInd:[0], iPIter:9}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0, iInd:[0], iPIter:9}]; public function OListBoxElement(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = (_arg2) ? _arg2 : iDefAnimators; super(_arg1, _local3); } override public function OnMouseUp(_arg1:MouseEvent):void{ } override public function OnRollOut(_arg1:MouseEvent):void{ this.prRool = false; } override public function OnMouseDown(_arg1:MouseEvent):void{ if (((this.prPress) && ((this.parent is OIObject)))){ (this.parent as OIObject).OnPress(_arg1, this); return; }; super.OnMouseDown(_arg1); } } }//package ENGINE.INTERFACE.ELEMENTS
Section 30
//OAlert (ENGINE.INTERFACE.OAlert) package ENGINE.INTERFACE { import flash.events.*; public class OAlert extends ODialog { protected var iMessages:Array; public var iButtons:Array; public function OAlert(_arg1:Array, _arg2:Array, _arg3:Array=null){ var _local4:Array; this.iMessages = _arg2; _local4 = (_arg3) ? _arg3 : ODialog.iDefAnimators; super(_arg1, _local4); } override public function Init():void{ this.iButtons = new Array(); super.Init(); } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:int; var _local4:int; if (((!(this.iMessages)) || (!(this.iButtons)))){ this.prVisible = false; return; }; _local3 = 0; _local4 = 0; while (_local4 < this.iButtons.length) { if ((((_arg2 == this.iButtons[_local4])) && ((_local4 < this.iMessages.length)))){ if ((this.parent is OIObject)){ (this.parent as OIObject).OnPress(null, iMessages[_local4]); }; this.prVisible = false; return; }; _local4++; }; } override public function Free():void{ this.iButtons = null; super.Free(); } } }//package ENGINE.INTERFACE
Section 31
//OApplication (ENGINE.INTERFACE.OApplication) package ENGINE.INTERFACE { import flash.events.*; import flash.display.*; import ENGINE.CORE.*; import flash.external.*; public class OApplication extends OWindow { private var iStaged:Boolean;// = false protected var iBackground:OBackground; protected var iMenuItem:Array; public function OApplication(_arg1:String){ iStaged = false; OGlobal.AppName = _arg1; if (this.stage){ OGlobal.SetDomain(); this.InitStage(); }; super(null); if (!this.iStaged){ this.addEventListener(Event.ENTER_FRAME, NotStagedEnterFrame); }; } private function NotStagedEnterFrame(_arg1:Event):void{ if (!iStaged){ if (!this.stage){ return; }; OGlobal.SetDomain(); this.InitStage(); this.Init(); this.removeEventListener(Event.ENTER_FRAME, NotStagedEnterFrame); this.iStaged = true; }; } override public function Init():void{ if (!this.stage){ return; }; super.Init(); this.iMenuItem = new Array(); this.iStaged = true; this.visible = true; } protected function OnMenuItem():void{ } public function get prMenuItem():int{ return ((this.iMenuItem.length) ? this.iMenuItem.pop() : -1); } public function set prMenuItem(_arg1:int):void{ this.iMenuItem.push(_arg1); } public function OnResize(_arg1:Event):void{ this.Free(); this.InitStage(); this.Init(); } override public function Free():void{ OGlobal.prStage.removeEventListener(Event.DEACTIVATE, OnDeactivate); OGlobal.prStage.removeEventListener(Event.RESIZE, OnResize); this.iMenuItem = null; super.Free(); } public function InitBackground(_arg1:Array, _arg2:int=0):void{ this.iBackground = new OBackground(_arg1, _arg2); this.addChildAt(this.iBackground, 0); } protected function OnDeactivate(_arg1:Event):void{ } public function InitStage(_arg1:Stage=null):void{ var _local2:String; var _local3:int; if (((_arg1) || (this.stage))){ OGlobal.prStage = (_arg1) ? _arg1 : this.stage; }; if (!OGlobal.prStage){ return; }; OGlobal.prStage.scaleMode = StageScaleMode.NO_SCALE; OGlobal.prStage.align = StageAlign.TOP_LEFT; OGlobal.prStage.quality = StageQuality.BEST; OGlobal.prStage.stageFocusRect = false; OGlobal.Rescale(this); OGlobal.FPS = 60; if (ExternalInterface.available){ _local2 = ("function getInternetExplorerVersion() { var rv = -1; if (navigator.appName == \"Microsoft Internet Explorer\") { var ua = navigator.userAgent;" + "var re = new RegExp(\"MSIE ([0-9]{1,}[.0-9]{0,})\"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; }"); _local3 = ExternalInterface.call(_local2); if (_local3 > 0){ OGlobal.FPS = (OGlobal.FPS * 2); }; }; OGlobal.prStage.frameRate = OGlobal.FPS; OGlobal.prStage.addEventListener(Event.RESIZE, OnResize); OGlobal.prStage.addEventListener(Event.DEACTIVATE, OnDeactivate); } } }//package ENGINE.INTERFACE
Section 32
//OBackground (ENGINE.INTERFACE.OBackground) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.CORE.*; public class OBackground extends OSprite { protected var iImages:Array; protected var iIInd:int;// = 0 public function OBackground(_arg1:Array, _arg2:int=0){ iIInd = 0; super(); this.iImages = _arg1; this.prIInd = _arg2; } public function Make():void{ var _local1:Sprite; var _local2:BitmapData; var _local3:OBM; var _local4:Rectangle; var _local5:Rectangle; var _local6:int; var _local7:int; var _local8:Number; var _local9:int; var _local10:Bitmap; var _local11:int; var _local12:OBitmap; if (this.iImages == null){ return; }; this.Free(); if ((this.iImages[this.iIInd] is Class)){ _local1 = new (this.iImages[this.iIInd]); _local2 = new BitmapData(_local1.width, _local1.height, false, 4294967295); _local2.draw(_local1); }; if ((this.iImages[this.iIInd] is BitmapData)){ _local2 = this.iImages[this.iIInd]; _local1 = new Sprite(); _local10 = new Bitmap(_local2); _local1.addChild(_local10); }; _local3 = new OBM(_local2, 0, 0, _local1.width, _local1.height); _local4 = OGlobal.ViewporRect; _local5 = OGlobal.StageRect; this.x = -(_local4.x); this.y = -(_local4.y); _local6 = Math.floor((_local5.width / _local1.width)); if (_local6 == 0){ return; }; _local7 = Math.floor((_local5.height / _local1.height)); if (_local7 == 0){ return; }; if ((_local5.width - (_local6 * _local1.width)) > 0){ _local6++; }; if ((_local5.height - (_local7 * _local1.height)) > 0){ _local7++; }; _local8 = OGlobal.Scale; _local9 = 0; while (_local9 < _local7) { _local11 = 0; while (_local11 < _local6) { _local12 = new OBitmap(_local3, ((_local11 * _local1.width) / _local8), ((_local9 * _local1.height) / _local8)); this.addChild(_local12); _local11++; }; _local9++; }; } override public function Free():void{ super.Free(); } public function set prIInd(_arg1:int):void{ this.iIInd = _arg1; if (this.iImages == null){ this.iIInd = -1; return; }; if (this.iIInd >= (this.iImages.length - 1)){ this.iIInd = (this.iImages.length - 1); }; Make(); } public function get prIInd():int{ return (this.iIInd); } } }//package ENGINE.INTERFACE
Section 33
//OButton (ENGINE.INTERFACE.OButton) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.ANIMATORS.*; public class OButton extends OIObject { public var iHit:OSprite; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.6, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Scale.Make, iSScale:1, iEScale:0.8, iPIter:6}, {F:OA_Scale.Make, iSScale:0.8, iEScale:1, iPIter:6}]; public function OButton(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = ((_arg2)==null) ? OButton.iDefAnimators : _arg2; super(_arg1, _local3); } override public function OnMouseUp(_arg1:MouseEvent):void{ this.prPress = false; } override public function OnRollOver(_arg1:MouseEvent):void{ this.prRool = true; } override public function Init():void{ this.useHandCursor = true; this.buttonMode = true; super.Init(); if (this.iHit){ this.iHit.visible = false; this.hitArea = this.iHit; }; } override public function OnRollOut(_arg1:MouseEvent):void{ if (this.prPress){ this.prPress = false; }; this.prRool = false; } override public function Free():void{ this.iHit = null; super.Free(); } override public function OnMouseDown(_arg1:MouseEvent):void{ this.prPress = true; if ((this.parent is OIObject)){ (this.parent as OIObject).OnPress(_arg1, this); }; } } }//package ENGINE.INTERFACE
Section 34
//OCounter (ENGINE.INTERFACE.OCounter) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ANIMATORS.*; public class OCounter extends OIObject { public var iSeparator:OIObject; public var iDigits0:Array; public var iDigits:Array; protected var iValue:int; protected var iValue0:int; protected var iWidth:Number; protected var iHeight:Number; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, null, null, null, null]; public function OCounter(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Array=null){ var _local5:Array; this.iWidth = _arg2; this.iHeight = _arg3; _local5 = (_arg4) ? _arg4 : iDefAnimators; super(_arg1, _local5); } public function set prValue0(_arg1:int):void{ this.iValue0 = Math.max(_arg1, 0); if (!this.iDigits0){ return; }; this.iValue0 = Math.min(this.iValue0, (Math.pow(10, this.iDigits0.length) - 1)); Draw(); } public function set prValue(_arg1:int):void{ this.iValue = Math.max(_arg1, 0); if (!this.iDigits){ return; }; this.iValue = Math.min(this.iValue, (Math.pow(10, this.iDigits.length) - 1)); Draw(); } override public function Init():void{ this.iDigits = new Array(); this.iDigits0 = new Array(); super.Init(); } private function Draw():void{ var _local1:Number; var _local2:String; var _local3:String; var _local4:int; var _local5:Number; var _local6:int; _local1 = 0; _local2 = this.iValue0.toString(); _local3 = this.iValue.toString(); _local4 = 0; while (_local4 < this.iDigits0.length) { this.iDigits0[_local4].prAnimationEnabled = this.iAEnabled; _local4++; }; _local4 = 0; while (_local4 < this.iDigits.length) { this.iDigits[_local4].prAnimationEnabled = this.iAEnabled; _local4++; }; if (this.iDigits0.length){ _local4 = (_local2.length - 1); while (_local4 >= 0) { this.iDigits0[_local4].prValue = (_local2.charCodeAt(_local4) - 47); _local4--; }; _local6 = (this.iDigits0.length - _local2.length); _local4 = 0; while (_local4 < _local6) { if (this.iDigits0[_local4].prValue){ this.iDigits0[_local4].prValue = 0; }; _local4++; }; }; if (this.iDigits.length){ _local4 = 0; while (_local4 < _local3.length) { this.iDigits[_local4].prValue = (_local3.charCodeAt(_local4) - 47); _local4++; }; _local6 = this.iDigits.length; _local4 = _local3.length; while (_local4 < _local6) { if (this.iDigits[_local4].prValue){ this.iDigits[_local4].prValue = 0; }; _local4++; }; }; if (this.iDigits0.length){ _local4 = (_local2.length - 1); while (_local4 >= 0) { _local1 = (_local1 + this.iDigits0[_local4].prWidth); _local4--; }; }; if (this.iSeparator){ _local1 = (_local1 + this.iSeparator.prWidth); }; if (this.iDigits.length){ _local4 = 0; while (_local4 < _local3.length) { _local1 = (_local1 + this.iDigits[_local4].prWidth); _local4++; }; }; _local5 = ((this.iWidth - _local1) / 2); if (this.iDigits0.length){ _local4 = 0; while (_local4 < this.iDigits0.length) { if (this.iDigits0[_local4].prValue){ this.iDigits0[_local4].PosValue(_local5, ((this.iWidth - this.iDigits0[_local4].prHeight) / 2)); _local5 = (_local5 + this.iDigits0[_local4].prWidth); }; _local4++; }; }; if (this.iSeparator){ this.iSeparator.Pos(_local5, ((this.iHeight - this.iSeparator.prHeight) / 2)); _local5 = (_local5 + this.iSeparator.prWidth); }; if (this.iDigits.length){ _local4 = 0; while (_local4 < this.iDigits.length) { if (this.iDigits[_local4].prValue){ this.iDigits[_local4].PosValue(_local5, ((this.iHeight - this.iDigits[_local4].prHeight) / 2)); _local5 = (_local5 + this.iDigits[_local4].prWidth); }; _local4++; }; }; } public function get prValue0():int{ return (this.iValue0); } override public function Free():void{ this.iDigits = null; this.iDigits0 = null; this.iSeparator = null; super.Free(); } public function get prValue():int{ return (this.iValue); } } }//package ENGINE.INTERFACE
Section 35
//ODialog (ENGINE.INTERFACE.ODialog) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ANIMATORS.*; public class ODialog extends OWindow { public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:12}, null, null, null, null, null, null]; public function ODialog(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = (_arg2) ? _arg2 : ODialog.iDefAnimators; super(_arg1, _local3); } override public function Init():void{ super.Init(); this.SetVisible(false); this.PosCenter(); this.prVisible = true; } } }//package ENGINE.INTERFACE
Section 36
//OInput (ENGINE.INTERFACE.OInput) package ENGINE.INTERFACE { import flash.events.*; import ENGINE.INTERFACE.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 37
//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 38
//OIObject (ENGINE.INTERFACE.OIObject) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.CORE.*; public class OIObject extends OSprite { protected var iTrigger:uint; protected var iAEnabled:Boolean;// = true protected var iAManager:OAnimatorManager; protected var iState:int; protected var iAParams:Array; protected var iParam:Array; public static var trActive:uint = 2; public static var trPress:uint = 16; public static var trRool:uint = 8; public static var trFocus:uint = 3; public static var trVisible:uint = 1; public function OIObject(_arg1:Array, _arg2:Array=null){ iTrigger = (trVisible | trActive); iAEnabled = true; super(); this.iParam = _arg1; this.iAParams = _arg2; this.Init(); } public function get prMouseEnabled():Boolean{ return (((this.prVisible) && (this.prActive))); } public function get prRool():Boolean{ return (((this.iTrigger & trRool) > 0)); } public function set prFocus(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trFocus); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anFocusIn]); }; } else { this.iTrigger = (this.iTrigger & ~(trFocus)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anFocusOut]); }; }; } override public function get prVisible():Boolean{ return (((this.iTrigger & trVisible) > 0)); } public function set prRool(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trRool); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOver]); }; } else { this.iTrigger = (this.iTrigger & ~(trRool)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOut]); }; }; } override public function set prVisible(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trVisible); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anShow], false); }; } else { this.iTrigger = (this.iTrigger & ~(trVisible)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anHide], false); }; }; if (((!(this.iAManager)) || (!(this.iAEnabled)))){ this.visible = _arg1; }; this.mouseEnabled = this.prMouseEnabled; this.mouseChildren = this.mouseEnabled; } public function OnRollOver(_arg1:MouseEvent):void{ this.prRool = true; } public function Init():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:DisplayObject; var _local5:String; if (this.iParam){ _local1 = this.iParam.length; _local2 = 0; while (_local2 < _local1) { _local3 = this.iParam[_local2].length; _local4 = this.iParam[_local2][0](this.iParam[_local2]); _local5 = this.iParam[_local2][(_local3 - 3)]; if (_local5){ if ((this[_local5] is Array)){ this[_local5][this.iParam[_local2][(_local3 - 2)]] = _local4; } else { this[_local5] = _local4; }; }; if ((_local4 is OIObject)){ (_local4 as OIObject).SetVisible(this.iParam[_local2][(_local3 - 1)]); } else { if ((_local4 is IDisplayObject)){ (_local4 as IDisplayObject).prVisible = this.iParam[_local2][(_local3 - 1)]; } else { _local4.visible = this.iParam[_local2][(_local3 - 1)]; }; }; this.addChild(_local4); _local2++; }; }; this.iAManager = (this.iAParams) ? new OAnimatorManager(this) : null; this.tabEnabled = false; this.addEventListener(Event.ENTER_FRAME, OnEnterFrame); this.addEventListener(MouseEvent.ROLL_OVER, OnRollOver); this.addEventListener(MouseEvent.ROLL_OUT, OnRollOut); this.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); this.addEventListener(MouseEvent.MOUSE_UP, OnMouseUp); } public function get prAnimationEnabled():Boolean{ return (this.iAEnabled); } public function OnMouseUp(_arg1:MouseEvent):void{ this.prPress = false; } public function set prActive(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trActive); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anActivate]); }; } else { this.iTrigger = (this.iTrigger & ~(trActive)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anDeactivate]); }; }; this.mouseEnabled = this.prMouseEnabled; this.mouseChildren = this.mouseEnabled; } public function get prPress():Boolean{ return (((this.iTrigger & trPress) > 0)); } public function get State():int{ return (this.iState); } public function OnPress(_arg1:Event, _arg2):void{ } public function OnRollOut(_arg1:MouseEvent):void{ this.prRool = false; } override public function Free():void{ this.removeEventListener(MouseEvent.MOUSE_UP, OnMouseUp); this.removeEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); this.removeEventListener(MouseEvent.ROLL_OUT, OnRollOut); this.removeEventListener(MouseEvent.ROLL_OVER, OnRollOver); this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame); super.Free(); if (this.iAManager){ this.iAManager.Free(); }; this.iAManager = null; } public function get prAnimation():Boolean{ var _local1:int; if (((this.iAManager) && (this.iAManager.prAnimation))){ return (true); }; _local1 = 0; while (_local1 < this.numChildren) { if (!(this.getChildAt(_local1) is OIObject)){ } else { if ((this.getChildAt(_local1) as OIObject).prAnimation){ return (true); }; }; _local1++; }; return (false); } public function get prActive():Boolean{ return (((this.iTrigger & trActive) > 0)); } public function PosCenter(_arg1:Number=800, _arg2:Number=600):void{ var _local3:Rectangle; _local3 = this.getBounds(this); this.Pos(OGlobal.ScaleFloor((((_arg1 - this.prWidth) - (OGlobal.ToLocal(_local3.x) * 2)) / 2)), OGlobal.ScaleFloor((((_arg2 - this.prHeight) - (OGlobal.ToLocal(_local3.y) * 2)) / 2))); } public function AddAnimator(_arg1:Object, _arg2:Boolean=true):void{ var _local3:Boolean; _local3 = (_arg2) ? ((((this.iAManager) && (this.prVisible))) && (this.iAEnabled)) : ((this.iAManager) && (this.iAEnabled)); if (_local3){ this.iAManager.AddAnimator(_arg1); }; } public function set prAnimationEnabled(_arg1:Boolean):void{ this.iAEnabled = _arg1; } public function set prPress(_arg1:Boolean):void{ if (_arg1){ this.iTrigger = (this.iTrigger | trPress); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anPress]); }; } else { this.iTrigger = (this.iTrigger & ~(trPress)); if (this.iAManager){ this.AddAnimator(this.iAParams[OAnimatorManager.anUnpress]); }; }; } public function OnMouseDown(_arg1:MouseEvent):void{ this.prPress = true; } public function OnEnterFrame(_arg1:Event):void{ if (this.iAManager){ this.iAManager.OnEnterFrame(); }; } public function SetVisible(_arg1:Boolean):void{ this.prAnimationEnabled = false; this.prVisible = _arg1; this.prAnimationEnabled = true; } public function set prAnimatorParams(_arg1:Array):void{ this.iAParams = _arg1; if (!this.iAManager){ this.iAManager = new OAnimatorManager(this); }; } public function set State(_arg1:int):void{ this.iState = _arg1; } public function get prAnimatorParams():Array{ return (this.iAParams); } public function get prFocus():Boolean{ return (((this.iTrigger & trFocus) > 0)); } } }//package ENGINE.INTERFACE
Section 39
//OListBox (ENGINE.INTERFACE.OListBox) package ENGINE.INTERFACE { import flash.events.*; import ENGINE.INTERFACE.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 40
//OProgress (ENGINE.INTERFACE.OProgress) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.geom.*; public class OProgress extends OIObject { public var iProgressBG:OBitmap; private var iPBG:OBitmap; public var iProgress:OBitmap; private var iValue:Number; public function OProgress(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } public function set prValue(_arg1:Number):void{ var _local2:int; var _local3:Rectangle; var _local4:Rectangle; if (_arg1 < 0){ _arg1 = 0; } else { if (_arg1 > 100){ _arg1 = 100; }; }; if (this.iValue != _arg1){ _local2 = Math.round(((iProgressBG.prOBM.iBM.width * _arg1) / 100)); _local3 = new Rectangle(0, 0, _local2, this.iProgressBG.prOBM.iBM.height); _local4 = new Rectangle(_local2, 0, (iProgressBG.prOBM.iBM.width - _local2), this.iProgressBG.prOBM.iBM.height); this.iProgressBG.prOBM.iBM.fillRect(this.iPBG.prOBM.iBM.rect, 0); this.iProgressBG.prOBM.iBM.copyPixels(this.iProgress.prOBM.iBM, _local3, new Point(0, 0)); this.iProgressBG.prOBM.iBM.copyPixels(this.iPBG.prOBM.iBM, _local4, new Point(_local2, 0)); }; this.iValue = _arg1; } override public function Init():void{ super.Init(); if (this.iProgressBG){ this.iPBG = this.iProgressBG.Clone(); }; } override public function Free():void{ this.iProgressBG = null; this.iProgress = null; super.Free(); } public function get prValue():Number{ return (this.iValue); } } }//package ENGINE.INTERFACE
Section 41
//OTab (ENGINE.INTERFACE.OTab) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import ENGINE.INTERFACE.ANIMATORS.*; public class OTab extends OIObject { private var iVAnimator:Object; private var iCurInd:int; protected var iWidth:Number; protected var iHeight:Number; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, null, null, null, null]; public static const iDefVAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:3}; public function OTab(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Object=null, _arg5:Array=null){ var _local6:Array; this.iWidth = _arg2; this.iHeight = _arg3; this.iVAnimator = (_arg4) ? _arg4 : iDefVAnimator; _local6 = (_arg5) ? _arg5 : iDefAnimators; super(_arg1, _local6); } override public function get prWidth():Number{ return (this.iWidth); } public function get prElements():int{ return (this.numChildren); } public function set prValue(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; } else { if (_arg1 >= this.numChildren){ _arg1 = (this.numChildren - 1); }; }; if (((this.iAEnabled) && (this.iVAnimator))){ if (this.iCurInd == _arg1){ return; }; this.iVAnimator.iSInd = [this.iCurInd]; this.iVAnimator.iEInd = [_arg1]; this.AddAnimator(this.iVAnimator, false); } else { if ((this.getChildAt(this.iCurInd) is IDisplayObject)){ (this.getChildAt(this.iCurInd) as IDisplayObject).prVisible = false; }; if ((this.getChildAt(_arg1) is IDisplayObject)){ (this.getChildAt(_arg1) as IDisplayObject).prVisible = true; }; }; this.iCurInd = _arg1; } override public function Init():void{ super.Init(); (this.getChildAt(0) as IDisplayObject).prVisible = true; } public function get prValue():int{ return (this.iCurInd); } override public function get prHeight():Number{ return (this.iHeight); } public function PosValue(_arg1:Number, _arg2:Number):void{ (this.getChildAt(this.iCurInd) as IDisplayObject).Pos((_arg1 - this.prX), (_arg2 - this.prY)); } } }//package ENGINE.INTERFACE
Section 42
//OWindow (ENGINE.INTERFACE.OWindow) package ENGINE.INTERFACE { public class OWindow extends OIObject { public function OWindow(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } } }//package ENGINE.INTERFACE
Section 43
//OEffectGel (ENGINE.SKIN.OEffectGel) package ENGINE.SKIN { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import ENGINE.CORE.*; import flash.filters.*; public class OEffectGel extends OEffect { private var iColor:uint;// = 0 private var iF2B:BlurFilter; private var iF2GG1:GradientGlowFilter; private var iF2GG2:GradientGlowFilter; private var iF0S:DropShadowFilter; private var iF1G:GlowFilter; private var iBorder:Number;// = 0 private var iF1S:DropShadowFilter; public function OEffectGel(){ iColor = 0; iBorder = 0; super(); } override public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{ var _local5:OBM; var _local6:Number; var _local7:Number; var _local8:Sprite; var _local9:Sprite; var _local10:ColorTransform; var _local11:Bitmap; var _local12:Bitmap; var _local13:Bitmap; var _local14:Sprite; var _local15:Bitmap; var _local16:Bitmap; var _local17:BitmapData; var _local18:Bitmap; _local5 = OBM.Make([null, _arg1, _arg2, _arg3, _arg4, 0]); _local6 = OGlobal.Scale; _local7 = 0.85; _local8 = new Sprite(); _local9 = new Sprite(); _local9.x = iBorder; _local9.y = iBorder; _local9.alpha = _local7; _local8.addChild(_local9); _local10 = new ColorTransform(0, 0, 0); _local10.color = this.iColor; _local11 = new Bitmap(_local5.iBM); _local11.transform.colorTransform = _local10; _local9.addChild(_local11); if (this.iF0S.distance > 0){ _local18 = new Bitmap(_local5.iBM); _local18.blendMode = "multiply"; _local18.filters = [this.iF0S]; _local9.addChild(_local18); }; _local12 = new Bitmap(_local5.iBM); _local12.blendMode = "multiply"; _local12.filters = [this.iF1S]; _local9.addChild(_local12); _local13 = new Bitmap(_local5.iBM); _local13.blendMode = "multiply"; _local13.filters = [this.iF1G]; _local9.addChild(_local13); _local14 = new Sprite(); _local14.blendMode = "layer"; _local14.filters = [this.iF2B]; _local9.addChild(_local14); _local15 = new Bitmap(_local5.iBM); _local15.blendMode = "screen"; _local15.filters = [this.iF2GG1]; _local14.addChild(_local15); _local16 = new Bitmap(_local5.iBM); _local16.blendMode = "erase"; _local16.filters = [this.iF2GG2]; _local14.addChild(_local16); _local17 = new BitmapData((_local8.width + (this.iBorder * 2)), (_local8.height + (this.iBorder * 2)), true, 0); _local17.draw(_local8); return (new OBM(_local17, (-(this.iBorder) + _local5.iX), (-(this.iBorder) + _local5.iY), _local5.iWidth, _local5.iHeight)); } override public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{ var _local4:Object; var _local5:Object; var _local6:Number; var _local7:uint; var _local8:Number; var _local9:Number; var _local10:int; var _local11:int; var _local12:Array; var _local13:Array; _local4 = this.iColors.GetItem(_arg1); _local5 = this.iFilters.GetItem(_arg2); if (_local5 == null){ return; }; _local6 = (OGlobal.Scale * _arg3); if (_local4 == null){ _local4 = new Object(); if (_arg1.search(/,/) < 0){ _local4.iCH = Number(_arg1); if (_local4.iCH == undefined){ return; }; _local4.iCH = (_local4.iCH % 360); _local10 = Math.floor((_local4.iCH / 30)); _local11 = ((_local10 + 1) % 12); _local12 = [50, 50, 60, 60, 50, 50, 40, 40, 30, 30, 40, 40]; _local4.iCS = ((_local12[_local10] + ((_local12[_local11] - _local12[_local10]) * ((_local4.iCH / 30) - _local10))) * 0.01); _local4.iCB = 1; _local4.iSH = (((_local10 % 2))==0) ? (_local4.iCH - 15) : (_local4.iCH + 15); if (_local4.iSH < 0){ _local4.iSH = (_local4.iSH + 360); }; _local4.iSS = 0.9; _local4.iSB = 0.6; } else { _local13 = _arg1.split(/,/); _local4.iCH = _local13[0]; _local4.iCS = _local13[1]; _local4.iCB = _local13[2]; _local4.iSH = _local13[3]; _local4.iSS = _local13[4]; _local4.iSB = _local13[5]; }; }; _local7 = ODisplay.HSBToRGB(_local4.iSH, _local4.iSS, _local4.iSB); this.iF0S = new DropShadowFilter((_local5.iF0SD * _local6), _local5.iAngle, ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, (_local4.iCB * 0.5)), 0.75, (_local5.iF0SB * _local6), (_local5.iF0SB * _local6), 1, 2, false, true, true); this.iF1S = new DropShadowFilter((_local5.iF1SD * _local6), _local5.iAngle, _local7, 0.85, (_local5.iF1SB * _local6), (_local5.iF1SB * _local6), 1.5, 3, true, true, true); this.iF1G = new GlowFilter(_local7, _local5.iF1GA, (_local5.iF1GB * _local6), (_local5.iF1GB * _local6), 2, 3, true, true); _local8 = ((_local6)<1) ? (_local5.iF2GGC1 * _local6) : _local5.iF2GGC1; this.iF2GG1 = new GradientGlowFilter((_local5.iF2GGD1 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local8, 0xFF], (_local5.iF2GGB1 * _local6), (_local5.iF2GGB1 * _local6), 1, 1, "inner", true); _local9 = ((_local6)<1) ? (_local5.iF2GGC2 * _local6) : _local5.iF2GGC2; this.iF2GG2 = new GradientGlowFilter((_local5.iF2GGD2 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local9, 0xFF], (_local5.iF2GGB2 * _local6), (_local5.iF2GGB2 * _local6), 1, 1, "inner", true); this.iF2B = new BlurFilter((_local5.iF2B * _local6), (_local5.iF2B * _local6)); this.iColor = ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, _local4.iCB); this.iBorder = Math.ceil((_local5.iBorder * _local6)); } } }//package ENGINE.SKIN
Section 44
//OEffectPlastic (ENGINE.SKIN.OEffectPlastic) package ENGINE.SKIN { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import ENGINE.CORE.*; import flash.filters.*; public class OEffectPlastic extends OEffect { private var iColor:uint;// = 0 private var iF2B:BlurFilter; private var iF2GG1:GradientGlowFilter; private var iF2GG2:GradientGlowFilter; private var iF0S:DropShadowFilter; private var iF1G:GlowFilter; private var iBorder:Number;// = 0 private var iF1S:DropShadowFilter; public function OEffectPlastic(){ iColor = 0; iBorder = 0; super(); } override public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{ var _local5:OBM; var _local6:Number; var _local7:Number; var _local8:Sprite; var _local9:Sprite; var _local10:ColorTransform; var _local11:Bitmap; var _local12:Bitmap; var _local13:Bitmap; var _local14:Sprite; var _local15:Bitmap; var _local16:Bitmap; var _local17:BitmapData; var _local18:Bitmap; _local5 = OBM.Make([null, _arg1, _arg2, _arg3, _arg4, 0]); _local6 = OGlobal.Scale; _local7 = 1; _local8 = new Sprite(); _local9 = new Sprite(); _local9.x = iBorder; _local9.y = iBorder; _local9.alpha = _local7; _local8.addChild(_local9); _local10 = new ColorTransform(0, 0, 0); _local10.color = this.iColor; _local11 = new Bitmap(_local5.iBM); _local11.transform.colorTransform = _local10; _local9.addChild(_local11); if (this.iF0S.distance > 0){ _local18 = new Bitmap(_local5.iBM); _local18.blendMode = "multiply"; _local18.filters = [this.iF0S]; _local9.addChild(_local18); }; _local12 = new Bitmap(_local5.iBM); _local12.blendMode = "multiply"; _local12.filters = [this.iF1S]; _local9.addChild(_local12); _local13 = new Bitmap(_local5.iBM); _local13.blendMode = "multiply"; _local13.filters = [this.iF1G]; _local9.addChild(_local13); _local14 = new Sprite(); _local14.blendMode = "layer"; _local14.filters = [this.iF2B]; _local9.addChild(_local14); _local15 = new Bitmap(_local5.iBM); _local15.blendMode = "screen"; _local15.filters = [this.iF2GG1]; _local14.addChild(_local15); _local16 = new Bitmap(_local5.iBM); _local16.blendMode = "erase"; _local16.filters = [this.iF2GG2]; _local14.addChild(_local16); _local17 = new BitmapData((_local8.width + (this.iBorder * 2)), (_local8.height + (this.iBorder * 2)), true, 0); _local17.draw(_local8); return (new OBM(_local17, (-(this.iBorder) + _local5.iX), (-(this.iBorder) + _local5.iY), _local5.iWidth, _local5.iHeight)); } override public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{ var _local4:Object; var _local5:Object; var _local6:Number; var _local7:uint; var _local8:Number; var _local9:Number; var _local10:int; var _local11:int; var _local12:Array; var _local13:Array; _local4 = this.iColors.GetItem(_arg1); _local5 = this.iFilters.GetItem(_arg2); if (_local5 == null){ return; }; _local6 = (OGlobal.Scale * _arg3); if (_local4 == null){ _local4 = new Object(); if (_arg1.search(/,/) < 0){ _local4.iCH = Number(_arg1); if (_local4.iCH == undefined){ return; }; _local4.iCH = (_local4.iCH % 360); _local10 = Math.floor((_local4.iCH / 30)); _local11 = ((_local10 + 1) % 12); _local12 = [50, 50, 60, 60, 50, 50, 40, 40, 30, 30, 40, 40]; _local4.iCS = ((_local12[_local10] + ((_local12[_local11] - _local12[_local10]) * ((_local4.iCH / 30) - _local10))) * 0.01); _local4.iCB = 1; _local4.iSH = (((_local10 % 2))==0) ? (_local4.iCH - 15) : (_local4.iCH + 15); if (_local4.iSH < 0){ _local4.iSH = (_local4.iSH + 360); }; _local4.iSS = 0.9; _local4.iSB = 0.6; } else { _local13 = _arg1.split(/,/); _local4.iCH = _local13[0]; _local4.iCS = _local13[1]; _local4.iCB = _local13[2]; _local4.iSH = _local13[3]; _local4.iSS = _local13[4]; _local4.iSB = _local13[5]; }; }; _local7 = ODisplay.HSBToRGB(_local4.iSH, _local4.iSS, _local4.iSB); this.iF0S = new DropShadowFilter((_local5.iF0SD * _local6), _local5.iAngle, ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, (_local4.iCB * 0.5)), 0.75, (_local5.iF0SB * _local6), (_local5.iF0SB * _local6), 1, 2, false, true, true); this.iF1S = new DropShadowFilter((_local5.iF1SD * _local6), _local5.iAngle, _local7, 0.85, (_local5.iF1SB * _local6), (_local5.iF1SB * _local6), 1.5, 3, true, true, true); this.iF1G = new GlowFilter(_local7, _local5.iF1GA, (_local5.iF1GB * _local6), (_local5.iF1GB * _local6), 2, 3, true, true); _local8 = ((_local6)<1) ? (_local5.iF2GGC1 * _local6) : _local5.iF2GGC1; this.iF2GG1 = new GradientGlowFilter((_local5.iF2GGD1 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local8, 0xFF], (_local5.iF2GGB1 * _local6), (_local5.iF2GGB1 * _local6), 1, 1, "inner", true); _local9 = ((_local6)<1) ? (_local5.iF2GGC2 * _local6) : _local5.iF2GGC2; this.iF2GG2 = new GradientGlowFilter((_local5.iF2GGD2 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local9, 0xFF], (_local5.iF2GGB2 * _local6), (_local5.iF2GGB2 * _local6), 1, 1, "inner", true); this.iF2B = new BlurFilter((_local5.iF2B * _local6), (_local5.iF2B * _local6)); this.iColor = ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, _local4.iCB); this.iBorder = Math.ceil((_local5.iBorder * _local6)); } } }//package ENGINE.SKIN
Section 45
//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 46
//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 47
//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 48
//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 49
//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 50
//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 51
//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 52
//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 53
//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 54
//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 55
//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 56
//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 57
//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 58
//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 59
//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 60
//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 61
//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 62
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "2.0.1.0"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 63
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 64
//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 65
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 66
//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 67
//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 68
//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 69
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 70
//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 71
//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 72
//OBonus (RES.OBJECTS.BONUSES.OBonus) package RES.OBJECTS.BONUSES { import ENGINE.DISPLAY.*; import flash.geom.*; import RES.OBJECTS.DISPLAY.*; import flash.utils.*; public class OBonus extends OSprite { private var napr:Boolean; private var iBitmap:OBitmap; private var iTimer:Number; private var iBF:OGBitmapFactory; private var state:int; private var score:int; private var frames:Array; private var prescaler:int;// = 0 private var framePos:int;// = 0 private var velocity:Point; private var frameUp:Boolean;// = true public static const stNormal:int = 1; public static const stInvisible:int = 2; public static const stShow:int = 0; public function OBonus(_arg1:OGBitmapFactory, _arg2:int){ framePos = 0; frameUp = true; prescaler = 0; iBF = _arg1; score = _arg2; super(); Init(); } private function Init():void{ var _local1:uint; var _local2:String; frames = new Array(); _local1 = 1; while (_local1 < 15) { _local2 = ((("Bonus_" + score.toString()) + "_scale_") + _local1.toString()); frames.push(iBF.getBitmap(_local2)); _local1++; }; this.iBitmap = new OBitmap(); this.iBitmap.CopyFrom((frames[0] as OBitmap)); this.framePos = 0; this.addChild(this.iBitmap); this.velocity = new Point(1, 1); this.velocity.offset(0, -3); this.State = stShow; } public function OnEnterFrame():void{ var _local1:Number; switch (state){ case stShow: if (++prescaler >= 2){ prescaler = 0; if (this.framePos == (frames.length - 1)){ this.State = stNormal; return; }; this.iBitmap.CopyFrom((frames[framePos] as OBitmap)); this.framePos++; }; break; case stNormal: if ((((this.velocity.x >= 2)) || ((this.velocity.x <= -2)))){ napr = !(napr); }; _local1 = (napr) ? 0.3 : -0.3; this.velocity.x = (this.velocity.x + _local1); this.prY = (this.prY + this.velocity.y); this.prX = (this.prX + this.velocity.x); this.alpha = (this.alpha - 0.02); if (this.alpha < 0.4){ this.State = stInvisible; }; break; }; } public function set State(_arg1:int):void{ this.state = _arg1; switch (state){ case stShow: break; case stNormal: this.iTimer = getTimer(); break; case stInvisible: (parent as OMBonus).removeChild(this); break; }; } } }//package RES.OBJECTS.BONUSES
Section 73
//OMBonus (RES.OBJECTS.BONUSES.OMBonus) package RES.OBJECTS.BONUSES { import ENGINE.DISPLAY.*; import RES.OBJECTS.DISPLAY.*; public class OMBonus extends OSprite { private var size:Number; private var iBF:OGBitmapFactory; public function OMBonus(_arg1:OGBitmapFactory, _arg2:Number):void{ var _local3:uint; var _local4:uint; var _local5:String; super(); size = _arg2; iBF = _arg1; _local3 = 1; while (_local3 < 20) { _local4 = 0; while (_local4 < 15) { _local5 = ((("Bonus_" + (_local3 * 100).toString()) + "_scale_") + _local4.toString()); iBF.registerBitmap(_local5, OPaint.drawBonus((_local3 * 100), (0.3 + (_local4 / 35)), size)); _local4++; }; _local3++; }; } public function addBonus(_arg1:int, _arg2:Number, _arg3:Number):void{ var _local4:OBonus; _local4 = new OBonus(iBF, _arg1); _local4.prX = _arg2; _local4.prY = _arg3; this.addChild(_local4); } override public function Free():void{ super.Free(); this.iBF = null; } public function onEnterFrame():void{ var _local1:uint; var _local2:OBonus; _local1 = 0; while (_local1 < this.numChildren) { _local2 = (this.getChildAt(_local1) as OBonus); _local2.OnEnterFrame(); _local1++; }; } } }//package RES.OBJECTS.BONUSES
Section 74
//OExplode (RES.OBJECTS.DISPLAY.OExplode) package RES.OBJECTS.DISPLAY { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; public class OExplode extends OSprite { private var napr:Array; private var iBitmap:OBitmap; private var secX:int; private var secY:int; private var speed:int; private var done:Boolean;// = false private var frames:Array; public function OExplode(_arg1:OBitmap, _arg2:int, _arg3:int, _arg4:int){ done = false; super(); speed = _arg4; secX = _arg2; secY = _arg3; iBitmap = _arg1.Clone(); frames = new Array(); napr = new Array(); this.getFrames(); this.prX = _arg1.prX; this.prY = _arg1.prY; } public function get Done():Boolean{ return ((done == true)); } public function onEnterFrame():void{ var _local1:uint; var _local2:OBitmap; var _local3:Point; if (!done){ done = true; _local1 = 0; while (_local1 < frames.length) { _local2 = (frames[_local1] as OBitmap); _local3 = (napr[_local1] as Point); if (_local2.alpha <= 0){ _local2.alpha = 0; } else { done = false; _local2.prX = (_local2.prX + _local3.x); _local2.prY = (_local2.prY + _local3.y); _local2.alpha = (_local2.alpha - 0.09); _local2.rotation = (_local2.rotation + 1); }; _local1++; }; }; } private function getFrames():void{ var _local1:int; var _local2:int; var _local3:OBM; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:uint; var _local9:uint; var _local10:BitmapData; var _local11:Rectangle; var _local12:OBM; var _local13:OBitmap; var _local14:Number; var _local15:Number; _local1 = secX; _local2 = secY; _local3 = iBitmap.prOBM; _local4 = (_local3.iBM.width / _local1); _local5 = (_local3.iBM.height / _local2); _local6 = (iBitmap.prWidth / _local1); _local7 = (iBitmap.prHeight / _local2); _local8 = 0; while (_local8 < _local1) { _local9 = 0; while (_local9 < _local2) { _local10 = new BitmapData(_local4, _local5, true, 0xFFFFFF); _local11 = new Rectangle((_local8 * _local4), (_local9 * _local5), _local10.width, _local10.height); _local10.copyPixels(_local3.iBM, _local11, new Point(0, 0)); _local12 = new OBM(_local10, 0, 0, _local4, _local5); _local13 = new OBitmap(_local12, 0); this.addChild(_local13); _local13.prX = (_local8 * _local4); _local13.prY = (_local9 * _local5); _local14 = ((Math.random() * speed) + 2); _local14 = (_local14 * ((Math.random())<0.5) ? 1 : -1); _local15 = ((Math.random() * speed) + 2); _local13.rotation = (Math.random() * 6); napr.push(new Point(_local14, _local15)); frames.push(_local13); _local9++; }; _local8++; }; } } }//package RES.OBJECTS.DISPLAY
Section 75
//OGBitmapFactory (RES.OBJECTS.DISPLAY.OGBitmapFactory) package RES.OBJECTS.DISPLAY { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.CORE.*; import RES.OBJECTS.UTILS.*; import flash.filters.*; import RES.OBJECTS.LEVELS.*; public class OGBitmapFactory { private const cScaleCount:int = 10; private const cStepScale:Number = -0.01; private const cKoeff:Number = 0.8; private const iAngle:Number = 10; private var output:Array; private var iCellSize:Number; private var iPolygon:int; private var filters1:Array; private var iBorders:Array; private var fscale:Number; private var iStoneSprites:Array; private var iColors:OUniqueArray; private var iBtmClear:OBitmap; private var iGrayBtm:OBitmap; private var iDeleteStone:Array; private var iGrayColor:Class; private var iStar:OBitmap; private var iStoneSprite:Sprite; private var iFireStone:Array; private var iClearStone:Array; private var iBG:OBitmap; private var iBombStone:Array; private var filters:Array; private var iStone:Array; private var iRnd:ORandomInt; public function OGBitmapFactory(_arg1:Array){ var _local2:Array; var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:Array; fscale = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; filters = [new DropShadowFilter((8 * fscale), 45, 0, 0.4)]; filters1 = [new DropShadowFilter((3 * fscale), 45, 0, 0.2), new BevelFilter((2 * fscale), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * fscale), (2 * fscale))]; super(); output = new Array(); iRnd = new ORandomInt(); iRnd.SeedRand(_arg1[4]); iStone = new Array(); iBorders = new Array(); iDeleteStone = new Array(); iColors = new OUniqueArray(); _local2 = new Array(); _local3 = new Array(); iStoneSprites = _arg1[2]; iColors = _arg1[0]; iCellSize = _arg1[3]; _local4 = 0; iPolygon = iRnd.RandOnInterval(4, 9); iGrayBtm = CreateGrayStone(iStoneSprites[0]); _local5 = 0; while (_local5 < iColors.length) { _local6 = iColors[_local5]; if (_local6 > 0){ _local7 = CreateStone(iStoneSprites[1][(iColors[_local5] - 1)]); iStone.push(_local7[0]); _local2.push(_local7[1]); _local3.push(_local7[2]); iDeleteStone.push(_local7[3]); }; _local4++; _local5++; }; iBorders.push(_local2, _local3); iStar = DrawStar([(iPolygon * 2)]); CreateBackGround(); CreateFireStone(); CreateClearStone(); CreateBombStone(); } private function CreateGrayStone(_arg1:Class):OBitmap{ var _local2:Sprite; var _local3:Number; var _local4:OBitmap; _local2 = (new (_arg1) as Sprite); _local2.filters = filters; _local3 = ((iCellSize * cKoeff) / _local2.width); _local4 = OBitmap.MakeTmp(_local2, _local3, 0, 0); _local4.smoothing = true; return (_local4); } public function GetBorder(_arg1:int, _arg2:int):OBitmap{ return (this.iBorders[(_arg1 - 1)][(_arg2 - 1)]); } private function CreateBackGround():void{ var _local1:int; var _local2:Bitmap; var _local3:Sprite; var _local4:Number; _local1 = iRnd.RandOnInterval(0, (GemzL.iBackGround.length - 1)); _local2 = (new (GemzL.iBackGround[_local1]) as Bitmap); _local3 = new Sprite(); _local3.filters = filters1; _local3.addChild(_local2); _local2.x = (-(_local3.width) / 2); _local2.y = (-(_local3.height) / 2); _local4 = (iCellSize / _local3.width); iBG = OBitmap.MakeTmp(_local3, _local4, 0, 0, 0); } public function GetDelete(_arg1:int):OSprite{ return (this.iDeleteStone[_arg1]); } private function CreateFireStone():void{ var _local1:Sprite; var _local2:Sprite; var _local3:Number; var _local4:int; var _local5:OBitmap; this.iFireStone = new Array(); _local1 = (new OStoneSprites.OFireBonus() as Sprite); _local2 = new Sprite(); _local2.addChild(_local1); _local2.filters = filters1; _local3 = ((iCellSize * 0.8) / _local2.width); _local4 = 0; while (_local4 < 90) { _local1.rotation = (_local1.rotation + iAngle); _local1.x = 0; _local1.y = 0; _local5 = OBitmap.MakeTmp(_local2, _local3, 0, 0); iFireStone.push(_local5); _local4 = (_local4 + iAngle); }; } private function getFrames(_arg1:OBitmap):OSprite{ var _local2:OSprite; var _local3:Array; var _local4:int; var _local5:int; var _local6:OBM; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:uint; var _local12:uint; var _local13:BitmapData; var _local14:Rectangle; var _local15:OBM; var _local16:OBitmap; _local2 = new OSprite(); _local3 = new Array(); _local4 = 5; _local5 = 9; _local6 = _arg1.prOBM; _local7 = (_local6.iBM.width / _local4); _local8 = (_local6.iBM.height / _local5); _local9 = (_arg1.prWidth / _local4); _local10 = (_arg1.prHeight / _local5); _local11 = 0; while (_local11 < _local4) { _local12 = 0; while (_local12 < _local5) { _local13 = new BitmapData(_local7, _local8, true, 0xFFFFFF); _local14 = new Rectangle((_local11 * _local7), (_local12 * _local8), _local13.width, _local13.height); _local13.copyPixels(_local6.iBM, _local14, new Point(0, 0)); _local15 = new OBM(_local13, 0, 0, _local7, _local8); _local16 = new OBitmap(_local15, 0); _local2.addChild(_local16); _local16.prX = (-(_local11) * _local7); _local16.prY = (-(_local12) * _local8); _local12++; }; _local11++; }; return (_local2); } private function CreateBombStone():void{ var _local1:Sprite; var _local2:Number; var _local3:int; var _local4:OBitmap; this.iBombStone = new Array(); _local1 = (new OStoneSprites.OBombBonus() as Sprite); _local1.filters = filters1; _local2 = ((iCellSize * 0.8) / _local1.width); _local3 = 0; while (_local3 < cScaleCount) { _local4 = OBitmap.MakeTmp(_local1, (_local2 - (_local3 * cStepScale)), 0, 0); iBombStone.push(_local4); _local3++; }; } public function GetBackGround():OBitmap{ return (this.iBG); } public function GetStar():OBitmap{ return (this.iStar); } private function CreateStone(_arg1:Array):Array{ var _local2:Sprite; var _local3:Number; var _local4:OBitmap; var _local5:OBitmap; var _local6:OBitmap; var _local7:OBitmap; var _local8:OSprite; _local2 = (new (_arg1[0]) as Sprite); _local3 = ((iCellSize * cKoeff) / _local2.width); _local2.filters = filters; _local4 = OBitmap.MakeTmp(_local2, _local3, 0, 0); _local4.smoothing = true; _local2 = (new (_arg1[1]) as Sprite); _local2.filters = filters; _local5 = OBitmap.MakeTmp(_local2, _local3, 0, 0); _local5.smoothing = true; _local2 = (new (_arg1[2]) as Sprite); _local2.filters = filters; _local6 = OBitmap.MakeTmp(_local2, _local3, 0, 0); _local6.smoothing = true; _local2 = (new (_arg1[0]) as Sprite); _local7 = OBitmap.MakeTmp(_local2, _local3); _local8 = getFrames(_local7); return ([_local4, _local5, _local6, _local8]); } public function getBitmap(_arg1:String):OBitmap{ var _local2:uint; _local2 = 0; while (_local2 < output.length) { if ((output[_local2][0] as String) == _arg1){ return ((output[_local2][1] as OBitmap)); }; _local2++; }; return (null); } public function GetDeleteCnt():int{ return ((this.iDeleteStone[0].numChildren - 1)); } public function GetClear():OBitmap{ return (this.iBtmClear); } public function GetFireStone(_arg1:int):OBitmap{ return (this.iFireStone[_arg1]); } public function registerBitmap(_arg1:String, _arg2:OBitmap):void{ output.push([_arg1, _arg2]); } public function GetGrayStone():OBitmap{ return (this.iGrayBtm); } public function GetBombStone(_arg1:int):OBitmap{ return (this.iBombStone[_arg1]); } private function DrawStar(_arg1:Array):OBitmap{ var _local2:int; var _local3:Sprite; var _local4:OBitmap; _local2 = _arg1[(_arg1.length - 1)]; _local3 = OShapes.DrawPolyStar([GemzL.OTBSTAR, (iCellSize * 0.4), 0, false, _local2, (180 / _local2), 6, 0]); _local3.filters = filters; _local4 = OBitmap.MakeTmp(_local3, 1, 0, 0); return (_local4); } public function get FireCount():int{ return ((this.iFireStone.length - 1)); } public function get ClearCount():int{ return ((this.iClearStone.length - 1)); } private function CreateClearStone():void{ var _local1:Sprite; var _local2:Number; var _local3:int; var _local4:OBitmap; this.iClearStone = new Array(); _local1 = (new OStoneSprites.OClearBonus() as Sprite); _local1.filters = filters1; _local2 = ((iCellSize * 0.8) / _local1.width); _local3 = 0; while (_local3 < cScaleCount) { _local4 = OBitmap.MakeTmp(_local1, (_local2 - (_local3 * cStepScale)), 0, 0); iClearStone.push(_local4); _local3++; }; } public function GetStone(_arg1:int):OBitmap{ return (iStone[(_arg1 - 1)]); } public function get BombCount():int{ return ((this.iBombStone.length - 1)); } public function GetClearStone(_arg1:int):OBitmap{ return (this.iClearStone[_arg1]); } } }//package RES.OBJECTS.DISPLAY
Section 76
//OPaint (RES.OBJECTS.DISPLAY.OPaint) package RES.OBJECTS.DISPLAY { import ENGINE.DISPLAY.*; import flash.display.*; import ENGINE.CORE.*; public class OPaint { public static function MakeCell(_arg1:int, _arg2:Number):OBitmap{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:String; var _local8:String; var _local9:Array; var _local10:OBitmap; _local3 = _arg2; _local4 = (0.8 * _local3); _local5 = ((_local3)>20) ? (0.8 * (_local3 / 40)) : 0.5; _local6 = Math.round((1 + (_local4 / 70))); _local7 = ("text " + String((Math.round((_local4 / 10)) * 10))); _local8 = (_arg1 * 35).toString(); _local9 = [[null, [ODisplay.SpriteRoundRect, _local3, _local3, (_local3 / 3)], 1, "GEL", _local8, "spanel", _local5, 0, 0, null, 0, false], [null, [ODisplay.SpriteTextInRect, GemzL.OFont, _local4, 1, _arg1.toString(), _local3, _local3], 1, "GEL", _local8, "border", _local5, 0, 0, null, 0, false]]; _local10 = ODisplay.OBitmapList([null, _local9]); _local10.prX = (-(_local3) / 2); _local10.prY = (-(_local3) / 2); return (_local10); } public static function drawBonus(_arg1:int, _arg2:Number, _arg3:Number):OBitmap{ var _local4:OSprite; var _local5:Number; var _local6:String; var _local7:OBitmap; _local4 = new OSprite(); _local5 = (_arg3 * _arg2); _local6 = _arg1.toString(); if (_arg1 > 500){ _local6 = (_local6 + " COOL!!!"); }; _local7 = GemzS.TextureText([null, GemzL.cFontName, _local5, GemzL.iFrame[1], _local6, 0, 0]); return (_local7); } public static function MakeShadow(_arg1:Number=1, _arg2:Number=1, _arg3:int=0):OBitmap{ var _local4:Sprite; var _local5:DisplayObject; var _local6:Array; _local4 = new ((GemzL.OBubbleShadow as Class)); _local5 = _local4.getChildAt(0); _local6 = _local5.filters; _local6[0].color = ODisplay.HSBToRGB(_arg3, 1, 0.13); _local5.filters = _local6; return (OBitmap.MakeTmp(_local4, Math.round((_arg1 / 181)), Math.round((_arg1 * 0.27)), Math.round((_arg1 * 0.27)), 4)); } public static function MakeDigit(_arg1:Number, _arg2:int, _arg3:int):OBitmap{ var _local4:Number; var _local5:Number; var _local6:String; var _local7:Number; var _local8:Number; _local4 = (0.8 * _arg1); _local5 = Math.round((1 + (_local4 / 70))); _local6 = ("text " + String(Math.min((Math.round((_local4 / 10)) * 10), 90))); _local7 = (-(_arg1) / 2); _local8 = (-(_arg1) / 2); return (ODisplay.OBitmapTextInRect([null, GemzL.OFont, _local4, _local5, _arg2.toString(), "GEL", _arg3, _local6, 1, _arg1, _arg1, OGlobal.ScaleFloor(_local7), OGlobal.ScaleFloor(_local8)])); } public static function MakeBooble(_arg1:Number, _arg2:int):OBitmap{ var _local3:Sprite; var _local4:Number; var _local5:DisplayObject; var _local6:Array; _local3 = new ((GemzL.OBubble as Class)); _local4 = (((_arg1 * 2))>1) ? 1 : (_arg1 * 2); _local5 = _local3.getChildAt(0); _local6 = _local5.filters; _local6[0].color = ODisplay.HSBToRGB(_arg2, 1, 0.84); _local6[0].blurX = (_local6[0].blurX * _local4); _local6[0].blurY = (_local6[0].blurY * _local4); _local6[0].distance = (_local6[0].distance * _local4); _local5.filters = _local6; _local5 = _local3.getChildAt(1); _local6 = _local5.filters; _local6[0].color = ODisplay.HSBToRGB(_arg2, 0.42, 1); _local6[0].blurX = (_local6[0].blurX * _local4); _local6[0].blurY = (_local6[0].blurY * _local4); _local6[0].distance = (_local6[0].distance * _local4); _local5.filters = _local6; _local5 = _local3.getChildAt(2); _local6 = _local5.filters; _local6[0].color = ODisplay.HSBToRGB(_arg2, 0.33, 1); _local6[0].blurX = (_local6[0].blurX * _local4); _local6[0].blurY = (_local6[0].blurY * _local4); _local6[0].distance = (_local6[0].distance * _local4); _local5.filters = _local6; _local5 = _local3.getChildAt(4); _local6 = _local5.filters; _local6[0].highlightColor = ODisplay.HSBToRGB(_arg2, 0.16, 1); _local6[0].blurX = (_local6[0].blurX * _arg1); _local6[0].blurY = (_local6[0].blurY * _arg1); _local6[0].distance = (_local6[0].distance * _arg1); _local5.filters = _local6; return (OBitmap.MakeTmp(_local3, _arg1, 0, 0, 2)); } } }//package RES.OBJECTS.DISPLAY
Section 77
//OShapes (RES.OBJECTS.DISPLAY.OShapes) package RES.OBJECTS.DISPLAY { import flash.display.*; import flash.geom.*; public class OShapes { private static function drawRoundRectComplex(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local10 = (_arg2 + _arg4); _local11 = (_arg3 + _arg5); _local12 = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2); _arg6 = ((_arg6 < _local12)) ? _arg6 : _local12; _arg7 = ((_arg7 < _local12)) ? _arg7 : _local12; _arg8 = ((_arg8 < _local12)) ? _arg8 : _local12; _arg9 = ((_arg9 < _local12)) ? _arg9 : _local12; _local13 = (_arg9 * 0.292893218813453); _local14 = (_arg9 * 0.585786437626905); _arg1.graphics.moveTo(_local10, (_local11 - _arg9)); _arg1.graphics.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13)); _arg1.graphics.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11); _local13 = (_arg8 * 0.292893218813453); _local14 = (_arg8 * 0.585786437626905); _arg1.graphics.lineTo((_arg2 + _arg8), _local11); _arg1.graphics.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13)); _arg1.graphics.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8)); _local13 = (_arg6 * 0.292893218813453); _local14 = (_arg6 * 0.585786437626905); _arg1.graphics.lineTo(_arg2, (_arg3 + _arg6)); _arg1.graphics.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13)); _arg1.graphics.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3); _local13 = (_arg7 * 0.292893218813453); _local14 = (_arg7 * 0.585786437626905); _arg1.graphics.lineTo((_local10 - _arg7), _arg3); _arg1.graphics.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13)); _arg1.graphics.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7)); _arg1.graphics.lineTo(_local10, (_local11 - _arg9)); } private static function Draw(_arg1:Number, _arg2:int, _arg3:Boolean, _arg4:int, _arg5:Class, _arg6:Boolean, _arg7:Number):Sprite{ var _local8:Sprite; var _local9:Array; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Point; var _local14:Number; var _local15:Point; var _local16:int; var _local17:Bitmap; var _local18:Point; _local8 = new Sprite(); if (_arg5){ _local17 = (new (_arg5) as Bitmap); _local8.graphics.beginBitmapFill(_local17.bitmapData, null, true); } else { _local8.graphics.beginFill(0); }; if (_arg4 != 0){ _local8.graphics.lineStyle(_arg4); }; _local9 = new Array(); _local10 = (360 / _arg2); _local11 = ((_local10 * Math.PI) / 180); _local12 = (((90 - _local10) * Math.PI) / 180); _local13 = new Point((_arg1 / 2), 0); _local14 = 75; _local15 = new Point(); _local15.x = ((_local13.x * Math.cos(_local14)) - (_local13.y * Math.sin(_local14))); _local15.y = ((_local13.x * Math.sin(_local14)) + (_local13.y * Math.cos(_local14))); _local16 = 0; while (_local16 < _arg2) { _local9.push(_local15); _local18 = _local15.clone(); _local18.x = ((_local15.x * Math.cos(_local11)) - (_local15.y * Math.sin(_local11))); _local18.y = ((_local15.x * Math.sin(_local11)) + (_local15.y * Math.cos(_local11))); _local15 = _local18.clone(); _local16++; }; _local8.graphics.moveTo(_local9[0].x, _local9[0].y); _local16 = 1; while (_local16 < _arg2) { _local8.graphics.lineTo(_local9[_local16].x, _local9[_local16].y); if (_arg3){ _local8.graphics.moveTo(_local9[_local16].x, _local9[_local16].y); }; _local16++; }; _local8.graphics.lineTo(_local9[0].x, _local9[0].y); if (_arg6){ _local9 = new Array(); _local13 = new Point(((_arg1 * _arg7) / 2), 0); _local15 = new Point(); _local15.x = ((_local13.x * Math.cos(_local14)) - (_local13.y * Math.sin(_local14))); _local15.y = ((_local13.x * Math.sin(_local14)) + (_local13.y * Math.cos(_local14))); _local16 = 0; while (_local16 < _arg2) { _local9.push(_local15); _local18 = _local15.clone(); _local18.x = ((_local15.x * Math.cos(_local11)) - (_local15.y * Math.sin(_local11))); _local18.y = ((_local15.x * Math.sin(_local11)) + (_local15.y * Math.cos(_local11))); _local15 = _local18.clone(); _local16++; }; _local8.graphics.moveTo(_local9[0].x, _local9[0].y); _local16 = 1; while (_local16 < _arg2) { _local8.graphics.lineTo(_local9[_local16].x, _local9[_local16].y); if (_arg3){ _local8.graphics.moveTo(_local9[_local16].x, _local9[_local16].y); }; _local16++; }; _local8.graphics.lineTo(_local9[0].x, _local9[0].y); }; _local8.graphics.endFill(); return (_local8); } public static function DrawRoundRectangle(_arg1:Array):Sprite{ return (DrawRoundRect(_arg1[0], _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 DrawBomb(_arg1:Array):Sprite{ return (Draw1(_arg1[0], _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9])); } public static function DrawClear(_arg1:Array):Sprite{ return (Draw2(_arg1[0], _arg1[1], _arg1[2])); } public static function DrawPolyPolygon(_arg1:Array):Array{ return (DrawPolySprite(_arg1[0], _arg1[1], _arg1[2])); } private static function Draw1(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Class, _arg8:Boolean, _arg9:Number, _arg10:Number):Sprite{ var _local11:Bitmap; var _local12:Sprite; var _local13:Number; var _local14:Number; var _local15:Point; var _local16:Point; var _local17:Point; var _local18:Point; var _local19:Point; var _local20:Point; var _local21:Point; var _local22:Point; var _local23:Point; var _local24:Point; var _local25:Point; var _local26:Point; var _local27:Point; var _local28:Point; var _local29:Point; var _local30:Point; var _local31:Point; var _local32:Point; var _local33:Point; var _local34:Point; var _local35:Point; var _local36:Point; var _local37:Point; var _local38:Point; var _local39:Point; var _local40:Point; _local11 = (new (_arg7) as Bitmap); _local12 = new Sprite(); _local12.graphics.beginBitmapFill(_local11.bitmapData, null, true); _local13 = _arg2; _local14 = _arg3; _local15 = new Point(_arg9, _arg10); _local16 = new Point(_arg1, _arg10); _local17 = new Point(_arg9, _arg1); _local18 = new Point(_arg1, _arg1); _local19 = new Point((_arg1 * _arg5), (_arg1 * _local13)); _local20 = new Point((_arg1 * _arg5), (_arg1 * _local14)); _local21 = new Point((_arg1 * _local13), (_arg1 * _arg5)); _local22 = new Point((_arg1 * _local14), (_arg1 * _arg5)); _local23 = new Point((_arg1 - (_arg1 * _local13)), (_arg1 * _arg5)); _local24 = new Point((_arg1 - (_arg1 * _local14)), (_arg1 * _arg5)); _local25 = new Point((_arg1 * _arg5), (_arg1 - (_arg1 * _local13))); _local26 = new Point((_arg1 * _arg5), (_arg1 - (_arg1 * _local14))); _local27 = new Point((_arg1 * _arg5), (_arg1 * _arg5)); _local28 = new Point(); _local28.x = ((_local15.x * Math.cos(_arg6)) - (_local15.y * Math.sin(_arg6))); _local28.y = ((_local15.x * Math.sin(_arg6)) + (_local28.y * Math.cos(_arg6))); _local29 = new Point(); _local29.x = ((_local16.x * Math.cos(_arg6)) - (_local16.y * Math.sin(_arg6))); _local29.y = ((_local16.x * Math.sin(_arg6)) + (_local16.y * Math.cos(_arg6))); _local30 = new Point(); _local30.x = ((_local17.x * Math.cos(_arg6)) - (_local17.y * Math.sin(_arg6))); _local30.y = ((_local17.x * Math.sin(_arg6)) + (_local17.y * Math.cos(_arg6))); _local31 = new Point(); _local31.x = ((_local18.x * Math.cos(_arg6)) - (_local18.y * Math.sin(_arg6))); _local31.y = ((_local18.x * Math.sin(_arg6)) + (_local18.y * Math.cos(_arg6))); _local32 = new Point(); _local32.x = ((_local19.x * Math.cos(_arg6)) - (_local19.y * Math.sin(_arg6))); _local32.y = ((_local19.x * Math.sin(_arg6)) + (_local19.y * Math.cos(_arg6))); _local33 = new Point(); _local33.x = ((_local20.x * Math.cos(_arg6)) - (_local20.y * Math.sin(_arg6))); _local33.y = ((_local20.x * Math.sin(_arg6)) + (_local20.y * Math.cos(_arg6))); _local34 = new Point(); _local34.x = ((_local21.x * Math.cos(_arg6)) - (_local21.y * Math.sin(_arg6))); _local34.y = ((_local21.x * Math.sin(_arg6)) + (_local21.y * Math.cos(_arg6))); _local35 = new Point(); _local35.x = ((_local22.x * Math.cos(_arg6)) - (_local22.y * Math.sin(_arg6))); _local35.y = ((_local22.x * Math.sin(_arg6)) + (_local22.y * Math.cos(_arg6))); _local36 = new Point(); _local36.x = ((_local23.x * Math.cos(_arg6)) - (_local23.y * Math.sin(_arg6))); _local36.y = ((_local23.x * Math.sin(_arg6)) + (_local23.y * Math.cos(_arg6))); _local37 = new Point(); _local37.x = ((_local24.x * Math.cos(_arg6)) - (_local24.y * Math.sin(_arg6))); _local37.y = ((_local24.x * Math.sin(_arg6)) + (_local24.y * Math.cos(_arg6))); _local38 = new Point(); _local38.x = ((_local25.x * Math.cos(_arg6)) - (_local25.y * Math.sin(_arg6))); _local38.y = ((_local25.x * Math.sin(_arg6)) + (_local25.y * Math.cos(_arg6))); _local39 = new Point(); _local39.x = ((_local26.x * Math.cos(_arg6)) - (_local26.y * Math.sin(_arg6))); _local39.y = ((_local26.x * Math.sin(_arg6)) + (_local26.y * Math.cos(_arg6))); _local40 = new Point(); _local40.x = ((_local27.x * Math.cos(_arg6)) - (_local27.y * Math.sin(_arg6))); _local40.y = ((_local27.x * Math.sin(_arg6)) + (_local27.y * Math.cos(_arg6))); _local12.graphics.moveTo(_local28.x, _local28.y); _local12.graphics.curveTo(_local32.x, _local32.y, _local29.x, _local29.y); _local12.graphics.moveTo(_local28.x, _local28.y); _local12.graphics.curveTo(_local33.x, _local33.y, _local29.x, _local29.y); _local12.graphics.moveTo(_local28.x, _local28.y); _local12.graphics.curveTo(_local34.x, _local34.y, _local30.x, _local30.y); _local12.graphics.moveTo(_local28.x, _local28.y); _local12.graphics.curveTo(_local35.x, _local35.y, _local30.x, _local30.y); _local12.graphics.moveTo(_local29.x, _local29.y); _local12.graphics.curveTo(_local36.x, _local36.y, _local31.x, _local31.y); _local12.graphics.moveTo(_local29.x, _local29.y); _local12.graphics.curveTo(_local37.x, _local37.y, _local31.x, _local31.y); _local12.graphics.moveTo(_local30.x, _local30.y); _local12.graphics.curveTo(_local38.x, _local38.y, _local31.x, _local31.y); _local12.graphics.moveTo(_local30.x, _local30.y); _local12.graphics.curveTo(_local39.x, _local39.y, _local31.x, _local31.y); if (_arg8){ _local12.graphics.drawCircle(_local40.x, _local40.y, (_arg1 * _arg4)); }; _local12.graphics.endFill(); return (_local12); } private static function Draw2(_arg1:Number, _arg2:Number, _arg3:Class):Sprite{ var _local4:Bitmap; var _local5:Sprite; var _local6:Number; var _local7:Point; var _local8:Point; var _local9:Point; var _local10:Point; var _local11:Point; var _local12:Point; var _local13:Point; var _local14:Point; var _local15:Point; var _local16:Point; var _local17:Point; var _local18:Point; var _local19:Number; _local4 = (new (_arg3) as Bitmap); _local5 = new Sprite(); _local5.graphics.beginBitmapFill(_local4.bitmapData, null, true); _local6 = _arg2; _local5.graphics.drawRect(0, 0, _arg1, _arg1); _local7 = new Point((_arg1 / 3), 0); _local8 = new Point(((2 * _arg1) / 3), 0); _local9 = new Point(0, (_arg1 / 3)); _local10 = new Point(0, ((2 * _arg1) / 3)); _local11 = new Point((_arg1 / 3), _arg1); _local12 = new Point(((2 * _arg1) / 3), _arg1); _local13 = new Point(_arg1, (_arg1 / 3)); _local14 = new Point(_arg1, ((2 * _arg1) / 3)); _local15 = new Point((_arg1 / 2), _local6); _local16 = new Point((_arg1 - _local6), (_arg1 / 2)); _local17 = new Point((_arg1 / 2), (_arg1 - _local6)); _local18 = new Point(_local6, (_arg1 / 2)); _local5.graphics.moveTo(_local7.x, _local7.y); _local5.graphics.curveTo(_local15.x, _local15.y, _local8.x, _local8.y); _local5.graphics.moveTo(_local9.x, _local9.y); _local5.graphics.curveTo(_local18.x, _local18.y, _local10.x, _local10.y); _local5.graphics.moveTo(_local11.x, _local11.y); _local5.graphics.curveTo(_local17.x, _local17.y, _local12.x, _local12.y); _local5.graphics.moveTo(_local13.x, _local13.y); _local19 = (_arg1 / 6); _local5.graphics.curveTo(_local16.x, _local16.y, _local14.x, _local14.y); _local5.graphics.drawCircle(((_arg1 / 2) - _local6), (_arg1 / 2), _local19); _local5.graphics.drawCircle((_arg1 / 2), ((_arg1 / 2) - _local6), _local19); _local5.graphics.drawCircle(((_arg1 / 2) + _local6), (_arg1 / 2), _local19); _local5.graphics.drawCircle((_arg1 / 2), ((_arg1 / 2) + _local6), _local19); _local5.graphics.endFill(); return (_local5); } private static function DrawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Class, _arg10:Boolean, _arg11:Number, _arg12:Number):Sprite{ var _local13:Sprite; var _local14:Bitmap; _local13 = new Sprite(); if (_arg9){ _local14 = (new (_arg9) as Bitmap); _local13.graphics.beginBitmapFill(_local14.bitmapData, null, true); } else { _local13.graphics.beginFill(0); }; drawRoundRectComplex(_local13, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); if (_arg10){ drawRoundRectComplex(_local13, (_arg1 + (_arg12 / 2)), (_arg2 + (_arg11 / 2)), (_arg3 - _arg11), (_arg4 - _arg12), _arg5, _arg6, _arg7, _arg8); }; _local13.graphics.endFill(); return (_local13); } private static function DrawPolySprite(_arg1:Number, _arg2:int, _arg3:Class):Array{ var _local4:Array; var _local5:Bitmap; var _local6:Number; var _local7:Array; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Point; var _local12:int; var _local13:Array; var _local14:Array; var _local15:Point; var _local16:Sprite; _local4 = new Array(); _local5 = (new (_arg3) as Bitmap); _local6 = _arg1; _local7 = new Array(); _local8 = (360 / _arg2); _local9 = ((_local8 * Math.PI) / 180); _local10 = (((90 - _local8) * Math.PI) / 180); _local11 = new Point((_local6 / 2), 0); _local12 = 0; while (_local12 < _arg2) { _local7.push(_local11); _local15 = _local11.clone(); _local15.x = ((_local11.x * Math.cos(_local9)) - (_local11.y * Math.sin(_local9))); _local15.y = ((_local11.x * Math.sin(_local9)) + (_local11.y * Math.cos(_local9))); _local11 = _local15.clone(); _local12++; }; _local6 = ((2 * _arg1) / 3); _local13 = new Array(); _local11 = new Point((_local6 / 2), 0); _local12 = 0; while (_local12 < _arg2) { _local13.push(_local11); _local15 = _local11.clone(); _local15.x = ((_local11.x * Math.cos(_local9)) - (_local11.y * Math.sin(_local9))); _local15.y = ((_local11.x * Math.sin(_local9)) + (_local11.y * Math.cos(_local9))); _local11 = _local15.clone(); _local12++; }; _local6 = (_arg1 / 3); _local14 = new Array(); _local11 = new Point((_local6 / 2), 0); _local12 = 0; while (_local12 < _arg2) { _local14.push(_local11); _local15 = _local11.clone(); _local15.x = ((_local11.x * Math.cos(_local9)) - (_local11.y * Math.sin(_local9))); _local15.y = ((_local11.x * Math.sin(_local9)) + (_local11.y * Math.cos(_local9))); _local11 = _local15.clone(); _local12++; }; _local12 = 0; while (_local12 < (_local7.length - 1)) { _local16 = new Sprite(); _local16.graphics.beginBitmapFill(_local5.bitmapData, null, true); _local16.graphics.moveTo(_local7[_local12].x, _local7[_local12].y); _local16.graphics.lineTo(_local7[(_local12 + 1)].x, _local7[(_local12 + 1)].y); _local16.graphics.lineTo(_local13[(_local12 + 1)].x, _local13[(_local12 + 1)].y); _local16.graphics.lineTo(_local13[_local12].x, _local13[_local12].y); _local16.graphics.endFill(); _local4.push(_local16); _local12++; }; _local12 = 0; _local16 = new Sprite(); _local16.graphics.beginBitmapFill(_local5.bitmapData, null, true); _local16.graphics.moveTo(_local7[_local12].x, _local7[_local12].y); _local16.graphics.lineTo(_local13[_local12].x, _local13[_local12].y); _local16.graphics.lineTo(_local13[(_local13.length - 1)].x, _local13[(_local13.length - 1)].y); _local16.graphics.lineTo(_local7[(_local7.length - 1)].x, _local7[(_local7.length - 1)].y); _local16.graphics.lineTo(_local7[_local12].x, _local7[_local12].y); _local16.graphics.endFill(); _local4.push(_local16); _local7 = _local13; _local13 = _local14; _local12 = 0; while (_local12 < (_local7.length - 1)) { _local16 = new Sprite(); _local16.graphics.beginBitmapFill(_local5.bitmapData, null, true); _local16.graphics.moveTo(_local7[_local12].x, _local7[_local12].y); _local16.graphics.lineTo(_local7[(_local12 + 1)].x, _local7[(_local12 + 1)].y); _local16.graphics.lineTo(_local13[(_local12 + 1)].x, _local13[(_local12 + 1)].y); _local16.graphics.lineTo(_local13[_local12].x, _local13[_local12].y); _local16.graphics.endFill(); _local4.push(_local16); _local12++; }; _local12 = 0; _local16 = new Sprite(); _local16.graphics.beginBitmapFill(_local5.bitmapData, null, true); _local16.graphics.moveTo(_local7[_local12].x, _local7[_local12].y); _local16.graphics.lineTo(_local13[_local12].x, _local13[_local12].y); _local16.graphics.lineTo(_local13[(_local13.length - 1)].x, _local13[(_local13.length - 1)].y); _local16.graphics.lineTo(_local7[(_local7.length - 1)].x, _local7[(_local7.length - 1)].y); _local16.graphics.lineTo(_local7[_local12].x, _local7[_local12].y); _local16.graphics.endFill(); _local4.push(_local16); _local7 = _local13; _local16 = new Sprite(); _local16.graphics.beginBitmapFill(_local5.bitmapData, null, true); _local16.graphics.moveTo(_local7[0].x, _local7[0].y); _local12 = 1; while (_local12 < _arg2) { _local16.graphics.lineTo(_local7[_local12].x, _local7[_local12].y); _local12++; }; _local16.graphics.lineTo(_local7[0].x, _local7[0].y); _local16.graphics.endFill(); _local4.push(_local16); return (_local4); } private static function DrawStar(_arg1:Number, _arg2:int, _arg3:Boolean, _arg4:int, _arg5:Class, _arg6:Number, _arg7:Number, _arg8:Number):Sprite{ var _local9:Bitmap; var _local10:Sprite; var _local11:int; var _local12:Point; var _local13:Array; var _local14:Number; var _local15:Number; var _local16:Point; var _local17:Point; var _local18:Number; var _local19:Number; var _local20:Point; var _local21:Number; var _local22:Number; var _local23:Array; var _local24:Array; _local9 = (new (_arg5) as Bitmap); _local10 = new Sprite(); _local10.graphics.beginBitmapFill(_local9.bitmapData, null, true); _local13 = new Array(); _local14 = (360 / _arg2); _local15 = ((_local14 * Math.PI) / 180); _local16 = new Point((_arg1 / 2), 0); _local17 = _local16.clone(); _local18 = _arg8; _local19 = ((_local18 * Math.PI) / 180); _local17.x = ((_local16.x * Math.cos(_local19)) - (_local16.y * Math.sin(_local19))); _local17.y = ((_local16.x * Math.sin(_local19)) + (_local16.y * Math.cos(_local19))); _local11 = 0; while (_local11 < _arg2) { _local13.push(_local17); _local12 = _local17.clone(); _local12.x = ((_local17.x * Math.cos(_local15)) - (_local17.y * Math.sin(_local15))); _local12.y = ((_local17.x * Math.sin(_local15)) + (_local17.y * Math.cos(_local15))); _local17 = _local12.clone(); _local11++; }; _local16 = new Point((_arg1 / (2 * _arg7)), 0); _local20 = _local16.clone(); _local21 = (_arg6 + _arg8); _local22 = ((_local21 * Math.PI) / 180); _local23 = new Array(); _local20.x = ((_local16.x * Math.cos(_local22)) - (_local16.y * Math.sin(_local22))); _local20.y = ((_local16.x * Math.sin(_local22)) + (_local16.y * Math.cos(_local22))); _local11 = 0; while (_local11 < _arg2) { _local23.push(_local20); _local12 = _local20.clone(); _local12.x = ((_local20.x * Math.cos(_local15)) - (_local20.y * Math.sin(_local15))); _local12.y = ((_local20.x * Math.sin(_local15)) + (_local20.y * Math.cos(_local15))); _local20 = _local12.clone(); _local11++; }; _local24 = new Array(); _local11 = 0; while (_local11 < _arg2) { _local24.push(_local13[_local11]); _local24.push(_local23[_local11]); _local11++; }; _local10.graphics.moveTo(_local24[0].x, _local24[0].y); _local11 = 1; while (_local11 < _local24.length) { _local10.graphics.lineTo(_local24[_local11].x, _local24[_local11].y); if (_arg3){ _local10.graphics.moveTo(_local24[_local11].x, _local24[_local11].y); }; _local11++; }; _local10.graphics.lineTo(_local24[0].x, _local24[0].y); _local10.graphics.endFill(); return (_local10); } public static function DrawPolyStar(_arg1:Array):Sprite{ return (DrawStar(_arg1[1], _arg1[4], _arg1[3], _arg1[2], _arg1[0], _arg1[5], _arg1[6], _arg1[7])); } public static function DrawPolygon(_arg1:Array):Sprite{ return (Draw(_arg1[1], _arg1[4], _arg1[3], _arg1[2], _arg1[0], _arg1[5], _arg1[6])); } } }//package RES.OBJECTS.DISPLAY
Section 78
//OGBorder (RES.OBJECTS.GRAPHICS.OGBorder) package RES.OBJECTS.GRAPHICS { import ENGINE.DISPLAY.*; import flash.geom.*; import RES.OBJECTS.DISPLAY.*; public class OGBorder extends OSprite { private const cAlpha:Number = 0.25; private var iCellSize:Number; private var iStoneColor:int; private var iStone:Array; private var iBg:Array; private var iState:int; private var iBorderType:int; private var iVisible:Array; private var iDirectX:int; private var iCurrentIndex:int; private var iDirectY:int; private var iBitmapFactory:OGBitmapFactory; private var iStoneCount:int; public static const cTop:int = 1; public static const cdDown:int = 1; public static const stNormal:int = 0; public static const cLeft:int = 3; public static const cdLeft:int = 4; public static const stInit:int = 1; public static const cButtom:int = 2; public static const cdNone:int = 0; public static const cdRight:int = 3; public static const cdUp:int = 2; public static const cRight:int = 4; public function OGBorder(_arg1:int, _arg2:int, _arg3:int, _arg4:OGBitmapFactory, _arg5:Number){ iStoneColor = _arg2; iBorderType = _arg1; iStoneCount = _arg3; iStone = new Array(); iBitmapFactory = _arg4; iCellSize = _arg5; this.Init(); } public function SetBomb(_arg1:int):void{ this.iStone[_arg1].SetBomb(); } public function set State(_arg1:int):void{ var _local2:int; iState = _arg1; switch (_arg1){ case stNormal: _local2 = 0; while (_local2 < iStone.length) { iStone[_local2].State = stNormal; _local2++; }; break; case stInit: _local2 = 0; while (_local2 < iStone.length) { iStone[_local2].alpha = 0; _local2++; }; iCurrentIndex = 0; break; }; } public function SetClear(_arg1:int):void{ this.iStone[_arg1].SetClear(); } private function Init():void{ var _local1:int; var _local2:OGStone; iBg = new Array(iStoneCount); switch (iBorderType){ case cTop: iDirectX = cdNone; iDirectY = cdDown; _local1 = 0; while (_local1 < iStoneCount) { _local2 = new OGStone(_local1, -1, iStoneColor, 0, iBorderType, iBitmapFactory, iCellSize); iStone.push(_local2); _local2.SetPos(new Point((((_local1 + 1) * iCellSize) + (iCellSize / 2)), (iCellSize / 2))); iBg[_local1] = new OBitmap(); iBg[_local1].CopyFrom(iBitmapFactory.GetBackGround()); iBg[_local1].Pos((((_local1 + 1) * iCellSize) + (iCellSize / 2)), (iCellSize / 2)); iBg[_local1].alpha = 0.5; this.addChild(iBg[_local1]); this.addChild(_local2); _local1++; }; break; case cButtom: iDirectX = cdNone; iDirectY = cdUp; _local1 = 0; while (_local1 < iStoneCount) { _local2 = new OGStone(_local1, -1, iStoneColor, 0, iBorderType, iBitmapFactory, iCellSize); iStone.push(_local2); _local2.SetPos(new Point((((_local1 + 1) * iCellSize) + (iCellSize / 2)), (((iStoneCount + 1) * iCellSize) + (iCellSize / 2)))); iBg[_local1] = new OBitmap(); iBg[_local1].CopyFrom(iBitmapFactory.GetBackGround()); iBg[_local1].Pos((((_local1 + 1) * iCellSize) + (iCellSize / 2)), (((iStoneCount + 1) * iCellSize) + (iCellSize / 2))); iBg[_local1].alpha = 0.5; this.addChild(iBg[_local1]); this.addChild(_local2); _local1++; }; break; case cLeft: iDirectX = cdRight; iDirectY = cdNone; _local1 = 0; while (_local1 < iStoneCount) { _local2 = new OGStone(_local1, -1, iStoneColor, 0, iBorderType, iBitmapFactory, iCellSize); iStone.push(_local2); _local2.SetPos(new Point((iCellSize / 2), (((_local1 + 1) * iCellSize) + (iCellSize / 2)))); iBg[_local1] = new OBitmap(); iBg[_local1].CopyFrom(iBitmapFactory.GetBackGround()); iBg[_local1].Pos((iCellSize / 2), (((_local1 + 1) * iCellSize) + (iCellSize / 2))); iBg[_local1].alpha = 0.5; this.addChild(iBg[_local1]); this.addChild(_local2); _local1++; }; break; case cRight: iDirectX = cdLeft; iDirectY = cdNone; _local1 = 0; while (_local1 < iStoneCount) { _local2 = new OGStone(_local1, -1, iStoneColor, 0, iBorderType, iBitmapFactory, iCellSize); iStone.push(_local2); _local2.SetPos(new Point((((iStoneCount + 1) * iCellSize) + (iCellSize / 2)), (((_local1 + 1) * iCellSize) + (iCellSize / 2)))); iBg[_local1] = new OBitmap(); iBg[_local1].CopyFrom(iBitmapFactory.GetBackGround()); iBg[_local1].Pos((((iStoneCount + 1) * iCellSize) + (iCellSize / 2)), (((_local1 + 1) * iCellSize) + (iCellSize / 2))); iBg[_local1].alpha = 0.5; this.addChild(iBg[_local1]); this.addChild(_local2); _local1++; }; break; }; iVisible = new Array(iStoneCount); _local1 = 0; while (_local1 < iVisible.length) { iVisible[_local1] = true; _local1++; }; } public function SetColor(_arg1:int):void{ var _local2:int; iStoneColor = _arg1; _local2 = 0; while (_local2 < iStone.length) { iStone[_local2].SetColor(_arg1, this.iVisible[_local2]); _local2++; }; } public function get Color():int{ return (this.iStoneColor); } public function Stone(_arg1:int):OGStone{ return (this.iStone[_arg1]); } public function get prType():int{ return (this.iBorderType); } public function get State():int{ return (this.iState); } public function SetFire(_arg1:int):void{ this.iStone[_arg1].SetFire(); } public function set Visible(_arg1:Array):void{ var _local2:int; _local2 = 0; while (_local2 < this.iVisible.length) { iVisible[_local2] = _arg1[_local2]; SetVisible(_arg1[_local2], _local2); _local2++; }; } public function onEnterFrame():void{ switch (this.State){ case stInit: if (iCurrentIndex >= iStone.length){ this.State = stNormal; return; }; if (iStone[iCurrentIndex].alpha < 1){ iStone[iCurrentIndex].alpha = (iStone[iCurrentIndex].alpha + cAlpha); } else { iCurrentIndex++; }; break; }; } private function SetVisible(_arg1:Boolean, _arg2:int):void{ iStone[_arg2].SetColor(iStoneColor, this.iVisible[_arg2]); } } }//package RES.OBJECTS.GRAPHICS
Section 79
//OGCell (RES.OBJECTS.GRAPHICS.OGCell) package RES.OBJECTS.GRAPHICS { import ENGINE.DISPLAY.*; import RES.OBJECTS.DISPLAY.*; public class OGCell extends OBitmap { private var iBitmapLibrary:OGBitmapFactory; public function OGCell(_arg1:OGBitmapFactory, _arg2:int=1){ super(null, 0, 0); iBitmapLibrary = _arg1; if (_arg2 > 0){ this.CopyFrom(iBitmapLibrary.GetBackGround()); }; } public function SetBG():void{ var _local1:Number; var _local2:Number; _local1 = this.prX; _local2 = this.prY; this.CopyFrom(iBitmapLibrary.GetBackGround()); this.Pos(_local1, _local2); } } }//package RES.OBJECTS.GRAPHICS
Section 80
//OGDeleteStone (RES.OBJECTS.GRAPHICS.OGDeleteStone) package RES.OBJECTS.GRAPHICS { import ENGINE.DISPLAY.*; import flash.geom.*; import ENGINE.CORE.*; public class OGDeleteStone extends OSprite { private var iPoses:Array; private var iPsBitmaps:Array; private var iRand:ORandomInt; private var isDeleteInit:Boolean; private var iBitmaps:Array; public function OGDeleteStone(_arg1:int){ var _local2:int; super(); isDeleteInit = false; iBitmaps = new Array(_arg1); iPoses = new Array(_arg1); iPsBitmaps = new Array(_arg1); _local2 = 0; while (_local2 < _arg1) { iBitmaps[_local2] = new OBitmap(); this.addChild(iBitmaps[_local2]); iPoses[_local2] = new Point(); iPsBitmaps[_local2] = new Point(); _local2++; }; iRand = new ORandomInt(); iRand.SeedRand(); this.alpha = 0; } public function Clear():void{ var _local1:int; _local1 = 0; while (_local1 < iBitmaps.length) { iBitmaps[_local1].Clear(); _local1++; }; } public function SetColor(_arg1:OSprite):void{ var _local2:int; var _local3:OBitmap; _local2 = 0; while (_local2 < (_arg1.numChildren - 1)) { _local3 = (_arg1.getChildAt(_local2) as OBitmap); iPoses[_local2].x = _local3.prX; iPoses[_local2].y = _local3.prY; iBitmaps[_local2].CopyFrom(_local3); this.addChild(iBitmaps[_local2]); iBitmaps[_local2].Pos(iPoses[_local2].x, iPoses[_local2].y); _local2++; }; } public function Delete():Boolean{ var _local1:int; var _local2:int; var _local3:int; if (!isDeleteInit){ _local1 = 0; while (_local1 < iBitmaps.length) { iPsBitmaps[_local1].x = ((Math.random() * 2) - 1); iPsBitmaps[_local1].y = ((Math.random() * 4) - 1); _local2 = iRand.RandOnInterval(0, 1); _local3 = ((_local2)==1) ? 1 : -1; iPsBitmaps[_local1].x = (iPsBitmaps[_local1].x * _local3); _local2 = iRand.RandOnInterval(0, 1); _local3 = ((_local2)==1) ? 1 : -1; iPsBitmaps[_local1].y = (iPsBitmaps[_local1].y * _local3); this.alpha = 1; _local1++; }; isDeleteInit = true; }; if (this.alpha > 0){ this.alpha = (this.alpha - 0.025); _local1 = 0; while (_local1 < iBitmaps.length) { iBitmaps[_local1].prX = (iBitmaps[_local1].prX + iPsBitmaps[_local1].x); iBitmaps[_local1].prY = (iBitmaps[_local1].prY + iPsBitmaps[_local1].y); _local1++; }; return (true); }; isDeleteInit = false; return (false); } } }//package RES.OBJECTS.GRAPHICS
Section 81
//OGField (RES.OBJECTS.GRAPHICS.OGField) package RES.OBJECTS.GRAPHICS { import ENGINE.DISPLAY.*; import flash.events.*; import flash.geom.*; import RES.OBJECTS.DISPLAY.*; import RES.OBJECTS.PLAYRECORD.*; import ENGINE.CORE.*; import flash.utils.*; import RES.OBJECTS.UTILS.*; import RES.OBJECTS.Particle.*; import RES.OBJECTS.LEVELS.*; import RES.OBJECTS.BONUSES.*; import RES.OBJECTS.LOGIC.*; public class OGField extends OSprite { private const h:Point; private const cClearBonus:int = 100; private const cSplashDelay:int = 3000; private const cCharScore:int = 200; private const cScore:int = 100; private var iDeleteCount:int; private var iGridSh:Array; private var iCellSize:Number; private var iRecord:ORecord; private var iPlayRecord:OPlayRecord; private var iSplashStone:OGStone; private var iFireCell:OUniqueArray; private var iWordBtm:Array; private var pEnd:OGStone; private var iCol:int; private var iMoveCell:OUniqueArray; private var iTimer:int; private var iWIndex:int; private var iCells:Array; private var iGray:Boolean; private var iFinish:Boolean; private var iRandom:ORandomInt; private var iHint:OBitmap; private var iBitmapLibrary:OGBitmapFactory; private var iWordShow:Boolean;// = false private var iRow:int; private var iColorCount:int; private var iWordIdx:OUniqueArray; private var cAlpha:Number; private var iStoneIndex:OUniqueArray; private var iTm:int; private var iBombCell:OUniqueArray; private var iGenerateCount:int; private var iInitStone:Array; private var iUnresultCount:int; private var iFireBonusLen:int; private var iStepChange:int; private var iClearCell:OUniqueArray; private var iUnresultStep:int; private var iLen:int; private var iNextMove:Boolean; private var iFindPoint:Point; private var iDeleteCell:OUniqueArray; private var iClearBonusLen:int; private var iFindPoint1:Point; private var iClickStone:OGStone; private var iDelIndex:OUniquePointsArray; private var iBgIndex:OUniqueArray; private var iGrayHint:Boolean; private var pStone1:Point; private var iCurrentBG:OGCell; private var iBorders:Array; private var iColors:OUniqueArray; private var gParticleContainer:CParticleContainer; private var iBonusPos:Point; private var iBombBonusLen:int; private var iGrid:Array; private var pEnd1:OGStone; private var iParams:Array; private var iGrayCnt:Number; private var iStepCounter:int; private var iCurrentStone:OGStone; private var iBordersType:int; private var iMBonus:OMBonus; private var iBGCells:Array; private var iGenerateCell:Array; private var iOverStone:OGStone; private var iState:int; private var iScore:int; private var iReplay:Boolean; private var iDirect:int; private var iLField:OLField; private var iBorderColors:Array; private var iInitCells:Array; private var iHintText:Array; private var iBonusAccept:Array; private var iIndex:int; private var iGrayCell:OGStone; private var iNextMoveCell:OGStone; public static const stAutoDelete:int = 8; public static const stEndDelete:int = 6; public static const stNotComplete:int = 20; public static const stEndFire:int = 7; public static const cLeft:int = 2; public static const stDeleteBonus:int = 14; public static const stInitBG:int = 17; public static const stBomb:int = 10; public static const cDown:int = 0; public static const stEndMove:int = 2; public static const stGenerate:int = 4; public static const stCheckDelete:int = 16; public static const stEndClear:int = 9; public static const stEndMoveBonus:int = 12; public static const stFire:int = 5; public static const stComplete:int = 19; public static const stStartClear:int = 22; public static const iBorderType:Array = [OGBorder.cTop, OGBorder.cButtom, OGBorder.cLeft, OGBorder.cRight]; public static const stMove:int = 1; public static const stInitStone:int = 18; public static const cUp:int = 1; public static const stGray:int = 15; public static const stMoveBonus:int = 11; public static const stWait:int = 0; public static const cRight:int = 3; public static const stDelete:int = 3; public static const stInitBorders:int = 21; public function OGField(_arg1:Array){ h = new Point(0, -40); iWordShow = false; super(); iParams = _arg1; this.Init(); } private function BorderNormal():Boolean{ var _local1:int; _local1 = 0; while (_local1 < iBorders.length) { if (iBorders[_local1].State != OGBorder.stNormal){ return (false); }; _local1++; }; return (true); } public function get State():int{ return (this.iState); } override public function Free():void{ var _local1:int; var _local2:int; if (iGrid){ _local1 = 0; while (_local1 < iGrid.length) { _local2 = 0; while (_local2 < iGrid.length) { iCells[_local1][_local2].removeEventListener(MouseEvent.CLICK, OnMouseClick); iCells[_local1][_local2].removeEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); iCells[_local1][_local2].removeEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); _local2++; }; _local1++; }; }; iRecord = null; iCells = null; iBGCells = null; iColors = null; iLField = null; iGrid = null; iGridSh = null; iParams = null; iBitmapLibrary = null; iBorders = null; iBorderColors = null; iMoveCell = null; iDeleteCell = null; iClickStone = null; iDelIndex = null; iGenerateCell = null; iRandom = null; iFireCell = null; iClearCell = null; iBombCell = null; iBonusAccept = null; } public function get Score():int{ return (this.iScore); } private function InitColors():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; iColors = new OUniqueArray(); iColors.Add(0); while (iColors.length < iColorCount) { _local2 = iRandom.RandOnInterval(1, OLevelsList.cColorsCount); iColors.Add(_local2); }; _local1 = 0; while (_local1 < iGrid.length) { _local3 = 0; while (_local3 < iGrid[_local1].length) { if (iGrid[_local1][_local3] > 0){ _local4 = iRandom.RandOnInterval(1, (iColors.length - 1)); iGrid[_local1][_local3] = iColors[_local4]; }; _local3++; }; _local1++; }; } public function set prPlayRecord(_arg1:OPlayRecord):void{ this.iPlayRecord = _arg1; } public function onEnterFrame():void{ var _local1:Boolean; var _local2:int; iTm++; PlayRecord(); this.iMBonus.onEnterFrame(); _local1 = false; if (((((!(iReplay)) && (iOverStone))) && ((iOverStone.State == OGStone.stMouseOver)))){ iOverStone.onEnterFrame(); }; switch (this.State){ case stInitBorders: if (BorderNormal()){ this.State = stWait; } else { _local2 = 0; while (_local2 < iBorders.length) { iBorders[_local2].onEnterFrame(); _local2++; }; }; break; case stInitStone: if (this.iCurrentStone.alpha < 1){ this.iCurrentStone.alpha = (this.iCurrentStone.alpha + cAlpha); } else { this.State = stInitStone; }; break; case stInitBG: if (this.iCurrentBG.alpha < 1){ this.iCurrentBG.alpha = (this.iCurrentBG.alpha + cAlpha); } else { this.State = stInitBG; }; break; case stMove: _local2 = 0; while (_local2 < iMoveCell.length) { if (iMoveCell[_local2].State == OGStone.stMove){ iMoveCell[_local2].onEnterFrame(); if ((((((((iMoveCell[_local2].State == OGStone.stEndMove)) && (pStone1))) && (pEnd1))) && (iNextMoveCell))){ this.iMoveCell.Add(iNextMoveCell); iNextMoveCell.State = OGStone.stMove; pEnd.SetMove(pStone1, pEnd1, true, iDirect, null, false); pStone1 = null; pEnd1 = null; pEnd.State = OGStone.stMove; iMoveCell.push(pEnd); }; _local1 = true; }; _local2++; }; if (!_local1){ this.iMoveCell = new OUniqueArray(); this.State = stEndMove; iNextMoveCell = null; }; break; case stAutoDelete: _local1 = false; _local2 = 0; while (_local2 < iDeleteCell.length) { if (iDeleteCell[_local2].State == OGStone.stAutoDelete){ iDeleteCell[_local2].onEnterFrame(); if (!iReplay){ gParticleContainer.addSimpleParticle(0, iDeleteCell[_local2].prX, iDeleteCell[_local2].prY); }; _local1 = true; }; _local2++; }; if (!_local1){ iDeleteCell = new OUniqueArray(); this.State = stWait; }; break; case stGenerate: this.State = stWait; break; case stDelete: _local2 = 0; while (_local2 < iDeleteCell.length) { if (iDeleteCell[_local2].State == OGStone.stDelete){ iDeleteCell[_local2].onEnterFrame(); _local1 = true; }; _local2++; }; if (!_local1){ this.iDeleteCell = new OUniqueArray(); this.State = stEndDelete; }; break; case stDeleteBonus: _local2 = 0; while (_local2 < iDeleteCell.length) { if (iDeleteCell[_local2].State == OGStone.stDelete){ iDeleteCell[_local2].onEnterFrame(); _local1 = true; }; _local2++; }; if (!_local1){ this.iDeleteCell = new OUniqueArray(); this.State = stWait; }; break; case stFire: _local2 = 0; while (_local2 < iFireCell.length) { iFireCell[_local2].onEnterFrame(); _local2++; }; break; case stStartClear: _local2 = 0; while (_local2 < iClearCell.length) { iClearCell[_local2].onEnterFrame(); _local2++; }; break; case stBomb: _local2 = 0; while (_local2 < iBombCell.length) { iBombCell[_local2].onEnterFrame(); _local2++; }; break; case stMoveBonus: _local2 = 0; while (_local2 < iMoveCell.length) { if (iMoveCell[_local2].State == OGStone.stMove){ iMoveCell[_local2].onEnterFrame(); if ((((((((iMoveCell[_local2].State == OGStone.stEndMove)) && (pStone1))) && (pEnd1))) && (iNextMoveCell))){ this.iMoveCell.Add(iNextMoveCell); iNextMoveCell.State = OGStone.stMove; pEnd.SetMove(pStone1, pEnd1, true, iDirect, null, false); pStone1 = null; pEnd1 = null; pEnd.State = OGStone.stMove; iMoveCell.push(pEnd); }; _local1 = true; }; _local2++; }; if (!_local1){ this.iMoveCell = new OUniqueArray(); if (iTimer == 0){ iTimer = getTimer(); return; }; if ((getTimer() - iTimer) >= 300){ this.State = stEndMoveBonus; iNextMoveCell = null; iTimer = 0; }; }; break; case stGray: if (iGrayCell.State != OGStone.stNormal){ iGrayCell.onEnterFrame(); return; }; this.State = stEndMove; break; case stComplete: _local1 = false; _local2 = 0; while (_local2 < iDeleteCell.length) { if (iDeleteCell[_local2].State == OGStone.stAutoDelete){ iDeleteCell[_local2].onEnterFrame(); if (!iReplay){ gParticleContainer.addSimpleParticle(0, iDeleteCell[_local2].prX, iDeleteCell[_local2].prY); }; _local1 = true; }; _local2++; }; if (!_local1){ iDeleteCell = new OUniqueArray(); this.iFinish = true; }; break; case stWait: if (iReplay){ return; }; if (iTimer == 0){ iTimer = getTimer(); } else { if ((getTimer() - iTimer) >= cSplashDelay){ if (((!(iSplashStone)) || ((iSplashStone.State == OGStone.stWait)))){ GetSplash(); iSplashStone.onEnterFrame(); }; if (iSplashStone.State == OGStone.stWait){ iTimer = 0; } else { iSplashStone.onEnterFrame(); }; }; }; break; }; } private function PlayRecord():void{ if (iPlayRecord){ switch (iPlayRecord.State){ case OPlayRecord.stWaitClick: iPlayRecord.onEnterFrame(); break; case OPlayRecord.stClick: ClickStone(iPlayRecord.prClickCell.x, iPlayRecord.prClickCell.y); iPlayRecord.State = OPlayRecord.stPlay; break; case OPlayRecord.stEnd: break; }; }; } public function set State(_arg1:int):void{ var _local2:int; var _local3:Boolean; var _local4:Boolean; var _local5:Boolean; var _local6:Array; var _local7:Point; var _local8:Array; var _local9:Array; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:Array; var _local16:Array; var _local17:Point; var _local18:OGStone; this.iState = _arg1; switch (_arg1){ case stAutoDelete: if (!iReplay){ OSound.PlaySound(GemzL.OSBubbleBang10); }; break; case stMove: if (!iReplay){ OSound.PlaySound(GemzL.OSBubbleBang04); }; break; case stInitBorders: break; case stInitStone: if (iStoneIndex.length == iInitStone.length){ iInitStone = null; iStoneIndex = null; iCurrentStone = null; this.State = stInitBorders; return; }; _local2 = iRandom.RandOnInterval(0, (iInitStone.length - 1)); while (!(iStoneIndex.Add(_local2))) { _local2 = iRandom.RandOnInterval(0, (iInitStone.length - 1)); }; iCurrentStone = iInitStone[_local2]; break; case stInitBG: _local2 = iRandom.RandOnInterval(0, (iInitCells.length - 1)); if (iBgIndex.length == iInitCells.length){ iCurrentBG = null; iInitCells = null; iBgIndex = null; this.State = stInitStone; return; }; while (!(iBgIndex.Add(_local2))) { _local2 = iRandom.RandOnInterval(0, (iInitCells.length - 1)); }; iCurrentBG = iInitCells[_local2]; break; case stEndFire: if (!iReplay){ OSound.PlaySound(GemzL.OSBubbleBang07); }; if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; _local13 = 0; while (_local13 < iBorders.length) { if (!this.iLField.Check(iBorders[_local13].Color)){ ChangeBorders(); }; iBorders[_local13].State = OGBorder.stNormal; _local13++; }; this.State = stWait; if (!iReplay){ _local14 = 0; while (_local14 < iRow) { switch (iDirect){ case 2: case 3: _local13 = 0; while (_local13 < 7) { gParticleContainer.addSimpleParticle(0, ((iCellSize / 2) + (iCellSize * _local14)), ((iCellSize / 2) + ((iIndex + 1) * iCellSize))); _local13++; }; break; case 0: case 1: _local13 = 0; while (_local13 < 7) { gParticleContainer.addSimpleParticle(0, ((iCellSize / 2) + ((iIndex + 1) * iCellSize)), ((iCellSize / 2) + (iCellSize * _local14))); _local13++; }; break; }; _local14++; }; }; break; case stEndClear: break; case stWait: _local3 = iLField.CheckEnd(); if (_local3){ this.State = stComplete; return; }; _local13 = 0; while (_local13 < iBorders.length) { _local15 = iLField.CheckNext(iBorders[_local13].prType); iBorders[_local13].Visible = _local15; _local13++; }; _local13 = 0; while (_local13 < iBorders.length) { if (!this.iLField.Check(iBorders[_local13].Color)){ ChangeBorders(); }; iBorders[_local13].State = OGBorder.stNormal; _local13++; }; if (((((((((!(iReplay)) && (iClickStone))) && (iClickStone.Active))) && (!(iClickStone.prBonus)))) && (!(iClickStone.prOut)))){ iOverStone = iClickStone; iOverStone.State = OGStone.stMouseOver; }; _local4 = this.iLField.HasGray(); if (((((_local4) && (!(iGrayHint)))) && (!(iReplay)))){ iHint.CopyFrom(iHintText[0]); iHint.Pos((h.x + 5), h.y); iGrayHint = true; }; if (((!(_local4)) && (!(iReplay)))){ iHint.Clear(); iGrayHint = false; }; _local5 = false; if ((((iStepCounter >= iStepChange)) && (!(_local3)))){ if (ChangeBorders()){ _local5 = true; } else { this.State = stNotComplete; }; }; if (iLField.DeleteColor(iColors)){ this.State = stGenerate; return; }; if (iUnresultCount >= iUnresultStep){ this.State = stGenerate; }; break; case stComplete: _local13 = 0; while (_local13 < iBorders.length) { _local15 = iLField.CheckNext(iBorders[_local13].prType); iBorders[_local13].Visible = _local15; _local13++; }; _local6 = iLField.GetGray(); _local13 = 0; while (_local13 < _local6.length) { iDeleteCell.push(this.iCells[_local6[_local13].x][_local6[_local13].y]); this.iCells[_local6[_local13].x][_local6[_local13].y].State = OGStone.stAutoDelete; this.iCells[_local6[_local13].x][_local6[_local13].y].SetColor(0, true); _local13++; }; break; case stEndMove: if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; _local13 = 0; while (_local13 < iBorders.length) { if (!this.iLField.Check(iBorders[_local13].Color)){ ChangeBorders(); }; iBorders[_local13].State = OGBorder.stNormal; _local13++; }; if (iFindPoint1){ _local16 = this.iLField.SetGray(iFindPoint1, iDirect); _local17 = iFindPoint1.clone(); } else { _local16 = this.iLField.SetGray(iFindPoint, iDirect); _local17 = iFindPoint.clone(); }; if (_local16[0]){ this.iCells[_local16[1].x][_local16[1].y].NewColor = this.iCells[_local17.x][_local17.y].prColor; this.iCells[_local16[1].x][_local16[1].y].State = OGStone.stGray; this.iGrayCell = this.iCells[_local16[1].x][_local16[1].y]; if (!iReplay){ iOverStone = null; }; this.State = stGray; return; }; if (iFindPoint1){ iDelIndex = iLField.FindAndClear([iFindPoint, iFindPoint1]); iFindPoint1 = null; } else { iDelIndex = iLField.FindAndClear([iFindPoint]); }; if (iDelIndex.length <= 0){ this.State = stWait; iUnresultCount++; } else { this.State = stDelete; }; break; case stDelete: if (!iReplay){ OSound.PlaySound(GemzL.OSBubbleBang03); }; if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; iDeleteCell = new OUniqueArray(); _local13 = 0; while (_local13 < iDelIndex.length) { _local7 = iDelIndex[_local13]; this.iCells[_local7.y][_local7.x].State = OGStone.stDelete; iDeleteCell.Add(this.iCells[_local7.y][_local7.x]); _local13++; }; _local2 = ((iDelIndex.length - 1) / 2); _local7 = iDelIndex[_local2]; iBonusPos = new Point(this.iCells[_local7.y][_local7.x].prX, this.iCells[_local7.y][_local7.x].prY); iDeleteCount = iDeleteCell.length; break; case stGenerate: _local8 = iLField.Generate(); if (!_local8){ this.State = stNotComplete; return; }; if (!iReplay){ OSound.PlaySound(GemzL.OSBubbleBang06); }; _local13 = 0; while (_local13 < _local8.length) { _local7 = _local8[_local13][0]; this.iCells[_local7.x][_local7.y].SetColor(_local8[_local13][1], true); _local13++; }; iUnresultCount = 0; break; case stEndDelete: if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; _local13 = 0; while (_local13 < iBorders.length) { if (!iLField.Check(iBorders[_local13].Color)){ ChangeBorders(); break; }; _local13++; }; if (!iReplay){ this.iMBonus.addBonus((iDeleteCount * cScore), iBonusPos.x, iBonusPos.y); }; iScore = (iScore + (iDeleteCount * cScore)); if ((((((((iDeleteCount >= iBombBonusLen)) && ((iDeleteCount < iFireBonusLen)))) && (iBonusAccept[0]))) || ((((((((iDeleteCount >= iFireBonusLen)) && ((iDeleteCount < iClearBonusLen)))) && (!(iLField.isAperture())))) && (iBonusAccept[1]))))){ this.State = stBomb; return; }; if ((((((((iDeleteCount >= iFireBonusLen)) && ((iDeleteCount < iClearBonusLen)))) && (iLField.isAperture()))) && (iBonusAccept[1]))){ this.State = stFire; return; }; if ((((iDeleteCount >= iClearBonusLen)) && (iBonusAccept[2]))){ this.State = stStartClear; return; }; this.iDeleteCount = 0; this.State = stWait; break; case stFire: if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; _local3 = iLField.CheckEnd(); if (_local3){ this.State = stComplete; return; }; if (!iReplay){ iHint.CopyFrom(iHintText[1]); iHint.Pos((h.x + 5), h.y); iGrayHint = false; }; _local13 = 0; while (_local13 < iBorders.length) { if (!iLField.Check(iBorders[_local13].Color)){ ChangeBorders(); break; }; _local13++; }; _local13 = 0; while (_local13 < iBorders.length) { _local15 = iLField.CheckNext(iBorders[_local13].prType); iBorders[_local13].Visible = _local15; _local13++; }; iFireCell = new OUniqueArray(); _local9 = iLField.GetFire((_local13 - 1)); _local13 = 0; while (_local13 < _local9.length) { iBorders[0].SetFire(_local9[_local13].x); iFireCell.Add(iBorders[0].Stone(_local9[_local13].x)); iBorders[1].SetFire(_local9[_local13].x); iFireCell.Add(iBorders[1].Stone(_local9[_local13].x)); iBorders[2].SetFire(_local9[_local13].y); iFireCell.Add(iBorders[2].Stone(_local9[_local13].y)); iBorders[3].SetFire(_local9[_local13].y); iFireCell.Add(iBorders[3].Stone(_local9[_local13].y)); _local13++; }; break; case stStartClear: if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; _local3 = iLField.CheckEnd(); if (_local3){ this.State = stComplete; return; }; if (!iReplay){ iHint.CopyFrom(iHintText[2]); iHint.Pos((h.x + 50), h.y); iGrayHint = false; }; _local13 = 0; while (_local13 < iBorders.length) { if (!iLField.Check(iBorders[_local13].Color)){ ChangeBorders(); break; }; _local13++; }; _local13 = 0; while (_local13 < iBorders.length) { _local15 = iLField.CheckNext(iBorders[_local13].prType); iBorders[_local13].Visible = _local15; _local13++; }; iClearCell = new OUniqueArray(); _local13 = 0; while (_local13 < iRow) { iBorders[0].SetClear(_local13); _local18 = iBorders[0].Stone(_local13); if (_local18.Active){ iClearCell.Add(_local18); }; iBorders[1].SetClear(_local13); _local18 = iBorders[1].Stone(_local13); if (_local18.Active){ iClearCell.Add(_local18); }; iBorders[2].SetClear(_local13); _local18 = iBorders[2].Stone(_local13); if (_local18.Active){ iClearCell.Add(_local18); }; iBorders[3].SetClear(_local13); _local18 = iBorders[3].Stone(_local13); if (_local18.Active){ iClearCell.Add(_local18); }; _local13++; }; break; case stBomb: if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; _local3 = iLField.CheckEnd(); if (_local3){ this.State = stComplete; return; }; if (!iReplay){ iHint.CopyFrom(iHintText[3]); iHint.Pos((h.x + 5), h.y); iGrayHint = false; }; _local13 = 0; while (_local13 < iBorders.length) { _local15 = iLField.CheckNext(iBorders[_local13].prType); iBorders[_local13].Visible = _local15; _local13++; }; iBombCell = new OUniqueArray(); _local13 = 0; while (_local13 < iRow) { iBorders[0].SetBomb(_local13); _local18 = iBorders[0].Stone(_local13); if (_local18.Active){ iBombCell.Add(_local18); }; iBorders[1].SetBomb(_local13); _local18 = iBorders[1].Stone(_local13); if (_local18.Active){ iBombCell.Add(_local18); }; iBorders[2].SetBomb(_local13); _local18 = iBorders[2].Stone(_local13); if (_local18.Active){ iBombCell.Add(_local18); }; iBorders[3].SetBomb(_local13); _local18 = iBorders[3].Stone(_local13); if (_local18.Active){ iBombCell.Add(_local18); }; _local13++; }; break; case stEndMoveBonus: if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; this.iDeleteCell.Add(this.iCells[iFindPoint.x][iFindPoint.y]); _local10 = iFindPoint.x; _local11 = iFindPoint.y; iDeleteCount = 0; _local9 = new Array(); _local9.push(new Point(_local10, _local11)); _local9.push(new Point((_local10 - 1), (_local11 - 1))); _local9.push(new Point(_local10, (_local11 - 1))); _local9.push(new Point((_local10 + 1), (_local11 - 1))); _local9.push(new Point((_local10 + 1), _local11)); _local9.push(new Point((_local10 + 1), (_local11 + 1))); _local9.push(new Point(_local10, (_local11 + 1))); _local9.push(new Point((_local10 - 1), (_local11 + 1))); _local9.push(new Point((_local10 - 1), _local11)); _local12 = 1; _local13 = 0; while (_local13 < _local9.length) { if ((((iLField.GetCellValue(_local9[_local13]) > 0)) && ((((((((_local9[_local13].x >= 0)) && ((_local9[_local13].y >= 0)))) && ((_local9[_local13].x < iGrid.length)))) && ((_local9[_local13].y < iGrid.length)))))){ this.iCells[_local9[_local13].x][_local9[_local13].y].State = OGStone.stDelete; iDeleteCell.Add(this.iCells[_local9[_local13].x][_local9[_local13].y]); iLField.ClearValue(_local9[_local13].x, _local9[_local13].y); }; _local13++; }; this.State = stDeleteBonus; break; case stDeleteBonus: _local2 = ((iDeleteCell.length - 1) / 2); iBonusPos = new Point(this.iDeleteCell[_local2].prX, this.iDeleteCell[_local2].prY); if (!iReplay){ if (!iReplay){ OSound.PlaySound(GemzL.OSBubbleBang05); }; this.iMBonus.addBonus((iDeleteCell.length * cScore), iBonusPos.x, iBonusPos.y); }; iScore = (iScore + (iDeleteCell.length * cScore)); break; }; } private function InitGrid():void{ var _local1:int; var _local2:OSprite; var _local3:Array; var _local4:int; var _local5:Array; var _local6:Array; var _local7:int; var _local8:int; var _local9:int; var _local10:OGStone; var _local11:OGCell; _local1 = 0; iInitCells = new Array(); iInitStone = new Array(); iStoneIndex = new OUniqueArray(); _local2 = new OSprite(); this.addChildAt(_local2, 0); iCells = new Array(); _local3 = new Array(); _local4 = 0; while (_local4 < iCol) { _local5 = new Array(); _local6 = new Array(); _local7 = 0; while (_local7 < iRow) { _local8 = this.iLField.GetCellValue(new Point(_local4, _local7)); _local9 = this.iLField.GetCellCurrValue(new Point(_local4, _local7)); _local10 = new OGStone(_local4, _local7, _local8, _local9, -1, iBitmapLibrary, iCellSize); if (_local8 > 0){ iInitStone.push(_local10); _local10.alpha = 0; }; _local10.SetPos(new Point((((_local4 + 1) * iCellSize) + (iCellSize / 2)), (((_local7 + 1) * iCellSize) + (iCellSize / 2)))); if (_local8 >= 0){ _local11 = new OGCell(iBitmapLibrary); } else { _local11 = new OGCell(iBitmapLibrary, 0); }; _local11.alpha = 0; _local2.addChildAt(_local11, 0); _local6.push(_local11); iInitCells.push(_local11); _local1++; _local11.Pos((((_local4 + 1) * iCellSize) + (iCellSize / 2)), (((_local7 + 1) * iCellSize) + (iCellSize / 2))); if (_local10){ this.addChildAt(_local10, (this.numChildren - 1)); }; _local5.push(_local10); _local7++; }; iCells.push(_local5); iBGCells.push(_local6); _local4++; }; iBgIndex = new OUniqueArray(); } private function Init():void{ var _local1:int; var _local2:Array; var _local3:Number; var _local4:int; var _local5:OBitmap; var _local6:OGBorder; var _local7:int; var _local8:Array; if (!iReplay){ iHint = new OBitmap(); this.addChild(iHint); iGrayHint = false; iHintText = new Array(); _local4 = 0; while (_local4 < 4) { _local5 = GemzS.TextureText(GemzL.OGField_HintText[_local4]); iHintText.push(_local5); _local4++; }; }; gParticleContainer = new CParticleContainer(); this.addChild(gParticleContainer); iFinish = false; iWIndex = -1; iScore = 0; iWordBtm = new Array(); iRecord = new ORecord(); iBGCells = new Array(); iWordIdx = new OUniqueArray(); iRandom = new ORandomInt(); iRandom.SeedRand(iParams[2]); iGrid = OArrayUtils.CloneArray(iParams[0][0]); iGridSh = OArrayUtils.CloneArray(iParams[0][0]); iLen = iParams[0][1]; iFireBonusLen = (iLen + 2); iClearBonusLen = (iLen + 3); iBombBonusLen = (iLen + 1); iBordersType = iParams[0][3]; iStepChange = iParams[0][4]; iUnresultStep = iParams[0][5]; iGenerateCount = iParams[0][6]; iColorCount = iParams[0][7]; iBonusAccept = iParams[0][8]; iGray = iParams[0][9]; iGrayCnt = iParams[0][10]; iColors = new OUniqueArray(); InitColors(); iCol = iGrid.length; iRow = iGrid[0].length; iCellSize = (iParams[1][0] / (iCol + 2)); iReplay = iParams[3]; _local1 = iRandom.RandOnInterval(0, (iParams[0][2].length - 1)); _local2 = iParams[0][2][_local1]; iBitmapLibrary = new OGBitmapFactory([iColors, [iCol, iRow], _local2, iCellSize, iParams[2]]); iColors.sort(); iLField = new OLField([iGrid, iColors, iLen, iGenerateCount, iGridSh, iGray, iGrayCnt, iParams[2]]); iBorders = new Array(); iBorderColors = new Array(iRow); InitBordersColor(); _local4 = 0; while (_local4 < 4) { _local6 = new OGBorder(iBorderType[_local4], iBorderColors[_local4], iRow, iBitmapLibrary, iCellSize); iBorders.push(_local6); this.addChild(_local6); _local6.State = OGBorder.stInit; _local7 = 0; while (_local7 < iRow) { _local6.Stone(_local7).addEventListener(MouseEvent.CLICK, OnMouseClick); _local6.Stone(_local7).addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); _local6.Stone(_local7).addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); _local7++; }; _local4++; }; iMoveCell = new OUniqueArray(); iGenerateCell = new Array(); InitGrid(); _local4 = 0; while (_local4 < iBorders.length) { _local8 = iLField.CheckNext(iBorders[_local4].prType); iBorders[_local4].Visible = _local8; _local4++; }; cAlpha = ((iGrid.length)>5) ? (4 * (1 / iGrid.length)) : 0.25; this.iMBonus = new OMBonus(iBitmapLibrary, (iCellSize * 0.7)); this.addChild(iMBonus); _local3 = iCellSize; _local4 = 1; while (_local4 < 10) { iBitmapLibrary.registerBitmap(("digit_" + _local4.toString()), OPaint.MakeCell(_local4, _local3)); iBitmapLibrary.registerBitmap(("docked_digit_" + _local4.toString()), OPaint.MakeBooble(((1 / 182) * _local3), (_local4 * 35))); iBitmapLibrary.registerBitmap(("docked_digit_digit" + _local4.toString()), OPaint.MakeDigit(_local3, _local4, (_local4 * 35))); iBitmapLibrary.registerBitmap(("docked_digit_shadow" + _local4.toString()), OPaint.MakeShadow(_local3, _local4, (_local4 * 35))); _local4++; }; this.State = stInitBG; } private function InitBordersColor():void{ var _local1:int; var _local2:Array; var _local3:int; var _local4:int; switch (iBordersType){ case OLevelsList.cAllBorders: if (((iBorderColors) && ((iBorderColors.length > 0)))){ _local3 = iBorderColors[0]; } else { _local3 = 0; }; _local1 = this.iLField.BorderColor(_local3); _local4 = 0; while (_local4 < 4) { iBorderColors[_local4] = _local1; _local4++; }; break; case OLevelsList.cTopButtom: _local1 = this.iLField.BorderColor(_local3); _local4 = 0; while (_local4 < 2) { iBorderColors[_local4] = _local1; _local4++; }; _local1 = this.iLField.BorderColor(_local3); _local4 = 2; while (_local4 < 4) { iBorderColors[_local4] = _local1; _local4++; }; break; case OLevelsList.cMulticolor: _local2 = new Array(); _local4 = 0; while (_local4 < 4) { _local1 = this.iLField.BorderColor(_local3); _local2.push(_local1); _local4++; }; _local4 = 0; while (_local4 < 4) { iBorderColors[_local4] = _local2[_local4]; _local4++; }; break; }; } public function prFinish():Boolean{ return (this.iFinish); } private function GetSplash():void{ var _local1:int; var _local2:int; var _local3:OGStone; var _local4:Point; var _local5:int; var _local6:int; _local1 = (Math.random() * (iGrid.length - 1)); _local2 = (Math.random() * (iGrid.length - 1)); _local3 = iCells[_local1][_local2]; _local4 = new Point(_local1, _local2); _local5 = iLField.GetCellValue(_local4); _local6 = iLField.GetFillCount(); while ((((_local5 <= 0)) || ((((_local6 > 1)) && ((_local3 == iSplashStone)))))) { _local1 = iRandom.RandOnInterval(0, (iGrid.length - 1)); _local2 = iRandom.RandOnInterval(0, (iGrid.length - 1)); _local4.x = _local1; _local4.y = _local2; _local5 = iLField.GetCellValue(_local4); _local3 = iCells[_local1][_local2]; }; iSplashStone = iCells[_local1][_local2]; iSplashStone.State = OGStone.stSplash; } public function OnMouseClick(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; if (((((((!((this.State == stWait))) && (!((this.State == stFire))))) && (!((this.State == stStartClear))))) && (!((this.State == stBomb))))){ return; }; if (!(_arg1.currentTarget as OGStone).Active){ return; }; (_arg1.currentTarget as OGStone).prBonus = false; _local2 = (_arg1.currentTarget as OGStone).prBorderType; _local3 = (_arg1.currentTarget as OGStone).PosOn.x; iRecord.WriteNode(iTm, _local2, _local3); iTm = 0; if (iSplashStone){ iSplashStone.State = OGStone.stWait; }; ClickStone(_local2, _local3); } public function get prRecord():String{ return (this.iRecord.prRecord); } public function WaitClick():Boolean{ return ((((((((this.State == stWait)) || ((this.State == stFire)))) || ((this.State == stBomb)))) || ((this.State == stStartClear)))); } public function GetClickStone(_arg1:int, _arg2:int):OGStone{ return (this.iBorders[(_arg1 - 1)].Stone(_arg2)); } public function get prAnimation():Boolean{ return ((this.State == stWait)); } public function OnMouseOut(_arg1:MouseEvent):void{ var _local2:OGStone; _local2 = (_arg1.currentTarget as OGStone); if (((((!(_local2.Active)) || (_local2.prBonus))) || (!((_local2.State == OGStone.stMouseOver))))){ return; }; if (!iOverStone){ return; }; this.iOverStone.prOut = true; this.iOverStone.MouseOut(); } private function ChangeBorders():Boolean{ var _local1:Boolean; var _local2:int; var _local3:Array; var _local4:int; if (this.iLField.CheckEnd()){ this.State = stComplete; return (true); }; InitBordersColor(); _local1 = false; _local2 = 0; while (_local2 < iBorders.length) { _local3 = iLField.CheckNext(iBorders[_local2].prType); _local4 = 0; while (_local4 < _local3.length) { if (_local3[_local4]){ _local1 = true; }; _local4++; }; iBorders[_local2].Visible = _local3; _local2++; }; _local2 = 0; while (_local2 < iBorders.length) { iBorders[_local2].SetColor(iBorderColors[_local2]); _local2++; }; iStepCounter = 0; return (_local1); } public function OnMouseOver(_arg1:MouseEvent):void{ if ((((this.State == OGField.stComplete)) || ((this.State == OGField.stNotComplete)))){ return; }; this.iOverStone = (_arg1.currentTarget as OGStone); if (((((!(iOverStone.Active)) || (iOverStone.prBonus))) || (((!((iOverStone.State == OGStone.stMouseOver))) && (!((iOverStone.State == OGStone.stNormal))))))){ if (((!(iOverStone.Active)) && ((iOverStone.State == OGStone.stMouseOver)))){ iOverStone.State = OGStone.stNormal; }; return; } else { iOverStone.prOut = false; iOverStone.State = OGStone.stMouseOver; iOverStone.buttonMode = true; }; } public function ClickStone(_arg1:int, _arg2:int):void{ var _local3:Array; var _local4:Point; var _local5:Point; var _local6:Point; var _local7:OGStone; var _local8:Point; var _local9:Point; var _local10:Point; var _local11:int; iClickStone = this.iBorders[(_arg1 - 1)].Stone(_arg2); if (!iReplay){ iOverStone = iClickStone; }; switch (_arg1){ case OGBorder.cTop: iDirect = cDown; iIndex = iClickStone.PosOn.x; break; case OGBorder.cButtom: iDirect = cUp; iIndex = iClickStone.PosOn.x; break; case OGBorder.cLeft: iDirect = cRight; iIndex = iClickStone.PosOn.x; break; case OGBorder.cRight: iDirect = cLeft; iIndex = iClickStone.PosOn.x; break; }; switch (this.State){ case stWait: iStepCounter++; _local3 = iLField.FindPos(iDirect, iIndex, iClickStone.prColor); if (_local3){ if (_local3.length > 1){ _local4 = _local3[1][1]; if (_local4){ _local6 = _local3[1][0]; _local7 = this.iCells[_local6.x][_local6.y]; _local8 = _local6.clone(); switch (iDirect){ case 0: if (_local6.y > 0){ _local8.y = (_local8.y - 1); } else { _local8 = null; }; break; case 1: if (_local6.y < (iGrid.length - 1)){ _local8.y = (_local8.y + 1); } else { _local8 = null; }; break; case 2: if (_local6.x < (iGrid.length - 1)){ _local8.x = (_local8.x + 1); } else { _local8 = null; }; break; case 3: if (_local6.x > 0){ _local8.x = (_local8.x - 1); } else { _local8 = null; }; break; }; _local5 = new Point((((_local4.x + 1) * iCellSize) + (iCellSize / 2)), (((_local4.y + 1) * iCellSize) + (iCellSize / 2))); _local7.SetMove(_local5, this.iCells[_local4.x][_local4.y], true, iDirect, null, false); iFindPoint1 = _local4.clone(); if (_local8){ iNextMove = true; iNextMoveCell = _local7; } else { _local7.State = OGStone.stMove; this.iMoveCell.push(_local7); }; }; } else { iFindPoint1 = null; }; _local4 = _local3[0][1]; if (((((((((_local4) && ((_local4.x >= 0)))) && ((_local4.y >= 0)))) && ((_local4.x < iGrid.length)))) && ((_local4.y < iGrid.length)))){ pStone1 = new Point((((_local4.x + 1) * iCellSize) + (iCellSize / 2)), (((_local4.y + 1) * iCellSize) + (iCellSize / 2))); pEnd1 = this.iCells[_local4.x][_local4.y]; if (((_local6) && (_local8))){ pEnd = this.iCells[_local8.x][_local8.y]; if (iNextMove){ _local9 = new Point((((_local8.x + 1) * iCellSize) + (iCellSize / 2)), (((_local8.y + 1) * iCellSize) + (iCellSize / 2))); }; iClickStone.SetMove(_local9, pEnd, true, iDirect, _local9, iNextMove); } else { _local10 = new Point((((_local4.x + 1) * iCellSize) + (iCellSize / 2)), (((_local4.y + 1) * iCellSize) + (iCellSize / 2))); iClickStone.SetMove(_local10, this.iCells[_local4.x][_local4.y], true, iDirect); }; this.iMoveCell.push(iClickStone); iClickStone.State = OGStone.stMove; if (((iReplay) && (iOverStone))){ iOverStone.State = OGStone.stMove; }; iFindPoint = _local4.clone(); this.State = stMove; }; }; break; case stFire: switch (_arg1){ case 1: case 2: _local11 = 0; while (_local11 < iRow) { if (iLField.GetCellValue(new Point(iIndex, _local11)) < 0){ iBGCells[iIndex][_local11].SetBG(); iLField.SetValue(iIndex, _local11); iCells[iIndex][_local11].SetColor(0, true); }; _local11++; }; this.State = stEndFire; break; case 3: case 4: _local11 = 0; while (_local11 < iRow) { if (iLField.GetCellValue(new Point(_local11, iIndex)) < 0){ iBGCells[_local11][iIndex].SetBG(); iLField.SetValue(_local11, iIndex); iCells[_local11][iIndex].SetColor(0, true); }; _local11++; }; this.State = stEndFire; break; }; break; case stStartClear: iScore = (iScore + cClearBonus); iDeleteCell = new OUniqueArray(); switch (_arg1){ case 1: case 2: iDeleteCell = new OUniqueArray(); if (!iReplay){ this.iMBonus.addBonus(cClearBonus, iCells[iIndex][0].prX, iCells[iIndex][0].prY); }; _local11 = 0; while (_local11 < iRow) { if (iLField.GetCellValue(new Point(iIndex, _local11)) > 0){ iCells[iIndex][_local11].SetColor(0, true, true); iDeleteCell.push(iCells[iIndex][_local11]); iCells[iIndex][_local11].State = OGStone.stAutoDelete; iLField.ClearValue(iIndex, _local11); }; _local11++; }; this.State = stAutoDelete; break; case 3: case 4: if (!iReplay){ this.iMBonus.addBonus(cClearBonus, iCells[0][iIndex].prX, iCells[0][iIndex].prY); }; _local11 = 0; while (_local11 < iRow) { if (iLField.GetCellValue(new Point(_local11, iIndex)) > 0){ iCells[_local11][iIndex].SetColor(0, true, true); iDeleteCell.push(iCells[_local11][iIndex]); iCells[_local11][iIndex].State = OGStone.stAutoDelete; iLField.ClearValue(_local11, iIndex); }; _local11++; }; this.State = stAutoDelete; break; }; break; case stBomb: _local3 = iLField.FindPos(iDirect, iIndex, iClickStone.prColor); if (_local3){ if (_local3.length > 1){ _local4 = _local3[1][1]; if (_local4){ _local6 = _local3[1][0]; _local7 = this.iCells[_local6.x][_local6.y]; _local8 = _local6.clone(); switch (iDirect){ case 0: if (_local6.y > 0){ _local8.y = (_local8.y - 1); } else { _local8 = null; }; break; case 1: if (_local6.y < (iGrid.length - 1)){ _local8.y = (_local8.y + 1); } else { _local8 = null; }; break; case 2: if (_local6.x < (iGrid.length - 1)){ _local8.x = (_local8.x + 1); } else { _local8 = null; }; break; case 3: if (_local6.x > 0){ _local8.x = (_local8.x - 1); } else { _local8 = null; }; break; }; _local5 = new Point((((_local4.x + 1) * iCellSize) + (iCellSize / 2)), (((_local4.y + 1) * iCellSize) + (iCellSize / 2))); _local7.SetMove(_local5, this.iCells[_local4.x][_local4.y], true, iDirect, null, false); iFindPoint1 = _local4.clone(); if (_local8){ iNextMove = true; iNextMoveCell = _local7; } else { _local7.State = OGStone.stMove; this.iMoveCell.push(_local7); }; }; } else { iFindPoint1 = null; }; _local4 = _local3[0][1]; if (_local4){ pStone1 = new Point((((_local4.x + 1) * iCellSize) + (iCellSize / 2)), (((_local4.y + 1) * iCellSize) + (iCellSize / 2))); pEnd1 = this.iCells[_local4.x][_local4.y]; if (((_local6) && (_local8))){ pEnd = this.iCells[_local8.x][_local8.y]; if (iNextMove){ _local9 = new Point((((_local8.x + 1) * iCellSize) + (iCellSize / 2)), (((_local8.y + 1) * iCellSize) + (iCellSize / 2))); }; iClickStone.SetMove(_local9, pEnd, true, iDirect, _local9, iNextMove); } else { _local10 = new Point((((_local4.x + 1) * iCellSize) + (iCellSize / 2)), (((_local4.y + 1) * iCellSize) + (iCellSize / 2))); iClickStone.SetMove(_local10, this.iCells[_local4.x][_local4.y], true, iDirect); }; this.iMoveCell.push(iClickStone); iClickStone.State = OGStone.stMove; iFindPoint = _local4.clone(); this.State = stMoveBonus; }; }; break; }; } } }//package RES.OBJECTS.GRAPHICS
Section 82
//OGStone (RES.OBJECTS.GRAPHICS.OGStone) package RES.OBJECTS.GRAPHICS { import ENGINE.DISPLAY.*; import flash.geom.*; import RES.OBJECTS.DISPLAY.*; import ENGINE.CORE.*; import RES.OBJECTS.UTILS.*; import RES.OBJECTS.LEVELS.*; public class OGStone extends OSprite { private const iDAlpha:Number = 0.045; private const cStep:int = 10; private const cStarsCount:int = 5; private var iCoord:Point; private var iCellSize:Number; private var iSplash:Boolean; private var iCnt:int; private var iHit:OSprite; private var iIsBonus:Boolean; private var iNewBtm:OBitmap; private var iRnd:ORandomInt; private var iBitmapLibrary:OGBitmapFactory; private var iColor:int; private var iCV:int; private var iBtmIndex:int;// = 1 private var iNextStone:OGStone; private var iActive:Boolean; private var iBorderType:int; private var iIsOut:Boolean; private var iDx:Number; private var iDy:Number; private var iNext:Boolean; private var iBack:OBitmap; private var iPos:Point; private var iBtm:OBitmap; private var iStarIndex:int; private var iNewColor:int; private var iEndPos:Point; private var iDelete:OGDeleteStone; private var iStars:Array; private var iRndIndex:OUniqueArray; private var iState:int; private var iDirect:int; private var iNextPos:Point; private var iEndStone:OGStone; private var iFIndex:int; private var iHideStone:Boolean; public static const stWaitEnd:int = 3; public static const stMove:int = 1; public static const stBomb:int = 7; public static const stSplash:int = 11; public static const stEndMove:int = 2; public static const stDelete:int = 4; public static const stNormal:int = 0; public static const stClear:int = 6; public static const stFire:int = 5; public static const stMouseOver:int = 10; public static const stAutoDelete:int = 9; public static const stGray:int = 8; public static const stWait:int = 12; public function OGStone(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:OGBitmapFactory, _arg7:int){ iBtmIndex = 1; super(); iPos = new Point(_arg1, _arg2); iColor = _arg3; iCV = _arg4; iBorderType = _arg5; iBitmapLibrary = _arg6; this.iBtm = new OBitmap(); iBtm.smoothing = true; this.addChild(iBtm); iHit = new OSprite(); iHit.graphics.beginFill(0, 0); iHit.graphics.drawRect(((-(_arg7) * OGlobal.Scale) / 2), ((-(_arg7) * OGlobal.Scale) / 2), (_arg7 * OGlobal.Scale), (_arg7 * OGlobal.Scale)); iHit.graphics.endFill(); iCellSize = _arg7; this.addChildAt(iHit, (this.numChildren - 1)); this.Init(); this.hitArea = iHit; } public function SetBomb():void{ var _local1:int; if (!this.iActive){ return; }; this.State = stBomb; this.iIsBonus = true; this.iBtm.Clear(); this.iBtm.CopyFrom(iBitmapLibrary.GetBombStone(0)); iFIndex = 1; if (iStars){ _local1 = 0; while (_local1 < iStars.length) { if (iStars[_local1]){ iStars[_local1].alpha = 0; }; _local1++; }; }; } private function StoneFire():Boolean{ var _local1:Boolean; _local1 = false; if (this.iBtm){ this.iBtm.Clear(); this.iBtm.CopyFrom(iBitmapLibrary.GetFireStone(iFIndex)); if (this.iFIndex >= iBitmapLibrary.FireCount){ iBtmIndex = (iBtmIndex * -1); }; if ((((this.iFIndex <= 0)) && ((iBtmIndex < 0)))){ iBtmIndex = (iBtmIndex * -1); _local1 = true; }; this.iFIndex = (this.iFIndex + iBtmIndex); } else { _local1 = true; }; return (_local1); } public function SetColor(_arg1:int, _arg2:Boolean, _arg3:Boolean=false):void{ var _local4:Boolean; if (iCV <= 0){ this.iColor = _arg1; }; if (((_arg3) && ((iCV > 0)))){ iCV--; }; if (_arg2){ if (iColor > 0){ _local4 = (iCV == 0); switch (_local4){ case true: if (iColor == OLevelsList.cGray){ this.iBtm.CopyFrom(iBitmapLibrary.GetGrayStone()); } else { this.iBtm.CopyFrom(iBitmapLibrary.GetStone(iColor)); }; break; case false: this.iBtm.CopyFrom(iBitmapLibrary.GetBorder(iCV, iColor)); break; }; if (((!((iColor == 99))) && ((iBorderType < 0)))){ this.iActive = true; }; } else { this.iDelete.Clear(); this.iBtm.Clear(); }; } else { this.iBtm.Clear(); iActive = false; }; if (iNewBtm){ iNewBtm.Clear(); }; iActive = _arg2; } public function setStep(_arg1:int):void{ iCnt = _arg1; } public function get State():int{ return (this.iState); } private function StoneBomb():Boolean{ var _local1:Boolean; _local1 = false; if (this.iBtm){ this.iBtm.Clear(); this.iBtm.CopyFrom(iBitmapLibrary.GetBombStone(iFIndex)); if (this.iFIndex >= iBitmapLibrary.BombCount){ iBtmIndex = (iBtmIndex * -1); }; if ((((this.iFIndex <= 0)) && ((iBtmIndex < 0)))){ iBtmIndex = (iBtmIndex * -1); _local1 = true; }; this.iFIndex = (this.iFIndex + iBtmIndex); } else { _local1 = true; }; return (_local1); } public function get prColor():int{ return (this.iColor); } public function MouseOut():void{ var _local1:int; if (this.State == stMouseOver){ this.State = stNormal; } else { if (iStars){ _local1 = 0; while (_local1 < iStars.length) { iStars[_local1].alpha = 0; _local1++; }; }; }; this.buttonMode = false; } public function set prBonus(_arg1:Boolean):void{ this.iIsBonus = _arg1; } public function SetPos(_arg1:Point):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; iCoord = new Point(_arg1.x, _arg1.y); this.Pos(iCoord.x, iCoord.y); _local2 = 0; while (_local2 < cStarsCount) { _local3 = iRnd.RandOnInterval(0, 1); _local4 = ((_local3)==0) ? 1 : -1; _local3 = iRnd.RandOnInterval(0, 1); _local5 = ((_local3)==0) ? 1 : -1; iStars[_local2].Pos((iPos.x + (((Math.random() * iCellSize) / 5) * _local4)), (iPos.y + (((Math.random() * iCellSize) / 5) * _local5))); _local2++; }; } public function onEnterFrame():int{ switch (this.iState){ case stGray: if (this.iBtm.alpha > 0){ this.iBtm.alpha = (this.iBtm.alpha - iDAlpha); this.iNewBtm.alpha = (this.iNewBtm.alpha + -(iDAlpha)); } else { this.iBtm.CopyFrom(iNewBtm); this.iBtm.alpha = 1; this.iColor = iNewColor; iNewColor = 0; this.State = stNormal; }; break; case stSplash: if ((((iStars[iStarIndex].alpha < 1)) && (!(iSplash)))){ iStars[iStarIndex].alpha = (iStars[iStarIndex].alpha + (iDAlpha * 4)); } else { iStars[iStarIndex].alpha = (iStars[iStarIndex].alpha - (iDAlpha * 4)); iSplash = true; if (iStars[iStarIndex].alpha <= 0){ this.State = stSplash; }; }; break; case stMouseOver: if (this.Active){ if ((((iStars[iStarIndex].alpha < 1)) && (!(iSplash)))){ iStars[iStarIndex].alpha = (iStars[iStarIndex].alpha + (iDAlpha * 3)); } else { iStars[iStarIndex].alpha = (iStars[iStarIndex].alpha - (iDAlpha * 3)); iSplash = true; if (iStars[iStarIndex].alpha <= 0){ this.State = stMouseOver; }; }; }; break; case stMove: if (iCnt < cStep){ this.prX = (this.prX + iDx); this.prY = (this.prY + iDy); iCnt++; } else { this.State = stEndMove; return (0); }; break; case stWaitEnd: if (iEndStone.State == stNormal){ this.State = stEndMove; }; break; case stDelete: if (this.prBonus){ this.State = stNormal; }; if (!this.iDelete.Delete()){ this.iBtm.alpha = 1; this.iBtm.Clear(); this.State = stNormal; }; break; case stAutoDelete: if (this.iBtm.alpha > 0){ this.iBtm.alpha = (this.iBtm.alpha - iDAlpha); } else { this.iBtm.Clear(); this.iBtm.alpha = 1; this.State = stNormal; }; break; case stFire: StoneFire(); break; case stClear: StoneClear(); break; case stBomb: StoneBomb(); break; }; return (-1); } public function set State(_arg1:int):void{ var _local2:int; if (!this.iActive){ return; }; this.iState = _arg1; switch (_arg1){ case stSplash: if (iRndIndex.length >= cStarsCount){ iRndIndex = new OUniqueArray(); this.State = stWait; return; }; iStarIndex = iRnd.RandOnInterval(0, (iStars.length - 1)); while (!(iRndIndex.Add(iStarIndex))) { iStarIndex = iRnd.RandOnInterval(0, (iStars.length - 1)); }; iSplash = false; break; case stMouseOver: if (iRndIndex.length >= cStarsCount){ iRndIndex = new OUniqueArray(); }; iStarIndex = iRnd.RandOnInterval(0, (iStars.length - 1)); while (!(iRndIndex.Add(iStarIndex))) { iStarIndex = iRnd.RandOnInterval(0, (iStars.length - 1)); }; iSplash = false; break; case stGray: if (!iNewBtm){ iNewBtm = new OBitmap(); this.addChild(iNewBtm); }; iNewBtm.CopyFrom(iBitmapLibrary.GetStone(iNewColor)); iNewBtm.alpha = 0; break; case stMove: if (iStars){ _local2 = 0; while (_local2 < iStars.length) { if (iStars[_local2]){ iStars[_local2].alpha = 0; }; _local2++; }; }; break; case stEndMove: iNext = false; iNextPos = null; iEndStone.iCV = this.iCV; iEndStone.iColor = this.iColor; iEndStone.iActive = this.iActive; iEndStone.SetColor(this.iColor, true); this.iEndStone.prBitmap = this.prBitmap; this.iCV = 0; this.iBtm.Clear(); this.iDelete.Clear(); this.Pos(iCoord.x, iCoord.y); iCnt = 0; if (iStars){ _local2 = 0; while (_local2 < iStars.length) { if (iStars[_local2]){ iStars[_local2].alpha = 0; }; _local2++; }; }; break; case stWait: if (iStars){ _local2 = 0; while (_local2 < iStars.length) { if (iStars[_local2]){ iStars[_local2].alpha = 0; }; _local2++; }; }; break; case stNormal: if (!iIsBonus){ SetColor(this.iColor, this.iActive); }; if (iStars){ _local2 = 0; while (_local2 < iStars.length) { if (iStars[_local2]){ iStars[_local2].alpha = 0; }; _local2++; }; }; if (((((!(iIsOut)) && (iStars))) && ((this.iBorderType > 0)))){ this.State = stMouseOver; }; iIsBonus = false; break; case stDelete: if (iColor != 99){ this.iDelete.SetColor(iBitmapLibrary.GetDelete((iColor - 1))); }; if (iCV == 0){ this.iColor = 0; } else { iCV--; }; this.iBtm.alpha = 0; break; }; } private function StoneClear():Boolean{ var _local1:Boolean; _local1 = false; if (this.iBtm){ this.iBtm.Clear(); this.iBtm.CopyFrom(iBitmapLibrary.GetClearStone(iFIndex)); if (this.iFIndex >= iBitmapLibrary.ClearCount){ iBtmIndex = (iBtmIndex * -1); }; if ((((this.iFIndex <= 0)) && ((iBtmIndex < 0)))){ iBtmIndex = (iBtmIndex * -1); _local1 = true; }; this.iFIndex = (this.iFIndex + iBtmIndex); } else { _local1 = true; }; return (_local1); } public function get Active():Boolean{ return (this.iActive); } public function get prBorderType():int{ return (this.iBorderType); } private function Init():void{ var _local1:int; var _local2:Boolean; iRndIndex = new OUniqueArray(); iRnd = new ORandomInt(); iRnd.SeedRand(); iIsBonus = false; iDelete = new OGDeleteStone(iBitmapLibrary.GetDeleteCnt()); iNext = false; iNextPos = null; iBack = new OBitmap(); iBack.CopyFrom(iBitmapLibrary.GetBackGround()); this.addChildAt(iBack, 0); iBack.prVisible = false; if (iBorderType < 0){ this.addChild(iDelete); }; if (iColor > 0){ _local2 = (iCV == 0); switch (_local2){ case true: this.iBtm.CopyFrom(iBitmapLibrary.GetStone(iColor)); break; case false: this.iBtm.CopyFrom(iBitmapLibrary.GetBorder(iCV, iColor)); break; }; if (iBorderType < 0){ iDelete.SetColor(iBitmapLibrary.GetDelete((iColor - 1))); }; this.iActive = true; }; iStars = new Array(cStarsCount); _local1 = 0; while (_local1 < cStarsCount) { iStars[_local1] = new OBitmap(); iStars[_local1].CopyFrom(iBitmapLibrary.GetStar()); this.addChild(iStars[_local1]); iStars[_local1].alpha = 0; _local1++; }; } public function get PosOn():Point{ return (this.iPos); } public function get prBonus():Boolean{ return (this.iIsBonus); } public function SetClear():void{ var _local1:int; if (!this.iActive){ return; }; this.State = stClear; this.iIsBonus = true; this.iBtm.Clear(); this.iBtm.CopyFrom(iBitmapLibrary.GetClearStone(0)); iFIndex = 1; if (iStars){ _local1 = 0; while (_local1 < iStars.length) { if (iStars[_local1]){ iStars[_local1].alpha = 0; }; _local1++; }; }; } public function SetMove(_arg1:Point, _arg2:OGStone, _arg3:Boolean, _arg4:int, _arg5:Point=null, _arg6:Boolean=false):void{ iEndPos = _arg1; iNextPos = _arg5; iHideStone = _arg3; iDirect = _arg4; iNext = _arg6; iDx = (Math.abs((iEndPos.x - iCoord.x)) / cStep); iDy = (Math.abs((iEndPos.y - iCoord.y)) / cStep); switch (_arg4){ case OGField.cUp: case OGField.cLeft: iDx = (iDx * -1); iDy = (iDy * -1); break; }; iEndStone = _arg2; } public function set NewColor(_arg1:int):void{ this.iNewColor = _arg1; } public function SetFire():void{ var _local1:int; if (!this.iActive){ return; }; this.State = stFire; this.iIsBonus = true; this.iBtm.Clear(); this.iBtm.CopyFrom(iBitmapLibrary.GetFireStone(0)); iFIndex = 1; if (iStars){ _local1 = 0; while (_local1 < iStars.length) { if (iStars[_local1]){ iStars[_local1].alpha = 0; }; _local1++; }; }; } public function set prBitmap(_arg1:OBitmap):void{ this.iBtm.Clear(); this.iBtm.CopyFrom(_arg1); } public function get prBitmap():OBitmap{ return (this.iBtm); } public function set prOut(_arg1:Boolean):void{ this.iIsOut = _arg1; } public function get prOut():Boolean{ return (this.iIsOut); } } }//package RES.OBJECTS.GRAPHICS
Section 83
//OWInstruction (RES.OBJECTS.HOWTOPLAY.GRAHPICS.OWInstruction) package RES.OBJECTS.HOWTOPLAY.GRAHPICS { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.GRAPHICS.*; import ENGINE.CORE.*; import flash.utils.*; import RES.OBJECTS.UTILS.*; import flash.filters.*; import RES.OBJECTS.LEVELS.*; public class OWInstruction extends OWindow { private const cHintDelay:Number = 200; private const iCursorPoses:Array; private const iLevel1:Array; private const iLevel5:Array; private const iLevel3:Array; private const iLevel4:Array; private const iLevel7:Array; private const iLevel6:Array; private const cDelta:Number = 50; private const iLevel2:Array; private const iCursorX:int = 175; private const iCursorY:int = 100; private const iLevel_5:Array; private const iLevel_6:Array; private const iLevel_3:Array; private const iLevel_7:Array; private const iLevel_8:Array; private const iLevel_1:Array; private const cDAlpha:Number = 0.1; private const iLevelList:Array; private var iGame:OGField; private var iInstr:Array; private var iRecord:String; private var iDemoIndex:int; private var iRealDemo:int; private var iTimer:int; private var iPosIndex:int; public var iInstruction2:OBitmap; public var iInstruction3:OBitmap; public var iInstruction4:OBitmap; public var iInstruction5:OBitmap; public var iInstruction1:OBitmap; public var iInstruction6:OBitmap; public var iFrame:OBitmap; private var iClick:OBitmap; private var iCursorPos:Array; private var isHand:Boolean;// = false private var iHideBack:Boolean;// = false private var iDx:Number; private var iDy:Number; private var iFrameCounter:int; public var iBack:OButton; public var iEndLevel:OIObject; public var iNext:OButton; public var iClose:OButton; private var iTDelay:int; private var iCursor:OBitmap; private var iPos:Point; private var iCursorMain:OBitmap; public var iEndLevel1:OIObject; private var iCursorColor:String;// = "aqua1" private var iRecords:Array; public static const stCursorMove:int = 2; public static const stCursorSet:int = 3; public static const stInstr:int = 14; public static const stClickProcessing:int = 5; public static const stBomb:int = 10; public static const stGray:int = 11; public static const stClose:int = 12; public static const stNormal:int = 0; public static const stFieldClick:int = 4; public static const stClear:int = 9; public static const stPlay:int = 1; public static const stWait:int = 7; public static const stFire:int = 8; public static const stEnd:int = 6; public function OWInstruction(_arg1:Array, _arg2:Array=null){ iCursorPoses = [[[387, 367], [387, 212], [391, 453], [71, 286]], [[73, 367], [73, 367], [73, 367], [73, 367], [73, 367]], [[398, 288], [397, 212], [390, 440], [71, 404], [374, 366], [114, 479]], [[78, 362], [71, 246], [397, 446], [397, 448], [118, 175], [118, 175], [118, 175]], [[90, 243], [389, 329], [279, 177], [386, 323], [110, 163], [153, 173]], [[70, 237], [112, 170], [345, 174], [391, 440], [393, 406]]]; iLevel1 = [[0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 0, 0]]; iLevel2 = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 2, 0, 0, 2, 0], [0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 2, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]; iLevel3 = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]; iLevel4 = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]; iLevel5 = [[0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1], [2, 1, 1, 0, 0, 0, 0], [3, 0, 0, 1, 1, 1, 0]]; iLevel6 = [[0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 1, 1], [1, 1, 1, 0, -1, -1, -1], [0, 0, 0, -1, 1, 1, 1], [-1, 1, 0, 0, -1, -1, -1], [-1, 1, 0, 0, 0, 0, 0]]; iLevel7 = [[0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1], [2, 0, 1, 0, 0, 0, 1], [3, 0, 0, 0, 0, 0, 0]]; iLevel_1 = [iLevel1, 3, OStoneSprites.iSprites, OLevelsList.cAllBorders, 1, 2, 3, 2, OLevelsList.B1, OLevelsList.cGrayEnable, 0.5]; iLevel_3 = [iLevel3, 3, OStoneSprites.iSprites, OLevelsList.cAllBorders, 1, 2, 10, 2, OLevelsList.B1, OLevelsList.cGrayEnable, 0.5]; iLevel_5 = [iLevel4, 3, OStoneSprites.iSprites, OLevelsList.cAllBorders, 1, 2, 3, 2, OLevelsList.B1, OLevelsList.cGrayEnable, 0.8]; iLevel_6 = [iLevel5, 3, OStoneSprites.iSprites, OLevelsList.cAllBorders, 1, 2, 3, 2, OLevelsList.B8, OLevelsList.cGrayDisable, 0.5]; iLevel_7 = [iLevel6, 3, OStoneSprites.iSprites, OLevelsList.cAllBorders, 1, 2, 3, 2, OLevelsList.B5, OLevelsList.cGrayDisable, 0.5]; iLevel_8 = [iLevel7, 3, OStoneSprites.iSprites, OLevelsList.cAllBorders, 1, 2, 3, 2, OLevelsList.B8, OLevelsList.cGrayDisable, 0.5]; iLevelList = [iLevel_1, iLevel_3, iLevel_5, iLevel_6, iLevel_7, iLevel_8]; iCursorColor = "aqua1"; isHand = false; iRecords = ["EEEHEABMEGBgDCMU", "DEDlDEBcDEA1DEBVDEAl", "ECE2EABPEGBVDFDXEEDTCABL", "DEGgDBB3EGCOEGBMBACTBABWBAAj", "DBEQEDBeBEAyEDCRBABZBBB0", "DBE3BADVBGBpEGBeEFBi"]; iHideBack = false; super(_arg1, _arg2); iDemoIndex = 0; iRealDemo = 0; iCursorMain = new OBitmap(); iCursorMain.CopyFrom(GemzS.CreateCursorHand()); this.addChild(iCursorMain); iCursorMain.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.setChildIndex(iCursorMain, (numChildren - 1)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); iFrame.Pos(50, 10); iClick = GemzS.TextureText([null, GemzL.cFontName, 30, GemzL.iFonts[2], GemzL.strClick, 0, 0]); this.addChild(iClick); iClick.alpha = 0; iInstr = new Array(iInstruction1, iInstruction2, iInstruction3, iInstruction4, iInstruction5, iInstruction6); this.State = stPlay; } override public function Free():void{ this.removeEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); this.removeChild(iGame); iGame.Free(); } private function GetDxDy(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local3 = this.iCursor.prX; _local4 = this.iCursor.prY; _local5 = iCursorPos[iPosIndex][0]; _local6 = iCursorPos[iPosIndex][1]; if ((((Math.abs((_local5 - _local3)) <= 0.01)) && ((Math.abs((_local6 - _local4)) <= 0.01)))){ this.State = stCursorSet; return; }; _local7 = Math.sqrt((((_local5 - _local3) * (_local5 - _local3)) + ((_local6 - _local4) * (_local6 - _local4)))); _local8 = ((_local5 - _local3) / _local7); _local9 = ((_local6 - _local4) / _local7); _local10 = (_local7 / cDelta); iDx = (_local10 * _local8); iDy = (_local10 * _local9); } private function ParseRecord():void{ var _local1:String; var _local2:String; _local1 = iRecord.substr(0, 1); iPos.x = AIConvertChar.FromChar(_local1); iRecord = iRecord.substr(1); _local1 = iRecord.substr(0, 1); iPos.y = AIConvertChar.FromChar(_local1); iRecord = iRecord.substr(1); _local1 = iRecord.substr(0, 1); iRecord = iRecord.substr(1); _local2 = iRecord.substr(0, 1); iTDelay = ((AIConvertChar.FromChar(_local1) * 60) + AIConvertChar.FromChar(_local2)); if (iTDelay > 25){ iTDelay = 25; }; iRecord = iRecord.substr(1); } override public function OnEnterFrame(_arg1:Event):void{ if (((iGame) && (!((this.State == stClose))))){ iGame.onEnterFrame(); }; if (((((iHideBack) && (iBack.prVisible))) && ((iBack.prPress == false)))){ iBack.SetVisible(false); iBack.alpha = 1; iHideBack = false; }; switch (this.State){ case stInstr: case stPlay: if (iGame.State == OGField.stWait){ this.State = stWait; }; break; case stWait: if ((getTimer() - iTimer) >= 1000){ this.State = stCursorMove; }; break; case stCursorMove: iClick.alpha = (iClick.alpha - 0.01); this.iCursor.Move(iDx, iDy); this.iGame.onEnterFrame(); if ((((Math.abs((this.iCursor.prX - iCursorPos[iPosIndex][0])) <= Math.abs(iDx))) || ((Math.abs((this.iCursor.prY - iCursorPos[iPosIndex][1])) <= Math.abs(iDy))))){ this.State = stCursorSet; }; break; case stCursorSet: iClick.alpha = (iClick.alpha - 0.01); if ((getTimer() - iTimer) >= 1000){ this.State = stFieldClick; }; break; case stGray: case stFire: case stClear: case stBomb: iClick.alpha = (iClick.alpha - 0.01); break; case stFieldClick: iClick.alpha = (iClick.alpha - 0.01); switch (iGame.State){ case OGField.stComplete: this.State = stEnd; break; }; if (iFrameCounter < iTDelay){ iFrameCounter++; } else { this.State = stCursorMove; }; break; case stEnd: iClick.alpha = 0; if ((getTimer() - iTimer) >= 1000){ this.State = stPlay; }; break; }; } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursorMain.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; this.iCursorMain.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursorMain.prX = (this.mouseX / OGlobal.Scale); this.iCursorMain.prY = (this.mouseY / OGlobal.Scale); } override public function set State(_arg1:int):void{ var _local2:OGStone; this.iState = _arg1; switch (_arg1){ case stInstr: iTimer = getTimer(); break; case stGray: break; case stFire: break; case stClear: break; case stBomb: break; case stPlay: if (iEndLevel.prVisible){ iEndLevel.prVisible = false; }; if (iEndLevel1.prVisible){ iEndLevel1.prVisible = false; }; InitInstruction(); break; case stCursorMove: if (iRecord != ""){ ParseRecord(); _local2 = iGame.GetClickStone(iPos.x, iPos.y); GetDxDy((_local2.prX + iGame.prX), (_local2.prY + iGame.prY)); } else { this.State = stEnd; }; break; case stEnd: iGame.onEnterFrame(); iTimer = getTimer(); iEndLevel.prVisible = true; iEndLevel1.prVisible = true; this.setChildIndex(iEndLevel, (this.numChildren - 1)); this.setChildIndex(iEndLevel1, (this.numChildren - 1)); this.setChildIndex(iCursorMain, (numChildren - 1)); break; case stFieldClick: iClick.Pos(200, 100); iClick.alpha = 1; iGame.ClickStone(iPos.x, iPos.y); iPosIndex++; iFrameCounter = 0; break; case stCursorSet: case stWait: iTimer = getTimer(); break; }; } override public function Init():void{ var _local1:Sprite; var _local2:Number; super.Init(); _local1 = (new GemzL.OCURSOR1() as Sprite); _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local1.filters = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; iCursor = OBitmap.MakeTmp(_local1); iPos = new Point(); } private function InitInstruction():void{ var _local1:int; if (iGame){ this.removeChild(iGame); iGame.Free(); iGame = null; }; if ((((iRealDemo > 0)) && (!(iBack.prVisible)))){ iBack.SetVisible(true); }; if ((((iRealDemo == 0)) && (iBack.prVisible))){ iHideBack = true; }; _local1 = 0; while (_local1 < iInstr.length) { if (((iInstr[_local1].prVisible) && (!((_local1 == iRealDemo))))){ iInstr[_local1].prVisible = false; }; if ((((_local1 == iRealDemo)) && (!(iInstr[_local1].prVisible)))){ iInstr[_local1].prVisible = true; }; _local1++; }; iCursor.Pos(iCursorX, iCursorY); iGame = new OGField([iLevelList[iRealDemo], [350, 350], 99, true]); iGame.Pos(60, 150); iGame.mouseChildren = false; this.addChild(iGame); if (this.contains(iCursor)){ this.setChildIndex(iCursor, (this.numChildren - 1)); } else { this.addChild(iCursor); }; iPosIndex = 0; iRecord = iRecords[iRealDemo]; iCursorPos = iCursorPoses[iRealDemo]; iDemoIndex++; iRealDemo = (iDemoIndex % iLevelList.length); } override public function OnPress(_arg1:Event, _arg2):void{ super.OnPress(_arg1, _arg2); if (_arg2 == this.iClose){ iGame.Free(); this.prVisible = false; this.State = stClose; }; if (_arg2 == this.iNext){ this.iGame.prVisible = false; this.iInstr[iRealDemo].prVisible = false; iHideBack = false; if (iClick.alpha > 0){ iClick.alpha = 0; }; if (iEndLevel.prVisible){ iEndLevel.prVisible = false; }; if (iEndLevel1.prVisible){ iEndLevel1.prVisible = false; }; InitInstruction(); this.State = stInstr; }; if (_arg2 == this.iBack){ if (iDemoIndex > 0){ iDemoIndex = (iDemoIndex - 2); iRealDemo = (iDemoIndex % iLevelList.length); if (iRealDemo == 0){ iHideBack = true; }; this.iGame.prVisible = false; this.iInstr[iRealDemo].prVisible = false; if (iEndLevel.prVisible){ iEndLevel.prVisible = false; }; if (iEndLevel1.prVisible){ iEndLevel1.prVisible = false; }; if (iClick.alpha > 0){ iClick.alpha = 0; }; InitInstruction(); this.State = stInstr; }; }; } override public function OnMouseDown(_arg1:MouseEvent):void{ trace("[", (this.mouseX / OGlobal.Scale), ",", (this.mouseY / OGlobal.Scale), "],"); } } }//package RES.OBJECTS.HOWTOPLAY.GRAHPICS
Section 84
//OLevelsList (RES.OBJECTS.LEVELS.OLevelsList) package RES.OBJECTS.LEVELS { public class OLevelsList { public static const cTopButtom:int = 2; public static const cGrayEnable:Boolean = true; public static const cMulticolor:int = 3; public static const cColorsCount:int = 8; public static const A___:Array = OStoneSprites.iSprites; public static const cGray:int = 99; public static const cAllBorders:int = 0; public static const cGrayDisable:Boolean = false; public static const iLevelList:Array = [[OLevelsMap.iLevel1, 3, A___, cAllBorders, 1, 2, 2, 3, B5, cGrayEnable, 0.2], [OLevelsMap.iLevel1A, 3, A___, cAllBorders, 1, 2, 2, 3, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel1B, 3, A___, cAllBorders, 1, 2, 2, 3, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel1C, 3, A___, cAllBorders, 1, 2, 2, 3, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel1D, 3, A___, cAllBorders, 1, 2, 2, 3, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel2, 3, A___, cMulticolor, 1, 2, 2, 3, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel3, 3, A___, cAllBorders, 1, 2, 2, 3, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel3A, 3, A___, cAllBorders, 1, 2, 3, 4, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel3B, 3, A___, cAllBorders, 1, 2, 3, 4, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel4, 3, A___, cTopButtom, 1, 2, 3, 4, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel4A, 3, A___, cAllBorders, 1, 2, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel4B, 3, A___, cTopButtom, 1, 2, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel4C, 3, A___, cAllBorders, 1, 2, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel4D, 3, A___, cTopButtom, 1, 2, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel4E, 3, A___, cAllBorders, 1, 2, 2, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel5, 3, A___, cTopButtom, 1, 2, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel6, 3, A___, cAllBorders, 1, 2, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel7, 3, A___, cTopButtom, 1, 1, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel7A, 3, A___, cAllBorders, 1, 1, 3, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel7B, 3, A___, cAllBorders, 1, 1, 2, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel8, 3, A___, cTopButtom, 1, 1, 2, 4, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel7C, 3, A___, cTopButtom, 1, 1, 2, 4, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel9, 3, A___, cTopButtom, 1, 1, 2, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel9A, 3, A___, cTopButtom, 1, 1, 2, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel9B, 3, A___, cTopButtom, 1, 1, 2, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel9C, 3, A___, cMulticolor, 1, 1, 2, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel9D, 3, A___, cMulticolor, 1, 1, 2, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel10, 3, A___, cTopButtom, 1, 1, 3, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel11, 3, A___, cTopButtom, 1, 1, 3, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel11A, 3, A___, cMulticolor, 1, 1, 3, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel11B, 3, A___, cMulticolor, 1, 1, 3, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel11C, 3, A___, cTopButtom, 1, 1, 3, 5, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel11D, 3, A___, cTopButtom, 1, 1, 3, 6, B8, cGrayEnable, 0.25], [OLevelsMap.iLevel11E, 3, A___, cMulticolor, 1, 1, 3, 5, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel12, 3, A___, cTopButtom, 1, 1, 3, 5, B5, cGrayEnable, 0.2], [OLevelsMap.iLevel13, 3, A___, cTopButtom, 1, 1, 3, 5, B8, cGrayEnable, 0.2], [OLevelsMap.iLevel14, 3, A___, cTopButtom, 1, 1, 3, 6, B8, cGrayDisable, 0.2], [OLevelsMap.iLevel15, 3, A___, cMulticolor, 1, 1, 3, 6, B8, cGrayDisable, 0.2], [OLevelsMap.iLevel16, 3, A___, cMulticolor, 1, 1, 3, 6, B8, cGrayDisable, 0.2], [OLevelsMap.iLevel17, 3, A___, cTopButtom, 1, 1, 3, 6, B8, cGrayDisable, 0.2], [OLevelsMap.iLevel18, 3, A___, cTopButtom, 1, 1, 3, 6, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel19, 3, A___, cTopButtom, 1, 1, 3, 6, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel20, 3, A___, cMulticolor, 1, 1, 3, 6, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel20A, 3, A___, cMulticolor, 1, 1, 3, 6, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel20B, 3, A___, cMulticolor, 1, 1, 3, 6, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel20C, 3, A___, cMulticolor, 1, 1, 3, 7, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel20D, 3, A___, cMulticolor, 1, 1, 3, 7, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel20E, 3, A___, cMulticolor, 1, 1, 3, 7, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel21, 3, A___, cMulticolor, 1, 1, 3, 7, B8, cGrayDisable, 0.1], [OLevelsMap.iLevel22, 3, A___, cMulticolor, 1, 1, 3, 7, B8, cGrayDisable, 0.1]]; public static var B1:Array = [false, false, false]; public static var B3:Array = [false, true, false]; public static var B4:Array = [true, false, false]; public static var B5:Array = [false, true, true]; public static var B6:Array = [true, false, true]; public static var B7:Array = [true, true, false]; public static var B8:Array = [true, true, true]; public static var B2:Array = [false, false, true]; } }//package RES.OBJECTS.LEVELS
Section 85
//OLevelsMap (RES.OBJECTS.LEVELS.OLevelsMap) package RES.OBJECTS.LEVELS { public class OLevelsMap { public static const iLevel16:Array = [[2, 0, 0, -1, -1, -1, 0, 0, 2], [-1, 2, 0, 3, 0, 3, 0, 2, -1], [-1, 2, 0, 3, 0, 3, 0, 2, -1], [0, 3, 0, -1, -1, -1, 0, 0, 0], [0, 0, 0, 3, 0, 3, 0, 0, 0], [0, 0, 0, 3, 0, 3, 0, 0, 0], [0, 2, 0, -1, -1, -1, 0, 2, 0], [-1, 2, 0, 0, 0, 0, 0, 2, -1], [2, 0, 0, -1, -1, -1, 0, 0, 2]]; public static const iLevel5:Array = [[0, -1, -1, 0, -1, -1, 2], [2, -1, 0, 0, 1, -1, 1], [0, 0, 3, 0, 0, 0, 0], [1, 0, 0, 1, 2, 0, 3], [0, 0, 0, 0, 0, 0, 0], [2, -1, 0, 2, 0, -1, 2], [0, -1, -1, 0, -1, -1, 0]]; public static const iLevel11:Array = [[0, 2, 0, -1, -1, 0, 2, 0], [1, 0, 0, -1, -1, 0, 0, 1], [0, 0, -1, -1, -1, -1, 0, 0], [1, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 1, 1, 0, 0], [-1, -1, 0, 0, 0, 0, -1, -1], [-1, -1, -1, 0, 0, -1, -1, -1], [-1, -1, -1, 3, 3, -1, -1, -1]]; public static const iLevel9A:Array = [[0, 0, 0, -1, -1, -1, -1, -1], [0, 3, 3, 0, -1, -1, -1, -1], [-1, 0, 0, 3, 0, 0, -1, -1], [0, 2, 0, 0, 0, 3, 0, 2], [0, 3, 0, 0, 2, 0, 0, -1], [-1, 0, 0, 2, 0, 2, 2, 0], [-1, -1, 0, 0, 3, 0, 3, 0], [-1, -1, -1, -1, 0, 0, -1, -1]]; public static const iLevel9B:Array = [[0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 0, 0, 0, 0, 0, 0], [3, 3, 3, 0, 3, 0, 0, 0], [-1, -1, -1, 3, 3, 0, -1, -1], [0, -1, 0, 0, 3, 0, -1, 3], [3, 0, 0, 0, 0, 0, 3, 3], [3, 0, -1, -1, -1, -1, 0, 0], [3, 0, 0, -1, -1, 0, 0, 0]]; public static const iLevel10:Array = [[-1, 0, 2, 0, 0, 0, 3, 0], [1, 0, 0, 0, 3, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 3], [3, -1, 0, 0, -1, 0, 2, 0], [-1, -1, -1, -1, 0, 0, 0, 0], [-1, -1, -1, -1, 0, 0, 1, 0], [-1, -1, -1, -1, -1, 0, 0, 0], [-1, -1, -1, -1, 0, 0, 3, -1]]; public static const iLevel1A:Array = [[0, 0, 0, 0, 2], [0, -1, 0, 2, 0], [2, 0, 0, 0, 0], [0, 0, 0, -1, 0], [1, 0, 2, 0, 0]]; public static const iLevel1B:Array = [[0, 0, 0, 0, 0], [0, -1, 3, -1, 0], [0, 0, 0, 0, 0], [0, 2, 0, 2, 0], [1, 0, -1, 0, 1]]; public static const iLevel1C:Array = [[1, 0, 0, 0, 0, 1], [0, 3, 0, 0, 0, 0], [-1, 0, 0, 0, 2, -1], [-1, 0, 0, 0, 2, -1], [0, 3, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1]]; public static const iLevel1D:Array = [[2, 0, 2, 0, -1, 0], [0, -1, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0], [0, 0, 0, 0, 0, 2], [0, 3, -1, 0, -1, 0], [-1, 0, 0, 0, 0, 0]]; public static const iLevel17:Array = [[0, 0, 0, 0, 0, 0, 0, 2, 2], [2, 2, 2, 0, 0, 0, 2, 2, 0], [0, 2, 0, -1, 0, 0, 0, 0, 0], [0, 0, 0, -1, -1, -1, 2, 0, 0], [0, 0, 0, 3, 3, -1, 2, 0, 0], [0, -1, 2, 2, 0, 0, 0, 0, 0], [0, -1, -1, -1, 0, 2, -1, -1, 0], [0, 3, 3, -1, 0, 2, 3, -1, 0], [0, 0, 0, 0, 0, 0, 3, -1, -1]]; public static const iLevel15:Array = [[0, 0, 1, 0, 0, 0, 3, 3, 0], [3, -1, 0, 0, -1, 0, 2, 2, 0], [3, 3, 0, 0, 0, 0, 0, 0, -1], [3, 0, -1, 0, 0, 2, 0, 0, 0], [0, 0, 0, 0, 3, 3, 0, -1, 2], [3, 1, 0, -1, 0, 3, 3, 3, 0], [0, 0, 3, 0, 0, 3, 2, 0, -1], [0, 0, 3, 0, 0, -1, 1, 0, 0], [0, 0, 3, 0, 0, 0, 0, 0, 0]]; public static const iLevel20:Array = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 2, 0, 0, 2, 0, 0, 0], [0, 0, 2, 2, 3, 3, 2, 2, 0, 0], [0, 0, 3, 3, 3, 3, 3, 3, 0, 0], [0, 3, 3, 3, 3, 3, 3, 3, 3, 0], [0, 3, 3, 3, 3, 3, 3, 3, 3, 0], [0, 3, 3, 3, 3, 3, 3, 3, 3, 0], [0, 3, 3, 3, 3, 3, 3, 3, 3, 0], [0, 0, 3, 3, 3, 3, 3, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]; public static const iLevel9C:Array = [[0, 0, 0, 0, -1, -1, 0, 0], [0, 2, 0, 0, -1, -1, 2, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, -1, -1, 3, 3, -1, -1, 0], [0, -1, -1, 3, 3, -1, -1, 0], [0, 0, 0, 2, 0, 0, 2, 0], [0, 0, -1, -1, 0, 0, 2, 0], [0, 0, -1, -1, 0, 0, 0, 0]]; public static const iLevel7:Array = [[0, 1, -1, 0, 0, -1, 1], [0, 0, 0, 0, 2, -1, 0], [2, 0, -1, 0, 0, 0, 2], [0, 0, 0, 0, 0, 1, 0], [2, 0, 0, 0, 0, 0, 2], [0, -1, 0, 0, -1, 1, 0], [1, 0, 0, 1, 0, 0, 0]]; public static const iLevel13:Array = [[0, 0, -1, 0, 0, 0, -1, 2, 2], [0, 0, 0, -1, 0, -1, 0, 2, 0], [0, 3, -1, 0, 3, 3, -1, 0, 0], [2, 3, 0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 0, 0, 0, 0, 3, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 3, -1, 0, 0, 0, -1, 0, 0], [0, 3, 0, 0, 3, 0, 0, 0, 0], [0, 3, 0, 0, 3, 0, 0, 0, 0]]; public static const iLevel14:Array = [[0, 0, 2, -1, -1, 0, 2, 0, 0], [0, 0, 3, 0, 0, 0, 0, 0, 2], [2, 0, 0, 3, 0, -1, -1, 0, 0], [-1, -1, 0, 0, 2, 0, 0, 2, -1], [2, 0, 0, 0, 3, 2, -1, 0, -1], [1, 2, 0, 2, 3, 0, -1, 0, 0], [0, 2, 0, 0, 0, 2, 0, 0, 0], [0, 0, -1, -1, 0, 0, 0, -1, 0], [1, 0, 2, 0, 0, 2, 0, -1, 3]]; public static const iLevel19:Array = [[0, 0, 0, 0, 3, 0, 0, 0, 0], [0, 2, 0, 3, 3, 3, 0, 2, 0], [1, 0, -1, -1, -1, -1, -1, 0, 1], [0, 0, -1, -1, -1, -1, -1, 0, 0], [3, 3, 3, -1, -1, -1, 3, 3, 3], [0, 0, 3, 2, -1, 2, 3, 0, 0], [0, 3, 0, 0, -1, 0, 0, 3, 0], [0, 3, 0, 0, 2, 0, 0, 3, 0], [0, 0, 0, 2, 0, 2, 0, 0, 0]]; public static const iLevel11A:Array = [[0, 2, 2, -1, -1, -1, -1, -1], [0, 0, 0, 0, 0, 0, -1, -1], [-1, 0, 0, 0, 0, 0, 0, -1], [0, 3, 0, 0, 2, 0, 3, 0], [0, 0, -1, 3, 3, -1, 0, -1], [-1, 0, 2, 0, 0, 0, 0, 0], [-1, 2, 0, 0, 2, 0, 2, 0], [-1, -1, 0, -1, 0, 0, -1, -1]]; public static const iLevel11B:Array = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 2, -1, 2, 2, -1, 2, 0], [0, -1, -1, 0, 0, -1, -1, 0], [0, 2, 0, 0, 3, 0, 2, 0], [0, 2, 0, 3, 0, 0, 2, 0], [0, -1, -1, 0, 0, -1, -1, 0], [0, 2, -1, 2, 2, -1, 2, 0], [0, 0, 0, 0, 0, 0, 0, 0]]; public static const iLevel9D:Array = [[1, 0, 0, -1, -1, 0, 0, 1], [0, 3, 3, 0, 0, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 2, -1, 2, 2, -1, 2, 0], [1, 0, -1, -1, -1, -1, 0, 1], [0, 2, 0, -1, -1, 0, 2, 0], [0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 0, 0, 0, 0, 2, 1]]; public static const iLevel11D:Array = [[1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 2, 2, 2, 2, 2, 0, 0], [0, 2, 0, 0, 0, 0, 0, 2, 0], [0, 2, 0, 3, 3, 3, 0, 2, 0], [0, 2, 0, 3, 0, 3, 0, 2, 0], [0, 2, 0, 3, 3, 3, 0, 2, 0], [0, 2, 0, 0, 0, 0, 0, 2, 0], [0, 0, 2, 2, 2, 2, 2, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 1]]; public static const iLevel11E:Array = [[2, 2, 0, 0, 3, 0, 0, 2, 2], [2, -1, 0, 0, 0, 0, 0, -1, 2], [0, 0, 0, 0, 0, 0, 3, 3, 0], [0, 0, 3, -1, 3, -1, 0, 0, 0], [0, 0, 3, 0, 3, 0, 0, 0, 0], [0, 0, 0, -1, 3, -1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 0], [0, -1, 0, 0, 0, 0, 0, -1, 0], [3, 3, 0, 3, 3, 0, 0, 0, 0]]; public static const iLevel11C:Array = [[0, 0, 0, 0, 0, 0, 0, 0], [0, -1, 0, 3, 0, 2, 0, 0], [0, 0, -1, -1, 3, 2, 0, 0], [0, 3, -1, -1, -1, 3, 3, 0], [0, 3, 3, -1, -1, -1, 0, 0], [0, 0, 2, 3, -1, -1, 0, 0], [0, 2, 0, 3, 3, 0, -1, 0], [0, 0, 0, 0, 0, 0, 0, 0]]; public static const iLevel12:Array = [[0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 3, 0, 0, 0, 0, 2, 0, 0], [0, 0, 3, 0, -1, 3, 3, 2, 0], [0, 0, 3, 0, -1, 1, 0, 0, 0], [0, 0, -1, -1, -1, -1, -1, 0, 0], [3, 0, 3, 0, -1, 1, 0, 0, 1], [0, 0, 3, 3, -1, 3, 3, 0, 0], [0, 0, 3, 3, 0, 0, 1, 0, 0], [3, 0, 0, 0, 0, 0, 0, 0, 1]]; public static const iLevel18:Array = [[3, 3, 3, -1, -1, -1, 3, 3, 3], [0, 2, 3, -1, -1, -1, 3, 2, 0], [0, 0, 0, -1, -1, -1, 0, 0, 0], [0, 2, 0, 0, 3, 0, 0, 2, 0], [0, 0, 0, 3, 2, 3, 0, 0, 0], [2, 0, 0, 0, 3, 0, 0, 0, 2], [0, 0, 0, -1, -1, -1, 0, 0, 0], [2, 2, 3, -1, -1, -1, 3, 2, 2], [3, 3, 3, -1, -1, -1, 3, 3, 3]]; public static const iLevel21:Array = [[0, 3, 3, 0, 0, 0, 0, 3, 3, 0], [-1, -1, -1, -1, 0, 0, -1, -1, -1, -1], [0, 2, 2, 0, 2, 2, 0, 2, 2, 0], [0, 3, 0, 0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 3, 1, 1, 3, 0, 0, 0], [0, 0, 0, 3, 1, 1, 3, 0, 0, 0], [2, 0, 0, 3, 0, 0, 3, 0, 0, 2], [2, 0, 0, 3, 0, 0, 3, 0, 0, 2], [-1, -1, -1, -1, 2, 2, -1, -1, -1, -1], [0, 3, 3, 0, 0, 0, 0, 3, 3, 0]]; public static const iLevel7A:Array = [[0, -1, 0, 0, 0, -1, 0], [0, 0, 0, 0, 0, 0, 0], [0, 2, 2, 0, 2, 2, 0], [2, 0, -1, 3, -1, 0, 2], [0, 0, -1, 3, -1, 0, 0], [2, 0, -1, 3, -1, 0, 2], [0, 0, 0, 0, 0, 0, 0]]; public static const iLevel7B:Array = [[0, 2, 0, 2, 0, 2, 0, 0], [0, 0, 0, 2, 0, 0, 0, 0], [0, 2, 3, 0, 0, 0, 3, 0], [0, 3, 0, 0, 0, 0, 0, 0], [0, 0, 2, 0, 2, 3, 3, 0], [0, 3, 0, 0, 0, 3, 0, 0], [0, 0, 0, 3, 3, 3, 3, 2], [0, 2, 0, 0, 0, 0, 0, 0]]; public static const iLevel7C:Array = [[0, 0, -1, 0, 0, 0, 0, 0], [0, 2, 0, 0, 3, 3, 0, -1], [0, 0, -1, 0, 0, 3, 0, 0], [-1, 0, 0, 3, 0, 0, -1, 0], [0, 2, 0, 0, 0, -1, 0, 0], [0, 2, 0, 0, 0, 0, 3, -1], [0, -1, 0, 0, 0, 0, 2, 0], [-1, 0, 0, 0, -1, 3, 0, -1]]; public static const iLevel20A:Array = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 3, 3, 0, 0, 3, 3, 0, 3], [3, 0, -1, -1, 0, 0, -1, -1, 0, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 3, 0, 3, 3, 3, 3, 0, 3, -1], [-1, 0, 0, 0, 3, 3, 0, 0, 0, -1], [3, 0, 3, 3, 3, 3, 3, 3, 0, 3], [3, 3, -1, 0, 0, 0, 0, -1, 3, 3], [3, 3, -1, 0, 3, 3, 0, -1, 3, 3], [0, 3, 3, 0, 3, 3, 0, 3, 3, 0]]; public static const iLevel3A:Array = [[2, 0, -1, 0, -1, -1], [-1, 0, 0, 0, 0, -1], [0, 0, 0, 0, 0, 2], [0, 0, 3, 0, -1, 0], [0, -1, 0, 0, 0, 0], [3, 0, 1, -1, 0, 0]]; public static const iLevel3B:Array = [[0, 0, 0, 2, 0, 0], [0, 0, -1, -1, 0, 2], [0, 0, 0, 0, 0, 0], [0, 3, 3, 0, -1, 0], [0, 3, 3, 0, -1, 0], [0, 0, 0, 0, 0, 0]]; public static const iLevel20D:Array = [[0, 0, 0, 1, 2, 1, 2, 1, 0, 0], [0, 2, 2, 2, 0, 3, 0, 0, 0, 0], [1, 2, 0, -1, 0, 0, 0, -1, 0, 1], [1, 2, -1, 3, 0, 0, -1, 0, 0, 1], [1, 0, 0, 0, 0, -1, 0, 0, 0, 1], [1, 0, 0, 0, -1, 0, 0, 0, 0, 1], [1, 2, 2, -1, 0, 0, 3, -1, 2, 1], [1, 0, -1, 2, 0, 0, -1, 0, 2, 1], [0, 0, 0, 2, 0, 3, 2, 2, 2, 0], [0, 0, 0, 1, 2, 1, 2, 1, 0, 0]]; public static const iLevel20C:Array = [[0, 0, 0, 1, 0, 0, 1, 0, 0, 0], [0, 0, 3, 0, 0, 0, 0, 3, 0, 0], [0, 3, 3, 0, 3, 3, 0, 3, 3, 0], [1, 0, 0, -1, -1, -1, -1, 0, 0, 1], [0, 0, 3, -1, -1, -1, -1, 3, 0, 0], [0, 0, 3, -1, -1, -1, -1, 3, 0, 0], [1, 0, 0, -1, -1, -1, -1, 0, 0, 1], [0, 3, 3, 0, 3, 3, 0, 3, 3, 0], [0, 0, 3, 0, 0, 0, 0, 3, 0, 0], [0, 0, 0, 1, 0, 0, 1, 0, 0, 0]]; public static const iLevel20E:Array = [[3, 3, -1, 2, 0, 0, 2, -1, 3, 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, -1], [0, 0, -1, 0, 0, 0, 0, -1, 0, 0], [2, 0, 3, 2, 3, 3, 2, 3, 0, 2], [0, 0, 3, -1, -1, -1, -1, 3, 0, 0], [0, 0, 3, -1, 2, 2, -1, 3, 0, 0], [2, 0, 0, 0, 3, 3, 0, 0, 0, 2], [0, 2, 2, -1, 0, 0, -1, 2, 2, 0], [0, 0, -1, 0, 0, 0, 0, -1, 0, 0]]; public static const iLevel20B:Array = [[0, 0, 0, 0, -1, -1, 0, 0, 0, 0], [2, 0, 3, 3, 0, 0, 3, 3, 0, 2], [0, 0, 0, 0, 3, 3, 0, 0, 0, 0], [-1, 0, -1, 0, -1, 0, -1, 0, -1, 0], [0, 3, 0, 3, 0, 3, 0, 3, 0, 3], [0, 3, 0, 3, 0, 3, 0, 3, 0, 0], [-1, 0, -1, 0, -1, 0, -1, 0, -1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 3, 3, 3, 0, 0, 0], [2, 2, 0, 0, 3, 3, 0, 0, 2, 2]]; public static const iLevel4A:Array = [[2, 0, 2, 0, 2, 0], [0, -1, 0, 0, -1, 0], [0, 0, 0, 0, 0, 0], [0, 0, 3, 3, 0, 0], [2, 0, -1, -1, 0, 2], [0, 0, 0, 0, 0, 0]]; public static const iLevel4B:Array = [[0, 0, 0, -1, 3, 3], [-1, -1, 0, -1, 0, 0], [0, 0, 3, 0, 0, 0], [3, 0, 3, 0, 0, -1], [3, 0, -1, 0, 3, 3], [0, -1, -1, 0, -1, 0]]; public static const iLevel4C:Array = [[0, 0, 0, 0, 0, 3, 0], [0, 3, 0, 3, 3, 0, 0], [0, 3, 0, 0, 3, 0, 0], [0, 3, 3, 3, 0, 3, 0], [0, 0, 0, 0, 0, 0, 0], [0, 3, 0, 3, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0]]; public static const iLevel4D:Array = [[0, 0, 0, 0, 2, 0, 0], [2, 0, 0, 2, -1, 0, 0], [0, -1, 0, 0, 2, 2, 0], [0, 0, 0, 0, 0, 0, 0], [2, 0, 3, 2, 0, -1, 0], [0, 0, 0, -1, 0, 2, 0], [0, 2, 0, 0, 0, 0, 0]]; public static const iLevel22:Array = [[0, 0, -1, 0, 0, 2, 2, 0, 0, 0], [0, 0, -1, 0, 0, 2, 2, 0, 0, 2], [2, 0, -1, 0, -1, -1, -1, -1, 2, 0], [0, 2, -1, 0, 3, 3, -1, -1, 0, 0], [2, 2, -1, 0, 3, 3, -1, -1, 2, 0], [2, 2, -1, 0, 3, 3, -1, -1, 0, 2], [0, 0, -1, 0, 3, 3, -1, -1, 0, 2], [0, 2, -1, -1, -1, -1, -1, -1, 2, 0], [2, 0, 2, 0, 2, 0, 2, 0, 0, 0], [0, 2, 0, 0, 0, 2, 0, 2, 0, 0]]; public static const iLevel4E:Array = [[-1, -1, -1, -1, 0, 2, 2], [-1, -1, -1, 2, 3, 0, 2], [-1, -1, 0, 0, 0, 3, 0], [-1, 2, 0, 0, 3, 2, -1], [0, 0, 3, 0, 0, -1, -1], [3, 0, 0, 2, -1, -1, -1], [0, 3, 0, -1, -1, -1, -1]]; public static const iLevel1:Array = [[0, 0, 0, 0, 0], [0, 1, 0, 1, 0], [0, 0, 3, 0, 0], [0, 1, 0, 1, 0], [0, 0, 0, 0, 0]]; public static const iLevel2:Array = [[-1, 2, -1, -1, 0, -1], [0, 0, 3, 0, 0, 0], [-1, 1, 0, 0, 1, -1], [-1, 0, 0, 0, 0, -1], [0, 1, 0, 3, 1, 0], [-1, 0, -1, -1, 2, -1]]; public static const iLevel3:Array = [[1, 0, 0, 0, 1, 0], [0, 0, 2, 0, 0, 0], [0, 1, 0, 0, 1, 0], [0, 0, 0, 2, 0, 0], [0, 1, -1, -1, 1, 0], [3, 0, -1, -1, 3, 0]]; public static const iLevel4:Array = [[1, 0, 0, 0, 1, 0], [-1, 0, 2, 0, 0, 0], [0, 1, -1, 0, 1, 0], [1, 0, 0, -1, 0, 0], [0, 1, 0, 0, 1, -1], [3, 0, 0, 0, 3, 0]]; public static const iLevel6:Array = [[0, 1, -1, -1, -1, 0, 0], [1, 0, 0, -1, 0, 1, 0], [-1, 0, 3, 0, 0, 0, -1], [-1, -1, 0, 0, 0, -1, -1], [-1, 2, 0, 0, 1, 3, -1], [0, 3, 0, -1, 0, 0, 2], [1, 0, -1, -1, -1, 0, 0]]; public static const iLevel8:Array = [[0, 0, 0, 2, 1, 0, 0, 0], [0, 2, 0, 0, 0, 2, 3, 2], [0, 0, 0, -1, -1, 0, 0, 0], [0, 0, -1, -1, -1, -1, 1, 0], [0, 0, -1, -1, -1, -1, 0, 0], [1, 0, 0, -1, -1, 2, 0, 0], [0, 0, 2, 0, 0, 0, 0, 1], [0, 3, 0, 0, 0, 3, 0, 0]]; public static const iLevel9:Array = [[0, 0, 2, 0, -1, 0, -1, 0], [0, -1, 0, 0, -1, 0, 1, 0], [3, 0, 0, 0, 0, 3, 0, 0], [0, 0, 3, 0, 0, 0, 0, -1], [0, -1, 0, 0, 2, 0, 0, 1], [0, 0, -1, 0, 0, -1, 0, 0], [0, -1, 2, 0, 0, 0, -1, 0], [0, 0, 0, 1, 0, 0, 0, 0]]; } }//package RES.OBJECTS.LEVELS
Section 86
//OStoneSprites (RES.OBJECTS.LEVELS.OStoneSprites) package RES.OBJECTS.LEVELS { public class OStoneSprites { public static const cSqStones:Array = [OGraySq, [[OBlueSq, OBlueSq2, OBlueSq3], [OGreenSq, OGreenSq2, OGreenSq3], [OMagSq, OMagSq2, OMagSq3], [ORedSq, ORedSq2, ORedSq3], [OYellowSq, OYellowSq2, OYellowSq3], [OPinkSq, OPinkSq2, OPinkSq3], [OAquaSq, OAquaSq2, OAquaSq3], [ODarkRedSq, ODarkRedSq2, ODarkRedSq3]]]; public static const cStarStones:Array = [OGrayStar, [[OBlueStar, OBlueStar2, OBlueStar3], [OGreenStar, OGreenStar2, OGreenStar3], [OMagStar, OMagStar2, OMagStar3], [ORedStar, ORedStar2, ORedStar3], [OYellowStar, OYellowStar2, OYellowStar3], [OPinkStar, OPinkStar2, OPinkStar3], [OAquaStar, OAquaStar2, OAquaStar3], [ODarkRedStar, ODarkRedStar2, ODarkRedStar3]]]; public static const cOctStones:Array = [OGrayOct, [[OBlueOct, OBlueOct2, OBlueOct3], [OGreenOct, OGreenOct2, OGreenOct3], [OMagOct, OMagOct2, OMagOct3], [ORedOct, ORedOct2, ORedOct3], [OYellowOct, OYellowOct2, OYellowOct3], [OPinkOct, OPinkOct2, OPinkOct3], [OAquaOct, OAquaOct2, OAquaOct3], [ODarkRedOct, ODarkRedOct2, ODarkRedOct3]]]; public static var OGreenSq2:Class = OStoneSprites_OGreenSq2; public static var OGreenSq3:Class = OStoneSprites_OGreenSq3; public static var OMagStar:Class = OStoneSprites_OMagStar; public static var ODarkRedSq2:Class = OStoneSprites_ODarkRedSq2; public static var OMagOct:Class = OStoneSprites_OMagOct; public static var OBombBonus:Class = OStoneSprites_OBombBonus; public static var OMagSq:Class = OStoneSprites_OMagSq; public static var OMagStar2:Class = OStoneSprites_OMagStar2; public static var OBlueOct:Class = OStoneSprites_OBlueOct; public static var OPinkOct2:Class = OStoneSprites_OPinkOct2; public static var ODarkRedOct3:Class = OStoneSprites_ODarkRedOct3; public static var ORedOct2:Class = OStoneSprites_ORedOct2; public static var ODarkRedOct2:Class = OStoneSprites_ODarkRedOct2; public static var OGreenOct2:Class = OStoneSprites_OGreenOct2; public static var OPinkOct3:Class = OStoneSprites_OPinkOct3; public static var OMagStar3:Class = OStoneSprites_OMagStar3; public static var ODarkRedSq3:Class = OStoneSprites_ODarkRedSq3; public static var ORedStar:Class = OStoneSprites_ORedStar; public static var OGreenOct3:Class = OStoneSprites_OGreenOct3; public static var OBlueStar:Class = OStoneSprites_OBlueStar; public static var OYellowStar2:Class = OStoneSprites_OYellowStar2; public static var OAquaStar2:Class = OStoneSprites_OAquaStar2; public static var OYellowStar3:Class = OStoneSprites_OYellowStar3; public static var OGraySq:Class = OStoneSprites_OGraySq; public static var OYellowOct2:Class = OStoneSprites_OYellowOct2; public static var OYellowOct3:Class = OStoneSprites_OYellowOct3; public static var OBlueStar2:Class = OStoneSprites_OBlueStar2; public static var OBlueStar3:Class = OStoneSprites_OBlueStar3; public static var OAquaOct2:Class = OStoneSprites_OAquaOct2; public static var OAquaOct3:Class = OStoneSprites_OAquaOct3; public static var OYellowSq:Class = OStoneSprites_OYellowSq; public static var OAquaStar3:Class = OStoneSprites_OAquaStar3; public static var OGreenStar:Class = OStoneSprites_OGreenStar; public static var OAquaSq:Class = OStoneSprites_OAquaSq; public static var ODarkRedSq:Class = OStoneSprites_ODarkRedSq; public static var ODarkRedStar:Class = OStoneSprites_ODarkRedStar; public static var OPinkStar:Class = OStoneSprites_OPinkStar; public static var OMagSq2:Class = OStoneSprites_OMagSq2; public static var OMagSq3:Class = OStoneSprites_OMagSq3; public static var OGreenSq:Class = OStoneSprites_OGreenSq; public static var ORedSq3:Class = OStoneSprites_ORedSq3; public static var OAquaOct:Class = OStoneSprites_OAquaOct; public static var ORedSq2:Class = OStoneSprites_ORedSq2; public static var OPinkOct:Class = OStoneSprites_OPinkOct; public static var OGrayOct:Class = OStoneSprites_OGrayOct; public static var ORedStar2:Class = OStoneSprites_ORedStar2; public static var ORedStar3:Class = OStoneSprites_ORedStar3; public static var OClearBonus:Class = OStoneSprites_OClearBonus; public static var OYellowOct:Class = OStoneSprites_OYellowOct; public static var OBlueSq:Class = OStoneSprites_OBlueSq; public static var OBlueSq2:Class = OStoneSprites_OBlueSq2; public static var OGreenOct:Class = OStoneSprites_OGreenOct; public static var OGreenStar3:Class = OStoneSprites_OGreenStar3; public static var OBlueSq3:Class = OStoneSprites_OBlueSq3; public static var ODarkRedOct:Class = OStoneSprites_ODarkRedOct; public static var OYellowStar:Class = OStoneSprites_OYellowStar; public static var OGreenStar2:Class = OStoneSprites_OGreenStar2; public static var ODarkRedStar3:Class = OStoneSprites_ODarkRedStar3; public static var OAquaStar:Class = OStoneSprites_OAquaStar; public static var OPinkSq:Class = OStoneSprites_OPinkSq; public static var iSprites:Array = [cOctStones, cSqStones, cStarStones]; public static var OMagOct2:Class = OStoneSprites_OMagOct2; public static var OMagOct3:Class = OStoneSprites_OMagOct3; public static var OPinkStar2:Class = OStoneSprites_OPinkStar2; public static var ORedSq:Class = OStoneSprites_ORedSq; public static var ODarkRedStar2:Class = OStoneSprites_ODarkRedStar2; public static var OPinkStar3:Class = OStoneSprites_OPinkStar3; public static var OGrayStar:Class = OStoneSprites_OGrayStar; public static var OAquaSq3:Class = OStoneSprites_OAquaSq3; public static var OPinkSq2:Class = OStoneSprites_OPinkSq2; public static var OAquaSq2:Class = OStoneSprites_OAquaSq2; public static var OYellowSq2:Class = OStoneSprites_OYellowSq2; public static var OYellowSq3:Class = OStoneSprites_OYellowSq3; public static var ORedOct3:Class = OStoneSprites_ORedOct3; public static var OPinkSq3:Class = OStoneSprites_OPinkSq3; public static var OFireBonus:Class = OStoneSprites_OFireBonus; public static var OBlueOct2:Class = OStoneSprites_OBlueOct2; public static var OBlueOct3:Class = OStoneSprites_OBlueOct3; public static var ORedOct:Class = OStoneSprites_ORedOct; } }//package RES.OBJECTS.LEVELS
Section 87
//OStoneSprites_OAquaOct (RES.OBJECTS.LEVELS.OStoneSprites_OAquaOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 88
//OStoneSprites_OAquaOct2 (RES.OBJECTS.LEVELS.OStoneSprites_OAquaOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 89
//OStoneSprites_OAquaOct3 (RES.OBJECTS.LEVELS.OStoneSprites_OAquaOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 90
//OStoneSprites_OAquaSq (RES.OBJECTS.LEVELS.OStoneSprites_OAquaSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 91
//OStoneSprites_OAquaSq2 (RES.OBJECTS.LEVELS.OStoneSprites_OAquaSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 92
//OStoneSprites_OAquaSq3 (RES.OBJECTS.LEVELS.OStoneSprites_OAquaSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 93
//OStoneSprites_OAquaStar (RES.OBJECTS.LEVELS.OStoneSprites_OAquaStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 94
//OStoneSprites_OAquaStar2 (RES.OBJECTS.LEVELS.OStoneSprites_OAquaStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 95
//OStoneSprites_OAquaStar3 (RES.OBJECTS.LEVELS.OStoneSprites_OAquaStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OAquaStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 96
//OStoneSprites_OBlueOct (RES.OBJECTS.LEVELS.OStoneSprites_OBlueOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 97
//OStoneSprites_OBlueOct2 (RES.OBJECTS.LEVELS.OStoneSprites_OBlueOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 98
//OStoneSprites_OBlueOct3 (RES.OBJECTS.LEVELS.OStoneSprites_OBlueOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 99
//OStoneSprites_OBlueSq (RES.OBJECTS.LEVELS.OStoneSprites_OBlueSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 100
//OStoneSprites_OBlueSq2 (RES.OBJECTS.LEVELS.OStoneSprites_OBlueSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 101
//OStoneSprites_OBlueSq3 (RES.OBJECTS.LEVELS.OStoneSprites_OBlueSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 102
//OStoneSprites_OBlueStar (RES.OBJECTS.LEVELS.OStoneSprites_OBlueStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 103
//OStoneSprites_OBlueStar2 (RES.OBJECTS.LEVELS.OStoneSprites_OBlueStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 104
//OStoneSprites_OBlueStar3 (RES.OBJECTS.LEVELS.OStoneSprites_OBlueStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBlueStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 105
//OStoneSprites_OBombBonus (RES.OBJECTS.LEVELS.OStoneSprites_OBombBonus) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OBombBonus extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 106
//OStoneSprites_OClearBonus (RES.OBJECTS.LEVELS.OStoneSprites_OClearBonus) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OClearBonus extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 107
//OStoneSprites_ODarkRedOct (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 108
//OStoneSprites_ODarkRedOct2 (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 109
//OStoneSprites_ODarkRedOct3 (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 110
//OStoneSprites_ODarkRedSq (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 111
//OStoneSprites_ODarkRedSq2 (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 112
//OStoneSprites_ODarkRedSq3 (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 113
//OStoneSprites_ODarkRedStar (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 114
//OStoneSprites_ODarkRedStar2 (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 115
//OStoneSprites_ODarkRedStar3 (RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ODarkRedStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 116
//OStoneSprites_OFireBonus (RES.OBJECTS.LEVELS.OStoneSprites_OFireBonus) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OFireBonus extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 117
//OStoneSprites_OGrayOct (RES.OBJECTS.LEVELS.OStoneSprites_OGrayOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGrayOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 118
//OStoneSprites_OGraySq (RES.OBJECTS.LEVELS.OStoneSprites_OGraySq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGraySq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 119
//OStoneSprites_OGrayStar (RES.OBJECTS.LEVELS.OStoneSprites_OGrayStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGrayStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 120
//OStoneSprites_OGreenOct (RES.OBJECTS.LEVELS.OStoneSprites_OGreenOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 121
//OStoneSprites_OGreenOct2 (RES.OBJECTS.LEVELS.OStoneSprites_OGreenOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 122
//OStoneSprites_OGreenOct3 (RES.OBJECTS.LEVELS.OStoneSprites_OGreenOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 123
//OStoneSprites_OGreenSq (RES.OBJECTS.LEVELS.OStoneSprites_OGreenSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 124
//OStoneSprites_OGreenSq2 (RES.OBJECTS.LEVELS.OStoneSprites_OGreenSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 125
//OStoneSprites_OGreenSq3 (RES.OBJECTS.LEVELS.OStoneSprites_OGreenSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 126
//OStoneSprites_OGreenStar (RES.OBJECTS.LEVELS.OStoneSprites_OGreenStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 127
//OStoneSprites_OGreenStar2 (RES.OBJECTS.LEVELS.OStoneSprites_OGreenStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 128
//OStoneSprites_OGreenStar3 (RES.OBJECTS.LEVELS.OStoneSprites_OGreenStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OGreenStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 129
//OStoneSprites_OMagOct (RES.OBJECTS.LEVELS.OStoneSprites_OMagOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 130
//OStoneSprites_OMagOct2 (RES.OBJECTS.LEVELS.OStoneSprites_OMagOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 131
//OStoneSprites_OMagOct3 (RES.OBJECTS.LEVELS.OStoneSprites_OMagOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 132
//OStoneSprites_OMagSq (RES.OBJECTS.LEVELS.OStoneSprites_OMagSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 133
//OStoneSprites_OMagSq2 (RES.OBJECTS.LEVELS.OStoneSprites_OMagSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 134
//OStoneSprites_OMagSq3 (RES.OBJECTS.LEVELS.OStoneSprites_OMagSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 135
//OStoneSprites_OMagStar (RES.OBJECTS.LEVELS.OStoneSprites_OMagStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 136
//OStoneSprites_OMagStar2 (RES.OBJECTS.LEVELS.OStoneSprites_OMagStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 137
//OStoneSprites_OMagStar3 (RES.OBJECTS.LEVELS.OStoneSprites_OMagStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OMagStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 138
//OStoneSprites_OPinkOct (RES.OBJECTS.LEVELS.OStoneSprites_OPinkOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 139
//OStoneSprites_OPinkOct2 (RES.OBJECTS.LEVELS.OStoneSprites_OPinkOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 140
//OStoneSprites_OPinkOct3 (RES.OBJECTS.LEVELS.OStoneSprites_OPinkOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 141
//OStoneSprites_OPinkSq (RES.OBJECTS.LEVELS.OStoneSprites_OPinkSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 142
//OStoneSprites_OPinkSq2 (RES.OBJECTS.LEVELS.OStoneSprites_OPinkSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 143
//OStoneSprites_OPinkSq3 (RES.OBJECTS.LEVELS.OStoneSprites_OPinkSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 144
//OStoneSprites_OPinkStar (RES.OBJECTS.LEVELS.OStoneSprites_OPinkStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 145
//OStoneSprites_OPinkStar2 (RES.OBJECTS.LEVELS.OStoneSprites_OPinkStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 146
//OStoneSprites_OPinkStar3 (RES.OBJECTS.LEVELS.OStoneSprites_OPinkStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OPinkStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 147
//OStoneSprites_ORedOct (RES.OBJECTS.LEVELS.OStoneSprites_ORedOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 148
//OStoneSprites_ORedOct2 (RES.OBJECTS.LEVELS.OStoneSprites_ORedOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 149
//OStoneSprites_ORedOct3 (RES.OBJECTS.LEVELS.OStoneSprites_ORedOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 150
//OStoneSprites_ORedSq (RES.OBJECTS.LEVELS.OStoneSprites_ORedSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 151
//OStoneSprites_ORedSq2 (RES.OBJECTS.LEVELS.OStoneSprites_ORedSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 152
//OStoneSprites_ORedSq3 (RES.OBJECTS.LEVELS.OStoneSprites_ORedSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 153
//OStoneSprites_ORedStar (RES.OBJECTS.LEVELS.OStoneSprites_ORedStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 154
//OStoneSprites_ORedStar2 (RES.OBJECTS.LEVELS.OStoneSprites_ORedStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 155
//OStoneSprites_ORedStar3 (RES.OBJECTS.LEVELS.OStoneSprites_ORedStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_ORedStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 156
//OStoneSprites_OYellowOct (RES.OBJECTS.LEVELS.OStoneSprites_OYellowOct) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowOct extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 157
//OStoneSprites_OYellowOct2 (RES.OBJECTS.LEVELS.OStoneSprites_OYellowOct2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowOct2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 158
//OStoneSprites_OYellowOct3 (RES.OBJECTS.LEVELS.OStoneSprites_OYellowOct3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowOct3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 159
//OStoneSprites_OYellowSq (RES.OBJECTS.LEVELS.OStoneSprites_OYellowSq) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowSq extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 160
//OStoneSprites_OYellowSq2 (RES.OBJECTS.LEVELS.OStoneSprites_OYellowSq2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowSq2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 161
//OStoneSprites_OYellowSq3 (RES.OBJECTS.LEVELS.OStoneSprites_OYellowSq3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowSq3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 162
//OStoneSprites_OYellowStar (RES.OBJECTS.LEVELS.OStoneSprites_OYellowStar) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowStar extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 163
//OStoneSprites_OYellowStar2 (RES.OBJECTS.LEVELS.OStoneSprites_OYellowStar2) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowStar2 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 164
//OStoneSprites_OYellowStar3 (RES.OBJECTS.LEVELS.OStoneSprites_OYellowStar3) package RES.OBJECTS.LEVELS { import mx.core.*; public class OStoneSprites_OYellowStar3 extends SpriteAsset { } }//package RES.OBJECTS.LEVELS
Section 165
//OLCell (RES.OBJECTS.LOGIC.OLCell) package RES.OBJECTS.LOGIC { public class OLCell { private var iValue:int; private var iBorder:int; private var iCurrValue:int; public function OLCell(_arg1:Array){ iValue = _arg1[0]; iBorder = _arg1[1]; iCurrValue = (_arg1[2] - 1); } public function get prBorder():int{ return (this.iBorder); } public function get prValue():int{ return (this.iValue); } public function set prCurrValue(_arg1:int):void{ this.iCurrValue = _arg1; } public function get prCurrValue():int{ return (this.iCurrValue); } public function set prValue(_arg1:int):void{ this.iValue = _arg1; } } }//package RES.OBJECTS.LOGIC
Section 166
//OLField (RES.OBJECTS.LOGIC.OLField) package RES.OBJECTS.LOGIC { import flash.geom.*; import ENGINE.CORE.*; import RES.OBJECTS.UTILS.*; import RES.OBJECTS.LEVELS.*; public class OLField { private const iAxesSearch:Array; private var iGrayCount:int; private var iLen:int; private var iRandom:ORandomInt; private var iPoint:Point; private var iGenerateCount:int; private var iGrid:Array; private var iGridSH:Array; private var iCells:Array; private var iGridSize:Point; private var iColor:Array; private var iGray:Boolean; public function OLField(_arg1:Array){ var _local2:Number; var _local3:Number; iAxesSearch = [0, 1]; super(); iGrid = _arg1[0]; iGridSH = _arg1[4]; iGridSize = new Point(iGrid.length, iGrid.length); iColor = OArrayUtils.CloneArray(_arg1[1]); iLen = _arg1[2]; iGenerateCount = _arg1[3]; iGray = _arg1[5]; _local2 = _arg1[6]; _local3 = Number(iGenerateCount); iGrayCount = Math.floor((_local3 * _local2)); if (((iGray) && ((iGrayCount < 1)))){ iGrayCount = 1; }; iRandom = new ORandomInt(); iRandom.SeedRand(_arg1[7]); iPoint = new Point(); Init(); } public function CheckNext(_arg1:int):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; _local2 = new Array(); switch (_arg1){ case 1: _local3 = 0; while (_local3 < iGrid.length) { _local4 = 0; _local5 = MatrixToArray(_local3, _local4); while ((((_local5 < iCells.length)) && ((this.iCells[_local5].prValue < 0)))) { _local4++; _local5 = MatrixToArray(_local3, _local4); }; _local6 = MatrixToArray(_local3, _local4); _local7 = MatrixToArray(_local3, (_local4 + 1)); if ((((_local4 < iGrid.length)) && ((((((((((this.iCells[_local6].prValue > 0)) && (!((this.iCells[_local7].prValue == 0))))) || ((this.iCells[_local6].prValue == OLevelsList.cGray)))) || ((this.iCells[_local6].prCurrValue >= 2)))) || ((((this.iCells[_local6].prValue < 0)) && ((((this.iCells[_local7].prValue == OLevelsList.cGray)) || ((this.iCells[_local7].prCurrValue > 2)))))))))){ _local2.push(false); } else { _local2.push(true); }; _local3++; }; break; case 2: _local3 = 0; while (_local3 < iGrid.length) { _local4 = (iGrid.length - 1); _local5 = MatrixToArray(_local3, _local4); while ((((_local5 >= 0)) && ((this.iCells[_local5].prValue < 0)))) { _local4--; _local5 = MatrixToArray(_local3, _local4); }; _local6 = MatrixToArray(_local3, _local4); _local7 = MatrixToArray(_local3, (_local4 - 1)); if ((((_local4 > 0)) && ((((((((((this.iCells[_local6].prValue > 0)) && (!((this.iCells[_local7].prValue == 0))))) || ((this.iCells[_local6].prValue == OLevelsList.cGray)))) || ((this.iCells[_local6].prCurrValue >= 2)))) || ((((this.iCells[_local6].prValue < 0)) && ((((this.iCells[_local7].prValue == OLevelsList.cGray)) || ((this.iCells[_local7].prCurrValue > 2)))))))))){ _local2.push(false); } else { _local2.push(true); }; _local3++; }; break; case 3: _local3 = 0; while (_local3 < iGrid.length) { _local4 = 0; _local5 = MatrixToArray(_local4, _local3); while (this.iCells[_local5].prValue < 0) { _local4++; _local5 = MatrixToArray(_local4, _local3); }; _local6 = MatrixToArray(_local4, _local3); _local7 = MatrixToArray((_local4 + 1), _local3); if ((((((((((this.iCells[_local6].prValue > 0)) && (!((this.iCells[_local7].prValue == 0))))) || ((this.iCells[_local6].prValue == OLevelsList.cGray)))) || ((this.iCells[_local6].prCurrValue >= 2)))) || ((((this.iCells[_local6].prValue < 0)) && ((((this.iCells[_local7].prValue == OLevelsList.cGray)) || ((this.iCells[_local7].prCurrValue > 2)))))))){ _local2.push(false); } else { _local2.push(true); }; _local3++; }; break; case 4: _local3 = 0; while (_local3 < iGrid.length) { _local4 = (iGrid.length - 1); _local5 = MatrixToArray(_local4, _local3); _local8 = MatrixToArray(_local4, _local3); while ((((_local5 >= 0)) && ((this.iCells[_local5].prValue < 0)))) { _local4--; _local5 = MatrixToArray(_local3, _local4); }; _local6 = MatrixToArray(_local4, _local3); _local7 = MatrixToArray((_local4 - 1), _local3); if ((((_local4 > 0)) && ((((((((((this.iCells[_local6].prValue > 0)) && (!((this.iCells[_local7].prValue == 0))))) || ((this.iCells[_local6].prValue == OLevelsList.cGray)))) || ((this.iCells[_local6].prCurrValue >= 2)))) || ((((this.iCells[_local6].prValue < 0)) && ((((this.iCells[_local7].prValue == OLevelsList.cGray)) || ((this.iCells[_local7].prCurrValue > 2)))))))))){ _local2.push(false); } else { _local2.push(true); }; _local3++; }; break; }; return (_local2); } private function ScreenToGrid(_arg1:Point):int{ return (((_arg1.y * iGridSize.x) + _arg1.x)); } public function GetCellCurrValue(_arg1:Point):int{ var _local2:int; _local2 = ScreenToGrid(_arg1); return (this.iCells[_local2].prCurrValue); } public function GetFire(_arg1:int):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:int; _local2 = new Array(); _local3 = 0; while (_local3 < iGrid.length) { _local4 = 0; while (_local4 < iGrid.length) { _local5 = MatrixToArray(_local3, _local4); if (this.iCells[_local5].prValue < 0){ _local2.push(new Point(_local3, _local4)); }; _local4++; }; _local3++; }; return (_local2); } public function HasGray():Boolean{ var _local1:int; _local1 = 0; while (_local1 < iCells.length) { if (iCells[_local1].prValue == OLevelsList.cGray){ return (true); }; _local1++; }; return (false); } public function GetCellValue(_arg1:Point):int{ var _local2:int; _local2 = ScreenToGrid(_arg1); if ((((_local2 >= 0)) && ((_local2 <= (iCells.length - 1))))){ return (this.iCells[_local2].prValue); }; return (0); } public function Generate():Array{ var _local1:Array; var _local2:Array; var _local3:int; var _local4:int; var _local5:OUniqueArray; var _local6:int; var _local7:OUniqueArray; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:Boolean; var _local13:Point; var _local14:int; _local1 = new Array(); _local2 = new Array(); _local3 = 0; while (_local3 < iGrid.length) { _local8 = 0; while (_local8 < iGrid.length) { _local9 = MatrixToArray(_local3, _local8); if (iCells[_local9].prValue == 0){ _local2.push(new Point(_local3, _local8)); }; _local8++; }; _local3++; }; _local4 = iColor[(iColor.length - 1)]; _local3 = 0; _local5 = new OUniqueArray(); if (_local2.length < iGenerateCount){ return (null); }; while (_local3 < iGenerateCount) { _local9 = iRandom.RandOnInterval(0, (_local2.length - 1)); if (_local5.Add(_local9)){ _local10 = iRandom.RandOnInterval(1, (iColor.length - 1)); _local11 = _local10; _local12 = Check(_local11); if (_local12){ _local13 = _local2[_local9]; _local14 = MatrixToArray(_local13.x, _local13.y); iCells[_local14].prValue = _local11; _local1.push([_local13, _local11]); _local3++; }; }; }; _local6 = 0; _local7 = new OUniqueArray(); while (((iGray) && ((_local6 < iGrayCount)))) { _local9 = iRandom.RandVal((_local1.length - 1)); _local13 = _local1[_local9][0]; if (_local7.Add(_local9)){ _local14 = MatrixToArray(_local13.x, _local13.y); iCells[_local14].prValue = OLevelsList.cGray; _local1[_local9][1] = OLevelsList.cGray; _local6++; }; }; return (_local1); } private function CreatePoints(_arg1:int, _arg2:int, _arg3:int):Array{ var _local4:Array; var _local5:Point; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:Point; var _local11:Point; var _local12:Point; var _local13:int; var _local14:int; _local4 = new Array(); switch (_arg1){ case 0: if (_arg3 == (iGrid.length - 1)){ _local5 = new Point(_arg2, (_arg3 - 1)); _local4.push(_local5); return (_local4); }; _local6 = MatrixToArray(_arg2, _arg3); _local7 = (_arg3 + 1); _local8 = _arg3; _local9 = MatrixToArray(_arg2, (_local7 - 1)); if ((((this.iCells[_local6].prCurrValue == 2)) || ((iCells[_local9].prValue == OLevelsList.cGray)))){ _local12 = new Point(_arg2, (_local7 - 2)); _local4.push(_local12); return (_local4); }; if (this.iCells[_local9].prValue < 0){ _local7 = (_local7 - 2); _local12 = new Point(_arg2, _local7); _local4.push(_local12); return (_local4); }; _local9 = MatrixToArray(_arg2, _local7); while ((((_local7 <= (iGrid.length - 1))) && ((this.iCells[_local9].prValue <= 0)))) { if (this.iCells[_local9].prValue < 0){ break; }; _local7++; _local9 = MatrixToArray(_arg2, _local7); }; _local9 = MatrixToArray(_arg2, (_local7 - 1)); if ((((this.iCells[_local9].prValue == 0)) || (((_local7 - _local8) > 1)))){ _local10 = new Point(_arg2, _arg3); _local11 = new Point(_arg2, (_local7 - 1)); _local12 = new Point(_arg2, (_local11.y - 1)); _local4.push(_local12, _local10, _local11); } else { _local5 = new Point(_arg2, (_local7 - 2)); _local4.push(_local5); }; return (_local4); case 1: _local9 = MatrixToArray(_arg2, _arg3); if (_arg3 == 0){ _local5 = new Point(_arg2, (_arg3 + 1)); _local4.push(_local5); return (_local4); }; _local7 = (_arg3 - 1); _local8 = _arg3; _local6 = MatrixToArray(_arg2, (_local7 + 1)); _local13 = MatrixToArray(_arg2, _local8); _local14 = MatrixToArray(_arg2, _local7); if ((((((this.iCells[_local6].prCurrValue == 2)) || ((iCells[_local6].prValue == OLevelsList.cGray)))) || (((!((iCells[_local13].prValue == 0))) && (!((iCells[_local14].prValue == 0))))))){ _local12 = new Point(_arg2, (_local7 + 2)); _local4.push(_local12); return (_local4); }; if ((((this.iCells[_local6].prCurrValue == 2)) || ((iCells[_local9].prValue == OLevelsList.cGray)))){ _local12 = new Point(_arg2, (_local7 + 2)); _local4.push(_local12); return (_local4); }; _local9 = MatrixToArray(_arg2, _local7); if (this.iCells[_local9].prValue < 0){ _local12 = new Point(_arg2, (_local7 + 2)); _local4.push(_local12); return (_local4); }; while ((((_local7 >= 0)) && ((this.iCells[_local9].prValue == 0)))) { if ((((this.iCells[_local9].prValue < 0)) || ((_local7 == 0)))){ _local7--; break; }; _local7--; _local9 = MatrixToArray(_arg2, _local7); }; _local6 = MatrixToArray(_arg2, _local8); if (((((_local8 - _local7) > 1)) && ((this.iCells[_local6].prCurrValue < 2)))){ _local10 = new Point(_arg2, _local8); _local11 = new Point(_arg2, (_local7 + 1)); _local12 = new Point(_arg2, (_local11.y + 1)); _local4.push(_local12, _local10, _local11); } else { _local5 = new Point(_arg2, (_local7 + 1)); _local4.push(_local5); }; return (_local4); case 2: _local9 = MatrixToArray(_arg3, _arg2); if (_arg3 == 0){ _local5 = new Point((_arg3 + 1), _arg2); _local4.push(_local5); return (_local4); }; _local7 = (_arg3 - 1); _local8 = _arg3; _local6 = MatrixToArray((_local7 + 1), _arg2); _local13 = MatrixToArray(_local8, _arg2); _local14 = MatrixToArray(_local7, _arg2); if ((((((this.iCells[_local6].prCurrValue == 2)) || ((iCells[_local6].prValue == OLevelsList.cGray)))) || (((!((iCells[_local13].prValue == 0))) && (!((iCells[_local14].prValue == 0))))))){ _local12 = new Point((_local7 + 2), _arg2); _local4.push(_local12); return (_local4); }; _local9 = MatrixToArray(_local7, _arg2); if (this.iCells[_local9].prValue < 0){ _local12 = new Point((_local7 + 2), _arg2); _local4.push(_local12); return (_local4); }; while ((((_local7 >= 0)) && ((this.iCells[_local9].prValue == 0)))) { _local7--; _local9 = MatrixToArray(_local7, _arg2); if ((((_local7 < 0)) || ((this.iCells[_local9].prValue < 0)))){ break; }; }; _local6 = MatrixToArray(_local8, _arg2); if (((((_local8 - _local7) > 1)) && ((this.iCells[_local6].prCurrValue < 2)))){ _local10 = new Point(_local8, _arg2); _local11 = new Point((_local7 + 1), _arg2); _local12 = new Point((_local11.x + 1), _arg2); _local4.push(_local12, _local10, _local11); } else { _local5 = new Point((_local7 + 1), _arg2); _local4.push(_local5); }; return (_local4); case 3: if (_arg3 == (iGrid.length - 1)){ _local5 = new Point((_arg3 - 1), _arg2); _local4.push(_local5); return (_local4); }; _local7 = (_arg3 + 1); _local8 = _arg3; _local6 = MatrixToArray((_local7 - 1), _arg2); if ((((this.iCells[_local6].prCurrValue == 2)) || ((iCells[_local6].prValue == OLevelsList.cGray)))){ _local12 = new Point((_local7 - 2), _arg2); _local4.push(_local12); return (_local4); }; _local9 = MatrixToArray(_local7, _arg2); if (((!((iCells[_local6].prValue == 0))) && (!((iCells[_local9].prValue == 0))))){ _local12 = new Point((_local8 - 1), _arg2); _local4.push(_local12); return (_local4); }; if (this.iCells[_local9].prValue < 0){ _local7 = (_local7 - 2); _local12 = new Point(_local7, _arg2); _local4.push(_local12); return (_local4); }; while ((((_local7 <= (iGrid.length - 1))) && ((this.iCells[_local9].prValue <= 0)))) { if (this.iCells[_local9].prValue < 0){ break; }; _local7++; _local9 = MatrixToArray(_local7, _arg2); }; _local6 = MatrixToArray(_arg3, _arg2); if (((((_local7 - _local8) > 1)) && ((this.iCells[_local6].prCurrValue < 2)))){ _local10 = new Point(_arg3, _arg2); _local11 = new Point((_local7 - 1), _arg2); _local12 = new Point((_local11.x - 1), _arg2); _local4.push(_local12, _local10, _local11); } else { _local5 = new Point((_local7 - 1), _arg2); _local4.push(_local5); }; return (_local4); }; return (null); } public function FindAndClear(_arg1:Array):OUniquePointsArray{ var _local2:OUniquePointsArray; var _local3:int; var _local4:int; var _local5:Array; var _local6:int; var _local7:Array; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:Array; var _local14:int; var _local15:int; _local2 = new OUniquePointsArray(); _local3 = MatrixToArray(_arg1[0].x, _arg1[0].y); _local4 = this.iCells[_local3].prValue; if (_arg1.length > 1){ _local11 = MatrixToArray(_arg1[1].x, _arg1[1].y); _local12 = this.iCells[_local11].prValue; }; _local5 = Find(MatrixToArray(_arg1[0].x, _arg1[0].y)); if (_arg1.length > 1){ _local13 = Find(MatrixToArray(_arg1[1].x, _arg1[1].y)); }; if (_local5.length >= iLen){ _local6 = 0; while (_local6 < _local5.length) { _local2.Add(_local5[_local6]); _local6++; }; }; if (((_local13) && ((_local13.length >= iLen)))){ _local6 = 0; while (_local6 < _local13.length) { _local2.Add(_local13[_local6]); _local6++; }; }; if (_local2.length >= iLen){ _local14 = 0; while (_local14 < _local2.length) { _local15 = MatrixToArray(_local2[_local14].y, _local2[_local14].x); if (iCells[_local15].prCurrValue == 0){ iCells[_local15].prValue = 0; } else { iCells[_local15].prCurrValue = (iCells[_local15].prCurrValue - 1); }; _local14++; }; return (_local2); }; _local2 = new OUniquePointsArray(); return (_local2); } private function Init():void{ var _local1:int; var _local2:int; var _local3:int; iCells = new Array(); _local1 = 0; while (_local1 < iGridSize.x) { _local2 = 0; while (_local2 < iGridSize.y) { _local3 = iColor.indexOf(iGrid[_local1][_local2]); if (iGridSH[_local1][_local2] > 1){ iCells.push(new OLCell([_local3, -1, iGridSH[_local1][_local2]])); } else { iCells.push(new OLCell([_local3, -1, 1])); }; _local2++; }; _local1++; }; } public function GetFillCount():int{ var _local1:int; var _local2:int; _local1 = 0; _local2 = 0; while (_local2 < iCells.length) { if (iCells[_local2].prValue > 0){ _local1++; }; _local2++; }; return (_local1); } public function GetGray():Array{ var _local1:Array; var _local2:int; var _local3:int; var _local4:int; _local1 = new Array(); _local2 = 0; while (_local2 < iGrid.length) { _local3 = 0; while (_local3 < iGrid.length) { _local4 = MatrixToArray(_local2, _local3); if (this.iCells[_local4].prValue == OLevelsList.cGray){ _local1.push(new Point(_local2, _local3)); this.iCells[_local4].prValue = 0; }; _local3++; }; _local2++; }; return (_local1); } private function GetPoin(_arg1:int, _arg2:int):Point{ var _local3:int; var _local4:int; var _local5:int; switch (_arg2){ case 0: _local5 = 0; _local4 = MatrixToArray(_arg1, _local5); while (this.iCells[_local4].prValue < 0) { _local5++; _local4 = MatrixToArray(_arg1, _local5); }; while ((((((_local5 <= (iGrid.length - 1))) && ((this.iCells[_local4].prValue <= 0)))) && (!((this.iCells[_local4].prValue == OLevelsList.cGray))))) { _local5++; _local4 = MatrixToArray(_arg1, _local5); if ((((((_local5 > (iGrid.length - 1))) || ((this.iCells[_local4].prValue < 0)))) || ((this.iCells[_local4].prValue == OLevelsList.cGray)))){ break; }; }; return (new Point(_arg1, (_local5 - 1))); case 1: _local3 = (iGrid.length - 1); _local4 = MatrixToArray(_arg1, _local3); while (this.iCells[_local4].prValue < 0) { _local3--; _local4 = MatrixToArray(_arg1, _local3); }; _local5 = _local3; while ((((((_local5 >= 0)) && ((this.iCells[_local4].prValue <= 0)))) && (!((this.iCells[_local4].prValue == OLevelsList.cGray))))) { _local5--; _local4 = MatrixToArray(_arg1, _local5); if ((((((_local5 < 0)) || ((this.iCells[_local4].prValue < 0)))) || ((this.iCells[_local4].prValue == OLevelsList.cGray)))){ break; }; }; return (new Point(_arg1, (_local5 + 1))); case 2: _local3 = (iGrid.length - 1); _local4 = MatrixToArray(_local3, _arg1); while (this.iCells[_local4].prValue < 0) { _local3--; _local4 = MatrixToArray(_local3, _arg1); }; _local5 = _local3; while ((((((_local5 >= 0)) && ((this.iCells[_local4].prValue <= 0)))) && (!((this.iCells[_local4].prValue == OLevelsList.cGray))))) { _local5--; _local4 = MatrixToArray(_local5, _arg1); if ((((((_local5 < 0)) || ((this.iCells[_local4].prValue < 0)))) || ((this.iCells[_local4].prValue == OLevelsList.cGray)))){ break; }; }; return (new Point((_local5 + 1), _arg1)); case 3: _local5 = 0; _local4 = MatrixToArray(_local5, _arg1); while (this.iCells[_local4].prValue < 0) { _local5++; _local4 = MatrixToArray(_local5, _arg1); }; while ((((((_local5 <= (iGrid.length - 1))) && ((this.iCells[_local4].prValue <= 0)))) && (!((this.iCells[_local4].prValue == OLevelsList.cGray))))) { _local5++; _local4 = MatrixToArray(_local5, _arg1); if ((((((_local5 > (iGrid.length - 1))) || ((this.iCells[_local4].prValue < 0)))) || ((this.iCells[_local4].prValue == OLevelsList.cGray)))){ break; }; }; return (new Point((_local5 - 1), _arg1)); }; return (null); } public function FindPos(_arg1:int, _arg2:int, _arg3:int):Array{ var _local4:Array; var _local5:Point; var _local6:Array; var _local7:int; var _local8:int; var _local9:int; var _local10:Point; var _local11:int; var _local12:Point; var _local13:Array; var _local14:int; var _local15:Point; var _local16:Point; var _local17:int; _local5 = new Point(); _local6 = new Array(); _local4 = ValueCount(_arg2, _arg1); if (_local4 == null){ return (null); }; _local9 = _local4[0]; switch (_arg1){ case 0: case 1: _local10 = new Point(_arg2, -1); break; case 2: case 3: _local10 = new Point(-1, _arg2); break; }; switch (_local9){ case 0: _local12 = GetPoin(_arg2, _arg1); _local8 = MatrixToArray(_local12.x, _local12.y); if ((((((((_local12.x < 0)) || ((_local12.y < 0)))) || ((_local12.x > (iGrid.length - 1))))) || ((_local12.y > (iGrid.length - 1))))){ return (null); }; this.iCells[_local8].prValue = _arg3; _local6.push([_local10, _local12]); break; case 1: _local11 = _local4[1][0][1]; _local13 = CreatePoints(_arg1, _arg2, _local11); if (_local13.length < 3){ _local12 = new Point(_local13[0].x, _local13[0].y); if ((((((((_local12.x < 0)) || ((_local12.y < 0)))) || ((_local12.x > (iGrid.length - 1))))) || ((_local12.y > (iGrid.length - 1))))){ return (null); }; _local8 = MatrixToArray(_local12.x, _local12.y); this.iCells[_local8].prValue = _arg3; _local6.push([_local10, _local12]); } else { _local12 = _local13[0]; _local15 = _local13[1]; _local16 = _local13[2]; _local8 = MatrixToArray(_local15.x, _local15.y); _local17 = MatrixToArray(_local16.x, _local16.y); iCells[_local17].prValue = iCells[_local8].prValue; iCells[_local8].prValue = 0; iCells[_local17].prCurrValue = iCells[_local8].prCurrValue; iCells[_local8].prCurrValue = 0; _local8 = MatrixToArray(_local12.x, _local12.y); this.iCells[_local8].prValue = _arg3; _local6.push([_local10, _local12], [_local15, _local16]); }; break; case 2: _local11 = _local4[1][0][1]; _local14 = _local4[1][1][1]; _local13 = CreatePoints2(_arg1, _arg2, _local11, _local14); if (_local13.length < 3){ _local12 = new Point(_local13[0].x, _local13[0].y); if ((((((((_local12.x < 0)) || ((_local12.y < 0)))) || ((_local12.x > (iGrid.length - 1))))) || ((_local12.y > (iGrid.length - 1))))){ return (null); }; _local8 = MatrixToArray(_local12.x, _local12.y); this.iCells[_local8].prValue = _arg3; _local6.push([_local10, _local12]); } else { _local12 = _local13[0]; _local15 = _local13[1]; _local16 = _local13[2]; _local8 = MatrixToArray(_local15.x, _local15.y); _local17 = MatrixToArray(_local16.x, _local16.y); iCells[_local17].prValue = iCells[_local8].prValue; iCells[_local8].prValue = 0; iCells[_local17].prCurrValue = iCells[_local8].prCurrValue; iCells[_local8].prCurrValue = 0; _local8 = MatrixToArray(_local12.x, _local12.y); this.iCells[_local8].prValue = _arg3; _local6.push([_local10, _local12], [_local15, _local16]); }; break; }; return (_local6); } private function ValueCount(_arg1:int, _arg2:int):Array{ var _local3:Array; var _local4:int; var _local5:Array; var _local6:int; var _local7:int; var _local8:int; _local3 = new Array(); _local4 = 0; _local5 = new Array(); switch (_arg2){ case 0: _local6 = 0; _local7 = MatrixToArray(_arg1, _local6); if ((((this.iCells[_local7].prCurrValue == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ return (null); }; while (this.iCells[_local7].prValue < 0) { _local6++; _local7 = MatrixToArray(_arg1, _local6); }; _local8 = _local6; while (_local8 < iGrid.length) { _local7 = MatrixToArray(_arg1, _local8); if ((((((this.iCells[_local7].prValue > 0)) && (!((this.iCells[_local7].prValue == OLevelsList.cGray))))) && ((_local5.length < 2)))){ _local4++; _local5.push([_local7, _local8]); }; if ((((((((this.iCells[_local7].prValue < 0)) || ((this.iCells[_local7].prCurrValue == 2)))) || ((iCells[_local7].prValue == OLevelsList.cGray)))) && ((_local8 > 0)))){ _local3.push(_local4, _local5); return (_local3); }; if ((((_local5.length == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ _local3.push(_local4, _local5); return (_local3); }; _local8++; }; break; case 1: _local6 = (iGrid.length - 1); _local7 = MatrixToArray(_arg1, _local6); if ((((this.iCells[_local7].prCurrValue == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ return (null); }; while (this.iCells[_local7].prValue < 0) { _local6--; _local7 = MatrixToArray(_arg1, _local6); }; _local8 = _local6; while (_local8 >= 0) { _local7 = MatrixToArray(_arg1, _local8); if ((((((this.iCells[_local7].prValue > 0)) && (!((this.iCells[_local7].prValue == OLevelsList.cGray))))) && ((_local5.length < 2)))){ _local4++; _local5.push([_local7, _local8]); }; if ((((((((this.iCells[_local7].prValue < 0)) || ((this.iCells[_local7].prCurrValue == 2)))) || ((iCells[_local7].prValue == OLevelsList.cGray)))) && ((_local8 < (iGrid.length - 1))))){ _local3.push(_local4, _local5); return (_local3); }; if ((((_local5.length == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ _local7 = MatrixToArray(_arg1, _local8); _local3.push(_local4, _local5); return (_local3); }; _local8--; }; break; case 2: _local6 = (iGrid.length - 1); _local7 = MatrixToArray(_local6, _arg1); if ((((this.iCells[_local7].prCurrValue == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ return (null); }; while (this.iCells[_local7].prValue < 0) { _local6--; _local7 = MatrixToArray(_local6, _arg1); }; _local8 = _local6; while (_local8 >= 0) { _local7 = MatrixToArray(_local8, _arg1); if ((((((this.iCells[_local7].prValue > 0)) && (!((this.iCells[_local7].prValue == OLevelsList.cGray))))) && ((_local5.length < 2)))){ _local4++; _local5.push([_local7, _local8]); }; if ((((((((this.iCells[_local7].prValue < 0)) || ((this.iCells[_local7].prCurrValue == 2)))) || ((iCells[_local7].prValue == OLevelsList.cGray)))) && ((_local8 < (iGrid.length - 1))))){ _local3.push(_local4, _local5); return (_local3); }; if ((((_local5.length == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ _local7 = MatrixToArray(_local8, _arg1); _local3.push(_local4, _local5); return (_local3); }; _local8--; }; break; case 3: _local6 = 0; _local7 = MatrixToArray(_local6, _arg1); if ((((this.iCells[_local7].prCurrValue == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ return (null); }; while (this.iCells[_local7].prValue < 0) { _local6++; _local7 = MatrixToArray(_local6, _arg1); }; _local8 = _local6; while (_local8 < iGrid.length) { _local7 = MatrixToArray(_local8, _arg1); if ((((((this.iCells[_local7].prValue > 0)) && (!((this.iCells[_local7].prValue == OLevelsList.cGray))))) && ((_local5.length < 2)))){ _local4++; _local5.push([_local7, _local8]); }; if ((((((((this.iCells[_local7].prValue < 0)) || ((this.iCells[_local7].prCurrValue == 2)))) || ((iCells[_local7].prValue == OLevelsList.cGray)))) && ((_local8 > 0)))){ _local3.push(_local4, _local5); return (_local3); }; if ((((_local5.length == 2)) || ((iCells[_local7].prValue == OLevelsList.cGray)))){ _local3.push(_local4, _local5); return (_local3); }; _local8++; }; break; }; _local3.push(_local4, _local5); return (_local3); } public function ClearValue(_arg1:int, _arg2:int):void{ var _local3:int; _local3 = MatrixToArray(_arg1, _arg2); if (iCells[_local3].prCurrValue == 0){ iCells[_local3].prValue = 0; } else { iCells[_local3].prCurrValue = (iCells[_local3].prCurrValue - 1); }; } public function SetGray(_arg1:Point, _arg2:int):Array{ var _local3:Boolean; var _local4:Array; var _local5:Point; var _local6:int; var _local7:int; var _local8:int; _local3 = false; _local4 = new Array(); _local6 = MatrixToArray(_arg1.x, _arg1.y); _local7 = this.iCells[_local6].prValue; switch (_arg2){ case 0: if (_arg1.y < (iGrid.length - 1)){ _local8 = MatrixToArray(_arg1.x, (_arg1.y + 1)); if (this.iCells[_local8].prValue == OLevelsList.cGray){ this.iCells[_local8].prValue = _local7; _local3 = true; _local5 = new Point(_arg1.x, (_arg1.y + 1)); }; }; break; case 1: if (_arg1.y > 0){ _local8 = MatrixToArray(_arg1.x, (_arg1.y - 1)); if (this.iCells[_local8].prValue == OLevelsList.cGray){ this.iCells[_local8].prValue = _local7; _local3 = true; _local5 = new Point(_arg1.x, (_arg1.y - 1)); }; }; break; case 3: if (_arg1.x < (iGrid.length - 1)){ _local8 = MatrixToArray((_arg1.x + 1), _arg1.y); if (this.iCells[_local8].prValue == OLevelsList.cGray){ this.iCells[_local8].prValue = _local7; _local3 = true; _local5 = new Point((_arg1.x + 1), _arg1.y); }; }; break; case 2: if (_arg1.x > 0){ _local8 = MatrixToArray((_arg1.x - 1), _arg1.y); if (this.iCells[_local8].prValue == OLevelsList.cGray){ this.iCells[_local8].prValue = _local7; _local3 = true; _local5 = new Point((_arg1.x - 1), _arg1.y); }; }; break; }; _local4.push(_local3, _local5); return (_local4); } private function MoveTo(_arg1:int, _arg2:int, _arg3:int=1):int{ var _local4:int; var _local5:int; var _local6:int; var _local7:int; _local4 = -1; _local6 = this.iGridSize.x; _local7 = this.iGridSize.y; switch (_arg2){ case 0: _local5 = ((_arg1 % _local6) + _arg3); if ((((_local5 >= 0)) && ((_local5 < _local6)))){ _local4 = (_arg1 + _arg3); }; break; case 1: _local5 = (int((_arg1 / _local6)) + _arg3); if ((((_local5 >= 0)) && ((_local5 < _local7)))){ _local4 = (_arg1 + (_arg3 * _local6)); }; break; case 2: _local5 = MoveTo(_arg1, 0, _arg3); if (_local5 != -1){ _local5 = MoveTo(_local5, 1, _arg3); if (_local5 != -1){ _local4 = _local5; }; }; break; case 3: _local5 = MoveTo(_arg1, 0, (-1 * _arg3)); if (_local5 != -1){ _local5 = MoveTo(_local5, 1, _arg3); if (_local5 != -1){ _local4 = _local5; }; }; break; }; return (_local4); } private function GridToScreen(_arg1:int):Point{ iPoint.x = int((_arg1 % this.iGridSize.x)); iPoint.y = int((_arg1 / this.iGridSize.x)); return (iPoint); } public function CheckEnd():Boolean{ var _local1:int; var _local2:int; var _local3:int; _local1 = 0; while (_local1 < iGridSize.x) { _local2 = 0; while (_local2 < iGridSize.y) { _local3 = MatrixToArray(_local1, _local2); if ((((iCells[_local3].prValue > 0)) && (!((iCells[_local3].prValue == OLevelsList.cGray))))){ return (false); }; _local2++; }; _local1++; }; return (true); } public function SetValue(_arg1:int, _arg2:int, _arg3:int=0):void{ var _local4:int; var _local5:int; _local4 = MatrixToArray(_arg1, _arg2); _local5 = MatrixToArray(_arg2, _arg1); iCells[_local4].prValue = _arg3; } public function Find(_arg1:int):Array{ var _local2:Array; var _local3:Array; var _local4:int; var _local5:int; var _local6:Array; var _local7:Array; var _local8:Boolean; var _local9:Array; var _local10:Boolean; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:OLCell; var _local16:Point; var _local17:Point; _local2 = [-1, 1]; _local3 = new Array(); _local4 = _arg1; _local5 = iCells[_arg1].prValue; if (_local5 == 0){ _local3 = new Array(); return (_local3); }; _local6 = new Array(); _local7 = new Array(); _local8 = true; _local9 = this.iAxesSearch; _local10 = false; _local11 = 0; while (_local11 < iCells.length) { _local6.push(0); _local11++; }; _local7.push(_local4); while (_local8) { _local4 = _local7[(_local7.length - 1)]; _local10 = false; _local12 = 0; while (_local12 < _local2.length) { _local13 = 0; while (_local13 < _local9.length) { _local14 = MoveTo(_local4, _local9[_local13], _local2[_local12]); if (_local14 > -1){ _local15 = iCells[_local14]; if ((((_local15.prValue == _local5)) && ((_local6[_local14] == 0)))){ _local6[_local14] = _local5; _local10 = true; _local7.push(_local14); }; }; if (_local10){ break; }; _local13++; }; if (_local10){ break; }; _local12++; }; if (!_local10){ _local7.pop(); }; if (_local7.length == 0){ _local8 = false; }; }; _local11 = 0; while (_local11 < iCells.length) { if (_local6[_local11] > 0){ _local16 = GridToScreen(_local11); _local17 = new Point(_local16.y, _local16.x); _local3.push(_local17); }; _local11++; }; return (_local3); } public function isAperture():Boolean{ var _local1:int; _local1 = 0; while (_local1 < iCells.length) { if (iCells[_local1].prValue < 0){ return (true); }; _local1++; }; return (false); } public function DeleteColor(_arg1:OUniqueArray):Boolean{ var _local2:Boolean; var _local3:int; var _local4:int; _local2 = false; _local3 = 1; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; if (!Check(iColor.indexOf(_local4))){ _local2 = true; _arg1.Remove(_local4); }; _local3++; }; return (_local2); } public function Check(_arg1:int):Boolean{ var _local2:int; _local2 = 0; while (_local2 < iCells.length) { if (iCells[_local2].prValue == _arg1){ return (true); }; _local2++; }; return (false); } private function CreatePoints2(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Array{ var _local5:Array; var _local6:Point; var _local7:Point; var _local8:Point; var _local9:Point; _local5 = new Array(); switch (_arg1){ case 0: if ((_arg4 - _arg3) <= 1){ _local6 = new Point(_arg2, (_arg3 - 1)); _local5.push(_local6); } else { _local7 = new Point(_arg2, (_arg4 - 1)); _local8 = new Point(_arg2, _arg3); _local9 = new Point(_arg2, (_local7.y - 1)); _local5.push(_local9, _local8, _local7); }; break; case 1: if ((_arg3 - _arg4) <= 1){ _local6 = new Point(_arg2, (_arg3 + 1)); _local5.push(_local6); } else { _local8 = new Point(_arg2, _arg3); _local7 = new Point(_arg2, (_arg4 + 1)); _local9 = new Point(_arg2, (_local7.y + 1)); _local5.push(_local9, _local8, _local7); }; break; case 2: if ((_arg3 - _arg4) <= 1){ _local6 = new Point((_arg3 + 1), _arg2); _local5.push(_local6); } else { _local8 = new Point(_arg3, _arg2); _local7 = new Point((_arg4 + 1), _arg2); _local9 = new Point((_local7.x + 1), _arg2); _local5.push(_local9, _local8, _local7); }; break; case 3: if ((_arg4 - _arg3) <= 1){ _local6 = new Point((_arg3 - 1), _arg2); _local5.push(_local6); } else { _local7 = new Point((_arg4 - 1), _arg2); _local8 = new Point(_arg3, _arg2); _local9 = new Point((_local7.x - 1), _arg2); _local5.push(_local9, _local8, _local7); }; break; }; return (_local5); } public function BorderColor(_arg1:int):int{ var _local2:int; var _local3:int; var _local4:int; var _local5:Boolean; _local2 = 0; _local3 = (iColor.length - 1); _local4 = -1; _local5 = false; while ((((_local2 == 0)) || (!(_local5)))) { _local2 = (iRandom.RandVal(_local3) + 1); _local5 = Check(_local2); }; return (_local2); } private function MatrixToArray(_arg1:int, _arg2:int):int{ return (((_arg2 * iGridSize.x) + _arg1)); } } }//package RES.OBJECTS.LOGIC
Section 167
//CExplodeParticle (RES.OBJECTS.Particle.CExplodeParticle) package RES.OBJECTS.Particle { public class CExplodeParticle extends CSimpleFallParticle { public static const MOVE_DOWN:int = 1; public static const MOVE_LEFT:int = 2; public static const MOVE_UP:int = 0; public static const MOVE_RIGHT:int = 3; public function CExplodeParticle(_arg1:int, _arg2:CParticleContainer, _arg3:int){ super(_arg1, _arg2); super.dAlpha = ((Math.random() * 0.2) + 0.02); switch (_arg3){ case CExplodeParticle.MOVE_UP: super.dx = ((Math.random() * 2) - 1); super.dy = ((-(Math.random()) * 4) - 1); break; case CExplodeParticle.MOVE_DOWN: super.dx = ((Math.random() * 2) - 1); super.dy = ((Math.random() * 4) + 1); break; case CExplodeParticle.MOVE_LEFT: super.dx = ((-(Math.random()) * 4) - 1); super.dy = ((Math.random() * 2) - 1); break; case CExplodeParticle.MOVE_RIGHT: super.dx = ((Math.random() * 4) + 1); super.dy = ((Math.random() * 2) - 1); break; }; } } }//package RES.OBJECTS.Particle
Section 168
//CParticle (RES.OBJECTS.Particle.CParticle) package RES.OBJECTS.Particle { public interface CParticle { function onTimer():void; } }//package RES.OBJECTS.Particle
Section 169
//CParticleContainer (RES.OBJECTS.Particle.CParticleContainer) package RES.OBJECTS.Particle { import ENGINE.DISPLAY.*; import flash.events.*; public class CParticleContainer extends OSprite { private var aParticlesList:Array; public function CParticleContainer(){ aParticlesList = new Array(); super(); addEventListener(Event.ENTER_FRAME, onTimer); } public function _createExplodeParticles(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:CParticle; var _local7:int; var _local8:int; _local7 = _arg2; while (_local7 < _arg4) { _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_UP); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _local7; (_local6 as CExplodeParticle).prY = _arg3; this.addChild((_local6 as OSprite)); _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_DOWN); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _local7; (_local6 as CExplodeParticle).prY = _arg5; this.addChild((_local6 as OSprite)); _local7 = (_local7 + 4); }; _local7 = _arg3; while (_local7 < _arg5) { _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_LEFT); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _arg2; (_local6 as CExplodeParticle).prY = _local7; this.addChild((_local6 as OSprite)); _local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_RIGHT); aParticlesList.push(_local6); (_local6 as CExplodeParticle).prX = _arg4; (_local6 as CExplodeParticle).prY = _local7; this.addChild((_local6 as OSprite)); _local7 = (_local7 + 4); }; } public function removeParticle(_arg1:CParticle):void{ var _local2:int; _local2 = 0; while (_local2 < aParticlesList.length) { if (aParticlesList[_local2] == _arg1){ this.removeChild((_arg1 as OSprite)); aParticlesList.splice(_local2, 1); return; }; _local2++; }; } public function addSimpleParticle(_arg1:int, _arg2:int, _arg3:int):void{ var _local4:CParticle; _local4 = new CSimpleFallParticle(_arg1, this); aParticlesList.push(_local4); (_local4 as CSimpleFallParticle).prX = _arg2; (_local4 as CSimpleFallParticle).prY = _arg3; this.addChild((_local4 as OSprite)); } override public function Free():void{ this.removeEventListener(Event.ENTER_FRAME, onTimer); super.Free(); } public function onTimer(_arg1:Event):void{ var _local2:int; _local2 = 0; while (_local2 < aParticlesList.length) { (aParticlesList[_local2] as CParticle).onTimer(); _local2++; }; } } }//package RES.OBJECTS.Particle
Section 170
//CSimpleFallParticle (RES.OBJECTS.Particle.CSimpleFallParticle) package RES.OBJECTS.Particle { import ENGINE.DISPLAY.*; import RES.OBJECTS.*; public class CSimpleFallParticle extends OSprite implements CParticle { protected var dAlpha:Number; private var gBitmap:OBitmap; private var cParticleContainer:CParticleContainer; protected var dy:Number; protected var dr:Number; protected var dx:Number; protected var dVelY:Number; protected var dVelX:Number; public function CSimpleFallParticle(_arg1:int, _arg2:CParticleContainer){ this.cParticleContainer = _arg2; super(); gBitmap = new OBitmap(); gBitmap.CopyFrom(CPrototypeFactory.aParticles[_arg1]); this.addChild(gBitmap); this.dx = ((Math.random() * 3) - 1.5); this.dy = ((Math.random() * 3) - 1.5); this.dr = ((Math.random() * 10) + 1); dVelX = (dx / 50); dVelY = (dy / 50); this.dAlpha = 0.01; this.alpha = ((Math.random() * 0.8) + 0.1); } public function onTimer():void{ this.alpha = (this.alpha - this.dAlpha); if (this.alpha <= 0.2){ cParticleContainer.removeParticle(this); }; this.Move(dx, dy); dx = (dx - dVelX); dy = (dy - dVelY); } } }//package RES.OBJECTS.Particle
Section 171
//OPlayRecord (RES.OBJECTS.PLAYRECORD.OPlayRecord) package RES.OBJECTS.PLAYRECORD { import flash.geom.*; import RES.OBJECTS.GRAPHICS.*; import flash.utils.*; import RES.OBJECTS.UTILS.*; public class OPlayRecord { private var iTCount:int; private var iField:OGField; private var iRecord:String; private var iTimer:Timer; private var iPos:Point; private var iState:int; private var iTickCounter:int; private var iTDelay:int; public static const stWaitClick:int = 2; public static const stPlay:int = 1; public static const stEnd:int = 4; public static const stNone:int = 0; public static const stClick:int = 5; public function OPlayRecord(_arg1:OGField, _arg2:String){ iField = _arg1; iRecord = _arg2; iTimer = new Timer(20); iPos = new Point(); this.State = stNone; } public function get prChState():Boolean{ return ((iTickCounter >= iTDelay)); } public function Free():void{ this.iTimer = null; } public function AddCommand(_arg1:String):void{ this.iRecord = (this.iRecord + _arg1); } private function ParseCommand():void{ var _local1:String; var _local2:String; if (iRecord.length == 0){ this.State = stEnd; return; }; _local1 = iRecord.substr(0, 1); iPos.x = AIConvertChar.FromChar(_local1); iRecord = iRecord.substr(1); _local1 = iRecord.substr(0, 1); iPos.y = AIConvertChar.FromChar(_local1); iRecord = iRecord.substr(1); _local1 = iRecord.substr(0, 1); iRecord = iRecord.substr(1); _local2 = iRecord.substr(0, 1); iTDelay = ((AIConvertChar.FromChar(_local1) * 60) + AIConvertChar.FromChar(_local2)); trace(iTDelay); iRecord = iRecord.substr(1); this.State = stWaitClick; } public function get prClickCell():Point{ return (this.iPos); } public function set State(_arg1:int):void{ iState = _arg1; switch (iState){ case stNone: if (((iField) && (iRecord))){ this.State = stPlay; }; break; case stPlay: iTickCounter = 0; ParseCommand(); break; case stWaitClick: break; case stEnd: break; }; } public function get State():int{ return (iState); } public function onEnterFrame():void{ switch (iState){ case stNone: break; case stPlay: break; case stWaitClick: if ((((iTickCounter >= iTDelay)) && (iField.WaitClick()))){ this.State = stClick; } else { iTickCounter++; }; break; case stEnd: ParseCommand(); break; }; } } }//package RES.OBJECTS.PLAYRECORD
Section 172
//ORecord (RES.OBJECTS.PLAYRECORD.ORecord) package RES.OBJECTS.PLAYRECORD { import RES.OBJECTS.UTILS.*; public class ORecord { private var iRecord:String; public function ORecord(){ iRecord = new String(); } public function get prRecord():String{ return (this.iRecord); } public function WriteNode(_arg1:int, _arg2:int, _arg3:int):void{ var _local4:int; var _local5:int; _local4 = Math.floor((_arg1 / 60)); _local5 = (_arg1 - (_local4 * 60)); iRecord = (iRecord + (((AIConvertChar.ToChar(_arg2) + AIConvertChar.ToChar(_arg3)) + AIConvertChar.ToChar(_local4)) + AIConvertChar.ToChar(_local5))); } } }//package RES.OBJECTS.PLAYRECORD
Section 173
//AIConvertChar (RES.OBJECTS.UTILS.AIConvertChar) package RES.OBJECTS.UTILS { public class AIConvertChar { public static const ABC:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; public static function ToChar(_arg1:int):String{ var _local2:int; var _local3:String; _local2 = _arg1; _local3 = ""; do { _local3 = ABC.charAt((_local2 % ABC.length)); _local2 = (_local2 / ABC.length); } while (_local2 != 0); return (_local3); } public static function FromChar(_arg1:String):int{ var _local2:String; var _local3:int; _local2 = _arg1; _local3 = 0; while (_local2 != "") { _local3 = (_local3 * ABC.length); _local3 = (_local3 + ABC.indexOf(_local2.substr((_local2.length - 1), 1))); _local2 = _local2.substr(0, (_local2.length - 1)); }; return (_local3); } public static function ToDoubleChar(_arg1:int):String{ var _local2:int; var _local3:String; _local2 = _arg1; _local3 = ""; do { _local3 = (_local3 + ABC.charAt((_local2 % ABC.length))); _local2 = (_local2 / ABC.length); } while (_local2 != 0); while (_local3.length < 2) { _local3 = (_local3 + "A"); }; return (_local3); } } }//package RES.OBJECTS.UTILS
Section 174
//OArrayUtils (RES.OBJECTS.UTILS.OArrayUtils) package RES.OBJECTS.UTILS { import ENGINE.CORE.*; public class OArrayUtils { public static function CloneArray(_arg1:Array):Array{ var _local2:Array; var _local3:int; _local2 = new Array(); _local3 = 0; while (_local3 < _arg1.length) { if ((_arg1[_local3] is Array)){ _local2.push(CloneArray(_arg1[_local3])); } else { _local2.push(_arg1[_local3]); }; _local3++; }; return (_local2); } public static function ArrayToString(_arg1:Array, _arg2:int=0):String{ var _local3:String; var _local4:int; var _local5:int; _local3 = ""; _local4 = 0; while (_local4 < _arg2) { _local3 = (_local3 + "\t"); _local4++; }; _local3 = (_local3 + "["); _local5 = 0; while (_local5 < _arg1.length) { if ((_arg1[_local5] is Array)){ if (_local3.charAt((_local3.length - 1)) != "\n"){ _local3 = (_local3 + "\n"); }; _local3 = (_local3 + ArrayToString(_arg1[_local5], (_arg2 + 1))); if (_local5 < (_arg1.length - 1)){ _local3 = (_local3 + ","); }; if (_local3.charAt((_local3.length - 1)) != "\n"){ _local3 = (_local3 + "\n"); }; } else { if (_arg1[_local5] != null){ _local3 = (_local3 + _arg1[_local5].toString()); } else { _local3 = (_local3 + "null"); }; if (_local5 < (_arg1.length - 1)){ _local3 = (_local3 + ","); }; }; _local5++; }; if (_local3.charAt((_local3.length - 1)) == "\n"){ _local4 = 0; while (_local4 < _arg2) { _local3 = (_local3 + "\t"); _local4++; }; }; _local3 = (_local3 + "]"); return (_local3); } public static function MixArray(_arg1:Array, _arg2:int, _arg3:ORandomInt=null):void{ var _local4:int; var _local5:int; var _local6:int; var _local7:Object; _local4 = 0; while (_local4 < _arg2) { _local5 = 0; while (_local5 < _arg1.length) { _local6 = (_arg3) ? _arg3.RandVal(_arg1.length) : (Math.random() * _arg1.length); _local7 = _arg1[_local6]; _arg1[_local6] = _arg1[_local5]; _arg1[_local5] = _local7; _local5++; }; _local4++; }; } } }//package RES.OBJECTS.UTILS
Section 175
//OUniqueArray (RES.OBJECTS.UTILS.OUniqueArray) package RES.OBJECTS.UTILS { public dynamic class OUniqueArray extends Array { public function OUniqueArray(_arg1:int=0){ super(_arg1); } public function Add(_arg1:Object):Boolean{ if (this.indexOf(_arg1) == -1){ this.push(_arg1); } else { return (false); }; return (true); } public function Is(_arg1:Object):Boolean{ var _local2:int; _local2 = this.indexOf(_arg1); if (_local2 == -1){ return (false); }; return (true); } public function Remove(_arg1:Object):Boolean{ var _local2:int; _local2 = this.indexOf(_arg1); if (_local2 == -1){ return (false); }; this.splice(_local2, 1); return (true); } public function RemoveAt(_arg1:int):Object{ return (this.splice(_arg1, 1)[0]); } } }//package RES.OBJECTS.UTILS
Section 176
//OUniquePointsArray (RES.OBJECTS.UTILS.OUniquePointsArray) package RES.OBJECTS.UTILS { import flash.geom.*; public dynamic class OUniquePointsArray extends Array { public function OUniquePointsArray(_arg1:int=0){ super(_arg1); } public function Add(_arg1:Point):Boolean{ var _local2:Boolean; var _local3:int; var _local4:Point; if (this.length <= 0){ this.push(_arg1); return (true); }; _local2 = false; _local3 = 0; while (_local3 < this.length) { _local4 = this[_local3]; if (ComparePoint(_local4, _arg1)){ _local2 = true; break; }; _local3++; }; if (!_local2){ this.push(_arg1); return (true); }; return (false); } private function ComparePoint(_arg1:Point, _arg2:Point):Boolean{ return ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))); } public function Remove(_arg1:Point):Boolean{ var _local2:Boolean; var _local3:int; var _local4:Point; if (this.length <= 0){ return (false); }; _local2 = false; _local3 = 0; while (_local3 < this.length) { _local4 = this[_local3]; if (ComparePoint(_local4, _arg1)){ _local2 = true; break; }; _local3++; }; if (_local2){ this.splice(_local3, 1); return (true); }; return (false); } } }//package RES.OBJECTS.UTILS
Section 177
//CPrototypeFactory (RES.OBJECTS.CPrototypeFactory) package RES.OBJECTS { import ENGINE.DISPLAY.*; import flash.display.*; import RES.OBJECTS.DISPLAY.*; import ENGINE.CORE.*; import flash.filters.*; public class CPrototypeFactory { private static var fscale:Number = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; ; public static var aStars:Array; private static var iCellsIndex:int; public static var aLetters:Array; public static var aCells:Array; public static var aParticles:Array; private static var aAlphabet:Array; private static var filters:Array = [new DropShadowFilter((4 * fscale), 45, 0, 0.2), new BevelFilter((2 * fscale), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * fscale), (2 * fscale))]; public static var aSimpleCells:Array; public static function createSimpleCellsBitmaps(_arg1:int):void{ CPrototypeFactory.createStar(_arg1); } public static function createParticleBitmaps(_arg1:int):void{ var _local2:Sprite; var _local3:int; CPrototypeFactory.aParticles = new Array(); _local2 = OShapes.DrawPolyStar([GemzL.OTBSTAR, 50, 0, false, 10, 0, 6, 0]); _local2.filters = filters; _local3 = 0; while (_local3 < _arg1) { CPrototypeFactory.aParticles.push(OBitmap.MakeTmp(_local2, 1, 0, 0)); _local3++; }; } private static function createStar(_arg1:int):void{ } public static function createBitmaps(_arg1:int):void{ CPrototypeFactory.createParticleBitmaps(_arg1); } } }//package RES.OBJECTS
Section 178
//OInfoObject (RES.OBJECTS.OInfoObject) package RES.OBJECTS { import flash.events.*; import ENGINE.INTERFACE.*; public class OInfoObject extends OIObject { public function OInfoObject(_arg1:Array, _arg2:Array=null){ super(_arg1, _arg2); } override public function OnPress(_arg1:Event, _arg2):void{ (this.parent as OIObject).OnPress(_arg1, _arg2); } } }//package RES.OBJECTS
Section 179
//OWChoosePlayer (RES.WINDOWS.OWChoosePlayer) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; public class OWChoosePlayer extends ODialog { private var iCursor:OBitmap; public var iCancel:OButton; public var iDelete:OButton; public var iNew:OButton; private var isHand:Boolean;// = false private var iData; public var iListBox:OListBox; public var iAccept:OButton; private var iCurPlayer:String; public function OWChoosePlayer(){ isHand = false; super(GemzL.OWChoosePlayer); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); } override public function Init():void{ super.Init(); this.iData = GemzL.iGAME.prPlayersData; this.iCurPlayer = GemzL.iGAME.prPlayerName; this.iListBox.SetCurrentElement(GemzL.iGAME.prPlayerName, GemzL.iGAME.prPlayerNames); } override public function set prActive(_arg1:Boolean):void{ if (_arg1){ this.iListBox.SetCurrentElement(GemzL.iGAME.prPlayerName, GemzL.iGAME.prPlayerNames); }; super.prActive = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ if (!this.prMouseEnabled){ return; }; if (_arg2 == this.iNew){ (this.parent as OWindow).OnPress(null, GemzL.miEnterNewName); this.prActive = false; return; }; if (_arg2 == this.iDelete){ (this.parent as OWindow).OnPress(null, GemzL.miDeletePlayerConfirm); this.prActive = false; return; }; if (_arg2 == this.iCancel){ GemzL.iGAME.prPlayersData = this.iData; GemzL.iGAME.prPlayerName = this.iCurPlayer; (this.parent as OWindow).OnPress(null, GemzL.miMenu); this.prVisible = false; return; }; if (_arg2 == this.iAccept){ if (GemzL.iMP.isConnected){ GemzL.iMP.disconnect(); }; (this.parent as OWindow).OnPress(null, GemzL.miMenu); this.prVisible = false; return; }; if ((((_arg2 == this.iListBox)) && (!((GemzL.iGAME.prPlayerName == this.iListBox.prCurrentLBParam))))){ GemzL.iGAME.prPlayerName = this.iListBox.prCurrentLBParam; return; }; } override public function Free():void{ this.iListBox = null; this.iNew = null; this.iDelete = null; this.iAccept = null; this.iCancel = null; super.Free(); } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursor.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; this.iCursor.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } } }//package RES.WINDOWS
Section 180
//OWEnterName (RES.WINDOWS.OWEnterName) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; public class OWEnterName extends ODialog { private var iCursor:OBitmap; public var iCancel:OButton; private var iHasCancel:Boolean; private var isHand:Boolean;// = false public var iName:OInput; public var iAccept:OButton; public function OWEnterName(_arg1:Boolean=true){ isHand = false; this.iHasCancel = _arg1; super(GemzL.OWEnterName); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); } override public function Init():void{ super.Init(); this.iName.prText = (GemzL.iGAME.prPlayerName) ? GemzL.iGAME.prPlayerName : ""; if (!this.iHasCancel){ this.iCancel.visible = false; this.iAccept.prX = 170; }; } public function set prName(_arg1:String):void{ this.iName.prText = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:String; if (!this.prMouseEnabled){ return; }; if (_arg2 == this.iCancel){ this.prVisible = false; return; }; if (_arg2 == this.iAccept){ _local3 = OUtils.ClearString(this.iName.prText.toUpperCase()); if (_local3.length > 0){ GemzL.iGAME.prPlayerName = _local3; this.prVisible = false; } else { this.iName.prText = ""; }; }; } override public function Free():void{ super.Free(); this.iName = null; this.iAccept = null; this.iCancel = null; } public function get prName():String{ return (this.iName.prText); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); SetNameFocus(); } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursor.Clear(); iCursor.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; iCursor.Clear(); this.iCursor.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } private function SetNameFocus():void{ if (!this.stage){ return; }; if (this.stage.focus == this.iName.iText){ return; }; this.iName.iText.setSelection(this.iName.iText.length, this.iName.iText.length); this.stage.focus = this.iName.iText; } } }//package RES.WINDOWS
Section 181
//OWGame (RES.WINDOWS.OWGame) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.DISPLAY.*; import RES.OBJECTS.GRAPHICS.*; import RES.OBJECTS.PLAYRECORD.*; import ENGINE.GAME.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; import ENGINE.SMARTFOX.*; import ENGINE.AD.*; import RES.OBJECTS.LEVELS.*; import RES.OBJECTS.*; public class OWGame extends OWindow { private const iScale:Number; private const cConnectTime:int = 10000; private const cBonusScore:int = 200; private var iGame:OGField; private var isFailed:Boolean;// = false public var iScoreCounter:OCounter; public var iAllSpr:OSprite; private var iITimer:int; private var iExplode:OExplode; private var iNameO:String; private var iInfoP:OWInfoPanel; private var iLevelVal:int; public var iLevel:OIObject; public var iScoreCounterO:OCounter; private var iPlayer:OPlayRecord; private var iInfo:OIObject; private var isHand:Boolean;// = false public var iLevelCounter:OCounter; private var iExplode2:OExplode; private var iExplode1:OExplode; private var iOppEndGame:Boolean; public var iInvisLink:OButton; private var iDAlpha:Number;// = 0.025 public var iGameName:OIObject; private var iCursor:OBitmap; private var iMultiPlayer:Boolean; public var iSite:OIObject; public var iMenu:OButton; private var iRNDIndex:int; public var iScore:OIObject; private var iSaveKoef:Number;// = 0.5 private var iGameO:OGField; private var prRecordO:String; public var iScoreO:OIObject; public static const stExplode:int = 11; public static const stStart:int = 4; public static const stLevelComplete:int = 6; public static const stPause:int = 9; public static const stShow:int = 0; public static const stLevelNotComplete:int = 7; public static const stShowResults:int = 8; public static const stPlay:int = 5; public static const stGameFieldHide:int = 10; public static const stGoToPlay:int = 1; public static const stLoadLevel:int = 3; public static const stConnection:int = 2; public function OWGame(){ iScale = (0.6 * OGlobal.Scale); iDAlpha = 0.025; iSaveKoef = 0.5; isFailed = false; isHand = false; super(GemzL.OWGame, ODialog.iDefAnimators); } private function get prGameIndex():int{ var _local1:int; _local1 = iRNDIndex; return (_local1); } private function AddAllSpr():void{ this.iAllSpr = new OSprite(); this.iAllSpr.height = 600; this.iAllSpr.width = 800; this.iAllSpr.hitArea = this.iAllSpr; this.addChild(this.iAllSpr); this.setChildIndex(iCursor, (numChildren - 1)); this.addEventListener(MouseEvent.CLICK, OnClick); } private function SplashInfoMessage():Boolean{ var _local1:Boolean; _local1 = false; if (this.iInfo.prAnimation){ return (false); }; this.iInfo.alpha = (this.iInfo.alpha + this.iDAlpha); if ((((this.iDAlpha > 0)) && ((this.iInfo.alpha >= 1)))){ this.iInfo.alpha = 1; this.iDAlpha = (this.iDAlpha * -1); }; if ((((this.iDAlpha < 0)) && ((this.iInfo.alpha <= 0)))){ this.iInfo.alpha = 0; this.iDAlpha = (this.iDAlpha * -1); _local1 = true; }; return (_local1); } override public function Free():void{ this.removeEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); super.Free(); if (iPlayer){ iPlayer.Free(); iPlayer = null; }; } private function OnKeyDown(_arg1:KeyboardEvent):void{ switch (this.State){ case stLevelComplete: case stLevelNotComplete: this.State = stGameFieldHide; break; }; } 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, (300 - (this.iInfo.prHeight / 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:Boolean; var _local4:Array; if (iGame){ iGame.onEnterFrame(); if (iScoreCounter.prValue != iGame.Score){ iScoreCounter.prValue = iGame.Score; }; }; if (((iMultiPlayer) && (iGameO))){ iGameO.onEnterFrame(); if (iScoreCounterO.prValue != iGameO.Score){ iScoreCounterO.prValue = iGameO.Score; }; }; switch (this.iState){ case stExplode: iExplode.onEnterFrame(); iExplode1.onEnterFrame(); iExplode2.onEnterFrame(); if (iExplode.Done){ this.State = stGameFieldHide; }; break; case stLevelComplete: if (((iMultiPlayer) && (!(iOppEndGame)))){ if (((((iPlayer) && ((iGameO.State == OGField.stComplete)))) || ((iGameO.State == OGField.stNotComplete)))){ iInfoP.prScore = iScoreCounterO.prValue; if (iGameO.State == OGField.stComplete){ iInfoP.State = OWInfoPanel.stCompleteLevel; } else { iInfoP.State = OWInfoPanel.stFailedLevel; }; iGameO.prVisible = false; iScoreCounterO.prVisible = false; iScoreO.prVisible = false; iOppEndGame = true; }; }; break; case stShow: if (!this.prAnimation){ this.State = stConnection; }; break; case stGoToPlay: if (!this.iInfo.prVisible){ this.AddInfo(null); this.State = stConnection; }; break; case stConnection: _local2 = getTimer(); _local3 = this.SplashInfoMessage(); if (((((_local2 - this.iITimer) > cConnectTime)) && (_local3))){ this.State = stStart; }; if (((((_local2 - this.iITimer) > 2000)) && ((GemzL.iMP.State == OMultiplayer.stInZone)))){ this.State = stLoadLevel; }; break; case stLoadLevel: _local3 = this.SplashInfoMessage(); if (((_local3) && (GemzL.iMP.prOpponentTurn))){ _local4 = GemzL.iMP.prOpponentTurn.split(","); if (_local4.length > 2){ this.State = stStart; break; }; iMultiPlayer = !((((_local4[0] == "none")) && ((_local4[1] == "none")))); this.prRecordO = ((((_local4[0] == "none")) && ((_local4[1] == "none")))) ? null : _local4[1]; this.iNameO = (this.prRecordO) ? _local4[0] : null; this.State = stStart; }; if ((getTimer() - this.iITimer) >= cConnectTime){ this.State = stStart; }; break; case stStart: if ((getTimer() - iITimer) > 2000){ this.State = stPlay; }; break; case stPlay: if (((iGame) && ((((iGame.State == OGField.stComplete)) || ((iGame.State == OGField.stNotComplete)))))){ if (iGame.State == OGField.stComplete){ GemzL.iGAME.Write(OGame.catTmp, "NewLevel", true); this.State = stLevelComplete; } else { GemzL.iGAME.Write(OGame.catTmp, "NewLevel", false); this.State = stLevelNotComplete; }; AddAllSpr(); }; if (((iMultiPlayer) && (!(iOppEndGame)))){ if (((((iPlayer) && ((iGameO.State == OGField.stComplete)))) || ((iGameO.State == OGField.stNotComplete)))){ iInfoP.prScore = iScoreCounterO.prValue; if (iGameO.State == OGField.stComplete){ iInfoP.prScore = this.iScoreCounterO.prValue; iInfoP.State = OWInfoPanel.stCompleteLevel; } else { iInfoP.prScore = this.iScoreCounterO.prValue; iInfoP.State = OWInfoPanel.stFailedLevel; }; iGameO.prVisible = false; iScoreCounterO.prVisible = false; iScoreO.prVisible = false; iOppEndGame = true; }; }; break; case stGameFieldHide: if (!iGame.prAnimation){ this.State = stShowResults; }; break; case stShowResults: if (((!(this.iInfo.prVisible)) && (!(this.iInfo.prAnimation)))){ this.State = stConnection; }; break; }; super.OnEnterFrame(_arg1); } public function OnMouseMove(_arg1:MouseEvent):void{ this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } override public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stShow: break; case stConnection: this.AddBanner(true, 800, 260); iLevelVal = (GemzL.iGAME.prLevel % OLevelsList.iLevelList.length); GemzL.iGAME.Start(); this.iRNDIndex = (((GemzL.iGAME.prGamesStartCount + GemzL.iGAME.prLevel) + GemzL.iGAME.prRNDFactor) % 10); GemzL.iMP.ClearOpponentTurn(true); this.iITimer = getTimer(); this.AddInfo(GemzS.ColorHeader(GemzL.OWGameConnection), true); if (GemzL.iMP.State == OMultiplayer.stInZone){ this.State = stLoadLevel; } else { if (GemzL.iMP.State != OMultiplayer.stConnection){ GemzL.iMP.State = OMultiplayer.stNone; GemzL.iMP.Init(GemzL.sDomain, GemzL.sServer, GemzL.sZone, GemzL.sXTName, GemzL.iGAME.prPlayerName); }; }; break; case stLoadLevel: GemzL.iMP.ClearOpponentTurn(true); GemzL.iMP.Turn(["rdl", iLevelVal, prGameIndex, GemzL.iGAME.prPlayerName]); this.iITimer = getTimer(); break; case stStart: iLevelCounter.prValue = (GemzL.iGAME.prLevel + 1); if (!this.iNameO){ GemzL.OWGameNewLevelWithHoutOpponent[5] = ((GemzL.strLevel + " # ") + (GemzL.iGAME.prLevel + 1).toString()); this.AddInfo(GemzS.ColorHeader(GemzL.OWGameNewLevelWithHoutOpponent), true); if (GemzL.iMP.State == OMultiplayer.stInZone){ iInfoP.State = OWInfoPanel.stUserNotFound; } else { iInfoP.State = OWInfoPanel.stConnect; }; } else { GemzL.OWGameNewLevel[0][5] = ((GemzL.strLevel + " # ") + (GemzL.iGAME.prLevel + 1).toString()); GemzL.OWGameNewLevel[2][5] = this.iNameO; this.AddInfo(OInterface.OIObjectMake(GemzL.OWGameNewLevelWithOpponent), true); iInfoP.prOpponent = this.iNameO; iInfoP.State = OWInfoPanel.stOpponent; }; if (this.contains(iCursor)){ this.setChildIndex(iCursor, (numChildren - 1)); } else { this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); }; iITimer = getTimer(); break; case stPlay: this.AddBanner(false); OSound.PlaySound(GemzL.OSBubbleBang02); this.AddInfo(null); NewGame(); SetVisibleGame(true); if (iMultiPlayer){ NewGameOpponent(); SetVisibleGameOpponent(true); }; break; case stLevelComplete: isFailed = false; GemzL.iGAME.Write(OGame.catTmp, "Score", iScoreCounter.prValue); GemzL.iGAME.Write(OGame.catTmp, "Bonus", (((iMultiPlayer) && (!((iGameO.State == OGField.stComplete))))) ? iScoreCounterO.prValue : 0); GemzL.iGAME.Write(OGame.catTmp, "Result", (iScoreCounter.prValue + (((iMultiPlayer) && (!((iGameO.State == OGField.stComplete))))) ? iScoreCounterO.prValue : 0)); GemzL.iMP.Turn(["wrl", iLevelVal, prGameIndex, GemzL.iGAME.prPlayerName, this.iGame.prRecord]); iITimer = getTimer(); this.AddInfo(OInterface.OIObjectMake(GemzL.OWGameCL), true); GemzL.iGAME.NextLevel(); OSound.PlaySound(GemzL.OSBubbleBang12); isFailed = false; break; case stLevelNotComplete: isFailed = true; GemzL.iGAME.Write(OGame.catTmp, "Score", iScoreCounter.prValue); GemzL.iGAME.Write(OGame.catTmp, "Bonus", 0); GemzL.iGAME.Write(OGame.catTmp, "Result", iScoreCounter.prValue); if (iScoreCounter.prValue != 0){ GemzL.iMP.Turn(["wrl", iLevelVal, prGameIndex, GemzL.iGAME.prPlayerName, this.iGame.prRecord]); }; iITimer = getTimer(); this.AddInfo(OInterface.OIObjectMake(GemzL.OWGameNCL), true); isFailed = true; OSound.PlaySound(GemzL.OSBubbleBang14); break; case stGameFieldHide: SetVisibleGame(false); if (iMultiPlayer){ SetVisibleGameOpponent(false); }; if (this.iInfo.prVisible){ this.iInfo.prVisible = false; }; break; case stShowResults: this.removeChild(iCursor); this.AddInfo(new OWResults(isFailed)); break; }; } private function OnClick(_arg1:MouseEvent):void{ var _local2:OBitmap; switch (this.State){ case stLevelComplete: this.iInfo.SetVisible(false); _local2 = GemzS.TextureHeader(GemzL.OWGameCompletedLevel[2]); iExplode = new OExplode(_local2, 10, 5, 40); _local2 = GemzS.TextureHeader(GemzL.OWGameCompletedLevel[1]); iExplode1 = new OExplode(_local2, 10, 5, 40); _local2 = GemzS.TextureHeader(GemzL.OWGameCompletedLevel[0]); iExplode2 = new OExplode(_local2, 10, 5, 40); this.addChild(iExplode); this.addChild(iExplode1); this.addChild(iExplode2); iExplode.prX = GemzL.OWGameCompletedLevel[2][5]; iExplode.prY = 250; iExplode1.prX = GemzL.OWGameCompletedLevel[1][5]; iExplode1.prY = 230; iExplode1.prX = GemzL.OWGameCompletedLevel[0][5]; iExplode1.prY = 270; this.State = stExplode; break; case stLevelNotComplete: this.iInfo.SetVisible(false); _local2 = GemzS.TextureHeader(GemzL.OWGameNotCompletedLevel[2]); iExplode = new OExplode(_local2, 10, 5, 40); _local2 = GemzS.TextureHeader(GemzL.OWGameNotCompletedLevel[1]); iExplode1 = new OExplode(_local2, 10, 5, 40); _local2 = GemzS.TextureHeader(GemzL.OWGameNotCompletedLevel[0]); iExplode2 = new OExplode(_local2, 10, 5, 40); this.addChild(iExplode); this.addChild(iExplode1); this.addChild(iExplode2); iExplode.prX = GemzL.OWGameNotCompletedLevel[2][5]; iExplode.prY = 250; iExplode1.prX = GemzL.OWGameNotCompletedLevel[1][5]; iExplode1.prY = 230; iExplode1.prX = GemzL.OWGameNotCompletedLevel[0][5]; iExplode1.prY = 270; this.State = stExplode; break; }; this.removeChild(this.iAllSpr); this.removeEventListener(MouseEvent.CLICK, OnClick); } private function AddBanner(_arg1:Boolean, _arg2:int=0, _arg3:int=0):void{ if (GemzL.sDebug == true){ return; }; if (_arg1){ OAdBanners.AddTBanner(this, 0, 0, _arg2, _arg3); OAdBanners.AddBBanner(this, 0, (600 - _arg3), _arg2, _arg3); } else { OAdBanners.RemoveTBanner(this); OAdBanners.RemoveBBanner(this); }; } private function NewGameOpponent():void{ if (iGameO){ iPlayer.Free(); iPlayer = null; this.removeChild(iGameO); iGameO.Free(); iGameO = null; }; iScoreCounterO.prValue = 0; iGameO = new OGField([OLevelsList.iLevelList[iLevelVal], [250, 250], prSeed, true]); iPlayer = new OPlayRecord(iGameO, prRecordO); iGameO.prPlayRecord = iPlayer; this.addChild(iGameO); iGameO.Pos(533, 110); iOppEndGame = false; iGameO.mouseChildren = false; this.setChildIndex(iCursor, (this.numChildren - 1)); } override public function Init():void{ super.Init(); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursorHand()); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); CPrototypeFactory.createParticleBitmaps(1); this.iInfoP = new OWInfoPanel(); this.iInfoP.Pos(530, 20); this.iInfoP.prVisible = false; this.addChild(this.iInfoP); this.State = stShow; this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); } override public function set prActive(_arg1:Boolean):void{ if (_arg1){ this.State = stShow; }; super.prActive = _arg1; } private function SetVisibleGameOpponent(_arg1:Boolean):void{ if (iGameO){ iGameO.prVisible = _arg1; }; if (iScoreO){ iScoreO.prVisible = _arg1; }; if (iScoreCounterO){ iScoreCounterO.prVisible = _arg1; }; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iMenu){ if (this.iState > stPlay){ return; }; if (GemzL.iMP.State == OMultiplayer.stInGame){ GemzL.iMP.State = OMultiplayer.stJoinMainRoom; }; this.iState = stPause; (this.parent as OWindow).OnPress(null, GemzL.miMenu); this.SetVisible(false); return; }; if (_arg2 == iInvisLink){ navigateToURL(new URLRequest(GemzL.strConnect2URL)); return; }; } private function NewGame():void{ if (iGame){ this.removeChild(iGame); iGame.Free(); iGame = null; }; if (iGameO){ iPlayer.Free(); iPlayer = null; this.removeChild(iGameO); iGameO.Free(); iGameO = null; }; iScoreCounter.prValue = 0; iScoreCounterO.prValue = 0; iGame = null; iGame = new OGField([OLevelsList.iLevelList[iLevelVal], [500, 500], prSeed, false]); iGame.Pos(16, 50); this.addChild(iGame); this.setChildIndex(iCursor, (this.numChildren - 1)); } private function get prSeed():int{ return ((iRNDIndex + 1)); } private function OnClickSite(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(GemzL.strConnect2URL)); } private function SetVisibleGame(_arg1:Boolean):void{ if (iGame){ iGame.prVisible = _arg1; }; if (iGameName){ iGameName.prVisible = _arg1; }; if (iSite){ iSite.prVisible = _arg1; }; if (iMenu){ iMenu.prVisible = _arg1; }; if (iLevel){ iLevel.prVisible = _arg1; }; if (iLevelCounter){ iLevelCounter.prVisible = _arg1; }; if (iScore){ iScore.prVisible = _arg1; }; if (iScoreCounter){ iScoreCounter.prVisible = _arg1; }; if (iInfoP){ iInfoP.prVisible = _arg1; }; } private function ScoreCalc(_arg1:Number):int{ return ((_arg1 * (50 + (iLevelVal * 10)))); } } }//package RES.WINDOWS
Section 182
//OWHighScores (RES.WINDOWS.OWHighScores) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; import ENGINE.CORE.*; public class OWHighScores extends ODialog { private var iCursor:OBitmap; public var iType:OListBox; public var iClose:OButton; public var iPublish:OButton; public var iClear:OButton; public var iGlobal:OButton; private var isHand:Boolean;// = false public var iTable:OTab; public function OWHighScores(){ var _local1:OScoreParams; var _local2:int; isHand = false; _local2 = 0; while (_local2 < 5) { _local1 = GemzL.iGAME.GetLocalScores(0, _local2); GemzL.OWHighScoreLocal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : ""; GemzL.OWHighScoreLocal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : ""; _local1 = GemzL.iGAME.GetPersonalScores(0, _local2); GemzL.OWHighScorePersonal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : ""; GemzL.OWHighScorePersonal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : ""; _local2++; }; super(GemzL.OWHighScores); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); } override public function set prActive(_arg1:Boolean):void{ var _local2:OScoreParams; if (_arg1){ _local2 = GemzL.iGAME.GetLocalScores(0, 0); if (!_local2){ (iTable.getChildAt(0) as OSprite).Free(); }; _local2 = GemzL.iGAME.GetPersonalScores(0, 0); if (!_local2){ (iTable.getChildAt(1) as OSprite).Free(); }; }; super.prActive = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iClose){ this.prVisible = false; return; }; if (_arg2 == this.iType){ this.iTable.prValue = this.iType.prCurrentInd; return; }; if (_arg2 == this.iClear){ (this.parent as OWindow).OnPress(null, GemzL.miDeleteScoresConfirm); this.prActive = false; return; }; (this.parent as OWindow).OnPress(null, GemzL.miCommingSoon); this.prActive = false; } override public function Free():void{ this.iType = null; this.iTable = null; this.iGlobal = null; this.iPublish = null; this.iClear = null; this.iClose = null; super.Free(); } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursor.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; this.iCursor.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } } }//package RES.WINDOWS
Section 183
//OWInfoPanel (RES.WINDOWS.OWInfoPanel) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import flash.utils.*; import flash.net.*; import RES.OBJECTS.*; public class OWInfoPanel extends OIObject { private const iShowDelay:int = 30000; private var iTimer:int; private var iMode:int; private var iInfo:OInfoObject; private var iScore:int; private var iOpponent:String; public static const stFailedLevel:int = 7; public static const stConnect:int = 1; public static const stEndLevel:int = 5; public static const stCompleteLevel:int = 6; public static const stInGame:int = 3; public static const stNone:int = 0; public static const stUserNotFound:int = 2; public static const stOpponent:int = 4; public function OWInfoPanel(){ super(null, OInterface.iDefAnimators); } public function set prOpponent(_arg1:String):void{ this.iOpponent = _arg1; } private function ShowConnect():void{ switch ((this.iMode % 3)){ case 0: GemzL.OWInfoPConnect[0][5] = GemzL.strConnect1; GemzL.OWInfoPConnect[1][6] = GemzL.strPlayOnline1; break; case 1: GemzL.OWInfoPConnect[0][5] = GemzL.strConnect2; GemzL.OWInfoPConnect[1][6] = GemzL.strMoreGames1; break; case 2: GemzL.OWInfoPConnect[0][5] = GemzL.strConnect3; GemzL.OWInfoPConnect[1][6] = GemzL.strSendMail; break; }; this.InitObject(GemzL.OWInfoPConnect); } private function ShowUserNotFound():void{ var _local1:String; var _local2:Array; var _local3:Array; _local1 = GemzL.iMP.prOpponentTurn; GemzL.iMP.ClearOpponentTurn(true); GemzL.iMP.Turn(["rdr"]); if (_local1){ _local2 = _local1.split(/,/); if (_local2.length == 2){ return; }; }; switch ((this.iMode % 5)){ case 0: GemzL.OWInfoPUserNotFound[0][5] = GemzL.iMP.prUsersCount; GemzL.OWInfoPUserNotFound[0][7] = 200; GemzL.OWInfoPUserNotFound[1][7] = (GemzL.OWInfoPUserNotFound[0][7] + 30); GemzL.OWInfoPUserNotFound[1][5] = GemzL.strPlayersOnline1; break; default: if (!_local1){ return; }; _local3 = _local1.split(/,/); GemzL.OWInfoPUserNotFound[0][5] = ((int(_local3[0]) + 1).toString() + GemzL.strPlace); GemzL.OWInfoPUserNotFound[0][7] = 180; GemzL.OWInfoPUserNotFound[1][7] = (GemzL.OWInfoPUserNotFound[0][7] + 30); GemzL.OWInfoPUserNotFound[1][5] = ((_local3[1] + GemzL.strHasReiting) + _local3[2]); break; }; this.InitObject(GemzL.OWInfoPUserNotFound); } override public function Init():void{ super.Init(); } public function set prScore(_arg1:int):void{ this.iScore = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:String; var _local4:URLRequest; switch ((this.iMode % 3)){ case 0: _local3 = GemzL.strConnect1URL; break; case 1: _local3 = GemzL.strConnect2URL; break; case 2: _local3 = GemzL.strConnect3URL; break; }; _local4 = new URLRequest(_local3); navigateToURL(_local4); } override public function Free():void{ this.iInfo = null; super.Free(); } private function InitObject(_arg1:Array):void{ if (this.iInfo){ this.removeChild(this.iInfo); this.iInfo.Free(); this.iInfo = null; }; if (!_arg1){ return; }; this.iInfo = new OInfoObject(_arg1, OInterface.iDefSlowAnimators); this.addChild(this.iInfo); this.iInfo.SetVisible(false); this.iInfo.prVisible = true; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; super.OnEnterFrame(_arg1); switch (this.iState){ case stConnect: _local2 = getTimer(); if ((_local2 - this.iTimer) >= iShowDelay){ this.iMode++; this.ShowConnect(); this.iTimer = _local2; }; break; case stUserNotFound: _local2 = getTimer(); if ((_local2 - this.iTimer) >= iShowDelay){ this.iMode++; this.ShowUserNotFound(); this.iTimer = _local2; }; break; }; } override public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stNone: this.InitObject(null); break; case stConnect: this.iMode = 0; this.ShowConnect(); this.iTimer = getTimer(); break; case stUserNotFound: this.iMode = 0; this.ShowUserNotFound(); this.iTimer = getTimer(); break; case stInGame: GemzL.OWInfoP[0][3] = 30; GemzL.OWInfoP[0][5] = ((((GemzL.strOpponent1 + "\n\n") + this.iOpponent) + "\n") + GemzL.strOpponent2); this.InitObject(GemzL.OWInfoP); this.iTimer = getTimer(); break; case stOpponent: GemzL.OWInfoPPlayer[1][5] = this.iOpponent; this.InitObject(GemzL.OWInfoPPlayer); break; case stEndLevel: GemzL.OWInfoP[0][3] = 30; GemzL.OWInfoP[0][6] = 240; GemzL.OWInfoP[0][5] = ((this.iOpponent + GemzL.strLevelScore) + this.iScore); this.InitObject(GemzL.OWInfoP); this.iTimer = getTimer(); break; case stCompleteLevel: GemzL.OWInfoP[0][5] = (this.iOpponent + GemzL.strCompleteLevel); GemzL.OWInfoP[1][5] = this.iScore.toString(); GemzL.OWInfoP[1][7] = 350; this.InitObject(GemzL.OWInfoP); this.iTimer = getTimer(); break; case stFailedLevel: GemzL.OWInfoP[0][5] = (this.iOpponent + GemzL.strFailedLevel); GemzL.OWInfoP[1][5] = ("\n" + this.iScore.toString()); GemzL.OWInfoP[1][7] = 350; this.InitObject(GemzL.OWInfoP); this.iTimer = getTimer(); break; }; } } }//package RES.WINDOWS
Section 184
//OWIntro (RES.WINDOWS.OWIntro) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.DISPLAY.*; import ENGINE.CORE.*; import flash.filters.*; public class OWIntro extends OWindow { public var iBlurFilter:BlurFilter; private var iBlurs:Array; private var iCursor:OBitmap; private var iExplode:OExplode; public var iHeader:OBitmap; private var iTimer:Number; public var iHit:OSprite; public var iFooter:OBitmap; private var iAlpha:Array; private var isHand:Boolean;// = false public var iName:Array; private var iExplode2:OExplode; public static var stShowFooter:int = 2; public static var stHide:int = 5; public static var stNormal:int = 4; public static var stShowName:int = 3; public static var stShowHeader:int = 1; public static var stInvisible:int = 6; public static var stBlurAll:int = 7; public static var stBeforeShow:int = 0; public function OWIntro(){ isHand = false; super(GemzL.OWIntroParam); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); } override public function Init():void{ var _local1:int; var _local2:Number; var _local3:int; this.iName = new Array(); super.Init(); this.iHeader.alpha = 0; this.iFooter.alpha = 0; _local1 = this.iName.length; this.iAlpha = new Array(_local1); this.iBlurs = new Array(_local1); _local2 = (300 - (this.iName[0].prHeight / 2)); _local3 = 0; while (_local3 < _local1) { this.iName[_local3].prY = _local2; this.iName[_local3].alpha = 0; _local3++; }; _local3 = 0; while (_local3 < _local1) { this.iBlurs[_local3] = (30 + (50 * Math.random())); _local3++; }; this.hitArea = this.iHit; this.State = stBeforeShow; iBlurFilter = new BlurFilter(0, 0); } override public function Free():void{ super.Free(); this.iHeader = null; this.iFooter = null; this.iName = null; } public function initBlur():void{ this.iBlurFilter.blurX = 40; this.iBlurFilter.blurY = 40; } override public function OnMouseDown(_arg1:MouseEvent):void{ if (this.iState < OWIntro.stShowFooter){ return; }; this.prVisible = false; super.OnMouseDown(_arg1); } override public function OnEnterFrame(_arg1:Event):void{ var _local2:Boolean; var _local3:int; switch (this.iState){ case stBeforeShow: if (this.iTimer-- <= 0){ this.State = stShowHeader; }; break; case stShowHeader: if (iBlurFilter.blurX <= 0){ this.State = stShowFooter; this.iHeader.filters = null; return; }; iBlurFilter.blurX = (iBlurFilter.blurX - 1); iBlurFilter.blurY = (iBlurFilter.blurY - 1); this.iHeader.filters = [iBlurFilter]; break; case stShowFooter: if (iBlurFilter.blurX <= 0){ this.State = stShowName; this.iFooter.filters = null; return; }; iBlurFilter.blurX = (iBlurFilter.blurX - 1); iBlurFilter.blurY = (iBlurFilter.blurY - 1); this.iFooter.filters = [iBlurFilter]; break; case stShowName: _local2 = true; _local3 = 0; while (_local3 < this.iName.length) { if (this.iBlurs[_local3] <= 0){ this.iBlurs[_local3] = 0; }; if (this.iBlurs[_local3] != 0){ this.iBlurs[_local3] = (this.iBlurs[_local3] - 1); iBlurFilter.blurY = this.iBlurs[_local3]; _local2 = false; this.iName[_local3].filters = [iBlurFilter]; }; _local3++; }; if (_local2){ this.State = stNormal; }; break; case stNormal: if (this.iTimer-- <= 0){ this.State = stBlurAll; }; break; case stBlurAll: iExplode.onEnterFrame(); iExplode2.onEnterFrame(); if (iExplode.Done){ this.State = stHide; }; break; case stHide: alpha = (alpha - 0.09); if (alpha <= 0){ this.prVisible = false; }; break; }; } public function OnMouseMove(_arg1:MouseEvent):void{ this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } override public function set State(_arg1:int):void{ var _local2:*; this.iState = _arg1; switch (this.iState){ case stBeforeShow: this.iTimer = 20; break; case stNormal: this.iTimer = 100; break; case stInvisible: this.prVisible = false; break; case stShowHeader: initBlur(); this.iHeader.alpha = 1; this.iHeader.filters = [iBlurFilter]; break; case stShowFooter: initBlur(); this.iFooter.alpha = 1; this.iFooter.filters = [iBlurFilter]; break; case stShowName: for each (_local2 in this.iName) { _local2.alpha = 1; }; break; case stHide: break; case stBlurAll: iBlurFilter.blurX = 0; iBlurFilter.blurY = 0; this.iExplode = new OExplode(this.iHeader, 10, 5, 40); this.iExplode.prX = ((800 - iExplode.prWidth) / 2); this.addChild(iExplode); this.iHeader.prVisible = false; iExplode2 = new OExplode(this.iFooter, 10, 5, 40); iFooter.prVisible = false; iExplode2.prX = ((800 - iFooter.prWidth) / 2); this.addChild(iExplode2); break; }; } } }//package RES.WINDOWS
Section 185
//OWMenu (RES.WINDOWS.OWMenu) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import flash.utils.*; import flash.net.*; import ENGINE.SMARTFOX.*; public class OWMenu extends ODialog { public var iPlayers:OIObject; public var iMoreGames:OButton; public var iOptions:OButton; public var iBName:OButton; public var iGameName:OIObject; private var iCursor:OBitmap; public var iCPlayers:OCounter; public var iTimer:int; public var iPlayOnlineStrategy:OButton; private var isHand:Boolean;// = false public var iHighScores:OButton; public var iInstructions:OButton; public var iInfo:OIObject; public function OWMenu(){ isHand = false; super(GemzL.OWMenu); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); } override public function set prVisible(_arg1:Boolean):void{ super.prVisible = _arg1; } override public function Init():void{ GemzL.OWMenu[0][5] = ((GemzL.strWelcome + " ") + GemzL.iGAME.prPlayerName); super.Init(); if (GemzL.iMP.prUsersCount == 0){ this.iPlayers.prAnimationEnabled = false; this.iPlayers.prVisible = false; this.iPlayers.prAnimationEnabled = true; this.iCPlayers.prAnimationEnabled = false; this.iCPlayers.prVisible = false; this.iPlayers.prAnimationEnabled = true; }; this.iCPlayers.prAnimationEnabled = false; this.iCPlayers.prValue = GemzL.iMP.prUsersCount; this.iPlayers.prAnimationEnabled = true; this.iCPlayers.Pos((this.iPlayOnlineStrategy.prX + 20), this.iCPlayers.prY); this.iPlayers.Pos((this.iCPlayers.prX + 90), this.iPlayers.prY); this.ShowUserReiting(true); } override public function set prActive(_arg1:Boolean):void{ super.prActive = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iBName){ (this.parent as OWindow).OnPress(null, GemzL.miChoosePlayer); this.prVisible = false; return; }; if (_arg2 == this.iPlayOnlineStrategy){ (this.parent as OWindow).OnPress(null, GemzL.miGameMP); GemzL.GameType = GemzL.STRATEGY; this.prVisible = false; return; }; if (_arg2 == this.iOptions){ (this.parent as OWindow).OnPress(null, GemzL.miOptions); this.prActive = false; return; }; if (_arg2 == this.iInstructions){ (this.parent as OWindow).OnPress(null, GemzL.miInstructions); this.prActive = false; return; }; if (_arg2 == this.iHighScores){ (this.parent as OWindow).OnPress(null, GemzL.miHighScores); this.prActive = false; return; }; if (_arg2 == this.iMoreGames){ navigateToURL(new URLRequest(GemzL.sURLSite)); return; }; (this.parent as OWindow).OnPress(null, GemzL.miCommingSoon); this.prActive = false; } override public function Free():void{ this.iBName = null; this.iGameName = null; this.iCPlayers = null; this.iPlayers = null; this.iPlayOnlineStrategy = null; this.iOptions = null; this.iInstructions = null; this.iHighScores = null; this.iMoreGames = null; super.Free(); } private function InitObject(_arg1:Array):void{ if (this.iInfo){ this.removeChild(this.iInfo); this.iInfo.Free(); this.iInfo = null; }; if (!_arg1){ return; }; this.iInfo = new OIObject(_arg1, OInterface.iDefSlowAnimators); this.addChild(this.iInfo); this.iInfo.SetVisible(false); this.iInfo.prVisible = true; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; if (this.iCPlayers.prValue != GemzL.iMP.prUsersCount){ if (GemzL.iMP.prUsersCount > 0){ if (!this.iPlayers.prVisible){ this.iCPlayers.prVisible = true; this.iPlayers.prVisible = true; }; } else { if (this.iPlayers.prVisible){ this.iCPlayers.prVisible = false; this.iPlayers.prVisible = false; }; }; this.iCPlayers.prValue = GemzL.iMP.prUsersCount; }; _local2 = getTimer(); if ((_local2 - this.iTimer) > 30000){ ShowUserReiting(false); }; super.OnEnterFrame(_arg1); } private function ShowUserReiting(_arg1:Boolean):void{ var _local2:String; var _local3:Array; if (_arg1){ GemzL.iMP.ClearOpponentTurn(true); GemzL.OWMenuReiting[0][5] = ((GemzL.iGAME.prPlayerName + GemzL.strReiting2) + GemzL.iGAME.prScore.toString()); this.InitObject(GemzL.OWMenuReiting); }; this.iTimer = getTimer(); if (GemzL.iMP.State != OMultiplayer.stInZone){ return; }; _local2 = GemzL.iMP.prOpponentTurn; GemzL.iMP.ClearOpponentTurn(true); GemzL.iMP.Turn(["rdr"]); if (!_local2){ return; }; _local3 = _local2.split(/,/); GemzL.OWMenuReiting[0][5] = (((((int(_local3[0]) + 1).toString() + GemzL.strReiting1) + _local3[1]) + GemzL.strReiting2) + _local3[2]); this.InitObject(GemzL.OWMenuReiting); } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursor.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; this.iCursor.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } } }//package RES.WINDOWS
Section 186
//OWOptions (RES.WINDOWS.OWOptions) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import flash.system.*; public class OWOptions extends ODialog { public var iResolution:OListBox; public var iFullScreen:OListBox; public var iSound:OListBox; private var iSResList:Array; private var iCursor:OBitmap; private var iSRes:Array; public var iCancel:OButton; public var iMusic:OListBox; private var isHand:Boolean;// = false public var iAccept:OButton; public function OWOptions(){ isHand = false; super(GemzL.OWOptions); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); } private function AddResolution(_arg1:int, _arg2:int):void{ if ((((_arg1 <= Capabilities.screenResolutionX)) && ((_arg2 <= Capabilities.screenResolutionY)))){ this.iSRes.push([_arg1, _arg2]); this.iSResList.push(((_arg1.toString() + " X ") + _arg2.toString())); }; } override public function Init():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:int; var _local5:int; var _local6:Number; super.Init(); this.iResolution.prVisible = false; this.iSound.prCurrentInd = int((GemzL.iGAME.prSoundVolume * 10)); this.iMusic.prCurrentInd = int((GemzL.iGAME.prMusicVolume * 10)); this.InitResolutions(); this.iResolution.prLBParams = this.iSResList; _local1 = OGlobal.prStage.stageWidth; _local2 = OGlobal.prStage.stageHeight; _local3 = 10000; _local4 = 0; _local5 = 0; while (_local5 < this.iSRes.length) { _local6 = (Math.abs((this.iSRes[_local5][0] - _local1)) + Math.abs((this.iSRes[_local5][1] - _local2))); if (_local6 < _local3){ _local4 = _local5; _local3 = _local6; }; _local5++; }; this.iResolution.prCurrentInd = _local4; this.iFullScreen.prCurrentInd = ((((OGlobal.prStage.stageWidth == Capabilities.screenResolutionX)) && ((OGlobal.prStage.stageHeight == Capabilities.screenResolutionY)))) ? 1 : 0; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iCancel){ this.prVisible = false; return; }; if (_arg2 == this.iAccept){ this.prVisible = false; GemzL.iGAME.prSoundVolume = (this.iSound.prCurrentInd / 10); GemzL.iGAME.prMusicVolume = (this.iMusic.prCurrentInd / 10); GemzL.iGAME.prResX = this.iSRes[this.iResolution.prCurrentInd][0]; GemzL.iGAME.prResY = this.iSRes[this.iResolution.prCurrentInd][1]; GemzL.iGAME.prFullScreen = (this.iFullScreen.prCurrentInd) ? true : false; fscommand("fullscreen", GemzL.iGAME.prFullScreen.toString()); return; }; } override public function Free():void{ this.iSound = null; this.iMusic = null; this.iResolution = null; this.iFullScreen = null; this.iAccept = null; this.iCancel = null; this.iSRes = null; this.iSResList = null; super.Free(); } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursor.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; this.iCursor.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } private function InitResolutions():void{ this.iSRes = new Array(); this.iSResList = new Array(); AddResolution(640, 480); AddResolution(800, 600); AddResolution(0x0400, 600); AddResolution(0x0400, 0x0300); AddResolution(0x0500, 0x0300); AddResolution(0x0500, 0x0400); AddResolution(Capabilities.screenResolutionX, Capabilities.screenResolutionY); } } }//package RES.WINDOWS
Section 187
//OWResults (RES.WINDOWS.OWResults) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; import ENGINE.CORE.*; import flash.utils.*; public class OWResults extends OAlert { private var iCursor:OBitmap; private var iTimer:Timer; private var isHand:Boolean;// = false private var iDelta:Number;// = 0.025 public function OWResults(_arg1:Boolean){ var _local2:int; var _local3:int; var _local4:int; iDelta = 0.025; isHand = false; _local2 = GemzL.iGAME.Read(OGame.catTmp, "Score"); GemzL.OWResultsLevelScore[1][5] = _local2.toString(); _local2 = GemzL.iGAME.Read(OGame.catTmp, "Bonus"); GemzL.OWResultsBonusScore[1][5] = _local2.toString(); _local2 = GemzL.iGAME.Read(OGame.catTmp, "Result"); GemzL.OWResultsTotalScore[1][5] = _local2.toString(); GemzL.iGAME.AddScore(_local2); GemzL.iGAME.AddScoreInTable(_local2); _local3 = GemzL.iGAME.prMode; GemzL.iGAME.prMode = 0; GemzL.iGAME.AddScore(_local2); GemzL.iGAME.AddScoreInTable(_local2); GemzL.iGAME.prMode = _local3; _local4 = GemzL.iGAME.prScore; GemzL.OWResultsRaiting[1][5] = _local4.toString(); GemzL.iMP.Turn(["wrr", GemzL.iGAME.prPlayerName, _local4]); if (_arg1){ GemzL.OWResults[5][6] = GemzL.strReplay; } else { GemzL.OWResults[5][6] = GemzL.strNextLevel; }; super(GemzL.OWResults, null); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); this.addChild(iCursor); iCursor.Pos((this.mouseX / OGlobal.Scale), (this.mouseY / OGlobal.Scale)); this.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); } override public function Init():void{ super.Init(); this.Pos(0, 0); this.iTimer = new Timer(500, 8); this.iTimer.addEventListener(TimerEvent.TIMER, OnTimer); this.iTimer.start(); } override public function Free():void{ this.iTimer.stop(); this.iTimer.removeEventListener(TimerEvent.TIMER, OnTimer); this.iTimer = null; super.Free(); } private function OnTimer(_arg1:TimerEvent):void{ switch (this.iTimer.currentCount){ case 1: (this.getChildAt(0) as OIObject).prVisible = true; break; case 2: (this.getChildAt(1) as OIObject).prVisible = true; OSound.PlaySound(GemzL.OSBubbleBang06); break; case 3: (this.getChildAt(2) as OIObject).prVisible = true; OSound.PlaySound(GemzL.OSBubbleBang06); break; case 4: (this.getChildAt(3) as OIObject).prVisible = true; OSound.PlaySound(GemzL.OSBubbleBang06); break; case 5: (this.getChildAt(4) as OIObject).prVisible = true; (this.getChildAt(5) as OIObject).prVisible = true; OSound.PlaySound(GemzL.OSBubbleBang06); break; }; } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursor.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; this.iCursor.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursor.prX = (this.mouseX / OGlobal.Scale); this.iCursor.prY = (this.mouseY / OGlobal.Scale); } } }//package RES.WINDOWS
Section 188
//Gemz (Gemz) package { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import RES.WINDOWS.*; import RES.OBJECTS.HOWTOPLAY.GRAHPICS.*; import ENGINE.SMARTFOX.*; import ENGINE.AD.*; import flash.ui.*; public class Gemz extends OApplication { private var iShow:Boolean;// = false private var iSystem:OSystem; private var iCursor:OBitmap; private var iWindow:OWindow; private var isHand:Boolean; public function Gemz(){ iShow = false; super("Gemz"); GemzL.iGAME; OSound.PlayListAdd("music.mp3"); OSound.PlayMusic(); OAdBanners.InitTBanner(GemzL.sTBannerPrefix, GemzL.sBannerID); OAdBanners.InitBBanner(GemzL.sBBannerPrefix, GemzL.sBannerID); } override protected function OnMenuItem():void{ var _local1:int; var _local2:DisplayObject; var _local3:OWHighScores; _local1 = this.prMenuItem; switch (_local1){ case GemzL.miNullWindow: return; case GemzL.miLastWindow: _local2 = this.getChildAt((this.numChildren - 1)); this.iWindow = ((_local2 is OWindow)) ? (_local2 as OWindow) : null; if (this.iWindow){ this.iWindow.prActive = true; return; }; this.iWindow = new OWMenu(); this.prMenuItem = GemzL.miNullWindow; break; case GemzL.miIntro: this.iWindow = new OWIntro(); iShow = false; if (GemzL.iGAME.prPlayerName == ""){ this.prMenuItem = GemzL.miEnterNameFirst; } else { this.prMenuItem = GemzL.miMenu; }; break; case GemzL.miEnterNameFirst: this.iWindow = new OWEnterName(false); iShow = false; this.prMenuItem = GemzL.miMenu; break; case GemzL.miEnterNewName: this.iWindow = new OWEnterName(true); (this.iWindow as OWEnterName).prName = ""; this.prMenuItem = GemzL.miLastWindow; iShow = false; break; case GemzL.miMenu: switch (GemzL.iMP.State){ case OMultiplayer.stNone: GemzL.iMP.Init(GemzL.sDomain, GemzL.sServer, GemzL.sZone, GemzL.sXTName, GemzL.iGAME.prPlayerName); break; case OMultiplayer.stConnectionError: if (GemzL.iMP.prErrorsCount < 5){ GemzL.iMP.State = OMultiplayer.stNone; GemzL.iMP.Init(GemzL.sDomain, GemzL.sServer, GemzL.sZone, GemzL.sXTName, GemzL.iGAME.prPlayerName); }; break; case OMultiplayer.stInGame: GemzL.iMP.State = OMultiplayer.stInZone; break; }; this.iWindow = new OWMenu(); this.prMenuItem = GemzL.miNullWindow; break; case GemzL.miCommingSoon: this.iWindow = new OAlert(GemzL.OWCommingSoon, null); this.prMenuItem = GemzL.miLastWindow; break; case GemzL.miChoosePlayer: this.iWindow = new OWChoosePlayer(); this.prMenuItem = GemzL.miMenu; break; case GemzL.miDeletePlayerConfirm: this.iWindow = new OAlert(GemzL.OWDeletePlayerConfirm, [GemzL.miDeletePlayer, GemzL.miLastWindow]); this.prMenuItem = GemzL.miLastWindow; iWindow.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); iWindow.addChild(iCursor); break; case GemzL.miDeletePlayer: GemzL.iGAME.DeletePlayer(GemzL.iGAME.prPlayerName); if (GemzL.iGAME.prPlayerName != ""){ this.OnMenuItem(); return; }; this.iWindow = new OWEnterName(false); this.prMenuItem = GemzL.miLastWindow; iWindow.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); iWindow.addChild(iCursor); break; case GemzL.miOptions: this.iWindow = new OWOptions(); this.prMenuItem = GemzL.miLastWindow; break; case GemzL.miHighScores: this.iWindow = new OWHighScores(); this.prMenuItem = GemzL.miLastWindow; break; case GemzL.miDeleteScoresConfirm: this.iWindow = new OAlert(GemzL.OWDeleteScoresConfirm, [GemzL.miDeleteScores, GemzL.miLastWindow]); this.prMenuItem = GemzL.miLastWindow; iWindow.addEventListener(MouseEvent.MOUSE_MOVE, OnMouseMove); iCursor = new OBitmap(); iCursor.CopyFrom(GemzS.CreateCursors()); iWindow.addChild(iCursor); break; case GemzL.miDeleteScores: _local3 = (this.getChildAt((this.numChildren - 1)) as OWHighScores); if (_local3.iTable.prValue == 0){ GemzL.iGAME.ClearLocalScores(0); } else { GemzL.iGAME.ClearPersonalScores(0); }; this.OnMenuItem(); return; case GemzL.miGameMP: if (((iShow) || ((GemzL.iGAME.prLevel > 0)))){ this.iWindow = new OWGame(); this.prMenuItem = GemzL.miMenu; } else { this.iWindow = new OWInstruction(GemzL.OWHowToPlay); iShow = true; this.prMenuItem = GemzL.miGameMP; }; break; case GemzL.miInstructions: this.iWindow = new OWInstruction(GemzL.OWHowToPlay); this.prMenuItem = GemzL.miLastWindow; break; }; this.addChild(this.iWindow); } override public function Init():void{ if (((((!(this.stage)) || ((this.stage.stageHeight == 0)))) || ((this.stage.stageWidth == 0)))){ return; }; this.InitBackground([GemzL.OBG02], 0); if (GemzL.sDebug){ this.iSystem = new OSystem(); this.addChild(this.iSystem); }; super.Init(); Mouse.hide(); this.prMenuItem = GemzL.miIntro; OnMenuItem(); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg1 == null){ this.prMenuItem = _arg2; }; } override protected function OnDeactivate(_arg1:Event):void{ GemzL.iGAME.SaveCache(); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); GemzL.iMP.OnEnterFrame(); if (GemzL.sDebug){ OSystem.iUserText1 = (((((((" : " + GemzL.iMP.State.toString()) + " : ") + GemzL.iMP.prActiveRoomID.toString()) + " ") + GemzL.iMP.prPlayerID.toString()) + " : ") + GemzL.iMP.prError); }; if (this.iWindow){ if (this.iWindow.prAnimation){ return; }; if (!this.iWindow.prVisible){ this.removeChild(this.iWindow); this.iWindow.Free(); this.iWindow = null; this.OnMenuItem(); } else { if (!this.iWindow.prActive){ this.OnMenuItem(); }; }; }; } public function OnMouseMove(_arg1:MouseEvent):void{ if ((((_arg1.target is OButton)) && (!(this.buttonMode)))){ this.buttonMode = true; isHand = true; iCursor.Clear(); iCursor.CopyFrom(GemzS.CreateCursorHand()); } else { if (((!((_arg1.target is OButton))) && (isHand))){ this.buttonMode = false; isHand = false; iCursor.Clear(); this.iCursor.CopyFrom(GemzS.CreateCursors()); }; }; this.iCursor.prX = (iWindow.mouseX / OGlobal.Scale); this.iCursor.prY = (iWindow.mouseY / OGlobal.Scale); } } }//package
Section 189
//GemzL (GemzL) package { import ENGINE.DISPLAY.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.GAME.*; import ENGINE.CORE.*; import ENGINE.SMARTFOX.*; public class GemzL { public static const strCancel:String = "Cancel"; public static const strHeader:String = "Collect the line of "; public static const miDeletePlayer:int = 9; public static const miDeleteScoresConfirm:int = 18; private static const OWSelectGameGameModeColor:Array = ["60", "30", "180", "70", "190", "220", "280", "100", "40", "150", "170", "250", "50", "260", "140", "330", "300", "350", "80", "120"]; public static const strDefPlayerName:String = "WELL"; public static const strResults1:String = "Results:"; public static const strPresents:String = "presents"; public static const miCommingSoon:int = 6; public static const strConnect1URL:String = "http://www.wellgames.com/free_online/Gemz/?g=Gemz"; public static const strResults:String = "Results"; public static const strVerticaly:String = "The line can be collected diagonally, horizontally or vertically"; public static const strBonusHeader:String = "Bonuses"; public static const strGoToPlay:String = "Go To Play"; public static const strChoosePlayer:String = "Choose a Player"; public static const sBBannerPrefix:String = "bottom/"; public static const strCommingSoon:String = "Coming Soon..."; public static const strNext:String = "Next"; public static const strConnect2URL:String = "http://www.wellgames.com/?g=Gemz"; public static const strInstructionsText:String = (("Move the figures to make the line of three or more of \n" + "the same color and form. Clear the playfield changing \n ") + "the colors of tiles from colored to white."); public static const miLastWindow:int = 1; public static const strFullScreen:String = "Full Screen"; private static const iWOptionsVolume:Array = [GemzL.strOff, "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]; public static const cFontName:String = "SkazkaForSerge"; public static const ARCADE:int = 2; public static const strSite:String = "WELLGAMES.COM"; public static const SQUARE:int = 0; public static const strNextLevel:String = "Next Level"; public static const miMenu:int = 5; public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/free_online/Gemz/?g=Gemz"; public static const strMoreGames:String = "More Games"; public static const strHorizontal:String = "The line can be collected diagonally, horizontally or vertically"; public static const strPlace:String = " Place"; public static const strPlayAgain:String = "Play Again"; public static const strSound:String = "Sound Volume"; public static const miOptions:int = 10; public static const sURLSite:String = "http://www.wellgames.com/?g=Gemz"; public static const miDeleteScores:int = 19; public static const strNewPlayer:String = "NEW PLAYER!"; public static const strHighScores:String = "High Scores"; public static const strReplay:String = "Replay level"; public static const miInstructions:int = 24; public static const strReiting2:String = "'s Rating Is "; public static const strWindow:String = "Window"; public static const miDeletePlayerConfirm:int = 8; public static const strDeleteScoresConfirm:String = "Are you sure you want to delete score table?"; public static const strHowToPlay:String = "How To Play"; public static const strDiagonal:String = "The line can be collected diagonally, horizontally or vertically"; public static const sServer:String = "wellgames.com"; public static const strCollect1:String = "Collect"; public static const strCollect2:String = "Swap the figures to make the line of three or more of the same color and form."; public static const strHasReiting:String = "'s Rating Is "; public static const sDebug:Boolean = false; public static const strReiting1:String = " Place: "; public static const strNew:String = "New"; public static const strOff:String = "Off"; public static const strCollect:String = "Collect :"; public static const sTBannerPrefix:String = "top/"; public static const strLevelScoreR:String = "Level Score: "; public static const strFailed:String = "Failed"; public static const miGameMP:int = 21; public static const strClick:String = "Click!"; public static const strConnect2:String = "Try Other Multiplayer Games!"; public static const miResultsMP:int = 22; public static const strConnect1:String = "Play With Other Gamers In Multiplayer Mode!"; public static const strConnect3:String = "Tell A Friend About Gemz!"; public static const strGainedScore:String = "Gained score :"; public static const sXTName:String = "gz"; public static const DEMO:int = 3; public static const TRIANGLE:int = 2; public static const OWInstructionsInfo:Array = [[[GemzS.TextAlign, 695, 22, 21, GemzL.iFonts[0], GemzL.strInstructionsText, 1, 1, -75, 0, null, 0, true]], [[GemzS.TextureHeader, cFontName, 550, 25, GemzL.iFrame[1], GemzL.strHorizontal, 0, 0, null, 0, true]], [[GemzS.TextureHeader, cFontName, 550, 25, GemzL.iFrame[1], GemzL.strVerticaly, 0, 0, null, 0, true]], [[GemzS.TextureHeader, cFontName, 550, 25, GemzL.iFrame[1], GemzL.strDiagonal, 0, 0, null, 0, true]], [[GemzS.TextAlign, 695, 22, 21, GemzL.iFonts[0], GemzL.strInstructionsText, 1, 1, -75, 0, null, 0, true]], [[GemzS.TextAlign, 695, 22, 21, GemzL.iFonts[0], GemzL.strInstructionsText, 1, 1, -75, 0, null, 0, true]]]; public static const sURLGame:String = "http://www.wellgames.com/free_online/Gemz/?g=Gemz"; public static const miEnterNewName:int = 4; public static const HEXAGON:int = 1; public static const strLevelComplete:String = "Level complete"; public static const miIntro:int = 2; private static const OWHighScoresType:Array = [GemzL.strLocal, GemzL.strPersonal]; public static const iBonusColors:Array = ["aqua1", "yellow", "green", "red", "magenta", "aqua", "magenta", "aqua1", "yellow", "green", "red", "magenta", "aqua", "aqua1", "yellow", "green", "red", "magenta", "aqua"]; public static const strClose:String = "Close"; public static const strPrToCont:String = "press to continue"; public static const strEnterName:String = "please enter your name:"; public static const strFailedLevel:String = " Has Failed The Level With Score "; public static const strMoreGames1:String = "More Games"; public static const strLevelConfirm1:String = "score"; public static const strLevelConfirm2:String = "to get to the next level you must beat your opponent"; public static const strMusic:String = "Music Volume"; public static const strPlayArcade:String = "Play Arcade!"; public static const strInstructions:String = "Instruction"; public static const strLevelScore:String = "'s Level Score Is "; public static const iFrame:Array = [OTF02, OTB017]; public static const strComplete:String = "complete!"; public static const iBackGround:Array = [OBG1, OBG5, OBG6, OBG8, OBG9, OBG10, OBG11, OBG15, OBG16, OBG17, OBG18, OBG19, OBG20, OBG21, OBG22, OBG23, OBG24]; public static const strAccept:String = "Accept"; public static const strClear:String = "Clear"; public static const miResultsSP:int = 15; public static const miSSaver:int = 25; public static const strConnectionToServer:String = " Connecting To Server..."; public static const strOpponent:String = "Opponent"; public static const strSendMail:String = "Send Mail"; public static const strBack:String = "Back"; public static const strBonusText:String = "+200"; public static const strPlayersOnline1:String = " Players Online"; public static const strLevel1:String = "Level:"; public static const sZone:String = "Gemz"; public static const strDeletePlayerConfirm:String = "Are you sure you want to delete this profile?"; public static const strBonusScore:String = "Bonus score :"; public static const strTotalScore:String = "Level Score :"; public static const strScore:String = "Score:"; public static const sBannerID:String = "gemz"; public static const strGameName:String = "Gemz!"; public static const strYes:String = "Yes"; public static const strCollectNum:String = "Collect"; public static const miNullWindow:int = 0; public static const sDomain:String = "wellgames.com"; public static const strCompleteLevel:String = " Has Completed The Level With Score "; public static const iFonts:Array = [OTF01, OTF02, OTF04]; public static const miHighScores:int = 17; public static const strOptions:String = "Options"; public static const strMenu:String = "Menu"; public static const iFishColors:Array = ["white", "aqua1", "yellow", "green", "red", "magenta", "aqua"]; public static const strDelete:String = "Delete"; public static const strOpponent1:String = "Opponent"; public static const strOpponent2:String = "In Game"; private static const iWOptionsOnOff:Array = [GemzL.strOff, GemzL.strOn]; public static const cButtonTextures:Object = {White:OTB05}; public static const strYourRaiting:String = "Your Rating:"; public static const strLevelConfirm:String = "To get to the next level you need more than"; public static const STRATEGY:int = 1; public static const strPlayOnline1:String = "Play Online!"; public static const strChangePlayer:String = "click to change player"; public static const strCommingSoonI:String = "This option is not available at the moment"; public static const strPersonal:String = "Personal"; public static const miChoosePlayer:int = 7; public static const strPlayStrategy:String = "Play Strategy!"; public static const miEnterNameFirst:int = 3; public static const strPlayOnline:String = "Play Online!"; private static const OSoundParams:Array = [OSBubbleBang12, OSBubbleBang14, OSBubbleBang07, OSBubbleBang02, OSBubbleBang03, OSBubbleBang04, OSBubbleBang05, OSBubbleBang06, OSBubbleBang09, OSBubbleBang10]; public static const strLocal:String = "Local"; public static const strInstructionsText1:String = "The goal of the game is to clear the playfield. Click on gems on the borders to move them along the lines. Groups of three or more gems of one color will disappear."; public static const strInstructionsText2:String = "Gems with pearls will turn first into gems with golden parts, then - into regular gems, and only then they will be removed from the playfield."; public static const strInstructionsText3:String = "If no gems are removed after several moves, new gems will appear on the playfield. Some of them may be silver. Silver gem cannot be moved, but you can change its color by hitting it with another gem."; public static const strInstructionsText4:String = "You get this bonus if you collect a group of 4 gems of one color. Click on the bonus to move it to the playfield and it will remove all the neighboring gems."; public static const strNo:String = "No"; public static const strLevel:String = "Level"; public static const strInstructionsText5:String = "You get this bonus if you collect a group of 5 gems of one color. Click on the bonus and all empty spots in this row or column will turn into active cells."; public static const strHeader1:String = " figures "; public static const iHintText:Array = ["Hit silver gem to change its color", "Bonus makes empty cells active", "Bonus clears row or column", "Bonus removes neighboring gems"]; public static const strInstructionsText6:String = "You get this bonus if you collect a group of 6 gems of one color. Click on the bonus and all regular gems in the line or row will be removed."; public static const strOn:String = "On"; public static const strWelcome:String = "Welcome"; public static const strPlayersOnline:String = "Players Online"; public static var OFireStone:Class = GemzL_OFireStone; public static var OWInfoP:Array = [[GemzS.TextureHeader, cFontName, 240, 28, GemzL.iFrame[1], GemzL.strConnect1, 5, 200, null, 0, true], [GemzS.TextureHeader, cFontName, 240, 28, GemzL.iFrame[1], GemzL.strConnect1, 5, 300, null, 0, true]]; private static var OWGameSite:Array = [[GemzS.TextureHeader, cFontName, 250, 23, GemzL.iFrame[1], strSite, 0, 0, null, 0, true]]; public static var OIRight:Class = GemzL_OIRight; private static var cc:Number = 100; public static var OWHighScores:Array = [[GemzS.BigFrame, 600, 440, iFonts[1], cButtonTextures.White, 300, 300, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 600, 48, GemzL.iFonts[0], GemzL.strHighScores, 0, 95, null, 0, true], [GemzS.ListBoxTextHSlider, 280, 50, GemzL.iFonts[1], false, 190, 40, GemzL.OBG, "", GemzL.OWHighScoresType, 160, 160, "iType", 0, true], [ODisplay.IDisplayObjectMake, GemzL.OWHighScoreTabF, 55, (200 + 20), "iTable", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strClear, 110, (350 + 100), GemzL.OBG, "iClear", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strClose, 340, (350 + 100), GemzL.OBG, "iClose", 0, true]]; public static var OCURSOR1:Class = GemzL_OCURSOR1; public static var OCURSOR2:Class = GemzL_OCURSOR2; public static var OWDeleteScoresConfirm:Array = [[GemzS.BigFrame, 420, 270, iFonts[1], cButtonTextures.White, 210, 210, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 420, 30, GemzL.iFonts[1], GemzL.strDeleteScoresConfirm, 0, (185 - 80), null, 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strYes, 50, (290 - 30), GemzL.OBG, "iButtons", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strNo, 220, (290 - 30), GemzL.OBG, "iButtons", 1, true]]; public static var OWGameConnection:Array = [GemzS.ColorHeader, cFontName, 800, 67, GemzL.iFrame[1], GemzL.strConnectionToServer, OInterface.iDefSlowAnimators]; private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, GemzL.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, GemzL.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, GemzL.OTimerAnimator, null]; public static var OWEnterName:Array = [[GemzS.BigFrame, 480, 290, iFonts[1], cButtonTextures.White, 250, 230, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 460, 45, GemzL.iFonts[1], GemzL.strNewPlayer, 20, 120, null, 0, true], [GemzS.TextureHeader, cFontName, 440, 30, GemzL.iFonts[1], GemzL.strEnterName, 25, 190, null, 0, true], [GemzS.InputText, 350, 60, GemzL.iFonts[1], "well", [20, 0.9, 0.4], 11, 70, 230, "iName", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strAccept, (100 - 5), 340, GemzL.OBG, "iAccept", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strCancel, (250 + 5), 340, GemzL.OBG, "iCancel", 0, true]]; public static var OCursor:Class = GemzL_OCursor; public static var OWGameCompletedLevel:Array = [[GemzS.TextureHeader, cFontName, 500, 65, GemzL.iFonts[0], strLevel, 17, 0, null, 0, true], [GemzS.TextureHeader, cFontName, 500, 65, GemzL.iFonts[0], strComplete, 17, 60, null, 0, true], [GemzS.TextureHeader, cFontName, 500, 40, GemzL.iFonts[0], strPrToCont, 17, 130, null, 0, true]]; public static var OWCommingSoon:Array = [[GemzS.BigFrame, 530, 290, iFonts[1], cButtonTextures.White, 0, 0, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 530, 50, GemzL.iFrame[1], GemzL.strCommingSoon, 0, 20, null, 0, true], [GemzS.TextureHeader, cFontName, 530, 30, GemzL.iFrame[1], GemzL.strCommingSoonI, 0, 125, null, 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strClose, 190, 210, GemzL.OBG, null, 0, true]]; public static var OBtnSprite:Class = GemzL_OBtnSprite; public static var OTF01:Class = GemzL_OTF01; public static var OTF02:Class = GemzL_OTF02; public static var OTF03:Class = GemzL_OTF03; public static var OTF04:Class = GemzL_OTF04; public static var OBG:Class = GemzL_OBG; public static var OWResults:Array = [[GemzS.ColorHeader, cFontName, 800, 90, GemzL.iFrame[1], strResults, OInterface.iDefSlowAnimators, 0, 0, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 50, 130, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 50, 195, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 50, 270, null, 0, false], [OInterface.OIObjectMake, OWResultsRaiting, OInterface.iDefSlowAnimators, 0, 330, null, 0, false], [GemzS.MakeTextButton, 320, 60, GemzL.iFonts[1], [0, 50, 50, 0], 38, GemzL.strNextLevel, 240, 480, GemzL.cButtonTextures.White, "iButtons", 0, false]]; public static var OWResultsLevelScore:Array = [[GemzS.TextAlign, 695, 50, 50, GemzL.iFonts[0], strGainedScore, 0, 1, 0, 0, null, 0, true], [GemzS.TextAlign, 695, 50, 50, GemzL.iFonts[0], "9", 2, 1, 0, 0, null, 0, true]]; public static var OF004:Class = GemzL_OF004; public static var OF006:Class = GemzL_OF006; public static var OILeft:Class = GemzL_OILeft; public static var OF005:Class = GemzL_OF005; public static var OWGameNCL:Array = [OInterface.OIObjectMake, OWGameNotCompletedLevel, OInterface.iDefAnimators, 660, 50, null, 0, true]; public static var OWResultsRaiting:Array = [[GemzS.ColorText, 60, GemzL.iFonts[0], strYourRaiting, OInterface.iDefSlowAnimators, 120, 0, null, 0, true], [GemzS.TextureHeader, cFontName, 800, 60, iFrame[1], "9", 0, 70, null, 0, true]]; public static var OFont:Class = GemzL_OFont; public static var OWResultsBonusScore:Array = [[GemzS.TextAlign, 695, 50, 50, GemzL.iFonts[0], strBonusScore, 0, 1, 0, 0, null, 0, true], [GemzS.TextAlign, 695, 50, 50, GemzL.iFonts[0], "9", 2, 1, 0, 0, null, 0, true]]; public static var OWResultsTotalScore:Array = [[GemzS.TextAlign, 695, 50, 50, GemzL.iFonts[0], strTotalScore, 0, 1, 0, 0, null, 0, true], [GemzS.TextAlign, 695, 50, 50, GemzL.iFonts[0], "9", 2, 1, 0, 0, null, 0, true]]; private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15}; public static var OWGameNewLevelWithOpponent:Array = [OInterface.OIObjectMake, OWGameNewLevel, OInterface.iDefAnimators, 0, 0, null, 0, false]; private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams); public static var OWIntroParam:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [GemzS.TextureHeader, cFontName, 800, 40, GemzL.iFrame[1], GemzL.strSite, 0, 160, "iHeader", 0, true], [GemzS.TextureHeader, cFontName, 800, 40, GemzL.iFrame[1], GemzL.strPresents, 0, 400, "iFooter", 0, true], [GemzS.TextureText, cFontName, 120, GemzL.iFonts[0], "G", 190, 0, "iName", 0, true], [GemzS.TextureText, cFontName, 120, GemzL.iFonts[0], "E", (265 + 15), 0, "iName", 1, true], [GemzS.TextureText, cFontName, 120, GemzL.iFonts[0], "M", (325 + 30), 0, "iName", 2, true], [GemzS.TextureText, cFontName, 120, GemzL.iFonts[0], "Z", (412 + 70), 0, "iName", 3, true], [GemzS.TextureText, cFontName, 120, GemzL.iFonts[0], "!", 573, 0, "iName", 4, true]]; public static var OIDown:Class = GemzL_OIDown; public static var OWDeletePlayerConfirm:Array = [[GemzS.BigFrame, 420, 270, iFonts[1], cButtonTextures.White, 210, 210, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 420, 30, GemzL.iFonts[1], GemzL.strDeletePlayerConfirm, 0, (185 - 80), true, null, 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strYes, 50, (290 - 30), GemzL.OBG, "iButtons", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strNo, 220, (290 - 30), GemzL.OBG, "iButtons", 1, true]]; public static var OWColors2:Array = ["330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0"]; public static var OBubble:Class = GemzL_OBubble; public static var OWColors1:Array = ["30", "0", "90", "60", "150", "120", "210", "180", "270", "240", "330", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"]; public static var OWColors3:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"]; public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], " ", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "0", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "1", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "2", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "3", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "4", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "5", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "6", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "7", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "8", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 17, 25, GemzL.iFrame[1], "9", 0, 0, null, 0, false]], 17, 25, GemzL.OWGameCounterAnimator, null]; private static var iGameType:int = 0; public static var OBG02:Class = GemzL_OBG02; public static var OTB05:Class = GemzL_OTB05; public static var OWGameNewLevel:Array = [[GemzS.ColorHeader, cFontName, 800, 70, GemzL.iFrame[1], strSite, OInterface.iDefAnimators, 0, 0, null, 0, true], [GemzS.ColorHeader, cFontName, 800, 70, GemzL.iFrame[1], strOpponent, OInterface.iDefAnimators, 0, 60, null, 0, true], [GemzS.ColorHeader, cFontName, 800, 70, GemzL.iFrame[1], strSite, OInterface.iDefAnimators, 0, 130, null, 0, true]]; public static var OWChoosePlayer:Array = [[GemzS.BigFrame, 590, 590, iFonts[1], GemzL.cButtonTextures.White, 200, 250, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 500, 45, GemzL.iFonts[0], GemzL.strChoosePlayer, -50, 30, true, null, 0, true], [GemzS.ListBoxText, 360, 40, iFonts[1], iFonts[1], 5, null, (30 - 50), (90 + 5), "iListBox", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strNew, (30 - 50), (340 + 5), GemzL.OBG, "iNew", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strDelete, (320 - 50), (340 + 5), GemzL.OBG, "iDelete", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strAccept, (90 - 50), (420 + 5), GemzL.OBG, "iAccept", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strCancel, (260 - 50), (420 + 5), GemzL.OBG, "iCancel", 0, true]]; public static var OBG6:Class = GemzL_OBG6; public static var OBG1:Class = GemzL_OBG1; public static var OBG9:Class = GemzL_OBG9; public static var OBG5:Class = GemzL_OBG5; public static var OWSSaver:Array = [[GemzS.MakeNFTextButton, 75, 25, "yellow", "yellow", 25, GemzL.strMenu, 0, 0, "iMenu", 0, true], [GemzS.MakeNFTextButton, 225, 25, "aqua1", "aqua1", 25, GemzL.strSite, 0, 0, "iSite", 0, true]]; public static var OBG8:Class = GemzL_OBG8; public static var OSBubbleBang05:Class = GemzL_OSBubbleBang05; public static var OSBubbleBang06:Class = GemzL_OSBubbleBang06; public static var OSBubbleBang07:Class = GemzL_OSBubbleBang07; public static var OSBubbleBang02:Class = GemzL_OSBubbleBang02; public static var OWGameLevelElement:Array = [OInterface.OTabMake, [[GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], " ", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "0", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "1", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "2", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "3", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "4", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "5", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "6", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "7", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "8", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 35, 35, GemzL.iFrame[1], "9", 0, 0, null, 0, false]], 22, 35, GemzL.OWGameCounterAnimator, null]; public static var OBG10:Class = GemzL_OBG10; public static var OBG11:Class = GemzL_OBG11; public static var OBG15:Class = GemzL_OBG15; public static var OBG16:Class = GemzL_OBG16; public static var OBG18:Class = GemzL_OBG18; public static var OSBubbleBang09:Class = GemzL_OSBubbleBang09; public static var OBG19:Class = GemzL_OBG19; public static var OSBubbleBang04:Class = GemzL_OSBubbleBang04; public static var OSBubbleBang10:Class = GemzL_OSBubbleBang10; public static var OBG17:Class = GemzL_OBG17; public static var OSBubbleBang14:Class = GemzL_OSBubbleBang14; public static var OSBubbleBang03:Class = GemzL_OSBubbleBang03; public static var OSBubbleBang12:Class = GemzL_OSBubbleBang12; public static var OGField:Array = []; public static var OBG20:Class = GemzL_OBG20; public static var OBG21:Class = GemzL_OBG21; public static var OBG22:Class = GemzL_OBG22; public static var OBG23:Class = GemzL_OBG23; public static var OBG24:Class = GemzL_OBG24; public static var OIUp:Class = GemzL_OIUp; public static var OWGame:Array = [[GemzS.ColorHeader, cFontName, 250, 60, GemzL.iFonts[0], strGameName, OInterface.iDefAnimators, 270, 0, "iGameName", 0, false], [GemzS.MakeTextButton, 200, 50, GemzL.iFonts[1], [0, 50, 50, 0], 25, GemzL.strMenu, 558, 520, GemzL.cButtonTextures.White, "iMenu", 0, false], [OInterface.OIObjectMake, OWGameSite, OInterface.iDefAnimators, 533, 70, "iSite", 0, false], [GemzS.MakeNFTextButton, 250, 100, "yellow", "yellow", 25, "", 533, -10, "iInvisLink", 0, true], [GemzS.ColorHeader, cFontName, 100, 35, GemzL.iFrame[1], strLevel1, OInterface.iDefAnimators, 20, 550, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelF, 160, 550, "iLevelCounter", 0, false], [GemzS.ColorHeader, cFontName, 150, 35, GemzL.iFrame[1], strScore, OInterface.iDefAnimators, 130, 550, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 340, 550, "iScoreCounter", 0, false], [GemzS.ColorHeader, cFontName, 150, 25, GemzL.iFrame[1], strScore, OInterface.iDefAnimators, 270, 375, "iScoreO", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 630, 376, "iScoreCounterO", 0, false]]; public static var OGField_HintText:Array = [[null, GemzL.cFontName, 30, GemzL.iFonts[0], GemzL.iHintText[0], 0, 0], [null, GemzL.cFontName, 30, GemzL.iFonts[0], GemzL.iHintText[1], 0, 0], [null, GemzL.cFontName, 30, GemzL.iFonts[0], GemzL.iHintText[2], 0, 0], [null, GemzL.cFontName, 30, GemzL.iFonts[0], GemzL.iHintText[3], 0, 0]]; public static var OTB017:Class = GemzL_OTB017; public static var OWResultsRaitingS:Array = [[GemzS.Header, 800, 80, "aqua1", "9", 0, 0, null, 0, true]]; public static var OWResultsScoreT:Array = [[GemzS.TextureHeader, cFontName, 800, 60, GemzL.iFrame[1], ((strLevel + " ") + strScore), 0, 0, null, 0, true]]; public static var OWRecordColor:Array = ["0", "60", "90", "150", "180", "240", "300", "360"]; private static var OWPlayersCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 67, 0, "iDigits", 4, true]], 85, 30]; private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 22, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 44, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 66, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 88, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 110, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 132, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 154, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 176, 0, "iDigits", 8, true]], 200, 35]; private static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], " ", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "0", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "1", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "2", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "3", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "4", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "5", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "6", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "7", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "8", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 20, 30, GemzL.iFrame[1], "9", 0, 0, null, 0, false]], 17, 30, GemzL.OTimerAnimator, null]; public static var OWGameNameColor:Array = ["330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0"]; public static var OBubbleShadow:Class = GemzL_OBubbleShadow; public static var OTBSTAR:Class = GemzL_OTBSTAR; public static var OWGameNotCompletedLevel:Array = [[GemzS.TextureHeader, cFontName, 500, 65, GemzL.iFonts[0], strLevel, 17, 0, null, 0, true], [GemzS.TextureHeader, cFontName, 500, 65, GemzL.iFonts[0], strFailed, 17, 60, null, 0, true], [GemzS.TextureHeader, cFontName, 500, 40, GemzL.iFonts[0], strPrToCont, 17, 130, null, 0, true]]; public static var OWInfoPUserNotFound:Array = [[GemzS.TextureHeader, cFontName, 250, 30, GemzL.iFrame[1], GemzL.strConnect1, 5, 300, null, 0, true], [GemzS.TextureHeader, cFontName, 250, 30, GemzL.iFrame[1], GemzL.strConnect1, 5, 265, null, 0, true]]; public static var OWPlayersColor:Array = ["180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150"]; public static var OWResultsColor:Array = ["yellow", "yellow", "yellow", "yellow", "yellow", "yellow", "yellow"]; public static var OWMenuReiting:Array = [[GemzS.ColorHeader, cFontName, 800, 30, GemzL.iFrame[1], "W", null, 0, 375, null, 0, true]]; public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], " ", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "0", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "1", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "2", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "3", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "4", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "5", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "6", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "7", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "8", 0, 0, null, 0, false], [GemzS.TextureHeader, cFontName, 22, 35, GemzL.iFrame[1], "9", 0, 0, null, 0, false]], 20, 35, GemzL.OWGameCounterAnimator, null]; public static var FallParticle:Class = GemzL_FallParticle; public static var OWInfoPConnect:Array = [[GemzS.TextureHeader, cFontName, 250, 28, GemzL.iFrame[1], GemzL.strConnect1, 5, 200, true, null, 0, true], [GemzS.MakeTextButton, 230, 50, GemzL.iFonts[1], [0, 50, 50, 0], 25, GemzL.strPlayOnline, 15, 340, GemzL.cButtonTextures.White, null, 0, true]]; public static var OWHighScoreLocal:Array = [[GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 0, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 0, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 35, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 35, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 70, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 70, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 105, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 105, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 140, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 140, null, 0, true]]; public static var OWGameNewLevelWithHoutOpponent:Array = [GemzS.ColorHeader, cFontName, 800, 80, GemzL.iFrame[1], strSite, OInterface.iDefSlowAnimators, 0, 0, null, 0, true]; public static var OBombStone:Class = GemzL_OBombStone; public static var OWMenu:Array = [[GemzS.TextureHeader, cFontName, 800, 40, GemzL.iFonts[0], GemzL.strWelcome, 0, 0, null, 0, true], [GemzS.TextureHeader, cFontName, 800, 30, GemzL.iFrame[1], GemzL.strChangePlayer, 0, 55, null, 0, true], [GemzS.ColorHeader, cFontName, 800, 100, GemzL.iFonts[0], GemzL.strGameName, null, 0, 85, "iGameName", 0, true], [GemzS.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 200, 200, "iCPlayers", 0, true], [GemzS.ColorText, 30, GemzL.iFrame[1], GemzL.strPlayersOnline, null, 10, 100, "iPlayers", 0, true], [GemzS.MakeTextButton, 400, 100, GemzL.OTF02, [10, 10, 70, 70], 50, GemzL.strPlayOnline, 200, 250, GemzL.cButtonTextures.White, "iPlayOnlineStrategy", 0, true], [GemzS.MakeTextButton, 300, 60, GemzL.OTF02, [0, 50, 50, 0], 35, GemzL.strOptions, 70, 440, GemzL.cButtonTextures.White, "iOptions", 0, true], [GemzS.MakeTextButton, 300, 60, GemzL.OTF02, [50, 0, 0, 50], 35, GemzL.strInstructions, 430, 440, GemzL.cButtonTextures.White, "iInstructions", 0, true], [GemzS.MakeTextButton, 300, 60, GemzL.OTF02, [0, 50, 50, 0], 35, GemzL.strHighScores, 30, 520, GemzL.cButtonTextures.White, "iHighScores", 0, true], [GemzS.MakeTextButton, 300, 60, GemzL.OTF02, [50, 0, 0, 50], 35, GemzL.strMoreGames, 470, 520, GemzL.cButtonTextures.White, "iMoreGames", 0, true]]; public static var OWHighScorePersonal:Array = [[GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 0, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 0, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 35, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 35, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 70, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 70, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 105, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 105, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "W", 0, 1, 0, 140, null, 0, true], [GemzS.TextAlign, 495, 30, 30, GemzL.iFonts[1], "9", 2, 1, 0, 140, null, 0, true]]; private static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 68, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 85, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 102, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 119, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 136, 0, "iDigits", 8, true]], 153, 25]; public static var OWOptions:Array = [[GemzS.BigFrame, 560, 390, iFonts[1], cButtonTextures.White, 270, 270, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 540, 60, GemzL.iFonts[0], GemzL.strOptions, 0, (20 + (cc / 2)), null, 0, true], [GemzS.ListBoxTextHSlider, 520, 50, GemzL.iFonts[1], false, 90, 40, GemzL.iFonts[0], GemzL.strSound, GemzL.iWOptionsVolume, 10, (90 + cc), "iSound", 0, true], [GemzS.ListBoxTextHSlider, 520, 50, GemzL.iFonts[1], false, 90, 40, GemzL.iFonts[0], GemzL.strMusic, GemzL.iWOptionsVolume, 10, (140 + cc), "iMusic", 0, true], [GemzS.ListBoxTextHSlider, 520, 50, GemzL.iFonts[1], false, 200, 40, GemzL.iFonts[0], GemzL.strWindow, null, 10, (190 + cc), "iResolution", 0, true], [GemzS.ListBoxTextHSlider, 520, 50, GemzL.iFonts[1], false, 90, 40, GemzL.iFonts[0], GemzL.strFullScreen, GemzL.iWOptionsOnOff, 10, (240 + (cc / 2)), "iFullScreen", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strAccept, 110, (310 + cc), GemzL.OBG, "iAccept", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strCancel, 280, (310 + cc), GemzL.OBG, "iCancel", 0, true]]; public static var OWHowToPlay:Array = [[GemzS.BigFrame1, 700, 580, iFonts[1], cButtonTextures.White, [0, 100, 100, 0], 100, 0, "iFrame", 0, true], [GemzS.TextureHeader, cFontName, 460, 50, GemzL.iFonts[1], GemzL.strHowToPlay, 180, 30, null, 0, true], [GemzS.ColorText, 50, GemzL.iFonts[1], GemzL.strLevel, OInterface.iDefSlowAnimators, 55, 100, "iEndLevel", 0, false], [GemzS.ColorText, 50, GemzL.iFonts[1], GemzL.strComplete, OInterface.iDefSlowAnimators, 65, 150, "iEndLevel1", 0, false], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 0, 30, 30], 30, GemzL.strClose, (290 + 30), 520, GemzL.OBG, "iClose", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [50, 0, 0, 50], 30, GemzL.strNext, ((390 + 50) + 50), 520, GemzL.OBG, "iNext", 0, true], [GemzS.MakeTextButton, 150, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strBack, (100 + 50), 520, GemzL.OBG, "iBack", 0, false], [GemzS.TextureHeader1, cFontName, 330, 35, GemzL.iFonts[2], strInstructionsText1, ((250 + 100) + 60), 125, 550, "iInstruction1", 0, true], [GemzS.TextureHeader1, cFontName, 330, 35, GemzL.iFonts[2], strInstructionsText2, ((250 + 100) + 60), 150, 550, "iInstruction2", 0, true], [GemzS.TextureHeader1, cFontName, 330, 32, GemzL.iFonts[2], strInstructionsText3, ((250 + 100) + 60), 120, 550, "iInstruction3", 0, true], [GemzS.TextureHeader1, cFontName, 330, 35, GemzL.iFonts[2], strInstructionsText4, ((250 + 100) + 60), 140, 550, "iInstruction4", 0, true], [GemzS.TextureHeader1, cFontName, 330, 35, GemzL.iFonts[2], strInstructionsText5, ((250 + 100) + 60), 140, 550, "iInstruction5", 0, true], [GemzS.TextureHeader1, cFontName, 330, 35, GemzL.iFonts[2], strInstructionsText6, ((250 + 100) + 60), 140, 550, "iInstruction6", 0, true]]; public static var OWInstructions:Array = [[GemzS.BigFrame, 700, 580, iFonts[1], cButtonTextures.White, 50, 10, 8, null, 0, true], [GemzS.TextureHeader, cFontName, 600, 60, GemzL.iFrame[1], GemzL.strInstructions, 100, 30, null, 0, true], [OInterface.OIObjectMake, [], null, 125, 440, "iInfoText", 0, true], [GemzS.MakeTextButton, 190, 60, GemzL.iFrame[1], [0, 50, 50, 0], 30, GemzL.strClose, 305, 510, GemzL.cButtonTextures.White, null, 0, true], [GemzS.TextureHeader, cFontName, 250, 30, GemzL.iFrame[1], GemzL.strBonusHeader, 460, 100, null, 0, true]]; public static var OClearStone:Class = GemzL_OClearStone; private static var OWGameCounterAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:4}; public static var iMP:OMultiplayer = new OMultiplayer(sDebug); public static var OWInfoPPlayer:Array = [[GemzS.ColorHeader, cFontName, 270, 30, GemzL.iFrame[1], GemzL.strOpponent1, null, 5, 400, null, 0, true], [GemzS.ColorHeader, cFontName, 270, 30, GemzL.iFrame[1], GemzL.strLevel, null, 5, 445, null, 0, true]]; private static var OWGameLevelF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameLevelElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameLevelElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameLevelElement, 34, 0, "iDigits", 2, true]], 51, 35]; public static var OWGameCL:Array = [OInterface.OIObjectMake, OWGameCompletedLevel, OInterface.iDefAnimators, 660, 50, null, 0, true]; public static var iGAME:OGame = new OCGame(); public static function set GameType(_arg1:int):void{ iGameType = _arg1; iGAME.prMode = iGameType; } public static function get GameType():int{ return (iGameType); } } }//package
Section 190
//GemzL_FallParticle (GemzL_FallParticle) package { import mx.core.*; public class GemzL_FallParticle extends SpriteAsset { } }//package
Section 191
//GemzL_OBG (GemzL_OBG) package { import mx.core.*; public class GemzL_OBG extends BitmapAsset { } }//package
Section 192
//GemzL_OBG02 (GemzL_OBG02) package { import mx.core.*; public class GemzL_OBG02 extends SpriteAsset { } }//package
Section 193
//GemzL_OBG1 (GemzL_OBG1) package { import mx.core.*; public class GemzL_OBG1 extends BitmapAsset { } }//package
Section 194
//GemzL_OBG10 (GemzL_OBG10) package { import mx.core.*; public class GemzL_OBG10 extends BitmapAsset { } }//package
Section 195
//GemzL_OBG11 (GemzL_OBG11) package { import mx.core.*; public class GemzL_OBG11 extends BitmapAsset { } }//package
Section 196
//GemzL_OBG15 (GemzL_OBG15) package { import mx.core.*; public class GemzL_OBG15 extends BitmapAsset { } }//package
Section 197
//GemzL_OBG16 (GemzL_OBG16) package { import mx.core.*; public class GemzL_OBG16 extends BitmapAsset { } }//package
Section 198
//GemzL_OBG17 (GemzL_OBG17) package { import mx.core.*; public class GemzL_OBG17 extends BitmapAsset { } }//package
Section 199
//GemzL_OBG18 (GemzL_OBG18) package { import mx.core.*; public class GemzL_OBG18 extends BitmapAsset { } }//package
Section 200
//GemzL_OBG19 (GemzL_OBG19) package { import mx.core.*; public class GemzL_OBG19 extends BitmapAsset { } }//package
Section 201
//GemzL_OBG20 (GemzL_OBG20) package { import mx.core.*; public class GemzL_OBG20 extends BitmapAsset { } }//package
Section 202
//GemzL_OBG21 (GemzL_OBG21) package { import mx.core.*; public class GemzL_OBG21 extends BitmapAsset { } }//package
Section 203
//GemzL_OBG22 (GemzL_OBG22) package { import mx.core.*; public class GemzL_OBG22 extends BitmapAsset { } }//package
Section 204
//GemzL_OBG23 (GemzL_OBG23) package { import mx.core.*; public class GemzL_OBG23 extends BitmapAsset { } }//package
Section 205
//GemzL_OBG24 (GemzL_OBG24) package { import mx.core.*; public class GemzL_OBG24 extends BitmapAsset { } }//package
Section 206
//GemzL_OBG5 (GemzL_OBG5) package { import mx.core.*; public class GemzL_OBG5 extends BitmapAsset { } }//package
Section 207
//GemzL_OBG6 (GemzL_OBG6) package { import mx.core.*; public class GemzL_OBG6 extends BitmapAsset { } }//package
Section 208
//GemzL_OBG8 (GemzL_OBG8) package { import mx.core.*; public class GemzL_OBG8 extends BitmapAsset { } }//package
Section 209
//GemzL_OBG9 (GemzL_OBG9) package { import mx.core.*; public class GemzL_OBG9 extends BitmapAsset { } }//package
Section 210
//GemzL_OBombStone (GemzL_OBombStone) package { import mx.core.*; public class GemzL_OBombStone extends SpriteAsset { } }//package
Section 211
//GemzL_OBtnSprite (GemzL_OBtnSprite) package { import mx.core.*; public class GemzL_OBtnSprite extends SpriteAsset { } }//package
Section 212
//GemzL_OBubble (GemzL_OBubble) package { import mx.core.*; public class GemzL_OBubble extends SpriteAsset { } }//package
Section 213
//GemzL_OBubbleShadow (GemzL_OBubbleShadow) package { import mx.core.*; public class GemzL_OBubbleShadow extends SpriteAsset { } }//package
Section 214
//GemzL_OClearStone (GemzL_OClearStone) package { import mx.core.*; public class GemzL_OClearStone extends SpriteAsset { } }//package
Section 215
//GemzL_OCursor (GemzL_OCursor) package { import mx.core.*; public class GemzL_OCursor extends SpriteAsset { } }//package
Section 216
//GemzL_OCURSOR1 (GemzL_OCURSOR1) package { import mx.core.*; public class GemzL_OCURSOR1 extends SpriteAsset { } }//package
Section 217
//GemzL_OCURSOR2 (GemzL_OCURSOR2) package { import mx.core.*; public class GemzL_OCURSOR2 extends SpriteAsset { } }//package
Section 218
//GemzL_OF004 (GemzL_OF004) package { import mx.core.*; public class GemzL_OF004 extends BitmapAsset { } }//package
Section 219
//GemzL_OF005 (GemzL_OF005) package { import mx.core.*; public class GemzL_OF005 extends BitmapAsset { } }//package
Section 220
//GemzL_OF006 (GemzL_OF006) package { import mx.core.*; public class GemzL_OF006 extends BitmapAsset { } }//package
Section 221
//GemzL_OFireStone (GemzL_OFireStone) package { import mx.core.*; public class GemzL_OFireStone extends SpriteAsset { } }//package
Section 222
//GemzL_OFont (GemzL_OFont) package { import mx.core.*; public class GemzL_OFont extends SpriteAsset { } }//package
Section 223
//GemzL_OIDown (GemzL_OIDown) package { import mx.core.*; public class GemzL_OIDown extends SpriteAsset { } }//package
Section 224
//GemzL_OILeft (GemzL_OILeft) package { import mx.core.*; public class GemzL_OILeft extends SpriteAsset { } }//package
Section 225
//GemzL_OIRight (GemzL_OIRight) package { import mx.core.*; public class GemzL_OIRight extends SpriteAsset { } }//package
Section 226
//GemzL_OIUp (GemzL_OIUp) package { import mx.core.*; public class GemzL_OIUp extends SpriteAsset { } }//package
Section 227
//GemzL_OSBubbleBang02 (GemzL_OSBubbleBang02) package { import mx.core.*; public class GemzL_OSBubbleBang02 extends SoundAsset { } }//package
Section 228
//GemzL_OSBubbleBang03 (GemzL_OSBubbleBang03) package { import mx.core.*; public class GemzL_OSBubbleBang03 extends SoundAsset { } }//package
Section 229
//GemzL_OSBubbleBang04 (GemzL_OSBubbleBang04) package { import mx.core.*; public class GemzL_OSBubbleBang04 extends SoundAsset { } }//package
Section 230
//GemzL_OSBubbleBang05 (GemzL_OSBubbleBang05) package { import mx.core.*; public class GemzL_OSBubbleBang05 extends SoundAsset { } }//package
Section 231
//GemzL_OSBubbleBang06 (GemzL_OSBubbleBang06) package { import mx.core.*; public class GemzL_OSBubbleBang06 extends SoundAsset { } }//package
Section 232
//GemzL_OSBubbleBang07 (GemzL_OSBubbleBang07) package { import mx.core.*; public class GemzL_OSBubbleBang07 extends SoundAsset { } }//package
Section 233
//GemzL_OSBubbleBang09 (GemzL_OSBubbleBang09) package { import mx.core.*; public class GemzL_OSBubbleBang09 extends SoundAsset { } }//package
Section 234
//GemzL_OSBubbleBang10 (GemzL_OSBubbleBang10) package { import mx.core.*; public class GemzL_OSBubbleBang10 extends SoundAsset { } }//package
Section 235
//GemzL_OSBubbleBang12 (GemzL_OSBubbleBang12) package { import mx.core.*; public class GemzL_OSBubbleBang12 extends SoundAsset { } }//package
Section 236
//GemzL_OSBubbleBang14 (GemzL_OSBubbleBang14) package { import mx.core.*; public class GemzL_OSBubbleBang14 extends SoundAsset { } }//package
Section 237
//GemzL_OTB017 (GemzL_OTB017) package { import mx.core.*; public class GemzL_OTB017 extends BitmapAsset { } }//package
Section 238
//GemzL_OTB05 (GemzL_OTB05) package { import mx.core.*; public class GemzL_OTB05 extends BitmapAsset { } }//package
Section 239
//GemzL_OTBSTAR (GemzL_OTBSTAR) package { import mx.core.*; public class GemzL_OTBSTAR extends BitmapAsset { } }//package
Section 240
//GemzL_OTF01 (GemzL_OTF01) package { import mx.core.*; public class GemzL_OTF01 extends BitmapAsset { } }//package
Section 241
//GemzL_OTF02 (GemzL_OTF02) package { import mx.core.*; public class GemzL_OTF02 extends BitmapAsset { } }//package
Section 242
//GemzL_OTF03 (GemzL_OTF03) package { import mx.core.*; public class GemzL_OTF03 extends BitmapAsset { } }//package
Section 243
//GemzL_OTF04 (GemzL_OTF04) package { import mx.core.*; public class GemzL_OTF04 extends BitmapAsset { } }//package
Section 244
//GemzS (GemzS) package { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ELEMENTS.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.DISPLAY.EFFECTS.*; import RES.OBJECTS.DISPLAY.*; import flash.text.*; import ENGINE.CORE.*; import flash.filters.*; import ENGINE.SKIN.*; public class GemzS { public static const cFrame:Number = 0.98; private static const cAlign:Array = [TextFormatAlign.LEFT, TextFormatAlign.CENTER, TextFormatAlign.RIGHT]; public static var iRegistered:Boolean = GemzS.Register(); private static function Register():Boolean{ OEffects.RegisterEffect("GEL", new OEffectGel()); OEffects.RegisterColor("GEL", "red", {iCH:0, iCS:0.5, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "red1", {iCH:30, iCS:0.5, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "yellow", {iCH:60, iCS:0.6, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "yellow1", {iCH:90, iCS:0.6, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "green", {iCH:120, iCS:0.5, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "green1", {iCH:150, iCS:0.5, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "aqua", {iCH:180, iCS:0.4, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "aqua1", {iCH:210, iCS:0.4, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "blue", {iCH:240, iCS:0.3, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "blue1", {iCH:270, iCS:0.3, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "magenta", {iCH:300, iCS:0.4, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "magenta1", {iCH:330, iCS:0.4, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "white", {iCH:0, iCS:0, iCB:0.97, iSH:0, iSS:0, iSB:0.7}); OEffects.RegisterColor("GEL", "color0", {iCH:45, iCS:0.1, iCB:0.97, iSH:45, iSS:0.6, iSB:0.6}); OEffects.RegisterColor("GEL", "rcolor0", {iCH:45, iCS:0.6, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "dcolor0", {iCH:45, iCS:0.6, iCB:0.89, iSH:45, iSS:0.9, iSB:0.5}); OEffects.RegisterFilter("GEL", "bpanel", {iBorder:24, iAngle:90, iF0SD:16, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "text 22", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2}); OEffects.RegisterFilter("GEL", "text 20", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2}); OEffects.RegisterFilter("GEL", "text 30", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2}); OEffects.RegisterFilter("GEL", "text 40", {iBorder:8, iAngle:90, iF0SD:4, iF0SB:8, iF1SD:6, iF1SB:7, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:5, iF2GGC1:230, iF2GGD2:3, iF2GGB2:6, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "text 50", {iBorder:12, iAngle:90, iF0SD:5, iF0SB:10, iF1SD:7, iF1SB:8, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:6, iF2GGC1:240, iF2GGD2:4, iF2GGB2:6, iF2GGC2:130, iF2B:2}); OEffects.RegisterFilter("GEL", "text 60", {iBorder:14, iAngle:90, iF0SD:6, iF0SB:12, iF1SD:8, iF1SB:10, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:8, iF2GGC1:230, iF2GGD2:4, iF2GGB2:8, iF2GGC2:150, iF2B:2}); OEffects.RegisterFilter("GEL", "text 70", {iBorder:14, iAngle:90, iF0SD:6, iF0SB:12, iF1SD:9, iF1SB:10, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:10, iF2GGC1:230, iF2GGD2:4, iF2GGB2:10, iF2GGC2:155, iF2B:2}); OEffects.RegisterFilter("GEL", "text 80", {iBorder:15, iAngle:90, iF0SD:7, iF0SB:13, iF1SD:11, iF1SB:11, iF1GB:1, iF1GA:1, iF2GGD1:-2, iF2GGB1:12, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:160, iF2B:2}); OEffects.RegisterFilter("GEL", "text 90", {iBorder:16, iAngle:90, iF0SD:8, iF0SB:14, iF1SD:12, iF1SB:12, iF1GB:1, iF1GA:1, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:14, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "spanel", {iBorder:16, iAngle:90, iF0SD:8, iF0SB:14, iF1SD:12, iF1SB:12, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:14, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "border", {iBorder:8, iAngle:60, iF0SD:3, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2}); OEffects.RegisterFilter("GEL", "bpanel ns", {iBorder:8, iAngle:90, iF0SD:0, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "spanel ns", {iBorder:16, iAngle:90, iF0SD:0, iF0SB:16, iF1SD:12, iF1SB:16, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:180, iF2B:2}); OEffects.RegisterFilter("GEL", "border ns", {iBorder:8, iAngle:60, iF0SD:0, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2}); OEffects.RegisterEffect("PL", new OEffectPlastic()); OEffects.RegisterColor("PL", "red", {iCH:0, iCS:0.5, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "red1", {iCH:30, iCS:0.5, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "yellow", {iCH:60, iCS:0.6, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "yellow1", {iCH:90, iCS:0.6, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "green", {iCH:120, iCS:0.5, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "green1", {iCH:150, iCS:0.5, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "aqua", {iCH:180, iCS:0.4, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "aqua1", {iCH:210, iCS:0.4, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "blue", {iCH:240, iCS:0.3, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "blue1", {iCH:270, iCS:0.3, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "magenta", {iCH:300, iCS:0.4, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "magenta1", {iCH:330, iCS:0.4, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "white", {iCH:0, iCS:0, iCB:0.97, iSH:0, iSS:0, iSB:0.7}); OEffects.RegisterColor("PL", "color0", {iCH:45, iCS:0.1, iCB:0.97, iSH:45, iSS:0.6, iSB:0.6}); OEffects.RegisterColor("PL", "rcolor0", {iCH:45, iCS:0.6, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("PL", "dcolor0", {iCH:45, iCS:0.6, iCB:0.89, iSH:45, iSS:0.9, iSB:0.5}); OEffects.RegisterFilter("PL", "cell", {iBorder:14, iAngle:90, iF0SD:6, iF0SB:12, iF1SD:8, iF1SB:10, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:8, iF2GGC1:230, iF2GGD2:4, iF2GGB2:8, iF2GGC2:150, iF2B:2}); return (true); } public static function MakeSpriteButton(_arg1:Array):OButton{ var _local2:Number; var _local3:Array; var _local4:Sprite; var _local5:Sprite; var _local6:Array; var _local7:OButton; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = (new (_arg1[5]) as Sprite); _local5 = GemzS.MakeTextureSprite([_local4, _arg1[4]]); _local5.filters = _local3; _local6 = [[GemzS.MakeButtonBitmap, _local5, 1, 0, 0, 4, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local7 = new OButton(_local6); _local7.Pos(OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])); return (_local7); } public static function SmallFrame(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Sprite; var _local5:OBitmap; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = OShapes.DrawPolygon([null, _arg1[2], true, 8, 4]); _local4.filters = _local3; _local5 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, _local4], 1, 0, 0, 0], 1, "GEL", "red", "border", 1, 0, 0]); return (_local5); } public static function TextureText(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:Sprite; var _local6:TextField; var _local7:TextFormat; var _local8:Sprite; var _local9:Sprite; var _local10:OBitmap; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = Math.round((1 + (_arg1[2] / 70))); _local5 = ((GemzL.OFont is Sprite)) ? (GemzL.OFont as Sprite) : new ((GemzL.OFont as Class)); if (!(_local5.getChildAt(0) is TextField)){ return (null); }; _local6 = (_local5.getChildAt(0) as TextField); _local6.autoSize = TextFieldAutoSize.LEFT; _local6.text = _arg1[4]; _local6.antiAliasType = AntiAliasType.ADVANCED; _local7 = _local6.defaultTextFormat; _local7.size = _arg1[2]; _local7.letterSpacing = _local4; _local6.setTextFormat(_local7); _local8 = new Sprite(); _local8.addChild(_local6); _local9 = GemzS.MakeTextureSprite([_local8, _arg1[3]]); _local9.filters = _local3; _local10 = OBitmap.MakeTmp(_local9, 1, _arg1[5], _arg1[6]); return (_local10); } public static function TextureHeader1(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Sprite; var _local5:TextField; var _local6:TextFormat; var _local7:Sprite; var _local8:OBitmap; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = new Sprite(); _local5 = new TextField(); _local5.width = _arg1[2]; if (_arg1.length > 11){ _local5.wordWrap = true; _local5.height = _arg1[8]; } else { _local5.height = _arg1[3]; }; _local5.text = _arg1[5]; _local5.thickness = 150; _local5.sharpness = -100; _local6 = _local5.getTextFormat(); _local6.align = "center"; _local6.font = _arg1[1]; _local6.size = _arg1[3]; _local5.embedFonts = true; _local5.setTextFormat(_local6); _local4.addChild(_local5); _local5.antiAliasType = AntiAliasType.ADVANCED; _local7 = GemzS.MakeTextureSprite([_local4, _arg1[4]]); _local7.filters = _local3; _local8 = OBitmap.MakeTmp(_local7, 1, _arg1[6], _arg1[7]); return (_local8); } public static function TextAlignMy(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:int; var _local6:String; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = Math.round((1 + (_arg1[2] / 70))); _local5 = Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90)); _local6 = ("text " + String(_local5)); return (ODisplay.OBitmapTextAlign([null, GemzL.OFont, _arg1[3], _local4, _arg1[5], _arg1[6], _arg1[7], "GEL", _arg1[4], _local6, _arg1[8], _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[9]), OGlobal.ScaleFloor(_arg1[10])])); } public static function ListBoxTextHSlider(_arg1:Array):OListBox{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:Number; var _local6:String; var _local7:Rectangle; var _local8:Number; var _local9:Array; var _local10:Array; var _local11:Array; var _local12:Array; var _local13:OListBox; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = _arg1[6]; _local5 = Math.round((1 + (_local4 / 70))); _local6 = ("text " + String((Math.round((_local4 / 10)) * 10))); _local7 = ODisplay.TextRect(GemzL.OFont, _local4, _local5, _arg1[8]); _local8 = (_arg1[6] - 10); _local9 = (_arg1[4]) ? [[GemzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array(); _local10 = [[GemzS.TextureText, GemzL.cFontName, _local4, _arg1[3], _arg1[8], 15, ((_arg1[2] - _local7.height) * 0.5), null, 0, true], [GemzS.MakeSpriteButton, _local8, _local8, _arg1[3], _arg1[3], GemzL.OILeft, "text 60", 1, ((_arg1[1] - _arg1[5]) - 75), ((_arg1[2] - _local8) * 0.5), "iUp", 0, false], [GemzS.MakeSpriteButton, _local8, _local8, _arg1[3], _arg1[3], GemzL.OIRight, "text 60", 1, (_arg1[1] - 45), ((_arg1[2] - _local8) * 0.5), "iDown", 0, false]]; _local9 = _local9.concat(_local10); _local11 = [GemzS.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[7], "w", _arg1[7], 0, 0]; _local12 = [[((_arg1[1] - 45) - _arg1[5]), ((_arg1[2] - _arg1[6]) * 0.5)]]; _local13 = new OListBox(_local9, _local11, GemzS.ListBoxTextElementP, _local12, null); _local13.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local13.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local13.prSelection = false; _local13.prCycling = true; _local13.prLBParams = _arg1[9]; _local13.Pos(OGlobal.ScaleFloor(_arg1[10]), OGlobal.ScaleFloor(_arg1[11])); return (_local13); } public static function ColorText(_arg1:Array):OIObject{ var _local2:Number; var _local3:Array; var _local4:Array; var _local5:OIObject; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = new Array(); _local4.push([TextureText, GemzL.cFontName, _arg1[1], _arg1[2], _arg1[3], _arg1[5], _arg1[6], null, 0, true]); _local5 = new OIObject(_local4, _arg1[4]); _local5.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local5); } private static function MakeTextureSprite(_arg1:Array):Sprite{ var _local2:OBM; var _local3:Bitmap; var _local4:Sprite; var _local5:OBM; var _local6:Bitmap; var _local7:Sprite; _local2 = OBM.Make([null, [ODisplay.SpriteLib, _arg1[0]], (1 / OGlobal.Scale), 0, 0, 0]); _local3 = new ((_arg1[1] as Class)); _local4 = new Sprite(); _local4.graphics.beginBitmapFill(_local3.bitmapData); _local4.graphics.drawRect(_arg1[0].getBounds(_arg1[0]).x, _arg1[0].getBounds(_arg1[0]).y, _arg1[0].getBounds(_arg1[0]).width, _arg1[0].getBounds(_arg1[0]).height); _local4.graphics.endFill(); _local5 = OBM.Make([null, [ODisplay.SpriteLib, _local4], (1 / OGlobal.Scale), 0, 0, 0]); _local5.iBM.copyChannel(_local2.iBM, _local2.iBM.rect, new Point(_local2.iBM.rect.left, _local2.iBM.rect.top), BitmapDataChannel.ALPHA, BitmapDataChannel.ALPHA); _local6 = new Bitmap(_local5.iBM); _local7 = new Sprite(); _local7.addChild(_local6); _local6.x = _arg1[0].getBounds(_arg1[0]).x; _local6.y = _arg1[0].getBounds(_arg1[0]).y; _local6.smoothing = true; return (_local7); } public static function ListBoxTextVSlider(_arg1:Array):OListBox{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:Number; var _local6:String; var _local7:Rectangle; var _local8:Array; var _local9:Number; var _local10:Number; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:OListBox; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = _arg1[6]; _local5 = Math.round((1 + (_local4 / 70))); _local6 = ("text " + String((Math.round((_local4 / 10)) * 10))); _local7 = ODisplay.TextRect(GemzL.OFont, _local4, _local5, _arg1[9]); _local8 = [[((_arg1[1] - _arg1[5]) * 0.5), _arg1[7]]]; _local9 = (_arg1[6] - 10); _local10 = (_local8[0][1] + ((_arg1[6] - _local9) * 0.5)); _local11 = (_arg1[4]) ? [[GemzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array(); _local12 = [[ODisplay.OBitmapText, GemzL.OFont, _local4, _local5, _arg1[9], "GEL", _arg1[3], _local6, 1, ((_arg1[1] - _local7.width) * 0.5), _arg1[10], null, 0, true], [GemzS.MakeSpriteButton, _local9, _local9, _arg1[3], _arg1[3], GemzL.OILeft, "text 60", 1, (_local8[0][0] - _local9), _local10, "iUp", 0, false], [GemzS.MakeSpriteButton, _local9, _local9, _arg1[3], _arg1[3], GemzL.OIRight, "text 60", 1, (_local8[0][0] + _arg1[5]), _local10, "iDown", 0, false]]; _local11 = _local11.concat(_local12); _local13 = [GemzS.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[8], "w", _arg1[8], 0, 0]; _local14 = new OListBox(_local11, _local13, GemzS.ListBoxTextElementP, _local8, null); _local14.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local14.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local14.prSelection = false; _local14.prCycling = true; _local14.prLBParams = _arg1[11]; _local14.Pos(OGlobal.ScaleFloor(_arg1[12]), OGlobal.ScaleFloor(_arg1[13])); return (_local14); } public static function InvisibleButton(_arg1:Array):OButton{ var _local2:Number; var _local3:Array; var _local4:Array; var _local5:OButton; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = [[OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local5 = new OButton(_local4, OAnimatorManager.iNullAnimators); _local5.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); _local5.prVisible = true; _local5.prActive = true; return (_local5); } public static function CreateCursors():OBitmap{ var _local1:Number; var _local2:Array; var _local3:Sprite; var _local4:OBitmap; _local1 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local2 = [new DropShadowFilter((4 * _local1), 45, 0, 0.2), new BevelFilter((3 * _local1), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local1), (2 * _local1))]; _local3 = (new GemzL.OCURSOR1() as Sprite); _local3.filters = [new DropShadowFilter((3 * _local1), 45, 0, 0.2), new BevelFilter((2 * _local1), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local1), (2 * _local1))]; _local4 = OBitmap.MakeTmp(_local3); _local4.smoothing = true; return (_local4); } public static function BigFrame1(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Sprite; var _local5:Sprite; var _local6:Sprite; var _local7:OBitmap; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = OShapes.DrawRoundRectangle([0, 0, _arg1[1], _arg1[2], _arg1[5][0], _arg1[5][1], _arg1[5][2], _arg1[5][3], _arg1[3], true, 8, 8]); _local5 = OShapes.DrawRoundRectangle([0, 0, _arg1[1], _arg1[2], _arg1[5][0], _arg1[5][1], _arg1[5][2], _arg1[5][3], _arg1[4], false, 0, 0]); _local5.filters = _local3; _local4.filters = _local3; _local6 = new Sprite(); _local6.addChild(_local5); _local6.addChild(_local4); _local7 = OBitmap.MakeTmp(_local6, 1, 0, 0); _local7.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local7); } public static function MakeNFTextButton(_arg1:Array):OButton{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:String; var _local6:Array; var _local7:OButton; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = Math.round((1 + (_arg1[5] / 70))); _local5 = ("text " + String(Math.max((Math.round((_arg1[5] / 10)) * 10), 30))); _local6 = [[ODisplay.OBitmapTextInRect, GemzL.OFont, _arg1[5], _local4, _arg1[6], "GEL", _arg1[3], _local5, 1, _arg1[1], _arg1[2], 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (24 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local7 = new OButton(_local6); _local7.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local7); } public static function CreateCursorHand():OBitmap{ var _local1:Number; var _local2:Array; var _local3:Sprite; var _local4:OBitmap; _local1 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local2 = [new DropShadowFilter((4 * _local1), 45, 0, 0.2), new BevelFilter((3 * _local1), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local1), (2 * _local1))]; _local3 = (new GemzL.OCURSOR2() as Sprite); _local3.filters = [new DropShadowFilter((3 * _local1), 45, 0, 0.2), new BevelFilter((2 * _local1), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local1), (2 * _local1))]; _local4 = OBitmap.MakeTmp(_local3); _local4.smoothing = true; return (_local4); } public static function BigFrame(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Sprite; var _local5:Sprite; var _local6:OBitmap; var _local7:Sprite; var _local8:OBitmap; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = OShapes.DrawPolygon([GemzL.iFonts[1], _arg1[1], 0, false, _arg1[7], true, cFrame]); _local5 = OShapes.DrawPolygon([GemzL.OTB05, (_arg1[1] / OGlobal.Scale), 0, false, _arg1[7], false, 0]); _local5.filters = _local3; _local6 = OBitmap.MakeTmp(_local5); _local7 = new Sprite(); _local7.addChild(_local6); _local7.addChild(_local4); _local7.filters = _local3; _local8 = OBitmap.MakeTmp(_local7, 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local8); } public static function ListBoxTextElementP(_arg1:Array, _arg2:String):void{ _arg1[4] = _arg2; } public static function MakeButtonBitmap(_arg1:Array):OBitmap{ return (OBitmap.MakeTmp(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5])); } public static function ColorHeader(_arg1:Array):OIObject{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:Array; var _local6:OIObject; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = Math.round((1 + (_arg1[3] / 70))); _local5 = new Array(); _local5.push([TextureHeader, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[7], _arg1[6], null, 0, true]); _local6 = new OIObject(_local5, _arg1[6]); _local6.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local6); } public static function ListBoxTextElement(_arg1:Array):OListBoxElement{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:Number; var _local6:String; var _local7:Sprite; var _local8:Array; var _local9:OListBoxElement; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = (_arg1[2] - 10); if (_local4 < 30){ _local4 = 30; }; _local5 = Math.round((1 + (_local4 / 70))); _local6 = ("text " + String((Math.round((_local4 / 10)) * 10))); _local7 = OShapes.DrawRoundRectangle([0, 0, _arg1[1], _arg1[2], 0, 40, 40, 0, _arg1[3], true, 8, 8]); _local7.filters = _local3; _local8 = [[GemzS.MakeButtonBitmap, _local7, 1, 0, 0, 4, null, 0, false], [GemzS.TextureHeader, GemzL.cFontName, _arg1[1], _local4, _arg1[3], _arg1[4], 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (12 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local9 = new OListBoxElement(_local8); _local9.Pos(OGlobal.ScaleFloor(_arg1[6]), OGlobal.ScaleFloor(_arg1[7])); return (_local9); } public static function SmallBorder(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Sprite; var _local5:OBitmap; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = OShapes.DrawRoundRectangle([0, 0, _arg1[1], _arg1[2], 0, 50, 50, 0, _arg1[3], true, 8, 8]); _local4.filters = _local3; _local5 = OBitmap.MakeTmp(_local4); return (_local5); } public static function Header(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:String; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = Math.round((1 + (_arg1[2] / 70))); _local5 = ("text " + String(Math.min((Math.round((_arg1[2] / 10)) * 10), 90))); return (ODisplay.OBitmapTextInRect([null, GemzL.OFont, _arg1[2], _local4, _arg1[4], "GEL", _arg1[3], _local5, 1, _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function TextureHeader(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:Sprite; var _local6:TextField; var _local7:TextFormat; var _local8:Sprite; var _local9:Sprite; var _local10:OBitmap; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = Math.round((1 + (_arg1[2] / 70))); _local5 = ((GemzL.OFont is Sprite)) ? (GemzL.OFont as Sprite) : new ((GemzL.OFont as Class)); if (!(_local5.getChildAt(0) is TextField)){ return (null); }; _local6 = (_local5.getChildAt(0) as TextField); _local6.autoSize = TextFieldAutoSize.LEFT; _local6.text = _arg1[5]; _local6.thickness = 150; _local6.sharpness = -100; _local6.antiAliasType = AntiAliasType.ADVANCED; _local6.thickness = 150; _local6.sharpness = -100; _local7 = _local6.defaultTextFormat; _local7.size = _arg1[3]; _local7.align = "center"; _local6.width = (_local6.text.length * _arg1[3]); _local6.setTextFormat(_local7); _local8 = new Sprite(); _local8.addChild(_local6); _local8.width = _arg1[2]; _local6.x = ((_local8.width - _local6.width) / 2); _local9 = GemzS.MakeTextureSprite([_local8, _arg1[4]]); _local9.filters = _local3; _local10 = OBitmap.MakeTmp(_local9, 1, _arg1[6], _arg1[7]); return (_local10); } public static function TextAlign(_arg1:Array):OBitmap{ var _local2:Number; var _local3:Array; var _local4:OSprite; var _local5:TextField; var _local6:TextFormat; var _local7:Sprite; var _local8:Sprite; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = new OSprite(); _local5 = new TextField(); _local5.text = _arg1[5]; if (_arg1.length >= 14){ _local5.wordWrap = true; } else { _local5.height = _arg1[2]; }; _local5.width = _arg1[1]; _local5.thickness = 150; _local5.sharpness = -100; _local6 = _local5.getTextFormat(); _local6.font = GemzL.cFontName; _local5.embedFonts = true; _local6.align = cAlign[_arg1[6]]; _local6.size = _arg1[2]; _local5.setTextFormat(_local6); _local4.addChild(_local5); _local5.antiAliasType = AntiAliasType.ADVANCED; _local7 = GemzS.MakeTextureSprite([_local4, _arg1[4]]); _local8 = new Sprite(); _local8.graphics.beginFill(0, 0); _local8.graphics.drawRect(0, 0, _arg1[1], _arg1[2]); _local8.graphics.endFill(); _local8.addChild(_local7); _local7.filters = _local3; return (OBitmap.MakeTmp(_local8, 1, _arg1[8], _arg1[9])); } public static function ListBoxText(_arg1:Array):OListBox{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:Number; var _local6:Array; var _local7:Array; var _local8:Array; var _local9:int; var _local10:OListBox; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = (_arg1[1] + 80); _local5 = ((_arg1[2] * _arg1[5]) + 30); _local6 = [[GemzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], GemzL.OIUp, "text 60", 1, (_local4 - 50), 20, "iUp", 0, false], [GemzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], GemzL.OIDown, "text 60", 1, (_local4 - 50), (_local5 - 50), "iDown", 0, false]]; _local7 = [GemzS.ListBoxTextElement, _arg1[1], _arg1[2], _arg1[3], "w", _arg1[4], 0, 0]; _local8 = new Array(_arg1[5]); _local9 = 0; while (_local9 < _arg1[5]) { _local8[_local9] = [15, ((_local9 * _arg1[2]) + 15)]; _local9++; }; _local10 = new OListBox(_local6, _local7, GemzS.ListBoxTextElementP, _local8, null); _local10.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local10.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local10.prLBParams = _arg1[6]; _local10.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local10); } public static function MakeTextButton(_arg1:Array):OButton{ var _local2:Number; var _local3:Array; var _local4:Number; var _local5:String; var _local6:Sprite; var _local7:Sprite; var _local8:Array; var _local9:Array; var _local10:OButton; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = Math.round((1 + (_arg1[5] / 70))); _local5 = ("text " + String((Math.round((_arg1[5] / 10)) * 10))); _local6 = OShapes.DrawRoundRectangle([0, 0, _arg1[1], _arg1[2], _arg1[4][0], _arg1[4][1], _arg1[4][2], _arg1[4][3], _arg1[3], true, 6, 6]); _local7 = OShapes.DrawRoundRectangle([0, 0, _arg1[1], _arg1[2], _arg1[4][0], _arg1[4][1], _arg1[4][2], _arg1[4][3], _arg1[9], false, 0, 0]); _local8 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((2 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local6.filters = _local3; _local7.filters = _local8; _local9 = [[GemzS.MakeButtonBitmap, _local7, 1, 0, 0, 4, null, 0, true], [GemzS.MakeButtonBitmap, _local6, 1, 0, 0, 4, null, 0, true], [TextureHeader, GemzL.cFontName, _arg1[1], _arg1[5], _arg1[3], _arg1[6], 0, ((_arg1[2] - _arg1[5]) / 3.5), null, 0, true], [OSprite.Make, [[ODisplay.SpriteLib, _local7]], 0, 0, "iHit", 0, true]]; _local10 = new OButton(_local9); _local10.Pos(_arg1[7], _arg1[8]); return (_local10); } public static function InputText(_arg1:Array):OInput{ var _local2:Number; var _local3:Array; var _local4:Array; var _local5:OInput; _local2 = ((OGlobal.Scale <= 1)) ? OGlobal.Scale : 1; _local3 = [new DropShadowFilter((4 * _local2), 45, 0, 0.2), new BevelFilter((3 * _local2), 45, 0xFFFFFF, 0.5, 0, 0.5, (2 * _local2), (2 * _local2))]; _local4 = [[GemzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true], [OInterface.OInputTextFieldMake, (_arg1[1] - 10), (_arg1[2] - 10), GemzL.OFont, (_arg1[2] - 30), 1, false, _arg1[5], _arg1[4], _arg1[6], 5, 8, "iText", 0, true]]; _local5 = new OInput(_local4); _local5.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local5); } } }//package
Section 245
//OCGame (OCGame) package { import ENGINE.GAME.*; public class OCGame extends OGame { public function OCGame(){ super(3, 5); } override public function DefaultInitLocalScores():void{ this.iScores.Clear(0); this.iScores.AddScore("Emily", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Michael", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Jacob", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Isabella", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.AddScore("Madison", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3))); this.iScores.SortOn(0); } } }//package

Library Items

Symbol 1 Sound {GemzL_OSBubbleBang09} [GemzL_OSBubbleBang09]
Symbol 2 GraphicUsed by:3
Symbol 3 MovieClip {GemzL_OCursor} [OCursor]Uses:2
Symbol 4 Sound {GemzL_OSBubbleBang12} [GemzL_OSBubbleBang12]
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:12 28
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:7Used by:12
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClipUses:9Used by:12
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClip {GemzL_OBubble} [OBubble]Uses:6 8 10 11
Symbol 13 Sound {GemzL_OSBubbleBang03} [GemzL_OSBubbleBang03]
Symbol 14 BitmapUsed by:15
Symbol 15 GraphicUses:14Used by:16
Symbol 16 MovieClip {GemzL_OBtnSprite} [BtnSprite]Uses:15
Symbol 17 Sound {GemzL_OSBubbleBang10} [GemzL_OSBubbleBang10]
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClip {GemzL_OIUp} [OIUp]Uses:18
Symbol 20 Sound {GemzL_OSBubbleBang05} [GemzL_OSBubbleBang05]
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:23
Symbol 23 MovieClip {GemzL_OBG02} [OBG01]Uses:22
Symbol 24 Sound {GemzL_OSBubbleBang07} [GemzL_OSBubbleBang07]
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClip {GemzL_OIRight} [OIRight]Uses:25
Symbol 27 Sound {GemzL_OSBubbleBang02} [GemzL_OSBubbleBang02]
Symbol 28 MovieClip {GemzL_OBubbleShadow} [OBubbleShadow]Uses:6
Symbol 29 BitmapUsed by:30
Symbol 30 GraphicUses:29Used by:31
Symbol 31 MovieClip {GemzL_OCURSOR1} [Cursor]Uses:30
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClip {GemzL_OIDown} [OIDown]Uses:32
Symbol 34 BitmapUsed by:35
Symbol 35 GraphicUses:34Used by:36
Symbol 36 MovieClip {GemzL_OFireStone} [FireStone]Uses:35
Symbol 37 FontUsed by:38
Symbol 38 EditableTextUses:37Used by:39
Symbol 39 MovieClip {GemzL_OFont} [OFont]Uses:38
Symbol 40 BitmapUsed by:41
Symbol 41 GraphicUses:40Used by:42
Symbol 42 MovieClip {GemzL_OCURSOR2} [Cursor1]Uses:41
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClip {GemzL_OClearStone} [ClearStone]Uses:43
Symbol 45 BitmapUsed by:46
Symbol 46 GraphicUses:45Used by:47
Symbol 47 MovieClip {GemzL_OBombStone} [BombStone]Uses:46
Symbol 48 GraphicUsed by:49
Symbol 49 MovieClip {GemzL_OILeft} [OILeft]Uses:48
Symbol 50 Sound {GemzL_OSBubbleBang04} [GemzL_OSBubbleBang04]
Symbol 51 Sound {GemzL_OSBubbleBang14} [GemzL_OSBubbleBang14]
Symbol 52 Sound {GemzL_OSBubbleBang06} [GemzL_OSBubbleBang06]
Symbol 53 BitmapUsed by:54
Symbol 54 GraphicUses:53Used by:55
Symbol 55 MovieClip {GemzL_FallParticle} [FallParticle]Uses:54
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenOct} [GreenOct]Uses:56
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkStar} [PinkStar]Uses:58
Symbol 60 GraphicUsed by:61
Symbol 61 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkSq} [PinkSq]Uses:60
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaStar} [AquaStar]Uses:62
Symbol 64 GraphicUsed by:68
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClipUses:65Used by:68 143 193 203 211
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedStar2} [RedStar2]Uses:64 66 67
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedSq3} [RedSq3]Uses:69
Symbol 71 GraphicUsed by:75
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:72Used by:75 78 100 183 208
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedSq2} [RedSq2]Uses:71 73 74
Symbol 76 GraphicUsed by:78
Symbol 77 GraphicUsed by:78
Symbol 78 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagSq2} [MagSq2]Uses:76 73 77
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenStar3} [GreenStar3]Uses:79
Symbol 81 GraphicUsed by:82
Symbol 82 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedOct3} [RedOct3]Uses:81
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenSq} [GreenSq]Uses:83
Symbol 85 GraphicUsed by:89
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClipUses:86Used by:89
Symbol 88 GraphicUsed by:89
Symbol 89 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenOct2} [GreenOct2]Uses:85 87 88
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueStar} [BlueStar]Uses:90
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedSq} [DarkRedSq]Uses:92
Symbol 94 GraphicUsed by:95
Symbol 95 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGrayStar} [GrayStar]Uses:94
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedOct} [RedOct]Uses:96
Symbol 98 GraphicUsed by:100
Symbol 99 GraphicUsed by:100
Symbol 100 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueSq2} [BlueSq2]Uses:98 73 99
Symbol 101 GraphicUsed by:102
Symbol 102 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenSq3} [GreenSq3]Uses:101
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowStar} [YellowStar]Uses:103
Symbol 105 GraphicUsed by:106
Symbol 106 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagSq3} [MagSq3]Uses:105
Symbol 107 GraphicUsed by:111
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClipUses:108Used by:111
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaOct2} [AquaOct2]Uses:107 109 110
Symbol 112 GraphicUsed by:116
Symbol 113 GraphicUsed by:114
Symbol 114 MovieClipUses:113Used by:116
Symbol 115 GraphicUsed by:116
Symbol 116 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenStar2} [GreenStar2]Uses:112 114 115
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedOct} [DarkRedOct]Uses:117
Symbol 119 GraphicUsed by:120
Symbol 120 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaStar3} [AquaStar3]Uses:119
Symbol 121 GraphicUsed by:125
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClipUses:122Used by:125 200
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedOct2} [RedOct2]Uses:121 123 124
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkSq3} [PinkSq3]Uses:126
Symbol 128 GraphicUsed by:129
Symbol 129 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueStar3} [BlueStar3]Uses:128
Symbol 130 GraphicUsed by:131
Symbol 131 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedSq3} [DarkRedSq3]Uses:130
Symbol 132 GraphicUsed by:133
Symbol 133 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGrayOct} [GrayOct]Uses:132
Symbol 134 GraphicUsed by:135
Symbol 135 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagStar3} [MagStar3]Uses:134
Symbol 136 GraphicUsed by:140
Symbol 137 GraphicUsed by:138
Symbol 138 MovieClipUses:137Used by:140
Symbol 139 GraphicUsed by:140
Symbol 140 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenSq2} [GreenSq2]Uses:136 138 139
Symbol 141 GraphicUsed by:143
Symbol 142 GraphicUsed by:143
Symbol 143 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueStar2} [BlueStar2]Uses:141 66 142
Symbol 144 GraphicUsed by:145
Symbol 145 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OFireBonus} [FireBonus]Uses:144
Symbol 146 GraphicUsed by:147
Symbol 147 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaSq3} [AquaSq3]Uses:146
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaSq} [AquaSq]Uses:148
Symbol 150 GraphicUsed by:151
Symbol 151 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowSq} [YellowSq]Uses:150
Symbol 152 GraphicUsed by:153
Symbol 153 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedSq} [RedSq]Uses:152
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagOct} [MagOct]Uses:154
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkOct3} [PinkOct3]Uses:156
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowStar3} [YellowStar3]Uses:158
Symbol 160 GraphicUsed by:164
Symbol 161 GraphicUsed by:162
Symbol 162 MovieClipUses:161Used by:164 186
Symbol 163 GraphicUsed by:164
Symbol 164 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedStar2} [DarkRedStar2]Uses:160 162 163
Symbol 165 GraphicUsed by:169
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClipUses:166Used by:169
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedSq2} [DarkRedSq2]Uses:165 167 168
Symbol 170 GraphicUsed by:171
Symbol 171 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGraySq} [GraySq]Uses:170
Symbol 172 GraphicUsed by:173
Symbol 173 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowOct3} [YellowOct3]Uses:172
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagStar} [MagStar]Uses:174
Symbol 176 GraphicUsed by:180
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClipUses:177Used by:180
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaSq2} [AquaSq2]Uses:176 178 179
Symbol 181 GraphicUsed by:183
Symbol 182 GraphicUsed by:183
Symbol 183 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowSq2} [YellowSq2]Uses:181 73 182
Symbol 184 GraphicUsed by:186
Symbol 185 GraphicUsed by:186
Symbol 186 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkStar2} [PinkStar2]Uses:184 162 185
Symbol 187 GraphicUsed by:188
Symbol 188 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedStar} [RedStar]Uses:187
Symbol 189 GraphicUsed by:190
Symbol 190 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedOct3} [DarkRedOct3]Uses:189
Symbol 191 GraphicUsed by:193
Symbol 192 GraphicUsed by:193
Symbol 193 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagStar2} [MagStar2]Uses:191 66 192
Symbol 194 GraphicUsed by:195
Symbol 195 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkStar3} [PinkStar3]Uses:194
Symbol 196 GraphicUsed by:197
Symbol 197 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenStar} [GreenStar]Uses:196
Symbol 198 GraphicUsed by:200
Symbol 199 GraphicUsed by:200
Symbol 200 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkOct2} [PinkOct2]Uses:198 123 199
Symbol 201 GraphicUsed by:203
Symbol 202 GraphicUsed by:203
Symbol 203 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowStar2} [YellowStar2]Uses:201 66 202
Symbol 204 GraphicUsed by:205
Symbol 205 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowOct} [YellowOct]Uses:204
Symbol 206 GraphicUsed by:208
Symbol 207 GraphicUsed by:208
Symbol 208 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkSq2} [PinkSq2]Uses:206 73 207
Symbol 209 GraphicUsed by:211
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaStar2} [AquaStar2]Uses:209 66 210
Symbol 212 GraphicUsed by:213
Symbol 213 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueSq} [BlueSq]Uses:212
Symbol 214 GraphicUsed by:215
Symbol 215 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueOct} [BlueOct]Uses:214
Symbol 216 GraphicUsed by:217
Symbol 217 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OPinkOct} [PinkOct]Uses:216
Symbol 218 GraphicUsed by:219
Symbol 219 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaOct} [AquaOct]Uses:218
Symbol 220 GraphicUsed by:221
Symbol 221 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueSq3} [BlueSq3]Uses:220
Symbol 222 GraphicUsed by:226
Symbol 223 GraphicUsed by:224
Symbol 224 MovieClipUses:223Used by:226
Symbol 225 GraphicUsed by:226
Symbol 226 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagOct2} [MagOct2]Uses:222 224 225
Symbol 227 GraphicUsed by:228
Symbol 228 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OGreenOct3} [GreenOct3]Uses:227
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OClearBonus} [ClearBonus]Uses:229
Symbol 231 GraphicUsed by:235
Symbol 232 GraphicUsed by:233
Symbol 233 MovieClipUses:232Used by:235
Symbol 234 GraphicUsed by:235
Symbol 235 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedOct2} [DarkRedOct2]Uses:231 233 234
Symbol 236 GraphicUsed by:240
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClipUses:237Used by:240
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowOct2} [YellowOct2]Uses:236 238 239
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedStar} [DarkRedStar]Uses:241
Symbol 243 GraphicUsed by:244
Symbol 244 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagSq} [MagSq]Uses:243
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ODarkRedStar3} [DarkRedStar3]Uses:245
Symbol 247 GraphicUsed by:251
Symbol 248 GraphicUsed by:249
Symbol 249 MovieClipUses:248Used by:251
Symbol 250 GraphicUsed by:251
Symbol 251 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBombBonus} [BombBonus]Uses:247 249 250
Symbol 252 GraphicUsed by:256
Symbol 253 GraphicUsed by:254
Symbol 254 MovieClipUses:253Used by:256
Symbol 255 GraphicUsed by:256
Symbol 256 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueOct2} [BlueOct2]Uses:252 254 255
Symbol 257 GraphicUsed by:258
Symbol 258 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OBlueOct3} [BlueOct3]Uses:257
Symbol 259 GraphicUsed by:260
Symbol 260 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OAquaOct3} [AquaOct3]Uses:259
Symbol 261 GraphicUsed by:262
Symbol 262 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_ORedStar3} [RedStar3]Uses:261
Symbol 263 GraphicUsed by:264
Symbol 264 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OMagOct3} [MagOct3]Uses:263
Symbol 265 GraphicUsed by:266
Symbol 266 MovieClip {RES.OBJECTS.LEVELS.OStoneSprites_OYellowSq3} [YellowSq3]Uses:265
Symbol 267 Bitmap {GemzL_OBG22}
Symbol 268 Bitmap {GemzL_OF006}
Symbol 269 Bitmap {GemzL_OBG5}
Symbol 270 Bitmap {GemzL_OTF04}
Symbol 271 Bitmap {GemzL_OBG21}
Symbol 272 Bitmap {GemzL_OTB05}
Symbol 273 Bitmap {GemzL_OBG23}
Symbol 274 Bitmap {GemzL_OBG24}
Symbol 275 Bitmap {GemzL_OBG8}
Symbol 276 Bitmap {GemzL_OTF02}
Symbol 277 Bitmap {GemzL_OF005}
Symbol 278 Bitmap {GemzL_OTBSTAR}
Symbol 279 Bitmap {GemzL_OBG15}
Symbol 280 Bitmap {GemzL_OBG9}
Symbol 281 Bitmap {GemzL_OTF01}
Symbol 282 Bitmap {GemzL_OF004}
Symbol 283 Bitmap {GemzL_OTB017}
Symbol 284 Bitmap {GemzL_OBG17}
Symbol 285 Bitmap {GemzL_OBG11}
Symbol 286 Bitmap {GemzL_OBG18}
Symbol 287 Bitmap {GemzL_OBG16}
Symbol 288 Bitmap {GemzL_OBG}
Symbol 289 Bitmap {GemzL_OBG1}
Symbol 290 Bitmap {GemzL_OBG19}
Symbol 291 Bitmap {GemzL_OBG20}
Symbol 292 Bitmap {GemzL_OBG10}
Symbol 293 Bitmap {GemzL_OBG6}

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 1 as "GemzL_OSBubbleBang09"
ExportAssets (56)Timeline Frame 1Symbol 3 as "OCursor"
ExportAssets (56)Timeline Frame 1Symbol 4 as "GemzL_OSBubbleBang12"
ExportAssets (56)Timeline Frame 1Symbol 12 as "OBubble"
ExportAssets (56)Timeline Frame 1Symbol 13 as "GemzL_OSBubbleBang03"
ExportAssets (56)Timeline Frame 1Symbol 16 as "BtnSprite"
ExportAssets (56)Timeline Frame 1Symbol 17 as "GemzL_OSBubbleBang10"
ExportAssets (56)Timeline Frame 1Symbol 19 as "OIUp"
ExportAssets (56)Timeline Frame 1Symbol 20 as "GemzL_OSBubbleBang05"
ExportAssets (56)Timeline Frame 1Symbol 23 as "OBG01"
ExportAssets (56)Timeline Frame 1Symbol 24 as "GemzL_OSBubbleBang07"
ExportAssets (56)Timeline Frame 1Symbol 26 as "OIRight"
ExportAssets (56)Timeline Frame 1Symbol 27 as "GemzL_OSBubbleBang02"
ExportAssets (56)Timeline Frame 1Symbol 28 as "OBubbleShadow"
ExportAssets (56)Timeline Frame 1Symbol 31 as "Cursor"
ExportAssets (56)Timeline Frame 1Symbol 33 as "OIDown"
ExportAssets (56)Timeline Frame 1Symbol 36 as "FireStone"
ExportAssets (56)Timeline Frame 1Symbol 39 as "OFont"
ExportAssets (56)Timeline Frame 1Symbol 42 as "Cursor1"
ExportAssets (56)Timeline Frame 1Symbol 44 as "ClearStone"
ExportAssets (56)Timeline Frame 1Symbol 47 as "BombStone"
ExportAssets (56)Timeline Frame 1Symbol 49 as "OILeft"
ExportAssets (56)Timeline Frame 1Symbol 50 as "GemzL_OSBubbleBang04"
ExportAssets (56)Timeline Frame 1Symbol 51 as "GemzL_OSBubbleBang14"
ExportAssets (56)Timeline Frame 1Symbol 52 as "GemzL_OSBubbleBang06"
ExportAssets (56)Timeline Frame 1Symbol 55 as "FallParticle"
ExportAssets (56)Timeline Frame 1Symbol 57 as "GreenOct"
ExportAssets (56)Timeline Frame 1Symbol 59 as "PinkStar"
ExportAssets (56)Timeline Frame 1Symbol 61 as "PinkSq"
ExportAssets (56)Timeline Frame 1Symbol 63 as "AquaStar"
ExportAssets (56)Timeline Frame 1Symbol 68 as "RedStar2"
ExportAssets (56)Timeline Frame 1Symbol 70 as "RedSq3"
ExportAssets (56)Timeline Frame 1Symbol 75 as "RedSq2"
ExportAssets (56)Timeline Frame 1Symbol 78 as "MagSq2"
ExportAssets (56)Timeline Frame 1Symbol 80 as "GreenStar3"
ExportAssets (56)Timeline Frame 1Symbol 82 as "RedOct3"
ExportAssets (56)Timeline Frame 1Symbol 84 as "GreenSq"
ExportAssets (56)Timeline Frame 1Symbol 89 as "GreenOct2"
ExportAssets (56)Timeline Frame 1Symbol 91 as "BlueStar"
ExportAssets (56)Timeline Frame 1Symbol 93 as "DarkRedSq"
ExportAssets (56)Timeline Frame 1Symbol 95 as "GrayStar"
ExportAssets (56)Timeline Frame 1Symbol 97 as "RedOct"
ExportAssets (56)Timeline Frame 1Symbol 100 as "BlueSq2"
ExportAssets (56)Timeline Frame 1Symbol 102 as "GreenSq3"
ExportAssets (56)Timeline Frame 1Symbol 104 as "YellowStar"
ExportAssets (56)Timeline Frame 1Symbol 106 as "MagSq3"
ExportAssets (56)Timeline Frame 1Symbol 111 as "AquaOct2"
ExportAssets (56)Timeline Frame 1Symbol 116 as "GreenStar2"
ExportAssets (56)Timeline Frame 1Symbol 118 as "DarkRedOct"
ExportAssets (56)Timeline Frame 1Symbol 120 as "AquaStar3"
ExportAssets (56)Timeline Frame 1Symbol 125 as "RedOct2"
ExportAssets (56)Timeline Frame 1Symbol 127 as "PinkSq3"
ExportAssets (56)Timeline Frame 1Symbol 129 as "BlueStar3"
ExportAssets (56)Timeline Frame 1Symbol 131 as "DarkRedSq3"
ExportAssets (56)Timeline Frame 1Symbol 133 as "GrayOct"
ExportAssets (56)Timeline Frame 1Symbol 135 as "MagStar3"
ExportAssets (56)Timeline Frame 1Symbol 140 as "GreenSq2"
ExportAssets (56)Timeline Frame 1Symbol 143 as "BlueStar2"
ExportAssets (56)Timeline Frame 1Symbol 145 as "FireBonus"
ExportAssets (56)Timeline Frame 1Symbol 147 as "AquaSq3"
ExportAssets (56)Timeline Frame 1Symbol 149 as "AquaSq"
ExportAssets (56)Timeline Frame 1Symbol 151 as "YellowSq"
ExportAssets (56)Timeline Frame 1Symbol 153 as "RedSq"
ExportAssets (56)Timeline Frame 1Symbol 155 as "MagOct"
ExportAssets (56)Timeline Frame 1Symbol 157 as "PinkOct3"
ExportAssets (56)Timeline Frame 1Symbol 159 as "YellowStar3"
ExportAssets (56)Timeline Frame 1Symbol 164 as "DarkRedStar2"
ExportAssets (56)Timeline Frame 1Symbol 169 as "DarkRedSq2"
ExportAssets (56)Timeline Frame 1Symbol 171 as "GraySq"
ExportAssets (56)Timeline Frame 1Symbol 173 as "YellowOct3"
ExportAssets (56)Timeline Frame 1Symbol 175 as "MagStar"
ExportAssets (56)Timeline Frame 1Symbol 180 as "AquaSq2"
ExportAssets (56)Timeline Frame 1Symbol 183 as "YellowSq2"
ExportAssets (56)Timeline Frame 1Symbol 186 as "PinkStar2"
ExportAssets (56)Timeline Frame 1Symbol 188 as "RedStar"
ExportAssets (56)Timeline Frame 1Symbol 190 as "DarkRedOct3"
ExportAssets (56)Timeline Frame 1Symbol 193 as "MagStar2"
ExportAssets (56)Timeline Frame 1Symbol 195 as "PinkStar3"
ExportAssets (56)Timeline Frame 1Symbol 197 as "GreenStar"
ExportAssets (56)Timeline Frame 1Symbol 200 as "PinkOct2"
ExportAssets (56)Timeline Frame 1Symbol 203 as "YellowStar2"
ExportAssets (56)Timeline Frame 1Symbol 205 as "YellowOct"
ExportAssets (56)Timeline Frame 1Symbol 208 as "PinkSq2"
ExportAssets (56)Timeline Frame 1Symbol 211 as "AquaStar2"
ExportAssets (56)Timeline Frame 1Symbol 213 as "BlueSq"
ExportAssets (56)Timeline Frame 1Symbol 215 as "BlueOct"
ExportAssets (56)Timeline Frame 1Symbol 217 as "PinkOct"
ExportAssets (56)Timeline Frame 1Symbol 219 as "AquaOct"
ExportAssets (56)Timeline Frame 1Symbol 221 as "BlueSq3"
ExportAssets (56)Timeline Frame 1Symbol 226 as "MagOct2"
ExportAssets (56)Timeline Frame 1Symbol 228 as "GreenOct3"
ExportAssets (56)Timeline Frame 1Symbol 230 as "ClearBonus"
ExportAssets (56)Timeline Frame 1Symbol 235 as "DarkRedOct2"
ExportAssets (56)Timeline Frame 1Symbol 240 as "YellowOct2"
ExportAssets (56)Timeline Frame 1Symbol 242 as "DarkRedStar"
ExportAssets (56)Timeline Frame 1Symbol 244 as "MagSq"
ExportAssets (56)Timeline Frame 1Symbol 246 as "DarkRedStar3"
ExportAssets (56)Timeline Frame 1Symbol 251 as "BombBonus"
ExportAssets (56)Timeline Frame 1Symbol 256 as "BlueOct2"
ExportAssets (56)Timeline Frame 1Symbol 258 as "BlueOct3"
ExportAssets (56)Timeline Frame 1Symbol 260 as "AquaOct3"
ExportAssets (56)Timeline Frame 1Symbol 262 as "RedStar3"
ExportAssets (56)Timeline Frame 1Symbol 264 as "MagOct3"
ExportAssets (56)Timeline Frame 1Symbol 266 as "YellowSq3"
SerialNumber (41)Timeline Frame 1

Labels

"Gemz"Frame 1




http://swfchan.com/20/99108/info.shtml
Created: 22/3 -2019 03:56:26 Last modified: 22/3 -2019 03:56:26 Server time: 09/05 -2024 16:14:01