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

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

Triadz.swf

This is the info page for
Flash #100227

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


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

ActionScript [AS3]

Section 1
//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 2
//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 3
//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 4
//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 5
//OSystem (ENGINE.CORE.OSystem) package ENGINE.CORE { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.text.*; 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 6
//OUtils (ENGINE.CORE.OUtils) package ENGINE.CORE { 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 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 7
//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 8
//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 9
//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 10
//OBitmap (ENGINE.DISPLAY.OBitmap) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import ENGINE.CORE.*; import flash.text.*; 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 11
//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:Number; var _local9:Number; var _local10:BitmapData; var _local11: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 = Math.floor(_local7.x); _local9 = Math.floor(_local7.y); _local10 = new BitmapData(((_local7.width + 4) + (_arg1[5] * 2)), ((_local7.height + 4) + (_arg1[5] * 2)), true, 0); _local11 = new Matrix(1, 0, 0, 1, ((-(_local8) + 1) + _arg1[5]), ((-(_local9) + 1) + _arg1[5])); _local10.draw(_local2, _local11); return (new OBM(_local10, (((_local8 - _local5) - 1) - _arg1[5]), (((_local9 - _local6) - 1) - _arg1[5]), _local7.width, _local7.height)); } } }//package ENGINE.DISPLAY
Section 12
//ODisplay (ENGINE.DISPLAY.ODisplay) package ENGINE.DISPLAY { import flash.display.*; import flash.geom.*; import ENGINE.DISPLAY.EFFECTS.*; import ENGINE.CORE.*; import flash.text.*; 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 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{ 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]]]])); } 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 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 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 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 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 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 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 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 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 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 13
//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 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 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 14
//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 prMusicVolume(_arg1:Number):void{ OSound.MusicVolume = _arg1; this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, _arg1); } public function set prMode(_arg1:int):void{ this.iPlayer.iMode = _arg1; } public function get prPlayerNames():Array{ return (this.iCache.GetCategoryNames(catPlayers)); } public function get prLevelScore():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore); } 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 prGamesStartCount():int{ return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart); } 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 DeletePlayer(_arg1:String):String{ var _local2:Array; this.iCache.DeleteCategoryItem(catPlayers, _arg1); if (_arg1 == this.iPlayer.iName){ _local2 = this.iCache.GetCategoryNames(catPlayers); if (!_local2){ this.iPlayer = null; return (null); }; this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local2[0]); }; return (this.iPlayer.iName); } 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 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 get prRNDFactor():int{ return (this.iPlayer.iRNDFactor); } 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 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 prMode():int{ return (this.iPlayer.iMode); } public function IsPersonalRecord(_arg1:int, _arg2:int):Boolean{ return (this.iPlayer.iScoreTable.IsRecord(_arg1, _arg2)); } 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(_slot1.catGlobal, _slot1.strgLocalScores, this.iScores); _local2 = true; }; if (this.iPlayer.iScoreTable.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel, true)){ this.iCache.SetCategoryItem(_slot1.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{ } 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 prFullScreen(_arg1:Boolean):void{ this.iCache.SetCategoryItem(catGlobal, strgFullScreen, _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 15
//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 16
//OPlayer (ENGINE.GAME.OPlayer) package ENGINE.GAME { public class OPlayer { public var iGParams:Array; public var iScoreTable:OScoresTable; public var iMode:int; public var iRNDFactor:int; public var iName:String; public function OPlayer(_arg1:String=null, _arg2:int=1, _arg3:int=10, _arg4:int=10){ var _local5:int; super(); this.iName = _arg1; this.iGParams = new Array(_arg2); this.iRNDFactor = Math.round((Math.random() * (_arg4 - 1))); _local5 = 0; while (_local5 < _arg2) { this.iGParams[_local5] = new OGameParams(); _local5++; }; this.iScoreTable = new OScoresTable(_arg2, _arg3); } } }//package ENGINE.GAME
Section 17
//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 18
//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 19
//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 20
//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 21
//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 22
//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 23
//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 24
//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 25
//OInputTextField (ENGINE.INTERFACE.ELEMENTS.OInputTextField) package ENGINE.INTERFACE.ELEMENTS { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import ENGINE.CORE.*; import flash.text.*; 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; _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.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.addEventListener(TextEvent.TEXT_INPUT, OnTextInput); } public function set prText(_arg1:String):void{ this.text = (((!(_arg1)) || ((_arg1 == "")))) ? " " : _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); } protected function OnTextInput(_arg1:TextEvent):void{ if (_arg1.text.charCodeAt(0) >= 160){ _arg1.preventDefault(); }; } } }//package ENGINE.INTERFACE.ELEMENTS
Section 26
//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){ return; }; super.OnMouseDown(_arg1); } } }//package ENGINE.INTERFACE.ELEMENTS
Section 27
//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 28
//OApplication (ENGINE.INTERFACE.OApplication) package ENGINE.INTERFACE { import flash.events.*; import flash.display.*; import ENGINE.CORE.*; import flash.external.*; public class OApplication extends OWindow { protected var iBackground:OBackground; private var iMenuItem:Array; public function OApplication(_arg1:String){ OGlobal.AppName = _arg1; OGlobal.SetDomain(); this.InitStage(); super(null); } override public function Init():void{ super.Init(); this.iMenuItem = new Array(); this.visible = true; } protected function OnMenuItem():void{ } public function get prMenuItem():int{ return ((this.iMenuItem.length) ? this.iMenuItem.pop() : 0); } 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.addChild(this.iBackground); } protected function OnDeactivate(_arg1:Event):void{ } public function InitStage(_arg1:Stage=null):void{ 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){ 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 29
//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 30
//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 31
//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 32
//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 33
//OInput (ENGINE.INTERFACE.OInput) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; public class OInput extends OIObject { public var iText:OInputTextField; public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.5, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, null, null]; public function OInput(_arg1:Array, _arg2:Array=null){ var _local3:Array; _local3 = ((_arg2)==null) ? _slot1.iDefAnimators : _arg2; super(_arg1, _local3); } public function set prText(_arg1:String):void{ this.iText.prText = _arg1; } public function get prText():String{ return (this.iText.prText); } } }//package ENGINE.INTERFACE
Section 34
//OInterface (ENGINE.INTERFACE.OInterface) package ENGINE.INTERFACE { import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; public class OInterface { 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 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 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 OTabMake(_arg1:Array):OTab{ return (new OTab(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5])); } 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 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 OProgressMake(_arg1:Array):OProgress{ return (new OProgress(_arg1[1], _arg1[2])); } public static function OCounterMake(_arg1:Array):OCounter{ return (new OCounter(_arg1[1], _arg1[2], _arg1[3], _arg1[4])); } } }//package ENGINE.INTERFACE
Section 35
//OIObject (ENGINE.INTERFACE.OIObject) package ENGINE.INTERFACE { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; 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){ return (false); }; if (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{ this.Pos(OGlobal.ScaleFloor(((_arg1 - this.prWidth) / 2)), OGlobal.ScaleFloor(((_arg2 - this.prHeight) / 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 36
//OListBox (ENGINE.INTERFACE.OListBox) package ENGINE.INTERFACE { import flash.events.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; import ENGINE.CORE.*; public class OListBox extends OIObject { private var iLBParams:Array; private var iEGenP:Function; private var iElements:Array; public var iDown:OButton; private var iEGen:Array; public var iUp:OButton; private var iEShowInd:int; private var iSelection:Boolean;// = true private var iECoord:Array; private var iECount:int; private var iCycling:Boolean; private var iECurInd:int; 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 (_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++; }; } 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; }; }; }; } 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(-1)))){ this.InitElements(); }; if ((((_arg2 == this.iDown)) && (this.SkipElements(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 37
//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 38
//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 39
//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 40
//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 41
//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.*; public class OMultiplayer extends SmartFoxClient { private var iUserReiting:int; private var iError:String; private var iUsersCount:int; private var iErrorsCount:int; private var iAdress:String; private var iXTName:String; private var iCounter:int; private var iCMessages:Array; private var iName:String; private var iTurn:String; private var iState:int; private var iGameType:int; private var iZoneName:String; private var iOpponent:String; public static const stJoinMainRoom:int = 5; public static const stInGame:int = 13; public static const stLogin:int = 3; public static const cmdExitGameRoom:String = "egr"; public static const cmdZoneUsersCount:String = "zuc"; public static const cmdJoinChatRoom:String = "jcr"; public static const stNone:int = 0; public static const stMainRoomError:int = 6; public static const stChatRoomError:int = 16; public static const stInSPGame:int = 8; public static const cmdJoinMainRoom:String = "jmr"; public static const stBreakGame:int = 14; public static const stJoinChatRoom:int = 15; public static const stConnection:int = 1; public static const stLoginError:int = 4; public static const stInChat:int = 17; public static const stConnectionError:int = 2; public static const cmdMakeTurn:String = "m"; public static const stInZone:int = 7; public static const cmdJoinGameRoom:String = "jgr"; public static const cmdChatMessage:String = "cm"; public static const stGameRoomError:int = 10; public static const stBreakFindOpponent:int = 12; public static const stInFindOpponent:int = 11; public static const stJoinGameRoom:int = 9; public function OMultiplayer(_arg1:Boolean=false){ super(_arg1); this.State = stNone; } private function OnConnectionLost(_arg1:SFSEvent):void{ this.State = stNone; } public function get prErrorsCount():int{ return (this.iErrorsCount); } public function get prActiveRoomID():int{ return (this.activeRoomId); } public function get prError():String{ return (this.iError); } public function get prChatMessage():String{ return (((this.iCMessages.length)==0) ? null : this.iCMessages.splice(0, 1)[0]); } public function Init(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{ if (((!(OGlobal.CheckDomain(_arg1))) || (!((this.iState == stNone))))){ return; }; this.iAdress = _arg2; this.iZoneName = _arg3; this.iXTName = _arg4; this.iName = _arg5; this.iCMessages = new Array(); addEventListener(SFSEvent.onConnection, OnConnection); addEventListener(SFSEvent.onConnectionLost, OnConnectionLost); addEventListener(SFSEvent.onExtensionResponse, OnExtensionResponse); this.State = stConnection; } public function set prOpponentTurn(_arg1:String):void{ this.iTurn = _arg1; } private function OnConnection(_arg1:SFSEvent):void{ if (!_arg1.params.success){ this.iError = _arg1.params.error; this.iErrorsCount++; }; this.State = (_arg1.params.success) ? stLogin : stConnectionError; } 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.activeRoomId = -1; this.State = stMainRoomError; }; break; case cmdZoneUsersCount: this.iUsersCount = _local2[2]; break; case cmdJoinGameRoom: switch (Number(_local2[2])){ case 0: this.activeRoomId = -1; this.playerId = -1; this.iOpponent = null; this.State = _slot1.stGameRoomError; break; case 1: this.activeRoomId = _local2[3]; this.playerId = _local2[4]; this.iOpponent = _local2[5]; this.State = _slot1.stInGame; break; case 2: this.activeRoomId = _local2[3]; this.playerId = -1; this.iOpponent = null; this.State = _slot1.stInFindOpponent; break; }; break; case cmdExitGameRoom: switch (this.iState){ case stInFindOpponent: this.State = stBreakFindOpponent; break; case stInGame: this.State = stBreakGame; break; }; break; case cmdMakeTurn: this.iTurn = _local2[2]; break; case cmdJoinChatRoom: if (_local2[2]){ this.activeRoomId = _local2[3]; this.State = stInChat; } else { this.activeRoomId = -1; this.State = stChatRoomError; }; break; case cmdChatMessage: this.iCMessages.push(_local2[2]); break; }; } public function get prGameType():int{ return (this.iGameType); } public function ChatMessage(_arg1:Array=null):void{ if (this.iState == stInChat){ this.sendXtMessage(this.iXTName, _slot1.cmdChatMessage, (_arg1) ? [_arg1.toString()] : ["0"], "str"); }; } public function get State():int{ return (this.iState); } public function get prUsersCount():int{ return (this.iUsersCount); } public function Free():void{ 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, _slot1.cmdMakeTurn, (_arg1) ? [_arg1.toString()] : ["0"], "str"); }; } public function get prOpponentTurn():String{ return (this.iTurn); } public function set prUserReiting(_arg1:int):void{ this.iUserReiting = _arg1; } public function OnEnterFrame():void{ if (((!(this.isConnected)) && ((this.iState > 0)))){ this.iState = stNone; }; switch (this.iState){ case stInZone: if ((this.iCounter++ % (OGlobal.FPS * 120)) == 0){ this.cmdSend(cmdZoneUsersCount); }; break; case stInSPGame: if ((this.iCounter++ % (OGlobal.FPS * 120)) == 0){ this.cmdSend(cmdZoneUsersCount); }; break; }; } public function get prPlayerID():int{ return (this.playerId); } public function set State(_arg1:int):void{ var aState = _arg1; if ((((aState > stConnection)) && (!(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); } catch(error:Error) { OSystem.iUserText2 = "connect error"; this.State = stConnectionError; }; break; case stLogin: this.login(this.iZoneName, this.iName, ""); break; case stJoinMainRoom: this.cmdSend(cmdJoinMainRoom); break; case stInZone: this.iCounter = 0; break; case stInSPGame: this.iCounter = 0; break; case stJoinGameRoom: this.cmdSend(cmdJoinGameRoom, [this.iGameType, this.iUserReiting]); break; case stJoinChatRoom: this.cmdSend(cmdJoinChatRoom); break; }; } public function get prOpponentName():String{ return ((this.iOpponent) ? this.iOpponent.slice(0, (this.iOpponent.length - 3)) : "..."); } private function cmdSend(_arg1:String, _arg2:Array=null):void{ if (this.iState > stLoginError){ this.sendXtMessage(this.iXTName, _arg1, (_arg2) ? _arg2 : [], "str"); }; } public function set prGameType(_arg1:int):void{ this.iGameType = _arg1; } public function get prUserReiting():int{ return (this.iUserReiting); } } }//package ENGINE.SMARTFOX
Section 42
//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 43
//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 44
//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 45
//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 46
//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 47
//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 48
//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 49
//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 50
//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 51
//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 52
//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 53
//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 54
//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 55
//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 56
//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 57
//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 it.gotoandplay.smartfoxserver.json.*; import flash.utils.*; 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 58
//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.0.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 59
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 60
//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 61
//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 62
//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 63
//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.0.0"; } }//package mx.core
Section 64
//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.0.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 65
//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.0.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 66
//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 67
//CParticle (RES.OBJECTS.Particle.CParticle) package RES.OBJECTS.Particle { public interface CParticle { function onTimer():void; } }//package RES.OBJECTS.Particle
Section 68
//CParticleContainer (RES.OBJECTS.Particle.CParticleContainer) package RES.OBJECTS.Particle { import ENGINE.DISPLAY.*; import flash.events.*; import RES.*; public class CParticleContainer extends OSprite { private var aParticlesList:Array; private var gGame:GGame; public function CParticleContainer(_arg1:GGame){ this.gGame = _arg1; aParticlesList = new Array(); super(); addEventListener(Event.ENTER_FRAME, onTimer); } public function removeParticle(_arg1:CParticle):void{ var _local2:int; _local2 = 0; while (_local2 < aParticlesList.length) { if (aParticlesList[_local2] == _arg1){ if (gGame.numChildren > 0){ gGame.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; gGame.addChild((_local4 as OSprite)); } override public function Free():void{ this.removeEventListener(Event.ENTER_FRAME, onTimer); super.Free(); } public function onTimer(_arg1:Event):void{ var _local2:int; _local2 = 0; while (_local2 < aParticlesList.length) { (aParticlesList[_local2] as CParticle).onTimer(); _local2++; }; } public function 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; gGame.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; gGame.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; gGame.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; gGame.addChild((_local6 as OSprite)); _local7 = (_local7 + 4); }; } } }//package RES.OBJECTS.Particle
Section 69
//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; private var direct:int; public function CSimpleFallParticle(_arg1:int, _arg2:CParticleContainer){ this.cParticleContainer = _arg2; super(); gBitmap = new OBitmap(); gBitmap.CopyFrom(CPrototypeFactory.aParticles[0]); this.addChild(gBitmap); this.dAlpha = 0.04; this.direct = Math.floor((Math.random() * 8)); this.alpha = ((Math.random() * 0.8) + 0.1); } public function onTimer():void{ this.alpha = (this.alpha - (this.dAlpha / 2)); if (this.alpha <= 0){ cParticleContainer.removeParticle(this); }; this.dx = (Math.random() * 4); this.dy = (Math.random() * 4); switch (this.direct){ case 0: this.prX = (this.prX + dx); break; case 1: (this.prY + dy); break; case 2: this.prY = (this.prY - dy); break; case 3: this.prX = (this.prX - dx); break; case 4: this.prX = (this.prX + dx); this.prY = (this.prY + dy); break; case 5: this.prX = (this.prX - dx); this.prY = (this.prY + dy); break; case 6: this.prX = (this.prX + dx); this.prY = (this.prY - dy); break; case 7: this.prX = (this.prX - dx); this.prY = (this.prY - dy); break; }; } } }//package RES.OBJECTS.Particle
Section 70
//CBackground (RES.OBJECTS.CBackground) package RES.OBJECTS { import ENGINE.DISPLAY.*; public class CBackground extends OSprite { private var iTriangles:Array; private var iColors:Array; private var iTCnt:int;// = 60 private var iState:int; private static const iTAlpha:Number = 0.25; public static const stNormal:int = 100; public static const stShow:int = 101; public function CBackground(){ iTCnt = 60; iColors = new Array("aqua", "red", "yellow", "magenta", "green", "aqua1", "red1", "yellow1", "magenta1", "green1", "white"); super(); CreateBitmap(); this.State = stShow; } private function MakeTriangle():OBitmap{ var _local1:OBitmap; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:int; var _local7:String; _local1 = new OBitmap(); _local2 = (Math.random() + 1); _local3 = (Math.random() * 360); _local4 = (Math.random() * 750); _local5 = (Math.random() * 550); _local6 = Math.floor((Math.random() * this.iColors.length)); _local7 = this.iColors[_local6]; _local1 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, _local3, 25, 25], _local2, "GEL", _local7, "spanel", 1, 0, 0]); _local1.Pos(_local4, _local5); _local1.alpha = iTAlpha; return (_local1); } private function CreateBitmap():void{ var _local1:int; var _local2:OBitmap; this.iTriangles = new Array(); _local1 = 0; while (_local1 < iTCnt) { _local2 = MakeTriangle(); this.iTriangles.push(_local2); _local1++; }; } public function get State():int{ return (this.iState); } override public function Free():void{ this.iTriangles = null; } public function set State(_arg1:int):void{ var _local2:int; var _local3:OBitmap; this.iState = _arg1; switch (_arg1){ case stShow: _local2 = 0; while (_local2 < iTCnt) { _local3 = new OBitmap(); _local3.CopyFrom(this.iTriangles[_local2]); _local3.alpha = CBackground.iTAlpha; this.addChild(_local3); _local2++; }; break; case stNormal: while (this.numChildren > 0) { this.removeChildAt((this.numChildren - 1)); }; break; }; } } }//package RES.OBJECTS
Section 71
//CPrototypeFactory (RES.OBJECTS.CPrototypeFactory) package RES.OBJECTS { import ENGINE.DISPLAY.*; import flash.display.*; import RES.*; public class CPrototypeFactory { public static var gEnemyCellBack:OBitmap; public static var aParticles:Array; public static var gCellBack:OBitmap; public static var gEnemyCellRing:OBitmap; public static var gCellRing:OBitmap; public static function createCellBack(_arg1:int):OBitmap{ if (_arg1 < 50){ return (TriadzS.createSimpleCellWithoutBorder(_arg1)); }; return (TriadzS.SmallFrame([null, _arg1, _arg1, GDefine.iBackColor, GDefine.iBackColor, 0, 0])); } public static function createBitmaps(_arg1:int):void{ CPrototypeFactory.createParticleBitmaps(); } public static function createParticleBitmaps(_arg1:int=1):void{ var _local2:Array; var _local3:Array; var _local4:Array; var _local5:Number; var _local6:int; CPrototypeFactory.aParticles = new Array(); _local2 = [ODisplay.SpriteLib, TriadzL.FallParticle]; _local3 = [ODisplay.SpriteScale, _local2, 1, 0, 0, 0]; _local4 = GDefine.iFieldH; _local5 = (10 / GDefine.iFieldH[TriadzL.iGAME.prLevel]); _local6 = 0; while (_local6 < _arg1) { CPrototypeFactory.aParticles.push(ODisplay.OBitmapMake([null, _local3, _local5, "GEL", GDefine.iStarColor, GDefine.iStarEffect, 1, 0, 0])); _local6++; }; } public static function createPlayerCellBack(_arg1:int):void{ CPrototypeFactory.gCellBack = CPrototypeFactory.createCellBack(_arg1); } public static function createCellRing(_arg1:int):void{ CPrototypeFactory.gCellRing = CPrototypeFactory.createRing(_arg1); } public static function createEnemyCellBack(_arg1:int):void{ CPrototypeFactory.gEnemyCellBack = CPrototypeFactory.createCellBack(_arg1); } public static function createRing(_arg1:int):OBitmap{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Sprite; _local2 = 0.8; _local3 = ((_arg1 * Math.sqrt(2)) / 2); _local4 = (((_local3 * 2) + _arg1) / 2); _local5 = ((_arg1 * _arg1) / 4); _local6 = new Sprite(); _local6.graphics.beginFill(0xFF); _local6.graphics.drawCircle(0, 0, (_local5 / _local4)); _local6.graphics.drawCircle(0, 0, ((_local5 / _local4) / 2)); _local6.graphics.endFill(); return (ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, _local6], _local2, 0, 25, 25], _local2, "GEL", GDefine.iBorderColor, "text 30", 1, 0, 0])); } public static function createEnemyCellRing(_arg1:int):void{ CPrototypeFactory.gEnemyCellRing = CPrototypeFactory.createRing(_arg1); } } }//package RES.OBJECTS
Section 72
//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 73
//ORecord (RES.OBJECTS.ORecord) package RES.OBJECTS { import ENGINE.CORE.*; public class ORecord { private var iStr:String; private var iPos:int; public function ORecord(){ this.iPos = -1; } public function WriteStart():void{ this.iStr = ""; this.iPos = 0; } public function ReadTime():int{ var _local1:String; if (!this.iStr){ return (-1); }; if (this.iPos == -1){ this.ReadStart(); }; if (this.iPos >= this.iStr.length){ return (-1); }; _local1 = this.iStr.substr(this.iPos, 2); this.iPos = (this.iPos + 2); return (int(_local1)); } public function ReadStart():void{ this.iPos = 0; } public function get prStr():String{ return (this.iStr); } public function ReadCell():int{ var _local1:String; if (((!(this.iStr)) || ((this.iPos >= iStr.length)))){ return (-1); }; _local1 = this.iStr.substr(this.iPos, 1); this.iPos = (this.iPos + 1); return ((_local1.charCodeAt() - 97)); } public function WriteNode(_arg1:int, _arg2:int, _arg3:int=0):void{ this.iStr = (this.iStr + OUtils.AddZero(_arg3.toString(), 2)); this.iStr = (this.iStr + String.fromCharCode((97 + _arg1))); this.iStr = (this.iStr + String.fromCharCode((97 + _arg2))); this.iPos = (this.iPos + 4); } public function set prStr(_arg1:String):void{ this.iStr = _arg1; } } }//package RES.OBJECTS
Section 74
//OWChoosePlayer (RES.WINDOWS.OWChoosePlayer) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; public class OWChoosePlayer extends ODialog { public var iCancel:OButton; public var iDelete:OButton; public var iNew:OButton; public var iListBox:OListBox; public var iAccept:OButton; private var iData; private var iCurPlayer:String; public function OWChoosePlayer(){ super(TriadzL.OWChoosePlayer); } override public function Init():void{ super.Init(); this.iData = TriadzL.iGAME.prPlayersData; this.iCurPlayer = TriadzL.iGAME.prPlayerName; this.iListBox.SetCurrentElement(TriadzL.iGAME.prPlayerName, TriadzL.iGAME.prPlayerNames); } override public function set prActive(_arg1:Boolean):void{ if (_arg1){ this.iListBox.SetCurrentElement(TriadzL.iGAME.prPlayerName, TriadzL.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, TriadzL.miEnterNewName); this.prActive = false; return; }; if (_arg2 == this.iDelete){ (this.parent as OWindow).OnPress(null, TriadzL.miDeletePlayerConfirm); this.prActive = false; return; }; if (_arg2 == this.iCancel){ TriadzL.iGAME.prPlayersData = this.iData; TriadzL.iGAME.prPlayerName = this.iCurPlayer; (this.parent as OWindow).OnPress(null, TriadzL.miMenu); this.prVisible = false; return; }; if (_arg2 == this.iAccept){ if (TriadzL.iMP.isConnected){ TriadzL.iMP.disconnect(); }; (this.parent as OWindow).OnPress(null, TriadzL.miMenu); this.prVisible = false; return; }; if ((((_arg2 == this.iListBox)) && (!((TriadzL.iGAME.prPlayerName == this.iListBox.prCurrentLBParam))))){ TriadzL.iGAME.prPlayerName = this.iListBox.prCurrentLBParam; return; }; } override public function Free():void{ this.iListBox = null; this.iNew = null; this.iDelete = null; this.iAccept = null; this.iCancel = null; super.Free(); } } }//package RES.WINDOWS
Section 75
//OWEnterName (RES.WINDOWS.OWEnterName) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; public class OWEnterName extends ODialog { public var iCancel:OButton; private var iHasCancel:Boolean; public var iName:OInput; public var iAccept:OButton; public function OWEnterName(_arg1:Boolean=true){ this.iHasCancel = _arg1; super(TriadzL.OWEnterName); } override public function Init():void{ super.Init(); this.iName.prText = (TriadzL.iGAME.prPlayerName) ? TriadzL.iGAME.prPlayerName : ""; if (!this.iHasCancel){ this.iCancel.visible = false; this.iAccept.prX = 145; }; } public function set prName(_arg1:String):void{ this.iName.prText = _arg1; } override public function OnPress(_arg1:Event, _arg2):void{ if (!this.prMouseEnabled){ return; }; if (_arg2 == this.iCancel){ this.prVisible = false; return; }; if (_arg2 == this.iAccept){ if (this.iName.prText.length > 0){ TriadzL.iGAME.prPlayerName = OUtils.ClearString(this.iName.prText.toUpperCase()); this.prVisible = false; }; }; } override public function Free():void{ super.Free(); this.iName = null; this.iAccept = null; this.iCancel = null; } public function get prName():String{ return (this.iName.prText); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); SetNameFocus(); } private function SetNameFocus():void{ if (!this.stage){ return; }; if (this.stage.focus == this.iName.iText){ return; }; this.iName.iText.setSelection(this.iName.iText.length, this.iName.iText.length); this.stage.focus = this.iName.iText; } } }//package RES.WINDOWS
Section 76
//OWGame (RES.WINDOWS.OWGame) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.*; import ENGINE.GAME.*; import ENGINE.CORE.*; import RES.*; import flash.utils.*; import flash.net.*; import ENGINE.SMARTFOX.*; public class OWGame extends OWindow { public var iField:GGame; public var iRecord:ORecord; private var iFieldH:int; private var iTimer:int; public var iFieldO:GGame; private var iFieldW:int; public var iScoreText:OIObject; private var iInfoP:OWInfoPanel; public var iLevel:OIObject; public var iScoreText0:OIObject; private var iInfo:OIObject; public var prRecord:String; private var iFieldIdx:int; public var iLevelC:OCounter; private var iNewGame:Boolean; private var iFailedO:Boolean; private var iDAlpha:Number;// = 0.025 public var iGameName:OIObject; private var iOppFieldIdx:int; public var iSite:OButton; public var iMenu:OButton; public var iFinishO:Boolean;// = false public var iScore:OCounter; public var iScoreO:OCounter; public static const stOpponentFinish:int = 20; public static const stBLevelComplete:int = 16; public static const stNormal:int = 15; public static const stLevelComplete:int = 17; public static const stBGameOver:int = 18; public static const stLevelInfo:int = 13; public static const stLevelInit:int = 14; public static const stGameOver:int = 19; public static const stGameFailed:int = 21; public static const stInitGraphics:int = 30; public static const stLoadLevel:int = 32; public static const stConnection:int = 31; public function OWGame(){ iDAlpha = 0.025; iFinishO = false; super(TriadzL.OWGame, ODialog.iDefAnimators); this.iInfoP.prVisible = false; } public 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.iLevel = null; this.iLevelC = null; this.iScore = null; this.iScoreO = null; this.iScoreText = null; this.iScoreText0 = null; this.iMenu = null; this.iSite = null; iField.Free(); try { iFieldO.Free(); } catch(e:Error) { trace(e); }; this.iField = null; this.iFieldO = null; super.Free(); } private function HideFieldO():void{ if (((((((this.iFieldO.prRecord) && ((this.iFieldO.State == GGame.stStopOpponent)))) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))){ this.State = stLevelComplete; this.iScoreO.prVisible = false; }; } 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; super.OnEnterFrame(_arg1); switch (this.iState){ case stInitGraphics: if (!this.prAnimation){ this.State = stConnection; }; break; case stConnection: _local2 = getTimer(); _local3 = this.SplashInfoMessage(); if (((((_local2 - this.iTimer) > 5000)) && (_local3))){ this.State = stLevelInfo; }; if (((((_local2 - this.iTimer) > 5000)) && ((TriadzL.iMP.State == OMultiplayer.stInZone)))){ this.State = stLoadLevel; }; break; case stLoadLevel: _local3 = this.SplashInfoMessage(); if (((_local3) && (TriadzL.iMP.prOpponentTurn))){ _local4 = TriadzL.iMP.prOpponentTurn.split(","); if (_local4.length > 2){ this.State = stLevelInfo; break; }; this.iFieldO.prRecord = ((((_local4[0] == "none")) && ((_local4[1] == "none")))) ? null : _local4[1]; if (this.iFieldO.prRecord){ this.iInfoP.prOpponent = _local4[0]; this.iInfoP.State = OWInfoPanel.stInGame; }; this.State = stLevelInfo; }; break; case stLevelInfo: _local2 = getTimer(); if ((_local2 - this.iTimer) > 2000){ if (this.iInfo.prVisible){ this.iInfo.prVisible = false; } else { if (!this.iInfo.prAnimation){ this.AddInfo(null); this.State = stLevelInit; }; }; }; break; case stLevelInit: this.iFieldH = GDefine.iFieldH[TriadzL.iGAME.prLevel]; this.iFieldW = GDefine.iFieldW[TriadzL.iGAME.prLevel]; if (this.iRecord == null){ this.iRecord = new ORecord(); }; this.iRecord.WriteStart(); if (this.iField == null){ this.iField = new GGame(false, 1, 3, 3, false); this.addChild(iField); }; this.iField.InitLevel(TriadzL.iGAME.prLevel, GDefine.iLevelColor[TriadzL.iGAME.prLevel]); if (!this.iField.prVisible){ this.iField.prVisible = true; }; this.iFieldIdx = (this.numChildren - 1); if (this.iFieldO.prRecord){ this.iFieldO.InitLevel(TriadzL.iGAME.prLevel, GDefine.iLevelColor[TriadzL.iGAME.prLevel], this.iField.prGameIndex); this.iFieldO.Pos(GDefine.iOpponenentX, GDefine.iOpponenentY); this.iOppFieldIdx = (this.numChildren - 1); this.iInfoP.prVisible = true; }; this.iField.SetRecorder(this.iRecord); this.VisibleElements(true); if (this.iFieldO){ if (this.iFieldO.prRecord){ this.iScoreText0.prVisible = true; this.iScoreO.prValue = 0; this.iScoreO.prVisible = true; }; }; if (!this.iFieldO.visible){ this.iFieldO.visible = true; }; this.State = stNormal; TriadzL.iGAME.Start(); break; case stNormal: switch (this.iField.State){ case stLevelComplete: this.State = stBLevelComplete; this.VisibleElements(false); break; case stGameOver: this.State = stBGameOver; this.VisibleElements(false); break; }; if (this.iFieldO == null){ break; }; switch (this.iFieldO.State){ case stLevelComplete: case stGameOver: this.iFailedO = (this.iFieldO.State == stGameOver); if (this.iInfoP.State == OWInfoPanel.stOpponent){ this.iScoreO.prVisible = false; this.iScoreText0.prVisible = false; this.iFieldO.prVisible = false; this.iFinishO = true; this.iInfoP.prVisible = true; this.iInfoP.prScore = this.iScoreO.prValue; this.iInfoP.State = (this.iFailedO) ? OWInfoPanel.stFailedLevel : OWInfoPanel.stCompleteLevel; }; break; }; break; case stBLevelComplete: if ((((this.iFieldO.State == stGameOver)) || ((this.iFieldO.State == stLevelComplete)))){ this.iFieldO.State = GGame.stInvisible; if (this.iScoreO.prVisible){ this.iScoreO.prVisible = false; }; if (this.iScoreText0.prVisible){ this.iScoreText0.prVisible = false; }; this.iInfoP.prScore = this.iScoreO.prValue; this.iInfoP.State = OWInfoPanel.stEndLevel; this.State = stLevelComplete; } else { this.HideFieldO(); }; break; case stLevelComplete: if (((!(this.iInfo.prVisible)) && (!(this.iInfo.prAnimation)))){ this.AddInfo(null); this.State = stConnection; }; break; case stBGameOver: if (this.iFieldO.State == stGameOver){ this.State = stGameOver; } else { this.HideFieldO(); }; break; case stGameOver: if (((!(this.iInfo.prVisible)) && (!(this.iInfo.prAnimation)))){ this.AddInfo(null); TriadzL.iGAME.Start(); this.State = stConnection; }; break; }; } override public function set State(_arg1:int):void{ var _local2:int; this.iState = _arg1; switch (this.iState){ case stNormal: this.iFieldO.prVisible = true; break; case stInitGraphics: this.VisibleElements(false); break; case stConnection: TriadzL.iMP.prOpponentTurn = null; this.iTimer = getTimer(); this.AddInfo(TriadzS.ColorHeader(TriadzL.OWGameConnection), true); if (TriadzL.iMP.State == OMultiplayer.stInZone){ this.State = stLoadLevel; } else { TriadzL.iMP.State = OMultiplayer.stNone; TriadzL.iMP.Init(TriadzL.sDomain, TriadzL.sServer, TriadzL.sZone, TriadzL.sXTName, TriadzL.iGAME.prPlayerName); }; break; case stLoadLevel: TriadzL.iMP.prOpponentTurn = null; trace("this.iField.prGameIndex", this.iField.prGameIndex); TriadzL.iMP.Turn(["rdl", TriadzL.iGAME.prLevel, ((this.iField.prGameIndex + 2) % 10), TriadzL.iGAME.prPlayerName]); break; case stLevelInfo: OSound.PlaySoundInd(1); this.iLevelC.prValue = (TriadzL.iGAME.prLevel + 1); TriadzL.OWGameNewLevel[4] = ((TriadzL.strLevel + " - ") + (TriadzL.iGAME.prLevel + 1).toString()); this.AddInfo(TriadzS.ColorHeader(TriadzL.OWGameNewLevel), true); this.iTimer = getTimer(); break; case stLevelInit: if (TriadzL.iMP.State == OMultiplayer.stInZone){ if (((((this.iFieldO.prRecord) && (!((this.iFieldO.prRecord == ""))))) && ((this.iFieldO.prRTime > 0)))){ this.iFieldO.prVisible = false; this.iInfoP.State = OWInfoPanel.stOpponent; } else { this.iInfoP.State = OWInfoPanel.stUserNotFound; }; } else { this.iInfoP.State = OWInfoPanel.stConnect; }; this.iMenu.prVisible = true; this.iSite.prVisible = true; this.iGameName.prVisible = true; this.iInfoP.prVisible = true; this.addChild(this.iFieldO); break; case stBLevelComplete: if (((((this.iFieldO.prRecord) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))) && (!((this.iInfoP.State == OWInfoPanel.stFailedLevel))))){ this.iFieldO.State = GGame.stStopOpponent; this.HideFieldO(); this.iFieldO.visible = false; } else { this.iFieldO.State = GGame.stStopOpponent; this.State = stLevelComplete; this.iFieldO.visible = false; }; break; case stLevelComplete: TriadzL.iGAME.Write(OGame.catTmp, "Score", this.iScore.prValue); _local2 = (((((this.iFieldO.prRecord) && (!((this.iFieldO.State == GGame.stStopOpponent))))) || (!(this.iFieldO.iFinishO)))) ? this.iScoreO.prValue : 0; this.iScoreO.prValue = 0; TriadzL.iGAME.Write(OGame.catTmp, "BScore", _local2); if (TriadzL.iGAME.prLevel < GDefine.iMaxLevel){ TriadzL.iGAME.NextLevel(); }; this.iScore.prValue = 0; this.iFieldO.prVisible = false; this.iMenu.prVisible = false; this.iSite.prVisible = false; this.iGameName.prVisible = false; if (this.iInfo != null){ this.iInfo.prVisible = false; }; this.iInfoP.prVisible = false; if (this.iScoreText0.prVisible){ this.iScoreText0.prVisible = false; }; if (iFieldO != null){ this.removeChild(iFieldO); iFieldO.Free(); iFieldO = null; }; this.iFieldO = new GGame(true); this.iFieldO.Pos(GDefine.iOpponenentX, GDefine.iOpponenentY); this.iFieldO.prVisible = false; this.iInfo = new OWResults(this.iRecord.prStr, TriadzL.iGAME.prLevel, this.iField.prGameIndex); this.iField.prVisible = false; this.addChild(this.iInfo); break; case stGameFailed: this.removeChildAt(iFieldIdx); this.iField.prVisible = false; this.iInfo = new OWResults(this.iRecord.prStr, TriadzL.iGAME.prLevel, this.iField.prGameIndex); this.addChild(this.iInfo); break; case stBGameOver: this.iField.prVisible = false; this.iInfoP.prVisible = false; if (((((this.iFieldO.prRecord) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))) && (!((this.iInfoP.State == OWInfoPanel.stFailedLevel))))){ this.HideFieldO(); } else { this.State = stGameOver; }; break; case stGameOver: this.iGameName.prVisible = false; this.iMenu.prVisible = false; this.iSite.prVisible = false; TriadzL.iGAME.Write(OGame.catTmp, "Score", 0); TriadzL.iGAME.Write(OGame.catTmp, "BScore", 0); this.iScore.prValue = 0; this.HideFieldO(); this.iInfo = new OWResults(this.iRecord.prStr, TriadzL.iGAME.prLevel, this.iField.prGameIndex, true); this.addChild(this.iInfo); break; }; } override public function Init():void{ super.Init(); this.iFieldO = new GGame(true); this.iField = new GGame(false, 1, 3, 3, false); this.addChild(iField); this.iFieldO.Pos(GDefine.iOpponenentX, GDefine.iOpponenentY); this.iFieldO.mouseEnabled = false; this.iFieldO.mouseChildren = false; this.addChild(this.iFieldO); this.iInfoP = new OWInfoPanel(); this.iInfoP.Pos(530, 0); this.addChild(this.iInfoP); this.State = stInitGraphics; } private function VisibleElements(_arg1:Boolean):void{ if (_arg1){ if (!this.iLevel.prVisible){ this.iLevel.prVisible = true; }; if (!this.iLevelC.prVisible){ this.iLevelC.prVisible = true; }; if (!this.iScore.prVisible){ this.iScore.prVisible = true; this.iScore.prValue = 0; }; if (!this.iScoreText.prVisible){ this.iScoreText.prVisible = true; }; } else { if (this.iLevel.prVisible){ this.iLevel.prVisible = false; }; this.iLevelC.prVisible = false; this.iScore.prVisible = false; if (this.iScoreText.prVisible){ this.iScoreText.prVisible = false; }; }; } override public function OnPress(_arg1:Event, _arg2):void{ var _local3:String; var _local4:URLRequest; if (_arg2 == this.iMenu){ this.iField.State = GGame.stNormal; if (this.iFieldO.State != GGame.stNormal){ this.iFieldO.State = GGame.stNormal; }; this.prVisible = false; (this.parent as OWindow).OnPress(null, TriadzL.miMenu); return; }; if (_arg2 == this.iSite){ _local3 = TriadzL.strConnect2URL; _local4 = new URLRequest(_local3); navigateToURL(_local4); return; }; } } }//package RES.WINDOWS
Section 77
//OWHighScores (RES.WINDOWS.OWHighScores) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; public class OWHighScores extends ODialog { public var iType:OListBox; public var iClose:OButton; public var iClear:OButton; public var iTable:OTab; public function OWHighScores(){ var _local1:OScoreParams; var _local2:int; _local2 = 0; while (_local2 < 5) { _local1 = TriadzL.iGAME.GetLocalScores(0, _local2); TriadzL.OWHighScoreLocal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : ""; TriadzL.OWHighScoreLocal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : ""; _local1 = TriadzL.iGAME.GetPersonalScores(0, _local2); TriadzL.OWHighScorePersonal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : ""; TriadzL.OWHighScorePersonal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : ""; _local1 = TriadzL.iGAME.GetPersonalScores(1, _local2); TriadzL.OWHighRaitingPersonal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : ""; TriadzL.OWHighRaitingPersonal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : ""; _local2++; }; super(TriadzL.OWHighScores); } override public function set prActive(_arg1:Boolean):void{ var _local2:OScoreParams; if (_arg1){ _local2 = TriadzL.iGAME.GetLocalScores(0, 0); if (!_local2){ (iTable.getChildAt(0) as OSprite).Free(); }; _local2 = TriadzL.iGAME.GetPersonalScores(0, 0); if (!_local2){ (iTable.getChildAt(1) as OSprite).Free(); }; _local2 = TriadzL.iGAME.GetPersonalScores(1, 0); }; 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, TriadzL.miDeleteScoresConfirm); this.prActive = false; return; }; (this.parent as OWindow).OnPress(null, TriadzL.miCommingSoon); this.prActive = false; } override public function Free():void{ this.iType = null; this.iTable = null; this.iClear = null; this.iClose = null; super.Free(); } } }//package RES.WINDOWS
Section 78
//OWHowToPlay (RES.WINDOWS.OWHowToPlay) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import RES.*; public class OWHowToPlay extends OWindow { private const stCursorMoving:int = 0; private const iDelay:int = 60; private const stNormal:int = 99; private const iDelta:int = 60; private const igX:int = 150; private const igY:int = -32; private const iCursorX:int = 175; private const iCursorY:int = 100; private const stReplay:int = 2; private const stCursorSet:int = 1; private var iCellsClick:Array; private var iCurrClick:int; private var newX:int; private var newY:int; private var iDx:Number; private var iDy:Number; public var iEndLevel:OIObject; private var iCursor:OBitmap; public var iClose:OButton; private var iFrDelay:int; private var iCursorColor:String;// = "white" private var iDirect:int;// = -1 private var iGame:GGame; public function OWHowToPlay(){ iCellsClick = new Array([2, 1], [2, 3], [1, 3]); iCursorColor = "white"; iDirect = -1; super(TriadzL.OWHowToPlay); this.addEventListener(Event.ENTER_FRAME, onEnterFrame); HInit(); } override public function get State():int{ return (this.iState); } override public function Free():void{ this.iGame = null; this.removeEventListener(Event.ENTER_FRAME, onEnterFrame); super.Free(); } public function onEnterFrame(_arg1:Event):void{ if ((((this.iCurrClick >= this.iCellsClick.length)) && (!((this.State == stNormal))))){ if (iFrDelay < iDelay){ iFrDelay++; return; }; this.State = stNormal; return; }; if (((!((this.iGame.State == GGame.stNormal))) && (((!((this.iGame.State == GGame.stNormal))) && (!((this.iGame.State == OWGame.stLevelComplete))))))){ return; }; if (iFrDelay < iDelay){ iFrDelay++; return; }; switch (this.State){ case stNormal: this.State = stReplay; break; case stReplay: this.HInit(); this.State = stCursorMoving; break; case stCursorMoving: switch (iDirect){ case 0: this.iCursor.prX = (this.iCursor.prX + iDx); this.iCursor.prY = (this.iCursor.prY + iDy); if ((((this.iCursor.prX >= newX)) || ((this.iCursor.prY >= newY)))){ this.iGame.prColClick = this.iCellsClick[this.iCurrClick][0]; this.iGame.prRowClick = this.iCellsClick[this.iCurrClick][1]; this.iCurrClick++; this.iGame.State = GGame.stRotate; iFrDelay = 0; this.State = stCursorMoving; }; break; case 1: this.iCursor.prX = (this.iCursor.prX + iDx); this.iCursor.prY = (this.iCursor.prY + iDy); if ((((this.iCursor.prX <= newX)) || ((this.iCursor.prY >= newY)))){ this.iGame.prColClick = this.iCellsClick[this.iCurrClick][0]; this.iGame.prRowClick = this.iCellsClick[this.iCurrClick][1]; this.iCurrClick++; this.iGame.State = GGame.stRotate; iFrDelay = 0; this.State = stCursorMoving; }; break; case 2: this.iCursor.prX = (this.iCursor.prX + iDx); this.iCursor.prY = (this.iCursor.prY + iDy); if ((((this.iCursor.prX <= newX)) || ((this.iCursor.prY >= newY)))){ this.iGame.prColClick = this.iCellsClick[this.iCurrClick][0]; this.iGame.prRowClick = this.iCellsClick[this.iCurrClick][1]; this.iCurrClick++; this.iGame.State = GGame.stRotate; iFrDelay = 0; this.State = stCursorMoving; }; break; case 3: this.iCursor.prX = (this.iCursor.prX + iDx); this.iCursor.prY = (this.iCursor.prY + iDy); if ((((this.iCursor.prX >= newX)) || ((this.iCursor.prY <= newY)))){ this.iGame.prColClick = this.iCellsClick[this.iCurrClick][0]; this.iGame.prRowClick = this.iCellsClick[this.iCurrClick][1]; this.iCurrClick++; this.iGame.State = GGame.stRotate; iFrDelay = 0; this.State = stCursorMoving; }; break; }; if (this.iCurrClick >= this.iCellsClick.length){ iFrDelay = -(this.iDelay); }; break; }; } override public function set State(_arg1:int):void{ var _local2:int; var _local3:int; this.iState = _arg1; switch (_arg1){ case stCursorMoving: if (this.iCurrClick >= this.iCellsClick.length){ return; }; _local2 = this.iCellsClick[this.iCurrClick][0]; _local3 = this.iCellsClick[this.iCurrClick][1]; newX = (((((this.iGame.prX + 33) + (66 * _local2)) + 33) - this.iCursor.prHeight) + 5); newY = ((((100 + (66 * _local3)) + 33) - this.iCursor.prWidth) + 15); iDx = ((newX - iCursor.prX) / iDelta); iDy = ((newY - iCursor.prY) / iDelta); if (this.iCurrClick == 0){ iDirect = 0; break; } else { if ((((_local2 > this.iCellsClick[(this.iCurrClick - 1)][0])) && ((_local3 >= this.iCellsClick[(this.iCurrClick - 1)][1])))){ iDirect = 0; break; }; if ((((_local2 > this.iCellsClick[(this.iCurrClick - 1)][0])) && ((_local3 <= this.iCellsClick[(this.iCurrClick - 1)][1])))){ iDirect = 1; break; }; if ((((_local2 < this.iCellsClick[(this.iCurrClick - 1)][0])) && ((_local3 >= this.iCellsClick[(this.iCurrClick - 1)][1])))){ iDirect = 2; break; }; if ((((_local2 < this.iCellsClick[(this.iCurrClick - 1)][0])) && ((_local3 <= this.iCellsClick[(this.iCurrClick - 1)][1])))){ iDirect = 3; break; }; if ((((_local2 == this.iCellsClick[(this.iCurrClick - 1)][0])) && ((_local3 < this.iCellsClick[(this.iCurrClick - 1)][1])))){ iDirect = 3; break; }; break; }; case stNormal: this.iGame.prVisible = false; this.iCursor.prVisible = false; this.addChild(iEndLevel); if (!this.iEndLevel.prVisible){ this.iEndLevel.prVisible = true; }; this.iFrDelay = -(this.iDelay); break; case stReplay: this.iEndLevel.prVisible = false; this.iCurrClick = 0; this.iFrDelay = 0; break; }; } private function HInit():void{ iFrDelay = 0; iCurrClick = 0; iCursor = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.OCursor], 1, 0, 25, 25], 0.8, "GEL", "white", "text 30", 1, 0, 0]); iCursor.Pos(iCursorX, iCursorY); iCursor.prVisible = true; if (!this.iGame){ this.iGame = new GGame(false, 0.5, igX, igY, true); this.addChild(this.iGame); }; this.addChild(iCursor); this.iGame.InitLevel(0, 2); iGame.visible = true; iGame.Pos((igX + 110), igY); this.State = stCursorMoving; } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg2 == this.iClose){ this.prVisible = false; return; }; } } }//package RES.WINDOWS
Section 79
//OWInfoPanel (RES.WINDOWS.OWInfoPanel) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.*; import flash.utils.*; import flash.net.*; public class OWInfoPanel extends OIObject { private var iTimer:int; private var iScore:int; private var iMode:int; private var iInfo:OInfoObject; 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); } public function set prOpponent(_arg1:String):void{ this.iOpponent = _arg1; } private function ShowConnect():void{ var _local1:String; _local1 = TriadzL.OWColors[((this.iMode + 2) % TriadzL.OWColors.length)]; TriadzL.OWInfoPConnect[0][3] = _local1; TriadzL.OWInfoPConnect[1][3] = _local1; TriadzL.OWInfoPConnect[1][4] = _local1; switch ((this.iMode % 3)){ case 0: TriadzL.OWInfoPConnect[0][4] = TriadzL.strConnect1; TriadzL.OWInfoPConnect[1][6] = TriadzL.strPlayOnline; break; case 1: TriadzL.OWInfoPConnect[0][4] = TriadzL.strConnect2; TriadzL.OWInfoPConnect[1][6] = TriadzL.strMoreGames; break; case 2: TriadzL.OWInfoPConnect[0][4] = TriadzL.strConnect3; TriadzL.OWInfoPConnect[1][6] = TriadzL.strSendMail; break; }; this.InitObject(TriadzL.OWInfoPConnect); } private function ShowUserNotFound():void{ var _local1:String; var _local2:String; var _local3:Array; _local1 = TriadzL.iMP.prOpponentTurn; TriadzL.iMP.prOpponentTurn = null; TriadzL.iMP.Turn(["rdr"]); _local2 = TriadzL.OWColors[Math.round((Math.random() * (TriadzL.OWColors.length - 1)))]; TriadzL.OWInfoPUserNotFound[0][3] = _local2; TriadzL.OWInfoPUserNotFound[1][3] = _local2; switch ((this.iMode % 5)){ case 0: TriadzL.OWInfoPUserNotFound[0][4] = TriadzL.iMP.prUsersCount; TriadzL.OWInfoPUserNotFound[0][6] = 200; TriadzL.OWInfoPUserNotFound[1][6] = (TriadzL.OWInfoPUserNotFound[0][6] + 70); TriadzL.OWInfoPUserNotFound[1][4] = TriadzL.strPlayersOnline1; break; default: if (!_local1){ return; }; _local3 = _local1.split(/,/); TriadzL.OWInfoPUserNotFound[0][4] = ((int(_local3[0]) + 1).toString() + TriadzL.strPlace); TriadzL.OWInfoPUserNotFound[0][6] = 180; TriadzL.OWInfoPUserNotFound[1][6] = (TriadzL.OWInfoPUserNotFound[0][6] + 90); TriadzL.OWInfoPUserNotFound[1][4] = ((_local3[1] + TriadzL.strHasReiting) + _local3[2]); break; }; this.InitObject(TriadzL.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 = TriadzL.strConnect1URL; break; case 1: _local3 = TriadzL.strConnect2URL; break; case 2: _local3 = TriadzL.strConnect3URL; break; }; _local4 = new URLRequest(_local3); navigateToURL(_local4); } override public function Free():void{ this.iInfo = null; super.Free(); } private function InitObject(_arg1:Array):void{ if (this.iInfo){ this.removeChild(this.iInfo); this.iInfo.Free(); this.iInfo = null; }; if (!_arg1){ return; }; this.iInfo = new OInfoObject(_arg1, OInterface.iDefSlowAnimators); this.addChild(this.iInfo); this.iInfo.SetVisible(false); this.iInfo.prVisible = true; } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; super.OnEnterFrame(_arg1); switch (this.iState){ case stConnect: _local2 = getTimer(); if ((_local2 - this.iTimer) >= 30000){ this.iMode++; this.ShowConnect(); this.iTimer = _local2; }; break; case stUserNotFound: _local2 = getTimer(); if ((_local2 - this.iTimer) >= 30000){ 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: TriadzL.OWInfoP[0][2] = 30; TriadzL.OWInfoP[0][3] = "yellow"; TriadzL.OWInfoP[0][6] = 265; TriadzL.OWInfoP[0][4] = ((((TriadzL.strOpponent1 + "\n") + this.iOpponent) + "\n") + TriadzL.strOpponent2); this.InitObject(TriadzL.OWInfoP); this.iTimer = getTimer(); break; case stOpponent: TriadzL.OWInfoPPlayer[1][4] = this.iOpponent; this.InitObject(TriadzL.OWInfoPPlayer); break; case stEndLevel: TriadzL.OWInfoP[0][2] = 30; TriadzL.OWInfoP[0][3] = "magenta"; TriadzL.OWInfoP[0][6] = 240; TriadzL.OWInfoP[0][4] = ((this.iOpponent + TriadzL.strLevelScore) + this.iScore); this.InitObject(TriadzL.OWInfoP); this.iTimer = getTimer(); break; case stCompleteLevel: TriadzL.OWInfoP[0][2] = 30; TriadzL.OWInfoP[0][3] = "yellow1"; TriadzL.OWInfoP[0][6] = 240; TriadzL.OWInfoP[0][4] = ((this.iOpponent + TriadzL.strCompleteLevel) + this.iScore); this.InitObject(TriadzL.OWInfoP); this.iTimer = getTimer(); break; case stFailedLevel: TriadzL.OWInfoP[0][2] = 30; TriadzL.OWInfoP[0][3] = "red"; TriadzL.OWInfoP[0][6] = 240; TriadzL.OWInfoP[0][4] = ((this.iOpponent + TriadzL.strFailedLevel) + this.iScore); this.InitObject(TriadzL.OWInfoP); this.iTimer = getTimer(); break; }; } } }//package RES.WINDOWS
Section 80
//OWIntro (RES.WINDOWS.OWIntro) package RES.WINDOWS { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; public class OWIntro extends OWindow { public var iHeader:OBitmap; private var iTimer:Number; public var iHit:OSprite; public var iFooter:OBitmap; public var iAlpha:Array; public var iName:Array; public static var stShowFooter:int = 2; public static var stHide:int = 5; public static var stNormal:int = 4; public static var stShowName:int = 3; public static var stShowHeader:int = 1; public static var stInvisible:int = 6; public static var stBeforeShow:int = 0; public function OWIntro(){ super(TriadzL.OWIntroParam); } override public function Init():void{ var _local1:int; var _local2:Number; var _local3:int; this.iName = new Array(); super.Init(); this.iHeader.alpha = 0; this.iFooter.alpha = 0; _local1 = this.iName.length; this.iAlpha = new Array(_local1); _local2 = (300 - (this.iName[0].prHeight / 2)); _local3 = 0; while (_local3 < (_local1 / 2)) { this.iName[_local3].prY = _local2; this.iName[((_local1 - _local3) - 1)].prY = _local2; this.iAlpha[_local3] = (-(((_local1 / 2) - _local3)) * 0.3); this.iAlpha[((_local1 - _local3) - 1)] = (-(((_local1 / 2) - _local3)) * 0.3); this.iName[_local3].alpha = 0; this.iName[((_local1 - _local3) - 1)].alpha = 0; _local3++; }; this.hitArea = this.iHit; this.State = stBeforeShow; } override public function Free():void{ super.Free(); this.iHeader = null; this.iFooter = null; this.iName = null; } override public function OnMouseDown(_arg1:MouseEvent):void{ if (this.iState < OWIntro.stShowFooter){ return; }; this.prVisible = false; super.OnMouseDown(_arg1); } override public function OnEnterFrame(_arg1:Event):void{ var _local2:int; switch (this.iState){ case stBeforeShow: if (this.iTimer-- <= 0){ this.State = stShowHeader; }; break; case stShowHeader: if (this.iHeader.alpha >= 1){ this.iHeader.alpha = 1; this.State = stShowFooter; } else { this.iHeader.alpha = (this.iHeader.alpha + 0.025); }; break; case stShowFooter: if (this.iFooter.alpha >= 1){ this.iFooter.alpha = 1; this.State = stShowName; } else { this.iFooter.alpha = (this.iFooter.alpha + 0.025); }; break; case stShowName: if (this.iName[0].alpha >= 1){ this.State = stNormal; } else { _local2 = 0; while (_local2 < this.iName.length) { this.iAlpha[_local2] = (this.iAlpha[_local2] + 0.025); if (this.iAlpha[_local2] > 1){ this.iAlpha[_local2] = 1; }; if (this.iAlpha[_local2] >= 0){ this.iName[_local2].alpha = this.iAlpha[_local2]; }; _local2++; }; }; break; case stNormal: if (this.iTimer-- <= 0){ this.State = stHide; }; break; case stHide: if (this.iFooter.alpha <= 0){ this.State = stInvisible; } else { this.iHeader.alpha = (this.iHeader.alpha - 0.05); this.iFooter.alpha = (this.iFooter.alpha - 0.05); _local2 = 0; while (_local2 < this.iName.length) { this.iName[_local2].alpha = (this.iName[_local2].alpha - 0.05); _local2++; }; }; break; }; } override public function set State(_arg1:int):void{ this.iState = _arg1; switch (this.iState){ case stBeforeShow: this.iTimer = 20; break; case stNormal: this.iTimer = 180; break; case stInvisible: this.prVisible = false; break; }; } } }//package RES.WINDOWS
Section 81
//OWMenu (RES.WINDOWS.OWMenu) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import flash.utils.*; import flash.net.*; import ENGINE.SMARTFOX.*; public class OWMenu extends ODialog { public var iPlayOnline:OButton; public var iPlayers:OIObject; public var iOptions:OButton; public var iMoreGames:OButton; public var iGameName:OIObject; public var iBName:OButton; public var iCPlayers:OCounter; public var iQuickPlay:OButton; public var iTimer:int; public var iHighScores:OButton; public var iInstructions:OButton; public var iInfo:OIObject; public function OWMenu(){ super(TriadzL.OWMenu); } private function ShowUserReiting(_arg1:Boolean):void{ var _local2:String; var _local3:String; var _local4:Array; _local2 = TriadzL.OWColors[Math.round((Math.random() * (TriadzL.OWColors.length - 1)))]; TriadzL.OWMenuReiting[0][3] = _local2; if (_arg1){ TriadzL.iMP.prOpponentTurn = null; TriadzL.OWMenuReiting[0][4] = ((TriadzL.iGAME.prPlayerName + TriadzL.strReiting2) + TriadzL.iGAME.prScore.toString()); this.InitObject(TriadzL.OWMenuReiting); }; this.iTimer = getTimer(); if (TriadzL.iMP.State != OMultiplayer.stInZone){ return; }; _local3 = TriadzL.iMP.prOpponentTurn; TriadzL.iMP.prOpponentTurn = null; TriadzL.iMP.Turn(["rdr"]); if (!_local3){ return; }; _local4 = _local3.split(/,/); TriadzL.OWMenuReiting[0][4] = (((((int(_local4[0]) + 1).toString() + TriadzL.strReiting1) + _local4[1]) + TriadzL.strReiting2) + _local4[2]); this.InitObject(TriadzL.OWMenuReiting); } override public function set prVisible(_arg1:Boolean):void{ super.prVisible = _arg1; } override public function Init():void{ TriadzL.OWMenu[0][4] = ((TriadzL.strWelcome + " ") + TriadzL.iGAME.prPlayerName); super.Init(); if (TriadzL.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 = TriadzL.iMP.prUsersCount; this.iPlayers.prAnimationEnabled = true; this.iCPlayers.Pos((this.iQuickPlay.prX + 50), 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, TriadzL.miChoosePlayer); this.prVisible = false; return; }; if (_arg2 == this.iPlayOnline){ (this.parent as OWindow).OnPress(null, TriadzL.miGameMPConfirm); this.prVisible = false; return; }; if (_arg2 == this.iQuickPlay){ (this.parent as OWindow).OnPress(null, TriadzL.miGameMP); this.prVisible = false; return; }; if (_arg2 == this.iOptions){ (this.parent as OWindow).OnPress(null, TriadzL.miOptions); this.prActive = false; return; }; if (_arg2 == this.iInstructions){ (this.parent as OWindow).OnPress(null, TriadzL.miInstructions); this.prActive = false; return; }; if (_arg2 == this.iHighScores){ (this.parent as OWindow).OnPress(null, TriadzL.miHighScores); this.prActive = false; return; }; if (_arg2 == this.iMoreGames){ navigateToURL(new URLRequest(TriadzL.sURLSite)); return; }; (this.parent as OWindow).OnPress(null, TriadzL.miCommingSoon); this.prActive = false; } override public function Free():void{ this.iBName = null; this.iGameName = null; this.iCPlayers = null; this.iPlayers = null; this.iPlayOnline = null; this.iQuickPlay = 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 != TriadzL.iMP.prUsersCount){ if (TriadzL.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 = TriadzL.iMP.prUsersCount; }; _local2 = getTimer(); if ((_local2 - this.iTimer) > 30000){ ShowUserReiting(false); }; super.OnEnterFrame(_arg1); } } }//package RES.WINDOWS
Section 82
//OWOptions (RES.WINDOWS.OWOptions) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.CORE.*; import flash.system.*; public class OWOptions extends ODialog { public var iResolution:OListBox; public var iSound:OListBox; public var iFullScreen:OListBox; private var iSResList:Array; public var iMusic:OListBox; private var iSRes:Array; public var iCancel:OButton; public var iAccept:OButton; public function OWOptions(){ super(TriadzL.OWOptions); } 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); } 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; TriadzL.OWOptions[0][2] = 340; TriadzL.OWOptions[5][11] = 190; TriadzL.OWOptions[6][8] = 260; TriadzL.OWOptions[7][8] = 260; super.Init(); this.iResolution.prVisible = false; this.iSound.prCurrentInd = int((TriadzL.iGAME.prSoundVolume * 10)); this.iMusic.prCurrentInd = int((TriadzL.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; TriadzL.iGAME.prSoundVolume = (this.iSound.prCurrentInd / 10); TriadzL.iGAME.prMusicVolume = (this.iMusic.prCurrentInd / 10); TriadzL.iGAME.prResX = this.iSRes[this.iResolution.prCurrentInd][0]; TriadzL.iGAME.prResY = this.iSRes[this.iResolution.prCurrentInd][1]; TriadzL.iGAME.prFullScreen = (this.iFullScreen.prCurrentInd) ? true : false; fscommand("fullscreen", TriadzL.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(); } } }//package RES.WINDOWS
Section 83
//OWResults (RES.WINDOWS.OWResults) package RES.WINDOWS { import flash.events.*; import ENGINE.INTERFACE.*; import ENGINE.GAME.*; import ENGINE.CORE.*; import flash.utils.*; public class OWResults extends OAlert { private var iNewGame:Boolean; private var iRecord:Boolean; private var prGameIndex:int; private var iTimer:Timer; private var iSaveGame:String; private var prLevel:int;// = 0 public function OWResults(_arg1:String, _arg2:int, _arg3:int, _arg4:Boolean=false){ prLevel = 0; this.iNewGame = _arg4; this.iSaveGame = _arg1; this.prLevel = (_arg2 - 1); this.prGameIndex = _arg3; super(TriadzL.OWResults, null); } override public function Init():void{ var _local1:int; var _local2:int; _local1 = TriadzL.iGAME.Read(OGame.catTmp, "Score"); _local2 = TriadzL.iGAME.Read(OGame.catTmp, "BScore"); this.iRecord = (TriadzL.iGAME.prLevelScore < (_local1 + _local2)); this.iRecord = true; if (this.iRecord){ TriadzL.iGAME.prMode = 0; TriadzL.iGAME.SetLevelScore((_local1 + _local2)); TriadzL.iGAME.AddScore((_local1 + _local2)); TriadzL.iGAME.AddScoreInTable(TriadzL.iGAME.prScore); TriadzL.iGAME.prMode = 1; TriadzL.iGAME.AddScore((_local1 + _local2)); TriadzL.iGAME.AddScoreInTable(TriadzL.iGAME.prScore); }; TriadzL.iMP.Turn(["wrr", TriadzL.iGAME.prPlayerName, TriadzL.iGAME.prScore]); if (this.iNewGame){ TriadzL.OWResults[0][4] = TriadzL.strGameOver; } else { TriadzL.OWResults[0][4] = TriadzL.strLevelComplete; }; TriadzL.OWResultsLevelScore[1][5] = _local1.toString(); TriadzL.OWResultsBonusScore[1][5] = _local2.toString(); TriadzL.OWResultsTotalScore[1][5] = (_local1 + _local2).toString(); TriadzL.OWResultsReiting[1][4] = TriadzL.iGAME.prScore; if (((this.iNewGame) || (!(this.iRecord)))){ TriadzL.OWResults[5][3] = "yellow"; TriadzL.OWResults[5][4] = "yellow"; TriadzL.OWResults[5][6] = TriadzL.strReplayLevel; } else { TriadzL.OWResults[5][3] = "yellow1"; TriadzL.OWResults[5][4] = "yellow1"; TriadzL.OWResults[5][6] = TriadzL.strNextLevel; }; if (((!(this.iNewGame)) && (!(this.iRecord)))){ TriadzL.OWResults[7][4] = ((((TriadzL.strLevelConfirm1 + " ") + TriadzL.iGAME.prLevelScore.toString()) + " ") + TriadzL.strLevelConfirm2); }; super.Init(); this.Pos(0, 0); this.iTimer = new Timer(750, 6); 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).Pos(20, 30); (this.getChildAt(0) as OIObject).prVisible = true; OSound.PlaySoundInd(1); break; case 2: (this.getChildAt(1) as OIObject).prVisible = true; OSound.PlaySoundInd(1); break; case 3: (this.getChildAt(2) as OIObject).prVisible = true; OSound.PlaySoundInd(1); TriadzL.iMP.Turn(["wrl", prLevel, this.prGameIndex, TriadzL.iGAME.prPlayerName, this.iSaveGame]); break; case 4: (this.getChildAt(3) as OIObject).prVisible = true; OSound.PlaySoundInd(1); break; case 5: (this.getChildAt(4) as OIObject).prVisible = true; OSound.PlaySoundInd(1); break; case 6: this.iButtons[0].prVisible = true; if (((!(this.iNewGame)) && (!(this.iRecord)))){ this.getChildAt(6).visible = true; this.getChildAt(7).visible = true; }; OSound.PlaySoundInd(4); break; }; } } }//package RES.WINDOWS
Section 84
//GCell (RES.GCell) package RES { import ENGINE.DISPLAY.*; import flash.display.*; import RES.OBJECTS.*; import ENGINE.CORE.*; public class GCell extends OSprite { private var iBorderSprite:OSprite; private var iGGame:GGame; private var iAngleOffset:Number;// = 15 private var iCellSprite:OSprite; private var iCol:int; public var iParamAnimation:Array; private var iIsDoubleBorder:Array; private var iRingSprite:OSprite; private var iAlphaOffset:Number;// = 0.04 private var iNeedReinit:Boolean; public var iOffsetCnt:int; private var iIsFree:int; private var iChBg:Boolean; private var iIsBorder:Array; public var iAnimState:Array; private var iState:int; private var iPosX:int; private var iPosY:int; private var iRow:int; private var rnd:ORandomInt; private var iPrtGameSprite:Sprite; private var iYOffset:Number; private var iCurrColor:int; private var gBack:OBitmap; private var iAngle:int;// = 0 private var iContainerSprite:OSprite; private static const id:Array = new Array(1, 0, 2, 3); public function GCell(_arg1:GGame, _arg2:Sprite, _arg3:int, _arg4:int, _arg5:int=170, _arg6:int=100, _arg7:int=1, _arg8:int=10){ var _local9:int; var _local10:int; var _local11:int; var _local12:OBitmap; iAlphaOffset = 0.04; iAngleOffset = 15; iAngle = 0; super(); this.iRingSprite = new OSprite(); this.iContainerSprite = new OSprite(); if (_arg7){ gBack = new OBitmap(); if (_arg1.iIsOpponent){ gBack.CopyFrom(CPrototypeFactory.gEnemyCellBack); } else { gBack.CopyFrom(CPrototypeFactory.gCellBack); }; iContainerSprite.addChild(gBack); }; this.iGGame = _arg1; this.iPrtGameSprite = _arg2; this.rnd = new ORandomInt(); this.rnd.SeedRand(_arg8); this.iCurrColor = 0; this.iNeedReinit = false; this.iOffsetCnt = 1; this.iYOffset = (this.iGGame.iRCellSize / GDefine.iOffset); this.iIsBorder = new Array(4); this.iIsDoubleBorder = new Array(4); if (_arg7 > 1){ iBorderSprite = new OSprite(); _local11 = 3; while (_local11 >= 0) { _local12 = new OBitmap(); _local12.CopyFrom(_arg1.iBrd[_local11]); this.iBorderSprite.addChild(_local12); _local12.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); _local11--; }; this.addChild(iBorderSprite); }; switch (_arg7){ case 0: case 1: this.iIsBorder = [false, false, false, false]; this.iIsDoubleBorder = [false, false, false, false]; break; case 2: this.iIsBorder = [true, true, true, true]; this.iIsDoubleBorder = [false, false, false, false]; break; case 3: createRings(); this.iIsBorder = [true, true, true, true]; this.iIsDoubleBorder = [true, true, true, true]; break; }; this.State = GGame.stNormal; iPosX = _arg5; iPosY = _arg6; _local9 = (GDefine.iCellWidth * iGGame.iRCellSize); _local10 = (GDefine.iCellHeight * iGGame.iRCellSize); this.iGGame = _arg1; this.iRow = _arg4; this.iCol = _arg3; this.iIsFree = _arg7; this.iCellSprite = new OSprite(); this.addChildAt(this.iCellSprite, 0); this.iContainerSprite.Pos((iPosX + (iGGame.iRCellSize * this.iRow)), (iPosY + (iGGame.iRCellSize * this.iCol))); this.iGGame.addChildAt(this.iContainerSprite, 0); this.iAnimState = new Array(GGame.stNormal, GGame.stNormal, GGame.stNormal, GGame.stNormal); this.iParamAnimation = new Array(); this.iPrtGameSprite.addChild(this); this.addChild(this.iRingSprite); } public function get NeedReinit():Boolean{ return (this.iNeedReinit); } public function isBorderDestroy():Boolean{ var _local1:int; _local1 = 0; while (_local1 < 4) { if ((((((this.iAnimState[_local1] == GGame.stAnimationDestroy)) || ((this.iAnimState[_local1] == GGame.stDesappear)))) && (this.iIsBorder[_local1]))){ return (true); }; _local1++; }; return (false); } public function ReInitCell(_arg1:Array, _arg2:int=0):void{ var _local3:int; var _local4:int; var _local5:OBitmap; if (this.iIsFree == 0){ return; }; while (this.iCellSprite.numChildren > 0) { this.iCellSprite.removeChildAt((this.iCellSprite.numChildren - 1)); }; _local4 = 0; _local5 = new OBitmap(); if (_arg1[1] != 0){ _local5.CopyFrom(iGGame.iTrg[(_arg1[1] - 1)][_local4][1]); }; this.iCellSprite.addChild(_local5); _local5.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); _local5 = new OBitmap(); if (_arg1[0] != 0){ _local5.CopyFrom(iGGame.iTrg[(_arg1[0] - 1)][_local4][0]); }; this.iCellSprite.addChild(_local5); _local5.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); _local5 = new OBitmap(); if (_arg1[2] != 0){ _local5.CopyFrom(iGGame.iTrg[(_arg1[2] - 1)][_local4][2]); }; this.iCellSprite.addChild(_local5); _local5.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); _local5 = new OBitmap(); if (_arg1[3] != 0){ _local5.CopyFrom(iGGame.iTrg[(_arg1[3] - 1)][_local4][3]); }; this.iCellSprite.addChild(_local5); _local5.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); } public function get IsColor():Boolean{ return (GDefine.EqualArray(this.iIsBorder, [false, false, false, false])); } public function SetElement(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:OBitmap; _local2 = id[_arg1]; _local3 = this.iGGame.iLogGame.iGrid[iCol][iRow].GetColorElm(_arg1); if (_local2 < this.iCellSprite.numChildren){ this.iCellSprite.removeChildAt(_local2); }; _local4 = new OBitmap(); if (_local3 > 0){ _local4.CopyFrom(iGGame.iTrg[(_local3 - 1)][0][_arg1]); }; this.iCellSprite.addChildAt(_local4, _local2); } public function set NeedReinit(_arg1:Boolean):void{ this.iNeedReinit = _arg1; } public function get State():int{ return (this.iState); } public function isRingDestroy():Boolean{ var _local1:int; while (_local1 < 4) { if ((((((this.iAnimState[_local1] == GGame.stAnimationDestroy)) || ((this.iAnimState[_local1] == GGame.stDesappear)))) && (this.iIsDoubleBorder[_local1]))){ return (true); }; _local1++; }; return (false); } override public function Free():void{ super.Free(); } private function createRings():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:OBitmap; var _local5:int; _local1 = iGGame.iRCellSize; _local1 = (_local1 * Math.sqrt(2)); _local1 = (_local1 / 2); _local2 = (((_local1 * 2) + iGGame.iRCellSize) / 2); _local3 = ((iGGame.iRCellSize * iGGame.iRCellSize) / 4); _local5 = 0; while (_local5 < 4) { _local4 = new OBitmap(); if (this.iGGame.iIsOpponent){ _local4.CopyFrom(CPrototypeFactory.gEnemyCellRing); } else { _local4.CopyFrom(CPrototypeFactory.gCellRing); }; this.iRingSprite.addChildAt(_local4, 0); switch (_local5){ case 0: _local4.Pos(OGlobal.ScaleFloor((_local3 / _local2)), OGlobal.ScaleFloor((iGGame.iRCellSize / 2))); break; case 1: _local4.Pos(OGlobal.ScaleFloor((iGGame.iRCellSize / 2)), OGlobal.ScaleFloor((_local3 / _local2))); break; case 2: _local4.Pos(OGlobal.ScaleFloor((iGGame.iRCellSize - (_local3 / _local2))), OGlobal.ScaleFloor((iGGame.iRCellSize / 2))); break; case 3: _local4.Pos(OGlobal.ScaleFloor((iGGame.iRCellSize / 2)), OGlobal.ScaleFloor((iGGame.iRCellSize - (_local3 / _local2)))); break; }; _local5++; }; } public function ResetState():void{ var _local1:int; _local1 = 0; while (_local1 < 4) { this.iAnimState[_local1] = GGame.stNormal; _local1++; }; this.iParamAnimation = null; this.iParamAnimation = new Array(); } public function InitCell(_arg1:Array, _arg2:int=0):void{ var _local3:int; var _local4:OBitmap; if (this.iIsFree == 0){ return; }; while (this.iCellSprite.numChildren > 0) { this.iCellSprite.removeChildAt((this.iCellSprite.numChildren - 1)); }; _local3 = (_arg2 / 15); this.Pos((iPosX + (iGGame.iRCellSize * this.iRow)), (iPosY + (iGGame.iRCellSize * this.iCol))); this.iContainerSprite.Pos((iPosX + (iGGame.iRCellSize * this.iRow)), (iPosY + (iGGame.iRCellSize * this.iCol))); iAnimState = [GGame.stNormal, GGame.stNormal, GGame.stNormal, GGame.stNormal]; _local4 = new OBitmap(); if (_arg1[1] != 0){ _local4.CopyFrom(iGGame.iTrg[(_arg1[1] - 1)][_local3][1]); }; this.iCellSprite.addChild(_local4); _local4.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); _local4 = new OBitmap(); if (_arg1[0] != 0){ _local4.CopyFrom(iGGame.iTrg[(_arg1[0] - 1)][_local3][0]); }; this.iCellSprite.addChild(_local4); _local4.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); _local4 = new OBitmap(); if (_arg1[2] != 0){ _local4.CopyFrom(iGGame.iTrg[(_arg1[2] - 1)][_local3][2]); }; this.iCellSprite.addChild(_local4); _local4.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); _local4 = new OBitmap(); if (_arg1[3] != 0){ _local4.CopyFrom(iGGame.iTrg[(_arg1[3] - 1)][_local3][3]); }; this.iCellSprite.addChild(_local4); _local4.Pos(OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)); } public function get IsFree():Boolean{ return ((this.iIsFree == 0)); } public function OnEnterFrame():void{ var _local1:int; var _local2:OBitmap; var _local3:OBitmap; var _local4:Boolean; var _local5:int; var _local6:Array; if (this.iGGame.State == GGame.stNormal){ this.State = GGame.stNormal; return; }; if (((!((this.State == GGame.stNormal))) && ((this.parent == null)))){ this.State = GGame.stNormal; return; }; if ((((this.NeedReinit == true)) && ((this.State == GGame.stNormal)))){ (this.parent as GGame).ReInitCell(this.iCol, this.iRow); this.NeedReinit = false; }; switch (this.State){ case GGame.stFillEmpty: _local1 = 0; while (_local1 < 4) { if (this.iAnimState[_local1] == GGame.stFillEmpty){ _local2 = (this.iCellSprite.getChildAt(id[_local1]) as OBitmap); _local2.alpha = (_local2.alpha + iAlphaOffset); if (_local2.alpha >= 1){ this.iAnimState[_local1] = GGame.stNormal; }; }; _local1++; }; if (GDefine.EqualArray([GGame.stNormal, GGame.stNormal, GGame.stNormal, GGame.stNormal], this.iAnimState)){ this.State = GGame.stNormal; return; }; break; case GGame.stMoveDown: (this.NeedReinit == true); _local1 = 0; while (_local1 < 4) { if (this.iAnimState[_local1] == GGame.stMoveDown){ if (_local1 >= this.iCellSprite.numChildren){ } else { _local2 = (this.iCellSprite.getChildAt(id[_local1]) as OBitmap); _local2.prY = (_local2.prY + (iYOffset * this.iOffsetCnt)); if (_local2.prY >= (iGGame.iRCellSize * this.iOffsetCnt)){ if (this.iGGame.iGraphGrid[this.iParamAnimation[0]][this.iParamAnimation[1]].State != GGame.stNormal){ this.iGGame.iGraphGrid[this.iParamAnimation[0]][this.iParamAnimation[1]].NeedReinit = true; } else { this.iGGame.iGraphGrid[this.iParamAnimation[0]][this.iParamAnimation[1]].SetElement(_local1); }; _local2.visible = false; this.iAnimState[_local1] = GGame.stNormal; }; }; }; _local1++; }; _local4 = true; _local5 = 0; while (_local5 < this.iCellSprite.numChildren) { if (this.iAnimState[_local5] != GGame.stNormal){ _local4 = false; break; }; _local5++; }; if (_local4){ if (this.NeedReinit == true){ (this.parent as GGame).ReInitCell(this.iCol, this.iRow); this.NeedReinit = false; }; this.State = GGame.stNormal; this.iParamAnimation.pop(); this.iParamAnimation.pop(); }; break; case GGame.stReinitCell: (this.parent as GGame).ReInitCell(this.iCol, this.iRow); this.State = GGame.stNormal; break; case GGame.stRotate: if (this.iAngle < 90){ this.iAngle = (this.iAngle + iAngleOffset); _local6 = (this.parent as GGame).GetCellColors(); this.InitCell((this.parent as GGame).GetCellColors(), this.iAngle); } else { this.iAngle = 0; this.ReInitCell((this.parent as GGame).RotateColor(), this.iAngle); this.State = GGame.stNormal; }; break; case GGame.stAnimationDestroy: _local1 = 0; while (_local1 < 4) { switch (this.iAnimState[_local1]){ case GGame.stDesappear: if (_local1 >= this.iCellSprite.numChildren){ break; }; if (this.iIsDoubleBorder[_local1]){ _local3 = (this.iRingSprite.getChildAt(((this.iRingSprite.numChildren - _local1) - 1)) as OBitmap); } else { if (((this.iIsBorder[_local1]) && (!(this.iIsDoubleBorder[_local1])))){ _local3 = (this.iBorderSprite.getChildAt(((this.iBorderSprite.numChildren - _local1) - 1)) as OBitmap); }; }; _local2 = (this.iCellSprite.getChildAt(id[_local1]) as OBitmap); if (_local2.alpha > 0){ _local2.alpha = (_local2.alpha - iAlphaOffset); if (_local3 != null){ _local3.alpha = (_local3.alpha - iAlphaOffset); }; } else { if (((!((_local3 == null))) && ((_local3.alpha > 0)))){ _local3.alpha = (_local3.alpha - iAlphaOffset); return; }; this.iAnimState[_local1] = GGame.stNormal; if (this.iIsDoubleBorder[_local1]){ this.iIsDoubleBorder[_local1] = false; if (GDefine.EqualArray(this.iIsDoubleBorder, [false, false, false, false])){ this.iIsFree--; }; } else { this.iIsBorder[_local1] = false; }; if (GDefine.EqualArray(this.iAnimState, [GGame.stNormal, GGame.stNormal, GGame.stNormal, GGame.stNormal])){ this.ReInitCell((this.parent as GGame).iLogGame.iGrid[iCol][iRow].GetElms()); this.State = GGame.stNormal; return; }; }; break; }; _local1++; }; break; }; } public function set State(_arg1:int):void{ var _local2:int; var _local3:OBitmap; this.iState = _arg1; switch (_arg1){ case GGame.stMoveDown: this.iOffsetCnt = this.iParamAnimation[2]; break; case GGame.stAnimationDestroy: if ((this.parent as GGame).iIsOpponent){ break; }; if (((((!(GDefine.EqualArray(this.iIsBorder, [false, false, false, false]))) && (isBorderDestroy()))) || (((!(GDefine.EqualArray(this.iIsBorder, [false, false, false, false]))) && (isRingDestroy()))))){ _local2 = 0; while (_local2 < GDefine.iStarsCount) { this.iGGame.gParticleContainer.addSimpleParticle(_local2, (this.prX + (this.iGGame.iRCellSize / 2)), (this.prY + (this.iGGame.iRCellSize / 2))); _local2++; }; }; break; case GGame.stFillEmpty: this.ReInitCell(this.iParamAnimation[0]); _local2 = 0; while (_local2 < 4) { if (this.iAnimState[_local2] == GGame.stFillEmpty){ _local3 = (this.iCellSprite.getChildAt(id[_local2]) as OBitmap); _local3.alpha = 0; }; _local2++; }; break; }; } } }//package RES
Section 85
//GDefine (RES.GDefine) package RES { import ENGINE.DISPLAY.*; import flash.display.*; public class GDefine { public static const iLevel16:Array = new Array([0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 3, 1, 3, 1, 0, 1], [1, 1, 2, 1, 3, 1, 2, 1, 1], [1, 3, 1, 0, 1, 0, 1, 3, 1], [1, 1, 3, 1, 0, 1, 3, 1, 1], [1, 3, 1, 0, 1, 0, 1, 3, 1], [1, 1, 2, 1, 3, 1, 2, 1, 1], [1, 0, 1, 3, 1, 3, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0]); public static const iLevel17:Array = new Array([0, 0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 3, 1, 1, 0, 0], [1, 1, 1, 2, 3, 2, 1, 1, 1], [1, 1, 2, 2, 3, 2, 2, 1, 1], [1, 3, 3, 3, 3, 3, 3, 3, 1], [1, 1, 2, 2, 3, 2, 2, 1, 1], [1, 1, 1, 2, 3, 2, 1, 1, 1], [0, 0, 1, 1, 3, 1, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 0, 0]); public static const iLevel19:Array = new Array([0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 3, 1, 1, 1, 1], [1, 1, 3, 1, 0, 1, 3, 1, 1], [1, 1, 1, 2, 1, 2, 1, 1, 1], [1, 3, 0, 1, 3, 1, 0, 3, 1], [1, 1, 1, 2, 1, 2, 1, 1, 1], [1, 1, 3, 1, 0, 1, 3, 1, 1], [1, 1, 1, 1, 3, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0]); public static const iOpponentScale:Number = 0.45; public static const iMaxLevel:int = 69; public static const iLevel11:Array = new Array([1, 1, 1, 1, 1, 1, 1], [1, 3, 1, 0, 1, 3, 1], [1, 1, 2, 1, 2, 1, 1], [1, 0, 1, 3, 1, 0, 1], [1, 1, 2, 1, 2, 1, 1], [1, 3, 1, 0, 1, 3, 1], [1, 1, 1, 1, 1, 1, 1]); public static const iLevelNovice:int = 0; public static const iLevel12:Array = new Array([0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 2, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 2, 1, 2, 1, 2, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 2, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0]); public static const iLevel15:Array = new Array([0, 0, 1, 1, 1, 0, 0], [0, 1, 1, 3, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1], [1, 3, 1, 3, 1, 3, 1], [1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 3, 1, 1, 0], [0, 0, 1, 1, 1, 0, 0]); public static const iLevel20:Array = new Array([0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 3, 1, 1, 0, 0], [0, 1, 1, 3, 1, 3, 1, 1, 0], [1, 1, 3, 1, 3, 1, 3, 1, 1], [0, 1, 1, 3, 1, 3, 1, 1, 0], [0, 0, 1, 1, 3, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0]); public static const iLevel18:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 1, 1, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 1, 1, 3, 1, 1, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 1, 1, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel22:Array = new Array([1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 3, 3, 1, 0, 1, 3, 3, 1], [1, 3, 3, 1, 0, 1, 3, 3, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 3, 3, 1, 0, 1, 3, 3, 1], [1, 3, 3, 1, 0, 1, 3, 3, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1]); public static const iLevel23:Array = new Array([1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 2, 1, 1, 2, 1, 1, 2, 1], [0, 1, 3, 1, 0, 1, 3, 1, 0], [1, 1, 1, 2, 1, 2, 1, 1, 1], [1, 2, 0, 1, 3, 1, 0, 2, 1], [1, 1, 1, 2, 1, 2, 1, 1, 1], [0, 1, 3, 1, 0, 1, 3, 1, 0], [1, 2, 1, 1, 2, 1, 1, 2, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1]); public static const iLevel24:Array = new Array([0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0], [1, 2, 2, 1, 0, 0, 0, 0, 1, 2, 2, 1], [1, 2, 2, 1, 0, 0, 0, 0, 1, 2, 2, 1], [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0], [1, 2, 2, 1, 0, 0, 0, 0, 1, 2, 2, 1], [1, 2, 2, 1, 0, 0, 0, 0, 1, 2, 2, 1], [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0]); public static const ET_FULL:int = 4; public static const iMaxFieldSize:int = 528; public static const iLevel21:Array = new Array([0, 1, 1, 1, 0, 0, 0, 0, 0], [1, 1, 3, 1, 1, 0, 0, 0, 0], [1, 3, 3, 3, 1, 0, 0, 0, 0], [1, 1, 3, 1, 1, 0, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 0], [0, 0, 0, 0, 1, 1, 3, 1, 1], [0, 0, 0, 0, 1, 3, 3, 3, 1], [0, 0, 0, 0, 1, 1, 3, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 0]); public static const iLevel25:Array = new Array([0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 2, 1, 1, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 3, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 1, 1, 1, 2, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0]); public static const iLevel26:Array = new Array([0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 3, 1, 0, 0, 0], [0, 0, 1, 1, 3, 1, 1, 0, 0], [0, 0, 1, 3, 3, 3, 1, 0, 0], [0, 1, 1, 3, 3, 3, 1, 1, 0], [0, 1, 3, 3, 3, 3, 3, 1, 0], [1, 1, 3, 3, 3, 3, 3, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel28:Array = new Array([0, 1, 1, 0, 0, 0, 1, 1, 0], [1, 2, 1, 1, 0, 1, 1, 2, 1], [1, 1, 3, 1, 0, 1, 3, 1, 1], [1, 3, 1, 1, 0, 1, 1, 3, 1], [0, 1, 2, 0, 0, 0, 2, 1, 0], [1, 3, 1, 1, 0, 1, 1, 3, 1], [1, 1, 3, 1, 0, 1, 3, 1, 1], [1, 2, 1, 1, 0, 1, 1, 2, 1], [0, 1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel29:Array = new Array([1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 3, 1, 3, 1, 0, 0, 1, 3, 1, 3, 1], [1, 1, 0, 1, 2, 1, 1, 2, 1, 0, 1, 1], [1, 3, 1, 3, 1, 0, 0, 1, 3, 1, 3, 1], [1, 1, 2, 1, 1, 0, 0, 1, 1, 2, 1, 1], [0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0], [1, 1, 2, 1, 1, 0, 0, 1, 1, 2, 1, 1], [1, 3, 1, 3, 1, 0, 0, 1, 3, 1, 3, 1], [1, 1, 0, 1, 2, 1, 1, 2, 1, 0, 1, 1], [1, 3, 1, 3, 1, 0, 0, 1, 3, 1, 3, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]); public static const ET_NOT_FULL:int = 3; public static const iLevel27:Array = new Array([0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 1, 2, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 1, 3, 1, 3, 1, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 1, 2, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel31:Array = new Array([1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 2, 2, 2, 2, 1, 0, 0, 0], [1, 2, 0, 0, 2, 1, 0, 0, 0], [1, 2, 2, 2, 3, 1, 0, 0, 0], [1, 1, 1, 1, 3, 1, 1, 1, 1], [0, 0, 0, 1, 3, 2, 2, 2, 1], [0, 0, 0, 1, 2, 0, 0, 2, 1], [0, 0, 0, 1, 2, 2, 2, 2, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1]); public static const iLevel33:Array = new Array([2, 1, 2, 1, 2, 1], [1, 2, 1, 2, 1, 2], [2, 1, 2, 1, 2, 1], [1, 2, 1, 2, 1, 2], [2, 1, 2, 1, 2, 1], [1, 2, 1, 2, 1, 2]); public static const iLevel39:Array = new Array([2, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 2], [1, 2, 0, 0, 1, 3, 3, 1, 0, 0, 2, 1], [1, 0, 0, 1, 3, 3, 3, 3, 1, 0, 0, 1], [0, 0, 0, 1, 3, 3, 3, 3, 1, 0, 0, 0], [0, 1, 0, 0, 1, 3, 3, 1, 0, 0, 1, 0], [1, 3, 1, 0, 0, 1, 1, 0, 0, 1, 3, 1], [0, 1, 3, 1, 0, 0, 0, 0, 1, 3, 1, 0], [0, 0, 1, 3, 1, 1, 1, 1, 3, 1, 0, 0], [1, 0, 0, 1, 3, 3, 3, 3, 1, 0, 0, 1], [2, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2], [1, 3, 1, 0, 0, 0, 0, 0, 0, 1, 3, 1], [1, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 1]); public static const iLevel34:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 1, 2, 2, 2, 1], [1, 2, 0, 3, 1, 0, 0, 2, 1], [1, 2, 3, 2, 3, 2, 0, 2, 1], [1, 1, 1, 3, 0, 3, 1, 1, 1], [1, 2, 0, 2, 3, 2, 3, 2, 1], [1, 2, 0, 0, 1, 3, 0, 2, 1], [1, 2, 2, 2, 1, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel35:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 3, 3, 3, 3, 3, 3, 1], [1, 3, 1, 1, 1, 1, 1, 1, 1], [1, 3, 3, 3, 3, 3, 3, 3, 1], [1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 3, 3, 3, 3, 3, 3, 3, 1], [1, 3, 1, 1, 1, 1, 1, 1, 1], [1, 3, 3, 3, 3, 3, 3, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel32:Array = new Array([1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 2, 1, 0, 1, 3, 1, 0, 1, 2, 3, 1], [0, 1, 3, 1, 0, 1, 2, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 0, 1, 3, 1, 0, 1, 1], [1, 1, 0, 1, 3, 1, 0, 1, 2, 1, 0, 1], [1, 3, 1, 0, 1, 2, 1, 0, 1, 3, 1, 0], [0, 1, 2, 1, 0, 1, 3, 1, 0, 1, 2, 1], [1, 0, 1, 3, 1, 0, 1, 2, 1, 0, 1, 1], [1, 1, 0, 1, 2, 1, 0, 1, 3, 1, 0, 1], [1, 2, 1, 0, 1, 3, 1, 0, 1, 2, 1, 0], [1, 3, 2, 1, 0, 1, 2, 1, 0, 1, 3, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1]); public static const iLevel37:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 3, 3, 3, 3, 3, 3, 1], [1, 3, 1, 1, 1, 1, 1, 3, 1], [1, 3, 1, 0, 0, 0, 1, 3, 1], [1, 3, 1, 0, 0, 0, 1, 3, 1], [1, 3, 1, 0, 0, 0, 1, 3, 1], [1, 3, 1, 1, 1, 1, 1, 3, 1], [1, 3, 3, 3, 3, 3, 3, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel38:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 1, 1, 1, 1, 1, 2, 1], [1, 1, 2, 2, 2, 2, 2, 1, 1], [1, 1, 2, 1, 1, 1, 2, 1, 1], [1, 1, 2, 1, 3, 1, 2, 1, 1], [1, 1, 2, 1, 1, 1, 2, 1, 1], [1, 1, 2, 2, 2, 2, 2, 1, 1], [1, 2, 1, 1, 1, 1, 1, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel30:Array = new Array([1, 1, 0, 0, 0, 0, 0, 1, 1], [1, 3, 1, 0, 0, 0, 1, 3, 1], [0, 1, 3, 1, 0, 1, 3, 1, 0], [0, 0, 1, 3, 1, 3, 1, 0, 0], [0, 0, 0, 1, 3, 1, 0, 0, 0], [0, 0, 1, 3, 1, 3, 1, 0, 0], [0, 1, 3, 1, 0, 1, 3, 1, 0], [1, 3, 1, 0, 0, 0, 1, 3, 1], [1, 1, 0, 0, 0, 0, 0, 1, 1]); public static const iBackColor:String = "white"; public static const iLevel40:Array = new Array([1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 3, 1, 0, 1, 2, 2, 1, 0, 1, 3, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 2, 1, 0, 1, 2, 3, 1, 0, 1, 2, 1], [1, 2, 1, 0, 1, 3, 2, 1, 0, 1, 2, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 3, 1, 0, 1, 2, 2, 1, 0, 1, 3, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1]); public static const iLevel41:Array = new Array([2, 1, 1, 1, 2, 0, 1, 1, 1], [1, 3, 3, 3, 1, 0, 1, 2, 1], [1, 3, 3, 3, 1, 0, 0, 1, 1], [1, 3, 3, 3, 2, 1, 0, 0, 1], [2, 1, 1, 1, 3, 2, 1, 0, 0], [0, 0, 0, 1, 2, 3, 2, 1, 0], [1, 1, 0, 0, 1, 2, 3, 2, 1], [1, 2, 1, 0, 0, 1, 2, 3, 2], [1, 1, 1, 1, 0, 0, 1, 2, 2]); public static const iLevel42:Array = new Array([0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0], [1, 3, 1, 0, 1, 3, 3, 1, 0, 1, 3, 1], [0, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1, 0], [0, 0, 1, 3, 1, 0, 0, 1, 3, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0], [1, 3, 1, 0, 1, 3, 3, 1, 0, 1, 3, 1], [0, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 0], [1, 0, 1, 2, 1, 0, 0, 1, 2, 1, 0, 1], [3, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 3], [1, 3, 1, 0, 1, 3, 3, 1, 0, 1, 3, 1], [1, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1, 1], [1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1]); public static const iLevel43:Array = new Array([1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 3, 1, 3, 1, 3, 3, 3, 1], [0, 1, 1, 1, 1, 3, 3, 3, 1], [1, 3, 3, 3, 1, 3, 3, 3, 1], [1, 3, 3, 3, 1, 1, 1, 1, 0], [0, 1, 1, 1, 3, 3, 1, 3, 1], [1, 3, 3, 1, 3, 3, 1, 1, 0], [1, 3, 3, 1, 3, 3, 1, 3, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1]); public static const iLevel44:Array = new Array([0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 0], [1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 2, 1], [2, 3, 3, 3, 2, 0, 0, 2, 3, 3, 3, 2], [1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 2, 1], [0, 1, 2, 1, 0, 1, 1, 0, 1, 2, 1, 0], [0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0], [0, 1, 2, 1, 0, 1, 1, 0, 1, 2, 1, 0], [1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 2, 1], [2, 3, 3, 3, 2, 0, 0, 2, 3, 3, 3, 2], [1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 2, 1], [0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 0]); public static const iOffset:int = 10; public static const iLevel46:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 1, 3, 2, 3, 1, 3, 1], [1, 1, 1, 2, 0, 2, 1, 1, 1], [1, 3, 2, 3, 0, 3, 2, 3, 1], [1, 2, 0, 0, 0, 0, 0, 2, 1], [1, 3, 2, 3, 0, 3, 2, 3, 1], [1, 1, 1, 2, 0, 2, 1, 1, 1], [1, 3, 1, 3, 2, 3, 1, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel47:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1], [1, 3, 3, 3, 3, 3, 3, 2, 3, 1, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1], [1, 3, 3, 3, 3, 2, 3, 1, 3, 1, 3, 1], [1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 3, 1], [1, 3, 3, 2, 3, 1, 3, 1, 3, 1, 3, 1], [1, 1, 1, 1, 2, 1, 3, 1, 3, 1, 3, 1], [1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1], [1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel48:Array = new Array([1, 1, 1, 2, 2, 2, 1, 1, 1], [1, 0, 0, 2, 3, 2, 0, 0, 1], [1, 0, 0, 2, 3, 2, 0, 0, 1], [2, 2, 2, 2, 3, 2, 2, 2, 2], [1, 3, 3, 3, 3, 3, 3, 3, 1], [2, 2, 2, 2, 3, 2, 2, 2, 2], [1, 0, 0, 2, 3, 2, 0, 0, 1], [1, 0, 0, 2, 3, 2, 0, 0, 1], [1, 1, 1, 2, 2, 2, 1, 1, 1]); public static const iLevel36:Array = new Array([0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0]); public static const iFieldH:Array = new Array(4, 6, 6, 6, 6, 6, 6, 6, 6, 9, 9, 7, 7, 4, 6, 7, 9, 9, 9, 9, 9, 9, 9, 9, 12, 9, 9, 9, 9, 12, 9, 9, 12, 6, 9, 9, 12, 9, 9, 12, 12, 9, 12, 9, 12, 9, 9, 12, 9, 6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12); public static const iLevel49:Array = new Array([2, 2, 2, 2, 2, 2], [2, 3, 3, 3, 3, 2], [2, 3, 0, 0, 3, 2], [2, 3, 0, 0, 3, 2], [2, 3, 3, 3, 3, 2], [2, 2, 2, 2, 2, 2]); public static const iLevel45:Array = new Array([0, 1, 1, 1, 0, 0, 0, 0, 0], [0, 1, 2, 1, 1, 1, 1, 1, 1], [0, 1, 3, 2, 1, 2, 3, 2, 1], [0, 1, 2, 1, 1, 1, 2, 1, 1], [0, 1, 1, 1, 3, 1, 1, 1, 0], [1, 1, 2, 1, 1, 1, 2, 1, 0], [1, 2, 3, 2, 1, 2, 3, 1, 0], [1, 1, 1, 1, 1, 1, 2, 1, 0], [0, 0, 0, 0, 0, 1, 1, 1, 0]); public static const iFieldW:Array = new Array(4, 6, 6, 6, 6, 6, 6, 6, 6, 9, 9, 7, 7, 4, 6, 7, 9, 9, 9, 9, 9, 9, 9, 9, 12, 9, 9, 9, 9, 12, 9, 9, 12, 6, 9, 9, 12, 9, 9, 12, 12, 9, 12, 9, 12, 9, 9, 12, 9, 6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12); public static const iBorderColor:String = "red1"; public static const iCellHeight:int = 60; public static const iStarsCount:int = 30; public static const iLevel55:Array = new Array([1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 3, 2, 1, 0, 0, 0, 0, 1, 2, 3, 1], [1, 2, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1], [1, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1], [1, 0, 0, 1, 2, 2, 2, 2, 1, 0, 0, 1], [0, 0, 1, 2, 2, 3, 3, 2, 2, 1, 0, 0], [0, 0, 1, 2, 2, 3, 3, 2, 2, 1, 0, 0], [1, 0, 0, 1, 2, 2, 2, 2, 1, 0, 0, 1], [1, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1], [1, 2, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1], [1, 3, 2, 1, 0, 0, 0, 0, 1, 2, 3, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]); public static const iLevel50:Array = new Array([2, 1, 0, 1, 1, 1, 1, 1, 0, 2, 1, 2], [2, 1, 0, 1, 3, 3, 3, 1, 0, 1, 2, 1], [2, 1, 0, 1, 3, 1, 1, 1, 0, 2, 1, 2], [2, 1, 0, 1, 3, 1, 0, 0, 0, 0, 0, 0], [2, 1, 0, 1, 3, 1, 0, 2, 1, 2, 1, 2], [2, 1, 0, 1, 3, 1, 0, 1, 2, 1, 2, 1], [2, 1, 0, 1, 3, 1, 0, 0, 0, 0, 0, 0], [2, 1, 0, 1, 3, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 1], [2, 1, 2, 1, 2, 2, 0, 1, 3, 3, 3, 1], [1, 2, 1, 2, 1, 1, 0, 1, 3, 3, 3, 1], [2, 1, 2, 1, 2, 2, 0, 1, 3, 3, 3, 1]); public static const FieldPosX:int = 5; public static const FieldPosY:int = 5; public static const iLevel54:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 1], [1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 1], [1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel56:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1], [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel57:Array = new Array([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 0], [1, 1, 1, 3, 2, 2, 2, 2, 3, 1, 1, 1], [1, 2, 3, 1, 1, 1, 1, 1, 1, 3, 2, 1], [1, 2, 2, 1, 1, 0, 0, 1, 1, 2, 2, 1], [1, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 1], [1, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 1], [1, 2, 2, 1, 1, 0, 0, 1, 1, 2, 2, 1], [1, 2, 3, 1, 1, 1, 1, 1, 1, 3, 2, 1], [1, 1, 1, 3, 2, 2, 2, 2, 3, 1, 1, 1], [0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]); public static const iLevel51:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1], [1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1], [1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1], [1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1], [1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1], [1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel52:Array = new Array([0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1], [1, 2, 3, 3, 2, 1, 1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1, 1, 2, 3, 3, 2, 1], [1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1], [1, 2, 3, 3, 2, 1, 1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1, 1, 2, 3, 3, 2, 1], [1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0]); public static const iLevel53:Array = new Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 3, 3, 3, 1, 0, 0, 0, 1, 0, 0], [1, 3, 3, 3, 3, 3, 1, 0, 1, 2, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1], [0, 0, 0, 1, 3, 1, 1, 2, 2, 2, 2, 2], [0, 0, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1], [0, 1, 3, 3, 3, 3, 3, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 3, 1, 0, 0], [0, 1, 2, 1, 0, 0, 1, 3, 3, 3, 1, 0], [1, 2, 2, 2, 1, 1, 3, 3, 3, 3, 3, 1], [2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel58:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 1], [1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel59:Array = new Array([0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 0], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [0, 1, 2, 1, 0, 1, 1, 0, 1, 2, 1, 0], [0, 0, 1, 0, 1, 2, 2, 1, 0, 1, 0, 0], [0, 0, 0, 1, 2, 2, 2, 2, 1, 0, 0, 0], [0, 0, 0, 1, 2, 2, 2, 2, 1, 0, 0, 0], [0, 0, 1, 0, 1, 2, 2, 1, 0, 1, 0, 0], [0, 1, 2, 1, 0, 1, 1, 0, 1, 2, 1, 0], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0]); public static const iLevel60:Array = new Array([0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 0], [0, 0, 1, 1, 2, 2, 2, 2, 1, 1, 0, 0], [0, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 0], [1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1], [0, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 0], [0, 0, 1, 1, 2, 2, 2, 2, 1, 1, 0, 0], [0, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0]); public static const iLevel61:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel62:Array = new Array([1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 2, 2, 1, 0, 0, 1, 2, 2, 1], [1, 2, 2, 1, 0, 0, 1, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 2, 2, 1, 0, 0, 0], [0, 0, 0, 1, 2, 2, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 1, 0, 0, 1, 2, 2, 1], [1, 2, 2, 1, 0, 0, 1, 2, 2, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1]); public static const iLevel63:Array = new Array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 0, 0], [1, 2, 2, 2, 2, 1, 0, 1, 2, 2, 1, 0], [1, 2, 2, 2, 2, 1, 0, 1, 2, 2, 1, 0], [1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1], [0, 1, 2, 2, 1, 0, 1, 2, 2, 2, 2, 1], [0, 1, 2, 2, 1, 0, 1, 2, 2, 2, 2, 1], [0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]); public static const iLevel64:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1], [1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1], [1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1], [1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1], [1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1], [1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1], [1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1], [1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1], [1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1], [1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel65:Array = new Array([0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1], [0, 1, 1, 0, 0, 1, 2, 2, 1, 0, 2, 1], [1, 2, 2, 1, 0, 1, 3, 2, 1, 0, 0, 0], [1, 3, 2, 1, 0, 0, 1, 1, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 2, 1], [0, 0, 0, 0, 0, 2, 1, 0, 1, 3, 2, 1], [0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0], [0, 1, 2, 2, 1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 3, 2, 1, 0, 1, 2, 2, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 3, 2, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0]); public static const iLevel66:Array = new Array([0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 0], [0, 1, 2, 1, 1, 3, 3, 1, 1, 2, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1], [1, 3, 3, 1, 0, 0, 0, 0, 1, 3, 3, 1], [1, 3, 3, 1, 0, 0, 0, 0, 1, 3, 3, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 0], [0, 1, 2, 1, 1, 3, 3, 1, 1, 2, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0]); public static const iLevel67:Array = new Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1], [1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1], [1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1], [1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1], [1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1], [1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1], [1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1], [1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1], [1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1], [1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); public static const iLevel68:Array = new Array([1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1], [1, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 1], [1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1], [1, 1, 2, 1, 1, 0, 0, 1, 1, 2, 1, 1], [0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 0], [0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 0], [1, 1, 2, 1, 1, 0, 0, 1, 1, 2, 1, 1], [1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1], [1, 2, 3, 1, 1, 1, 1, 1, 1, 3, 2, 1], [1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]); public static const iLevel69:Array = new Array([1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 2, 1, 0, 0, 1, 2, 2, 2, 1], [1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1], [1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1], [0, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 0], [0, 0, 1, 1, 2, 2, 2, 2, 1, 1, 0, 0]); public static const CellSize:Array = new Array((iMaxFieldSize / 4), (iMaxFieldSize / 6), (iMaxFieldSize / 6), (iMaxFieldSize / 6), (iMaxFieldSize / 6), (iMaxFieldSize / 6), (iMaxFieldSize / 6), (iMaxFieldSize / 6), (iMaxFieldSize / 6), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 7), (iMaxFieldSize / 7), (iMaxFieldSize / 4), (iMaxFieldSize / 6), (iMaxFieldSize / 7), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 6), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 9), (iMaxFieldSize / 9), (iMaxFieldSize / 12), (iMaxFieldSize / 9), (iMaxFieldSize / 6), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 10), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12), (iMaxFieldSize / 12)); public static const iLevelExpert:int = 1; public static const iDemoKey:int = 100; public static const iLevelMaster:int = 2; public static const iLevel1:Array = new Array([1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 2, 1], [0, 1, 1, 2, 1, 0], [0, 1, 2, 1, 1, 0], [1, 2, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1]); public static const iLevel2:Array = new Array([0, 1, 1, 1, 1, 1], [1, 0, 1, 2, 2, 1], [1, 1, 0, 1, 2, 1], [1, 2, 1, 0, 1, 1], [1, 2, 2, 1, 0, 1], [1, 1, 1, 1, 1, 0]); public static const iLevel3:Array = new Array([0, 0, 1, 1, 1, 1], [0, 1, 1, 2, 2, 1], [1, 1, 2, 1, 2, 1], [1, 2, 1, 2, 1, 1], [1, 2, 2, 1, 1, 0], [1, 1, 1, 1, 0, 0]); public static const iLevel4:Array = new Array([1, 1, 1, 1, 1, 1], [1, 3, 1, 1, 3, 1], [1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1], [1, 3, 1, 1, 3, 1], [1, 1, 1, 1, 1, 1]); public static const iLevel5:Array = new Array([1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 2, 1, 1, 2, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]); public static const iLevel6:Array = new Array([0, 0, 1, 1, 0, 0], [0, 1, 2, 2, 1, 0], [1, 2, 2, 2, 2, 1], [1, 2, 2, 2, 2, 1], [0, 1, 2, 2, 1, 0], [0, 0, 1, 1, 0, 0]); public static const iLevel9:Array = new Array([1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 3, 1, 0, 0, 0, 1, 3, 1], [1, 1, 1, 0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 2, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 3, 1, 0, 0, 0, 1, 3, 1], [1, 1, 1, 0, 0, 0, 1, 1, 1]); public static const iLevel0:Array = new Array([1, 1, 1, 1], [1, 1, 2, 1], [1, 2, 1, 1], [1, 1, 1, 1]); public static const iLevel7:Array = new Array([1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 3, 3, 1, 1], [1, 1, 3, 3, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1]); public static const iLevel8:Array = new Array([0, 1, 1, 1, 1, 0], [1, 0, 2, 2, 0, 1], [1, 2, 1, 1, 2, 1], [1, 2, 1, 1, 2, 1], [1, 0, 2, 2, 0, 1], [0, 1, 1, 1, 1, 0]); public static const iTColor:Array = new Array("yellow", "aqua1", "yellow1", "magenta1"); public static const iCellWidth:int = 60; public static const iOpponenentY:int = 100; public static const iOpponenentX:int = 550; public static const ET_ANGLE:int = 5; public static const iActInitCell:int = 0; public static const GLevel:Array = new Array(iLevel0, iLevel1, iLevel2, iLevel3, iLevel4, iLevel5, iLevel6, iLevel7, iLevel8, iLevel9, iLevel10, iLevel11, iLevel12, iLevel13, iLevel14, iLevel15, iLevel16, iLevel17, iLevel18, iLevel19, iLevel20, iLevel21, iLevel22, iLevel23, iLevel24, iLevel25, iLevel26, iLevel27, iLevel28, iLevel29, iLevel30, iLevel31, iLevel32, iLevel33, iLevel34, iLevel35, iLevel36, iLevel37, iLevel38, iLevel39, iLevel40, iLevel41, iLevel42, iLevel43, iLevel44, iLevel45, iLevel46, iLevel47, iLevel48, iLevel49, iLevel50, iLevel51, iLevel52, iLevel53, iLevel54, iLevel55, iLevel56, iLevel57, iLevel58, iLevel59, iLevel60, iLevel61, iLevel62, iLevel63, iLevel64, iLevel65, iLevel66, iLevel67, iLevel68, iLevel69); public static const iLevelColor:Array = new Array(2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4, 4); public static const ET_TRIANGLE:int = 1; public static const ET_EMPTY:int = 0; public static const iStarSizeScale:Number = 2.5; public static const ET_BANTIK:int = 2; public static const iStarColor:String = "red1"; public static const iStarEffect:String = "text 60"; public static const iLevel10:Array = new Array([0, 0, 0, 0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 3, 1], [0, 0, 0, 0, 1, 1, 3, 1, 1], [0, 0, 0, 1, 1, 3, 1, 1, 0], [0, 0, 1, 1, 3, 1, 1, 0, 0], [0, 1, 1, 3, 1, 1, 0, 0, 0], [1, 1, 3, 1, 1, 0, 0, 0, 0], [1, 3, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0]); public static const iLevel13:Array = new Array([2, 1, 1, 2], [1, 2, 2, 1], [1, 2, 2, 1], [2, 1, 1, 2]); public static const iLevel14:Array = new Array([1, 1, 1, 1, 1, 1], [1, 0, 2, 2, 0, 1], [1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1], [1, 0, 2, 2, 0, 1], [1, 1, 1, 1, 1, 1]); public static var iRCellSize:int; public static function TrianglesCreate(_arg1:Number=1, _arg2:Number=1, _arg3:Boolean=false):Array{ var _local4:Array; var _local5:Sprite; var _local6:Number; var _local7:int; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:Array; var _local15:Array; var _local16:int; var _local17:OBitmap; switch (GDefine.iFieldH[TriadzL.iGAME.prLevel]){ case 12: case 10: _arg2 = 0.65; if (_arg3){ _arg2 = (_arg2 / 4); }; break; case 8: case 9: _arg2 = 0.75; if (_arg3){ _arg2 = (_arg2 / 4); }; break; }; _local4 = new Array(); _local5 = new ((TriadzL.TRLeft as Class)); _local6 = (GDefine.CellSize[TriadzL.iGAME.prLevel] / Math.max(_local5.height, _local5.width)); _local6 = (_local6 * _arg1); _local7 = 0; while (_local7 < iLevelColor[TriadzL.iGAME.prLevel]) { _local8 = new Array(); _local9 = new Array(); _local10 = new Array(); _local11 = new Array(); _local12 = new Array(); _local13 = new Array(); _local14 = new Array(); _local15 = new Array(); _local16 = 0; while (_local16 < 4) { _local17 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], _local6, (_local16 * 90), 25, 25], 1, "GEL", GDefine.iTColor[_local7], "spanel", _arg2, 0, 0]); _local9.push(_local17); _local17 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local16 * 90) + 15), 25, 25], _local6, "GEL", GDefine.iTColor[_local7], "spanel", _arg2, 0, 0]); _local10.push(_local17); _local17 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local16 * 90) + 30), 25, 25], _local6, "GEL", GDefine.iTColor[_local7], "spanel", _arg2, 0, 0]); _local11.push(_local17); _local17 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local16 * 90) + 45), 25, 25], _local6, "GEL", GDefine.iTColor[_local7], "spanel", _arg2, 0, 0]); _local12.push(_local17); _local17 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local16 * 90) + 60), 25, 25], _local6, "GEL", GDefine.iTColor[_local7], "spanel", _arg2, 0, 0]); _local13.push(_local17); _local17 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local16 * 90) + 75), 25, 25], _local6, "GEL", GDefine.iTColor[_local7], "spanel", _arg2, 0, 0]); _local14.push(_local17); _local17 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local16 * 90) + 90), 25, 25], _local6, "GEL", GDefine.iTColor[_local7], "spanel", _arg2, 0, 0]); _local15.push(_local17); _local16++; }; _local8.push(_local9); _local8.push(_local10); _local8.push(_local11); _local8.push(_local12); _local8.push(_local13); _local8.push(_local14); _local8.push(_local15); _local4.push(_local8); _local7++; }; return (_local4); } public static function TrianglesCreateH(_arg1:Number=1, _arg2:Number=1):Array{ var _local3:Array; var _local4:Sprite; var _local5:Number; var _local6:int; var _local7:Array; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:Array; var _local15:int; var _local16:OBitmap; _local3 = new Array(); _local4 = new ((TriadzL.TRLeft as Class)); _local5 = (GDefine.CellSize[0] / Math.max(_local4.height, _local4.width)); _local5 = (_local5 * _arg1); _local6 = 0; while (_local6 < iLevelColor[0]) { _local7 = new Array(); _local8 = new Array(); _local9 = new Array(); _local10 = new Array(); _local11 = new Array(); _local12 = new Array(); _local13 = new Array(); _local14 = new Array(); _local15 = 0; while (_local15 < 4) { _local16 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], _local5, (_local15 * 90), 25, 25], 1, "GEL", GDefine.iTColor[_local6], "spanel", _arg2, 0, 0]); _local8.push(_local16); _local16 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local15 * 90) + 15), 25, 25], _local5, "GEL", GDefine.iTColor[_local6], "spanel", _arg2, 0, 0]); _local9.push(_local16); _local16 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local15 * 90) + 30), 25, 25], _local5, "GEL", GDefine.iTColor[_local6], "spanel", _arg2, 0, 0]); _local10.push(_local16); _local16 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local15 * 90) + 45), 25, 25], _local5, "GEL", GDefine.iTColor[_local6], "spanel", _arg2, 0, 0]); _local11.push(_local16); _local16 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local15 * 90) + 60), 25, 25], _local5, "GEL", GDefine.iTColor[_local6], "spanel", _arg2, 0, 0]); _local12.push(_local16); _local16 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local15 * 90) + 75), 25, 25], _local5, "GEL", GDefine.iTColor[_local6], "spanel", _arg2, 0, 0]); _local13.push(_local16); _local16 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TRLeft], 1, ((_local15 * 90) + 90), 25, 25], _local5, "GEL", GDefine.iTColor[_local6], "spanel", _arg2, 0, 0]); _local14.push(_local16); _local15++; }; _local7.push(_local8); _local7.push(_local9); _local7.push(_local10); _local7.push(_local11); _local7.push(_local12); _local7.push(_local13); _local7.push(_local14); _local3.push(_local7); _local6++; }; return (_local3); } public static function SSize(_arg1:Number=1):int{ return ((CellSize[0] * _arg1)); } public static function BordersCreateH(_arg1:Number=1, _arg2:Number=1):Array{ var _local3:Array; var _local4:Sprite; var _local5:Number; var _local6:int; var _local7:OBitmap; _local3 = new Array(); _local4 = new ((TriadzL.TRLeft as Class)); _local5 = (GDefine.CellSize[0] / Math.max(_local4.height, _local4.width)); _local5 = (_local5 * _arg1); _local6 = 0; while (_local6 < 4) { _local7 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TBorder], _local5, (_local6 * 90), 25, 25], 1, "GEL", iBorderColor, "text 30", _arg2, 0, 0]); _local3.push(_local7); _local6++; }; return (_local3); } public static function SetSize(_arg1:Number=1):int{ return ((CellSize[TriadzL.iGAME.prLevel] * _arg1)); } public static function BordersCreate(_arg1:Number=1, _arg2:Number=1.5, _arg3:int=1):Array{ var _local4:Array; var _local5:Sprite; var _local6:Number; var _local7:int; var _local8:OBitmap; switch (GDefine.iFieldH[TriadzL.iGAME.prLevel]){ case 12: case 10: _arg2 = 0.9; case 8: case 9: _arg2 = 0.75; }; _local4 = new Array(); _local5 = new ((TriadzL.TRLeft as Class)); _local6 = (GDefine.CellSize[TriadzL.iGAME.prLevel] / Math.max(_local5.height, _local5.width)); _local6 = (_local6 * _arg1); _local7 = 0; while (_local7 < 4) { _local8 = new OBitmap(); if (_arg3 == 1){ _local8 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TBorder], _local6, (_local7 * 90), 25, 25], 1, "GEL", iBorderColor, "text 30", _arg2, 0, 0]); } else { _local8 = ODisplay.OBitmapMake([null, [ODisplay.SpriteScaleRotate, [ODisplay.SpriteLib, TriadzL.TDBorder], _local6, (_local7 * 90), 25, 25], 1, "GEL", iBorderColor, "text 30", _arg2, 0, 0]); }; _local4.push(_local8); _local7++; }; return (_local4); } public static function EqualArray(_arg1:Array, _arg2:Array):Boolean{ var _local3:int; if ((((_arg1 == null)) || ((_arg2 == null)))){ return (false); }; if (_arg1.length != _arg2.length){ return (false); }; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3] != _arg2[_local3]){ return (false); }; _local3++; }; return (true); } } }//package RES
Section 86
//GGame (RES.GGame) package RES { import ENGINE.DISPLAY.*; import flash.events.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.*; import ENGINE.CORE.*; import RES.OBJECTS.Particle.*; import flash.utils.*; import RES.WINDOWS.*; import flash.text.*; public class GGame extends OSprite { private var iOldColors:Array; private var iRecord:ORecord; private var iClSprite:OSprite; public var iGameLevel:int; private var iiIsAnimation:Boolean; private var iFieldH:int; private var iTimer:Timer; private var iFieldW:int; private var iRnd:int;// = -1 public var iTrg:Array; public var iRingScale:Number; private var iPosX:int; private var iPosY:int; public var iRCellSize:int; public var iLogGame:OLogGame; public var iDTrg:Array; private var iColorCount:int; private var RKey:int; public var iBrd:Array; private var iGraphInit:Boolean; private var iWasFiling:Boolean; private var iInit:Boolean; private var currentCount:int;// = 0 public var gParticleContainer:CParticleContainer; protected var iiState:int;// = 0 public var iGraphGrid:Array; private var iRowClick:int; private var iColClick:int; public var iFinishO:Boolean; private var iRTime:int; private var iDestrColors:int; private var isPlay:Boolean; private var iReinitIdx:Array; private var iCurrTime:int; private var iScore:int; private var iBitmScale:Number; private var iGameType:int; private var isHowTo:Boolean; public var iIsOpponent:Boolean; private var iWasMoveDown:Boolean; public static const stStopOpponent:int = 12; public static const stCreate:int = 0; public static const stReinitCell:int = 9; public static const stInvisible:int = 6; public static const stDesappear:int = 10; public static const stMoveDown:int = 8; public static const stAnimationDestroy:int = 7; public static const stRotate:int = 4; public static const stShowHint:int = 5; public static const stNormal:int = 3; public static const stFillEmpty:int = 11; public static const stInitLog:int = 1; public static const stInitGraph:int = 2; public function GGame(_arg1:Boolean=false, _arg2:Number=1, _arg3:int=0, _arg4:int=0, _arg5:Boolean=false){ iiState = 0; currentCount = 0; iRnd = -1; gParticleContainer = new CParticleContainer(this); this.addChild(gParticleContainer); super(); this.iBitmScale = _arg2; this.isHowTo = _arg5; this.iFinishO = false; iReinitIdx = new Array(); this.iWasFiling = false; this.prVisible = false; this.State = stInvisible; this.iInit = false; this.iGraphInit = false; this.iIsOpponent = _arg1; this.iRnd = -1; this.iRTime = 0; this.addEventListener(Event.ENTER_FRAME, onEnterFrame); iPosX = _arg3; iPosY = _arg4; if (!this.isHowTo){ this.addEventListener(MouseEvent.CLICK, OnMouseClick); }; this.iRecord = new ORecord(); this.iScore = 0; CPrototypeFactory.createParticleBitmaps(); currentCount = getTimer(); } public function ReInitCell(_arg1:int, _arg2:int):void{ var _local3:Array; _local3 = this.iLogGame.iGrid[_arg1][_arg2].GetElms(); this.iGraphGrid[_arg1][_arg2].ReInitCell(_local3); } public function set prColClick(_arg1:int):void{ iColClick = _arg1; } public function get prGameIndex():int{ iRnd = (((TriadzL.iGAME.prGamesStartCount + TriadzL.iGAME.prLevel) + TriadzL.iGAME.prRNDFactor) % 10); return (iRnd); } public function InitLevel(_arg1:int, _arg2:int, _arg3:int=-1):void{ iScore = 0; if (this.iIsOpponent){ if (this.iRTime > 4000){ this.iTimer = new Timer(4000, 1); } else { this.iTimer = new Timer((this.iRTime * 2), 1); }; this.iTimer.addEventListener(TimerEvent.TIMER, OnTimer); this.iTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); iTrg = null; this.iBrd = null; this.iDTrg = null; this.iTrg = GDefine.TrianglesCreate(GDefine.iOpponentScale, 0.3, true); this.iBrd = GDefine.BordersCreate(GDefine.iOpponentScale, 1); iRingScale = GDefine.iOpponentScale; this.iDTrg = GDefine.BordersCreate(iBitmScale, 1, 2); this.iRCellSize = GDefine.SetSize(GDefine.iOpponentScale); CPrototypeFactory.createEnemyCellBack(iRCellSize); CPrototypeFactory.createEnemyCellRing(iRCellSize); } else { iTrg = null; this.iBrd = null; if (!isHowTo){ this.iTrg = GDefine.TrianglesCreate(iBitmScale); this.iBrd = GDefine.BordersCreate(iBitmScale); this.iDTrg = GDefine.BordersCreate(iBitmScale, 1.5, 2); iRingScale = iBitmScale; } else { this.iTrg = GDefine.TrianglesCreateH(iBitmScale, 0.9); this.iBrd = GDefine.BordersCreateH(iBitmScale, 1.5); this.iDTrg = GDefine.BordersCreate(iBitmScale, 1.5, 2); iRingScale = iBitmScale; }; if (!isHowTo){ this.iRCellSize = GDefine.SetSize(iBitmScale); } else { this.iRCellSize = GDefine.SSize(iBitmScale); }; CPrototypeFactory.createPlayerCellBack(iRCellSize); CPrototypeFactory.createCellRing(iRCellSize); }; this.iClSprite = new OSprite(); this.addChild(this.iClSprite); this.iClSprite.Pos(3, 3); while (this.numChildren > 0) { this.removeChildAt((this.numChildren - 1)); }; this.iGameLevel = _arg1; this.iFieldH = GDefine.iFieldH[_arg1]; this.iFieldW = GDefine.iFieldH[_arg1]; this.iColorCount = _arg2; this.iInit = true; if (!this.iGraphGrid){ this.iGraphGrid = null; }; if (((this.iIsOpponent) || (this.isHowTo))){ this.iRnd = _arg3; this.visible = false; }; this.iiState = stCreate; if (this.iIsOpponent){ this.iTimer.start(); }; } public function get State():int{ return (this.iiState); } private function FieldCreate():void{ if (this.isHowTo){ TriadzL.RKey = GDefine.iDemoKey; } else { TriadzL.RKey = TriadzL.iRKey[iRnd]; }; this.iLogGame = new OLogGame(this.iColorCount, this.iGameLevel, TriadzL.RKey); this.iLogGame.InitGame(this.iFieldH, this.iFieldW); } private function IsFinish():Boolean{ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < this.iFieldH) { _local2 = 0; while (_local2 < this.iFieldW) { if (this.iGraphGrid[_local1][_local2].IsFree){ } else { if (!this.iGraphGrid[_local1][_local2].IsColor){ return (false); }; }; _local2++; }; _local1++; }; return (true); } public function OnTimer(_arg1:Event):void{ } override public function Free():void{ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < this.iFieldH) { _local2 = 0; while (_local2 < this.iFieldW) { if (((((!((iGraphGrid == null))) && (!((iGraphGrid[_local1] == null))))) && (!((iGraphGrid[_local1][_local2] == null))))){ this.iGraphGrid[_local1][_local2].Free(); }; this.iGraphGrid[_local1][_local2] = null; _local2++; }; _local1++; }; this.removeEventListener(Event.ENTER_FRAME, onEnterFrame); if (this.iTimer){ this.iTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); this.iTimer.removeEventListener(TimerEvent.TIMER, OnTimer); this.iTimer = null; }; super.Free(); } public function RotateColor():Array{ return (this.iLogGame.iGrid[this.iRowClick][this.iColClick].GetElms()); } public function onEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:Array; if (this.parent == null){ return; }; if (State > GGame.stInitGraph){ _local2 = 0; while (_local2 < this.iFieldH) { _local3 = 0; while (_local3 < this.iFieldW) { if (((((!((iGraphGrid == null))) && (!((iGraphGrid[_local2] == null))))) && (!((iGraphGrid[_local2][_local3] == null))))){ this.iGraphGrid[_local2][_local3].OnEnterFrame(); }; _local3++; }; _local2++; }; }; switch (this.State){ case stNormal: break; case stCreate: this.State = stInitLog; break; case stInitLog: this.State = stInitGraph; break; case stInitGraph: _local2 = 0; while (_local2 < this.iFieldH) { _local3 = 0; while (_local3 < this.iFieldW) { _local4 = this.iLogGame.iGrid[_local2][_local3].GetElms(); this.iGraphGrid[_local2][_local3].InitCell(_local4); _local3++; }; _local2++; }; this.State = stNormal; break; case stRotate: if ((((iRowClick >= this.iFieldH)) || ((this.iColClick >= this.iFieldW)))){ this.State = stNormal; return; }; if ((((((this.iColClick < 0)) || ((this.iRowClick < 0)))) || (!((this.iGraphGrid[iRowClick][this.iColClick].State == stNormal))))){ return; }; this.iColClick = -1; this.iRowClick = -1; this.State = stAnimationDestroy; break; case stAnimationDestroy: if (this.isGridAnimation()){ return; }; if (!this.isHowTo){ if (this.iDestrColors != 0){ this.CalculateScore(); this.iDestrColors = 0; if (!this.iIsOpponent){ (this.parent as OWGame).iScore.prValue = this.iScore; } else { (this.parent as OWGame).iScoreO.prValue = this.iScore; }; }; }; if (this.iLogGame.CanMoveDown()){ this.State = stMoveDown; return; }; if (this.iLogGame.CanFillFree()){ this.State = stFillEmpty; return; }; this.State = stNormal; break; case stFillEmpty: if (this.isGridAnimation()){ return; }; this.State = stAnimationDestroy; break; case stMoveDown: if (this.isGridAnimation()){ return; }; if (this.iLogGame.CanMoveDown()){ this.State = stMoveDown; return; }; this.State = stAnimationDestroy; break; }; } public function GridReinit():void{ var _local1:int; var _local2:int; var _local3:int; if (iReinitIdx.length == 0){ return; }; _local1 = 0; _local2 = 0; while (_local2 < this.iFieldH) { _local3 = 0; while (_local3 < this.iFieldW) { if ((((_local2 == iReinitIdx[_local1][0])) && ((_local3 == iReinitIdx[_local1][0])))){ this.iGraphGrid[_local2][_local3].State = stNormal; this.iGraphGrid[_local2][_local3].InitCell(this.iLogGame.iGrid[_local2][_local3].GetElms()); _local1++; }; if (_local1 >= iReinitIdx.length){ return; }; _local3++; }; _local2++; }; } public function set State(_arg1:int):void{ var _local2:int; var _local3:OWindow; var _local4:Array; var _local5:int; var _local6:Array; var _local7:Array; var _local8:Array; var _local9:int; var _local10:Array; var _local11:Array; var _local12:int; var _local13:int; var _local14:Array; var _local15:int; _local2 = this.iiState; if (this.State != stNormal){ this.iiIsAnimation = false; } else { this.iiIsAnimation = true; }; this.iiState = _arg1; switch (_arg1){ case stStopOpponent: if (this.iTimer){ this.iTimer.reset(); }; break; case stFillEmpty: _local4 = this.iLogGame.FillFree(); isPlay = false; if (_local4.length == 1){ this.isPlay = false; this.State = stAnimationDestroy; return; }; _local5 = 0; while (_local5 < (_local4.length - 1)) { _local6 = _local4[_local5]; _local7 = _local6[2]; _local8 = _local6[3]; this.iGraphGrid[_local6[0]][_local6[1]].ResetState(); _local9 = 0; while (_local9 < _local8.length) { this.iGraphGrid[_local6[0]][_local6[1]].iAnimState[_local8[_local9]] = stFillEmpty; _local9++; }; this.iGraphGrid[_local6[0]][_local6[1]].iParamAnimation[0] = _local6[2]; this.iGraphGrid[_local6[0]][_local6[1]].iParamAnimation[1] = _local6[3]; this.iGraphGrid[_local6[0]][_local6[1]].State = stFillEmpty; _local5++; }; this.iWasFiling = _local4[(_local4.length - 1)]; break; case stNormal: if (iIsOpponent){ if (this.iRTime > 0){ this.iTimer.start(); }; }; isPlay = false; if (this.IsFinish()){ this.State = OWGame.stLevelComplete; } else { if (!this.iLogGame.NextStepPossible()){ this.State = OWGame.stGameOver; return; }; }; break; case OWGame.stLevelComplete: if (this.iIsOpponent){ iFinishO = true; }; break; case stAnimationDestroy: _local10 = this.iLogGame.Destroy(); this.iDestrColors = _local10[(_local10.length - 1)]; if (_local10.length == 0){ this.iDestrColors = -1; }; if (this.iDestrColors < 0){ if (this.iLogGame.CanMoveDown()){ this.State = stMoveDown; return; }; if (this.iLogGame.CanFillFree()){ this.State = stFillEmpty; return; }; this.State = stNormal; if ((((_local2 == stRotate)) && (!(this.iIsOpponent)))){ OSound.PlaySoundInd(3); }; return; } else { _local5 = 0; while (_local5 < (_local10.length - 1)) { _local6 = _local10[_local5]; _local11 = _local6[2]; this.iGraphGrid[_local6[0]][_local6[1]].ResetState(); _local9 = 0; while (_local9 < _local11.length) { this.iGraphGrid[_local6[0]][_local6[1]].iAnimState[_local11[_local9]] = stDesappear; _local9++; }; this.iGraphGrid[_local6[0]][_local6[1]].State = stAnimationDestroy; if (((this.iGraphGrid[_local6[0]][_local6[1]].isBorderDestroy()) || (((this.iGraphGrid[_local6[0]][_local6[1]].isRingDestroy()) && (!(isPlay)))))){ if (!iIsOpponent){ OSound.PlaySoundInd(1); isPlay = true; }; }; _local5++; }; if (!isPlay){ if (!iIsOpponent){ OSound.PlaySoundInd(2); isPlay = true; }; }; }; break; case stRotate: if ((((((((iRowClick >= this.iFieldH)) || ((iColClick >= this.iFieldW)))) || ((iRowClick < 0)))) || ((iColClick < 0)))){ return; }; if (this.iGraphGrid[iRowClick][this.iColClick].State != stRotate){ this.iGraphGrid[iRowClick][this.iColClick].State = stRotate; if (!this.iLogGame.WillDestroy(iRowClick, iColClick)){ }; }; this.iOldColors = new Array(4); _local5 = 0; while (_local5 < 4) { this.iOldColors[_local5] = this.iLogGame.iGrid[this.iRowClick][this.iColClick].GetColorElm(_local5); _local5++; }; this.iLogGame.Rotate(this.iRowClick, this.iColClick); break; case stInitLog: this.FieldCreate(); if (this.iIsOpponent){ this.State = stInitGraph; }; break; case stInitGraph: GraphGridCreate(); break; case stMoveDown: this.isPlay = false; _local10 = this.iLogGame.MoveDown(); _local5 = 0; while (_local5 < (_local10.length - 1)) { _local6 = _local10[_local5]; _local12 = _local6[0]; _local13 = _local6[1]; _local14 = _local6[2]; iReinitIdx.push([_local12, _local13]); _local15 = 0; while (_local15 < 4) { if (_local14[_local15] >= 0){ this.iGraphGrid[_local12][_local13].iAnimState[_local15] = stMoveDown; } else { this.iGraphGrid[_local12][_local13].iAnimState[_local15] = stNormal; }; _local15++; }; this.iGraphGrid[_local12][_local13].iParamAnimation = _local6[3]; this.iGraphGrid[_local12][_local13].State = stMoveDown; iReinitIdx.push([_local6[3][0], _local6[3][1]]); _local5++; }; this.iWasMoveDown = _local10[(_local10.length - 1)]; break; }; } public function get prRecord():String{ return (this.iRecord.prStr); } private function CalculateScore():void{ var _local1:int; var _local2:int; var _local3:int; _local1 = this.iColorCount; _local2 = _local1; _local3 = 0; while (_local3 < this.iDestrColors) { this.iScore = (this.iScore + _local2); _local2 = (_local2 + _local1); _local3++; }; } public function get prSize():int{ return (this.iFieldH); } public function SetRecorder(_arg1:ORecord):void{ this.iRecord = _arg1; } public function OnMouseClick(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:int; if (this.State != stNormal){ return; }; _local2 = (this.iClSprite.mouseX / OGlobal.Scale); _local3 = (this.iClSprite.mouseY / OGlobal.Scale); this.iColClick = Math.floor((_local2 / this.iRCellSize)); this.iRowClick = Math.floor((_local3 / this.iRCellSize)); if ((((this.iRowClick >= this.iFieldH)) || ((this.iRowClick >= this.iFieldW)))){ return; }; _local4 = getTimer(); this.iCurrTime = (_local4 - currentCount); if (Math.floor((this.iCurrTime / 200)) == 0){ this.iCurrTime = 200; }; if (this.iCurrTime > 19999){ this.iCurrTime = 19999; }; trace((this.iCurrTime / 1000)); this.iRecord.WriteNode(this.iRowClick, this.iColClick, Math.floor((this.iCurrTime / 200))); currentCount = getTimer(); this.State = stRotate; } public function GetCellColors():Array{ return (this.iOldColors); } public function get IsInit():Boolean{ return (this.iInit); } public function get prRTime():int{ return (this.iRTime); } private function GraphGridCreate():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; if (!this.iIsOpponent){ _local2 = ((GDefine.iMaxFieldSize - (this.iFieldH * this.iRCellSize)) / 2); this.Pos((iPosX + _local2), (iPosY + _local2)); }; if (iGraphGrid != null){ iGraphGrid = null; }; this.iGraphGrid = new Array(this.iFieldH); _local1 = 0; while (_local1 < this.iFieldH) { this.iGraphGrid[_local1] = new Array(this.iFieldW); _local3 = 0; while (_local3 < this.iFieldW) { _local4 = (this.iLogGame.RKey + (_local1 * _local3)); if (this.iGraphGrid[_local1][_local3] != null){ this.iGraphGrid[_local1][_local3] = null; }; this.iGraphGrid[_local1][_local3] = new GCell(this, this, _local1, _local3, 0, 0, GDefine.GLevel[iGameLevel][_local1][_local3], (_local4 + (_local1 * _local3))); this.addChild(this.iGraphGrid[_local1][_local3]); _local3++; }; _local1++; }; } private function isGridAnimation():Boolean{ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < this.iFieldH) { _local2 = 0; while (_local2 < this.iFieldW) { if (this.iGraphGrid[_local1][_local2].State != stNormal){ return (true); }; _local2++; }; _local1++; }; return (false); } public function set prRowClick(_arg1:int):void{ iRowClick = _arg1; } public function set prRecord(_arg1:String):void{ this.iRecord.prStr = _arg1; if (_arg1){ this.iRTime = (this.iRecord.ReadTime() * 200); } else { this.iRTime = -1; }; } public function onTimerComplete(_arg1:TimerEvent):void{ this.iTimer.reset(); this.iRowClick = this.iRecord.ReadCell(); this.iColClick = this.iRecord.ReadCell(); this.State = stRotate; this.iRTime = (this.iRecord.ReadTime() * 200); if (iRTime < 0){ return; }; trace(this.iRTime); this.iTimer.delay = this.iRTime; } } }//package RES
Section 87
//OCell (RES.OCell) package RES { public class OCell { public var iCIdx:int; public var iIsHide:Boolean; public var iArrayElm:Array; private var iIsWhite:Boolean; public var iIsFree:int; public function OCell(_arg1:int=1){ this.iIsFree = _arg1; this.iIsWhite = false; } public function SetElements(_arg1:Array):void{ this.iArrayElm = _arg1; } public function Rotate(_arg1:Boolean):void{ var _local2:int; var _local3:int; if (_arg1){ _local3 = iArrayElm[3]; _local2 = 3; while (_local2 > 0) { this.iArrayElm[_local2] = this.iArrayElm[(_local2 - 1)]; _local2--; }; this.iArrayElm[0] = _local3; } else { _local3 = iArrayElm[0]; _local2 = 0; while (_local2 < 3) { this.iArrayElm[_local2] = this.iArrayElm[(_local2 + 1)]; _local2++; }; this.iArrayElm[3] = _local3; }; } public function ClearElements():void{ iArrayElm = [0, 0, 0, 0]; } public function SetColorElm(_arg1:int, _arg2:int):void{ this.iArrayElm[_arg1] = _arg2; } public function GetElemType():int{ var _local1:int; var _local2:Array; _local2 = new Array(); _local1 = 0; while (_local1 < 4) { if (this.GetElms()[_local1] != 0){ _local2[_local1] = 1; } else { _local2[_local1] = 0; }; _local1++; }; if (GDefine.EqualArray(_local2, [0, 0, 0, 0])){ return (GDefine.ET_EMPTY); }; if (((((((GDefine.EqualArray(_local2, [1, 1, 0, 0])) || (GDefine.EqualArray(_local2, [0, 1, 1, 0])))) || (GDefine.EqualArray(_local2, [0, 0, 1, 1])))) || (GDefine.EqualArray(_local2, [1, 0, 0, 1])))){ return (GDefine.ET_TRIANGLE); }; if (((GDefine.EqualArray(_local2, [0, 1, 0, 1])) || (GDefine.EqualArray(_local2, [1, 0, 1, 0])))){ return (GDefine.ET_BANTIK); }; if (GDefine.EqualArray(_local2, [1, 1, 1, 1])){ return (GDefine.ET_FULL); }; if (((((((GDefine.EqualArray(_local2, [0, 1, 1, 1])) || (GDefine.EqualArray(_local2, [1, 0, 1, 1])))) || (GDefine.EqualArray(_local2, [1, 1, 0, 1])))) || (GDefine.EqualArray(_local2, [1, 1, 1, 0])))){ return (GDefine.ET_NOT_FULL); }; return (GDefine.ET_ANGLE); } public function IsEmpty():Boolean{ return (((GDefine.EqualArray(iArrayElm, [0, 0, 0, 0])) || ((iArrayElm.length == 0)))); } public function ClearElement(_arg1:int):void{ this.iArrayElm[_arg1] = 0; } public function InitCell(_arg1:int, _arg2:Array):void{ var _local3:int; var _local4:int; if (this.iArrayElm != null){ this.iArrayElm = null; }; this.iArrayElm = new Array(); if (this.iIsFree == 0){ _local4 = 0; while (_local4 < 0) { this.iArrayElm[_local3] = 0; _local4++; }; return; }; _local3 = 0; while (_local3 < 4) { this.iArrayElm[_local3] = new int(); this.iArrayElm[_local3] = _arg2[_local3]; _local3++; }; } public function GetElemColorCount(_arg1:int):int{ var _local2:int; var _local3:int; var _local4:int; _local4 = 0; _local2 = 0; while (_local2 < 4) { if (this.GetColorElm(_local2) == _arg1){ _local4++; break; }; _local2++; }; if (_local4 == 0){ return (0); }; _local3 = ((_local2 + 1) % 4); while (this.GetColorElm(_local3) == _arg1) { _local4++; _local3 = ((_local3 + 1) % 4); }; _local3 = ((_local2 + 3) % 4); while (this.GetColorElm(_local3) == _arg1) { _local4++; _local3 = ((_local3 + 3) % 4); }; return (_local4); } public function GetColorElm(_arg1:int):int{ if (this.iArrayElm == null){ return (undefined); }; if (this.iArrayElm.length <= _arg1){ return (undefined); }; if (this.iArrayElm[_arg1] != undefined){ return (this.iArrayElm[_arg1]); }; return (undefined); } public function GetElms():Array{ if (this.iArrayElm == null){ return ([0, 0, 0, 0]); }; return (this.iArrayElm); } } }//package RES
Section 88
//OLogGame (RES.OLogGame) package RES { import ENGINE.CORE.*; import flash.utils.*; import mx.utils.*; public class OLogGame { private var random:ORandomInt; private var iColor_count_destroy:int; private var iColor_count_found:int; public var iGrid:Array; private var iFieldH:int; private var iLevel:int; private var iRKey:int; private var iCountColor:int; private var iFieldW:int; private var destrColor:int; private var e_offsets:Array; public static const elems_near:Array = new Array([1, 3], [0, 2], [1, 3], [0, 2]); public static const elems_near_3:Array = new Array([2, 0, -1], [3, -1, 0], [0, 0, 1], [1, 1, 0]); public function OLogGame(_arg1:int, _arg2:int, _arg3:int=10){ e_offsets = new Array([-1, 0], [0, 1], [1, 0], [0, -1]); super(); this.iCountColor = _arg1; this.iLevel = _arg2; this.iRKey = _arg3; random = new ORandomInt(); random.SeedRand(_arg3); if (_arg3 == TriadzL.RKey){ TriadzL.RKey++; }; if (TriadzL.RKey > 99){ TriadzL.RKey = 10; }; } private function CellCreate(_arg1:int, _arg2:int, _arg3:Array):Array{ var _local4:int; var _local5:int; var _local6:Array; var _local7:*; var _local8:*; _local5 = 3; do { _local7 = false; _local6 = new Array(4); _local8 = 0; while (_local8 < 4) { _local6[_local8] = (1 + (this.random.Rand() % this.iCountColor)); _local8++; }; while ((((((((_local6[0] == _local6[1])) && ((_local6[1] == _local6[2])))) && ((_local6[2] == _local6[3])))) && ((_local6[3] == _local6[0])))) { _local8 = 0; while (_local8 < 4) { _local6[_local8] = (_local6[_local8] = (1 + (this.random.Rand() % this.iCountColor))); _local8++; }; }; _arg3[_arg1][_arg2].InitCell(this.iCountColor, _local6); if (_arg3[_arg1][_arg2].iIsFree != 0){ _local8 = 0; while (_local8 < 4) { _local4 = _local6[_local8]; this.iColor_count_found = 0; this.FindNextColor(_arg1, _arg2, _local8, _local4); this.CancelFind(_arg1, _arg2, _local8, _local4); if (this.iColor_count_found > _local5){ _local7 = true; _local8 = 4; }; _local8++; }; } else { _arg3[_arg1][_arg2].SetElements([0, 0, 0, 0]); }; } while (_local7); return (_local6); } public function InitGame(_arg1:int, _arg2:int):void{ var _local3:int; ReInit(); this.iFieldW = _arg2; this.iFieldH = _arg1; this.iGrid = new Array(this.iFieldH); _local3 = 0; while (_local3 < this.iFieldH) { this.iGrid[_local3] = new Array(this.iFieldW); _local3++; }; this.StartGame(); } public function MoveDown():Array{ var _local1:int; var _local2:int; var _local3:int; var _local4:Boolean; var _local5:Array; var _local6:Boolean; var _local7:Array; var _local8:Array; var _local9:Array; var _local10:int; var _local11:Array; var _local12:int; _local4 = false; _local5 = new Array(); _local7 = new Array(); _local8 = new Array(); _local2 = 0; while (_local2 < this.iFieldW) { _local6 = false; _local1 = (this.iFieldH - 2); while (_local1 >= 0) { _local9 = new Array(); if (this.iGrid[_local1][_local2].iIsHide){ } else { _local10 = (_local1 + 1); if (((!((this.iGrid[_local10][_local2].iIsFree == 0))) && (!(this.iGrid[_local10][_local2].iIsHide)))){ _local7 = this.RulesDown(_local1, _local10, _local2); if (((!(GDefine.EqualArray(_local7, [0, 0, 0, 0]))) && (!(this.iGrid[_local1][_local2].iIsHide)))){ _local5 = this.iGrid[_local1][_local2].GetElms(); _local11 = new Array(); _local3 = 0; while (_local3 < 4) { if (_local5 == null){ } else { if (((!((_local5[_local3] == 0))) && (!((_local7[_local3] == 0))))){ this.iGrid[_local10][_local2].SetColorElm(_local3, _local5[_local3]); _local11[_local3] = 1; this.iGrid[_local1][_local2].ClearElement(_local3); _local4 = true; } else { _local11[_local3] = -1; }; }; _local3++; }; _local9.push(_local1, _local2, _local11, [_local10, _local2, (_local10 - _local1)]); _local8.push(_local9); _local6 = true; }; } else { _local12 = 0; while ((((_local10 < this.iFieldH)) && ((((this.iGrid[_local10][_local2].iIsFree == 0)) || (this.iGrid[_local10][_local2].iIsHide))))) { _local10++; }; if (_local10 >= this.iFieldH){ } else { _local7 = this.RulesDown(_local1, _local10, _local2); if (((!(GDefine.EqualArray(_local7, [0, 0, 0, 0]))) && (!(this.iGrid[_local1][_local2].iIsHide)))){ _local5 = this.iGrid[_local1][_local2].GetElms(); _local11 = new Array(); _local3 = 0; while (_local3 < 4) { if (_local5 == null){ } else { if (((!((_local5[_local3] == 0))) && (!((_local7[_local3] == 0))))){ this.iGrid[_local10][_local2].SetColorElm(_local3, _local5[_local3]); _local11[_local3] = 1; this.iGrid[_local1][_local2].ClearElement(_local3); _local4 = true; } else { _local11[_local3] = -1; }; }; _local3++; }; _local9.push(_local1, _local2, _local11, [_local10, _local2, (_local10 - _local1)]); _local8.push(_local9); }; _local6 = true; }; }; }; _local1--; }; _local2++; }; _local8.push(_local4); return (_local8); } public function NextStepPossible():Boolean{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:Boolean; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:int; _local1 = (this.iFieldH - 1); while (_local1 >= 0) { _local2 = 0; while (_local2 < this.iFieldW) { _local3 = this.iGrid[_local1][_local2].GetElemType(); if (_local3 == GDefine.ET_EMPTY){ } else { if ((((((_local3 == GDefine.ET_FULL)) || ((_local3 == GDefine.ET_NOT_FULL)))) || ((_local3 == GDefine.ET_TRIANGLE)))){ _local10 = 1; while (_local10 <= 4) { _local5 = this.iGrid[_local1][_local2].GetElemColorCount(_local10); if (_local5 < 2){ } else { if (_local5 == 2){ _local8 = 0; while (_local8 < 4) { _local6 = (_local1 + e_offsets[_local8][0]); _local7 = (_local2 + e_offsets[_local8][1]); if ((((((((_local6 >= 0)) && ((_local7 >= 0)))) && ((_local6 < this.iFieldH)))) && ((_local7 < this.iFieldW)))){ _local13 = this.iGrid[_local6][_local7].GetElemColorCount(_local10); if (_local13 >= 2){ return (true); }; if (_local13 == 0){ } else { _local6 = (_local1 + e_offsets[((_local8 + 1) % 4)][0]); _local7 = (_local2 + e_offsets[((_local8 + 1) % 4)][1]); _local8++; if ((((((((_local6 >= 0)) && ((_local7 >= 0)))) && ((_local6 < this.iFieldH)))) && ((_local7 < this.iFieldW)))){ _local14 = this.iGrid[_local6][_local7].GetElemColorCount(_local10); if (this.iGrid[_local6][_local7].GetElemColorCount(_local10) > 0){ return (true); }; }; }; }; _local8++; }; } else { if ((((_local1 > 0)) && ((this.iGrid[(_local1 - 1)][_local2].GetElemColorCount(_local10) > 0)))){ return (true); }; if ((((_local2 > 0)) && ((this.iGrid[_local1][(_local2 - 1)].GetElemColorCount(_local10) > 0)))){ return (true); }; if ((((_local2 < (this.iFieldW - 1))) && ((this.iGrid[_local1][(_local2 + 1)].GetElemColorCount(_local10) > 0)))){ return (true); }; if ((((_local1 < (this.iFieldH - 1))) && ((this.iGrid[(_local1 + 1)][_local2].GetElemColorCount(_local10) > 0)))){ return (true); }; }; }; _local10++; }; }; }; _local2++; }; _local1--; }; _local1 = (this.iFieldH - 2); while (_local1 >= 0) { _local2 = 0; while (_local2 < this.iFieldW) { if (((this.iGrid[_local1][_local2].IsEmpty()) || ((this.iGrid[_local1][_local2].iIsFree == 0)))){ } else { _local3 = this.iGrid[_local1][_local2].GetElemType(); _local15 = 1; if (((((_local1 + _local15) < (this.iFieldH - 1))) && ((this.iGrid[(_local1 + _local15)][_local2].iIsFree == 0)))){ _local15++; }; _local4 = this.iGrid[(_local1 + _local15)][_local2].GetElemType(); if ((((_local3 == GDefine.ET_ANGLE)) && ((((((((_local4 == GDefine.ET_ANGLE)) || ((_local4 == GDefine.ET_TRIANGLE)))) || ((_local4 == GDefine.ET_BANTIK)))) || ((_local4 == GDefine.ET_NOT_FULL)))))){ return (true); }; if ((((_local3 == GDefine.ET_BANTIK)) && ((((_local4 == GDefine.ET_TRIANGLE)) || ((_local4 == GDefine.ET_ANGLE)))))){ return (true); }; if ((((_local3 == GDefine.ET_NOT_FULL)) && ((_local4 == GDefine.ET_ANGLE)))){ return (true); }; if ((((_local3 == GDefine.ET_TRIANGLE)) && ((((_local4 == GDefine.ET_TRIANGLE)) || ((_local4 == GDefine.ET_ANGLE)))))){ return (true); }; }; _local2++; }; _local1--; }; return (false); } public function GridCreate(_arg1:Array, _arg2:ORandomInt):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:Boolean; var _local7:int; var _local8:int; _local8 = 3; _local3 = 0; while (_local3 < this.iFieldH) { _local4 = 0; while (_local4 < this.iFieldW) { CellCreate(_local3, _local4, this.iGrid); _local4++; }; _local3++; }; } private function ReInit():void{ var _local1:int; if (this.iGrid != null){ _local1 = 0; while (_local1 < this.iFieldH) { this.iGrid[_local1] = null; _local1++; }; }; this.iGrid = null; } public function StartGame():void{ var _local1:Boolean; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; _local6 = 3; this.GridInit(); this.GridCreate(this.iGrid, random); } public function CancelFind(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ if (this.iGrid[_arg1][_arg2].GetColorElm(_arg3) != -(_arg4)){ return; }; this.iGrid[_arg1][_arg2].SetColorElm(_arg3, _arg4); this.CancelFind(_arg1, _arg2, elems_near[_arg3][0], _arg4); this.CancelFind(_arg1, _arg2, elems_near[_arg3][1], _arg4); _arg1 = (_arg1 + elems_near_3[_arg3][1]); _arg2 = (_arg2 + elems_near_3[_arg3][2]); if ((((((((_arg1 >= 0)) && ((_arg2 >= 0)))) && ((_arg1 < this.iFieldH)))) && ((_arg2 < this.iFieldW)))){ this.CancelFind(_arg1, _arg2, elems_near_3[_arg3][0], _arg4); }; } private function RulesDown(_arg1:int, _arg2:int, _arg3:int):Array{ var _local4:int; var _local5:Array; var _local6:Array; _local5 = new Array(); _local6 = new Array(); if (this.iGrid[_arg2][_arg3].iIsFree == 0){ return ([0, 0, 0, 0]); }; _local4 = 0; while (_local4 < 4) { _local5[_local4] = this.iGrid[_arg1][_arg3].GetColorElm(_local4); _local6[_local4] = this.iGrid[_arg2][_arg3].GetColorElm(_local4); _local4++; }; _local4 = 0; while (_local4 < 4) { if (_local5[_local4] != 0){ _local5[_local4] = 1; }; if (_local6[_local4] != 0){ _local6[_local4] = 1; }; _local4++; }; if (this.iGrid[_arg1][_arg3].iIsFree == 0){ return ([0, 0, 0, 0]); }; if (((GDefine.EqualArray(_local5, [1, 1, 0, 0])) && ((((_local6[0] == 0)) && ((_local6[1] == 0)))))){ return ([1, 1, 0, 0]); }; if (((GDefine.EqualArray(_local5, [1, 0, 0, 0])) && ((((_local6[0] == 0)) && ((_local6[1] == 0)))))){ return ([1, 0, 0, 0]); }; if (((GDefine.EqualArray(_local5, [1, 1, 1, 0])) && ((((((_local6[0] == 0)) && ((_local6[1] == 0)))) && ((_local6[2] == 0)))))){ return ([1, 1, 1, 0]); }; if (((GDefine.EqualArray(_local5, [0, 1, 1, 0])) && ((((_local6[1] == 0)) && ((_local6[2] == 0)))))){ return ([0, 1, 1, 0]); }; if (((GDefine.EqualArray(_local5, [0, 1, 0, 0])) && ((_local6[1] == 0)))){ return ([0, 1, 0, 0]); }; if (((GDefine.EqualArray(_local5, [0, 0, 1, 0])) && ((((_local6[1] == 0)) && ((_local6[2] == 0)))))){ return ([0, 0, 1, 0]); }; if (((GDefine.EqualArray(_local5, [1, 0, 1, 0])) && ((((((_local6[0] == 0)) && ((_local6[1] == 0)))) && ((_local6[2] == 0)))))){ return ([1, 0, 1, 0]); }; if (((GDefine.EqualArray(_local5, [1, 0, 1, 0])) && ((((((_local6[0] == 1)) && ((_local6[2] == 0)))) && ((_local6[1] == 0)))))){ return ([0, 0, 1, 0]); }; if (((GDefine.EqualArray(_local5, [1, 0, 1, 0])) && ((((((_local6[0] == 0)) && ((_local6[2] == 1)))) && ((_local6[1] == 0)))))){ return ([1, 0, 0, 0]); }; if (GDefine.EqualArray(_local6, [0, 0, 0, 0])){ return ([1, 1, 1, 1]); }; return ([0, 0, 0, 0]); } public function CanFillFree():Boolean{ var _local1:int; var _local2:Boolean; var _local3:int; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:Boolean; var _local8:Array; var _local9:int; _local2 = false; _local5 = false; _local1 = 0; while (_local1 < this.iFieldW) { if (_local2){ return (true); }; _local2 = false; _local3 = -1; while ((((_local3 < (this.iFieldH - 1))) && (((this.iGrid[(_local3 + 1)][_local1].IsEmpty()) || (this.iGrid[(_local3 + 1)][_local1].iIsHide))))) { _local3++; }; _local6 = (_local3 + 1); _local7 = false; if ((((((_local6 < this.iFieldH)) && (!((this.iGrid[_local6][_local1].iIsFree == 0))))) && (!(this.iGrid[_local6][_local1].iIsHide)))){ _local8 = this.iGrid[_local6][_local1].GetElms(); _local9 = this.iGrid[_local6][_local1].GetElemType(); switch (_local9){ case GDefine.ET_ANGLE: if (((((!((_local8[0] == 0))) || (!((_local8[2] == 0))))) || (!((_local8[3] == 0))))){ return (true); }; break; case GDefine.ET_TRIANGLE: if ((((((_local8[0] == 0)) && ((_local8[1] == 0)))) || ((((_local8[1] == 0)) && ((_local8[2] == 0)))))){ return (true); }; break; case GDefine.ET_BANTIK: if (_local8[1] == 0){ return (true); }; break; case GDefine.ET_NOT_FULL: if (_local8[1] == 0){ return (true); }; break; case GDefine.ET_FULL: case GDefine.ET_EMPTY: break; }; }; if ((((_local3 >= 0)) && ((_local3 <= this.iFieldH)))){ while (_local3 >= 0) { if ((((this.iGrid[_local3][_local1].iIsFree == 0)) || (this.iGrid[_local3][_local1].iIsHide))){ _local3--; continue; } else { return (true); }; }; }; _local1++; }; return (false); } public function Destroy():Array{ var _local1:Array; _local1 = new Array(); this.RecheckColors(); if (this.iColor_count_destroy == 0){ return (_local1); }; if (this.iColor_count_destroy > 3){ _local1 = this.DestroyColors(); _local1.push(this.iColor_count_destroy); }; return (_local1); } public function CanMoveDown():Boolean{ var _local1:int; var _local2:int; var _local3:int; var _local4:Boolean; var _local5:Array; var _local6:Boolean; var _local7:Array; var _local8:int; var _local9:int; _local4 = false; _local5 = new Array(); _local7 = new Array(); _local2 = 0; while (_local2 < this.iFieldW) { _local6 = false; _local1 = (this.iFieldH - 2); while (_local1 >= 0) { _local8 = (_local1 + 1); if (((!((this.iGrid[_local8][_local2].iIsFree == 0))) && (!(this.iGrid[_local8][_local2].iIsHide)))){ _local7 = this.RulesDown(_local1, _local8, _local2); if (((!(GDefine.EqualArray(_local7, [0, 0, 0, 0]))) && (!(this.iGrid[_local1][_local2].iIsHide)))){ _local5 = this.iGrid[_local1][_local2].GetElms(); _local3 = 0; while (_local3 < 4) { if (_local5 == null){ } else { if (((!((_local5[_local3] == 0))) && (!((_local7[_local3] == 0))))){ _local4 = true; return (_local4); }; }; _local3++; }; _local6 = true; }; } else { _local9 = 0; while ((((_local8 < this.iFieldH)) && ((((this.iGrid[_local8][_local2].iIsFree == 0)) || (this.iGrid[_local8][_local2].iIsHide))))) { _local8++; }; if (_local8 >= this.iFieldH){ } else { _local7 = this.RulesDown(_local1, _local8, _local2); if (((!(GDefine.EqualArray(_local7, [0, 0, 0, 0]))) && (!(this.iGrid[_local1][_local2].iIsHide)))){ _local5 = this.iGrid[_local1][_local2].GetElms(); _local3 = 0; while (_local3 < 4) { if (_local5 == null){ } else { if (((!((_local5[_local3] == 0))) && (!((_local7[_local3] == 0))))){ _local4 = true; return (_local4); }; }; _local3++; }; _local6 = true; }; }; }; _local1--; }; _local2++; }; return (_local4); } private function GridInit():void{ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < this.iFieldH) { _local2 = 0; while (_local2 < this.iFieldW) { if (this.iGrid[_local1][_local2] != null){ this.iGrid[_local1][_local2] = null; }; this.iGrid[_local1][_local2] = new OCell(GDefine.GLevel[this.iLevel][_local1][_local2]); _local2++; }; _local1++; }; } public function WillDestroy(_arg1:int, _arg2:int):Boolean{ var _local3:int; var _local4:int; var _local5:int; _local3 = 0; _local4 = 0; while (_local4 < 4) { if (this.iGrid[_arg1][_arg2].GetColorElm(_local4) > 0){ this.iColor_count_found = 0; _local5 = this.iGrid[_arg1][_arg2].GetColorElm(_local4); this.FindNextColor(_arg1, _arg2, _local4, _local5); if (this.iColor_count_found <= 3){ this.CancelFind(_arg1, _arg2, _local4, _local5); } else { this.CancelFind(_arg1, _arg2, _local4, _local5); this.iColor_count_destroy = (this.iColor_count_destroy + this.iColor_count_found); }; }; _local4++; }; return (!((this.iColor_count_destroy == 0))); } private function DestroyColors():Array{ var _local1:Boolean; var _local2:Array; var _local3:int; var _local4:int; var _local5:Array; var _local6:int; _local1 = false; _local2 = new Array(); _local3 = 0; while (_local3 < this.iFieldH) { _local4 = 0; while (_local4 < this.iFieldW) { _local5 = new Array(); _local6 = 0; while (_local6 < 4) { if (this.iGrid[_local3][_local4].GetColorElm(_local6) < 0){ this.iGrid[_local3][_local4].SetColorElm(_local6, 0); _local5.push(_local6); _local1 = true; }; _local6++; }; if (_local5.length != 0){ _local2.push([_local3, _local4, _local5, true]); }; _local4++; }; _local3++; }; return (_local2); } public function FindNextColor(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ if (this.iGrid[_arg1][_arg2].iIsHide){ return; }; if (this.iGrid[_arg1][_arg2].GetColorElm(_arg3) != _arg4){ return; }; this.iColor_count_found++; this.iGrid[_arg1][_arg2].SetColorElm(_arg3, -(_arg4)); this.FindNextColor(_arg1, _arg2, elems_near[_arg3][0], _arg4); this.FindNextColor(_arg1, _arg2, elems_near[_arg3][1], _arg4); _arg1 = (_arg1 + elems_near_3[_arg3][1]); _arg2 = (_arg2 + elems_near_3[_arg3][2]); if ((((((((_arg1 >= 0)) && ((_arg2 >= 0)))) && ((_arg1 < this.iFieldH)))) && ((_arg2 < this.iFieldW)))){ this.FindNextColor(_arg1, _arg2, elems_near_3[_arg3][0], _arg4); }; } private function TimerLen():int{ var _local1:int; var _local2:int; _local1 = 0; _local2 = (this.iFieldW - 1); while (_local2 >= 0) { if (this.iGrid[(this.iFieldH - 1)][_local2].IsEmpty()){ _local1++; }; _local2--; }; return (((this.iFieldH - 1) - _local1)); } public function get RKey():int{ return (this.iRKey); } private function CheckColors(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:int; if (this.iGrid[_arg1][_arg2].iIsHide){ return; }; _local3 = 0; while (_local3 < 4) { if (this.iGrid[_arg1][_arg2].GetColorElm(_local3) > 0){ this.iColor_count_found = 0; _local4 = this.iGrid[_arg1][_arg2].GetColorElm(_local3); this.FindNextColor(_arg1, _arg2, _local3, _local4); if (this.iColor_count_found <= 3){ this.CancelFind(_arg1, _arg2, _local3, _local4); } else { this.iColor_count_destroy = (this.iColor_count_destroy + this.iColor_count_found); }; }; _local3++; }; } public function Rotate(_arg1:int, _arg2:int):void{ var _local3:Boolean; var _local4:int; var _local5:Boolean; _local3 = false; _local4 = 0; while (_local4 < 4) { if (this.iGrid[_arg1][_arg2].GetColorElm(_local4) != 0){ _local3 = true; }; _local4++; }; if (!_local3){ return; }; _local5 = true; this.iGrid[_arg1][_arg2].Rotate(_local5); } private function RecheckColors():void{ var _local1:int; var _local2:int; this.iColor_count_destroy = 0; _local1 = 0; while (_local1 < this.iFieldH) { _local2 = 0; while (_local2 < this.iFieldW) { if (this.iGrid[_local1][_local2].iIsHide){ } else { this.CheckColors(_local1, _local2); }; _local2++; }; _local1++; }; } public function FillFree():Array{ var _local1:int; var _local2:Boolean; var _local3:int; var _local4:int; var _local5:Boolean; var _local6:Array; var _local7:int; var _local8:Boolean; var _local9:Array; var _local10:int; var _local11:Array; var _local12:Array; _local2 = false; _local5 = false; _local6 = new Array(); _local1 = 0; while (_local1 < this.iFieldW) { if (_local2){ _local6.push(_local2); return (_local6); }; _local2 = false; _local3 = -1; while ((((_local3 < (this.iFieldH - 1))) && (((this.iGrid[(_local3 + 1)][_local1].IsEmpty()) || (this.iGrid[(_local3 + 1)][_local1].iIsHide))))) { _local3++; }; _local7 = (_local3 + 1); _local8 = false; if ((((((_local7 < this.iFieldH)) && (!((this.iGrid[_local7][_local1].iIsFree == 0))))) && (!(this.iGrid[_local7][_local1].iIsHide)))){ _local9 = this.iGrid[_local7][_local1].GetElms(); _local10 = this.iGrid[_local7][_local1].GetElemType(); switch (_local10){ case GDefine.ET_ANGLE: if (_local9[0] != 0){ _local9[1] = (1 + (this.random.Rand() % this.iCountColor)); _local9[2] = (1 + (this.random.Rand() % this.iCountColor)); this.iGrid[_local7][_local1].SetColorElm(1, _local9[1]); this.iGrid[_local7][_local1].SetColorElm(2, _local9[2]); _local2 = true; _local11 = new Array(); _local11.push(_local7, _local1, this.iGrid[_local7][_local1].GetElms(), [1, 2], true); _local6.push(_local11); break; }; if (_local9[2] != 0){ _local9[0] = (1 + (this.random.Rand() % this.iCountColor)); _local9[1] = (1 + (this.random.Rand() % this.iCountColor)); this.iGrid[_local7][_local1].SetColorElm(1, _local9[1]); this.iGrid[_local7][_local1].SetColorElm(0, _local9[0]); _local11 = new Array(); _local11.push(_local7, _local1, this.iGrid[_local7][_local1].GetElms(), [1, 0], true); _local6.push(_local11); _local2 = true; break; }; if (_local9[3] != 0){ _local9[0] = (1 + (this.random.Rand() % this.iCountColor)); _local9[1] = (1 + (this.random.Rand() % this.iCountColor)); _local9[2] = (1 + (this.random.Rand() % this.iCountColor)); this.iGrid[_local7][_local1].SetColorElm(0, _local9[0]); this.iGrid[_local7][_local1].SetColorElm(1, _local9[1]); this.iGrid[_local7][_local1].SetColorElm(2, _local9[2]); _local11 = new Array(); _local11.push(_local7, _local1, this.iGrid[_local7][_local1].GetElms(), [1, 0, 2], true); _local6.push(_local11); _local2 = true; break; }; break; case GDefine.ET_TRIANGLE: if ((((_local9[0] == 0)) && ((_local9[1] == 0)))){ _local9[0] = (1 + (this.random.Rand() % this.iCountColor)); _local9[1] = (1 + (this.random.Rand() % this.iCountColor)); this.iGrid[_local7][_local1].SetColorElm(0, _local9[0]); this.iGrid[_local7][_local1].SetColorElm(1, _local9[1]); _local11 = new Array(); _local11.push(_local7, _local1, this.iGrid[_local7][_local1].GetElms(), [1, 0], true); _local6.push(_local11); _local2 = true; break; }; if ((((_local9[1] == 0)) && ((_local9[2] == 0)))){ _local9[1] = (1 + (this.random.Rand() % this.iCountColor)); _local9[2] = (1 + (this.random.Rand() % this.iCountColor)); this.iGrid[_local7][_local1].SetColorElm(1, _local9[1]); this.iGrid[_local7][_local1].SetColorElm(2, _local9[2]); _local11 = new Array(); _local11.push(_local7, _local1, this.iGrid[_local7][_local1].GetElms(), [1, 2], true); _local6.push(_local11); _local2 = true; break; }; break; case GDefine.ET_BANTIK: if (_local9[1] == 0){ _local9[1] = (1 + (this.random.Rand() % this.iCountColor)); this.iGrid[_local7][_local1].SetColorElm(1, _local9[1]); _local11 = new Array(); _local11.push(_local7, _local1, this.iGrid[_local7][_local1].GetElms(), [1], true); _local6.push(_local11); _local2 = true; break; }; break; case GDefine.ET_NOT_FULL: if (_local9[1] == 0){ _local9[1] = (1 + (this.random.Rand() % this.iCountColor)); this.iGrid[_local7][_local1].SetColorElm(1, _local9[1]); _local11 = new Array(); _local11.push(_local7, _local1, this.iGrid[_local7][_local1].GetElms(), [1], true); _local6.push(_local11); _local5 = true; break; }; break; case GDefine.ET_FULL: case GDefine.ET_EMPTY: break; }; }; if ((((_local3 >= 0)) && ((_local3 <= this.iFieldH)))){ while (_local3 >= 0) { if ((((this.iGrid[_local3][_local1].iIsFree == 0)) || (this.iGrid[_local3][_local1].iIsHide))){ _local3--; continue; } else { _local2 = true; _local12 = new Array(4); _local4 = 0; while (_local4 < 4) { _local12[_local4] = (1 + (this.random.Rand() % this.iCountColor)); _local4++; }; _local12 = CellCreate(_local3, _local1, this.iGrid); this.iGrid[_local3][_local1].InitCell(this.iCountColor, _local12); _local11 = new Array(); _local11.push(_local3, _local1, this.iGrid[_local3][_local1].GetElms(), [0, 1, 2, 3], true); _local6.push(_local11); _local3--; }; }; }; _local1++; }; _local6.push(_local2); return (_local6); } } }//package RES
Section 89
//OCGame (OCGame) package { import ENGINE.GAME.*; public class OCGame extends OGame { public function OCGame(){ super(2, 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
Section 90
//Triadz (Triadz) package { import ENGINE.DISPLAY.*; import flash.events.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.*; import RES.OBJECTS.*; import ENGINE.CORE.*; import RES.*; import RES.WINDOWS.*; import ENGINE.SMARTFOX.*; public class Triadz extends OApplication { private var iBack:CBackground; private var iGame:GGame; private var iHelpIsShow:Boolean; private var iSystem:OSystem; private var iGameSprite:Sprite; private var iWindow:OWindow; public function Triadz(){ super("Triadz"); OSound.PlayListAdd("music.mp3"); OSound.PlayMusic(); OGlobal.FPS = 120; } override protected function OnMenuItem():void{ var _local1:int; var _local2:DisplayObject; var _local3:OWHighScores; _local1 = this.prMenuItem; switch (_local1){ case TriadzL.miNullWindow: return; case TriadzL.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 = TriadzL.miNullWindow; break; case TriadzL.miIntro: if (((!((this.iBack == null))) && (!((this.iBack.State == CBackground.stShow))))){ this.iBack.State = CBackground.stShow; }; this.iWindow = new OWIntro(); if (TriadzL.iGAME.prPlayerName == ""){ this.prMenuItem = TriadzL.miEnterNameFirst; } else { this.prMenuItem = TriadzL.miMenu; }; break; case TriadzL.miEnterNameFirst: this.iWindow = new OWEnterName(false); this.prMenuItem = TriadzL.miMenu; break; case TriadzL.miEnterNewName: this.iWindow = new OWEnterName(true); (this.iWindow as OWEnterName).prName = ""; this.prMenuItem = TriadzL.miLastWindow; break; case TriadzL.miMenu: if (this.iBack.State != CBackground.stShow){ this.iBack.State = CBackground.stShow; }; switch (TriadzL.iMP.State){ case OMultiplayer.stNone: TriadzL.iMP.Init(TriadzL.sDomain, TriadzL.sServer, TriadzL.sZone, TriadzL.sXTName, TriadzL.iGAME.prPlayerName); break; case OMultiplayer.stConnectionError: if (TriadzL.iMP.prErrorsCount < 5){ TriadzL.iMP.State = OMultiplayer.stNone; TriadzL.iMP.Init(TriadzL.sDomain, TriadzL.sServer, TriadzL.sZone, TriadzL.sXTName, TriadzL.iGAME.prPlayerName); }; break; case OMultiplayer.stInSPGame: TriadzL.iMP.State = OMultiplayer.stInZone; break; }; this.iWindow = new OWMenu(); this.prMenuItem = TriadzL.miNullWindow; break; case TriadzL.miChoosePlayer: this.iWindow = new OWChoosePlayer(); this.prMenuItem = TriadzL.miMenu; break; case TriadzL.miDeletePlayerConfirm: this.iWindow = new OAlert(TriadzL.OWDeletePlayerConfirm, [TriadzL.miDeletePlayer, TriadzL.miLastWindow]); this.prMenuItem = TriadzL.miLastWindow; break; case TriadzL.miDeletePlayer: TriadzL.iGAME.DeletePlayer(TriadzL.iGAME.prPlayerName); if (TriadzL.iGAME.prPlayerName != ""){ this.OnMenuItem(); return; }; this.iWindow = new OWEnterName(false); this.prMenuItem = TriadzL.miLastWindow; break; case TriadzL.miOptions: this.iWindow = new OWOptions(); this.prMenuItem = TriadzL.miLastWindow; break; case TriadzL.miGameSP: if (TriadzL.iMP.State == OMultiplayer.stInZone){ TriadzL.iMP.State = OMultiplayer.stInSPGame; }; TriadzL.iGAME.prMode = 0; this.iWindow = new OWGame(); this.prMenuItem = TriadzL.miLastWindow; break; case TriadzL.miReturnGameSP: this.iWindow = (this.getChildAt((this.numChildren - 1)) as OWGame); this.iWindow.prActive = true; return; case TriadzL.miHighScores: this.iWindow = new OWHighScores(); this.prMenuItem = TriadzL.miLastWindow; break; case TriadzL.miDeleteScoresConfirm: this.iWindow = new OAlert(TriadzL.OWDeleteScoresConfirm, [TriadzL.miDeleteScores, TriadzL.miLastWindow]); this.prMenuItem = TriadzL.miLastWindow; break; case TriadzL.miDeleteScores: _local3 = (this.getChildAt((this.numChildren - 1)) as OWHighScores); if (_local3.iTable.prValue == 0){ TriadzL.iGAME.ClearLocalScores(0); } else { TriadzL.iGAME.ClearPersonalScores(0); }; this.OnMenuItem(); return; case TriadzL.miGameMP: TriadzL.iGAME.prMode = 1; if ((((TriadzL.iGAME.prLevel == 0)) && (!(this.iHelpIsShow)))){ this.iWindow = new OWHowToPlay(); this.prMenuItem = TriadzL.miGameMP; this.addChild(this.iWindow); this.iHelpIsShow = true; return; }; this.iBack.State = CBackground.stNormal; TriadzL.iGAME.Start(); this.iWindow = new OWGame(); this.prMenuItem = TriadzL.miResultsMP; break; case TriadzL.miInstructions: this.iWindow = new OWHowToPlay(); this.prMenuItem = TriadzL.miLastWindow; break; }; this.addChild(this.iWindow); } override public function Init():void{ this.InitBackground([this.MakeBackgroundImage()], 0); this.iHelpIsShow = false; if (TriadzL.sDebug){ this.iSystem = new OSystem(); this.addChild(this.iSystem); this.iSystem.x = 10; this.iSystem.y = 580; }; super.Init(); iBack = new CBackground(); this.addChildAt(iBack, 1); this.prMenuItem = TriadzL.miIntro; OnMenuItem(); } override public function OnPress(_arg1:Event, _arg2):void{ if (_arg1 == null){ this.prMenuItem = _arg2; }; } override protected function OnDeactivate(_arg1:Event):void{ TriadzL.iGAME.SaveCache(); } override public function OnEnterFrame(_arg1:Event):void{ super.OnEnterFrame(_arg1); TriadzL.iMP.OnEnterFrame(); OSystem.iUserText1 = (((((((" : " + TriadzL.iMP.State.toString()) + " : ") + TriadzL.iMP.prActiveRoomID.toString()) + " ") + TriadzL.iMP.prPlayerID.toString()) + " : ") + TriadzL.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(); }; }; }; } private function MakeBackgroundImage():BitmapData{ var _local1:Sprite; var _local2:Matrix; var _local3:int; var _local4:BitmapData; _local1 = new Sprite(); _local2 = new Matrix(); _local3 = OGlobal.StageRect.height; _local2.createGradientBox(50, _local3, (Math.PI / 2)); _local1.graphics.beginGradientFill(GradientType.LINEAR, [ODisplay.HSBToRGB(29, 0.52, 0.41), ODisplay.HSBToRGB(29, 0.32, 0.67)], [1, 1], [0, 0xFF], _local2); _local1.graphics.drawRect(0, 0, 50, _local3); _local4 = new BitmapData(50, _local3, false, 0); _local4.draw(_local1); return (_local4); } } }//package
Section 91
//TriadzL (TriadzL) package { import ENGINE.DISPLAY.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.CORE.*; import ENGINE.SMARTFOX.*; public class TriadzL { public static const strCancel:String = "Cancel"; public static const OSSmileSInd:int = 12; public static const miDeletePlayer:int = 9; public static const miDeleteScoresConfirm:int = 18; public static const strDefPlayerName:String = "WELL"; public static const strPresents:String = "presents"; public static const OSBubbleBangSInd:int = 0; public static const miCommingSoon:int = 6; public static const miNewGame:int = 27; public static const strConnect1URL:String = "http://www.wellgames.com/free_online/triadz/?g=triadz"; public static const iRKey:Array = new Array(128, 32, 78, 786, 0x0100, 10, 27, 64, 545, 0x0200); public static const strChoosePlayer:String = "Choose a Player"; public static const strAdd:String = "Add"; public static const strInstructionsText:String = "Burst all the bubbles within certain time by clicking on them - do it as fast as you can!"; public static const strConnect2URL:String = "http://www.wellgames.com/?g=triadz"; public static const miLastWindow:int = 1; public static const strReplayLevel:String = "Replay Level"; public static const strOppFinish:String = "Opponent finished!"; public static const strFullScreen:String = "Full Screen"; private static const iWOptionsVolume:Array = [TriadzL.strOff, "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]; public static const strPlay:String = "Play"; public static const strReiting:String = "Rating"; public static const strSite:String = "WELLGAMES.COM"; public static const miMenu:int = 5; public static const strNextLevel:String = "Next Level"; public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/free_online/triadz/?g=triadz"; public static const strGameOver:String = "Level Failed"; public static const strMoreGames:String = "More Games"; public static const strDeletePlayer:String = "Delete Player?"; public static const strPlace:String = " Place"; public static const strPlayAgain:String = "Play Again"; public static const strSound:String = "Sound Volume"; public static const miInstructions:int = 24; public static const miOptions:int = 10; public static const sURLSite:String = "http://www.wellgames.com/?g=triadz"; public static const strOppFin1:String = "Opponetn`s score:"; public static const miDeleteScores:int = 19; public static const strNewPlayer:String = "NEW PLAYER!"; public static const strHighScores:String = "High Scores"; public static const strReiting2:String = "'s Rating Is "; public static const strWindow:String = "Window"; public static const strDeleteScoresConfirm:String = "Are you sure you want to delete scores table?"; public static const strReiting1:String = " Place: "; public static const miDeletePlayerConfirm:int = 8; public static const strHowToPlay:String = "How To Play"; public static const sServer:String = "www.wellgames.com"; public static const strHasReiting:String = "'s Rating Is "; public static const strInstruction:String = (((("Click on the playing field to rotate the \n" + "figures. Try to match four and more triangles \n") + "of the same color.Triangles and frames will \n") + "dissapear. You complete the level when all \n") + "frames are removed."); public static const sDebug:Boolean = false; public static const strNew:String = "New"; public static const strOff:String = "Off"; public static const miPause:int = 28; public static const strWinner:String = "Winner!!!"; public static const miGameMP:int = 21; public static const strConnect1:String = "Play With Other Gamers In Multiplayer Mode!"; public static const strConnect2:String = "Try Other Multiplayer Games!"; public static const sXTName:String = "tr"; public static const miResultsMP:int = 22; public static const strYourReiting:String = "Your Rating"; public static const strConnect3:String = "Tell A Friend About Triadz!"; public static const strGainedScore:String = "Gained Score"; public static const strContinue:String = "Continue"; public static const strContinueGame:String = "Continue"; public static const miEnterNewName:int = 4; public static const strRemove:String = "Remove"; public static const strFullGameName:String = "TRIADZ!"; public static const miReturnGameMP:int = 23; public static const strLevelComplete:String = "Level Complete"; public static const miIntro:int = 2; public static const strNewGame:String = "New Game"; public static const strPause:String = "Pause"; public static const strClose:String = "Close"; private static const OWHighScoresType:Array = [TriadzL.strLocal, TriadzL.strPersonal]; public static const miGameEnd:int = 29; public static const strEnterName:String = "please enter your name:"; public static const strFailedLevel:String = " Has Failed The Level With Score "; public static const strLevelConfirm1:String = "more than"; public static const strLevelConfirm2:String = "score"; public static const strMusic:String = "Music Volume"; public static const strInstructions:String = "Instructions"; public static const strLevelScore:String = "'s Level Score Is "; public static const miGameSP:int = 14; public static const miResultsSP:int = 15; public static const strAccept:String = "Accept"; public static const strClear:String = "Clear"; public static const miSSaver:int = 25; public static const strConnectionToServer:String = "Connection To Server..."; public static const strSendMail:String = "Send Mail"; public static const strPlayersOnline1:String = "Players Online"; public static const sZone:String = "Triadz"; 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 miReturnGameSP:int = 16; public static const strScore:String = "Score:"; public static const OSSmileEInd:int = 14; public static const strGameName:String = "TRIADZ!"; public static const strYes:String = "Yes"; public static const miNullWindow:int = 0; public static const sDomain:String = "wellgames.com"; public static const strCompleteLevel:String = " Has Completed The Level With Score "; public static const miHighScores:int = 17; public static const strOptions:String = "Options"; public static const strMenu:String = "Menu"; public static const strDelete:String = "Delete"; public static const OSBubbleBangEInd:int = 10; public static const strOpponent1:String = "Opponent"; public static const strOpponent2:String = "In Game"; private static const iWOptionsOnOff:Array = [TriadzL.strOff, TriadzL.strOn]; public static const strAddMusic:String = "Add Music"; public static const strYourRaiting:String = "Your Raiting"; public static const strLevelConfirm:String = "To get to the next level you need"; public static const strChangePlayer:String = "click to change player"; public static const strPersonal:String = "Personal"; public static const strPublishScore:String = "Publish Score"; public static const miChoosePlayer:int = 7; public static const miEnterNameFirst:int = 3; public static const miGameMPConfirm:int = 20; private static const OSoundParams:Array = [TriadzL.OSBubbleBang01, TriadzL.OSBubbleBang01, TriadzL.OSBubbleBang02, TriadzL.OSBubbleBang03]; public static const strPlayOnline:String = "Play Online!"; public static const strLocal:String = "Local"; public static const strNo:String = "No"; public static const strLevel:String = "Level"; public static const OSOops:int = 15; public static const strWelcome:String = "Welcome"; public static const strPlayersOnline:String = "Players Online"; public static const strOn:String = "On"; public static const strMultiPlayerConfirm:String = "This option is available as "quick play""; private static var OWGameCTimerElement:Array = [OInterface.OTabMake, [[TriadzS.Header, 70, 110, "0", " ", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "0", "0", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "30", "1", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "60", "2", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "90", "3", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "120", "4", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "150", "5", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "180", "6", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "210", "7", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "240", "8", 0, 0, null, 0, false], [TriadzS.Header, 70, 110, "270", "9", 0, 0, null, 0, false]], 70, 110, TriadzL.OTimerAnimator, null]; public static var OWGamePanel:Array = [[TriadzS.SmallFrame, 680, 50, "white", "white", 0, 0, null, 0, true], [TriadzS.Header, 380, 28, "aqua1", "W", 10, 14, null, 0, true], [TriadzS.Header, 30, "yellow1", TriadzL.strScore, 380, 5, "iScoreText", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreF, 500, 12, "iScore", 0, true]]; public static var iGameLevel:int = 0; public static var OWInfoP:Array = [[TriadzS.Header, 250, 30, "yellow", TriadzL.strConnect1, 5, 265, null, 0, true]]; private static var OWGameSite:Array = [[TriadzS.Header, 250, 25, "blue", strSite, 0, 0, null, 0, true]]; public static var OIRight:Class = TriadzL_OIRight; public static var OWHighScores:Array = [[TriadzS.BigFrame, 600, 450, "yellow", "white", 0, 0, null, 0, true], [TriadzS.Header, 600, 50, "yellow", TriadzL.strHighScores, 0, 20, null, 0, true], [TriadzS.ListBoxTextHSlider, 280, 50, "aqua1", false, 190, 40, "aqua1", "", TriadzL.OWHighScoresType, 160, 75, "iType", 0, true], [TriadzS.SmallBorder, 540, 200, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, TriadzL.OWHighScoreTabF, 45, 145, "iTable", 0, true], [TriadzS.MakeTextButton, 170, 60, "red", "red", 30, TriadzL.strClear, 100, 370, "iClear", 0, true], [TriadzS.MakeTextButton, 170, 60, "yellow1", "yellow1", 30, TriadzL.strClose, 330, 370, "iClose", 0, true]]; public static var OWDeleteScoresConfirm:Array = [[TriadzS.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [TriadzS.Header, 420, 30, "aqua1", TriadzL.strDeleteScoresConfirm, 0, 85, null, 0, true], [TriadzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, TriadzL.strYes, 50, 190, "iButtons", 0, true], [TriadzS.MakeTextButton, 150, 60, "red", "red", 30, TriadzL.strNo, 220, 190, "iButtons", 1, true]]; public static var OWGameConnection:Array = [TriadzS.ColorHeader, 800, 50, TriadzL.OWColors, TriadzL.strConnectionToServer, OInterface.iDefSlowAnimators]; private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, TriadzL.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, TriadzL.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, TriadzL.OTimerAnimator, null]; public static var OWEnterName:Array = [[TriadzS.BigFrame, 460, 290, "aqua1", "white", 0, 0, null, 0, true], [TriadzS.Header, 460, 50, "aqua1", TriadzL.strNewPlayer, 0, 20, null, 0, true], [TriadzS.Header, 460, 30, "yellow", TriadzL.strEnterName, 0, 90, null, 0, true], [TriadzS.InputText, 400, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 130, "iName", 0, true], [TriadzS.MakeTextButton, 170, 60, "yellow1", "yellow1", 30, TriadzL.strAccept, 50, 210, "iAccept", 0, true], [TriadzS.MakeTextButton, 170, 60, "red", "red", 30, TriadzL.strCancel, 240, 210, "iCancel", 0, true]]; public static var OCursor:Class = TriadzL_OCursor; private static var OWGameCTimerF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameCTimerElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameCTimerElement, 70, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameCTimerElement, 140, 0, "iDigits", 2, true]], 800, 110]; public static var RKey:int; public static var OWResults:Array = [[TriadzS.ColorHeader, 770, 80, TriadzL.OWColors, strLevelComplete, OInterface.iDefSlowAnimators, 0, 40, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 50, 170, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 50, 230, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 50, 290, null, 0, false], [OInterface.OIObjectMake, OWResultsReiting, OInterface.iDefSlowAnimators, 50, 360, null, 1, false], [TriadzS.MakeTextButton, 320, 60, "yellow1", "yellow1", 30, TriadzL.strNextLevel, 240, 495, "iButtons", 0, false], [TriadzS.Header, 530, 25, "yellow", strLevelConfirm, 0, 480, null, 0, false], [TriadzS.Header, 530, 25, "yellow", strLevelConfirm1, 0, 507, null, 0, false]]; public static var OWResultsLevelScore:Array = [[TriadzS.TextAlign, 700, 45, 45, "yellow", TriadzL.strGainedScore, 0, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 700, 45, 45, "yellow", "9", 2, 1, 0, 0, null, 0, true]]; public static var OILeft:Class = TriadzL_OILeft; public static var OWResultsWinnerMP:Array = [[TriadzS.ColorText, 60, OWPlayersColor, strYourRaiting, OInterface.iDefSlowAnimators, 180, 0, null, 0, true], [TriadzS.Header, 800, 60, "aqua1", "9", 200, 70, null, 0, true]]; public static var OWResultsTotalScore:Array = [[TriadzS.TextAlign, 700, 45, 45, "yellow1", TriadzL.strTotalScore, 0, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 700, 45, 45, "yellow1", "9", 2, 1, 0, 0, null, 0, true]]; public static var OFont:Class = TriadzL_OFont; public static var OWResultsBonusScore:Array = [[TriadzS.TextAlign, 700, 45, 45, "red", TriadzL.strBonusScore, 0, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 700, 45, 45, "red", "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 CurColorCnt:int = 2; private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams); public static var OWGamePanelO:Array = [[TriadzS.SmallFrame, 800, 50, "white", "white", 0, 0, null, 0, true], [TriadzS.Header, 430, 28, "aqua", "W", 10, 14, null, 0, true], [TriadzS.Text, 30, "yellow", TriadzL.strScore, 500, 5, null, 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreF, 620, 12, "iScore", 0, true]]; public static var OWColors:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"]; public static var OWIntroParam:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [TriadzS.Header, 800, 50, "yellow", TriadzL.strSite, 0, 160, "iHeader", 0, true], [TriadzS.Header, 800, 40, "yellow", TriadzL.strPresents, 0, 400, "iFooter", 0, true], [TriadzS.Text, 90, "yellow", "T", (31 + 150), 0, "iName", 0, true], [TriadzS.Text, 90, "yellow1", "R", (95 + 150), 0, "iName", 1, true], [TriadzS.Text, 90, "aqua1", "I", (168 + 150), 0, "iName", 2, true], [TriadzS.Text, 90, "magenta1", "A", (215 + 150), 0, "iName", 3, true], [TriadzS.Text, 90, "yellow", "D", (284 + 150), 0, "iName", 4, true], [TriadzS.Text, 90, "yellow1", "Z", (362 + 150), 0, "iName", 5, true], [TriadzS.Text, 90, "aqua1", "!", (440 + 150), 0, "iName", 6, true]]; private static var OWGameLevelCounterF: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]], 250, 30]; public static var OIDown:Class = TriadzL_OIDown; public static var TBorder:Class = TriadzL_TBorder; public static var OWDeletePlayerConfirm:Array = [[TriadzS.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [TriadzS.Header, 420, 30, "aqua1", TriadzL.strDeletePlayerConfirm, 0, 85, null, 0, true], [TriadzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, TriadzL.strYes, 50, 190, "iButtons", 0, true], [TriadzS.MakeTextButton, 150, 60, "red", "red", 30, TriadzL.strNo, 220, 190, "iButtons", 1, true]]; public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[TriadzS.Header, 13, 23, "0", " ", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "0", "0", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "30", "1", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "60", "2", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "90", "3", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "120", "4", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "150", "5", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "180", "6", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "210", "7", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "240", "8", 0, 0, null, 0, false], [TriadzS.Header, 13, 23, "270", "9", 0, 0, null, 0, false]], 13, 22, TriadzL.OWGameCounterAnimator, null]; public static var iGameType:int = 0; public static var OBG02:Class = TriadzL_OBG02; public static var OWGameNewLevel:Array = [TriadzS.ColorHeader, 800, 60, TriadzL.OWColors, TriadzL.strLevel, OInterface.iDefSlowAnimators]; public static var OWChoosePlayer:Array = [[TriadzS.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [TriadzS.Header, 500, 50, "aqua1", TriadzL.strChoosePlayer, 0, 20, null, 0, true], [TriadzS.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [TriadzS.MakeTextButton, 150, 60, "yellow", "yellow", 30, TriadzL.strNew, 30, 340, "iNew", 0, true], [TriadzS.MakeTextButton, 150, 60, "magenta", "magenta", 30, TriadzL.strDelete, 320, 340, "iDelete", 0, true], [TriadzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, TriadzL.strAccept, 90, 420, "iAccept", 0, true], [TriadzS.MakeTextButton, 150, 60, "red", "red", 30, TriadzL.strCancel, 260, 420, "iCancel", 0, true]]; public static var OSBubbleBang01:Class = TriadzL_OSBubbleBang01; public static var OSBubbleBang03:Class = TriadzL_OSBubbleBang03; public static var OSBubbleBang02:Class = TriadzL_OSBubbleBang02; public static var OWGameLevelElement:Array = [OInterface.OTabMake, [[TriadzS.Header, 17, 30, "aqua", " ", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "0", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "1", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "2", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "3", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "4", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "5", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "6", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "7", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "8", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "aqua", "9", 0, 0, null, 0, false]], 17, 30, TriadzL.OWGameCounterAnimator, null]; public static var OWGame:Array = [[TriadzS.ColorText, 50, TriadzL.OWGameNameColor, TriadzL.strGameName, OInterface.iDefSlowAnimators, 560, 0, "iGameName", 0, false], [TriadzS.InvisibleButton, 250, 25, 537, 505, "iSite", 0, false], [TriadzS.ColorText, 30, TriadzL.OWPlayersColor, TriadzL.strLevel, OInterface.iDefSlowAnimators, 20, 557, "iLevel", 0, false], [TriadzS.ColorText, 30, TriadzL.OWPlayersColor, TriadzL.strScore, OInterface.iDefSlowAnimators, 320, 557, "iScoreText", 0, false], [TriadzS.ColorText, 23, TriadzL.OWPlayersColor, TriadzL.strScore, OInterface.iDefSlowAnimators, 610, 360, "iScoreText0", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelCounterF, 40, 562, "iLevelC", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, (308 + 50), 562, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 680, 363, "iScoreO", 0, false], [TriadzS.MakeTextButton, 160, 50, "yellow", "yellow", 30, TriadzL.strMenu, 590, 500, "iMenu", 0, false], [TriadzS.MakeNFTextButton, 225, 25, "yellow", "yellow", 25, TriadzL.strSite, 555, 565, "iSite", 0, false]]; public static var OIUp:Class = TriadzL_OIUp; public static var iNewOptions:Boolean = false; public static var OWResultsScore:Array = [[TriadzS.Header, 800, 90, "yellow1", "9", 0, 0, null, 0, true]]; public static var OWResultsScoreMPO:Array = [[TriadzS.TextAlign, 700, 50, 50, "yellow", "9", 2, 1, 0, 0, null, 0, true]]; public static var OWRecordColor:Array = ["0", "60", "90", "150", "180", "240", "300"]; private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 18, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 36, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 54, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 72, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 90, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 126, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 144, 0, "iDigits", 8, true]], 250, 30]; private static var OWResultsScoreT:Array = [[TriadzS.Header, 800, 90, "yellow1", TriadzL.strScore, 0, 0, null, 0, true]]; 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 OWPlayersCounterElement:Array = [OInterface.OTabMake, [[TriadzS.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [TriadzS.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, TriadzL.OTimerAnimator, null]; public static var OWGameNameColor:Array = ["yellow", "yellow1", "aqua1", "magenta1", "yellow", "yellow1", "aqua1", "magenta1", "yellow", "yellow1", "aqua1", "magenta1"]; public static var OWInfoPUserNotFound:Array = [[TriadzS.Header, 250, 40, "yellow", TriadzL.strConnect1, 5, 200, null, 0, true], [TriadzS.Header, 250, 30, "yellow", TriadzL.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 TDBorder:Class = TriadzL_TDBorder; public static var OWGameMPConfirm:Array = [[TriadzS.Header, 800, 90, "aqua1", TriadzL.strPlayOnline, 0, 50, null, 0, true]]; public static var OWResultsScoreMP:Array = [[TriadzS.TextAlign, 700, 50, 50, "aqua1", "9", 2, 1, 0, 0, null, 0, true]]; public static var OWResultsColor:Array = ["yellow", "yellow", "yellow", "yellow", "yellow", "yellow", "yellow"]; public static var OWMenuReiting:Array = [[TriadzS.Header, 800, 30, "yellow", "W", 0, 385, null, 0, true]]; public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[TriadzS.Header, 18, 30, "0", " ", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "0", "0", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "30", "1", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "60", "2", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "90", "3", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "120", "4", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "150", "5", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "180", "6", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "210", "7", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "240", "8", 0, 0, null, 0, false], [TriadzS.Header, 18, 30, "270", "9", 0, 0, null, 0, false]], 18, 30, TriadzL.OWGameCounterAnimator, null]; public static var OWInfoPConnect:Array = [[TriadzS.Header, 250, 25, "yellow", TriadzL.strConnect1, 5, 200, null, 0, true], [TriadzS.MakeTextButton, 230, 50, "yellow", "yellow", 25, TriadzL.strPlayOnline, 15, 310, null, 0, true]]; public static var FallParticle:Class = TriadzL_FallParticle; public static var OWHighScoreLocal:Array = [[TriadzS.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, 35, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, 35, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, 70, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, 70, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, 105, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, 105, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, 140, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, 140, null, 0, true]]; public static var OWMenu:Array = [[TriadzS.Header, 800, 40, "magenta1", TriadzL.strWelcome, 0, 10, null, 0, true], [TriadzS.Header, 800, 30, "white", TriadzL.strChangePlayer, 0, 55, null, 0, true], [TriadzS.ColorText, 100, TriadzL.OWGameNameColor, TriadzL.strFullGameName, null, 190, 80, "iGameName", 0, true], [TriadzS.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 211, "iCPlayers", 0, true], [TriadzS.ColorText, 30, TriadzL.OWPlayersColor, TriadzL.strPlayersOnline, null, 20, 205, "iPlayers", 0, true], [TriadzS.MakeTextButton, 440, 90, "yellow", "yellow", 50, TriadzL.strPlayOnline, 180, 270, "iQuickPlay", 0, true], [TriadzS.MakeTextButton, 300, 60, "aqua1", "aqua1", 30, TriadzL.strOptions, 70, 440, "iOptions", 0, true], [TriadzS.MakeTextButton, 300, 60, "red1", "red1", 30, TriadzL.strInstructions, 430, 440, "iInstructions", 0, true], [TriadzS.MakeTextButton, 300, 60, "aqua", "aqua", 30, TriadzL.strHighScores, 30, 520, "iHighScores", 0, true], [TriadzS.MakeTextButton, 300, 60, "magenta", "magenta", 30, TriadzL.strMoreGames, 470, 520, "iMoreGames", 0, true]]; public static var OWHighScorePersonal:Array = [[TriadzS.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, 35, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, 35, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, 70, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, 70, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, 105, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, 105, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, 140, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, 140, null, 0, true]]; public static var OWHighRaitingPersonal:Array = [[TriadzS.TextAlign, 510, 30, 30, "30", "W", 0, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "30", "9", 2, 1, 0, 0, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "90", "W", 0, 1, 0, 35, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "90", "9", 2, 1, 0, 35, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "150", "W", 0, 1, 0, 70, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "150", "9", 2, 1, 0, 70, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "210", "W", 0, 1, 0, 105, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "210", "9", 2, 1, 0, 105, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "270", "W", 0, 1, 0, 140, null, 0, true], [TriadzS.TextAlign, 510, 30, 30, "270", "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, 13, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 26, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 39, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 52, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 65, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 78, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 91, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 104, 0, "iDigits", 8, true]], 110, 23]; public static var OWOptions:Array = [[TriadzS.BigFrame, 540, 390, "aqua1", "white", 0, 0, null, 0, true], [TriadzS.Header, 540, 50, "aqua1", TriadzL.strOptions, 0, 20, null, 0, true], [TriadzS.ListBoxTextHSlider, 520, 50, "magenta", false, 90, 40, "magenta", TriadzL.strSound, TriadzL.iWOptionsVolume, 10, 90, "iSound", 0, true], [TriadzS.ListBoxTextHSlider, 520, 50, "yellow", false, 90, 40, "yellow", TriadzL.strMusic, TriadzL.iWOptionsVolume, 10, 140, "iMusic", 0, true], [TriadzS.ListBoxTextHSlider, 520, 50, "green1", false, 200, 40, "green1", TriadzL.strWindow, null, 10, 190, "iResolution", 0, true], [TriadzS.ListBoxTextHSlider, 520, 50, "red1", false, 90, 40, "red1", TriadzL.strFullScreen, TriadzL.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [TriadzS.MakeTextButton, 170, 60, "yellow1", "yellow1", 30, TriadzL.strAccept, 90, 310, "iAccept", 0, true], [TriadzS.MakeTextButton, 170, 60, "red", "red", 30, TriadzL.strCancel, 280, 310, "iCancel", 0, true]]; public static var TRLeft:Class = TriadzL_TRLeft; public static var OWHowToPlay:Array = [[TriadzS.BigFrame, 600, 580, "aqua1", "white", 100, 10, null, 0, true], [TriadzS.Header, 460, 50, "aqua1", TriadzL.strHowToPlay, 180, 30, null, 0, true], [TriadzS.Header, 460, 20, "aqua1", TriadzL.strInstruction, 165, 430, null, 0, true], [TriadzS.ColorText, 50, TriadzL.OWColors, TriadzL.strLevelComplete, OInterface.iDefSlowAnimators, 200, 200, "iEndLevel", 0, false], [TriadzS.MakeTextButton, 150, 50, "yellow1", "yellow1", 30, TriadzL.strClose, 325, 520, "iClose", 0, true]]; public static var OWInstructions:Array = [[TriadzS.BigFrame, 550, 340, "yellow", "white", 0, 0, null, 0, true], [TriadzS.Header, 550, 50, "yellow", TriadzL.strInstructions, 0, 20, null, 0, true], [TriadzS.Header, 550, 30, "yellow1", TriadzL.strInstructionsText, 0, 150, null, 0, true], [TriadzS.MakeTextButton, 190, 60, "aqua1", "aqua1", 30, TriadzL.strClose, 170, 260, null, 0, true]]; public static var OWResultsReiting:Array = [[TriadzS.ColorText, 45, OWPlayersColor, strYourReiting, OInterface.iDefSlowAnimators, 190, 0, null, 0, true], [TriadzS.Header, 710, 40, "aqua1", "9", 0, 80, null, 0, true]]; 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 OWIPGameName:Array = [[TriadzS.ColorText, 50, TriadzL.OWGameNameColor, TriadzL.strGameName, null, 5, 150, null, 0, true]]; public static var OWInfoPPlayer:Array = [[TriadzS.ColorHeader, 270, 25, TriadzL.OWColors, TriadzL.strOpponent1, null, 0, 415, null, 0, true], [TriadzS.ColorHeader, 270, 25, TriadzL.OWPlayersColor, TriadzL.strLevel, null, 0, 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, 30]; public static var iGAME:OCGame = new OCGame(); public static var OWResultsNameMPO:Array = [[TriadzS.TextAlign, 700, 50, 50, "yellow", "W", 0, 1, 0, 0, null, 0, true]]; public static var OWResultsNameMP:Array = [[TriadzS.TextAlign, 700, 50, 50, "aqua1", "W", 0, 1, 0, 0, null, 0, true]]; } }//package
Section 92
//TriadzL_FallParticle (TriadzL_FallParticle) package { import mx.core.*; public class TriadzL_FallParticle extends SpriteAsset { } }//package
Section 93
//TriadzL_OBG02 (TriadzL_OBG02) package { import mx.core.*; public class TriadzL_OBG02 extends SpriteAsset { } }//package
Section 94
//TriadzL_OCursor (TriadzL_OCursor) package { import mx.core.*; public class TriadzL_OCursor extends SpriteAsset { } }//package
Section 95
//TriadzL_OFont (TriadzL_OFont) package { import mx.core.*; public class TriadzL_OFont extends SpriteAsset { } }//package
Section 96
//TriadzL_OIDown (TriadzL_OIDown) package { import mx.core.*; public class TriadzL_OIDown extends SpriteAsset { } }//package
Section 97
//TriadzL_OILeft (TriadzL_OILeft) package { import mx.core.*; public class TriadzL_OILeft extends SpriteAsset { } }//package
Section 98
//TriadzL_OIRight (TriadzL_OIRight) package { import mx.core.*; public class TriadzL_OIRight extends SpriteAsset { } }//package
Section 99
//TriadzL_OIUp (TriadzL_OIUp) package { import mx.core.*; public class TriadzL_OIUp extends SpriteAsset { } }//package
Section 100
//TriadzL_OSBubbleBang01 (TriadzL_OSBubbleBang01) package { import mx.core.*; public class TriadzL_OSBubbleBang01 extends SoundAsset { } }//package
Section 101
//TriadzL_OSBubbleBang02 (TriadzL_OSBubbleBang02) package { import mx.core.*; public class TriadzL_OSBubbleBang02 extends SoundAsset { } }//package
Section 102
//TriadzL_OSBubbleBang03 (TriadzL_OSBubbleBang03) package { import mx.core.*; public class TriadzL_OSBubbleBang03 extends SoundAsset { } }//package
Section 103
//TriadzL_TBorder (TriadzL_TBorder) package { import mx.core.*; public class TriadzL_TBorder extends SpriteAsset { } }//package
Section 104
//TriadzL_TDBorder (TriadzL_TDBorder) package { import mx.core.*; public class TriadzL_TDBorder extends SpriteAsset { } }//package
Section 105
//TriadzL_TRLeft (TriadzL_TRLeft) package { import mx.core.*; public class TriadzL_TRLeft extends SpriteAsset { } }//package
Section 106
//TriadzS (TriadzS) package { import ENGINE.DISPLAY.*; import flash.display.*; import flash.geom.*; import ENGINE.INTERFACE.*; import ENGINE.INTERFACE.ANIMATORS.*; import ENGINE.INTERFACE.ELEMENTS.*; import ENGINE.DISPLAY.EFFECTS.*; import ENGINE.CORE.*; import flash.text.*; import ENGINE.SKIN.*; public class TriadzS { public static var iRegistered:Boolean = TriadzS.Register(); public static function SmallCellRect(_arg1:Array):OBitmap{ return (ODisplay.OBitmapRoundRect([null, _arg1[1], _arg1[2], _arg1[7], "GEL", _arg1[3], "spanel ns", _arg1[4], OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function ListBoxText(_arg1:Array):OListBox{ var _local2:Number; var _local3:Number; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:int; var _local8:OListBox; _local2 = (_arg1[1] + 80); _local3 = ((_arg1[2] * _arg1[5]) + 30); _local4 = [[TriadzS.SmallBorder, _local2, _local3, _arg1[3], 0, 0, null, 0, true], [TriadzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], TriadzL.OIUp, "text 60", 1, (_local2 - 50), 20, "iUp", 0, false], [TriadzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], TriadzL.OIDown, "text 60", 1, (_local2 - 50), (_local3 - 50), "iDown", 0, false]]; _local5 = [TriadzS.ListBoxTextElement, _arg1[1], _arg1[2], _arg1[3], "w", _arg1[4], 0, 0]; _local6 = new Array(_arg1[5]); _local7 = 0; while (_local7 < _arg1[5]) { _local6[_local7] = [15, ((_local7 * _arg1[2]) + 15)]; _local7++; }; _local8 = new OListBox(_local4, _local5, TriadzS.ListBoxTextElementP, _local6, null); _local8.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local8.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local8.prLBParams = _arg1[6]; _local8.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local8); } private static function Register():Boolean{ OEffects.RegisterEffect("GEL", new OEffectGel()); OEffects.RegisterColor("GEL", "red", {iCH:0, iCS:0.5, iCB:1, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "red1", {iCH:30, iCS:0.5, iCB:1, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "yellow", {iCH:60, iCS:0.6, iCB:1, iSH:45, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "yellow1", {iCH:90, iCS:0.6, iCB:1, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "green", {iCH:120, iCS:0.5, iCB:1, iSH:105, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "green1", {iCH:150, iCS:0.5, iCB:1, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "aqua", {iCH:180, iCS:0.4, iCB:1, iSH:165, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "aqua1", {iCH:210, iCS:0.4, iCB:1, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "blue", {iCH:240, iCS:0.3, iCB:1, iSH:225, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "blue1", {iCH:270, iCS:0.3, iCB:1, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "magenta", {iCH:300, iCS:0.4, iCB:1, iSH:295, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "magenta1", {iCH:330, iCS:0.4, iCB:1, iSH:345, iSS:0.9, iSB:0.6}); OEffects.RegisterColor("GEL", "white", {iCH:0, iCS:0, iCB:0.97, iSH:0, iSS:0, iSB:0.7}); OEffects.RegisterFilter("GEL", "bpanel", {iBorder:24, iAngle:90, iF0SD:16, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "text 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 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", "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", "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", "border1", {iBorder:8, iAngle:60, iF0SD:12, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2}); OEffects.RegisterFilter("GEL", "bpanel ns", {iBorder:8, iAngle:90, iF0SD:0, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2}); OEffects.RegisterFilter("GEL", "spanel ns", {iBorder:16, iAngle:90, iF0SD:0, iF0SB:16, iF1SD:12, iF1SB:16, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:180, iF2B:2}); OEffects.RegisterFilter("GEL", "border ns", {iBorder:8, iAngle:60, iF0SD:0, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2}); return (true); } public static function createSimpleCellWithoutBorder(_arg1:Number):OBitmap{ var _local2:Array; _local2 = new Array(8); _local2[0] = null; _local2[1] = (_local2[2] = _arg1); _local2[3] = "white"; _local2[4] = 0.5; _local2[5] = (_local2[6] = 0); _local2[7] = 1; return (TriadzS.SmallCellRect(_local2)); } public static function MakeSpriteButton(_arg1:Array):OButton{ var _local2:Array; var _local3:OButton; _local2 = [[ODisplay.OBitmapSpriteFillRect, _arg1[1], _arg1[2], [ODisplay.SpriteLib, _arg1[5]], "GEL", _arg1[3], _arg1[6], _arg1[7], 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local3 = new OButton(_local2); _local3.Pos(OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])); return (_local3); } public static function SmallFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapAngleFrame([null, _arg1[1], _arg1[2], 6, 5, "GEL", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function ListBoxTextElement(_arg1:Array):OListBoxElement{ var _local2:Number; var _local3:Number; var _local4:String; var _local5:Array; var _local6:OListBoxElement; _local2 = (_arg1[2] - 10); if (_local2 < 30){ _local2 = 30; }; _local3 = Math.round((1 + (_local2 / 70))); _local4 = ("text " + String(Math.max(30, Math.min((Math.round((_local2 / 10)) * 10), 90)))); _local5 = [[ODisplay.OBitmapMake, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], 12, 6], 1, "GEL", _arg1[3], "border", 1, 0, 0, null, 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteTextInRect, TriadzL.OFont, _local2, _local3, _arg1[4], _arg1[1], _arg1[2]], 1, "GEL", _arg1[5], _local4, 1, 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (12 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local6 = new OListBoxElement(_local5); _local6.Pos(OGlobal.ScaleFloor(_arg1[6]), OGlobal.ScaleFloor(_arg1[7])); return (_local6); } public static function MakeNFTextButton(_arg1:Array):OButton{ var _local2:Number; var _local3:String; var _local4:Array; var _local5:OButton; _local2 = Math.round((1 + (_arg1[5] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[5] / 10)) * 10), 90)))); _local4 = [[ODisplay.OBitmapTextInRect, TriadzL.OFont, _arg1[5], _local2, _arg1[6], "GEL", _arg1[3], _local3, 1, _arg1[1], _arg1[2], 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (24 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local5 = new OButton(_local4); _local5.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local5); } public static function Text(_arg1:Array):OBitmap{ var _local2:Number; var _local3:String; _local2 = Math.round((1 + (_arg1[1] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[1] / 10)) * 10), 90)))); return (ODisplay.OBitmapText([null, TriadzL.OFont, _arg1[1], _local2, _arg1[3], "GEL", _arg1[2], _local3, 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])])); } public static function ListBoxTextElementP(_arg1:Array, _arg2:String):void{ _arg1[4] = _arg2; } public static function MakeTextButton(_arg1:Array):OButton{ var _local2:Number; var _local3:String; var _local4:Number; var _local5:Array; var _local6:OButton; _local2 = Math.round((1 + (_arg1[5] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[5] / 10)) * 10), 90)))); _local4 = ((_arg1[2] <= 60)) ? 1 : 1.2; _local5 = [[ODisplay.OBitmapAngleFrameText, _arg1[1], _arg1[2], ((_arg1[2] / 2) - 5), 5, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", 1, TriadzL.OFont, _arg1[5], _local2, _arg1[6], "GEL", _arg1[3], _local3, 1, 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (24 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local6 = new OButton(_local5); _local6.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local6); } public static function ColorText(_arg1:Array):OIObject{ var _local2:Number; var _local3:String; var _local4:Sprite; var _local5:TextField; var _local6:TextFormat; var _local7:Array; var _local8:int; var _local9:int; var _local10:OIObject; var _local11:String; var _local12:Rectangle; _local2 = Math.round((1 + (_arg1[1] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[1] / 10)) * 10), 90)))); _local4 = ((TriadzL.OFont is Sprite)) ? (TriadzL.OFont as Sprite) : new ((TriadzL.OFont as Class)); if (!(_local4.getChildAt(0) is TextField)){ return (null); }; _local5 = (_local4.getChildAt(0) as TextField); _local5.autoSize = TextFieldAutoSize.LEFT; _local5.text = _arg1[3]; _local6 = _local5.defaultTextFormat; _local6.size = _arg1[1]; _local6.letterSpacing = _local2; _local5.setTextFormat(_local6); _local7 = new Array(); _local8 = 0; _local9 = 0; while (_local9 < _local5.length) { _local11 = _arg1[3].substr(_local9, 1); if (_local11 == " "){ } else { _local12 = _local5.getCharBoundaries(_local9); var _temp1 = _local8; _local8 = (_local8 + 1); _local7.push([ODisplay.OBitmapMake, [ODisplay.SpriteText, TriadzL.OFont, _arg1[1], _local2, _local11], 1, "GEL", _arg1[2][(_temp1 % _arg1[2].length)], _local3, 1, _local12.x, _local12.y, null, 0, true]); }; _local9++; }; _local10 = new OIObject(_local7, _arg1[4]); _local10.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])); return (_local10); } public static function TextSmallFrame(_arg1:Array):OBitmap{ var _local2:Number; var _local3:String; _local2 = Math.round((1 + (_arg1[4] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[4] / 10)) * 10), 90)))); return (ODisplay.OBitmapRoundFrameText([null, _arg1[1], _arg1[2], 24, 5, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", 1, TriadzL.OFont, _arg1[4], _local2, _arg1[5], "GEL", _arg1[6], _local3, 1, OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])])); } public static function BigFrame(_arg1:Array):OBitmap{ return (ODisplay.OBitmapAngleFrame([null, _arg1[1], _arg1[2], 24, 8, "GEL", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function ListBoxTextHSlider(_arg1:Array):OListBox{ var _local2:Number; var _local3:Number; var _local4:String; var _local5:Rectangle; var _local6:Number; var _local7:Array; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:OListBox; _local2 = _arg1[6]; _local3 = Math.round((1 + (_local2 / 70))); _local4 = ("text " + String(Math.max(30, Math.min((Math.round((_local2 / 10)) * 10), 90)))); _local5 = ODisplay.TextRect(TriadzL.OFont, _local2, _local3, _arg1[8]); _local6 = (_arg1[6] - 10); _local7 = (_arg1[4]) ? [[TriadzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array(); _local8 = [[ODisplay.OBitmapText, TriadzL.OFont, _local2, _local3, _arg1[8], "GEL", _arg1[3], _local4, 1, 15, ((_arg1[2] - _local5.height) * 0.5), null, 0, true], [TriadzS.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], TriadzL.OILeft, "text 60", 1, ((_arg1[1] - _arg1[5]) - 75), ((_arg1[2] - _local6) * 0.5), "iUp", 0, false], [TriadzS.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], TriadzL.OIRight, "text 60", 1, (_arg1[1] - 45), ((_arg1[2] - _local6) * 0.5), "iDown", 0, false]]; _local7 = _local7.concat(_local8); _local9 = [TriadzS.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[7], "w", _arg1[7], 0, 0]; _local10 = [[((_arg1[1] - 45) - _arg1[5]), ((_arg1[2] - _arg1[6]) * 0.5)]]; _local11 = new OListBox(_local7, _local9, TriadzS.ListBoxTextElementP, _local10, null); _local11.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local11.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local11.prSelection = false; _local11.prCycling = true; _local11.prLBParams = _arg1[9]; _local11.Pos(OGlobal.ScaleFloor(_arg1[10]), OGlobal.ScaleFloor(_arg1[11])); return (_local11); } public static function ColorHeader(_arg1:Array):OIObject{ var _local2:Number; var _local3:String; var _local4:Sprite; var _local5:TextField; var _local6:TextFormat; var _local7:Rectangle; var _local8:Number; var _local9:Array; var _local10:int; var _local11:int; var _local12:OIObject; var _local13:String; var _local14:Rectangle; _local2 = Math.round((1 + (_arg1[2] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90)))); _local4 = ((TriadzL.OFont is Sprite)) ? (TriadzL.OFont as Sprite) : new ((TriadzL.OFont as Class)); if (!(_local4.getChildAt(0) is TextField)){ return (null); }; _local5 = (_local4.getChildAt(0) as TextField); _local5.autoSize = TextFieldAutoSize.LEFT; _local5.text = _arg1[4]; _local6 = _local5.defaultTextFormat; _local6.size = _arg1[2]; _local6.letterSpacing = _local2; _local5.setTextFormat(_local6); _local7 = _local5.getBounds(_local4); _local8 = ((_arg1[1] - _local7.width) / 2); _local9 = new Array(); _local10 = 0; _local11 = 0; while (_local11 < _local5.length) { _local13 = _arg1[4].substr(_local11, 1); if (_local13 == " "){ } else { _local14 = _local5.getCharBoundaries(_local11); var _temp1 = _local10; _local10 = (_local10 + 1); _local9.push([ODisplay.OBitmapMake, [ODisplay.SpriteText, TriadzL.OFont, _arg1[2], _local2, _local13], 1, "GEL", _arg1[3][_temp1], _local3, 1, (_local14.x + _local8), _local14.y, null, 0, true]); }; _local11++; }; _local12 = new OIObject(_local9, _arg1[5]); _local12.Pos(OGlobal.ScaleFloor(_arg1[6]), OGlobal.ScaleFloor(_arg1[7])); return (_local12); } public static function TextAlign(_arg1:Array):OBitmap{ var _local2:Number; var _local3:String; _local2 = Math.round((1 + (_arg1[2] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90)))); return (ODisplay.OBitmapTextAlign([null, TriadzL.OFont, _arg1[3], _local2, _arg1[5], _arg1[6], _arg1[7], "GEL", _arg1[4], _local3, 1, _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])])); } public static function SmallBorder(_arg1:Array):OBitmap{ return (ODisplay.OBitmapAngleBorder([null, _arg1[1], _arg1[2], 12, 6, "GEL", _arg1[3], "border", 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])])); } public static function Header(_arg1:Array):OBitmap{ var _local2:Number; var _local3:String; _local2 = Math.round((1 + (_arg1[2] / 70))); _local3 = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90)))); return (ODisplay.OBitmapTextInRect([null, TriadzL.OFont, _arg1[2], _local2, _arg1[4], "GEL", _arg1[3], _local3, 1, _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])])); } public static function ListBoxTextVSlider(_arg1:Array):OListBox{ var _local2:Number; var _local3:Number; var _local4:String; var _local5:Rectangle; var _local6:Array; var _local7:Number; var _local8:Number; var _local9:Array; var _local10:Array; var _local11:Array; var _local12:OListBox; _local2 = _arg1[6]; _local3 = Math.round((1 + (_local2 / 70))); _local4 = ("text " + String(Math.max(30, Math.min((Math.round((_local2 / 10)) * 10), 90)))); _local5 = ODisplay.TextRect(TriadzL.OFont, _local2, _local3, _arg1[9]); _local6 = [[((_arg1[1] - _arg1[5]) * 0.5), _arg1[7]]]; _local7 = (_arg1[6] - 10); _local8 = (_local6[0][1] + ((_arg1[6] - _local7) * 0.5)); _local9 = (_arg1[4]) ? [[TriadzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array(); _local10 = [[ODisplay.OBitmapText, TriadzL.OFont, _local2, _local3, _arg1[9], "GEL", _arg1[3], _local4, 1, ((_arg1[1] - _local5.width) * 0.5), _arg1[10], null, 0, true], [TriadzS.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], TriadzL.OILeft, "text 60", 1, (_local6[0][0] - _local7), _local8, "iUp", 0, false], [TriadzS.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], TriadzL.OIRight, "text 60", 1, (_local6[0][0] + _arg1[5]), _local8, "iDown", 0, false]]; _local9 = _local9.concat(_local10); _local11 = [TriadzS.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[8], "w", _arg1[8], 0, 0]; _local12 = new OListBox(_local9, _local11, TriadzS.ListBoxTextElementP, _local6, null); _local12.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local12.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators; _local12.prSelection = false; _local12.prCycling = true; _local12.prLBParams = _arg1[11]; _local12.Pos(OGlobal.ScaleFloor(_arg1[12]), OGlobal.ScaleFloor(_arg1[13])); return (_local12); } public static function InputText(_arg1:Array):OInput{ var _local2:Array; var _local3:OInput; _local2 = [[TriadzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true], [OInterface.OInputTextFieldMake, (_arg1[1] - 10), (_arg1[2] - 10), TriadzL.OFont, (_arg1[2] - 30), 1, false, _arg1[5], _arg1[4], _arg1[6], 5, 8, "iText", 0, true]]; _local3 = new OInput(_local2); _local3.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])); return (_local3); } public static function InvisibleButton(_arg1:Array):OButton{ var _local2:Array; var _local3:OButton; _local2 = [[OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]]; _local3 = new OButton(_local2, OAnimatorManager.iNullAnimators); _local3.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4])); _local3.prVisible = true; _local3.prActive = true; return (_local3); } } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip {TriadzL_OCursor} [OCursor]Uses:1
Symbol 3 GraphicUsed by:4 8
Symbol 4 MovieClip {TriadzL_TBorder} [TBorder]Uses:3
Symbol 5 FontUsed by:6
Symbol 6 EditableTextUses:5Used by:7
Symbol 7 MovieClip {TriadzL_OFont} [OFont]Uses:6
Symbol 8 MovieClip {TriadzL_TDBorder} [TDBorder]Uses:3
Symbol 9 Sound {TriadzL_OSBubbleBang03} [TriadzL_OSBubbleBang03]
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip {TriadzL_OILeft} [OILeft]Uses:10
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClip {TriadzL_OIUp} [OIUp]Uses:12
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClip {TriadzL_FallParticle} [FallParticle]Uses:14
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClip {TriadzL_TRLeft} [TRLeft]Uses:16
Symbol 18 Sound {TriadzL_OSBubbleBang02} [TriadzL_OSBubbleBang02]
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClip {TriadzL_OIDown} [OIDown]Uses:19
Symbol 21 Sound {TriadzL_OSBubbleBang01} [TriadzL_OSBubbleBang01]
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClip {TriadzL_OIRight} [OIRight]Uses:22
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClip {TriadzL_OBG02} [OBG01]Uses:24

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 2 as "OCursor"
ExportAssets (56)Timeline Frame 1Symbol 4 as "TBorder"
ExportAssets (56)Timeline Frame 1Symbol 7 as "OFont"
ExportAssets (56)Timeline Frame 1Symbol 8 as "TDBorder"
ExportAssets (56)Timeline Frame 1Symbol 9 as "TriadzL_OSBubbleBang03"
ExportAssets (56)Timeline Frame 1Symbol 11 as "OILeft"
ExportAssets (56)Timeline Frame 1Symbol 13 as "OIUp"
ExportAssets (56)Timeline Frame 1Symbol 15 as "FallParticle"
ExportAssets (56)Timeline Frame 1Symbol 17 as "TRLeft"
ExportAssets (56)Timeline Frame 1Symbol 18 as "TriadzL_OSBubbleBang02"
ExportAssets (56)Timeline Frame 1Symbol 20 as "OIDown"
ExportAssets (56)Timeline Frame 1Symbol 21 as "TriadzL_OSBubbleBang01"
ExportAssets (56)Timeline Frame 1Symbol 23 as "OIRight"
ExportAssets (56)Timeline Frame 1Symbol 25 as "OBG01"
SerialNumber (41)Timeline Frame 1

Labels

"Triadz"Frame 1




http://swfchan.com/21/100227/info.shtml
Created: 21/3 -2019 11:04:16 Last modified: 21/3 -2019 11:04:16 Server time: 24/04 -2024 22:43:55