Section 1
//OAdBanner (ENGINE.AD.OAdBanner)
package ENGINE.AD {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class OAdBanner {
private var iManager:DisplayObject;
private var iID:String;
private var iBanner:DisplayObject;
private var iPrefix:String;
private var iLoader:Loader;
private static const strURL:String = "http://wellgames.com/ad/";
public function OAdBanner(_arg1:String, _arg2:String){
this.iPrefix = _arg1;
this.iID = _arg2;
this.iLoader = new Loader();
this.iLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, OnIOError);
this.iLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, OnComplete);
this.iLoader.load(new URLRequest(this.prURL));
}
private function OnIOError(_arg1:IOErrorEvent):void{
}
public function DeleteBanner():void{
this.iBanner = null;
}
private function get prURL():String{
return ((((((OAdBanner.strURL + this.iPrefix) + "AdBanner.swf?r=") + this.iPrefix) + this.iID) + "&i=-1"));
}
public function get prBanner():DisplayObject{
return (this.iBanner);
}
public function CreateBanner():void{
if (this.iManager){
this.iBanner = this.iManager["prBanner"];
};
}
private function OnComplete(_arg1:Event):void{
this.iManager = this.iLoader.content;
}
}
}//package ENGINE.AD
Section 2
//OAdBanners (ENGINE.AD.OAdBanners)
package ENGINE.AD {
import flash.display.*;
import ENGINE.CORE.*;
public class OAdBanners {
public static var iBBanner:OAdBanner;
public static var iTBanner:OAdBanner;
public static function InitTBanner(_arg1:String, _arg2:String):void{
OAdBanners.iTBanner = new OAdBanner(_arg1, _arg2);
}
public static function RemoveBBanner(_arg1:DisplayObjectContainer):void{
var _local2:Sprite;
_local2 = (OAdBanners.iBBanner.prBanner as Sprite);
if (((_local2) && (_arg1.contains(_local2)))){
_arg1.removeChild(_local2);
};
OAdBanners.iBBanner.DeleteBanner();
}
public static function AddBBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{
var _local6:Sprite;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
OAdBanners.iBBanner.CreateBanner();
_local6 = (OAdBanners.iBBanner.prBanner as Sprite);
if (!_local6){
return;
};
_local7 = OGlobal.ToGlobal(_arg2);
_local8 = OGlobal.ToGlobal(_arg3);
_local9 = OGlobal.ToGlobal(_arg4);
_local10 = OGlobal.ToGlobal(_arg5);
_local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2)));
_local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2)));
_arg1.addChild(_local6);
}
public static function RemoveTBanner(_arg1:DisplayObjectContainer):void{
var _local2:Sprite;
_local2 = (OAdBanners.iTBanner.prBanner as Sprite);
if (((_local2) && (_arg1.contains(_local2)))){
_arg1.removeChild(_local2);
};
OAdBanners.iTBanner.DeleteBanner();
}
public static function InitBBanner(_arg1:String, _arg2:String):void{
OAdBanners.iBBanner = new OAdBanner(_arg1, _arg2);
}
public static function AddTBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{
var _local6:Sprite;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
OAdBanners.iTBanner.CreateBanner();
_local6 = (OAdBanners.iTBanner.prBanner as Sprite);
if (!_local6){
return;
};
_local7 = OGlobal.ToGlobal(_arg2);
_local8 = OGlobal.ToGlobal(_arg3);
_local9 = OGlobal.ToGlobal(_arg4);
_local10 = OGlobal.ToGlobal(_arg5);
_local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2)));
_local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2)));
_arg1.addChild(_local6);
}
}
}//package ENGINE.AD
Section 3
//OCache (ENGINE.CORE.OCache)
package ENGINE.CORE {
import flash.utils.*;
public dynamic class OCache {
public function Pack():ByteArray{
var _local1:ByteArray;
_local1 = new ByteArray();
_local1.writeObject(this);
_local1.compress();
return (_local1);
}
public function AddCategoryArr(_arg1:String, _arg2:String):Array{
var _local3:OCache;
_local3 = ((this[_arg1])==undefined) ? AddCategory(_arg1) : this[_arg1];
return (_local3.AddArr(_arg2));
}
public function GetArrItem(_arg1:String, _arg2:int){
if ((((this[_arg1] == undefined)) || ((this[_arg1][_arg2] == undefined)))){
return (null);
};
return (this[_arg1][_arg2]);
}
public function DeleteArrItem(_arg1:String, _arg2:int):void{
if (this[_arg1] == undefined){
return;
};
this[_arg1].splice(_arg2, 1);
}
public function IsCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):Boolean{
if (this[_arg1] == undefined){
return (false);
};
return (this[_arg1].IsArrItem(_arg2, _arg3));
}
public function GetCategoryItem(_arg1:String, _arg2:String){
if (this[_arg1] == undefined){
return (null);
};
return (this[_arg1].GetItem(_arg2));
}
public function SetCategoryItem(_arg1:String, _arg2:String, _arg3):void{
if (this[_arg1] == undefined){
this[_arg1] = new OCache();
};
this[_arg1].SetItem(_arg2, _arg3);
}
public function SetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int, _arg4):void{
if (this[_arg1] == undefined){
this[_arg1] = new OCache();
};
this[_arg1].SetArrItem(_arg2, _arg3, _arg4);
}
public function IsCategoryItem(_arg1:String, _arg2:String):Boolean{
if (this[_arg1] == undefined){
return (false);
};
return (this[_arg1].IsItem(_arg2));
}
public function DeleteCategoryItem(_arg1:String, _arg2:String):void{
if (this[_arg1] == undefined){
return;
};
this[_arg1].DeleteItem(_arg2);
}
public function AddCategory(_arg1:String):OCache{
this[_arg1] = new OCache();
return (this[_arg1]);
}
public function GetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int){
if (this[_arg1] == undefined){
return (null);
};
return (GetArrItem(_arg2, _arg3));
}
public function GetCategoryNames(_arg1:String):Array{
var _local2:Array;
var _local3:String;
if (this[_arg1] == undefined){
return (null);
};
_local2 = new Array();
for (_local3 in this[_arg1]) {
_local2.push(_local3);
};
return ((_local2.length) ? _local2.sort() : null);
}
public function AddArr(_arg1:String):Array{
this[_arg1] = new Array();
return (this[_arg1]);
}
public function GetItem(_arg1:String){
if (this[_arg1] == undefined){
return (null);
};
return (this[_arg1]);
}
public function IsArrItem(_arg1:String, _arg2:int):Boolean{
return (((!((this[_arg1] == undefined))) && (!((this[_arg1][_arg2] == undefined)))));
}
public function DeleteCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):void{
if (this[_arg1] == undefined){
return;
};
this[_arg1].DeleteArrItem(_arg2, _arg3);
}
public function Clear():void{
var _local1:String;
for (_local1 in this) {
delete this[_local1];
};
}
public function SetArrItem(_arg1:String, _arg2:int, _arg3):void{
if (this[_arg1] == undefined){
this[_arg1] = new Array();
};
this[_arg1][_arg2] = _arg3;
}
public function SetItem(_arg1:String, _arg2):void{
this[_arg1] = _arg2;
}
public function GetNames():Array{
var _local1:Array;
var _local2:String;
_local1 = new Array();
for (_local2 in this) {
_local1.push(_local2);
};
return ((_local1.length) ? _local1.sort() : null);
}
public function IsItem(_arg1:String):Boolean{
return (!((this[_arg1] == undefined)));
}
public function DeleteItem(_arg1:String):void{
if (this[_arg1] == undefined){
return;
};
delete this[_arg1];
}
}
}//package ENGINE.CORE
Section 4
//OGlobal (ENGINE.CORE.OGlobal)
package ENGINE.CORE {
import flash.display.*;
import flash.geom.*;
import flash.net.*;
public class OGlobal {
private static var iFPS:int = 60;
private static var iDomain:String;
private static var iSRect:Rectangle = new Rectangle();
private static var iVRect:Rectangle = new Rectangle(0, 0, 800, 600);
private static var iStage:Stage;
private static var iScale:Number = 1;
private static var iAppName:String;
private static var iOldScale:Number = 1;
public static function get FPS():int{
return (OGlobal.iFPS);
}
public static function CheckDomain(_arg1:String):Boolean{
var _local2:int;
_local2 = OGlobal.iDomain.indexOf(_arg1);
return ((((_local2 >= 0)) && ((_local2 <= 4))));
}
public static function ToLocal(_arg1:Number):Number{
return ((_arg1 / OGlobal.iScale));
}
public static function set FPS(_arg1:int):void{
OGlobal.iFPS = _arg1;
if (OGlobal.iStage){
OGlobal.iStage.frameRate = _arg1;
};
}
public static function Rescale(_arg1:Sprite, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = (((OGlobal.iStage.stageWidth / OGlobal.iStage.stageHeight))<=(800 / 600)) ? (OGlobal.iStage.stageWidth / 800) : (OGlobal.iStage.stageHeight / 600);
OGlobal.iSRect.x = 0;
OGlobal.iSRect.y = 0;
OGlobal.iSRect.width = OGlobal.iStage.stageWidth;
OGlobal.iSRect.height = OGlobal.iStage.stageHeight;
OGlobal.iVRect.width = Math.round((800 * _local3));
OGlobal.iVRect.height = Math.round((600 * _local3));
OGlobal.iVRect.x = Math.floor(((OGlobal.iStage.stageWidth - OGlobal.iVRect.width) / 2));
OGlobal.iVRect.y = Math.floor(((OGlobal.iStage.stageHeight - OGlobal.iVRect.height) / 2));
if (_arg2){
_arg1.x = OGlobal.iVRect.x;
_arg1.y = OGlobal.iVRect.y;
};
OGlobal.iScale = _local3;
}
public static function get prStage():Stage{
return (OGlobal.iStage);
}
public static function ClearScale():void{
OGlobal.iOldScale = OGlobal.iScale;
OGlobal.iScale = 1;
OGlobal.iVRect = OGlobal.iSRect.clone();
}
public static function ToGlobal(_arg1:Number):Number{
return ((_arg1 * OGlobal.iScale));
}
public static function set AppName(_arg1:String):void{
OGlobal.iAppName = ("WellGames_" + _arg1);
}
public static function get Domain():String{
return (OGlobal.iDomain);
}
public static function SetDomain():void{
var _local1:LocalConnection;
_local1 = new LocalConnection();
OGlobal.iDomain = _local1.domain;
}
public static function get StageRect():Rectangle{
return (OGlobal.iSRect);
}
public static function ScaleFloor(_arg1:Number):Number{
return ((Math.floor((_arg1 * OGlobal.iScale)) / OGlobal.iScale));
}
public static function get Scale():Number{
return (OGlobal.iScale);
}
public static function get ViewporRect():Rectangle{
return (OGlobal.iVRect);
}
public static function get AppName():String{
return (OGlobal.iAppName);
}
public static function set prStage(_arg1:Stage):void{
OGlobal.iStage = _arg1;
}
public static function RestoreScale():void{
OGlobal.iScale = OGlobal.iOldScale;
}
public static function ScaleMod(_arg1:Number):Number{
var _local2:Number;
_local2 = (_arg1 * OGlobal.iScale);
return (((_local2 - Math.floor(_local2)) / OGlobal.iScale));
}
}
}//package ENGINE.CORE
Section 5
//ORandomInt (ENGINE.CORE.ORandomInt)
package ENGINE.CORE {
import flash.utils.*;
public class ORandomInt {
private var iNextRandom:int;
public function ORandomInt(){
iNextRandom = getTimer();
}
public function RandNumber():Number{
var _local1:Number;
_local1 = Rand();
return ((_local1 / 32767));
}
public function Rand():int{
iNextRandom = ((iNextRandom * 1103515245) + 12345);
return (((iNextRandom >> 16) & 32767));
}
public function get NextRandom():int{
return (this.iNextRandom);
}
public function RandOnInterval(_arg1:Number=0, _arg2:Number=1):int{
return ((_arg1 + (Rand() % ((1 + _arg2) - _arg1))));
}
public function RandVal(_arg1:int):int{
var _local2:Number;
_local2 = Rand();
return ((_local2 % _arg1));
}
public function SeedRand(_arg1:int=0):void{
if (_arg1 == 0){
iNextRandom = getTimer();
} else {
iNextRandom = _arg1;
};
}
}
}//package ENGINE.CORE
Section 6
//OSound (ENGINE.CORE.OSound)
package ENGINE.CORE {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
public class OSound {
private static var iMusicInd:int = 0;
private static var iSoundsObjects:Array;
private static var iSounds:Dictionary = new Dictionary(true);
private static var iMusicPlayList:Array = new Array();
private static var iSoundVolume:Number = 1;
private static var iMusicChannel:SoundChannel;
private static var iMusicVolume:Number = 1;
private static var iMusic:Sound;
public static function PlaySoundInd(_arg1:int, _arg2:Number=0):Boolean{
if (OSound.iSoundVolume == 0){
return (false);
};
_arg1 = Math.max(_arg1, 0);
_arg1 = Math.min(_arg1, (OSound.iSoundsObjects.length - 1));
return (OSound.PlaySound(OSound.iSoundsObjects[_arg1], _arg2));
}
public static function set MusicVolume(_arg1:Number):void{
var _local2:SoundTransform;
OSound.iMusicVolume = _arg1;
if (OSound.iMusicChannel){
if (_arg1 == 0){
OSound.StopMusic();
} else {
_local2 = OSound.iMusicChannel.soundTransform;
_local2.volume = _arg1;
OSound.iMusicChannel.soundTransform = _local2;
};
} else {
if (OSound.iMusicVolume > 0){
OSound.PlayMusic();
};
};
}
private static function OnMusicLoadComplete(_arg1:Event):void{
if (OSound.iMusicVolume == 0){
return;
};
OSound.iMusicChannel = iMusic.play(0, 0, new SoundTransform(OSound.iMusicVolume, 0));
OSound.RemoveMusic();
OSound.iMusicChannel.addEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
}
public static function set SoundVolume(_arg1:Number):void{
OSound.iSoundVolume = _arg1;
}
private static function OnMusicLoadIOError(_arg1:Event):void{
OSound.RemoveMusic();
OSound.iMusicPlayList.splice(OSound.iMusicInd, 1);
OSound.iMusicInd = ((OSound.iMusicInd > (OSound.iMusicPlayList.length - 1))) ? (OSound.iMusicPlayList.length - 1) : OSound.iMusicInd;
OSound.PlayMusic();
}
private static function OnMusicComplete(_arg1:Event):void{
PlayMusic();
}
public static function PlaySound(_arg1:Class, _arg2:Number=0):Boolean{
var _local3:Sound;
if (OSound.iSoundVolume == 0){
return (false);
};
_local3 = OSound.iSounds[_arg1];
if (_local3 != null){
_local3.play(0, 0, new SoundTransform(OSound.iSoundVolume, _arg2));
};
return (!((_local3 == null)));
}
private static function RemoveMusic():void{
if (OSound.iMusic){
OSound.iMusic.removeEventListener(Event.COMPLETE, OSound.OnMusicLoadComplete);
OSound.iMusic.removeEventListener(IOErrorEvent.IO_ERROR, OSound.OnMusicLoadIOError);
OSound.iMusic = null;
};
}
public static function StopMusic():void{
if (OSound.iMusicChannel){
OSound.iMusicChannel.removeEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
OSound.iMusicChannel.stop();
OSound.iMusicChannel = null;
};
}
public static function get SoundVolume():Number{
return (OSound.iSoundVolume);
}
public static function PlayListClear():void{
OSound.iMusicPlayList = new Array();
}
public static function PlayListAdd(_arg1:String):void{
OSound.iMusicPlayList.push(_arg1);
OSound.iMusicInd = (OSound.iMusicPlayList.length - 1);
}
public static function PlayMusic():void{
var request:URLRequest;
if ((((OSound.iMusicVolume == 0)) || (!(OSound.iMusicPlayList.length)))){
return;
};
OSound.StopMusic();
OSound.iMusicInd = ((OSound.iMusicInd + 1) % OSound.iMusicPlayList.length);
request = new URLRequest(OSound.iMusicPlayList[OSound.iMusicInd]);
OSound.iMusic = new Sound();
OSound.iMusic.addEventListener(Event.COMPLETE, OSound.OnMusicLoadComplete);
OSound.iMusic.addEventListener(IOErrorEvent.IO_ERROR, OSound.OnMusicLoadIOError);
try {
OSound.iMusic.load(request);
} catch(e:Error) {
};
}
public static function RegisterEmbedSounds(_arg1:Array):Boolean{
var _local2:int;
var _local3:Sound;
OSound.iSoundsObjects = _arg1;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = (new (_arg1[_local2]) as Sound);
OSound.iSounds[_arg1[_local2]] = _local3;
_local2++;
};
return (true);
}
public static function PlaySoundRandom(_arg1:Number=0, _arg2:int=0, _arg3:int=-1):Boolean{
var _local4:int;
if (OSound.iSoundVolume == 0){
return (false);
};
_arg2 = Math.max(_arg2, 0);
_arg2 = Math.min(_arg2, (OSound.iSoundsObjects.length - 1));
if (_arg3 < 0){
_arg3 = (OSound.iSoundsObjects.length - 1);
};
_arg3 = Math.max(_arg3, 0);
_arg3 = Math.min(_arg3, (OSound.iSoundsObjects.length - 1));
_local4 = OUtils.Random(_arg2, _arg3);
return (OSound.PlaySound(OSound.iSoundsObjects[_local4], _arg1));
}
public static function get MusicVolume():Number{
return (OSound.iMusicVolume);
}
}
}//package ENGINE.CORE
Section 7
//OSystem (ENGINE.CORE.OSystem)
package ENGINE.CORE {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class OSystem extends Sprite {
private var iLastTime:int;
private var iCount:int;
private var iText:TextField;
private var iSTimer:String;
public static var iUserText1:String = "";
public static var iUserText:String = "";
public static var iUserText2:String = "";
public function OSystem(){
this.iText = new TextField();
this.iText.autoSize = TextFieldAutoSize.LEFT;
this.iText.mouseEnabled = false;
this.addChild(this.iText);
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.iLastTime = getTimer();
this.iSTimer = "";
}
public function OnEnterFrame(_arg1:Event):void{
var _local2:uint;
var _local3:int;
_local2 = System.totalMemory;
_local3 = (getTimer() - this.iLastTime);
this.iCount++;
if (_local3 >= 1000){
this.iSTimer = String((Math.round(((_local3 / this.iCount) * 100)) / 100));
this.iLastTime = getTimer();
this.iCount = 0;
};
iText.text = ((((((((((_local2.toString() + " ") + this.iSTimer) + " ") + OGlobal.prStage.frameRate) + " | ") + OSystem.iUserText) + " ") + OSystem.iUserText1) + " ") + OSystem.iUserText2);
}
}
}//package ENGINE.CORE
Section 8
//OUtils (ENGINE.CORE.OUtils)
package ENGINE.CORE {
import ENGINE.DISPLAY.*;
import flash.geom.*;
public class OUtils {
public static function AddZero(_arg1:String, _arg2:int):String{
var _local3:String;
var _local4:int;
_local3 = "";
_local4 = _arg1.length;
while (_local4 < _arg2) {
_local3 = (_local3 + "0");
_local4++;
};
_local3 = (_local3 + _arg1);
return (_local3);
}
public static function Random(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * Math.random())));
}
public static function StringToTarget(_arg1:Class, _arg2:int, _arg3:String, _arg4:String, _arg5:int):String{
var _local6:Number;
var _local7:Rectangle;
var _local8:String;
var _local9:String;
var _local10:int;
_local6 = Math.round((1 + (_arg2 / 70)));
_local8 = ((_arg4)==null) ? "" : ((" (" + _arg4) + ")");
_local9 = (_arg3 + _local8);
_local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9);
if (_local7.width <= _arg5){
return (_local9);
};
_local8 = ("..." + _local8);
_local10 = (_arg3.length - 1);
while (_local10 > 0) {
_local9 = (_arg3.substr(0, _local10) + _local8);
_local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9);
if (_local7.width <= _arg5){
return (_local9);
};
_local10--;
};
return ((_arg3.substr(0, 1) + _local8));
}
public static function ClearString(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:int;
_local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ";
_local3 = "";
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local2.indexOf(_arg1.charAt(_local4)) > -1){
_local3 = (_local3 + _arg1.charAt(_local4));
};
_local4++;
};
return (_local3);
}
}
}//package ENGINE.CORE
Section 9
//OEffect (ENGINE.DISPLAY.EFFECTS.OEffect)
package ENGINE.DISPLAY.EFFECTS {
import ENGINE.DISPLAY.*;
import ENGINE.CORE.*;
import flash.filters.*;
public class OEffect {
protected var iColors:OCache;
protected var iFilters:OCache;
public function OEffect(){
this.iColors = new OCache();
this.iFilters = new OCache();
}
public function RegisterColor(_arg1:String, _arg2):void{
this.iColors.SetItem(_arg1, _arg2);
}
public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{
}
public function RegisterFilter(_arg1:String, _arg2):void{
this.iFilters.SetItem(_arg1, _arg2);
}
public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{
return (null);
}
public static function MakeBevelFilter(_arg1:Array):BevelFilter{
return (new BevelFilter(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[11], _arg1[12]));
}
}
}//package ENGINE.DISPLAY.EFFECTS
Section 10
//OEffects (ENGINE.DISPLAY.EFFECTS.OEffects)
package ENGINE.DISPLAY.EFFECTS {
import ENGINE.DISPLAY.*;
import ENGINE.CORE.*;
public class OEffects {
private static var iEffects:OCache = new OCache();
public static function RegisterColor(_arg1:String, _arg2:String, _arg3):void{
var _local4:OEffect;
_local4 = iEffects.GetItem(_arg1);
if (_local4 == null){
return;
};
_local4.RegisterColor(_arg2, _arg3);
}
public static function RegisterEffect(_arg1:String, _arg2:OEffect):void{
iEffects.SetItem(_arg1, _arg2);
}
public static function Make(_arg1:Array):OBM{
var _local2:OEffect;
_local2 = iEffects.GetItem(_arg1[3]);
if (_local2 == null){
return (null);
};
_local2.Init(_arg1[4], _arg1[5], _arg1[6]);
return (_local2.Apply(_arg1[1], _arg1[2], _arg1[7], _arg1[8]));
}
public static function GetEffect(_arg1:String):OEffect{
return (iEffects.GetItem(_arg1));
}
public static function RegisterFilter(_arg1:String, _arg2:String, _arg3):void{
var _local4:OEffect;
_local4 = iEffects.GetItem(_arg1);
if (_local4 == null){
return;
};
_local4.RegisterFilter(_arg2, _arg3);
}
public static function Apply(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBM{
var _local9:OEffect;
_local9 = iEffects.GetItem(_arg3);
if (_local9 == null){
return (null);
};
_local9.Init(_arg4, _arg5, _arg6);
return (_local9.Apply([ODisplay.SpriteLib, _arg1], _arg2, _arg7, _arg8));
}
}
}//package ENGINE.DISPLAY.EFFECTS
Section 11
//IDisplayObject (ENGINE.DISPLAY.IDisplayObject)
package ENGINE.DISPLAY {
public interface IDisplayObject {
function set prVisible(_arg1:Boolean):void;
function get prWidth():Number;
function get prHeight():Number;
function set prX(_arg1:Number):void;
function set prY(_arg1:Number):void;
function get prVisible():Boolean;
function Move(_arg1:Number, _arg2:Number):void;
function Pos(_arg1:Number, _arg2:Number):void;
function get prX():Number;
function get prY():Number;
}
}//package ENGINE.DISPLAY
Section 12
//OBitmap (ENGINE.DISPLAY.OBitmap)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.DISPLAY.EFFECTS.*;
import flash.text.*;
import ENGINE.CORE.*;
public class OBitmap extends Bitmap implements IDisplayObject {
protected var iY:Number;// = 0
protected var iX:Number;// = 0
protected var iOBM:OBM;// = null
public function OBitmap(_arg1:OBM=null, _arg2:Number=0, _arg3:Number=0){
iX = 0;
iY = 0;
iOBM = null;
super();
this.iX = _arg2;
this.iY = _arg3;
Init(_arg1);
}
public function get prVisible():Boolean{
return (this.visible);
}
public function set prX(_arg1:Number):void{
this.iX = _arg1;
Pos(this.iX, this.iY);
}
public function Clear():void{
this.Init(null);
}
public function set prOBM(_arg1:OBM):void{
this.Init(_arg1);
}
public function Pos(_arg1:Number, _arg2:Number):void{
this.iX = _arg1;
this.iY = _arg2;
if (this.iOBM){
this.x = ((this.iX * OGlobal.Scale) + this.iOBM.iX);
this.y = ((this.iY * OGlobal.Scale) + this.iOBM.iY);
} else {
this.x = (this.iX * OGlobal.Scale);
this.y = (this.iY * OGlobal.Scale);
};
}
public function set prY(_arg1:Number):void{
this.iY = _arg1;
Pos(this.iX, this.iY);
}
public function Init(_arg1:OBM):void{
this.iOBM = _arg1;
this.bitmapData = (_arg1) ? _arg1.iBM : null;
this.Pos(this.iX, this.iY);
}
public function set prVisible(_arg1:Boolean):void{
this.visible = _arg1;
}
public function Clone():OBitmap{
return (new OBitmap(this.iOBM.Clone(), this.iX, this.iY));
}
public function get prX():Number{
return (this.iX);
}
public function get prY():Number{
return (this.iY);
}
public function get prOBM():OBM{
return (this.iOBM);
}
public function get prHeight():Number{
return ((this.iOBM) ? (this.iOBM.iHeight / OGlobal.Scale) : 0);
}
public function get prWidth():Number{
return ((this.iOBM) ? (this.iOBM.iWidth / OGlobal.Scale) : 0);
}
public function CopyFrom(_arg1:OBitmap):void{
this.iX = _arg1.iX;
this.iY = _arg1.iY;
this.Init(_arg1.iOBM);
}
public function Move(_arg1:Number, _arg2:Number):void{
Pos((this.iX + _arg1), (this.iY + _arg2));
}
public static function MakeEffectFromListP(_arg1:Array):OBitmap{
var _local2:Sprite;
var _local3:Sprite;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
_local3 = (_local2.getChildAt(_arg1[2]) as Sprite);
return (OBitmap.MakeEffect(_local3, _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _local3.x, _local3.y));
}
public static function MakeEffectP(_arg1:Array):OBitmap{
return (OBitmap.MakeEffect(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8]));
}
public static function MakeEffectTextInRectP(_arg1:Array):OBitmap{
var _local2:Sprite;
var _local3:Rectangle;
var _local4:Number;
var _local5:Number;
var _local6:TextField;
var _local7:TextFormat;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if ((_local2.getChildAt(0) is TextField)){
_local6 = (_local2.getChildAt(0) as TextField);
_local6.autoSize = TextFieldAutoSize.LEFT;
_local6.text = _arg1[4];
_local7 = _local6.defaultTextFormat;
_local7.size = _arg1[2];
_local7.letterSpacing = _arg1[3];
_local6.setTextFormat(_local7);
} else {
return (null);
};
_local3 = _local2.getBounds(_local2);
_local4 = ((_arg1[9] - _local3.width) / 2);
_local5 = ((_arg1[10] - _local3.height) / 2);
return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], (_arg1[11] + _local4), (_arg1[12] + _local5)));
}
public static function MakeEffectTextP(_arg1:Array):OBitmap{
var _local2:Sprite;
var _local3:TextField;
var _local4:TextFormat;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if ((_local2.getChildAt(0) is TextField)){
_local3 = (_local2.getChildAt(0) as TextField);
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.text = _arg1[4];
_local4 = _local3.defaultTextFormat;
_local4.size = _arg1[2];
_local4.letterSpacing = _arg1[3];
_local3.setTextFormat(_local4);
} else {
return (null);
};
return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]));
}
public static function MakeRoundRectBorderEffectP(_arg1:Array):OBitmap{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
_local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4]));
return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]));
}
public static function MakeEffectInRectP(_arg1:Array):OBitmap{
var _local2:Number;
var _local3:Sprite;
var _local4:Rectangle;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = Math.min(_arg1[7], _arg1[8]);
_local3 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
_local4 = _local3.getBounds(_local3);
_local5 = Math.max(_local4.width, _local4.height);
_local6 = ((_local2 / _local5) * _arg1[2]);
_local7 = ((_arg1[7] - (_local4.width * _local6)) / 2);
_local8 = ((_arg1[8] - (_local4.height * _local6)) / 2);
return (OBitmap.MakeEffect(_local3, _local6, _arg1[3], _arg1[4], _arg1[5], _arg1[6], (_arg1[9] + _local7), (_arg1[10] + _local8)));
}
public static function MakeTmp(_arg1, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):OBitmap{
var _local6:OBM;
_local6 = OBM.Make([null, [ODisplay.SpriteLib, _arg1], _arg2, _arg3, _arg4, _arg5]);
return (new OBitmap(_local6, _arg3, _arg4));
}
public static function MakeP(_arg1:Array):OBitmap{
return (OBitmap.MakeTmp(_arg1[1], _arg1[2], _arg1[3], _arg1[4]));
}
public static function MakeRoundRectEffectP(_arg1:Array):OBitmap{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
return (OBitmap.MakeEffect(_local2, 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]));
}
public static function Make(_arg1:Array):OBitmap{
return (new OBitmap(_arg1[1][0](_arg1[1]), _arg1[2], _arg1[3]));
}
public static function MakeEffect(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBitmap{
var _local9:OBM;
_local9 = OEffects.Apply(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
return (new OBitmap(_local9, _arg7, _arg8));
}
}
}//package ENGINE.DISPLAY
Section 13
//OBM (ENGINE.DISPLAY.OBM)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBM {
public var iX:Number;
public var iHeight:Number;
public var iBM:BitmapData;
public var iY:Number;
public var iWidth:Number;
public function OBM(_arg1:BitmapData=null, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){
this.iBM = _arg1;
this.iX = _arg2;
this.iY = _arg3;
this.iWidth = _arg4;
this.iHeight = _arg5;
}
public function Clone():OBM{
var _local1:BitmapData;
_local1 = this.iBM.clone();
return (new OBM(_local1, this.iX, this.iY, this.iWidth, this.iHeight));
}
public static function MakeFill(_arg1:Array):OBM{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Rectangle;
var _local8:Sprite;
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:BitmapData;
var _local14:Matrix;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local4 = (OGlobal.Scale * _arg1[2]);
_local5 = OGlobal.ToGlobal(_arg1[4]);
_local6 = OGlobal.ToGlobal(_arg1[5]);
_local3.scaleX = _local4;
_local3.scaleY = _local4;
_local3.x = (_local3.x * OGlobal.Scale);
_local3.y = (_local3.y * OGlobal.Scale);
_local3.x = (_local3.x + _local5);
_local3.y = (_local3.y + _local6);
_local2.addChild(_local3);
_local7 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
_local8 = new Sprite();
_local8.graphics.beginBitmapFill(_arg1[3]);
_local8.graphics.drawRect((_local7.x - 1), (_local7.y - 1), (_local7.width + 2), (_local7.height + 2));
_local8.graphics.endFill();
_local8.mask = _local3;
_local2.addChild(_local8);
_local9 = ((_local7.width + 4) + (_arg1[6] * 2));
_local10 = ((_local7.height + 4) + (_arg1[6] * 2));
_local11 = Math.floor(_local7.x);
_local12 = Math.floor(_local7.y);
_local13 = new BitmapData(_local9, _local10, true, 0);
_local14 = new Matrix(1, 0, 0, 1, ((-(_local11) + 1) + _arg1[6]), ((-(_local12) + 1) + _arg1[6]));
_local13.draw(_local2, _local14);
return (new OBM(_local13, (((_local11 - _local5) - 1) - _arg1[6]), (((_local12 - _local6) - 1) - _arg1[6]), _local7.width, _local7.height));
}
public static function Make(_arg1:Array):OBM{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Rectangle;
var _local8:int;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:BitmapData;
var _local13:Matrix;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local4 = (OGlobal.Scale * _arg1[2]);
_local5 = OGlobal.ToGlobal(_arg1[3]);
_local6 = OGlobal.ToGlobal(_arg1[4]);
_local3.scaleX = _local4;
_local3.scaleY = _local4;
_local3.x = (_local3.x * OGlobal.Scale);
_local3.y = (_local3.y * OGlobal.Scale);
_local3.x = (_local3.x + _local5);
_local3.y = (_local3.y + _local6);
_local2.addChild(_local3);
_local7 = _local3.getBounds(_local2);
_local8 = ((_local7.width + 4) + (_arg1[5] * 2));
_local9 = ((_local7.height + 4) + (_arg1[5] * 2));
_local10 = Math.floor(_local7.x);
_local11 = Math.floor(_local7.y);
_local12 = new BitmapData(_local8, _local9, true, 0);
_local13 = new Matrix(1, 0, 0, 1, ((-(_local10) + 1) + _arg1[5]), ((-(_local11) + 1) + _arg1[5]));
_local12.draw(_local2, _local13);
return (new OBM(_local12, (((_local10 - _local5) - 1) - _arg1[5]), (((_local11 - _local6) - 1) - _arg1[5]), _local7.width, _local7.height));
}
}
}//package ENGINE.DISPLAY
Section 14
//ODisplay (ENGINE.DISPLAY.ODisplay)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.DISPLAY.EFFECTS.*;
import flash.text.*;
import ENGINE.CORE.*;
public class ODisplay {
public static function SpriteErase(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Sprite;
var _local5:Sprite;
_local2 = new Sprite();
_local3 = new Sprite();
_local3.blendMode = BlendMode.LAYER;
_local4 = _arg1[1][0](_arg1[1]);
_local5 = _arg1[2][0](_arg1[2]);
_local5.blendMode = BlendMode.ERASE;
_local3.addChild(_local4);
_local3.addChild(_local5);
_local2.addChild(_local3);
return (_local2);
}
public static function HSBToRGB(_arg1:Number, _arg2:Number, _arg3:Number):uint{
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:int;
var _local11:int;
var _local12:int;
_arg1 = (_arg1 % 360);
if (_arg2 > 1){
_arg2 = 1;
};
if (_arg3 > 1){
_arg3 = 1;
};
if (_arg2 == 0){
_local4 = (_arg3 * 0xFF);
return ((((_local4 << 16) | (_local4 << 8)) | _local4));
};
if (_arg1 == 360){
_arg1 = 0;
} else {
_arg1 = (_arg1 / 60);
};
_local5 = Math.floor(_arg1);
_local6 = (_arg1 - _local5);
_local7 = (_arg3 * (1 - _arg2));
_local8 = (_arg3 * (1 - (_arg2 * _local6)));
_local9 = (_arg3 * (1 - (_arg2 * (1 - _local6))));
switch (_local5){
case 0:
_local10 = (_arg3 * 0xFF);
_local11 = (_local9 * 0xFF);
_local12 = (_local7 * 0xFF);
break;
case 1:
_local10 = (_local8 * 0xFF);
_local11 = (_arg3 * 0xFF);
_local12 = (_local7 * 0xFF);
break;
case 2:
_local10 = (_local7 * 0xFF);
_local11 = (_arg3 * 0xFF);
_local12 = (_local9 * 0xFF);
break;
case 3:
_local10 = (_local7 * 0xFF);
_local11 = (_local8 * 0xFF);
_local12 = (_arg3 * 0xFF);
break;
case 4:
_local10 = (_local9 * 0xFF);
_local11 = (_local7 * 0xFF);
_local12 = (_arg3 * 0xFF);
break;
case 5:
_local10 = (_arg3 * 0xFF);
_local11 = (_local7 * 0xFF);
_local12 = (_local8 * 0xFF);
break;
};
return ((((_local10 << 16) | (_local11 << 8)) | _local12));
}
public static function OBitmapXBorderSprite(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[15], _arg1[16]], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[9]], _arg1[10], _arg1[1], _arg1[2]], _arg1[9], _arg1[11], _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[16]]]]));
}
public static function OBitmapAngleFrameSprite(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]]));
}
public static function OBitmapXBorder(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function OBitmapAngleFrameText(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]]));
}
public static function OBitmapRoundFrameText(_arg1:Array):OBitmap{
if (_arg1[4]){
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]]));
};
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]]));
}
public static function SpriteFillRect(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Rectangle;
var _local5:Number;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local2.addChild(_local3);
_local4 = _local3.getBounds(_local2);
_local5 = (Math.max(_arg1[2], _arg1[3]) / Math.max(_local4.width, _local4.height));
_local3.scaleX = _local5;
_local3.scaleY = _local5;
_local4 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
_local3.x = (_local3.x + ((_arg1[2] - _local4.width) / 2));
_local3.y = (_local3.y + ((_arg1[3] - _local4.height) / 2));
return (_local3);
}
public static function TextRect(_arg1, _arg2:Number, _arg3:Number, _arg4:String):Rectangle{
var _local5:Sprite;
var _local6:TextField;
var _local7:TextFormat;
_local5 = ((_arg1 is Sprite)) ? (_arg1 as Sprite) : new ((_arg1 as Class));
if ((_local5.getChildAt(0) is TextField)){
_local6 = (_local5.getChildAt(0) as TextField);
_local6.autoSize = TextFieldAutoSize.LEFT;
_local6.text = _arg4;
_local7 = _local6.defaultTextFormat;
_local7.size = _arg2;
_local7.letterSpacing = _arg3;
_local6.setTextFormat(_local7);
} else {
return (null);
};
return (_local5.getBounds(_local5));
}
public static function OBitmapXBorderText(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[17], _arg1[18]], [null, [ODisplay.SpriteTextInRect, _arg1[9], _arg1[10], _arg1[11], _arg1[12], _arg1[1], _arg1[2]], 1, _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18]]]]));
}
public static function OBitmapRoundRect(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]]));
}
public static function OBitmapAngleFrame(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]]));
}
public static function HSBAToRGBA(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):uint{
var _local5:uint;
var _local6:uint;
_local5 = HSBToRGB(_arg1, _arg2, _arg3);
_local6 = (0xFF * _arg4);
_local6 = (_local6 << 24);
return ((_local5 + _local6));
}
public static function OBitmapTextAlign(_arg1:Array):OBitmap{
return (OBitmapMake([null, [ODisplay.SpriteTextAlign, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[11], _arg1[12]], 1, _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[13], _arg1[14]]));
}
public static function OBitmapList(_arg1:Array):OBitmap{
var _local2:OBM;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:OBM;
var _local7:Matrix;
_local2 = OEffects.Make(_arg1[1][0]);
_local3 = (_local2.iX + (_arg1[1][0][7] * OGlobal.Scale));
_local4 = (_local2.iY + (_arg1[1][0][8] * OGlobal.Scale));
_local5 = 1;
while (_local5 < _arg1[1].length) {
_local6 = OEffects.Make(_arg1[1][_local5]);
_local7 = new Matrix(1, 0, 0, 1, (((_arg1[1][_local5][7] * OGlobal.Scale) + _local6.iX) - _local3), (((_arg1[1][_local5][8] * OGlobal.Scale) + _local6.iY) - _local4));
_local2.iBM.draw(_local6.iBM, _local7);
_local5++;
};
return (new OBitmap(_local2, _arg1[1][0][7], _arg1[1][0][8]));
}
public static function SpriteLibList(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if (_arg1[2] >= _local2.numChildren){
return (null);
};
return ((_local2.getChildAt(_arg1[2]) as Sprite));
}
public static function SpriteXBorder(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.lineStyle(_arg1[4]);
_local2.graphics.moveTo(0, _arg1[3]);
_local2.graphics.lineTo(_arg1[1], _arg1[3]);
_local2.graphics.moveTo(0, (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3]));
_local2.graphics.moveTo(_arg1[3], 0);
_local2.graphics.lineTo(_arg1[3], _arg1[2]);
_local2.graphics.moveTo((_arg1[1] - _arg1[3]), 0);
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]);
return (_local2);
}
public static function SpriteLib(_arg1:Array):Sprite{
return (((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)));
}
public static function OBitmapAngleBorder(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function OBitmapRoundBorder(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function SpriteScale(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = _arg1[1][0](_arg1[1]);
_local2.scaleX = _arg1[2];
_local2.scaleY = _arg1[2];
return (_local2);
}
public static function IDisplayObjectMake(_arg1:Array){
var _local2:IDisplayObject;
_local2 = _arg1[1][0](_arg1[1]);
_local2.Pos(_arg1[2], _arg1[3]);
return (_local2);
}
public static function SpriteAlign(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Rectangle;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local3.scaleX = _arg1[2];
_local3.scaleY = _arg1[2];
_local2.addChild(_local3);
_local4 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
switch (_arg1[3]){
case 1:
_local3.x = (_local3.x + ((_arg1[5] - _local4.width) / 2));
break;
case 2:
_local3.x = (_local3.x + (_arg1[5] - _local4.width));
break;
};
switch (_arg1[4]){
case 1:
_local3.y = (_local3.y + ((_arg1[6] - _local4.height) / 2));
break;
case 2:
_local3.y = (_local3.y + (_arg1[6] - _local4.height));
break;
};
return (_local3);
}
public static function OBitmapAngleRect(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteAngleRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]]));
}
public static function SpriteRect(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRect(0, 0, _arg1[1], _arg1[2]);
return (_local2);
}
public static function OBitmapSpriteFillRect(_arg1:Array):OBitmap{
var _local2:Sprite;
_local2 = ODisplay.SpriteFillRect([null, _arg1[3], _arg1[1], _arg1[2]]);
return (OBitmapMake([null, [ODisplay.SpriteFillRect, _arg1[3], _arg1[1], _arg1[2]], _local2.scaleX, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]]));
}
public static function OBitmapText(_arg1:Array):OBitmap{
return (OBitmapMake([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function OBitmapMake(_arg1:Array):OBitmap{
return (new OBitmap(OEffects.Make(_arg1), _arg1[7], _arg1[8]));
}
public static function SpriteRoundRect(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
return (_local2);
}
public static function SpriteInRect(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Rectangle;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local3.scaleX = _arg1[2];
_local3.scaleY = _arg1[2];
_local2.addChild(_local3);
_local4 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
_local3.x = (_local3.x + ((_arg1[3] - _local4.width) / 2));
_local3.y = (_local3.y + ((_arg1[4] - _local4.height) / 2));
return (_local3);
}
public static function SpriteScaleRotate(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Number;
var _local4:Number;
var _local5:Matrix;
var _local6:Matrix;
var _local7:Sprite;
_local2 = _arg1[1][0](_arg1[1]);
_local3 = (_arg1[4] * _arg1[2]);
_local4 = (_arg1[5] * _arg1[2]);
_local5 = new Matrix();
_local5.scale(_arg1[2], _arg1[2]);
_local5.translate(-(_local3), -(_local4));
_local5.rotate(((Math.PI / 180) * _arg1[3]));
_local6 = new Matrix();
_local6.translate(_local3, _local4);
_local5.concat(_local6);
_local7 = new Sprite();
_local7.addChild(_local2);
_local2.transform.matrix = _local5;
return (_local7);
}
public static function OBitmapRoundFrameSprite(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]]));
}
public static function SpriteText(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:TextField;
var _local4:TextFormat;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if ((_local2.getChildAt(0) is TextField)){
_local3 = (_local2.getChildAt(0) as TextField);
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.text = _arg1[4];
_local4 = _local3.defaultTextFormat;
_local4.size = _arg1[2];
_local4.letterSpacing = _arg1[3];
_local3.setTextFormat(_local4);
} else {
return (null);
};
return (_local2);
}
public static function SpriteTextAlign(_arg1:Array):Sprite{
return (ODisplay.SpriteAlign([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8]]));
}
public static function OBitmapTextInRect(_arg1:Array):OBitmap{
return (OBitmapMake([null, [ODisplay.SpriteTextInRect, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[9], _arg1[10]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[11], _arg1[12]]));
}
public static function SpriteRoundBorder(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
_local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4]));
return (_local2);
}
public static function SpriteAngleRect(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.moveTo(_arg1[3], 0);
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0);
_local2.graphics.lineTo(_arg1[1], _arg1[3]);
_local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]);
_local2.graphics.lineTo(_arg1[3], _arg1[2]);
_local2.graphics.lineTo(0, (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo(0, _arg1[3]);
_local2.graphics.endFill();
return (_local2);
}
public static function SpriteAngleBorder(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.moveTo(_arg1[3], 0);
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0);
_local2.graphics.lineTo(_arg1[1], _arg1[3]);
_local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]);
_local2.graphics.lineTo(_arg1[3], _arg1[2]);
_local2.graphics.lineTo(0, (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo(0, _arg1[3]);
_local3 = (_arg1[1] - (_arg1[4] * 2));
_local4 = (_arg1[2] - (_arg1[4] * 2));
_local5 = ((_arg1[3] * _local3) / _arg1[1]);
_local2.graphics.moveTo((_arg1[4] + _local5), (_arg1[4] + 0));
_local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + 0));
_local2.graphics.lineTo((_arg1[4] + _local3), (_arg1[4] + _local5));
_local2.graphics.lineTo((_arg1[4] + _local3), ((_arg1[4] + _local4) - _local5));
_local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + _local4));
_local2.graphics.lineTo((_arg1[4] + _local5), (_arg1[4] + _local4));
_local2.graphics.lineTo((_arg1[4] + 0), ((_arg1[4] + _local4) - _local5));
_local2.graphics.lineTo((_arg1[4] + 0), (_arg1[4] + _local5));
return (_local2);
}
public static function SpriteTextInRect(_arg1:Array):Sprite{
return (ODisplay.SpriteInRect([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6]]));
}
public static function OBitmapRoundFrame(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]]));
}
}
}//package ENGINE.DISPLAY
Section 15
//OSprite (ENGINE.DISPLAY.OSprite)
package ENGINE.DISPLAY {
import flash.display.*;
import ENGINE.CORE.*;
public class OSprite extends Sprite implements IDisplayObject {
private var iY:Number;// = 0
private var iX:Number;// = 0
public function OSprite(){
iX = 0;
iY = 0;
super();
}
public function get prVisible():Boolean{
return (this.visible);
}
public function set prX(_arg1:Number):void{
this.iX = _arg1;
this.x = (_arg1 * OGlobal.Scale);
}
public function set prY(_arg1:Number):void{
this.iY = _arg1;
this.y = (_arg1 * OGlobal.Scale);
}
public function Pos(_arg1:Number, _arg2:Number):void{
this.iX = _arg1;
this.iY = _arg2;
this.x = (this.iX * OGlobal.Scale);
this.y = (this.iY * OGlobal.Scale);
}
public function set prVisible(_arg1:Boolean):void{
this.visible = _arg1;
}
public function lineStyle(_arg1:Number, _arg2:uint=0, _arg3:Number=1, _arg4:Boolean=false, _arg5:String="normal", _arg6:String=null, _arg7:String=null, _arg8:Number=3):void{
this.graphics.lineStyle((_arg1 * OGlobal.Scale), _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, (_arg8 * OGlobal.Scale));
}
public function drawCircle(_arg1:Number, _arg2:Number, _arg3:Number):void{
this.graphics.drawCircle((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale), (_arg3 * OGlobal.Scale));
}
public function moveTo(_arg1:Number, _arg2:Number):void{
this.graphics.moveTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale));
}
public function get prX():Number{
return (this.iX);
}
public function get prY():Number{
return (this.iY);
}
public function Free():void{
var _local1:DisplayObject;
while (this.numChildren) {
_local1 = this.getChildAt(0);
if ((_local1 is OSprite)){
(_local1 as OSprite).Free();
};
this.removeChildAt(0);
};
}
public function lineTo(_arg1:Number, _arg2:Number):void{
this.graphics.lineTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale));
}
public function get prHeight():Number{
return ((this.height / OGlobal.Scale));
}
public function get prWidth():Number{
return ((this.width / OGlobal.Scale));
}
public function Move(_arg1:Number, _arg2:Number):void{
Pos((this.iX + _arg1), (this.iY + _arg2));
}
public static function Make(_arg1:Array):OSprite{
var _local2:OSprite;
var _local3:int;
var _local4:int;
_local2 = new (OSprite);
_local3 = _arg1[1].length;
_local4 = 0;
while (_local4 < _local3) {
_local2.addChild(_arg1[1][_local4][0](_arg1[1][_local4]));
_local4++;
};
_local2.Pos(_arg1[2], _arg1[3]);
return (_local2);
}
}
}//package ENGINE.DISPLAY
Section 16
//OGame (ENGINE.GAME.OGame)
package ENGINE.GAME {
import ENGINE.CORE.*;
import flash.utils.*;
import flash.net.*;
public class OGame {
protected var iSTableSize:int;
protected var iCache:OCache;
protected var iPlayer:OPlayer;
protected var iRNDFactor:int;
protected var iModes:int;
protected var iScores:OScoresTable;
public static const catGlobal:String = "Global";
public static const catTmp:String = "Tmp";
protected static const strgMusicVolume:String = "Music Volume";
protected static const strgResX:String = "ResX";
protected static const strgResY:String = "ResY";
protected static const strgСurPlayer:String = "Current Player";
protected static const strgFullScreen:String = "Full Screen";
protected static const strgSoundVolume:String = "Sound Volume";
protected static const strgLocalScores:String = "Local Scores";
public static const catPlayers:String = "Players";
public function OGame(_arg1:int=1, _arg2:int=10, _arg3:int=10){
var _local4:String;
super();
this.iModes = _arg1;
this.iSTableSize = _arg2;
registerClassAlias("OCacheClass", OCache);
registerClassAlias("OGameParamsClass", OGameParams);
registerClassAlias("OScoreParamsClass", OScoreParams);
registerClassAlias("OScoresTableClass", OScoresTable);
registerClassAlias("OPlayerClass", OPlayer);
this.LoadCache();
_local4 = this.iCache.GetCategoryItem(catGlobal, strgСurPlayer);
if (_local4){
this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local4);
this.iScores = this.iCache.GetCategoryItem(catGlobal, strgLocalScores);
this.InitAfterLoadCache();
} else {
this.iScores = new OScoresTable(_arg1, this.iSTableSize);
this.DefaultInitLocalScores();
this.iCache.SetCategoryItem(catGlobal, strgLocalScores, this.iScores);
this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, 1);
this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, 1);
this.iCache.SetCategoryItem(catGlobal, strgResX, OGlobal.StageRect.width);
this.iCache.SetCategoryItem(catGlobal, strgResY, OGlobal.StageRect.height);
this.iCache.SetCategoryItem(catGlobal, strgFullScreen, false);
};
OSound.SoundVolume = this.prSoundVolume;
OSound.MusicVolume = this.prMusicVolume;
}
public function set prFullScreen(_arg1:Boolean):void{
this.iCache.SetCategoryItem(catGlobal, strgFullScreen, _arg1);
}
public function set prMode(_arg1:int):void{
this.iPlayer.iMode = _arg1;
}
public function get prGamesStartCount():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart);
}
public function get prLevelScore():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore);
}
public function set prPassword(_arg1:String):void{
this.iPlayer.iPassword = _arg1;
}
public function DeletePlayer(_arg1:String):String{
var _local2:String;
var _local3:Array;
_local2 = (this.iPlayer) ? this.iPlayer.iName : "";
this.iCache.DeleteCategoryItem(catPlayers, _arg1);
if (_arg1 == _local2){
_local3 = this.iCache.GetCategoryNames(catPlayers);
if (!_local3){
this.iPlayer = null;
return (null);
};
this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local3[0]);
this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _local3[0]);
};
return ((this.iPlayer) ? this.iPlayer.iName : null);
}
public function get prPlayerNames():Array{
return (this.iCache.GetCategoryNames(catPlayers));
}
public function ClearPersonalScores(_arg1:int):void{
this.iPlayer.iScoreTable.Clear(_arg1);
}
public function GetPersonalRecord(_arg1:int):int{
return (this.iPlayer.iScoreTable.GetRecord(_arg1));
}
public function InitAfterLoadCache():void{
}
public function AddScore(_arg1:int):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iScore = (this.iPlayer.iGParams[this.iPlayer.iMode].iScore + _arg1);
}
public function get prPlayersData(){
var _local1:OCache;
var _local2:ByteArray;
_local1 = this.iCache.GetItem(catPlayers);
_local2 = _local1.Pack();
_local2.uncompress();
_local1 = _local2.readObject();
return (_local1);
}
public function IsPersonalRecord(_arg1:int, _arg2:int):Boolean{
return (this.iPlayer.iScoreTable.IsRecord(_arg1, _arg2));
}
public function LoadCache():void{
var so:SharedObject;
var a:ByteArray;
so = SharedObject.getLocal(OGlobal.AppName);
if (so.data.iData == undefined){
this.iCache = new OCache();
} else {
try {
a = so.data.iData;
a.uncompress();
this.iCache = a.readObject();
} catch(error:Error) {
this.iCache = new OCache();
};
};
so.close();
}
public function NewGame():void{
this.iPlayer.iGParams[this.iPlayer.iMode].iLevel = 0;
this.iPlayer.iGParams[this.iPlayer.iMode].iScore = 0;
this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = 0;
this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = null;
this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++;
}
public function get prLevel():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevel);
}
public function get prSoundVolume():Number{
return (this.iCache.GetCategoryItem(catGlobal, strgSoundVolume));
}
public function get prPlayerName():String{
return ((this.iPlayer) ? this.iPlayer.iName : "");
}
public function get prScore():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iScore);
}
public function NextLevel():Boolean{
this.iPlayer.iGParams[this.iPlayer.iMode].iLevel++;
return (true);
}
public function set prPlayersData(_arg1):void{
this.iCache.SetItem(catPlayers, _arg1);
}
public function Read(_arg1:String, _arg2:String){
return (this.iCache.GetCategoryItem(_arg1, _arg2));
}
public function get prSavedGame():String{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame);
}
public function set prResX(_arg1:int):void{
this.iCache.SetCategoryItem(catGlobal, strgResX, _arg1);
}
public function get prRNDFactor():int{
return (this.iPlayer.iRNDFactor);
}
public function get prMusicVolume():Number{
return (this.iCache.GetCategoryItem(catGlobal, strgMusicVolume));
}
public function Write(_arg1:String, _arg2:String, _arg3):void{
this.iCache.SetCategoryItem(_arg1, _arg2, _arg3);
}
public function Start():void{
this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++;
}
public function get prPassword():String{
return ((this.iPlayer.iPassword) ? this.iPlayer.iPassword : "");
}
public function get prMode():int{
return (this.iPlayer.iMode);
}
public function End():void{
this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd++;
}
public function set prSoundVolume(_arg1:Number):void{
OSound.SoundVolume = _arg1;
this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, _arg1);
}
public function SetLevelScore(_arg1:int):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = _arg1;
}
public function GetLocalScores(_arg1:int, _arg2:int):OScoreParams{
return (this.iScores.GetScore(_arg1, _arg2));
}
public function GetPersonalScores(_arg1:int, _arg2:int):OScoreParams{
return (this.iPlayer.iScoreTable.GetScore(_arg1, _arg2));
}
public function AddScoreInTable(_arg1:int):Boolean{
var _local2:Boolean;
_local2 = false;
if (this.iScores.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel)){
this.iCache.SetCategoryItem(OGame.catGlobal, OGame.strgLocalScores, this.iScores);
_local2 = true;
};
if (this.iPlayer.iScoreTable.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel, true)){
this.iCache.SetCategoryItem(OGame.catPlayers, this.prPlayerName, this.iPlayer);
_local2 = true;
};
return (_local2);
}
public function get prResX():int{
return (this.iCache.GetCategoryItem(catGlobal, strgResX));
}
public function get prResY():int{
return (this.iCache.GetCategoryItem(catGlobal, strgResY));
}
public function set prPlayerName(_arg1:String):void{
var _local2:OPlayer;
_local2 = this.iCache.GetCategoryItem(catPlayers, _arg1);
if (!_local2){
_local2 = new OPlayer(_arg1, "", this.iModes, this.iSTableSize);
this.iCache.SetCategoryItem(catPlayers, _arg1, _local2);
};
this.iPlayer = _local2;
this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _arg1);
}
public function DefaultInitLocalScores():void{
this.iScores.Clear(0);
this.iScores.AddScore("Emily", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Michael", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Jacob", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Isabella", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Madison", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.SortOn(0);
}
public function SaveCache():Boolean{
var _local1:SharedObject;
var _local2:String;
_local1 = SharedObject.getLocal(OGlobal.AppName);
_local1.data.iData = this.iCache.Pack();
_local2 = _local1.flush();
_local1.close();
return ((_local2 == SharedObjectFlushStatus.FLUSHED));
}
public function set prResY(_arg1:int):void{
this.iCache.SetCategoryItem(catGlobal, strgResY, _arg1);
}
public function SetSaveGame(_arg1:String):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = _arg1;
}
public function get prGamesEndCount():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd);
}
public function set prMusicVolume(_arg1:Number):void{
OSound.MusicVolume = _arg1;
this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, _arg1);
}
public function get prFullScreen():Boolean{
return (this.iCache.GetCategoryItem(catGlobal, strgFullScreen));
}
public function ClearLocalScores(_arg1:int):void{
this.iScores.Clear(_arg1);
}
}
}//package ENGINE.GAME
Section 17
//OGameParams (ENGINE.GAME.OGameParams)
package ENGINE.GAME {
public class OGameParams {
public var iLevel:int;
public var iScore:int;
public var iSavedGame:String;
public var iCGamesEnd:int;
public var iLevelScore:int;
public var iCGamesStart:int;
}
}//package ENGINE.GAME
Section 18
//OPlayer (ENGINE.GAME.OPlayer)
package ENGINE.GAME {
public class OPlayer {
public var iPassword:String;
public var iScoreTable:OScoresTable;
public var iGParams:Array;
public var iMode:int;
public var iRNDFactor:int;
public var iName:String;
public function OPlayer(_arg1:String=null, _arg2:String=null, _arg3:int=1, _arg4:int=10, _arg5:int=10){
var _local6:int;
super();
this.iName = _arg1;
this.iPassword = _arg2;
this.iGParams = new Array(_arg3);
this.iRNDFactor = Math.round((Math.random() * (_arg5 - 1)));
_local6 = 0;
while (_local6 < _arg3) {
this.iGParams[_local6] = new OGameParams();
_local6++;
};
this.iScoreTable = new OScoresTable(_arg3, _arg4);
}
}
}//package ENGINE.GAME
Section 19
//OScoreParams (ENGINE.GAME.OScoreParams)
package ENGINE.GAME {
public class OScoreParams {
public var iScore:int;
public var iName:String;
public var iLevel:int;
public var iTime:Number;
public function OScoreParams(_arg1:String=null, _arg2:int=0, _arg3:int=0){
var _local4:Date;
super();
this.iName = _arg1;
this.iScore = _arg2;
_local4 = new Date();
this.iTime = _local4.time;
}
}
}//package ENGINE.GAME
Section 20
//OScoresTable (ENGINE.GAME.OScoresTable)
package ENGINE.GAME {
public class OScoresTable {
public var iTable:Array;
public var iMaxElements:int;
public function OScoresTable(_arg1:int=1, _arg2:int=10){
var _local3:int;
super();
this.iMaxElements = _arg2;
this.iTable = new Array();
_local3 = 0;
while (_local3 < _arg1) {
this.iTable[_local3] = new Array();
_local3++;
};
}
public function FindByName(_arg1:int, _arg2:String):int{
var _local3:int;
_local3 = 0;
while (_local3 < this.iTable[_arg1].length) {
if (this.iTable[_arg1][_local3].iName == _arg2){
return (_local3);
};
_local3++;
};
return (-1);
}
public function Clear(_arg1:int):void{
this.iTable[_arg1] = new Array();
}
public function GetRecord(_arg1:int):int{
if (!this.iTable[_arg1].length){
return (0);
};
return (this.iTable[_arg1][0].iScore);
}
public function AddScore(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean=false):Boolean{
var _local6:Array;
var _local7:int;
_local6 = this.iTable[_arg3];
if ((((_local6.length < this.iMaxElements)) || ((_local6[(_local6.length - 1)].iScore < _arg2)))){
_local7 = (_arg5) ? -1 : this.FindByName(_arg3, _arg1);
if (_local7 >= 0){
if (_arg2 < _local6[_local7].iScore){
return (false);
};
_local6[_local7] = new OScoreParams(_arg1, _arg2, _arg4);
this.SortOn(_arg3);
return (true);
};
if (_local6.length < this.iMaxElements){
_local6[_local6.length] = new OScoreParams(_arg1, _arg2, _arg4);
this.SortOn(_arg3);
return (true);
};
if (_local6[(_local6.length - 1)].iScore > _arg2){
return (false);
};
_local6[(_local6.length - 1)] = new OScoreParams(_arg1, _arg2, _arg4);
this.SortOn(_arg3);
return (true);
};
return (false);
}
public function IsRecord(_arg1:int, _arg2:int):Boolean{
if (!this.iTable[_arg1].length){
return (true);
};
return ((_arg2 >= this.iTable[_arg1][0].iScore));
}
public function GetScore(_arg1:int, _arg2:int):OScoreParams{
return (this.iTable[_arg1][_arg2]);
}
public function SortOn(_arg1:int):void{
this.iTable[_arg1] = this.iTable[_arg1].sortOn("iScore", (Array.DESCENDING | Array.NUMERIC));
}
}
}//package ENGINE.GAME
Section 21
//OA_Alpha (ENGINE.INTERFACE.ANIMATORS.OA_Alpha)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OA_Alpha extends OAnimator {
public var iEAlpha:Number;
private var iDAlpha:Number;
public var iSAlpha:Number;
private var iEndAlpha:Number;
public var iPIter:int;
public function OA_Alpha(_arg1:Object, _arg2:OIObject=null){
super(_arg1, _arg2);
}
override protected function Start():int{
var _local1:Number;
_local1 = ((this.iSAlpha)>=0) ? this.iSAlpha : this.iTarget.alpha;
this.iEndAlpha = ((this.iEAlpha)>=0) ? this.iEAlpha : this.iTarget.alpha;
this.iDAlpha = ((this.iEndAlpha - _local1) / iPIter);
this.iTarget.visible = true;
this.iTarget.alpha = _local1;
return (((Math.abs(this.iDAlpha) > 0.001)) ? stPlay : stEnd);
}
override public function Play():void{
var _local1:Number;
_local1 = (this.iTarget.alpha + this.iDAlpha);
if ((((((this.iDAlpha > 0)) && ((_local1 >= this.iEndAlpha)))) || ((((this.iDAlpha <= 0)) && ((_local1 <= this.iEndAlpha)))))){
this.iTarget.alpha = this.iEndAlpha;
if (this.iTarget.alpha == 0){
this.iTarget.visible = false;
};
this.State = OAnimator.stEnd;
} else {
this.iTarget.alpha = _local1;
};
}
public static function Make(_arg1:Object, _arg2:OIObject=null):OA_Alpha{
return (new OA_Alpha(_arg1, _arg2));
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 22
//OA_AlphaFade (ENGINE.INTERFACE.ANIMATORS.OA_AlphaFade)
package ENGINE.INTERFACE.ANIMATORS {
import flash.display.*;
import ENGINE.INTERFACE.*;
public class OA_AlphaFade extends OAnimator {
public var iEAlpha:Number;
public var iEInd:Array;
private var iEndAlpha:Array;
private var iCurAlpha:Number;
private var iDAlpha:Array;
private var iStartAlpha:Array;
public var iSInd:Array;
public var iSAlpha:Number;
public var iPIter:int;
public function OA_AlphaFade(_arg1:Object, _arg2:OIObject=null){
super(_arg1, _arg2);
}
override protected function Start():int{
var _local1:int;
var _local2:int;
var _local3:DisplayObject;
var _local4:DisplayObject;
if ((((this.iSInd == null)) && ((this.iEInd == null)))){
return (OAnimator.stEnd);
};
if (this.iSInd.length != this.iEInd.length){
return (OAnimator.stEnd);
};
_local1 = this.iSInd.length;
this.iStartAlpha = new Array(_local1);
this.iEndAlpha = new Array(_local1);
this.iDAlpha = new Array(_local1);
_local2 = 0;
while (_local2 < _local1) {
_local3 = this.iTarget.getChildAt(this.iSInd[_local2]);
_local4 = this.iTarget.getChildAt(this.iEInd[_local2]);
this.iStartAlpha[_local2] = ((this.iSAlpha)>=0) ? this.iSAlpha : _local3.alpha;
this.iEndAlpha[_local2] = ((this.iEAlpha)>=0) ? this.iEAlpha : _local4.alpha;
this.iDAlpha[_local2] = ((this.iEndAlpha[_local2] - this.iStartAlpha[_local2]) / iPIter);
_local3.alpha = this.iStartAlpha[_local2];
_local3.visible = true;
_local4.alpha = this.iEndAlpha[_local2];
_local4.visible = true;
_local2++;
};
this.iCurAlpha = this.iStartAlpha[0];
return (OAnimator.stPlay);
}
override public function Play():void{
var _local1:DisplayObject;
var _local2:DisplayObject;
var _local3:int;
var _local4:int;
this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]);
_local3 = this.iSInd.length;
if ((((((this.iDAlpha[0] > 0)) && ((this.iCurAlpha >= this.iEndAlpha[0])))) || ((((this.iDAlpha[0] <= 0)) && ((this.iCurAlpha <= this.iEndAlpha[0])))))){
_local4 = 0;
while (_local4 < _local3) {
_local1 = this.iTarget.getChildAt(this.iSInd[_local4]);
_local2 = this.iTarget.getChildAt(this.iEInd[_local4]);
_local1.alpha = this.iEndAlpha[_local4];
if (_local1.alpha == 0){
_local1.visible = false;
};
_local2.alpha = this.iStartAlpha[_local4];
if (_local2.alpha == 0){
_local2.visible = false;
};
_local4++;
};
this.State = OAnimator.stEnd;
} else {
_local4 = 0;
while (_local4 < _local3) {
_local1 = this.iTarget.getChildAt(this.iSInd[_local4]);
_local2 = this.iTarget.getChildAt(this.iEInd[_local4]);
_local1.alpha = (_local1.alpha + this.iDAlpha[_local4]);
_local2.alpha = (_local2.alpha - this.iDAlpha[_local4]);
_local4++;
};
};
}
public static function Make(_arg1:Object, _arg2:OIObject=null):OA_AlphaFade{
return (new OA_AlphaFade(_arg1, _arg2));
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 23
//OA_AlphaInd (ENGINE.INTERFACE.ANIMATORS.OA_AlphaInd)
package ENGINE.INTERFACE.ANIMATORS {
import flash.display.*;
import ENGINE.INTERFACE.*;
public class OA_AlphaInd extends OAnimator {
public var iEAlpha:Number;
private var iCurAlpha:Number;
private var iEndAlpha:Array;
private var iDAlpha:Array;
public var iInd:Array;
public var iSAlpha:Number;
public var iPIter:int;
public function OA_AlphaInd(_arg1:Object, _arg2:OIObject=null){
super(_arg1, _arg2);
}
override protected function Start():int{
var _local1:int;
var _local2:int;
var _local3:DisplayObject;
var _local4:Number;
if (((!(this.iInd)) || ((this.iInd.length == 0)))){
return (stEnd);
};
_local1 = this.iInd.length;
this.iEndAlpha = new Array(_local1);
this.iDAlpha = new Array(_local1);
_local2 = 0;
while (_local2 < _local1) {
_local3 = this.iTarget.getChildAt(this.iInd[_local2]);
_local4 = ((this.iSAlpha)>=0) ? this.iSAlpha : _local3.alpha;
this.iEndAlpha[_local2] = ((this.iEAlpha)>=0) ? this.iEAlpha : _local3.alpha;
this.iDAlpha[_local2] = ((this.iEndAlpha[_local2] - _local4) / iPIter);
_local3.visible = true;
_local3.alpha = _local4;
_local2++;
};
this.iCurAlpha = this.iTarget.getChildAt(this.iInd[0]).alpha;
return (((Math.abs(this.iDAlpha[0]) > 0.001)) ? stPlay : stEnd);
}
override public function Play():void{
var _local1:int;
var _local2:int;
var _local3:DisplayObject;
this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]);
_local1 = this.iInd.length;
if ((((((this.iDAlpha[0] > 0)) && ((this.iCurAlpha >= this.iEndAlpha[0])))) || ((((this.iDAlpha[0] <= 0)) && ((this.iCurAlpha <= this.iEndAlpha[0])))))){
_local2 = 0;
while (_local2 < _local1) {
_local3 = this.iTarget.getChildAt(this.iInd[_local2]);
_local3.alpha = this.iEndAlpha[_local2];
_local3.visible = (_local3.alpha > 0);
_local2++;
};
this.State = stEnd;
} else {
_local2 = 0;
while (_local2 < _local1) {
_local3 = this.iTarget.getChildAt(this.iInd[_local2]);
_local3.alpha = (_local3.alpha + this.iDAlpha[_local2]);
_local2++;
};
};
}
public static function Make(_arg1:Object, _arg2:OIObject=null):OA_AlphaInd{
return (new OA_AlphaInd(_arg1, _arg2));
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 24
//OA_Scale (ENGINE.INTERFACE.ANIMATORS.OA_Scale)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OA_Scale extends OAnimator {
public var iSScale:Number;
private var iEndScale:Number;
public var iEScale:Number;
private var iDScale:Number;
public var iPIter:int;
public function OA_Scale(_arg1:Object, _arg2:OIObject=null){
super(_arg1, _arg2);
}
override protected function Start():int{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = ((this.iSScale)>=0) ? this.iSScale : this.iTarget.scaleX;
this.iEndScale = ((this.iEScale)>=0) ? this.iEScale : this.iTarget.scaleX;
this.iDScale = ((this.iEndScale - _local1) / iPIter);
_local2 = this.iTarget.prWidth;
_local3 = this.iTarget.prHeight;
this.iTarget.scaleX = _local1;
this.iTarget.scaleY = _local1;
this.iTarget.Move(((_local2 - this.iTarget.prWidth) / 2), ((_local3 - this.iTarget.prHeight) / 2));
return (((Math.abs(this.iDScale) > 1E-5)) ? stPlay : stEnd);
}
override public function Play():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = this.iTarget.prWidth;
_local2 = this.iTarget.prHeight;
_local3 = (this.iTarget.scaleX + this.iDScale);
if ((((((this.iDScale > 0)) && ((_local3 >= this.iEndScale)))) || ((((this.iDScale <= 0)) && ((_local3 <= this.iEndScale)))))){
this.iTarget.scaleX = this.iEndScale;
this.iTarget.scaleY = this.iEndScale;
this.State = OAnimator.stEnd;
} else {
this.iTarget.scaleX = (this.iTarget.scaleX + this.iDScale);
this.iTarget.scaleY = (this.iTarget.scaleY + this.iDScale);
};
this.iTarget.Move(((_local1 - this.iTarget.prWidth) / 2), ((_local2 - this.iTarget.prHeight) / 2));
}
public static function Make(_arg1:Object, _arg2:OIObject=null):OA_Scale{
return (new OA_Scale(_arg1, _arg2));
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 25
//OAnimator (ENGINE.INTERFACE.ANIMATORS.OAnimator)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OAnimator {
private var iState:int;
protected var iTarget:OIObject;
public static const stStart:int = 1;
public static const stEnd:int = 3;
public static const stPause:int = 0;
public static const stReturn:int = 4;
public static const stPlay:int = 2;
public function OAnimator(_arg1:Object, _arg2:OIObject=null){
var _local3:String;
super();
for (_local3 in _arg1) {
if (this.hasOwnProperty(_local3)){
this[_local3] = _arg1[_local3];
};
};
this.iTarget = _arg2;
this.State = stPause;
}
public function set State(_arg1:int):void{
this.iState = _arg1;
switch (this.iState){
case stStart:
this.State = this.Start();
break;
case stReturn:
this.State = Return();
break;
};
}
public function Play():void{
this.State = stEnd;
}
public function set prTarget(_arg1:OIObject):void{
this.iTarget = _arg1;
}
protected function Start():int{
return (stPlay);
}
public function get State():int{
return (this.iState);
}
public function Return():int{
return (stPlay);
}
public function OnEnterFrame():void{
if (this.iState == stPlay){
Play();
};
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 26
//OAnimatorManager (ENGINE.INTERFACE.ANIMATORS.OAnimatorManager)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OAnimatorManager {
private var iPlaying:Array;
private var iTarget:OIObject;
public static const anActivate:int = 2;
public static const anDeactivate:int = 3;
public static const anShow:int = 0;
public static const iAnimatorsCount:int = 10;
public static const anHide:int = 1;
public static const anPress:int = 8;
public static const anRoolOver:int = 6;
public static const anUnpress:int = 9;
public static const anFocusOut:int = 5;
public static const anRoolOut:int = 7;
public static const anUncheck:int = 10;
public static const anCheck:int = 9;
public static const anFocusIn:int = 4;
public static const iNullAnimators:Array = [null, null, null, null, null, null, null, null, null, null];
public function OAnimatorManager(_arg1:OIObject){
this.iTarget = _arg1;
this.iPlaying = new Array();
}
public function get prAnimation():Boolean{
return ((iPlaying.length > 0));
}
public function AddAnimator(_arg1:Object):void{
var _local2:*;
if (_arg1 == null){
return;
};
if (this.iPlaying.length > 0){
this.iPlaying[0].Return();
};
_local2 = _arg1.F(_arg1);
_local2.prTarget = this.iTarget;
this.iPlaying.push(_local2);
}
public function OnEnterFrame():void{
if (this.iPlaying.length == 0){
return;
};
switch (this.iPlaying[0].State){
case OAnimator.stEnd:
this.iPlaying[0] = null;
this.iPlaying.splice(0, 1);
break;
case OAnimator.stPause:
this.iPlaying[0].State = OAnimator.stStart;
break;
case OAnimator.stPlay:
this.iPlaying[0].Play();
break;
};
}
public function Free():void{
this.iTarget = null;
this.iPlaying = null;
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 27
//OHtmlTextField (ENGINE.INTERFACE.ELEMENTS.OHtmlTextField)
package ENGINE.INTERFACE.ELEMENTS {
import ENGINE.DISPLAY.*;
import flash.display.*;
import flash.text.*;
import ENGINE.CORE.*;
public class OHtmlTextField extends TextField {
private var iTextFormat:TextFormat;
public function OHtmlTextField(_arg1:Number, _arg2:Number, _arg3, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Array, _arg8:String, _arg9:Number, _arg10:Number, _arg11:Boolean=true){
var _local12:Number;
var _local13:Sprite;
super();
_local12 = (_arg11) ? OGlobal.Scale : 1;
this.type = TextFieldType.DYNAMIC;
this.autoSize = TextFieldAutoSize.NONE;
this.multiline = true;
this.wordWrap = true;
this.selectable = false;
if (_arg3){
_local13 = ((_arg3 is Sprite)) ? (_arg3 as Sprite) : new ((_arg3 as Class));
if ((_local13.getChildAt(0) is TextField)){
this.iTextFormat = (_local13.getChildAt(0) as TextField).getTextFormat();
} else {
this.iTextFormat = this.defaultTextFormat;
};
} else {
this.iTextFormat = this.defaultTextFormat;
};
this.iTextFormat.size = (_arg4 * _local12);
this.iTextFormat.letterSpacing = (_arg5 * _local12);
this.iTextFormat.color = ODisplay.HSBToRGB(_arg7[0], _arg7[1], _arg7[2]);
this.iTextFormat.align = TextFormatAlign.LEFT;
this.defaultTextFormat = this.iTextFormat;
this.prText = _arg8;
this.width = (_arg1 * _local12);
this.height = (_arg2 * _local12);
this.x = (_arg9 * _local12);
this.y = (_arg10 * _local12);
this.border = _arg6;
}
public function set prText(_arg1:String):void{
this.htmlText = _arg1;
}
public function set prFormat(_arg1:TextFormat):void{
this.iTextFormat = _arg1;
this.defaultTextFormat = _arg1;
this.setTextFormat(this.iTextFormat);
}
public function get prText():String{
return (this.htmlText);
}
public function get prFormat():TextFormat{
return (this.iTextFormat);
}
}
}//package ENGINE.INTERFACE.ELEMENTS
Section 28
//OInputTextField (ENGINE.INTERFACE.ELEMENTS.OInputTextField)
package ENGINE.INTERFACE.ELEMENTS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import ENGINE.CORE.*;
public class OInputTextField extends TextField {
private var iTextFormat:TextFormat;
public function OInputTextField(_arg1:Number, _arg2:Number, _arg3, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Array, _arg8:String, _arg9:int, _arg10:Number, _arg11:Number){
var _local12:Number;
var _local13:Sprite;
super();
_local12 = OGlobal.Scale;
this.type = TextFieldType.INPUT;
this.autoSize = TextFieldAutoSize.NONE;
this.embedFonts = true;
_local13 = ((_arg3 is Sprite)) ? (_arg3 as Sprite) : new ((_arg3 as Class));
if ((_local13.getChildAt(0) is TextField)){
this.iTextFormat = (_local13.getChildAt(0) as TextField).getTextFormat();
} else {
this.iTextFormat = this.defaultTextFormat;
};
this.iTextFormat.size = (_arg4 * _local12);
this.iTextFormat.letterSpacing = (_arg5 * _local12);
this.iTextFormat.color = ODisplay.HSBToRGB(_arg7[0], _arg7[1], _arg7[2]);
this.defaultTextFormat = this.iTextFormat;
this.prText = _arg8;
this.width = (_arg1 * _local12);
this.height = (_arg2 * _local12);
this.x = (_arg10 * _local12);
this.y = (_arg11 * _local12);
this.border = _arg6;
this.maxChars = _arg9;
this.restrict = "A-Za-z0-9 @._\\-";
this.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, OnFocusIn);
}
public function set prText(_arg1:String):void{
this.text = (((!(_arg1)) || ((_arg1 == "")))) ? " " : _arg1;
}
protected function OnFocusIn(_arg1:FocusEvent):void{
this.setTextFormat(this.iTextFormat);
}
public function set prFormat(_arg1:TextFormat):void{
this.iTextFormat = _arg1;
this.defaultTextFormat = _arg1;
this.setTextFormat(this.iTextFormat);
}
public function get prText():String{
var _local1:String;
_local1 = this.text;
while (_local1.charAt() == " ") {
_local1 = _local1.substr(1);
};
while (_local1.charAt((_local1.length - 1)) == " ") {
_local1 = _local1.substr(0, (_local1.length - 1));
};
return (_local1);
}
public function get prFormat():TextFormat{
return (this.iTextFormat);
}
}
}//package ENGINE.INTERFACE.ELEMENTS
Section 29
//OListBoxElement (ENGINE.INTERFACE.ELEMENTS.OListBoxElement)
package ENGINE.INTERFACE.ELEMENTS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
public class OListBoxElement extends OButton {
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:3}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:3}, null, null, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0.6, iInd:[1], iPIter:3}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:1, iInd:[1], iPIter:3}, {F:OA_AlphaInd.Make, iSAlpha:0, iEAlpha:1, iInd:[0], iPIter:9}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0, iInd:[0], iPIter:9}];
public function OListBoxElement(_arg1:Array, _arg2:Array=null){
var _local3:Array;
_local3 = (_arg2) ? _arg2 : iDefAnimators;
super(_arg1, _local3);
}
override public function OnMouseUp(_arg1:MouseEvent):void{
}
override public function OnRollOut(_arg1:MouseEvent):void{
this.prRool = false;
}
override public function OnMouseDown(_arg1:MouseEvent):void{
if (((this.prPress) && ((this.parent is OIObject)))){
(this.parent as OIObject).OnPress(_arg1, this);
return;
};
super.OnMouseDown(_arg1);
}
}
}//package ENGINE.INTERFACE.ELEMENTS
Section 30
//OAlert (ENGINE.INTERFACE.OAlert)
package ENGINE.INTERFACE {
import flash.events.*;
public class OAlert extends ODialog {
protected var iMessages:Array;
public var iButtons:Array;
public function OAlert(_arg1:Array, _arg2:Array, _arg3:Array=null){
var _local4:Array;
this.iMessages = _arg2;
_local4 = (_arg3) ? _arg3 : ODialog.iDefAnimators;
super(_arg1, _local4);
}
override public function Init():void{
this.iButtons = new Array();
super.Init();
}
override public function OnPress(_arg1:Event, _arg2):void{
var _local3:int;
var _local4:int;
if (((!(this.iMessages)) || (!(this.iButtons)))){
this.prVisible = false;
return;
};
_local3 = 0;
_local4 = 0;
while (_local4 < this.iButtons.length) {
if ((((_arg2 == this.iButtons[_local4])) && ((_local4 < this.iMessages.length)))){
if ((this.parent is OIObject)){
(this.parent as OIObject).OnPress(null, iMessages[_local4]);
};
this.prVisible = false;
return;
};
_local4++;
};
}
override public function Free():void{
this.iButtons = null;
super.Free();
}
}
}//package ENGINE.INTERFACE
Section 31
//OApplication (ENGINE.INTERFACE.OApplication)
package ENGINE.INTERFACE {
import flash.events.*;
import flash.display.*;
import ENGINE.CORE.*;
import flash.external.*;
public class OApplication extends OWindow {
private var iStaged:Boolean;// = false
protected var iBackground:OBackground;
protected var iMenuItem:Array;
public function OApplication(_arg1:String){
iStaged = false;
OGlobal.AppName = _arg1;
if (this.stage){
OGlobal.SetDomain();
this.InitStage();
};
super(null);
if (!this.iStaged){
this.addEventListener(Event.ENTER_FRAME, NotStagedEnterFrame);
};
}
private function NotStagedEnterFrame(_arg1:Event):void{
if (!iStaged){
if (!this.stage){
return;
};
OGlobal.SetDomain();
this.InitStage();
this.Init();
this.removeEventListener(Event.ENTER_FRAME, NotStagedEnterFrame);
this.iStaged = true;
};
}
override public function Init():void{
if (!this.stage){
return;
};
super.Init();
this.iMenuItem = new Array();
this.iStaged = true;
this.visible = true;
}
protected function OnMenuItem():void{
}
public function get prMenuItem():int{
return ((this.iMenuItem.length) ? this.iMenuItem.pop() : -1);
}
public function set prMenuItem(_arg1:int):void{
this.iMenuItem.push(_arg1);
}
public function OnResize(_arg1:Event):void{
this.Free();
this.InitStage();
this.Init();
}
override public function Free():void{
OGlobal.prStage.removeEventListener(Event.DEACTIVATE, OnDeactivate);
OGlobal.prStage.removeEventListener(Event.RESIZE, OnResize);
this.iMenuItem = null;
super.Free();
}
public function InitBackground(_arg1:Array, _arg2:int=0):void{
this.iBackground = new OBackground(_arg1, _arg2);
this.addChildAt(this.iBackground, 0);
}
protected function OnDeactivate(_arg1:Event):void{
}
public function InitStage(_arg1:Stage=null):void{
var s:String;
var b:int;
var aStage = _arg1;
if (((aStage) || (this.stage))){
OGlobal.prStage = (aStage) ? aStage : this.stage;
};
if (!OGlobal.prStage){
return;
};
OGlobal.prStage.scaleMode = StageScaleMode.NO_SCALE;
OGlobal.prStage.align = StageAlign.TOP_LEFT;
OGlobal.prStage.quality = StageQuality.BEST;
OGlobal.prStage.stageFocusRect = false;
OGlobal.Rescale(this);
OGlobal.FPS = 60;
if (ExternalInterface.available){
s = ("function getInternetExplorerVersion() { var rv = -1; if (navigator.appName == \"Microsoft Internet Explorer\") { var ua = navigator.userAgent;" + "var re = new RegExp(\"MSIE ([0-9]{1,}[.0-9]{0,})\"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; }");
b = 0;
try {
b = ExternalInterface.call(s);
} catch(e:Error) {
OGlobal.prStage.frameRate = OGlobal.FPS;
};
if (b > 0){
OGlobal.FPS = (OGlobal.FPS * 2);
};
};
OGlobal.prStage.frameRate = OGlobal.FPS;
OGlobal.prStage.addEventListener(Event.RESIZE, OnResize);
OGlobal.prStage.addEventListener(Event.DEACTIVATE, OnDeactivate);
}
}
}//package ENGINE.INTERFACE
Section 32
//OBackground (ENGINE.INTERFACE.OBackground)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBackground extends OSprite {
protected var iImages:Array;
protected var iIInd:int;// = 0
public function OBackground(_arg1:Array, _arg2:int=0){
iIInd = 0;
super();
this.iImages = _arg1;
this.prIInd = _arg2;
}
public function Make():void{
var _local1:Sprite;
var _local2:BitmapData;
var _local3:OBM;
var _local4:Rectangle;
var _local5:Rectangle;
var _local6:int;
var _local7:int;
var _local8:Number;
var _local9:int;
var _local10:Bitmap;
var _local11:int;
var _local12:OBitmap;
if (this.iImages == null){
return;
};
this.Free();
if ((this.iImages[this.iIInd] is Class)){
_local1 = new (this.iImages[this.iIInd]);
_local2 = new BitmapData(_local1.width, _local1.height, false, 4294967295);
_local2.draw(_local1);
};
if ((this.iImages[this.iIInd] is BitmapData)){
_local2 = this.iImages[this.iIInd];
_local1 = new Sprite();
_local10 = new Bitmap(_local2);
_local1.addChild(_local10);
};
_local3 = new OBM(_local2, 0, 0, _local1.width, _local1.height);
_local4 = OGlobal.ViewporRect;
_local5 = OGlobal.StageRect;
this.x = -(_local4.x);
this.y = -(_local4.y);
_local6 = Math.floor((_local5.width / _local1.width));
if (_local6 == 0){
return;
};
_local7 = Math.floor((_local5.height / _local1.height));
if (_local7 == 0){
return;
};
if ((_local5.width - (_local6 * _local1.width)) > 0){
_local6++;
};
if ((_local5.height - (_local7 * _local1.height)) > 0){
_local7++;
};
_local8 = OGlobal.Scale;
_local9 = 0;
while (_local9 < _local7) {
_local11 = 0;
while (_local11 < _local6) {
_local12 = new OBitmap(_local3, ((_local11 * _local1.width) / _local8), ((_local9 * _local1.height) / _local8));
this.addChild(_local12);
_local11++;
};
_local9++;
};
}
override public function Free():void{
super.Free();
}
public function set prIInd(_arg1:int):void{
this.iIInd = _arg1;
if (this.iImages == null){
this.iIInd = -1;
return;
};
if (this.iIInd >= (this.iImages.length - 1)){
this.iIInd = (this.iImages.length - 1);
};
Make();
}
public function get prIInd():int{
return (this.iIInd);
}
}
}//package ENGINE.INTERFACE
Section 33
//OButton (ENGINE.INTERFACE.OButton)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.events.*;
import ENGINE.INTERFACE.ANIMATORS.*;
public class OButton extends OIObject {
public var iHit:OSprite;
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.6, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Scale.Make, iSScale:1, iEScale:0.8, iPIter:6}, {F:OA_Scale.Make, iSScale:0.8, iEScale:1, iPIter:6}];
public function OButton(_arg1:Array, _arg2:Array=null){
var _local3:Array;
_local3 = ((_arg2)==null) ? OButton.iDefAnimators : _arg2;
super(_arg1, _local3);
}
override public function OnRollOver(_arg1:MouseEvent):void{
this.prRool = true;
}
override public function Init():void{
this.useHandCursor = true;
this.buttonMode = true;
super.Init();
if (this.iHit){
this.iHit.visible = false;
this.hitArea = this.iHit;
};
}
override public function OnMouseUp(_arg1:MouseEvent):void{
this.prPress = false;
}
override public function OnRollOut(_arg1:MouseEvent):void{
if (this.prPress){
this.prPress = false;
};
this.prRool = false;
}
override public function Free():void{
this.iHit = null;
super.Free();
}
override public function OnMouseDown(_arg1:MouseEvent):void{
this.prPress = true;
if ((this.parent is OIObject)){
(this.parent as OIObject).OnPress(_arg1, this);
};
}
}
}//package ENGINE.INTERFACE
Section 34
//OCounter (ENGINE.INTERFACE.OCounter)
package ENGINE.INTERFACE {
import ENGINE.INTERFACE.ANIMATORS.*;
public class OCounter extends OIObject {
public var iSeparator:OIObject;
public var iDigits0:Array;
public var iDigits:Array;
protected var iValue:int;
protected var iValue0:int;
protected var iWidth:Number;
protected var iHeight:Number;
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, null, null, null, null];
public function OCounter(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Array=null){
var _local5:Array;
this.iWidth = _arg2;
this.iHeight = _arg3;
_local5 = (_arg4) ? _arg4 : iDefAnimators;
super(_arg1, _local5);
}
public function set prValue0(_arg1:int):void{
this.iValue0 = Math.max(_arg1, 0);
if (!this.iDigits0){
return;
};
this.iValue0 = Math.min(this.iValue0, (Math.pow(10, this.iDigits0.length) - 1));
Draw();
}
public function set prValue(_arg1:int):void{
this.iValue = Math.max(_arg1, 0);
if (!this.iDigits){
return;
};
this.iValue = Math.min(this.iValue, (Math.pow(10, this.iDigits.length) - 1));
Draw();
}
override public function Init():void{
this.iDigits = new Array();
this.iDigits0 = new Array();
super.Init();
}
private function Draw():void{
var _local1:Number;
var _local2:String;
var _local3:String;
var _local4:int;
var _local5:Number;
var _local6:int;
_local1 = 0;
_local2 = this.iValue0.toString();
_local3 = this.iValue.toString();
_local4 = 0;
while (_local4 < this.iDigits0.length) {
this.iDigits0[_local4].prAnimationEnabled = this.iAEnabled;
_local4++;
};
_local4 = 0;
while (_local4 < this.iDigits.length) {
this.iDigits[_local4].prAnimationEnabled = this.iAEnabled;
_local4++;
};
if (this.iDigits0.length){
_local4 = (_local2.length - 1);
while (_local4 >= 0) {
this.iDigits0[_local4].prValue = (_local2.charCodeAt(_local4) - 47);
_local4--;
};
_local6 = (this.iDigits0.length - _local2.length);
_local4 = 0;
while (_local4 < _local6) {
if (this.iDigits0[_local4].prValue){
this.iDigits0[_local4].prValue = 0;
};
_local4++;
};
};
if (this.iDigits.length){
_local4 = 0;
while (_local4 < _local3.length) {
this.iDigits[_local4].prValue = (_local3.charCodeAt(_local4) - 47);
_local4++;
};
_local6 = this.iDigits.length;
_local4 = _local3.length;
while (_local4 < _local6) {
if (this.iDigits[_local4].prValue){
this.iDigits[_local4].prValue = 0;
};
_local4++;
};
};
if (this.iDigits0.length){
_local4 = (_local2.length - 1);
while (_local4 >= 0) {
_local1 = (_local1 + this.iDigits0[_local4].prWidth);
_local4--;
};
};
if (this.iSeparator){
_local1 = (_local1 + this.iSeparator.prWidth);
};
if (this.iDigits.length){
_local4 = 0;
while (_local4 < _local3.length) {
_local1 = (_local1 + this.iDigits[_local4].prWidth);
_local4++;
};
};
_local5 = ((this.iWidth - _local1) / 2);
if (this.iDigits0.length){
_local4 = 0;
while (_local4 < this.iDigits0.length) {
if (this.iDigits0[_local4].prValue){
this.iDigits0[_local4].PosValue(_local5, ((this.iWidth - this.iDigits0[_local4].prHeight) / 2));
_local5 = (_local5 + this.iDigits0[_local4].prWidth);
};
_local4++;
};
};
if (this.iSeparator){
this.iSeparator.Pos(_local5, ((this.iHeight - this.iSeparator.prHeight) / 2));
_local5 = (_local5 + this.iSeparator.prWidth);
};
if (this.iDigits.length){
_local4 = 0;
while (_local4 < this.iDigits.length) {
if (this.iDigits[_local4].prValue){
this.iDigits[_local4].PosValue(_local5, ((this.iHeight - this.iDigits[_local4].prHeight) / 2));
_local5 = (_local5 + this.iDigits[_local4].prWidth);
};
_local4++;
};
};
}
public function get prValue0():int{
return (this.iValue0);
}
override public function Free():void{
this.iDigits = null;
this.iDigits0 = null;
this.iSeparator = null;
super.Free();
}
public function get prValue():int{
return (this.iValue);
}
}
}//package ENGINE.INTERFACE
Section 35
//ODialog (ENGINE.INTERFACE.ODialog)
package ENGINE.INTERFACE {
import ENGINE.INTERFACE.ANIMATORS.*;
public class ODialog extends OWindow {
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:12}, null, null, null, null, null, null];
public function ODialog(_arg1:Array, _arg2:Array=null){
var _local3:Array;
_local3 = (_arg2) ? _arg2 : ODialog.iDefAnimators;
super(_arg1, _local3);
}
override public function Init():void{
super.Init();
this.SetVisible(false);
this.PosCenter();
this.prVisible = true;
}
}
}//package ENGINE.INTERFACE
Section 36
//OInput (ENGINE.INTERFACE.OInput)
package ENGINE.INTERFACE {
import flash.events.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.INTERFACE.ELEMENTS.*;
public class OInput extends OIObject {
public var iText:OInputTextField;
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.5, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, null, null];
public function OInput(_arg1:Array, _arg2:Array=null){
var _local3:Array;
_local3 = ((_arg2)==null) ? OInput.iDefAnimators : _arg2;
super(_arg1, _local3);
}
public function set prText(_arg1:String):void{
this.iText.prText = _arg1;
}
override public function Init():void{
super.Init();
this.addEventListener(KeyboardEvent.KEY_UP, OnKeyUp);
}
public function get prText():String{
return (this.iText.prText);
}
protected function OnKeyUp(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 13)) && ((this.parent is OWindow)))){
(this.parent as OWindow).OnPress(null, this);
};
}
}
}//package ENGINE.INTERFACE
Section 37
//OInterface (ENGINE.INTERFACE.OInterface)
package ENGINE.INTERFACE {
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.INTERFACE.ELEMENTS.*;
public class OInterface {
public static const iDefLBButtonAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.6, iPIter:4}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:4}, {F:OA_Scale.Make, iSScale:1, iEScale:0.8, iPIter:4}, {F:OA_Scale.Make, iSScale:0.8, iEScale:1, iPIter:4}];
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:12}, null, null, null, null, null, null];
public static const iDefSlowAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:30}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:30}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:30}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:30}, null, null, null, null, null, null];
public static function OHtmlTextFieldMake(_arg1:Array):OHtmlTextField{
return (new OHtmlTextField(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]));
}
public static function OIObjectMake(_arg1:Array):OIObject{
var _local2:OIObject;
_local2 = new OIObject(_arg1[1], _arg1[2]);
_local2.Pos(_arg1[3], _arg1[4]);
return (_local2);
}
public static function OProgressMake(_arg1:Array):OProgress{
return (new OProgress(_arg1[1], _arg1[2]));
}
public static function OInputTextFieldMake(_arg1:Array):OInputTextField{
return (new OInputTextField(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[11]));
}
public static function OTabMake(_arg1:Array):OTab{
return (new OTab(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5]));
}
public static function OCounterMake(_arg1:Array):OCounter{
return (new OCounter(_arg1[1], _arg1[2], _arg1[3], _arg1[4]));
}
}
}//package ENGINE.INTERFACE
Section 38
//OIObject (ENGINE.INTERFACE.OIObject)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.CORE.*;
public class OIObject extends OSprite {
protected var iTrigger:uint;
protected var iAEnabled:Boolean;// = true
protected var iAManager:OAnimatorManager;
protected var iState:int;
protected var iAParams:Array;
protected var iParam:Array;
public static var trActive:uint = 2;
public static var trPress:uint = 16;
public static var trRool:uint = 8;
public static var trFocus:uint = 3;
public static var trVisible:uint = 1;
public function OIObject(_arg1:Array, _arg2:Array=null){
iTrigger = (trVisible | trActive);
iAEnabled = true;
super();
this.iParam = _arg1;
this.iAParams = _arg2;
this.Init();
}
public function get prMouseEnabled():Boolean{
return (((this.prVisible) && (this.prActive)));
}
public function get prRool():Boolean{
return (((this.iTrigger & trRool) > 0));
}
public function set prFocus(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trFocus);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anFocusIn]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trFocus));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anFocusOut]);
};
};
}
override public function get prVisible():Boolean{
return (((this.iTrigger & trVisible) > 0));
}
public function set prRool(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trRool);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOver]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trRool));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOut]);
};
};
}
override public function set prVisible(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trVisible);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anShow], false);
};
} else {
this.iTrigger = (this.iTrigger & ~(trVisible));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anHide], false);
};
};
if (((!(this.iAManager)) || (!(this.iAEnabled)))){
this.visible = _arg1;
};
this.mouseEnabled = this.prMouseEnabled;
this.mouseChildren = this.mouseEnabled;
}
public function OnRollOver(_arg1:MouseEvent):void{
this.prRool = true;
}
public function Init():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
var _local5:String;
if (this.iParam){
_local1 = this.iParam.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = this.iParam[_local2].length;
_local4 = this.iParam[_local2][0](this.iParam[_local2]);
_local5 = this.iParam[_local2][(_local3 - 3)];
if (_local5){
if ((this[_local5] is Array)){
this[_local5][this.iParam[_local2][(_local3 - 2)]] = _local4;
} else {
this[_local5] = _local4;
};
};
if ((_local4 is OIObject)){
(_local4 as OIObject).SetVisible(this.iParam[_local2][(_local3 - 1)]);
} else {
if ((_local4 is IDisplayObject)){
(_local4 as IDisplayObject).prVisible = this.iParam[_local2][(_local3 - 1)];
} else {
_local4.visible = this.iParam[_local2][(_local3 - 1)];
};
};
this.addChild(_local4);
_local2++;
};
};
this.iAManager = (this.iAParams) ? new OAnimatorManager(this) : null;
this.tabEnabled = false;
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.addEventListener(MouseEvent.ROLL_OVER, OnRollOver);
this.addEventListener(MouseEvent.ROLL_OUT, OnRollOut);
this.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown);
this.addEventListener(MouseEvent.MOUSE_UP, OnMouseUp);
}
public function get prAnimationEnabled():Boolean{
return (this.iAEnabled);
}
public function set prActive(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trActive);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anActivate]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trActive));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anDeactivate]);
};
};
this.mouseEnabled = this.prMouseEnabled;
this.mouseChildren = this.mouseEnabled;
}
public function OnMouseUp(_arg1:MouseEvent):void{
this.prPress = false;
}
public function get prPress():Boolean{
return (((this.iTrigger & trPress) > 0));
}
public function get State():int{
return (this.iState);
}
public function OnPress(_arg1:Event, _arg2):void{
}
public function OnRollOut(_arg1:MouseEvent):void{
this.prRool = false;
}
override public function Free():void{
this.removeEventListener(MouseEvent.MOUSE_UP, OnMouseUp);
this.removeEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown);
this.removeEventListener(MouseEvent.ROLL_OUT, OnRollOut);
this.removeEventListener(MouseEvent.ROLL_OVER, OnRollOver);
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
super.Free();
if (this.iAManager){
this.iAManager.Free();
};
this.iAManager = null;
}
public function get prAnimation():Boolean{
var _local1:int;
if (((this.iAManager) && (this.iAManager.prAnimation))){
return (true);
};
_local1 = 0;
while (_local1 < this.numChildren) {
if (!(this.getChildAt(_local1) is OIObject)){
} else {
if ((this.getChildAt(_local1) as OIObject).prAnimation){
return (true);
};
};
_local1++;
};
return (false);
}
public function get prActive():Boolean{
return (((this.iTrigger & trActive) > 0));
}
public function PosCenter(_arg1:Number=800, _arg2:Number=600):void{
var _local3:Rectangle;
_local3 = this.getBounds(this);
this.Pos(OGlobal.ScaleFloor((((_arg1 - this.prWidth) - (OGlobal.ToLocal(_local3.x) * 2)) / 2)), OGlobal.ScaleFloor((((_arg2 - this.prHeight) - (OGlobal.ToLocal(_local3.y) * 2)) / 2)));
}
public function AddAnimator(_arg1:Object, _arg2:Boolean=true):void{
var _local3:Boolean;
_local3 = (_arg2) ? ((((this.iAManager) && (this.prVisible))) && (this.iAEnabled)) : ((this.iAManager) && (this.iAEnabled));
if (_local3){
this.iAManager.AddAnimator(_arg1);
};
}
public function set prAnimationEnabled(_arg1:Boolean):void{
this.iAEnabled = _arg1;
}
public function set prPress(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trPress);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anPress]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trPress));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anUnpress]);
};
};
}
public function OnMouseDown(_arg1:MouseEvent):void{
this.prPress = true;
}
public function OnEnterFrame(_arg1:Event):void{
if (this.iAManager){
this.iAManager.OnEnterFrame();
};
}
public function SetVisible(_arg1:Boolean):void{
this.prAnimationEnabled = false;
this.prVisible = _arg1;
this.prAnimationEnabled = true;
}
public function set prAnimatorParams(_arg1:Array):void{
this.iAParams = _arg1;
if (!this.iAManager){
this.iAManager = new OAnimatorManager(this);
};
}
public function set State(_arg1:int):void{
this.iState = _arg1;
}
public function get prAnimatorParams():Array{
return (this.iAParams);
}
public function get prFocus():Boolean{
return (((this.iTrigger & trFocus) > 0));
}
}
}//package ENGINE.INTERFACE
Section 39
//OListBox (ENGINE.INTERFACE.OListBox)
package ENGINE.INTERFACE {
import flash.events.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.INTERFACE.ELEMENTS.*;
import ENGINE.CORE.*;
public class OListBox extends OIObject {
private var iLBParams:Array;
private var iEGenP:Function;
private var iElements:Array;
public var iDown:OButton;
private var iEGen:Array;
public var iUp:OButton;
private var iEShowInd:int;
private var iSelection:Boolean;// = true
private var iECoord:Array;
private var iECount:int;
private var iCycling:Boolean;
private var iECurInd:int;
private var iPageScrool:Boolean;
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:0.6, iInd:[0], iPIter:6}, {F:OA_AlphaInd.Make, iSAlpha:-1, iEAlpha:1, iInd:[0], iPIter:6}, null, null];
public function OListBox(_arg1:Array, _arg2:Array, _arg3:Function, _arg4:Array, _arg5:Array, _arg6:Array=null){
var _local7:Array;
iSelection = true;
_local7 = (_arg6) ? _arg6 : iDefAnimators;
this.iEGen = _arg2;
this.iEGenP = _arg3;
this.iECoord = _arg4;
this.iLBParams = _arg5;
this.iECount = this.iECoord.length;
super(_arg1, _local7);
}
public function SetCurrentElement(_arg1, _arg2:Array=null):void{
var _local3:int;
if (((!(_arg1)) && (!(_arg2)))){
this.FreeElements();
this.iLBParams = null;
this.iECurInd = 0;
this.iEShowInd = 0;
return;
};
if (_arg2){
this.iLBParams = _arg2;
};
if (!this.iLBParams){
return;
};
this.iECurInd = 0;
_local3 = 0;
while (_local3 < this.iLBParams.length) {
if (_arg1 == this.iLBParams[_local3]){
this.iECurInd = _local3;
break;
};
_local3++;
};
this.iEShowInd = this.iECurInd;
if ((this.iEShowInd + this.iECount) >= this.iLBParams.length){
this.iEShowInd = (this.iLBParams.length - this.iECount);
};
if (this.iEShowInd < 0){
this.iEShowInd = 0;
};
InitElements();
}
protected function UnpressElements(_arg1:OListBoxElement):void{
var _local2:int;
_local2 = 0;
while (_local2 < this.iElements.length) {
if (!this.iElements[_local2]){
} else {
if (this.iElements[_local2] == _arg1){
this.iECurInd = (this.iEShowInd + _local2);
} else {
if (this.iElements[_local2].prPress){
this.iElements[_local2].prPress = false;
};
};
};
_local2++;
};
}
public function get prPageScrool():Boolean{
return (this.iPageScrool);
}
protected function InitElements():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:Boolean;
this.FreeElements();
if (this.iLBParams == null){
return;
};
_local1 = 0;
_local2 = (((this.iEShowInd + this.iECount) <= this.iLBParams.length)) ? (this.iEShowInd + this.iECount) : this.iLBParams.length;
_local3 = this.iEShowInd;
while (_local3 < _local2) {
this.iEGenP(this.iEGen, this.iLBParams[_local3]);
this.iElements[_local1] = this.iEGen[0](this.iEGen);
this.iElements[_local1].Pos(OGlobal.ScaleFloor(this.iECoord[_local1][0]), OGlobal.ScaleFloor(this.iECoord[_local1][1]));
this.iElements[_local1].mouseEnabled = this.iSelection;
this.addChild(this.iElements[_local1]);
if ((((this.iECurInd == _local3)) && (this.iSelection))){
this.iElements[_local1].prPress = true;
};
_local1++;
_local3++;
};
if (((this.iUp) && (this.iDown))){
if (this.iCycling){
_local4 = (this.iLBParams) ? (this.iLBParams.length > this.iECount) : false;
if (this.iUp.prVisible != _local4){
this.iUp.prVisible = _local4;
};
if (this.iDown.prVisible != _local4){
this.iDown.prVisible = _local4;
};
} else {
if ((((this.iEShowInd == 0)) && (this.iUp.prVisible))){
if (this.iUp.prPress){
this.iUp.prPress = false;
};
this.iUp.prVisible = false;
};
if ((((this.iEShowInd > 0)) && (!(this.iUp.prVisible)))){
this.iUp.prVisible = true;
};
if (((((this.iEShowInd + this.iECount) >= this.iLBParams.length)) && (this.iDown.prVisible))){
if (this.iDown.prPress){
this.iDown.prPress = false;
};
this.iDown.prVisible = false;
};
if (((((this.iEShowInd + this.iECount) < this.iLBParams.length)) && (!(this.iDown.prVisible)))){
this.iDown.prVisible = true;
};
};
};
}
public function set prPageScrool(_arg1:Boolean):void{
this.iPageScrool = _arg1;
}
override public function Free():void{
this.iUp = null;
this.iDown = null;
this.iElements = null;
super.Free();
}
public function set prCurrentInd(_arg1:int):void{
if (!this.iLBParams){
return;
};
this.SetCurrentElement(this.iLBParams[_arg1]);
}
override public function Init():void{
super.Init();
this.iElements = new Array();
this.InitElements();
}
public function set prLBParams(_arg1:Array):void{
this.iLBParams = _arg1;
this.iECurInd = 0;
this.iEShowInd = 0;
this.InitElements();
}
public function get prCurrentInd():int{
return (this.iECurInd);
}
public function set prSelection(_arg1:Boolean):void{
this.iSelection = _arg1;
InitElements();
}
public function set prCycling(_arg1:Boolean):void{
this.iCycling = _arg1;
InitElements();
}
override public function OnPress(_arg1:Event, _arg2):void{
if ((_arg2 is OListBoxElement)){
this.UnpressElements((_arg2 as OListBoxElement));
};
if ((((_arg2 == this.iUp)) && (this.SkipElements((this.iPageScrool) ? -(this.iECount) : -1)))){
this.InitElements();
};
if ((((_arg2 == this.iDown)) && (this.SkipElements((this.iPageScrool) ? this.iECount : 1)))){
this.InitElements();
};
if ((this.parent is OIObject)){
(this.parent as OIObject).OnPress(_arg1, this);
};
}
public function get prSelection():Boolean{
return (this.iSelection);
}
protected function FreeElements():void{
var _local1:int;
_local1 = 0;
while (_local1 < this.iElements.length) {
if (!this.iElements[_local1]){
} else {
this.removeChild(this.iElements[_local1]);
this.iElements[_local1].Free();
this.iElements[_local1] = null;
};
_local1++;
};
}
protected function SkipElements(_arg1:int):Boolean{
var _local2:int;
if (!this.iLBParams){
return (false);
};
_local2 = (this.iEShowInd + _arg1);
if ((_local2 + this.iECount) >= this.iLBParams.length){
_local2 = (this.iCycling) ? (_local2 - this.iLBParams.length) : (this.iLBParams.length - this.iECount);
};
if (_local2 < 0){
_local2 = (this.iCycling) ? (this.iLBParams.length + _local2) : 0;
};
if (this.iEShowInd == _local2){
return (false);
};
this.iEShowInd = _local2;
if (!this.iSelection){
this.iECurInd = this.iEShowInd;
};
return (true);
}
public function get prCurrentLBParam(){
return ((this.iLBParams) ? this.iLBParams[this.iECurInd] : null);
}
public function get prCycling():Boolean{
return (this.iCycling);
}
}
}//package ENGINE.INTERFACE
Section 40
//OProgress (ENGINE.INTERFACE.OProgress)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.geom.*;
public class OProgress extends OIObject {
public var iProgressBG:OBitmap;
private var iPBG:OBitmap;
public var iProgress:OBitmap;
private var iValue:Number;
public function OProgress(_arg1:Array, _arg2:Array=null){
super(_arg1, _arg2);
}
public function set prValue(_arg1:Number):void{
var _local2:int;
var _local3:Rectangle;
var _local4:Rectangle;
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > 100){
_arg1 = 100;
};
};
if (this.iValue != _arg1){
_local2 = Math.round(((iProgressBG.prOBM.iBM.width * _arg1) / 100));
_local3 = new Rectangle(0, 0, _local2, this.iProgressBG.prOBM.iBM.height);
_local4 = new Rectangle(_local2, 0, (iProgressBG.prOBM.iBM.width - _local2), this.iProgressBG.prOBM.iBM.height);
this.iProgressBG.prOBM.iBM.fillRect(this.iPBG.prOBM.iBM.rect, 0);
this.iProgressBG.prOBM.iBM.copyPixels(this.iProgress.prOBM.iBM, _local3, new Point(0, 0));
this.iProgressBG.prOBM.iBM.copyPixels(this.iPBG.prOBM.iBM, _local4, new Point(_local2, 0));
};
this.iValue = _arg1;
}
override public function Init():void{
super.Init();
if (this.iProgressBG){
this.iPBG = this.iProgressBG.Clone();
};
}
override public function Free():void{
this.iProgressBG = null;
this.iProgress = null;
super.Free();
}
public function get prValue():Number{
return (this.iValue);
}
}
}//package ENGINE.INTERFACE
Section 41
//OTab (ENGINE.INTERFACE.OTab)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.ANIMATORS.*;
public class OTab extends OIObject {
private var iVAnimator:Object;
private var iCurInd:int;
protected var iWidth:Number;
protected var iHeight:Number;
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:6}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:6}, null, null, null, null, null, null];
public static const iDefVAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:3};
public function OTab(_arg1:Array, _arg2:Number, _arg3:Number, _arg4:Object=null, _arg5:Array=null){
var _local6:Array;
this.iWidth = _arg2;
this.iHeight = _arg3;
this.iVAnimator = (_arg4) ? _arg4 : iDefVAnimator;
_local6 = (_arg5) ? _arg5 : iDefAnimators;
super(_arg1, _local6);
}
override public function get prWidth():Number{
return (this.iWidth);
}
public function get prElements():int{
return (this.numChildren);
}
public function set prValue(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 >= this.numChildren){
_arg1 = (this.numChildren - 1);
};
};
if (((this.iAEnabled) && (this.iVAnimator))){
if (this.iCurInd == _arg1){
return;
};
this.iVAnimator.iSInd = [this.iCurInd];
this.iVAnimator.iEInd = [_arg1];
this.AddAnimator(this.iVAnimator, false);
} else {
if ((this.getChildAt(this.iCurInd) is IDisplayObject)){
(this.getChildAt(this.iCurInd) as IDisplayObject).prVisible = false;
};
if ((this.getChildAt(_arg1) is IDisplayObject)){
(this.getChildAt(_arg1) as IDisplayObject).prVisible = true;
};
};
this.iCurInd = _arg1;
}
override public function Init():void{
super.Init();
(this.getChildAt(0) as IDisplayObject).prVisible = true;
}
public function get prValue():int{
return (this.iCurInd);
}
override public function get prHeight():Number{
return (this.iHeight);
}
public function PosValue(_arg1:Number, _arg2:Number):void{
(this.getChildAt(this.iCurInd) as IDisplayObject).Pos((_arg1 - this.prX), (_arg2 - this.prY));
}
}
}//package ENGINE.INTERFACE
Section 42
//OWindow (ENGINE.INTERFACE.OWindow)
package ENGINE.INTERFACE {
public class OWindow extends OIObject {
public function OWindow(_arg1:Array, _arg2:Array=null){
super(_arg1, _arg2);
}
}
}//package ENGINE.INTERFACE
Section 43
//OEffectGel (ENGINE.SKIN.OEffectGel)
package ENGINE.SKIN {
import ENGINE.DISPLAY.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.DISPLAY.EFFECTS.*;
import ENGINE.CORE.*;
import flash.filters.*;
public class OEffectGel extends OEffect {
private var iColor:uint;// = 0
private var iF2B:BlurFilter;
private var iF2GG1:GradientGlowFilter;
private var iF2GG2:GradientGlowFilter;
private var iF0S:DropShadowFilter;
private var iF1G:GlowFilter;
private var iBorder:Number;// = 0
private var iF1S:DropShadowFilter;
public function OEffectGel(){
iColor = 0;
iBorder = 0;
super();
}
override public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{
var _local5:OBM;
var _local6:Number;
var _local7:Number;
var _local8:Sprite;
var _local9:Sprite;
var _local10:ColorTransform;
var _local11:Bitmap;
var _local12:Bitmap;
var _local13:Bitmap;
var _local14:Sprite;
var _local15:Bitmap;
var _local16:Bitmap;
var _local17:BitmapData;
var _local18:Bitmap;
_local5 = OBM.Make([null, _arg1, _arg2, _arg3, _arg4, 0]);
_local6 = OGlobal.Scale;
_local7 = 0.85;
_local8 = new Sprite();
_local9 = new Sprite();
_local9.x = iBorder;
_local9.y = iBorder;
_local9.alpha = _local7;
_local8.addChild(_local9);
_local10 = new ColorTransform(0, 0, 0);
_local10.color = this.iColor;
_local11 = new Bitmap(_local5.iBM);
_local11.transform.colorTransform = _local10;
_local9.addChild(_local11);
if (this.iF0S.distance > 0){
_local18 = new Bitmap(_local5.iBM);
_local18.blendMode = "multiply";
_local18.filters = [this.iF0S];
_local9.addChild(_local18);
};
_local12 = new Bitmap(_local5.iBM);
_local12.blendMode = "multiply";
_local12.filters = [this.iF1S];
_local9.addChild(_local12);
_local13 = new Bitmap(_local5.iBM);
_local13.blendMode = "multiply";
_local13.filters = [this.iF1G];
_local9.addChild(_local13);
_local14 = new Sprite();
_local14.blendMode = "layer";
_local14.filters = [this.iF2B];
_local9.addChild(_local14);
_local15 = new Bitmap(_local5.iBM);
_local15.blendMode = "screen";
_local15.filters = [this.iF2GG1];
_local14.addChild(_local15);
_local16 = new Bitmap(_local5.iBM);
_local16.blendMode = "erase";
_local16.filters = [this.iF2GG2];
_local14.addChild(_local16);
_local17 = new BitmapData((_local8.width + (this.iBorder * 2)), (_local8.height + (this.iBorder * 2)), true, 0);
_local17.draw(_local8);
return (new OBM(_local17, (-(this.iBorder) + _local5.iX), (-(this.iBorder) + _local5.iY), _local5.iWidth, _local5.iHeight));
}
override public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:uint;
var _local8:Number;
var _local9:Number;
var _local10:int;
var _local11:int;
var _local12:Array;
var _local13:Array;
_local4 = this.iColors.GetItem(_arg1);
_local5 = this.iFilters.GetItem(_arg2);
if (_local5 == null){
return;
};
_local6 = (OGlobal.Scale * _arg3);
if (_local4 == null){
_local4 = new Object();
if (_arg1.search(/,/) < 0){
_local4.iCH = Number(_arg1);
if (_local4.iCH == undefined){
return;
};
_local4.iCH = (_local4.iCH % 360);
_local10 = Math.floor((_local4.iCH / 30));
_local11 = ((_local10 + 1) % 12);
_local12 = [50, 50, 60, 60, 50, 50, 40, 40, 30, 30, 40, 40];
_local4.iCS = ((_local12[_local10] + ((_local12[_local11] - _local12[_local10]) * ((_local4.iCH / 30) - _local10))) * 0.01);
_local4.iCB = 1;
_local4.iSH = (((_local10 % 2))==0) ? (_local4.iCH - 15) : (_local4.iCH + 15);
if (_local4.iSH < 0){
_local4.iSH = (_local4.iSH + 360);
};
_local4.iSS = 0.9;
_local4.iSB = 0.6;
} else {
_local13 = _arg1.split(/,/);
_local4.iCH = _local13[0];
_local4.iCS = _local13[1];
_local4.iCB = _local13[2];
_local4.iSH = _local13[3];
_local4.iSS = _local13[4];
_local4.iSB = _local13[5];
};
};
_local7 = ODisplay.HSBToRGB(_local4.iSH, _local4.iSS, _local4.iSB);
this.iF0S = new DropShadowFilter((_local5.iF0SD * _local6), _local5.iAngle, ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, (_local4.iCB * 0.5)), 0.75, (_local5.iF0SB * _local6), (_local5.iF0SB * _local6), 1, 2, false, true, true);
this.iF1S = new DropShadowFilter((_local5.iF1SD * _local6), _local5.iAngle, _local7, 0.85, (_local5.iF1SB * _local6), (_local5.iF1SB * _local6), 1.5, 3, true, true, true);
this.iF1G = new GlowFilter(_local7, _local5.iF1GA, (_local5.iF1GB * _local6), (_local5.iF1GB * _local6), 2, 3, true, true);
_local8 = ((_local6)<1) ? (_local5.iF2GGC1 * _local6) : _local5.iF2GGC1;
this.iF2GG1 = new GradientGlowFilter((_local5.iF2GGD1 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local8, 0xFF], (_local5.iF2GGB1 * _local6), (_local5.iF2GGB1 * _local6), 1, 1, "inner", true);
_local9 = ((_local6)<1) ? (_local5.iF2GGC2 * _local6) : _local5.iF2GGC2;
this.iF2GG2 = new GradientGlowFilter((_local5.iF2GGD2 * _local6), _local5.iAngle, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [0, 0, 1], [0, _local9, 0xFF], (_local5.iF2GGB2 * _local6), (_local5.iF2GGB2 * _local6), 1, 1, "inner", true);
this.iF2B = new BlurFilter((_local5.iF2B * _local6), (_local5.iF2B * _local6));
this.iColor = ODisplay.HSBToRGB(_local4.iCH, _local4.iCS, _local4.iCB);
this.iBorder = Math.ceil((_local5.iBorder * _local6));
}
}
}//package ENGINE.SKIN
Section 44
//OMultiplayer (ENGINE.SMARTFOX.OMultiplayer)
package ENGINE.SMARTFOX {
import it.gotoandplay.smartfoxserver.handlers.*;
import it.gotoandplay.smartfoxserver.data.*;
import it.gotoandplay.smartfoxserver.*;
import it.gotoandplay.smartfoxserver.util.*;
import ENGINE.CORE.*;
import flash.utils.*;
public class OMultiplayer extends SmartFoxClient {
private var iCmd:String;
private var iError:String;
private var iConnection:Boolean;// = false
private var iUsersCount:int;
private var iErrorsCount:int;
private var iPassword:String;
private var iAdress:String;
private var iXTName:String;
private var iTimer:int;
private var iGameParams:Array;
private var iCMessages:Array;
private var iOpponentID:int;
private var iOpponentName:String;
private var iName:String;
private var iTurn:Array;
private var iState:int;
private var iGRoomParams:Array;
private var iZoneName:String;
public static const stInGame:int = 13;
public static const stLogin:int = 3;
public static const cmdJoinGameRoom:String = "jgr";
public static const cmdZoneUsersCount:String = "zuc";
public static const stNone:int = 0;
public static const stMainRoomError:int = 6;
public static const stGameError:int = 12;
public static const cmdJoinGame:String = "jgm";
public static const cmdJoinMainRoom:String = "jmr";
public static const stConnection:int = 1;
public static const stLoginError:int = 4;
public static const cmdMakeTurn:String = "m";
public static const cmdCmd:String = "cmd";
public static const stConnectionError:int = 2;
public static const stInZone:int = 7;
public static const stInGameRoom:int = 10;
public static const cmdChatMessage:String = "c";
public static const stJoinGameRoom:int = 8;
public static const stGameRoomError:int = 9;
public static const stJoinGame:int = 11;
public static const stJoinMainRoom:int = 5;
public function OMultiplayer(_arg1:Boolean=false){
iConnection = false;
super(_arg1);
this.State = stNone;
}
private function OnConnectionLost(_arg1:SFSEvent):void{
this.iConnection = false;
this.State = stNone;
}
public function get prActiveRoomID():int{
return (this.activeRoomId);
}
public function get prErrorsCount():int{
return (this.iErrorsCount);
}
public function get prError():String{
return (this.iError);
}
public function get prChatMessage():String{
return (((this.iCMessages.length)==0) ? null : this.iCMessages.shift());
}
public function ClearChatMessage(_arg1:Boolean=false):void{
if (_arg1){
this.iCMessages = new Array();
} else {
if (this.iCMessages[0]){
this.iCMessages.shift();
};
};
}
public function Init(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String=""):void{
if (((!(OGlobal.CheckDomain(_arg1))) || (!((this.iState == stNone))))){
return;
};
this.iAdress = _arg2;
this.iZoneName = _arg3;
this.iXTName = _arg4;
this.iName = _arg5;
this.iPassword = _arg6;
this.iTurn = new Array();
this.iCMessages = new Array();
addEventListener(SFSEvent.onConnection, OnConnection);
addEventListener(SFSEvent.onConnectionLost, OnConnectionLost);
addEventListener(SFSEvent.onExtensionResponse, OnExtensionResponse);
this.State = stConnection;
}
private function OnConnection(_arg1:SFSEvent):void{
if (!_arg1.params.success){
this.iError = _arg1.params.error;
this.iErrorsCount++;
this.iConnection = false;
};
this.State = (_arg1.params.success) ? stLogin : stConnectionError;
}
public function set prGRoomParams(_arg1:Array):void{
this.iGRoomParams = _arg1;
}
public function ClearOpponentTurn(_arg1:Boolean=false):void{
if (_arg1){
this.iTurn = new Array();
} else {
if (this.iTurn[0]){
this.iTurn.shift();
};
};
}
private function OnExtensionResponse(_arg1:SFSEvent):void{
var _local2:Array;
if (_arg1.params.type != "str"){
return;
};
_local2 = _arg1.params.dataObj;
if (_local2 == null){
return;
};
switch (_local2[0]){
case "logOK":
this.myUserId = int(_local2[2]);
this.myUserName = _local2[3];
this.amIModerator = (Number(_local2[4]) > 0);
this.State = stJoinMainRoom;
break;
case "logKO":
this.iError = _local2[2];
this.State = stLoginError;
this.iErrorsCount++;
break;
case cmdJoinMainRoom:
if (_local2[2]){
this.activeRoomId = _local2[3];
this.State = stInZone;
} else {
this.State = stMainRoomError;
};
break;
case cmdZoneUsersCount:
this.iUsersCount = _local2[2];
break;
case cmdJoinGameRoom:
if (_local2[2] < 0){
this.activeRoomId = -1;
this.State = OMultiplayer.stGameRoomError;
} else {
this.activeRoomId = _local2[2];
this.State = stInGameRoom;
};
break;
case cmdJoinGame:
if (_local2[2] < 0){
this.activeRoomId = -1;
this.playerId = -1;
this.iOpponentID = -1;
this.iOpponentName = null;
this.State = OMultiplayer.stGameError;
} else {
this.activeRoomId = _local2[2];
this.playerId = _local2[3];
this.iOpponentID = _local2[4];
this.iOpponentName = _local2[5];
this.State = OMultiplayer.stInGame;
};
break;
case cmdMakeTurn:
this.iTurn.push(_local2[2]);
break;
case cmdChatMessage:
this.iCMessages.push(_local2[2]);
break;
case cmdCmd:
this.iCmd = _local2[2];
break;
};
}
public function ChatMessage(_arg1:Array=null):void{
this.sendXtMessage(this.iXTName, OMultiplayer.cmdChatMessage, (_arg1) ? [_arg1.toString()] : ["0"], "str");
}
public function get State():int{
return (this.iState);
}
public function set prGameParams(_arg1:Array):void{
this.iGameParams = _arg1;
}
public function get prUsersCount():int{
return (this.iUsersCount);
}
public function Free():void{
if (this.iConnection){
this.disconnect();
};
this.iConnection = false;
this.iCMessages = null;
removeEventListener(SFSEvent.onConnection, OnConnection);
removeEventListener(SFSEvent.onConnectionLost, OnConnectionLost);
removeEventListener(SFSEvent.onExtensionResponse, OnExtensionResponse);
}
public function Turn(_arg1:Array=null):void{
if (this.iState > stLoginError){
this.sendXtMessage(this.iXTName, OMultiplayer.cmdMakeTurn, (_arg1) ? [_arg1.toString(), this.iOpponentID] : ["0", this.iOpponentID], "str");
};
}
public function get prOpponentTurn():String{
return (((this.iTurn.length)>0) ? this.iTurn[0] : null);
}
public function get prGRoomParams():Array{
return (this.iGRoomParams);
}
public function get prOpponentName():String{
return ((this.iOpponentName) ? this.iOpponentName.slice(0, (this.iOpponentName.length - 3)) : "...");
}
public function get prGameParams():Array{
return (this.iGameParams);
}
public function ClearCmd():void{
this.iCmd = null;
}
public function OnEnterFrame():void{
if (((!(this.isConnected)) && ((this.iState > stConnection)))){
this.iState = stNone;
};
switch (this.iState){
case stInZone:
if ((getTimer() - this.iTimer) > 180000){
this.cmdSend(cmdZoneUsersCount);
this.iTimer = getTimer();
};
break;
};
}
public function get prCmd():String{
return (this.iCmd);
}
public function get prFullOpponentName():String{
return ((this.iOpponentName) ? this.iOpponentName : "...");
}
public function get prPlayerID():int{
return (this.playerId);
}
public function set State(_arg1:int):void{
var aState = _arg1;
if ((((aState > stConnectionError)) && (!(this.isConnected)))){
return;
};
this.iState = aState;
switch (aState){
case stNone:
this.iError = null;
this.iUsersCount = 0;
this.myUserId = -1;
this.myUserName = null;
this.amIModerator = false;
this.playerId = -1;
this.activeRoomId = -1;
this.Free();
break;
case stConnection:
try {
this.connect(this.iAdress, 9339);
this.iConnection = true;
} catch(error:Error) {
OSystem.iUserText2 = "connect error";
this.State = stConnectionError;
};
break;
case stLogin:
this.login(this.iZoneName, this.iName, this.iPassword);
break;
case stJoinMainRoom:
this.cmdSend(cmdJoinMainRoom);
break;
case stInZone:
this.playerId = -1;
this.iOpponentID = -1;
this.iOpponentName = null;
this.iTimer = getTimer();
this.cmdSend(cmdZoneUsersCount);
break;
case stJoinGameRoom:
this.cmdSend(cmdJoinGameRoom, this.iGRoomParams);
break;
case stJoinGame:
this.cmdSend(cmdJoinGame, this.iGameParams);
break;
};
}
public function cmdSend(_arg1:String, _arg2:Array=null):void{
if (this.iState > stLoginError){
this.sendXtMessage(this.iXTName, _arg1, (_arg2) ? _arg2 : [], "str");
};
}
}
}//package ENGINE.SMARTFOX
Section 45
//Room (it.gotoandplay.smartfoxserver.data.Room)
package it.gotoandplay.smartfoxserver.data {
public class Room {
private var maxUsers:int;
private var userList:Array;
private var name:String;
private var userCount:int;
private var specCount:int;
private var id:int;
private var myPlayerIndex:int;
private var priv:Boolean;
private var temp:Boolean;
private var limbo:Boolean;
private var maxSpectators:int;
private var game:Boolean;
private var variables:Array;
public function Room(_arg1:int, _arg2:String, _arg3:int, _arg4:int, _arg5:Boolean, _arg6:Boolean, _arg7:Boolean, _arg8:Boolean, _arg9:int=0, _arg10:int=0){
this.id = _arg1;
this.name = _arg2;
this.maxSpectators = _arg4;
this.maxUsers = _arg3;
this.temp = _arg5;
this.game = _arg6;
this.priv = _arg7;
this.limbo = _arg8;
this.userCount = _arg9;
this.specCount = _arg10;
this.userList = [];
this.variables = [];
}
public function getVariable(_arg1:String):Object{
return (variables[_arg1]);
}
public function addUser(_arg1:User, _arg2:int):void{
userList[_arg2] = _arg1;
userCount++;
}
public function getName():String{
return (this.name);
}
public function getId():int{
return (this.id);
}
public function setIsLimbo(_arg1:Boolean):void{
this.limbo = _arg1;
}
public function clearVariables():void{
this.variables = [];
}
public function isTemp():Boolean{
return (this.temp);
}
public function getMaxSpectators():int{
return (this.maxSpectators);
}
public function setVariables(_arg1:Array):void{
this.variables = _arg1;
}
public function isGame():Boolean{
return (this.game);
}
public function getUser(_arg1):User{
var _local2:User;
var _local3:String;
var _local4:User;
_local2 = null;
if (typeof(_arg1) == "number"){
_local2 = userList[_arg1];
} else {
if (typeof(_arg1) == "string"){
for (_local3 in userList) {
_local4 = this.userList[_local3];
if (_local4.getName() == _arg1){
_local2 = _local4;
break;
};
};
};
};
return (_local2);
}
public function setUserCount(_arg1:int):void{
this.userCount = _arg1;
}
public function getVariables():Array{
return (variables);
}
public function getUserCount():int{
return (this.userCount);
}
public function isLimbo():Boolean{
return (this.limbo);
}
public function getSpectatorCount():int{
return (this.specCount);
}
public function setSpectatorCount(_arg1:int):void{
this.specCount = _arg1;
}
public function setMyPlayerIndex(_arg1:int):void{
this.myPlayerIndex = _arg1;
}
public function removeUser(_arg1:int):void{
delete userList[_arg1];
userCount--;
}
public function getMyPlayerIndex():int{
return (this.myPlayerIndex);
}
public function isPrivate():Boolean{
return (this.priv);
}
public function getMaxUsers():int{
return (this.maxUsers);
}
public function getUserList():Array{
return (this.userList);
}
}
}//package it.gotoandplay.smartfoxserver.data
Section 46
//User (it.gotoandplay.smartfoxserver.data.User)
package it.gotoandplay.smartfoxserver.data {
public class User {
private var isSpec:Boolean;
private var name:String;
private var id:int;
private var pId:int;
private var variables:Array;
private var isMod:Boolean;
public function User(_arg1:int, _arg2:String){
this.id = _arg1;
this.name = _arg2;
this.variables = [];
this.isSpec = false;
this.isMod = false;
}
public function setModerator(_arg1:Boolean):void{
this.isMod = _arg1;
}
public function getName():String{
return (this.name);
}
public function getVariables():Array{
return (this.variables);
}
public function getId():int{
return (this.id);
}
public function getPlayerId():int{
return (this.pId);
}
public function setPlayerId(_arg1:int):void{
this.pId = _arg1;
}
public function setIsSpectator(_arg1:Boolean):void{
this.isSpec = _arg1;
}
public function isSpectator():Boolean{
return (this.isSpec);
}
public function clearVariables():void{
this.variables = [];
}
public function getVariable(_arg1:String):Object{
return (this.variables[_arg1]);
}
public function setVariables(_arg1:Array):void{
this.variables = _arg1;
}
public function isModerator():Boolean{
return (this.isMod);
}
}
}//package it.gotoandplay.smartfoxserver.data
Section 47
//ExtHandler (it.gotoandplay.smartfoxserver.handlers.ExtHandler)
package it.gotoandplay.smartfoxserver.handlers {
import it.gotoandplay.smartfoxserver.*;
import it.gotoandplay.smartfoxserver.util.*;
public class ExtHandler implements IMessageHandler {
private var sfs:SmartFoxClient;
public function ExtHandler(_arg1:SmartFoxClient){
this.sfs = _arg1;
}
public function handleMessage(_arg1:Object, _arg2:String):void{
var _local3:Object;
var _local4:SFSEvent;
var _local5:XML;
var _local6:String;
var _local7:int;
var _local8:String;
var _local9:Object;
if (_arg2 == SmartFoxClient.XTMSG_TYPE_XML){
_local5 = (_arg1 as XML);
_local6 = _local5.body.@action;
_local7 = int(_local5.body.@id);
if (_local6 == "xtRes"){
_local8 = _local5.body.toString();
_local9 = ObjectSerializer.getInstance().deserialize(_local8);
_local3 = {};
_local3.dataObj = _local9;
_local3.type = _arg2;
_local4 = new SFSEvent(SFSEvent.onExtensionResponse, _local3);
sfs.dispatchEvent(_local4);
};
} else {
if (_arg2 == SmartFoxClient.XTMSG_TYPE_JSON){
_local3 = {};
_local3.dataObj = _arg1.o;
_local3.type = _arg2;
_local4 = new SFSEvent(SFSEvent.onExtensionResponse, _local3);
sfs.dispatchEvent(_local4);
} else {
if (_arg2 == SmartFoxClient.XTMSG_TYPE_STR){
_local3 = {};
_local3.dataObj = _arg1;
_local3.type = _arg2;
_local4 = new SFSEvent(SFSEvent.onExtensionResponse, _local3);
sfs.dispatchEvent(_local4);
};
};
};
}
}
}//package it.gotoandplay.smartfoxserver.handlers
Section 48
//IMessageHandler (it.gotoandplay.smartfoxserver.handlers.IMessageHandler)
package it.gotoandplay.smartfoxserver.handlers {
public interface IMessageHandler {
function handleMessage(_arg1:Object, _arg2:String):void;
}
}//package it.gotoandplay.smartfoxserver.handlers
Section 49
//SysHandler (it.gotoandplay.smartfoxserver.handlers.SysHandler)
package it.gotoandplay.smartfoxserver.handlers {
import it.gotoandplay.smartfoxserver.data.*;
import it.gotoandplay.smartfoxserver.*;
import it.gotoandplay.smartfoxserver.util.*;
import flash.utils.*;
public class SysHandler implements IMessageHandler {
private var sfs:SmartFoxClient;
private var handlersTable:Array;
public function SysHandler(_arg1:SmartFoxClient){
this.sfs = _arg1;
handlersTable = [];
handlersTable["apiOK"] = this.handleApiOK;
handlersTable["apiKO"] = this.handleApiKO;
handlersTable["logOK"] = this.handleLoginOk;
handlersTable["logKO"] = this.handleLoginKo;
handlersTable["rmList"] = this.handleRoomList;
handlersTable["uCount"] = this.handleUserCountChange;
handlersTable["joinOK"] = this.handleJoinOk;
handlersTable["joinKO"] = this.handleJoinKo;
handlersTable["uER"] = this.handleUserEnterRoom;
handlersTable["userGone"] = this.handleUserLeaverRoom;
handlersTable["pubMsg"] = this.handlePublicMessage;
handlersTable["prvMsg"] = this.handlePrivateMessage;
handlersTable["dmnMsg"] = this.handleAdminMessage;
handlersTable["modMsg"] = this.handleModMessage;
handlersTable["dataObj"] = this.handleASObject;
handlersTable["rVarsUpdate"] = this.handleRoomVarsUpdate;
handlersTable["roomAdd"] = this.handleRoomAdded;
handlersTable["roomDel"] = this.handleRoomDeleted;
handlersTable["rndK"] = this.handleRandomKey;
handlersTable["roundTripRes"] = this.handleRoundTripBench;
handlersTable["uVarsUpdate"] = this.handleUserVarsUpdate;
handlersTable["createRmKO"] = this.handleCreateRoomError;
handlersTable["bList"] = this.handleBuddyList;
handlersTable["bUpd"] = this.handleBuddyListUpdate;
handlersTable["bAdd"] = this.handleBuddyAdded;
handlersTable["roomB"] = this.handleBuddyRoom;
handlersTable["leaveRoom"] = this.handleLeaveRoom;
handlersTable["swSpec"] = this.handleSpectatorSwitched;
}
private function handleRoomDeleted(_arg1:Object):void{
var _local2:int;
var _local3:Array;
var _local4:Object;
var _local5:SFSEvent;
_local2 = int(_arg1.body.rm.@id);
_local3 = sfs.getAllRooms();
_local4 = {};
_local4.room = _local3[_local2];
delete _local3[_local2];
_local5 = new SFSEvent(SFSEvent.onRoomDeleted, _local4);
sfs.dispatchEvent(_local5);
}
public function handleMessage(_arg1:Object, _arg2:String):void{
var _local3:XML;
var _local4:String;
var _local5:Function;
_local3 = (_arg1 as XML);
_local4 = _local3.body.@action;
_local5 = handlersTable[_local4];
if (_local5 != null){
_local5.apply(this, [_arg1]);
} else {
trace(("Unknown sys command: " + _local4));
};
}
public function handleUserEnterRoom(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:Boolean;
var _local6:Boolean;
var _local7:int;
var _local8:XMLList;
var _local9:Room;
var _local10:User;
var _local11:Object;
var _local12:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.u.@i);
_local4 = _arg1.body.u.n;
_local5 = (_arg1.body.u.@m == "1");
_local6 = (_arg1.body.u.@s == "1");
_local7 = ((_arg1.body.u.@p)!=null) ? int(_arg1.body.u.@p) : -1;
_local8 = _arg1.body.u.vars["var"];
_local9 = sfs.getRoom(_local2);
_local10 = new User(_local3, _local4);
_local10.setModerator(_local5);
_local10.setIsSpectator(_local6);
_local10.setPlayerId(_local7);
_local9.addUser(_local10, _local3);
if (_arg1.body.u.vars.toString().length > 0){
populateVariables(_local10.getVariables(), _arg1.body.u);
};
_local11 = {};
_local11.roomId = _local2;
_local11.user = _local10;
_local12 = new SFSEvent(SFSEvent.onUserEnterRoom, _local11);
sfs.dispatchEvent(_local12);
}
public function handleUserVarsUpdate(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:User;
var _local5:Array;
var _local6:Object;
var _local7:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.user.@id);
_local4 = sfs.getRoom(_local2).getUser(_local3);
_local5 = [];
if (_arg1.body.vars.toString().length > 0){
populateVariables(_local4.getVariables(), _arg1.body, _local5);
};
_local6 = {};
_local6.user = _local4;
_local6.changedVars = _local5;
_local7 = new SFSEvent(SFSEvent.onUserVariablesUpdate, _local6);
sfs.dispatchEvent(_local7);
}
public function handleUserLeaverRoom(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:Room;
var _local5:String;
var _local6:Object;
var _local7:SFSEvent;
_local2 = int(_arg1.body.user.@id);
_local3 = int(_arg1.body.@r);
_local4 = sfs.getRoom(_local3);
_local5 = _local4.getUser(_local2).getName();
_local4.removeUser(_local2);
_local6 = {};
_local6.roomId = _local3;
_local6.userId = _local2;
_local6.userName = _local5;
_local7 = new SFSEvent(SFSEvent.onUserLeaveRoom, _local6);
sfs.dispatchEvent(_local7);
}
public function handlePrivateMessage(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:User;
var _local6:Object;
var _local7:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.user.@id);
_local4 = _arg1.body.txt;
_local5 = sfs.getRoom(_local2).getUser(_local3);
_local6 = {};
_local6.message = Entities.decodeEntities(_local4);
_local6.sender = _local5;
_local6.roomId = _local2;
_local6.userId = _local3;
_local7 = new SFSEvent(SFSEvent.onPrivateMessage, _local6);
sfs.dispatchEvent(_local7);
}
private function handleCreateRoomError(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:SFSEvent;
_local2 = _arg1.body.room.@e;
_local3 = {};
_local3.error = _local2;
_local4 = new SFSEvent(SFSEvent.onCreateRoomError, _local3);
sfs.dispatchEvent(_local4);
}
private function handleBuddyRoom(_arg1:Object):void{
var _local2:String;
var _local3:Array;
var _local4:int;
var _local5:Object;
var _local6:SFSEvent;
_local2 = _arg1.body.br.@r;
_local3 = _local2.split(",");
_local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4] = int(_local3[_local4]);
_local4++;
};
_local5 = {};
_local5.idList = _local3;
_local6 = new SFSEvent(SFSEvent.onBuddyRoom, _local5);
sfs.dispatchEvent(_local6);
}
private function handleBuddyListUpdate(_arg1:Object):void{
var _local2:Object;
var _local3:SFSEvent;
var _local4:Object;
var _local5:XMLList;
var _local6:Object;
var _local7:Boolean;
var _local8:String;
var _local9:XML;
_local2 = {};
_local3 = null;
if (_arg1.body.b != null){
_local4 = {};
_local4.isOnline = ((_arg1.body.b.@s == "1")) ? true : false;
_local4.name = _arg1.body.b.n.toString();
_local4.id = _arg1.body.b.@i;
_local4.variables = {};
_local5 = _arg1.body.b.vs;
if (_local5.toString().length > 0){
for each (_local9 in _local5.v) {
_local4.variables[_local9.@n.toString()] = _local9.v.toString();
};
};
_local6 = null;
_local7 = false;
for (_local8 in sfs.buddyList) {
_local6 = sfs.buddyList[_local8];
if (_local6.name == _local4.name){
sfs.buddyList[_local8] = _local4;
_local7 = true;
break;
};
};
_local2.buddy = _local4;
_local3 = new SFSEvent(SFSEvent.onBuddyListUpdate, _local2);
sfs.dispatchEvent(_local3);
} else {
_local2.error = _arg1.body.err.toString();
_local3 = new SFSEvent(SFSEvent.onBuddyListError, _local2);
sfs.dispatchEvent(_local3);
};
}
public function handleUserCountChange(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Room;
var _local6:Object;
var _local7:SFSEvent;
_local2 = int(_arg1.body.@u);
_local3 = int(_arg1.body.@s);
_local4 = int(_arg1.body.@r);
_local5 = sfs.getAllRooms()[_local4];
if (_local5 != null){
_local5.setUserCount(_local2);
_local5.setSpectatorCount(_local3);
_local6 = {};
_local6.room = _local5;
_local7 = new SFSEvent(SFSEvent.onUserCountChange, _local6);
sfs.dispatchEvent(_local7);
};
}
private function handleRandomKey(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:SFSEvent;
_local2 = _arg1.body.k.toString();
_local3 = {};
_local3.key = _local2;
_local4 = new SFSEvent(SFSEvent.onRandomKey, _local3);
sfs.dispatchEvent(_local4);
}
public function handlePublicMessage(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:User;
var _local6:Object;
var _local7:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.user.@id);
_local4 = _arg1.body.txt;
_local5 = sfs.getRoom(_local2).getUser(_local3);
_local6 = {};
_local6.message = Entities.decodeEntities(_local4);
_local6.sender = _local5;
_local6.roomId = _local2;
_local7 = new SFSEvent(SFSEvent.onPublicMessage, _local6);
sfs.dispatchEvent(_local7);
}
public function handleAdminMessage(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:Object;
var _local6:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.user.@id);
_local4 = _arg1.body.txt;
_local5 = {};
_local5.message = Entities.decodeEntities(_local4);
_local6 = new SFSEvent(SFSEvent.onAdminMessage, _local5);
sfs.dispatchEvent(_local6);
}
public function dispatchDisconnection():void{
var _local1:SFSEvent;
_local1 = new SFSEvent(SFSEvent.onConnectionLost, null);
sfs.dispatchEvent(_local1);
}
private function handleSpectatorSwitched(_arg1:Object):void{
var _local2:int;
var _local3:Object;
var _local4:SFSEvent;
_local2 = int(_arg1.body.rm.@id);
sfs.playerId = int(_arg1.body.pid.@id);
_local3 = {};
_local3.success = (sfs.playerId > 0);
_local3.newId = sfs.playerId;
_local3.room = sfs.getRoom(_local2);
_local4 = new SFSEvent(SFSEvent.onSpectatorSwitched, _local3);
sfs.dispatchEvent(_local4);
}
public function handleLoginOk(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:Object;
var _local6:SFSEvent;
_local2 = int(_arg1.body.login.@id);
_local3 = int(_arg1.body.login.@mod);
_local4 = _arg1.body.login.@n;
sfs.amIModerator = (_local3 == 1);
sfs.myUserId = _local2;
sfs.myUserName = _local4;
sfs.playerId = -1;
_local5 = {};
_local5.success = true;
_local5.name = _local4;
_local5.error = "";
_local6 = new SFSEvent(SFSEvent.onLogin, _local5);
sfs.dispatchEvent(_local6);
sfs.getRoomList();
}
public function handleRoomVarsUpdate(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:Room;
var _local5:Array;
var _local6:Object;
var _local7:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.user.@id);
_local4 = sfs.getRoom(_local2);
_local5 = [];
if (_arg1.body.vars.toString().length > 0){
populateVariables(_local4.getVariables(), _arg1.body, _local5);
};
_local6 = {};
_local6.room = _local4;
_local6.changedVars = _local5;
_local7 = new SFSEvent(SFSEvent.onRoomVariablesUpdate, _local6);
sfs.dispatchEvent(_local7);
}
public function handleRoomList(_arg1:Object):void{
var _local2:Array;
var _local3:XML;
var _local4:Object;
var _local5:SFSEvent;
var _local6:int;
var _local7:Room;
_local2 = sfs.getAllRooms();
for each (_local3 in _arg1.body.rmList.rm) {
_local6 = int(_local3.@id);
_local7 = new Room(_local6, _local3.n, int(_local3.@maxu), int(_local3.@maxs), (_local3.@temp == "1"), (_local3.@game == "1"), (_local3.@priv == "1"), (_local3.@lmb == "1"), int(_local3.@ucnt), int(_local3.@scnt));
if (_local3.vars.toString().length > 0){
populateVariables(_local7.getVariables(), _local3);
};
_local2[_local6] = _local7;
};
_local4 = {};
_local4.roomList = _local2;
_local5 = new SFSEvent(SFSEvent.onRoomListUpdate, _local4);
sfs.dispatchEvent(_local5);
}
private function handleBuddyAdded(_arg1:Object):void{
var _local2:Object;
var _local3:XMLList;
var _local4:Object;
var _local5:SFSEvent;
var _local6:XML;
_local2 = {};
_local2.isOnline = ((_arg1.body.b.@s == "1")) ? true : false;
_local2.name = _arg1.body.b.n.toString();
_local2.id = _arg1.body.b.@i;
_local2.variables = {};
_local3 = _arg1.body.b.vs;
if (_local3.toString().length > 0){
for each (_local6 in _local3.v) {
_local2.variables[_local6.@n.toString()] = _local6.v.toString();
};
};
sfs.buddyList.push(_local2);
_local4 = {};
_local4.list = sfs.buddyList;
_local5 = new SFSEvent(SFSEvent.onBuddyList, _local4);
sfs.dispatchEvent(_local5);
}
private function handleRoomAdded(_arg1:Object):void{
var _local2:int;
var _local3:String;
var _local4:int;
var _local5:int;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
var _local10:Room;
var _local11:Array;
var _local12:Object;
var _local13:SFSEvent;
_local2 = int(_arg1.body.rm.@id);
_local3 = _arg1.body.rm.name;
_local4 = int(_arg1.body.rm.@max);
_local5 = int(_arg1.body.rm.@spec);
_local6 = ((_arg1.body.rm.@temp == "1")) ? true : false;
_local7 = ((_arg1.body.rm.@game == "1")) ? true : false;
_local8 = ((_arg1.body.rm.@priv == "1")) ? true : false;
_local9 = ((_arg1.body.rm.@limbo == "1")) ? true : false;
_local10 = new Room(_local2, _local3, _local4, _local5, _local6, _local7, _local8, _local9);
_local11 = sfs.getAllRooms();
_local11[_local2] = _local10;
if (_arg1.body.rm.vars.toString().length > 0){
populateVariables(_local10.getVariables(), _arg1.body.rm);
};
_local12 = {};
_local12.room = _local10;
_local13 = new SFSEvent(SFSEvent.onRoomAdded, _local12);
sfs.dispatchEvent(_local13);
}
private function populateVariables(_arg1:Array, _arg2:Object, _arg3:Array=null):void{
var _local4:XML;
var _local5:String;
var _local6:String;
var _local7:String;
for each (_local4 in _arg2.vars["var"]) {
_local5 = _local4.@n;
_local6 = _local4.@t;
_local7 = _local4;
if (_arg3 != null){
_arg3.push(_local5);
_arg3[_local5] = true;
};
if (_local6 == "b"){
_arg1[_local5] = Boolean(_local7);
} else {
if (_local6 == "n"){
_arg1[_local5] = Number(_local7);
} else {
if (_local6 == "s"){
_arg1[_local5] = _local7;
} else {
if (_local6 == "x"){
delete _arg1[_local5];
};
};
};
};
};
}
private function handleLeaveRoom(_arg1:Object):void{
var _local2:int;
var _local3:Object;
var _local4:SFSEvent;
_local2 = int(_arg1.body.rm.@id);
_local3 = {};
_local3.roomId = _local2;
_local4 = new SFSEvent(SFSEvent.onRoomLeft, _local3);
sfs.dispatchEvent(_local4);
}
public function handleLoginKo(_arg1:Object):void{
var _local2:Object;
var _local3:SFSEvent;
_local2 = {};
_local2.success = false;
_local2.error = _arg1.body.login.@e;
_local3 = new SFSEvent(SFSEvent.onLogin, _local2);
sfs.dispatchEvent(_local3);
}
public function handleModMessage(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:User;
var _local6:Object;
var _local7:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.user.@id);
_local4 = _arg1.body.txt;
_local5 = sfs.getRoom(_local2).getUser(_local3);
_local6 = {};
_local6.message = Entities.decodeEntities(_local4);
_local6.sender = _local5;
_local7 = new SFSEvent(SFSEvent.onModeratorMessage, _local6);
sfs.dispatchEvent(_local7);
}
public function handleApiOK(_arg1:Object):void{
var _local2:SFSEvent;
sfs.isConnected = true;
_local2 = new SFSEvent(SFSEvent.onConnection, {success:true});
sfs.dispatchEvent(_local2);
}
private function handleRoundTripBench(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:Object;
var _local5:SFSEvent;
_local2 = getTimer();
_local3 = (_local2 - sfs.getBenchStartTime());
_local4 = {};
_local4.elapsed = _local3;
_local5 = new SFSEvent(SFSEvent.onRoundTripResponse, _local4);
sfs.dispatchEvent(_local5);
}
public function handleJoinOk(_arg1:Object):void{
var _local2:int;
var _local3:XMLList;
var _local4:XMLList;
var _local5:int;
var _local6:Room;
var _local7:XML;
var _local8:Object;
var _local9:SFSEvent;
var _local10:String;
var _local11:int;
var _local12:Boolean;
var _local13:Boolean;
var _local14:int;
var _local15:User;
_local2 = int(_arg1.body.@r);
_local3 = _arg1.body;
_local4 = _arg1.body.uLs.u;
_local5 = int(_arg1.body.pid.@id);
sfs.activeRoomId = _local2;
_local6 = sfs.getRoom(_local2);
sfs.playerId = _local5;
_local6.setMyPlayerIndex(_local5);
if (_local3.vars.toString().length > 0){
_local6.clearVariables();
populateVariables(_local6.getVariables(), _local3);
};
for each (_local7 in _local4) {
_local10 = _local7.n;
_local11 = int(_local7.@i);
_local12 = ((_local7.@m == "1")) ? true : false;
_local13 = ((_local7.@s == "1")) ? true : false;
_local14 = ((_local7.p == undefined)) ? -1 : int(_local7.p);
_local15 = new User(_local11, _local10);
_local15.setModerator(_local12);
_local15.setIsSpectator(_local13);
_local15.setPlayerId(_local14);
if (_local7.vars.toString().length > 0){
populateVariables(_local15.getVariables(), _local7);
};
_local6.addUser(_local15, _local11);
};
sfs.changingRoom = false;
_local8 = {};
_local8.room = _local6;
_local9 = new SFSEvent(SFSEvent.onJoinRoom, _local8);
sfs.dispatchEvent(_local9);
}
public function handleJoinKo(_arg1:Object):void{
var _local2:Object;
var _local3:SFSEvent;
sfs.changingRoom = false;
_local2 = {};
_local2.error = _arg1.body.error.@msg;
_local3 = new SFSEvent(SFSEvent.onJoinRoomError, _local2);
sfs.dispatchEvent(_local3);
}
public function handleASObject(_arg1:Object):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:User;
var _local6:Object;
var _local7:Object;
var _local8:SFSEvent;
_local2 = int(_arg1.body.@r);
_local3 = int(_arg1.body.user.@id);
_local4 = _arg1.body.dataObj;
_local5 = sfs.getRoom(_local2).getUser(_local3);
_local6 = ObjectSerializer.getInstance().deserialize(new XML(_local4));
_local7 = {};
_local7.obj = _local6;
_local7.sender = _local5;
_local8 = new SFSEvent(SFSEvent.onObjectReceived, _local7);
sfs.dispatchEvent(_local8);
}
private function handleBuddyList(_arg1:Object):void{
var _local2:XMLList;
var _local3:Object;
var _local4:Object;
var _local5:SFSEvent;
var _local6:XML;
var _local7:XMLList;
var _local8:XML;
_local2 = _arg1.body.bList;
_local4 = {};
_local5 = null;
if (((!((_local2 == null))) && (!((_local2.b.length == null))))){
if (_local2.toString().length > 0){
for each (_local6 in _local2.b) {
_local3 = {};
_local3.isOnline = ((_local6.@s == "1")) ? true : false;
_local3.name = _local6.n.toString();
_local3.id = _local6.@i;
_local3.variables = {};
_local7 = _local6.vs;
if (_local7.toString().length > 0){
for each (_local8 in _local7.v) {
_local3.variables[_local8.@n.toString()] = _local8.v.toString();
};
};
sfs.buddyList.push(_local3);
};
};
_local4.list = sfs.buddyList;
_local5 = new SFSEvent(SFSEvent.onBuddyList, _local4);
sfs.dispatchEvent(_local5);
} else {
_local4.error = _arg1.body.err.toString();
_local5 = new SFSEvent(SFSEvent.onBuddyListError, _local4);
sfs.dispatchEvent(_local5);
};
}
public function handleApiKO(_arg1:Object):void{
var _local2:Object;
var _local3:SFSEvent;
_local2 = {};
_local2.success = false;
_local2.error = "API are obsolete, please upgrade";
_local3 = new SFSEvent(SFSEvent.onConnection, _local2);
sfs.dispatchEvent(_local3);
}
}
}//package it.gotoandplay.smartfoxserver.handlers
Section 50
//JSON (it.gotoandplay.smartfoxserver.json.JSON)
package it.gotoandplay.smartfoxserver.json {
public class JSON {
public static function decode(_arg1:String):Object{
var _local2:JSONDecoder;
_local2 = new JSONDecoder(_arg1);
return (_local2.getObject());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder;
_local2 = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 51
//JSONDecoder (it.gotoandplay.smartfoxserver.json.JSONDecoder)
package it.gotoandplay.smartfoxserver.json {
public class JSONDecoder {
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
private var obj:Object;
public function JSONDecoder(_arg1:String){
tokenizer = new JSONTokenizer(_arg1);
nextToken();
obj = parseValue();
}
private function parseValue():Object{
switch (token.type){
case JSONTokenType.LEFT_BRACE:
return (parseObject());
case JSONTokenType.LEFT_BRACKET:
return (parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (token.value);
default:
tokenizer.parseError(("Unexpected " + token.value));
};
return (null);
}
private function nextToken():JSONToken{
return ((token = tokenizer.getNextToken()));
}
private function parseObject():Object{
var _local1:Object;
var _local2:String;
_local1 = new Object();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (token.type == JSONTokenType.STRING){
_local2 = String(token.value);
nextToken();
if (token.type == JSONTokenType.COLON){
nextToken();
_local1[_local2] = parseValue();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting } or , but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting : but found " + token.value));
};
} else {
tokenizer.parseError(("Expecting string but found " + token.value));
};
};
return (null);
}
private function parseArray():Array{
var _local1:Array;
_local1 = new Array();
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(parseValue());
nextToken();
if (token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (token.type == JSONTokenType.COMMA){
nextToken();
} else {
tokenizer.parseError(("Expecting ] or , but found " + token.value));
};
};
return (null);
}
public function getObject():Object{
return (obj);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 52
//JSONEncoder (it.gotoandplay.smartfoxserver.json.JSONEncoder)
package it.gotoandplay.smartfoxserver.json {
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1:Object){
jsonString = convertToString(_arg1);
}
private function arrayToString(_arg1:Array):String{
var _local2:String;
var _local3:int;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
private function convertToString(_arg1:Object):String{
if ((_arg1 is String)){
return (escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (objectToString(_arg1));
};
};
};
return ("null");
}
private function escapeString(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:int;
var _local6:String;
var _local7:String;
_local2 = "";
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
case "\b":
_local2 = (_local2 + "\\b");
break;
case "\f":
_local2 = (_local2 + "\\f");
break;
case "\n":
_local2 = (_local2 + "\\n");
break;
case "\r":
_local2 = (_local2 + "\\r");
break;
case "\t":
_local2 = (_local2 + "\\t");
break;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function objectToString(_arg1:Object):String{
var _local2:String;
var _local3:Object;
var _local4:String;
_local2 = "";
for (_local4 in _arg1) {
_local3 = _arg1[_local4];
if ((_local3 is Function)){
} else {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + ((escapeString(_local4) + ":") + convertToString(_local3)));
};
};
return ((("{" + _local2) + "}"));
}
public function getString():String{
return (jsonString);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 53
//JSONParseError (it.gotoandplay.smartfoxserver.json.JSONParseError)
package it.gotoandplay.smartfoxserver.json {
public class JSONParseError extends Error {
private var _text:String;
private var _location:int;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
_location = _arg2;
_text = _arg3;
}
public function get text():String{
return (_text);
}
public function get location():int{
return (_location);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 54
//JSONToken (it.gotoandplay.smartfoxserver.json.JSONToken)
package it.gotoandplay.smartfoxserver.json {
public class JSONToken {
private var _value:Object;
private var _type:int;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
_type = _arg1;
_value = _arg2;
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
public function get value():Object{
return (_value);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
public function get type():int{
return (_type);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 55
//JSONTokenizer (it.gotoandplay.smartfoxserver.json.JSONTokenizer)
package it.gotoandplay.smartfoxserver.json {
public class JSONTokenizer {
private var loc:int;
private var ch:String;
private var obj:Object;
private var jsonString:String;
public function JSONTokenizer(_arg1:String){
jsonString = _arg1;
loc = 0;
nextChar();
}
private function skipComments():void{
if (ch == "/"){
nextChar();
switch (ch){
case "/":
do {
nextChar();
} while (((!((ch == "\n"))) && (!((ch == "")))));
nextChar();
break;
case "*":
nextChar();
while (true) {
if (ch == "*"){
nextChar();
if (ch == "/"){
nextChar();
break;
};
} else {
nextChar();
};
if (ch == ""){
parseError("Multi-line comment not closed");
};
};
break;
default:
parseError((("Unexpected " + ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function readNumber():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:Number;
_local1 = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
_local2 = "";
if (ch == "-"){
_local2 = (_local2 + "-");
nextChar();
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
if (ch == "."){
_local2 = (_local2 + ".");
nextChar();
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
_local3 = Number(_local2);
if (isFinite(_local3)){
_local1.value = _local3;
return (_local1);
};
parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
private function nextChar():String{
return ((ch = jsonString.charAt(loc++)));
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String;
_local2 = _arg1.toUpperCase();
return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
public function getNextToken():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:String;
_local1 = new JSONToken();
skipIgnored();
switch (ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
nextChar();
break;
case "t":
_local2 = ((("t" + nextChar()) + nextChar()) + nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
nextChar();
} else {
parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + nextChar()) + nextChar()) + nextChar()) + nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
nextChar();
} else {
parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + nextChar()) + nextChar()) + nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
nextChar();
} else {
parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = readString();
break;
default:
if (((isDigit(ch)) || ((ch == "-")))){
_local1 = readNumber();
} else {
if (ch == ""){
return (null);
};
parseError((("Unexpected " + ch) + " encountered"));
};
};
return (_local1);
}
private function skipWhite():void{
while (isSpace(ch)) {
nextChar();
};
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, loc, jsonString));
}
private function skipIgnored():void{
skipWhite();
skipComments();
skipWhite();
}
private function isSpace(_arg1:String):Boolean{
return ((((_arg1 == " ")) || ((_arg1 == "\t"))));
}
private function readString():JSONToken{
var _local1:JSONToken;
var _local2:String;
var _local3:String;
var _local4:int;
_local1 = new JSONToken();
_local1.type = JSONTokenType.STRING;
_local2 = "";
nextChar();
while (((!((ch == "\""))) && (!((ch == ""))))) {
if (ch == "\\"){
nextChar();
switch (ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!isHexDigit(nextChar())){
parseError((" Excepted a hex digit, but found: " + ch));
};
_local3 = (_local3 + ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + ch));
};
} else {
_local2 = (_local2 + ch);
};
nextChar();
};
if (ch == ""){
parseError("Unterminated string literal");
};
nextChar();
_local1.value = _local2;
return (_local1);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 56
//JSONTokenType (it.gotoandplay.smartfoxserver.json.JSONTokenType)
package it.gotoandplay.smartfoxserver.json {
public class JSONTokenType {
public static const NUMBER:int = 11;
public static const FALSE:int = 8;
public static const RIGHT_BRACKET:int = 4;
public static const NULL:int = 9;
public static const TRUE:int = 7;
public static const RIGHT_BRACE:int = 2;
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACKET:int = 3;
public static const STRING:int = 10;
public static const LEFT_BRACE:int = 1;
public static const COLON:int = 6;
}
}//package it.gotoandplay.smartfoxserver.json
Section 57
//Entities (it.gotoandplay.smartfoxserver.util.Entities)
package it.gotoandplay.smartfoxserver.util {
public class Entities {
private static var hexTable:Array = new Array();
private static var ascTab:Array = [];
private static var ascTabRev:Array = [];
public static function decodeEntities(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:String;
var _local7:int;
_local7 = 0;
_local2 = "";
while (_local7 < _arg1.length) {
_local3 = _arg1.charAt(_local7);
if (_local3 == "&"){
_local4 = _local3;
do {
_local7++;
_local5 = _arg1.charAt(_local7);
_local4 = (_local4 + _local5);
} while (_local5 != ";");
_local6 = ascTabRev[_local4];
if (_local6 != null){
_local2 = (_local2 + _local6);
} else {
_local2 = (_local2 + String.fromCharCode(getCharCode(_local4)));
};
} else {
_local2 = (_local2 + _local3);
};
_local7++;
};
trace(((("DECODE: " + _arg1) + ", ") + _local2));
return (_local2);
}
public static function encodeEntities(_arg1:String):String{
var _local2:String;
var _local3:int;
var _local4:String;
var _local5:int;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _arg1.charAt(_local3);
_local5 = _arg1.charCodeAt(_local3);
if ((((((_local5 == 9)) || ((_local5 == 10)))) || ((_local5 == 13)))){
_local2 = (_local2 + _local4);
} else {
if ((((_local5 >= 32)) && ((_local5 <= 126)))){
if (ascTab[_local4] != null){
_local2 = (_local2 + ascTab[_local4]);
} else {
_local2 = (_local2 + _local4);
};
} else {
_local2 = (_local2 + _local4);
};
};
_local3++;
};
return (_local2);
}
public static function getCharCode(_arg1:String):Number{
var _local2:String;
_local2 = _arg1.substr(3, _arg1.length);
_local2 = _local2.substr(0, (_local2.length - 1));
return (Number(("0x" + _local2)));
}
ascTab[">"] = ">";
ascTab["<"] = "<";
ascTab["&"] = "&";
ascTab["'"] = "'";
ascTab["\""] = """;
ascTabRev[">"] = ">";
ascTabRev["<"] = "<";
ascTabRev["&"] = "&";
ascTabRev["'"] = "'";
ascTabRev["""] = "\"";
hexTable["0"] = 0;
hexTable["1"] = 1;
hexTable["2"] = 2;
hexTable["3"] = 3;
hexTable["4"] = 4;
hexTable["5"] = 5;
hexTable["6"] = 6;
hexTable["7"] = 7;
hexTable["8"] = 8;
hexTable["9"] = 9;
hexTable["A"] = 10;
hexTable["B"] = 11;
hexTable["C"] = 12;
hexTable["D"] = 13;
hexTable["E"] = 14;
hexTable["F"] = 15;
}
}//package it.gotoandplay.smartfoxserver.util
Section 58
//ObjectSerializer (it.gotoandplay.smartfoxserver.util.ObjectSerializer)
package it.gotoandplay.smartfoxserver.util {
public class ObjectSerializer {
private var eof:String;
private var debug:Boolean;
private var tabs:String;
private static var instance:ObjectSerializer;
public function ObjectSerializer(_arg1:Boolean=false){
this.tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t";
setDebug(_arg1);
}
public function serialize(_arg1:Object):String{
var _local2:Object;
_local2 = {};
obj2xml(_arg1, _local2);
return (_local2.xmlStr);
}
private function obj2xml(_arg1:Object, _arg2:Object, _arg3:int=0, _arg4:String=""):void{
var _local5:String;
var _local6:String;
var _local7:String;
var _local8:*;
if (_arg3 == 0){
_arg2.xmlStr = ("<dataObj>" + this.eof);
} else {
if (this.debug){
_arg2.xmlStr = (_arg2.xmlStr + this.tabs.substr(0, _arg3));
};
_local6 = ((_arg1 is Array)) ? "a" : "o";
_arg2.xmlStr = (_arg2.xmlStr + ((((("<obj t='" + _local6) + "' o='") + _arg4) + "'>") + this.eof));
};
for (_local5 in _arg1) {
_local7 = typeof(_arg1[_local5]);
_local8 = _arg1[_local5];
if ((((((((_local7 == "boolean")) || ((_local7 == "number")))) || ((_local7 == "string")))) || ((_local7 == "null")))){
if (_local7 == "boolean"){
_local8 = Number(_local8);
} else {
if (_local7 == "null"){
_local7 = "x";
_local8 = "";
} else {
if (_local7 == "string"){
_local8 = Entities.encodeEntities(_local8);
};
};
};
if (this.debug){
_arg2.xmlStr = (_arg2.xmlStr + this.tabs.substr(0, (_arg3 + 1)));
};
_arg2.xmlStr = (_arg2.xmlStr + ((((((("<var n='" + _local5) + "' t='") + _local7.substr(0, 1)) + "'>") + _local8) + "</var>") + this.eof));
} else {
if (_local7 == "object"){
obj2xml(_local8, _arg2, (_arg3 + 1), _local5);
if (this.debug){
_arg2.xmlStr = (_arg2.xmlStr + this.tabs.substr(0, (_arg3 + 1)));
};
_arg2.xmlStr = (_arg2.xmlStr + ("</obj>" + this.eof));
};
};
};
if (_arg3 == 0){
_arg2.xmlStr = (_arg2.xmlStr + ("</dataObj>" + this.eof));
};
}
private function setDebug(_arg1:Boolean):void{
this.debug = _arg1;
if (this.debug){
this.eof = "\n";
} else {
this.eof = "";
};
}
private function xml2obj(_arg1:XML, _arg2:Object):void{
var _local3:int;
var _local4:XMLList;
var _local5:String;
var _local6:XML;
var _local7:String;
var _local8:String;
var _local9:String;
var _local10:String;
var _local11:String;
_local3 = 0;
_local4 = _arg1.children();
for each (_local6 in _local4) {
_local5 = _local6.name().toString();
if (_local5 == "obj"){
_local7 = _local6.@o;
_local8 = _local6.@t;
if (_local8 == "a"){
_arg2[_local7] = [];
} else {
if (_local8 == "o"){
_arg2[_local7] = {};
};
};
xml2obj(_local6, _arg2[_local7]);
} else {
if (_local5 == "var"){
_local9 = _local6.@n;
_local10 = _local6.@t;
_local11 = _local6.toString();
if (_local10 == "b"){
_arg2[_local9] = ((_local11 == "0")) ? false : true;
} else {
if (_local10 == "n"){
_arg2[_local9] = Number(_local11);
} else {
if (_local10 == "s"){
_arg2[_local9] = _local11;
} else {
if (_local10 == "x"){
_arg2[_local9] = null;
};
};
};
};
};
};
};
}
private function encodeEntities(_arg1:String):String{
return (_arg1);
}
public function deserialize(_arg1:String):Object{
var _local2:XML;
var _local3:Object;
_local2 = new XML(_arg1);
_local3 = {};
xml2obj(_local2, _local3);
return (_local3);
}
public static function getInstance(_arg1:Boolean=false):ObjectSerializer{
if (instance == null){
instance = new ObjectSerializer(_arg1);
};
return (instance);
}
}
}//package it.gotoandplay.smartfoxserver.util
Section 59
//SFSEvent (it.gotoandplay.smartfoxserver.SFSEvent)
package it.gotoandplay.smartfoxserver {
import flash.events.*;
public class SFSEvent extends Event {
public var params:Object;
public static const onRoomLeft:String = "onRoomLeft";
public static const onBuddyListUpdate:String = "onBuddyListUpdate";
public static const onUserLeaveRoom:String = "onUserLeaveRoom";
public static const onRoomListUpdate:String = "onRoomListUpdate";
public static const onRoundTripResponse:String = "onRoundTripResponse";
public static const onExtensionResponse:String = "onExtensionResponse";
public static const onConnection:String = "onConnection";
public static const onBuddyListError:String = "onBuddyListError";
public static const onJoinRoom:String = "onJoinRoom";
public static const onUserEnterRoom:String = "onUserEnterRoom";
public static const onBuddyRoom:String = "onBuddyRoom";
public static const onAdminMessage:String = "onAdminMessage";
public static const onPublicMessage:String = "onPublicMessage";
public static const onModeratorMessage:String = "onModMessage";
public static const onPrivateMessage:String = "onPrivateMessage";
public static const onJoinRoomError:String = "onJoinRoomError";
public static const onRoomAdded:String = "onRoomAdded";
public static const onLogin:String = "onLogin";
public static const onSpectatorSwitched:String = "onSpectatorSwitched";
public static const onRoomDeleted:String = "onRoomDeleted";
public static const onConnectionLost:String = "onConnectionLost";
public static const onBuddyList:String = "onBuddyList";
public static const onRoomVariablesUpdate:String = "onRoomVariablesUpdate";
public static const onCreateRoomError:String = "onCreateRoomError";
public static const onUserCountChange:String = "onUserCountChange";
public static const onUserVariablesUpdate:String = "onUserVariablesUpdate";
public static const onRandomKey:String = "onRandomKey";
public static const onObjectReceived:String = "onObjectReceived";
public function SFSEvent(_arg1:String, _arg2:Object){
super(_arg1);
this.params = _arg2;
}
override public function toString():String{
return (formatToString("SFSEvent", "type", "bubbles", "cancelable", "eventPhase", "params"));
}
override public function clone():Event{
return (new SFSEvent(this.type, this.params));
}
}
}//package it.gotoandplay.smartfoxserver
Section 60
//SmartFoxClient (it.gotoandplay.smartfoxserver.SmartFoxClient)
package it.gotoandplay.smartfoxserver {
import flash.events.*;
import it.gotoandplay.smartfoxserver.handlers.*;
import it.gotoandplay.smartfoxserver.data.*;
import it.gotoandplay.smartfoxserver.util.*;
import 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 61
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 62
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 63
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 64
//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 65
//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 66
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject {
private var _measuredWidth:Number;
private var _measuredHeight:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function MovieClipAsset(){
_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 67
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 68
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 69
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject {
private var _measuredWidth:Number;
private var _measuredHeight:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 70
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import flash.utils.*;
import mx.core.*;
public class NameUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local3:DisplayObject;
var _local4:String;
var _local5:Array;
_local3 = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
var _local2:String;
var _local3:int;
var _local4:int;
if (!_arg1){
return (null);
};
_local2 = getQualifiedClassName(_arg1);
_local3 = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
_local4 = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 71
//OGBitmapFactory (RES.OBJECTS.OGDISPLAY.OGBitmapFactory)
package RES.OBJECTS.OGDISPLAY {
public class OGBitmapFactory {
private var iBitmapFishShadow:Array;
private var iBitmapMaker:OItemMakerSprite;
private var iBitmapFish:Array;
private var iFishParam:Array;
private var iColorList:Array;
public function OGBitmapFactory(_arg1:Array){
iColorList = _arg1[0];
iFishParam = _arg1[1];
iBitmapFish = new Array();
iBitmapFishShadow = new Array();
}
public function GetFishShadowBitmap(_arg1:int):Array{
if (iBitmapFishShadow[_arg1] == null){
iBitmapFishShadow[_arg1] = GenerateListFishShadowBitmap(_arg1);
};
return (iBitmapFishShadow[_arg1]);
}
private function GenerateListFishBitmap(_arg1:int, _arg2:int=20):Array{
var _local3:Array;
var _local4:int;
var _local5:Number;
var _local6:int;
_local3 = new Array();
_local4 = iFishParam[0];
_local5 = (_local4 / _arg2);
_local6 = 0;
while (_local6 < _arg2) {
_local3.push(OGGShape.BubbleCreate([null, (_local4 - (_local5 * _local6)), iColorList[_arg1]]));
_local6++;
};
return (_local3);
}
private function GenerateListFishShadowBitmap(_arg1:int, _arg2:int=20):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
_local3 = new Array();
_local4 = iFishParam[0];
_local5 = (_local4 / _arg2);
_local6 = 0;
while (_local6 < _arg2) {
_local3.push(OGGShape.BubbleShadowCreate([null, (_local4 - (_local5 * _local6)), iColorList[_arg1]]));
_local6++;
};
return (_local3);
}
public function GetFishBitmap(_arg1:int):Array{
if (iBitmapFish[_arg1] == null){
iBitmapFish[_arg1] = GenerateListFishBitmap(_arg1);
};
return (iBitmapFish[_arg1]);
}
}
}//package RES.OBJECTS.OGDISPLAY
Section 72
//OGGShape (RES.OBJECTS.OGDISPLAY.OGGShape)
package RES.OBJECTS.OGDISPLAY {
import ENGINE.DISPLAY.*;
import flash.display.*;
import flash.geom.*;
public class OGGShape extends OSprite {
public static var Points:Array;
public static var AlphaLine:Number = 1;
public static var GridAlpha:Number = 0.1;
public static var GridColor:int = 136;
public static var AlphaFill:Number = 1;
public static var color:int = 0;
public function OGGShape(){
this.addChild(DrawFigure(Points));
}
public static function DrawDoubleCircle(_arg1:Array):OSprite{
var _local2:Number;
var _local3:Number;
var _local4:Boolean;
var _local5:Boolean;
var _local6:OSprite;
_local2 = _arg1[1][0];
_local3 = _arg1[1][1];
_local4 = _arg1[2];
_local5 = _arg1[3];
_local6 = _arg1[4];
if (!_local6){
_local6 = new OSprite();
};
DrawCircle([null, [_local2, _arg1[1][2], _arg1[1][3]], _local4, false, _local6]);
DrawCircle([null, [_local3, _arg1[1][2], _arg1[1][3]], false, _local5, _local6]);
return (_local6);
}
public static function BubbleCreate(_arg1:Array):OBitmap{
var _local2:Number;
var _local3:Number;
var _local4:int;
var _local5:Sprite;
var _local6:DisplayObject;
var _local7:Array;
_local2 = (_arg1[1] / 100);
_local3 = (_arg1[1] / 100);
_local4 = _arg1[2];
_local5 = new ((LinkzL.OBubble as Class));
_local6 = _local5.getChildAt(0);
_local7 = _local6.filters;
_local7[0].color = ODisplay.HSBToRGB(_local4, 1, 0.84);
_local7[0].blurX = (_local7[0].blurX * _local3);
_local7[0].blurY = (_local7[0].blurY * _local3);
_local7[0].distance = (_local7[0].distance * _local3);
_local6.filters = _local7;
_local6 = _local5.getChildAt(1);
_local7 = _local6.filters;
_local7[0].color = ODisplay.HSBToRGB(_local4, 0.42, 1);
_local7[0].blurX = (_local7[0].blurX * _local3);
_local7[0].blurY = (_local7[0].blurY * _local3);
_local7[0].distance = (_local7[0].distance * _local3);
_local6.filters = _local7;
_local6 = _local5.getChildAt(2);
_local7 = _local6.filters;
_local7[0].color = ODisplay.HSBToRGB(_local4, 0.33, 1);
_local7[0].blurX = (_local7[0].blurX * _local3);
_local7[0].blurY = (_local7[0].blurY * _local3);
_local7[0].distance = (_local7[0].distance * _local3);
_local6.filters = _local7;
_local6 = _local5.getChildAt(4);
_local7 = _local6.filters;
_local7[0].highlightColor = ODisplay.HSBToRGB(_local4, 0.16, 1);
_local7[0].blurX = (_local7[0].blurX * _local2);
_local7[0].blurY = (_local7[0].blurY * _local2);
_local7[0].distance = (_local7[0].distance * _local2);
_local6.filters = _local7;
return (OBitmap.MakeTmp(_local5, _local2, 0, 0, 2));
}
public static function DrawFigure1(_arg1:Array):OSprite{
return (DrawFigure(_arg1[1], _arg1[2], _arg1[3], _arg1[4]));
}
public static function SizeArea(_arg1:Array):Point{
var _local2:Point;
var _local3:Point;
var _local4:int;
var _local5:int;
_local2 = new Point();
_local3 = new Point();
_local4 = 0;
while (_local4 < _arg1.length) {
_local5 = _local4;
while (_local5 < _arg1.length) {
_local3.x = Math.abs((_arg1[_local5].x - _arg1[_local4].x));
_local3.y = Math.abs((_arg1[_local5].y - _arg1[_local4].y));
_local2.x = ((_local2.x)>_local3.x) ? _local2.x : _local3.x;
_local2.y = ((_local2.y)>_local3.y) ? _local2.y : _local3.y;
_local5++;
};
_local4++;
};
return (_local2);
}
public static function BubbleShadowCreate(_arg1:Array):OBitmap{
var _local2:Number;
var _local3:Sprite;
_local2 = (_arg1[1] / 100);
_local3 = new ((LinkzL.OBubbleShadow as Class));
return (OBitmap.MakeTmp(_local3, _local2, (32 * _local2), (32 * _local2), 4));
}
public static function DrawCircle(_arg1:Array):OSprite{
var _local2:Number;
var _local3:Boolean;
var _local4:Boolean;
var _local5:OSprite;
var _local6:Number;
_local2 = _arg1[1][0];
_local3 = _arg1[2];
_local4 = _arg1[3];
_local5 = _arg1[4];
_local6 = (_arg1[5]) ? 0 : 1;
if (!_local5){
_local5 = new OSprite();
};
if (_local3){
_local5.graphics.beginFill(0, _local6);
};
_local5.graphics.drawCircle(_arg1[1][1], _arg1[1][2], _local2);
if (_local4){
_local5.graphics.endFill();
};
return (_local5);
}
public static function MinArea(_arg1:Array):Point{
var _local2:Point;
var _local3:int;
_local2 = new Point();
if (_arg1.length > 0){
_local2 = _arg1[0].clone();
};
_local3 = 0;
while (_local3 < _arg1.length) {
_local2.x = ((_local2.x)>_arg1[_local3].x) ? _arg1[_local3].x : _local2.x;
_local2.y = ((_local2.y)>_arg1[_local3].y) ? _arg1[_local3].y : _local2.y;
_local3++;
};
return (_local2);
}
public static function DrawFigure(_arg1:Array, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:OSprite=null):OSprite{
var _local5:int;
if (!_arg4){
_arg4 = new OSprite();
};
if (_arg2){
_arg4.graphics.beginFill(color, AlphaFill);
};
_arg4.graphics.lineStyle(1, GridColor, AlphaLine);
_arg4.graphics.moveTo(Scale(_arg1[0].x), Scale(_arg1[0].y));
_local5 = 1;
while (_local5 < _arg1.length) {
_arg4.graphics.lineTo(Scale(_arg1[_local5].x), Scale(_arg1[_local5].y));
_local5++;
};
_arg4.graphics.lineTo(Scale(_arg1[0].x), Scale(_arg1[0].y));
if (_arg3){
_arg4.graphics.endFill();
};
_arg4.Pos(0, 0);
return (_arg4);
}
public static function Scale(_arg1:Number):Number{
return (_arg1);
}
public static function DrawArreaWithBitmap(_arg1:Array):OSprite{
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Boolean;
var _local8:Boolean;
var _local9:OSprite;
var _local10:Point;
var _local11:BitmapData;
var _local12:Point;
var _local13:Array;
var _local14:int;
var _local15:Sprite;
var _local16:Rectangle;
var _local17:Bitmap;
var _local18:Point;
_local2 = _arg1[1][0];
_local3 = (_arg1[1][1] - 2);
_local4 = _arg1[1][2];
_local5 = _arg1[1][3];
_local6 = _arg1[1][4];
_local7 = _arg1[2];
_local8 = _arg1[3];
_local9 = _arg1[4];
_local10 = SizeArea(_local2);
_local11 = new BitmapData(_local10.x, _local10.y, true, 0xFFFFFF);
_local12 = MinArea(_local2);
_local13 = new Array();
_local14 = 0;
while (_local14 < _local2.length) {
_local18 = new Point((_local2[_local14].x - _local12.x), (_local2[_local14].y - _local12.y));
_local13.push(_local18);
_local14++;
};
_local15 = DrawFigure1([null, _local13, true, true, null]);
_local16 = new Rectangle(_local12.x, _local12.y, _local10.x, _local10.y);
_local11.draw(_local15, null, null, BlendMode.NORMAL);
_local14 = 0;
while (_local14 < _local13.length) {
_local11.draw(DrawCircle([null, [_local4, _local13[_local14].x, _local13[_local14].y], true, true, null]), null, null, BlendMode.ERASE);
_local14++;
};
_local14 = 0;
while (_local14 < (_local13.length - 1)) {
_local11.draw(DrawLinesWithoutCircle([null, [(_local13[(_local14 + 1)].x - _local13[_local14].x), (_local13[(_local14 + 1)].y - _local13[_local14].y), _local3, _local4, _local13[_local14].x, _local13[_local14].y], true, true, null]), null, null, BlendMode.ERASE);
_local14++;
};
_local11.draw(DrawLinesWithoutCircle([null, [(_local13[0].x - _local13[_local14].x), (_local13[0].y - _local13[_local14].y), _local3, _local4, _local13[_local14].x, _local13[_local14].y], true, true, null]), null, null, BlendMode.ERASE);
if (!_local9){
_local9 = new OSprite();
};
_local17 = new Bitmap(_local11);
_local17.x = _local12.x;
_local17.y = _local12.y;
_local9.addChild(_local17);
return (_local9);
}
public static function PointsSquadre(_arg1:Array):Array{
var _local2:int;
var _local3:int;
var _local4:Array;
_local2 = _arg1[0];
_local3 = (_local2 / 2);
_local4 = new Array();
_local4.push(new Point(-(_local3), -(_local3)));
_local4.push(new Point(_local3, -(_local3)));
_local4.push(new Point(_local3, _local3));
_local4.push(new Point(-(_local3), _local3));
return (_local4);
}
public static function MakeBitmapFigure(_arg1:Array):OBitmap{
return (ODisplay.OBitmapMake([null, _arg1[1], 1, "GEL", _arg1[2], _arg1[3], _arg1[4], 0, 0]));
}
public static function DrawLines(_arg1:Array):OSprite{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Boolean;
var _local11:Boolean;
var _local12:OSprite;
var _local13:Number;
_local2 = _arg1[1][0];
_local3 = _arg1[1][1];
_local4 = (_arg1[1][2] / 2);
_local5 = _arg1[1][3];
_local6 = _arg1[1][4];
_local7 = (Math.atan2(_local3, _local2) + (Math.PI / 2));
_local8 = (_local4 * Math.cos(_local7));
_local9 = (_local4 * Math.sin(_local7));
_local10 = _arg1[2];
_local11 = _arg1[3];
_local12 = _arg1[4];
_local13 = (_arg1[5]) ? 0 : 1;
if (!_local12){
_local12 = new OSprite();
};
if (_local10){
_local12.graphics.beginFill(0);
};
_local12.graphics.moveTo((_local5 - _local8), (_local6 - _local9));
_local12.graphics.lineTo((_local5 + _local8), (_local6 + _local9));
_local12.graphics.lineTo(((_local5 + _local2) + _local8), ((_local6 + _local3) + _local9));
_local12.graphics.lineTo(((_local5 + _local2) - _local8), ((_local6 + _local3) - _local9));
_local12.graphics.lineTo((_local5 - _local8), (_local6 - _local9));
if (_local11){
_local12.graphics.endFill();
};
return (_local12);
}
public static function DrawLinesWithoutCircle(_arg1:Array):OSprite{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Boolean;
var _local19:Boolean;
var _local20:OSprite;
_local2 = _arg1[1][0];
_local3 = _arg1[1][1];
_local4 = _arg1[1][2];
_local5 = _arg1[1][3];
_local6 = _arg1[1][4];
_local7 = _arg1[1][5];
_local8 = (Math.atan2(_local3, _local2) + (Math.PI / 2));
_local9 = Math.asin((_local4 / (2 * _local5)));
_local10 = ((_local4 * Math.cos(_local8)) / 2);
_local11 = ((_local4 * Math.sin(_local8)) / 2);
_local12 = (_local5 * Math.cos(_local9));
_local13 = (_local12 * Math.cos((_local8 - (Math.PI / 2))));
_local14 = (_local12 * Math.sin((_local8 - (Math.PI / 2))));
_local15 = (_local5 / Math.cos(_local9));
_local16 = (_local15 * Math.cos((_local8 - (Math.PI / 2))));
_local17 = (_local15 * Math.sin((_local8 - (Math.PI / 2))));
_local18 = _arg1[2];
_local19 = _arg1[3];
_local20 = _arg1[4];
if (!_local20){
_local20 = new OSprite();
};
if (_local18){
_local20.graphics.beginFill(0, 1);
};
_local20.graphics.moveTo(((_local6 - _local10) + _local13), ((_local7 - _local11) + _local14));
_local20.graphics.curveTo((_local6 + _local16), (_local7 + _local17), ((_local6 + _local10) + _local13), ((_local7 + _local11) + _local14));
_local20.graphics.lineTo((((_local6 + _local2) + _local10) - _local13), (((_local7 + _local3) + _local11) - _local14));
_local20.graphics.curveTo(((_local6 + _local2) - _local16), ((_local7 + _local3) - _local17), (((_local6 + _local2) - _local10) - _local13), (((_local7 + _local3) - _local11) - _local14));
_local20.graphics.lineTo(((_local6 - _local10) + _local13), ((_local7 - _local11) + _local14));
if (_local18){
_local20.graphics.endFill();
};
return (_local20);
}
}
}//package RES.OBJECTS.OGDISPLAY
Section 73
//OItemMaker (RES.OBJECTS.OGDISPLAY.OItemMaker)
package RES.OBJECTS.OGDISPLAY {
import ENGINE.DISPLAY.*;
import flash.display.*;
import ENGINE.DISPLAY.EFFECTS.*;
public class OItemMaker {
protected var iIteration:int;// = 300
protected var iColor:String;// = "white"
protected var iSize:Number;// = 50
protected var iTimer:int;// = 0
protected var iFScale:Number;// = 1
protected var iSprite:Sprite;
protected var iDropType:int;// = 0
protected var iDropState:int;// = 4
private static var iScaleFactors:Array = [0.3, 0.5, 0.75, 1];
public function OItemMaker(){
iSize = 50;
iColor = "white";
iFScale = 1;
iDropType = 0;
iDropState = 4;
iIteration = 300;
iTimer = 0;
super();
this.iSprite = new Sprite();
}
public function Animation():Boolean{
if (this.iTimer >= this.iIteration){
return (false);
};
return (true);
}
public function InitAnimation(_arg1:Number, _arg2:String, _arg3:int, _arg4:int, _arg5, _arg6:Number, _arg7):void{
this.iSize = _arg1;
this.iColor = _arg2;
this.iDropType = _arg3;
this.iDropState = _arg4;
if (this.iDropType != 1){
this.iFScale = (((this.iSize / 48) * OItemMaker.ScaleFactor((this.iDropState - 1))) * _arg6);
} else {
this.iFScale = (((this.iSize / 48) * OItemMaker.ScaleFactor(0)) * _arg6);
};
this.iTimer = 0;
this.iIteration = 30;
}
public function DrawSprite():void{
}
public function Make(_arg1:Array, _arg2:Array, _arg3:Number, _arg4:String, _arg5:int, _arg6:int, _arg7, _arg8:Number, _arg9):void{
var _local10:int;
var _local11:OEffect;
var _local12:Array;
var _local13:Array;
_local10 = 0;
this.InitAnimation(_arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9);
_local11 = OEffects.GetEffect("DROP");
_local11.Init(this.iColor, "normal", this.iFScale);
while (Animation()) {
DrawSprite();
_local12 = [ODisplay.SpriteLib, this.iSprite];
_local13 = [ODisplay.SpriteScale, _local12, 1, 0, 0, 0];
var _temp1 = _local10;
_local10 = (_local10 + 1);
var _local14 = _temp1;
_arg1[_local14] = new OBitmap(_local11.Apply(_local13));
};
}
public static function ScaleFactor(_arg1:Number):Number{
return (((((_arg1 < 0)) || ((_arg1 > 3)))) ? 1 : OItemMaker.iScaleFactors[_arg1]);
}
}
}//package RES.OBJECTS.OGDISPLAY
Section 74
//OItemMakerSprite (RES.OBJECTS.OGDISPLAY.OItemMakerSprite)
package RES.OBJECTS.OGDISPLAY {
import flash.display.*;
public class OItemMakerSprite extends OItemMaker {
private var iPScale:Number;// = 100
private var iDSprite:Sprite;
private var iScale:Number;// = 100
private var iFrScale:Number;// = 0
private var iVScale:Number;// = 0
public function OItemMakerSprite(){
iScale = 100;
iPScale = 100;
iVScale = 0;
iFrScale = 0;
super();
}
override public function DrawSprite():void{
this.iDSprite.scaleX = this.iScale;
this.iDSprite.scaleY = this.iScale;
}
override public function Animation():Boolean{
if (this.iTimer >= this.iIteration){
return (false);
};
this.iScale = (this.iScale + this.iVScale);
this.iFrScale = ((this.iPScale - this.iScale) * 0.5);
this.iVScale = (this.iVScale + this.iFrScale);
this.iVScale = (this.iVScale * 0.75);
if (Math.abs(this.iVScale) < 0.0001){
this.iIteration = this.iTimer;
} else {
this.iTimer++;
};
return (true);
}
override public function InitAnimation(_arg1:Number, _arg2:String, _arg3:int, _arg4:int, _arg5, _arg6:Number, _arg7):void{
super.InitAnimation(_arg1, _arg2, _arg3, _arg4, null, _arg6, null);
if (this.iDSprite){
this.iSprite.removeChild(this.iDSprite);
};
this.iDSprite = ((_arg5 is Sprite)) ? (_arg5 as Sprite) : new ((_arg5 as Class));
this.iSprite.addChild(this.iDSprite);
this.iDSprite.x = (this.iSize / 2);
this.iDSprite.y = (this.iSize / 2);
this.iPScale = ((this.iSize / 50) * OItemMaker.ScaleFactor((_arg4 - 1)));
this.iScale = (this.iPScale - 0.2);
this.iVScale = 0;
this.iFrScale = 0;
this.iTimer = 0;
}
}
}//package RES.OBJECTS.OGDISPLAY
Section 75
//OGArea (RES.OBJECTS.OGRAPHIC.WIDGETS.OGArea)
package RES.OBJECTS.OGRAPHIC.WIDGETS {
import ENGINE.DISPLAY.*;
import flash.geom.*;
import RES.OBJECTS.OGDISPLAY.*;
public class OGArea extends OGWidget {
private var iColorInd:int;
private var iBitmaps:Array;
private var iActive:int;
public function OGArea(_arg1:Array, _arg2:Number=1){
var _local3:Array;
var _local4:Array;
var _local5:int;
var _local6:OSprite;
var _local7:Number;
iColorInd = 0;
this.iFHitArea = [OGGShape.DrawArreaWithBitmap, [null, _arg1[2], _arg1[1], 0, 0], true, true, null];
super(_arg1, _arg2);
this.prX = iDispParam[0][0].prX;
this.prY = iDispParam[0][0].prY;
_local3 = iDispParam[0];
_local4 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local4.push(new Point((_local3[_local5].prX - _local3[0].prX), (_local3[_local5].prY - _local3[0].prY)));
_local5++;
};
this.iFHitArea[1][0] = _local4;
_local6 = iFHitArea[0](iFHitArea);
_local7 = Math.min(_local6.width, _local6.height);
this.iFDisplay = [OGGShape.MakeBitmapFigure, [ODisplay.SpriteLib, _local6], "yellow", "spanel ns", (2 * _arg2)];
iBitmaps = [[], []];
}
public function get ActiveState():int{
return (iColorInd);
}
override public function Redraw():void{
}
public function set ActiveState(_arg1:int):void{
Redraw();
}
override public function Free():void{
super.Free();
}
public function get ColorInd():int{
return (iColorInd);
}
public function set ColorInd(_arg1:int):void{
iColorInd = _arg1;
this.ClearChildren();
this.addChild(GetPicture(iColorInd));
}
private function GetPicture(_arg1:int, _arg2:int=0):OBitmap{
var _local3:OBitmap;
if (!iBitmaps[_arg2][_arg1]){
this.iFDisplay[2] = LinkzL.iGameColor[_arg1];
_local3 = iFDisplay[0](iFDisplay);
iBitmaps[_arg2][_arg1] = _local3;
};
return (iBitmaps[_arg2][_arg1]);
}
}
}//package RES.OBJECTS.OGRAPHIC.WIDGETS
Section 76
//OGFieldBilder (RES.OBJECTS.OGRAPHIC.WIDGETS.OGFieldBilder)
package RES.OBJECTS.OGRAPHIC.WIDGETS {
import ENGINE.DISPLAY.*;
import flash.display.*;
import flash.geom.*;
import RES.OBJECTS.UTILS.*;
import RES.OBJECTS.OGRAPHIC.*;
import ENGINE.CORE.*;
public class OGFieldBilder {
public static function Build(_arg1:Array, _arg2:OGField, _arg3:Number):void{
var _local4:OGField;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:OBitmap;
var _local9:int;
var _local10:DisplayObjectContainer;
var _local11:int;
var _local12:OUniqueArray;
_local4 = _arg2;
if (_arg1.length == 4){
_local5 = new Array();
_local6 = new Array();
for each (_local7 in _arg1[0]) {
_local5.push(_local4.AddKnotInGrid(new Point(_local7[0], _local7[1])));
};
for each (_local7 in _arg1[1]) {
_local6.push(_local4.AddLink([_local5[_local7[0]], _local5[_local7[1]]]));
};
_local8 = ODisplay.OBitmapMake([null, [ODisplay.SpriteLib, _local4], (1 / OGlobal.Scale), "GEL", "yellow", "border", _arg3, 0, 0]);
_local9 = 0;
while (_local9 < _local4.numChildren) {
_local10 = DisplayObjectContainer(_local4.getChildAt(_local9));
_local11 = 0;
while (_local11 < _local10.numChildren) {
_local10.getChildAt(_local11).visible = false;
_local11++;
};
_local9++;
};
_local4.addChildAt(_local8, 0);
for each (_local7 in _arg1[2]) {
_local12 = new OUniqueArray();
_local9 = 1;
while (_local9 < _local7.length) {
_local12.push(_local6[_local7[_local9]]);
_local9++;
};
_local4.AddArea(_local12, _local7[0]);
};
};
}
}
}//package RES.OBJECTS.OGRAPHIC.WIDGETS
Section 77
//OGFish (RES.OBJECTS.OGRAPHIC.WIDGETS.OGFish)
package RES.OBJECTS.OGRAPHIC.WIDGETS {
import ENGINE.DISPLAY.*;
import RES.OBJECTS.OGDISPLAY.*;
public class OGFish extends OGWidget {
private var iBitmapShadow:OBitmap;
private var iBitmapArray:Array;
private var iCol:int;
private var iDBmMax:int;// = 19
private var iBitmapFactory:OGBitmapFactory;
private var iBitmapShadowArray:Array;
private var iDBmInc:int;
private var iDBmInd:int;
private var iTickCounter:int;// = 0
public function OGFish(_arg1:Array, _arg2:OGBitmapFactory){
var _local3:Number;
var _local4:int;
iDBmMax = 19;
iTickCounter = 0;
_local3 = _arg1[0];
_local4 = _arg1[1];
iBitmapFactory = _arg2;
this.iFHitArea = [OGGShape.DrawCircle, [_local3, 0, 0], true, true, null];
this.iFDisplay = [GetBitmap, _local4];
super(_arg1, 0);
iCol = _local4;
}
public function GetBitmap(_arg1:Array):OBitmap{
var _local2:OBitmap;
_local2 = new OBitmap();
(iBitmapArray = iBitmapFactory.GetFishBitmap(_arg1[1]));
(iBitmapShadowArray = iBitmapFactory.GetFishShadowBitmap(_arg1[1]));
(iBitmapShadow = new OBitmap());
iBitmapShadow.CopyFrom(iBitmapShadowArray[iDBmMax]);
this.addChild(iBitmapShadow);
_local2.CopyFrom(iBitmapArray[iDBmMax]);
(iDBmInc = -1);
(iDBmInd = iDBmMax);
return (_local2);
}
override public function Redraw():void{
super.Redraw();
this.hitArea.alpha = 0;
this.hitArea.visible = true;
}
override protected function SplashCell():Boolean{
var _local1:Boolean;
_local1 = false;
if (((!((State == stSplash))) || ((((State == stSplash)) && (((iTickCounter % 2) == 0)))))){
iDisplayBitmap.Clear();
iDisplayBitmap.CopyFrom(iBitmapArray[iDBmInd]);
iBitmapShadow.CopyFrom(iBitmapShadowArray[iDBmInd]);
if ((((iDBmInc < 0)) && ((iDBmInd == 0)))){
(iDBmInc = 1);
_local1 = true;
_local1;
};
if ((((iDBmInc > 0)) && ((iDBmInd == iDBmMax)))){
(iDBmInc = -1);
_local1 = true;
_local1;
};
(iDBmInd = (iDBmInd + iDBmInc));
};
iTickCounter++;
return (_local1);
}
override public function set State(_arg1:int):void{
this.iState = _arg1;
switch (iState){
case stFree:
break;
case stSplash:
iDBmMax = 10;
break;
case stDeselect:
this.iDBmInc = (-1 * Math.abs(iDBmInc));
break;
case stDelete:
iDBmMax = 19;
Math.abs(iDBmInc);
break;
};
}
public function get Color():int{
return (iCol);
}
}
}//package RES.OBJECTS.OGRAPHIC.WIDGETS
Section 78
//OGKnot (RES.OBJECTS.OGRAPHIC.WIDGETS.OGKnot)
package RES.OBJECTS.OGRAPHIC.WIDGETS {
import ENGINE.CORE.*;
import RES.OBJECTS.OGDISPLAY.*;
public class OGKnot extends OGWidget {
public function OGKnot(_arg1:Array, _arg2:Number){
var _local3:Number;
var _local4:Number;
_local3 = _arg1[0][0];
_local4 = _arg1[0][1];
this.iFHitArea = [OGGShape.DrawCircle, [_local3, 0, 0], true, true, null];
this.iFDisplay = [OGGShape.DrawDoubleCircle, [(_local3 * OGlobal.Scale), (_local4 * OGlobal.Scale), 0, 0], true, true, null];
super(_arg1, _arg2);
}
}
}//package RES.OBJECTS.OGRAPHIC.WIDGETS
Section 79
//OGLink (RES.OBJECTS.OGRAPHIC.WIDGETS.OGLink)
package RES.OBJECTS.OGRAPHIC.WIDGETS {
import flash.geom.*;
import RES.OBJECTS.OGDISPLAY.*;
public class OGLink extends OGWidget {
public function OGLink(_arg1:Array, _arg2:Number){
this.iFHitArea = [OGGShape.DrawLinesWithoutCircle, [0, 0, _arg1[1], _arg1[2], 0, 0], true, true, null];
this.iFDisplay = null;
super(_arg1, _arg2);
}
override public function Redraw():void{
var _local1:Point;
_local1 = new Point((iDispParam[0][1].prX - iDispParam[0][0].prX), (iDispParam[0][1].prY - iDispParam[0][0].prY));
this.Pos(iDispParam[0][0].prX, iDispParam[0][0].prY);
this.iFHitArea[1][0] = _local1.x;
this.iFHitArea[1][1] = _local1.y;
this.iFHitArea[1][2] = iDispParam[1];
this.iFHitArea[1][3] = iDispParam[2];
super.Redraw();
this.hitArea.visible = true;
}
}
}//package RES.OBJECTS.OGRAPHIC.WIDGETS
Section 80
//OGWidget (RES.OBJECTS.OGRAPHIC.WIDGETS.OGWidget)
package RES.OBJECTS.OGRAPHIC.WIDGETS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import RES.OBJECTS.UTILS.*;
import ENGINE.CORE.*;
public class OGWidget extends OIObject {
protected var iFHitArea:Array;
private var iDAlpha:Number;// = 0.05
protected var iFDisplay:Array;
private var iLinkList:OUniqueArray;
private var iLinkWidgets:OUniqueArray;
protected var iDispParam:Array;
protected var iDisplayBitmap:OBitmap;
private var iSplashObj:DisplayObject;
public static const stDelete:int = 4;
public static const stSelected:int = 1;
public static const stFree:int = 0;
public static const stDeselect:int = 3;
public static const stSplash:int = 2;
public function OGWidget(_arg1:Array, _arg2:Number){
iDAlpha = 0.05;
iDispParam = _arg1;
super([]);
this.cacheAsBitmap = true;
this.doubleClickEnabled = true;
}
public function Redraw():void{
var _local1:OSprite;
var _local2:DisplayObject;
ClearChildren();
if (iFHitArea){
_local1 = iFHitArea[0](iFHitArea);
_local1.prVisible = false;
this.addChild(_local1);
_local1.scaleX = (_local1.scaleX * OGlobal.Scale);
_local1.scaleY = (_local1.scaleY * OGlobal.Scale);
this.hitArea = _local1;
};
if (iFDisplay){
_local2 = iFDisplay[0](iFDisplay);
if ((_local2 is OBitmap)){
iDisplayBitmap = OBitmap(_local2);
};
this.addChild(_local2);
};
}
override public function Init():void{
super.Init();
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
iLinkList = new OUniqueArray();
iLinkWidgets = new OUniqueArray();
Redraw();
}
public function set DisplayParam(_arg1:Array):void{
this.iDispParam = _arg1;
}
protected function ClearChildren():void{
while (this.numChildren > 0) {
removeChildAt(0);
};
}
public function get LinkWidgets():OUniqueArray{
return (this.iLinkWidgets);
}
protected function SplashCell():Boolean{
var _local1:Boolean;
_local1 = false;
if (!iSplashObj){
iSplashObj = this;
};
iSplashObj.alpha = (iSplashObj.alpha + this.iDAlpha);
if ((((this.iDAlpha > 0)) && ((iSplashObj.alpha >= 1)))){
iSplashObj.alpha = 1;
this.iDAlpha = (this.iDAlpha * -1);
_local1 = true;
};
if ((((this.iDAlpha < 0)) && ((iSplashObj.alpha <= 0.5)))){
iSplashObj.alpha = 0.5;
this.iDAlpha = (this.iDAlpha * -1);
};
return (_local1);
}
override public function Free():void{
var _local1:OUniqueArray;
for each (_local1 in iLinkList) {
_local1.Remove(this);
};
iFDisplay = null;
iFHitArea = null;
iDispParam = null;
iLinkList = null;
iLinkWidgets = null;
super.Free();
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
switch (iState){
case stFree:
break;
case stSelected:
break;
case stSplash:
SplashCell();
break;
case stDelete:
case stDeselect:
if (SplashCell()){
this.State = stFree;
};
break;
};
}
override public function set State(_arg1:int):void{
this.iState = _arg1;
switch (iState){
case stFree:
break;
case stSelected:
break;
case stDeselect:
this.iDAlpha = Math.abs(iDAlpha);
break;
};
}
public function get LinkList():OUniqueArray{
return (this.iLinkList);
}
}
}//package RES.OBJECTS.OGRAPHIC.WIDGETS
Section 81
//OGField (RES.OBJECTS.OGRAPHIC.OGField)
package RES.OBJECTS.OGRAPHIC {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import RES.OBJECTS.OGRAPHIC.WIDGETS.*;
import RES.OBJECTS.UTILS.*;
import RES.OBJECTS.OLOGIC.*;
import RES.OBJECTS.OGDISPLAY.*;
import RES.WINDOWS.PANELS.*;
public class OGField extends OPanel {
private var iKnots:Array;
private var iFishs:Array;
private var iGridController:OLGridController;
private var iRadius:int;
private var iScale:Number;
private var iFishTypeCount:int;
private var iSeed:int;
private var iAssociate:OMap;
private var iBitmapFactory:OGBitmapFactory;
private var iGP:Array;
private var iGrid:OGGrid;
private var iLinkWidth:int;
private var iLogicField:OLGrid;
private var iScore:int;
public function OGField(_arg1:Array, _arg2:Array, _arg3:int){
iGP = _arg2;
iSeed = _arg3;
super(_arg1);
}
public function RemoveWidget(_arg1:OGWidget):void{
var _local2:Array;
var _local3:ILWidget;
var _local4:OGWidget;
_local2 = iLogicField.RemoveWidget(iAssociate.GetValue(_arg1));
for each (_local3 in _local2) {
_local4 = iAssociate.GetValue(_local3);
iAssociate.Remove(_local4);
this.removeChild(_local4);
_local4.Free();
_local4 = null;
};
_arg1.Free();
_arg1 = null;
}
public function MoveKnot(_arg1:OGKnot):void{
var _local2:Array;
var _local3:ILWidget;
AttachToGrid(_arg1);
_local2 = iLogicField.Dependent(iAssociate.GetValue(_arg1));
for each (_local3 in _local2) {
OGWidget(iAssociate.GetValue(_local3)).Redraw();
};
}
public function AddKnotInGrid(_arg1:Point):OGKnot{
return (AddKnot(iGrid.GetCoord(_arg1)));
}
public function AddLink(_arg1:Array):OGLink{
var _local2:OLLink;
var _local3:OGLink;
_local2 = iLogicField.NewLink([iAssociate.GetValue(_arg1[0]), iAssociate.GetValue(_arg1[1])]);
_local3 = new OGLink([_arg1, iLinkWidth, (iRadius * 0.9)], iScale);
iAssociate.Add(_local2, _local3);
this.addChild(_local3);
return (_local3);
}
public function SetColorArea(_arg1:OGArea, _arg2:int):void{
var _local3:OLArea;
if (_arg1){
_arg1.ColorInd = _arg2;
_local3 = OLArea(iAssociate.GetValue(_arg1));
_local3.ColorInd = _arg2;
if (_local3.Open){
_arg1.State = OGWidget.stDeselect;
_arg1.ColorInd = 0;
_local3.OpenColor = 0;
} else {
_arg1.State = OGWidget.stSelected;
_local3.ColorInd = 0;
_arg1.ColorInd = _local3.OpenColor;
};
};
}
public function IsLink(_arg1:OGWidget, _arg2:OGWidget):OGWidget{
var _local3:OGWidget;
var _local4:OLKnot;
var _local5:OLKnot;
var _local6:OLLink;
var _local7:OLKnot;
var _local8:OLLink;
var _local9:OLLink;
_local3 = null;
if ((((_arg1 is OGKnot)) && ((_arg2 is OGKnot)))){
_local4 = iAssociate.GetValue(_arg1);
_local5 = iAssociate.GetValue(_arg2);
for each (_local6 in _local4.Links) {
for each (_local7 in _local6.Knots) {
if (_local7 == _local5){
_local3 = iAssociate.GetValue(_local6);
};
};
};
};
if ((((_arg1 is OGLink)) && ((_arg2 is OGLink)))){
_local8 = iAssociate.GetValue(_arg1);
_local9 = iAssociate.GetValue(_arg2);
for each (_local7 in _local8.Knots) {
for each (_local6 in _local7.Links) {
if (_local6 == _local9){
_local3 = iAssociate.GetValue(_local7);
};
};
};
};
return (_local3);
}
public function AddFish(_arg1:OLFish):OGFish{
var _local2:OGFish;
var _local3:OGKnot;
_local2 = new OGFish([(iRadius - (iLinkWidth / 2)), _arg1.Value], iBitmapFactory);
iAssociate.Add(_arg1, _local2);
_local3 = iAssociate.GetValue(_arg1.Knot);
_local2.Pos(_local3.prX, _local3.prY);
this.addChild(_local2);
return (_local2);
}
public function get Score():int{
return (iScore);
}
override public function Free():void{
super.Free();
iAssociate.Free();
iKnots = null;
iFishs = null;
iKnots = null;
iGrid.Free();
}
public function get Knot():Array{
return (iKnots);
}
public function AddKnot(_arg1:Point):OGKnot{
var _local2:OLKnot;
var _local3:OGKnot;
_local2 = iLogicField.NewKnot();
_local3 = new OGKnot([[iRadius, (iRadius - iLinkWidth)]], iScale);
iAssociate.Add(_local2, _local3);
_local3.prX = _arg1.x;
_local3.prY = _arg1.y;
AttachToGrid(_local3);
this.addChild(_local3);
return (_local3);
}
public function AddArea(_arg1:Array, _arg2:int):OGArea{
var _local3:OUniqueArray;
var _local4:OUniqueArray;
var _local5:OUniqueArray;
var _local6:OGLink;
var _local7:OLArea;
var _local8:OGArea;
var _local9:OLLink;
var _local10:OUniqueArray;
var _local11:OLKnot;
var _local12:OGKnot;
_local3 = new OUniqueArray();
_local4 = new OUniqueArray();
_local5 = new OUniqueArray();
for each (_local6 in _arg1) {
_local9 = iAssociate.GetValue(_local6);
_local5.Add(_local9);
_local10 = OLLink(_local9).Knots;
for each (_local11 in _local10) {
if (_local3.Add(_local11)){
_local12 = iAssociate.GetValue(_local11);
_local4.Add(_local12);
};
};
};
_local7 = iLogicField.NewArea(_local5, _arg2);
_local8 = new OGArea([_local4, (iRadius * 0.9), iLinkWidth], iScale);
iAssociate.Add(_local7, _local8);
this.addChildAt(_local8, 0);
_local8.ColorInd = _arg2;
_local8.State = OGWidget.stSelected;
return (_local8);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
super.OnEnterFrame(_arg1);
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is OGWidget)){
OGWidget(_local3).OnEnterFrame(_arg1);
};
_local2++;
};
}
private function AttachToGrid(_arg1:OGKnot):Point{
var _local2:Array;
_local2 = this.iGrid.GetNearestCell(new Point(_arg1.x, _arg1.y));
if (((!((_arg1.prX == _local2[0].x))) || (!((_arg1.prY == _local2[0].y))))){
_arg1.Pos(_local2[0].x, _local2[0].y);
};
iAssociate.GetValue(_arg1).Pos = _local2[1];
return (_local2[1]);
}
override public function Init():void{
var _local1:OUniqueArray;
var _local2:int;
var _local3:Array;
var _local4:DisplayObject;
super.Init();
iGrid = new OGGrid(iGP, this);
iScale = (iGrid.SizeCell / 40);
iLogicField = new OLGrid();
iAssociate = new OMap();
iKnots = new Array();
iFishs = new Array();
iRadius = (iGrid.SizeCell * 1.5);
iLinkWidth = Math.max(int((0.3 * iRadius)), 4);
iFishTypeCount = iGP[3];
OGFieldBilder.Build(iGP[2], this, (iRadius / 30));
_local1 = iLogicField.GetOpenColors();
_local2 = 1;
while (_local1.length < iFishTypeCount) {
_local1.Add(_local2);
_local2++;
};
_local3 = new Array();
for each (_local2 in _local1) {
_local3.push([_local2, 3]);
};
iGridController = new OLGridController(iLogicField, iSeed, _local3);
_local2 = 0;
while (_local2 < this.numChildren) {
_local4 = this.getChildAt(_local2);
if ((_local4 is OGKnot)){
iKnots.push(_local4);
};
_local2++;
};
iBitmapFactory = new OGBitmapFactory([LinkzL.iGameColorInd, [(iRadius - (iLinkWidth / 6))]]);
}
public function GetFieldState():Array{
var _local1:Array;
_local1 = iLogicField.GetStructure();
return (_local1);
}
public function get GridController():OLGridController{
return (iGridController);
}
public function FindAndClear():Array{
var _local1:Array;
var _local2:Array;
var _local3:OLArea;
var _local4:OLFish;
var _local5:OGArea;
_local1 = new Array();
_local2 = iGridController.Find();
iScore = (iScore + ((_local2[0].length)>1) ? (_local2[0].length * 100) : 0);
for each (_local3 in _local2[0]) {
switch (_local3.Links.length){
case 3:
iScore = (iScore + 10);
break;
case 4:
iScore = (iScore + 40);
break;
default:
iScore = (iScore + ((40 + _local3.Links.length) - (4 * 35)));
break;
};
_local5 = iAssociate.GetValue(_local3);
SetColorArea(_local5, _local3.Links[0].Knots[0].Fish.Value);
};
for each (_local4 in _local2[1]) {
_local1.push(iAssociate.GetValue(_local4));
iLogicField.RemoveWidget(_local4);
};
return (_local1);
}
public function MoveFish(_arg1:OGFish, _arg2:OGKnot):Array{
var _local3:OLFish;
var _local4:OLKnot;
var _local5:Array;
var _local6:Array;
var _local7:OGKnot;
_local3 = iAssociate.GetValue(_arg1);
_local4 = iAssociate.GetValue(_arg2);
_local5 = _local3.Move(_local4);
_local6 = new Array();
for each (_local4 in _local5) {
_local7 = iAssociate.GetValue(_local4);
_local6.unshift(new Point(_local7.prX, _local7.prY));
};
return (_local6);
}
}
}//package RES.OBJECTS.OGRAPHIC
Section 82
//OGFieldGame (RES.OBJECTS.OGRAPHIC.OGFieldGame)
package RES.OBJECTS.OGRAPHIC {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.OBJECTS.OGRAPHIC.WIDGETS.*;
import RES.OBJECTS.UTILS.*;
import ENGINE.CORE.*;
import flash.utils.*;
import RES.OBJECTS.OLOGIC.*;
import RES.OBJECTS.Particle.*;
public class OGFieldGame extends OIObject {
private var iDeleteFishs:Array;
public var iField:OGField;
public var iRecord:String;// = ""
private var iFireFishCount:int;
private var iTimer:int;
private var iMinFishCount:int;
private var iMoveSpeed:Number;
private var iGenerateFishs:Array;
private var iAddFishCount:int;
private var gParticleContainer:CParticleContainer;
private var iReplyFlag:Boolean;
private var iP:Array;
private var iSelFish:OGFish;
private var iRecordTimer:int;
private var iUniFishCount:int;
private var iScore:Number;// = 0
private var iMovePoint:Array;
public static const stNotMove:int = 3;
public static const stNotComplite:int = 7;
public static const stMove:int = 2;
public static const stDelete:int = 4;
public static const stSelectedFish:int = 1;
public static const stGenerate:int = 5;
public static const stWait:int = 0;
public static const stComplite:int = 6;
public function OGFieldGame(_arg1:Array){
iScore = 0;
iRecord = "";
iP = _arg1;
super(LinkzL.OGField, OInterface.iDefSlowAnimators);
gParticleContainer = new CParticleContainer();
this.addChild(gParticleContainer);
}
public function ClickKnot(_arg1:OGKnot):void{
var _local2:Array;
var _local3:int;
var _local4:int;
switch (this.State){
case stSelectedFish:
Recording(1, _arg1);
_local2 = iField.MoveFish(iSelFish, _arg1);
if (_local2.length > 0){
iSelFish.State = OGWidget.stDeselect;
iMovePoint = null;
iMovePoint = _local2;
this.State = stMove;
} else {
_local3 = (iReplyFlag) ? 0 : 10;
_local4 = 0;
while (_local4 < _local3) {
gParticleContainer.addSimpleParticle(iSelFish.Color, _arg1.prX, _arg1.prY);
_local4++;
};
};
break;
};
}
public function IAddArea(_arg1:OUniqueArray, _arg2:int):OGArea{
var _local3:OGArea;
if (_arg1.length > 2){
_local3 = iField.AddArea(_arg1, _arg2);
return (_local3);
};
return (null);
}
public function IAddKnot(_arg1:Point):OGKnot{
var _local2:OGKnot;
_local2 = iField.AddKnotInGrid(_arg1);
return (_local2);
}
public function KoefState():Number{
return (0.5);
}
public function get Score():int{
return (iField.Score);
}
override public function Free():void{
var _local1:Array;
var _local2:OGKnot;
var _local3:int;
var _local4:DisplayObject;
_local1 = iField.Knot;
for each (_local2 in _local1) {
_local2.removeEventListener(MouseEvent.CLICK, OnClickToKnot);
};
_local3 = 0;
while (_local3 < this.numChildren) {
_local4 = this.getChildAt(_local3);
if ((_local4 is OGFish)){
_local4.removeEventListener(MouseEvent.CLICK, OnClickToFish);
};
_local3++;
};
super.Free();
}
public function get SpeedMove():int{
return (iMoveSpeed);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:OGFish;
var _local3:int;
var _local4:int;
var _local5:int;
super.OnEnterFrame(_arg1);
switch (this.State){
case stMove:
if (MoveCell()){
if (!Find()){
Generate(iAddFishCount);
if (!iReplyFlag){
OSound.PlaySound(LinkzL.OSBubbleBang03);
};
} else {
if (!iReplyFlag){
OSound.PlaySound(LinkzL.OSBubbleBang04);
};
};
};
break;
case stDelete:
if (iDeleteFishs[0].State == OGWidget.stFree){
for each (_local2 in iDeleteFishs) {
_local2.removeEventListener(MouseEvent.CLICK, OnClickToFish);
iField.RemoveWidget(_local2);
_local4 = (iReplyFlag) ? 0 : 15;
_local5 = 0;
while (_local5 < _local4) {
gParticleContainer.addSimpleParticle(_local2.Color, _local2.prX, _local2.prY);
_local5++;
};
};
_local3 = iField.GridController.CountBusyKnot;
if (iField.GridController.FieldComplete){
State = stComplite;
} else {
if (_local3 < iMinFishCount){
Generate((iMinFishCount - _local3));
} else {
State = stWait;
};
};
};
break;
case stGenerate:
if (iGenerateFishs[0].State == OGWidget.stFree){
if (!Find()){
if (iField.GridController.CountFreeKnot > 0){
this.State = stWait;
} else {
this.State = stNotComplite;
};
};
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OGFish;
this.iState = _arg1;
switch (this.iState){
case stWait:
break;
case stSelectedFish:
if (!iReplyFlag){
OSound.PlaySound(LinkzL.OSBubbleBang02);
SetHand(true);
};
break;
case stMove:
break;
case stDelete:
iTimer = getTimer();
for each (_local2 in iDeleteFishs) {
_local2.State = OGWidget.stDelete;
};
break;
case stGenerate:
if (((!(iGenerateFishs)) || ((iGenerateFishs.length < 1)))){
this.State = stWait;
};
break;
case stNotComplite:
break;
};
}
public function ClickCell(_arg1:int):void{
var _local2:DisplayObject;
_local2 = this.iField.getChildAt(_arg1);
switch (true){
case (_local2 is OGFish):
ClickFish(OGFish(_local2));
break;
case (_local2 is OGKnot):
ClickKnot(OGKnot(_local2));
break;
};
}
public function MoveCell():Boolean{
var _local1:Point;
var _local2:Number;
var _local3:Point;
var _local4:int;
var _local5:int;
if (iMovePoint.length == 1){
return (true);
};
_local1 = new Point();
_local1.x = (iMovePoint[1].x - iSelFish.prX);
_local1.y = (iMovePoint[1].y - iSelFish.prY);
_local2 = Math.min(_local1.length, iMoveSpeed);
if (_local1.length < iMoveSpeed){
iMovePoint.shift();
};
if (_local1.length == 0){
return (false);
};
_local3 = new Point();
_local3.x = ((_local2 * _local1.x) / _local1.length);
_local3.y = ((_local2 * _local1.y) / _local1.length);
iSelFish.prX = (iSelFish.prX + _local3.x);
iSelFish.prY = (iSelFish.prY + _local3.y);
_local4 = (iReplyFlag) ? 0 : 3;
_local5 = 0;
while (_local5 < _local4) {
gParticleContainer.addSimpleParticle(iSelFish.Color, iSelFish.prX, iSelFish.prY);
_local5++;
};
return (false);
}
override public function Init():void{
var _local1:Array;
var _local2:OGKnot;
super.Init();
this.SetVisible(false);
iAddFishCount = iP[0][1];
iMinFishCount = iP[0][2];
iUniFishCount = iP[0][4];
iFireFishCount = iP[0][5];
iReplyFlag = iP[3];
iField = new OGField(LinkzL.OGFieldGame, [iP[1], iP[0][0][3], iP[0][0], iP[0][3]], iP[2]);
_local1 = iField.Knot;
for each (_local2 in _local1) {
_local2.addEventListener(MouseEvent.CLICK, OnClickToKnot);
};
this.addChild(iField);
Generate(iMinFishCount);
iRecordTimer = getTimer();
iMoveSpeed = (iP[1][0] / 20);
}
public function set SpeedMove(_arg1:int):void{
iMoveSpeed = _arg1;
}
public function GetPos(_arg1:int):Point{
var _local2:IDisplayObject;
_local2 = IDisplayObject(iField.getChildAt(_arg1));
return (new Point(_local2.prX, _local2.prY));
}
public function OnClickToFish(_arg1:MouseEvent):void{
var _local2:OGFish;
if (!iReplyFlag){
_local2 = OGFish(_arg1.currentTarget);
ClickFish(_local2);
};
}
public function PastFish(_arg1:Array):void{
var _local2:int;
var _local3:OGFish;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = iField.AddFish(iField.GridController.AddFishInPlace(_arg1[_local2][0], _arg1[_local2][1]));
_local3.State = OGWidget.stDeselect;
_local2++;
};
}
public function Generate(_arg1:int=0):void{
var _local2:Array;
var _local3:int;
var _local4:OGFish;
_local2 = iField.GridController.AddFish(_arg1);
iGenerateFishs = new Array();
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = iField.AddFish(_local2[_local3]);
_local4.alpha = 1;
_local4.State = OGWidget.stDeselect;
_local4.addEventListener(MouseEvent.CLICK, OnClickToFish);
_local4.buttonMode = true;
iGenerateFishs.push(_local4);
_local3++;
};
this.State = stGenerate;
}
public function IAddLink(_arg1:Array):OGLink{
var _local2:OGLink;
_local2 = iField.AddLink(_arg1);
return (_local2);
}
public function OnClickToKnot(_arg1:MouseEvent):void{
var _local2:OGKnot;
if (!iReplyFlag){
_local2 = OGKnot(_arg1.currentTarget);
ClickKnot(_local2);
};
}
public function Recording(_arg1:int, _arg2:DisplayObject):void{
var _local3:int;
_local3 = 0;
if ((getTimer() - iRecordTimer) < 100){
_local3 = 1;
} else {
if ((getTimer() - iRecordTimer) > 30000){
_local3 = 300;
} else {
_local3 = ((getTimer() - iRecordTimer) / 100);
};
};
iRecordTimer = getTimer();
switch (_arg1){
case 1:
iRecord = (iRecord + (AIConvertChar.ToDoubleChar(iField.getChildIndex(_arg2)) + AIConvertChar.ToDoubleChar(_local3)));
break;
};
}
public function Find():Boolean{
iDeleteFishs = iField.FindAndClear();
if (iDeleteFishs.length > 0){
this.State = stDelete;
return (true);
};
return (false);
}
public function ClickFish(_arg1:OGFish):void{
switch (this.State){
case stWait:
Recording(1, _arg1);
iSelFish = _arg1;
_arg1.State = OGWidget.stSplash;
this.State = stSelectedFish;
break;
case stSelectedFish:
Recording(1, _arg1);
iSelFish.State = OGWidget.stDeselect;
this.State = stWait;
if (iSelFish != _arg1){
iSelFish = _arg1;
_arg1.State = OGWidget.stSplash;
this.State = stSelectedFish;
};
break;
};
}
private function SetHand(_arg1:Boolean):void{
}
}
}//package RES.OBJECTS.OGRAPHIC
Section 83
//OGGrid (RES.OBJECTS.OGRAPHIC.OGGrid)
package RES.OBJECTS.OGRAPHIC {
import ENGINE.DISPLAY.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OGGrid {
private var iCRow:int;
private var iSize:int;
private var iSprite:OSprite;
private var iCColumn:int;
private var iGridPoints:Array;
private var iShift:Point;
public function OGGrid(_arg1:Array, _arg2:OSprite){
var _local3:Array;
iSprite = _arg2;
iCColumn = _arg1[1][0];
iCRow = _arg1[1][1];
_local3 = OGUtils.GridParametrsSquare(_arg1[0][0], _arg1[0][1], _arg1[1][0], _arg1[1][1]);
iShift = new Point(_local3[1][0], _local3[1][1]);
iGridPoints = _local3[2];
iSize = _local3[0];
super();
}
public function GetNearestCell(_arg1:Point):Array{
var _local2:Number;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Number;
var _local7:int;
var _local8:int;
_local2 = OGlobal.Scale;
_local3 = iGridPoints[0][0];
_local4 = new Point();
_local5 = new Point();
_local6 = 1000000;
_local7 = 0;
while (_local7 < iGridPoints.length) {
_local8 = 0;
while (_local8 < iGridPoints[0].length) {
_local5.x = (_arg1.x - (iGridPoints[_local7][_local8].x * _local2));
_local5.y = (_arg1.y - (iGridPoints[_local7][_local8].y * _local2));
if (_local5.length < _local6){
_local4.x = _local8;
_local4.y = _local7;
_local3 = iGridPoints[_local7][_local8];
_local6 = _local5.length;
};
_local8++;
};
_local7++;
};
return ([_local3, _local4]);
}
public function get SizeCell():int{
return (iSize);
}
public function GetCoord(_arg1:Point):Point{
return (iGridPoints[_arg1.y][_arg1.x]);
}
public function Free():void{
var _local1:int;
_local1 = 0;
while (_local1 < iGridPoints.length) {
iGridPoints[_local1] = null;
_local1++;
};
iGridPoints = null;
iSprite = null;
}
private function DrawGrid():void{
var _local1:Number;
var _local2:int;
_local1 = OGlobal.Scale;
iSprite.graphics.beginFill(0xFF00, 1);
iSprite.graphics.lineStyle(1);
_local2 = 0;
while (_local2 < iGridPoints[0].length) {
iSprite.graphics.moveTo((iGridPoints[0][_local2].x * _local1), (iGridPoints[0][_local2].y * _local1));
iSprite.graphics.lineTo((iGridPoints[(iCRow - 1)][_local2].x * _local1), (iGridPoints[(iCRow - 1)][_local2].y * _local1));
_local2++;
};
_local2 = 0;
while (_local2 < iGridPoints.length) {
iSprite.graphics.moveTo((iGridPoints[_local2][0].x * _local1), (iGridPoints[_local2][0].y * _local1));
iSprite.graphics.lineTo((iGridPoints[_local2][(iCColumn - 1)].x * _local1), (iGridPoints[_local2][(iCColumn - 1)].y * _local1));
_local2++;
};
iSprite.graphics.endFill();
iSprite.cacheAsBitmap = true;
}
}
}//package RES.OBJECTS.OGRAPHIC
Section 84
//OGUtils (RES.OBJECTS.OGRAPHIC.OGUtils)
package RES.OBJECTS.OGRAPHIC {
import flash.geom.*;
import ENGINE.CORE.*;
public class OGUtils {
public static function GridParametrsHexagon(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Array{
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Point;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:Array;
var _local15:int;
var _local16:int;
var _local17:Array;
var _local18:int;
_local5 = new Array();
_local6 = _arg1;
_local7 = _arg2;
_local8 = _arg3;
_local9 = _arg4;
_local10 = new Point((_local6 / (((2 * _local8) + (_local9 % 2)) * Math.sin((Math.PI / 3)))), (_local7 / (2 + (1.5 * (_local9 - 1)))));
_local11 = ((_local10.x)<_local10.y) ? _local10.x : _local10.y;
_local12 = ((_local6 - (_local11 * (((2 * _local8) + (_local9 % 2)) * Math.sin((Math.PI / 3))))) / 2);
_local13 = ((_local7 - (_local11 * (2 + (1.5 * (_local9 - 1))))) / 2);
_local5.push(_local11);
_local5.push([_local12, _local13]);
_local14 = new Array();
_local15 = (_local11 * Math.sin((Math.PI / 3)));
_local16 = 0;
while (_local16 < _local9) {
_local17 = new Array();
_local18 = 0;
while (_local18 < _local8) {
_local17.push(new Point(int((((((_local18 * 2) * _local15) + (int((_local16 % 2)) * _local15)) + _local12) + _local15)), int(((((_local16 * 1.5) * _local11) + _local13) + _local11))));
_local18++;
};
_local14.push(_local17);
_local16++;
};
_local5.push(_local14);
_local5.push(int((((2 * _local11) * Math.cos((Math.PI / 6))) / Math.sqrt(2))));
return (_local5);
}
public static function GridParametrsSquare(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Array{
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:Array;
var _local14:int;
var _local15:Array;
var _local16:int;
_local5 = new Array();
_local6 = _arg1;
_local7 = _arg2;
_local8 = _arg3;
_local9 = _arg4;
_local10 = (((_local6 / _local8))>(_local7 / _local9)) ? (_local7 / _local9) : (_local6 / _local8);
_local11 = ((_local6 - (_local10 * _local8)) / 2);
_local12 = ((_local7 - (_local10 * _local9)) / 2);
_local5.push(_local10);
_local5.push([_local11, _local12]);
_local13 = new Array();
_local14 = 0;
while (_local14 < _local9) {
_local15 = new Array();
_local16 = 0;
while (_local16 < _local8) {
_local15.push(new Point((((_local16 * _local10) + _local11) + (_local10 / 2)), (((_local14 * _local10) + _local12) + (_local10 / 2))));
_local16++;
};
_local13.push(_local15);
_local14++;
};
_local5.push(_local13);
_local5.push(int((_local10 / Math.sqrt(2))));
return (_local5);
}
public static function GridParametrsTriangle(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Array{
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Point;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:Array;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:Array;
var _local19:int;
var _local20:int;
var _local21:int;
_local5 = new Array();
_local6 = _arg1;
_local7 = _arg2;
_local8 = _arg3;
_local9 = _arg4;
_local10 = new Point((_local6 / ((int((_local8 / 2)) + (_local8 % 2)) * Math.cos((Math.PI / 6)))), (_local7 / (_local9 + 0.5)));
_local11 = ((_local10.x)<_local10.y) ? _local10.x : _local10.y;
_local11 = (_local11 * OGlobal.Scale);
_local12 = ((_local6 - (_local11 * ((int((_local8 / 2)) + (_local8 % 2)) * Math.cos((Math.PI / 6))))) / 2);
_local13 = ((_local7 - (_local11 * (0.5 + _local9))) / 2);
_local5.push(_local11);
_local5.push([_local12, _local13]);
_local14 = new Array();
_local15 = (_local11 * Math.cos((Math.PI / 6)));
_local16 = ((_local11 / 2) * ((1 / Math.cos((Math.PI / 6))) - Math.cos((Math.PI / 6))));
_local17 = 0;
while (_local17 < _local9) {
_local18 = new Array();
_local19 = 0;
while (_local19 < _local8) {
_local20 = (((((_local19 % 4) == 0)) || (((_local19 % 4) == 3)))) ? (_local11 / 2) : 0;
_local21 = (((_local19 % 2))==0) ? (-1 * _local16) : _local16;
_local18.push(new Point(int(((((int((_local19 / 2)) * _local15) + _local21) + _local12) + (_local15 / 2))), int(((((_local17 * _local11) + _local20) + _local13) + (_local11 / 2)))));
_local19++;
};
_local14.push(_local18);
_local17++;
};
_local5.push(_local14);
_local5.push(int(((_local11 * Math.tan((Math.PI / 6))) / Math.sqrt(2))));
return (_local5);
}
}
}//package RES.OBJECTS.OGRAPHIC
Section 85
//OLLevels (RES.OBJECTS.OLEVELS.OLLevels)
package RES.OBJECTS.OLEVELS {
public class OLLevels {
private static const iLevelList:Array = [[OLMapsList.Level1a, 1, 3, 2, 0, 0], [OLMapsList.CapsuledStar, 2, 3, 2, 0, 0], [OLMapsList.Arrow, 2, 3, 2, 0, 0], [OLMapsList.SimpleStar, 2, 3, 2, 0, 0], [OLMapsList.Level2, 3, 4, 3, 0, 0], [OLMapsList.Bell, 3, 6, 2, 0, 0], [OLMapsList.Level3, 2, 4, 3, 0, 0], [OLMapsList.Pan, 4, 4, 2, 0, 0], [OLMapsList.Moon, 3, 4, 2, 0, 0], [OLMapsList.ShildLevel, 1, 3, 2, 0, 0], [OLMapsList.Bat, 4, 3, 2, 0, 0], [OLMapsList.ElvenHouse, 4, 3, 2, 0, 0], [OLMapsList.Level4, 4, 3, 2, 0, 0], [OLMapsList.FacetDiamond, 4, 6, 3, 0, 0], [OLMapsList.QuadricStar, 3, 3, 2, 0, 0], [OLMapsList.SauronsTower, 4, 6, 2, 0, 0], [OLMapsList.ElvenJewel, 4, 6, 3, 0, 0], [OLMapsList.Grass, 4, 5, 3, 0, 0], [OLMapsList.Husks, 4, 6, 2, 0, 0], [OLMapsList.Fish, 4, 2, 2, 0, 0], [OLMapsList.Pentagrams, 4, 4, 2, 0, 0], [OLMapsList.ElvenCrown, 4, 6, 2, 0, 0], [OLMapsList.ElvenMedalion, 4, 6, 3, 0, 0], [OLMapsList.Level8, 3, 3, 2, 0, 0], [OLMapsList.ElvenCup, 4, 6, 3, 0, 0], [OLMapsList.Bird, 4, 6, 2, 0, 0], [OLMapsList.KingsCrown, 4, 6, 4, 0, 0], [OLMapsList.ElvenClock, 4, 4, 4, 0, 0], [OLMapsList.Combof3colors, 4, 3, 2, 0, 0], [OLMapsList.RotatedHouse, 4, 3, 2, 0, 0], [OLMapsList.Alga, 5, 10, 2, 0, 0], [OLMapsList.Casing, 4, 8, 3, 0, 0], [OLMapsList.Level9, 4, 2, 2, 0, 0], [OLMapsList.Triangle, 4, 6, 4, 0, 0], [OLMapsList.YoungButterfly, 5, 3, 4, 0, 0], [OLMapsList.Level5, 4, 3, 4, 0, 0], [OLMapsList.FlowersLevel, 4, 3, 2, 0, 0], [OLMapsList.FiveStar, 4, 2, 2, 0, 0], [OLMapsList.Level7, 3, 6, 4, 0, 0], [OLMapsList.Cross, 4, 6, 4, 0, 0], [OLMapsList.Level40, 5, 6, 5, 0, 0], [OLMapsList.Hexagonof6, 5, 6, 5, 0, 0]];
public static var B2:Array = [0, 1, 2];
public static var B3:Array = [0, 1, 2, 3];
public static var B4:Array = [0, 1, 2, 3, 4];
public static var B5:Array = [0, 1, 2, 3, 4, 5];
public static var B6:Array = [0, 1, 2, 3, 4, 5, 6];
public static function _LevelList(_arg1:int):Array{
return (iLevelList[(_arg1 % iLevelList.length)]);
}
public static function get LevelCount():int{
return (iLevelList.length);
}
}
}//package RES.OBJECTS.OLEVELS
Section 86
//OLMapsList (RES.OBJECTS.OLEVELS.OLMapsList)
package RES.OBJECTS.OLEVELS {
public class OLMapsList {
public static const HEXAGON:int = 1;
public static const TRIANGLE:int = 2;
public static const FlowersLevel:Array = [[[1, 1], [6, 3], [11, 1], [3, 6], [1, 11], [35, 1], [30, 3], [33, 6], [35, 11], [24, 1], [18, 15], [8, 13], [28, 13], [7, 31], [29, 31], [9, 20], [27, 20], [15, 28], [21, 28], [6, 9], [9, 6], [27, 6], [30, 9], [13, 8], [23, 8]], [[0, 1], [1, 2], [4, 3], [3, 0], [3, 1], [5, 6], [6, 7], [7, 5], [6, 9], [8, 7], [11, 10], [10, 12], [15, 13], [17, 13], [18, 14], [14, 16], [17, 10], [10, 18], [10, 16], [10, 15], [13, 10], [10, 14], [12, 16], [15, 11], [4, 19], [19, 20], [20, 2], [1, 20], [19, 3], [9, 21], [21, 22], [22, 8], [6, 21], [22, 7], [11, 19], [20, 23], [21, 24], [12, 22], [24, 23], [23, 10], [10, 24], [24, 12], [23, 11]], [[2, 3, 0, 4], [2, 5, 7, 6], [5, 20, 19, 12], [5, 18, 15, 21], [1, 20, 16, 13], [1, 17, 21, 14], [2, 23, 10, 19], [2, 18, 11, 22], [1, 42, 39, 10], [1, 40, 41, 11], [2, 38, 39, 40], [5, 30, 37, 41, 36], [1, 32, 30, 33, 6], [1, 27, 25, 28, 4], [5, 1, 26, 27], [5, 2, 24, 28], [5, 29, 8, 32], [5, 9, 31, 33], [5, 35, 42, 34]], [37, 35]];
public static const Casing:Array = [[[15, 1], [11, 4], [19, 4], [15, 7], [11, 9], [19, 9], [7, 7], [23, 7], [8, 12], [22, 12], [4, 12], [26, 12], [26, 5], [28, 2], [2, 2], [4, 5], [29, 7], [29, 15], [1, 7], [1, 15], [2, 28], [1, 22], [4, 18], [4, 25], [8, 18], [11, 21], [15, 23], [19, 21], [22, 18], [26, 18], [29, 22], [28, 28], [26, 25], [15, 29], [11, 26], [19, 26], [7, 23], [23, 23], [8, 1], [22, 1], [22, 29], [8, 29]], [[10, 6], [6, 1], [1, 0], [0, 2], [2, 7], [7, 11], [11, 12], [12, 13], [13, 16], [16, 12], [11, 16], [16, 17], [17, 11], [14, 15], [15, 18], [18, 14], [15, 10], [10, 18], [19, 18], [10, 19], [8, 4], [4, 3], [3, 5], [5, 9], [3, 1], [0, 3], [3, 2], [2, 5], [5, 7], [7, 9], [4, 1], [6, 4], [6, 8], [8, 10], [9, 11], [19, 22], [22, 21], [21, 20], [20, 23], [23, 21], [22, 23], [21, 19], [22, 24], [24, 25], [25, 26], [26, 27], [27, 28], [28, 29], [29, 17], [26, 34], [34, 33], [33, 35], [35, 26], [26, 33], [25, 34], [36, 22], [36, 24], [25, 36], [36, 34], [29, 30], [30, 17], [29, 32], [32, 30], [32, 31], [31, 30], [27, 35], [27, 37], [37, 35], [37, 29], [28, 37], [14, 38], [38, 15], [13, 39], [39, 12], [32, 40], [40, 31], [23, 41], [41, 20]], [[5, 24, 2, 25], [5, 30, 24, 21], [6, 31, 1, 30], [6, 32, 31, 20], [6, 33, 0, 32], [2, 16, 17, 14], [2, 18, 17, 19], [2, 14, 15, 13], [5, 25, 26, 3], [5, 26, 27, 22], [6, 27, 4, 28], [6, 23, 28, 29], [6, 34, 29, 5], [2, 41, 35, 36], [2, 39, 36, 40], [2, 37, 39, 38], [6, 55, 42, 56], [6, 57, 56, 43], [6, 58, 57, 54], [5, 49, 54, 44], [5, 50, 49, 53], [5, 53, 52, 51], [5, 52, 45, 65], [6, 67, 65, 66], [6, 66, 46, 69], [6, 68, 69, 47], [2, 10, 6, 9], [2, 8, 7, 9], [2, 10, 11, 12], [2, 48, 60, 59], [2, 61, 59, 62], [2, 63, 62, 64], [2, 71, 13, 70], [2, 72, 73, 7], [2, 74, 75, 63], [2, 76, 77, 38]], [31, 31]];
public static const Parabolic:Array = [[[35, 1], [28, 7], [23, 15], [14, 16], [8, 14], [1, 9], [1, 18], [9, 25], [18, 20], [8, 20], [0, 25], [35, 25], [22, 25], [27, 20], [35, 17], [29, 13], [35, 9]], [[5, 6], [6, 4], [4, 5], [6, 10], [10, 9], [9, 6], [9, 3], [3, 4], [10, 7], [7, 9], [9, 8], [8, 7], [3, 8], [8, 2], [2, 13], [13, 12], [12, 8], [7, 12], [2, 1], [1, 15], [15, 2], [13, 11], [11, 12], [13, 14], [14, 11], [13, 15], [15, 14], [15, 16], [16, 14], [1, 16], [1, 0], [0, 16], [3, 2]], [[5, 0, 2, 1], [1, 1, 7, 6, 5], [1, 3, 5, 4], [1, 4, 9, 8], [1, 10, 11, 9], [1, 6, 12, 10], [1, 12, 32, 13], [1, 11, 16, 17], [0, 13, 14, 15, 16], [5, 15, 21, 22], [5, 23, 24, 21], [5, 25, 23, 26], [5, 14, 20, 25], [5, 18, 19, 20], [5, 27, 28, 26], [5, 19, 29, 27], [1, 29, 30, 31]], [37, 27]];
public static const SQUARE:int = 0;
public static const DishAerial:Array = [[[18, 1], [17, 5], [19, 8], [29, 12], [25, 13], [22, 11], [24, 6], [14, 3], [15, 11], [27, 16], [13, 7], [19, 15], [23, 17], [9, 10], [12, 15], [16, 18], [21, 22], [9, 18], [10, 22], [15, 22], [5, 12], [4, 8], [1, 4], [1, 12], [2, 18], [2, 22], [1, 28], [6, 25], [11, 26], [6, 29], [13, 29], [18, 26], [22, 28], [25, 23], [29, 29], [29, 23]], [[2, 6], [6, 5], [5, 2], [2, 1], [1, 0], [5, 4], [4, 3], [3, 9], [9, 4], [11, 4], [11, 5], [0, 7], [7, 1], [7, 10], [10, 1], [10, 2], [10, 8], [8, 11], [8, 2], [2, 11], [4, 12], [12, 11], [12, 9], [10, 13], [13, 14], [14, 8], [10, 14], [13, 17], [17, 14], [17, 20], [20, 13], [20, 21], [21, 22], [22, 23], [23, 20], [23, 21], [23, 24], [24, 20], [24, 17], [24, 25], [18, 17], [14, 15], [15, 19], [19, 18], [18, 27], [27, 26], [27, 28], [28, 29], [29, 30], [30, 28], [29, 26], [27, 29], [26, 25], [25, 17], [25, 27], [27, 17], [18, 28], [8, 15], [15, 11], [12, 16], [16, 15], [11, 16], [28, 31], [31, 30], [28, 19], [19, 31], [31, 32], [32, 30], [19, 16], [16, 31], [16, 32], [32, 33], [33, 34], [34, 35], [16, 33], [33, 35], [32, 34]], [[4, 4, 12, 11], [4, 12, 14, 13], [4, 14, 3, 15], [4, 16, 15, 18], [4, 2, 0, 1], [4, 8, 6, 7], [4, 22, 20, 8], [4, 20, 21, 9], [4, 9, 10, 5], [4, 10, 19, 2], [4, 17, 18, 19], [3, 33, 32, 35], [3, 35, 31, 34], [3, 34, 37, 36], [3, 37, 29, 38], [3, 53, 38, 39], [3, 54, 45, 52], [3, 55, 40, 44], [3, 55, 54, 53], [3, 56, 46, 44], [3, 46, 47, 51], [3, 51, 50, 45], [5, 27, 29, 30], [5, 27, 24, 28], [5, 24, 23, 26], [5, 26, 16, 25], [5, 57, 41, 25], [5, 58, 17, 57], [5, 60, 61, 58], [5, 61, 21, 59], [5, 49, 48, 47], [5, 68, 42, 60], [5, 68, 69, 65], [5, 65, 62, 64], [5, 64, 56, 43], [5, 62, 63, 49], [5, 66, 67, 63], [5, 70, 66, 69], [5, 70, 74, 71], [5, 71, 72, 76], [5, 72, 75, 73]], [31, 31]];
public static const Moon:Array = [[[24, 1], [1, 24], [16, 29], [18, 18], [8, 23], [5, 28], [23, 8], [28, 5], [13, 21], [21, 13], [13, 25], [22, 22], [26, 26], [22, 28], [18, 24], [24, 18], [29, 16], [28, 22], [11, 29], [29, 11], [25, 13]], [[1, 4], [4, 8], [8, 3], [3, 9], [9, 6], [6, 0], [0, 7], [17, 12], [12, 13], [13, 2], [5, 1], [17, 16], [16, 19], [19, 7], [2, 18], [18, 5], [6, 7], [10, 14], [14, 11], [11, 15], [15, 20], [20, 6], [19, 20], [20, 16], [16, 15], [15, 17], [17, 11], [11, 12], [11, 13], [13, 14], [14, 2], [2, 10], [10, 18], [10, 4], [10, 8], [8, 14], [14, 3], [3, 11], [3, 15], [15, 9], [9, 20], [7, 20], [4, 5], [5, 10]], [[4, 5, 6, 16], [4, 4, 21, 40], [4, 39, 40, 20], [4, 3, 39, 38], [4, 37, 38, 19], [4, 36, 37, 18], [4, 35, 2, 36], [4, 34, 35, 17], [4, 33, 1, 34], [5, 32, 31, 14], [5, 31, 17, 30], [5, 30, 29, 9], [5, 29, 18, 28], [5, 28, 27, 8], [5, 27, 26, 7], [5, 26, 19, 25], [5, 25, 24, 11], [5, 24, 20, 23], [5, 23, 22, 12], [4, 42, 43, 33], [5, 15, 43, 32], [4, 42, 10, 0], [4, 21, 16, 41], [5, 41, 13, 22]], [31, 31]];
public static const Bell:Array = [[[23, 1], [1, 23], [22, 10], [18, 18], [10, 22], [1, 1], [14, 3], [3, 14], [12, 12], [6, 6], [18, 7], [7, 18], [1, 8], [8, 1]], [[0, 2], [2, 3], [3, 4], [4, 1], [1, 7], [7, 12], [12, 5], [5, 13], [13, 6], [6, 0], [1, 11], [11, 7], [11, 4], [2, 10], [10, 6], [12, 9], [9, 13], [5, 9], [9, 8], [8, 3], [7, 9], [8, 11], [4, 8], [8, 2], [8, 10], [6, 9], [10, 0], [9, 10], [11, 9]], [[2, 25, 14, 27], [5, 14, 9, 26], [5, 26, 0, 13], [2, 24, 13, 23], [5, 23, 1, 19], [5, 22, 19, 2], [2, 12, 21, 22], [5, 10, 12, 3], [5, 4, 11, 10], [2, 11, 20, 28], [2, 28, 18, 21], [2, 18, 27, 24], [2, 25, 16, 8], [2, 15, 20, 5], [5, 15, 6, 17], [5, 17, 7, 16]], [25, 25]];
public static const Cross:Array = [[[12, 1], [18, 1], [10, 5], [20, 5], [15, 5], [12, 9], [18, 9], [1, 12], [1, 18], [5, 15], [5, 20], [5, 10], [9, 12], [9, 18], [12, 21], [18, 21], [10, 25], [20, 25], [15, 25], [12, 29], [18, 29], [21, 18], [21, 12], [25, 10], [29, 12], [29, 18], [25, 20], [25, 15], [12, 15], [15, 12], [18, 15], [15, 18]], [[0, 2], [2, 5], [5, 12], [12, 11], [11, 7], [7, 8], [8, 10], [10, 13], [13, 14], [14, 16], [16, 19], [19, 20], [20, 17], [17, 15], [15, 21], [21, 26], [26, 25], [25, 24], [24, 23], [23, 22], [22, 6], [6, 3], [3, 1], [1, 0], [4, 0], [4, 1], [4, 3], [4, 6], [4, 5], [4, 2], [9, 12], [9, 11], [9, 7], [9, 8], [9, 10], [9, 13], [13, 12], [14, 18], [18, 16], [18, 19], [18, 20], [18, 17], [18, 15], [15, 14], [27, 22], [27, 23], [27, 24], [27, 25], [27, 26], [27, 21], [21, 22], [6, 5], [31, 28], [28, 29], [29, 30], [30, 31], [31, 14], [31, 15], [28, 13], [28, 12], [29, 5], [29, 6], [30, 22], [30, 21]], [[0, 52, 53, 54, 55], [3, 56, 57, 43], [1, 58, 59, 36], [4, 58, 8, 56, 52], [1, 55, 57, 14, 63], [2, 63, 50, 62], [3, 62, 20, 61, 54], [2, 2, 59, 53, 60], [4, 60, 61, 51], [2, 30, 36, 35], [4, 34, 35, 7], [3, 34, 6, 33], [1, 33, 5, 32], [3, 32, 4, 31], [4, 31, 3, 30], [2, 9, 37, 38], [1, 10, 38, 39], [3, 39, 40, 11], [1, 12, 40, 41], [2, 41, 42, 13], [4, 42, 37, 43], [3, 15, 49, 48], [4, 48, 47, 16], [2, 47, 46, 17], [4, 46, 45, 18], [3, 44, 19, 45], [1, 44, 49, 50], [3, 51, 28, 27], [1, 28, 1, 29], [2, 29, 0, 24], [4, 24, 23, 25], [2, 25, 22, 26], [1, 27, 26, 21]], [31, 31]];
public static const Triangle:Array = [[[15, 1], [10, 11], [20, 11], [12, 6], [18, 6], [1, 29], [2, 24], [5, 27], [25, 27], [28, 24], [29, 29], [15, 10], [4, 20], [7, 22], [10, 25], [23, 22], [26, 20], [20, 25], [8, 15], [13, 14], [17, 14], [22, 15], [11, 18], [13, 21], [15, 25], [17, 21], [19, 18]], [[3, 4], [4, 0], [0, 3], [3, 1], [1, 11], [11, 3], [11, 4], [4, 2], [2, 11], [11, 20], [20, 2], [2, 21], [21, 20], [20, 19], [19, 11], [19, 1], [1, 18], [18, 19], [5, 6], [6, 7], [7, 5], [7, 14], [14, 13], [13, 7], [13, 6], [6, 12], [12, 13], [10, 8], [8, 9], [9, 10], [9, 16], [16, 15], [15, 17], [17, 8], [8, 15], [15, 9], [18, 22], [22, 19], [20, 26], [26, 21], [12, 22], [18, 12], [22, 13], [13, 23], [23, 14], [14, 24], [24, 23], [23, 25], [23, 22], [25, 26], [24, 25], [25, 17], [17, 24], [25, 15], [15, 26], [26, 16], [16, 21]], [[1, 36, 37, 17], [5, 50, 51, 52], [1, 37, 13, 38, 49, 47, 48], [3, 19, 24, 23], [3, 18, 19, 20], [3, 23, 22, 21], [3, 22, 43, 44], [3, 44, 46, 45], [1, 46, 47, 50], [5, 51, 53, 32], [5, 33, 32, 34], [5, 34, 35, 28], [5, 28, 27, 29], [5, 35, 31, 30], [5, 54, 53, 49], [5, 54, 55, 31], [3, 42, 48, 43], [3, 26, 24, 25], [3, 40, 42, 26], [3, 40, 41, 36], [5, 55, 39, 56], [1, 38, 12, 39], [2, 15, 17, 16], [2, 12, 10, 11], [2, 13, 14, 9], [2, 15, 4, 14], [2, 9, 10, 8], [2, 4, 3, 5], [2, 5, 0, 6], [2, 8, 6, 7], [2, 0, 2, 1]], [31, 31]];
public static const QuadricStar:Array = [[[6, 15], [10, 9], [20, 9], [24, 15], [10, 21], [20, 21], [5, 9], [10, 4], [25, 9], [25, 21], [10, 26], [5, 21], [20, 4], [20, 26], [1, 15], [29, 15], [1, 1], [1, 29], [29, 1], [29, 29], [15, 1], [15, 24], [15, 29], [15, 6]], [[0, 1], [1, 2], [2, 3], [3, 5], [5, 4], [4, 0], [2, 8], [8, 3], [3, 9], [9, 5], [4, 11], [11, 0], [0, 6], [6, 1], [1, 7], [12, 2], [5, 13], [10, 4], [12, 8], [9, 13], [10, 11], [8, 15], [15, 9], [11, 14], [14, 6], [6, 7], [12, 18], [18, 8], [9, 19], [19, 13], [10, 17], [17, 11], [6, 16], [16, 7], [7, 20], [20, 12], [10, 21], [21, 5], [4, 21], [21, 13], [13, 22], [22, 10], [7, 23], [23, 2], [1, 23], [23, 12]], [[1, 26, 27, 18], [1, 32, 33, 25], [1, 31, 20, 30], [1, 29, 19, 28], [4, 20, 10, 17], [4, 16, 9, 19], [4, 13, 25, 14], [4, 15, 18, 6], [4, 21, 22, 8, 7], [4, 23, 24, 12, 11], [5, 11, 5, 10], [1, 12, 13, 0], [5, 2, 6, 7], [1, 9, 3, 8], [0, 0, 1, 2, 3, 4, 5], [0, 38, 4, 37], [1, 17, 38, 36], [5, 39, 37, 16], [4, 36, 39, 40, 41], [0, 44, 43, 1], [5, 14, 42, 44], [1, 43, 45, 15], [4, 42, 45, 35, 34]], [31, 31]];
public static const Plane:Array = [[[1, 14], [39, 7], [45, 7], [46, 1], [41, 1], [22, 7], [46, 14], [31, 20], [25, 20], [31, 14], [10, 10], [11, 14], [32, 7], [24, 14], [15, 11], [14, 7]], [[9, 1], [1, 4], [4, 3], [3, 2], [2, 6], [6, 9], [1, 2], [8, 7], [7, 9], [0, 10], [10, 11], [11, 0], [1, 6], [9, 12], [12, 1], [5, 12], [11, 13], [13, 8], [13, 9], [5, 13], [13, 12], [11, 14], [14, 13], [14, 5], [14, 10], [10, 15], [15, 5]], [[1, 1, 2, 3, 6], [5, 12, 6, 4], [5, 0, 12, 5], [5, 13, 14, 0], [1, 9, 10, 11], [1, 18, 8, 7, 17], [5, 20, 18, 13], [1, 19, 15, 20], [5, 24, 10, 21], [5, 21, 16, 22], [5, 22, 23, 19], [0, 25, 26, 23, 24]], [48, 22]];
public static const Hexagonof6:Array = [[[11, 1], [1, 20], [11, 39], [29, 39], [39, 20], [29, 1], [3, 15], [8, 5], [3, 25], [8, 35], [5, 10], [5, 30], [15, 1], [25, 1], [20, 1], [32, 5], [35, 10], [37, 15], [37, 25], [35, 30], [32, 35], [15, 39], [20, 39], [25, 39], [7, 20], [33, 20], [31, 25], [9, 25], [13, 32], [29, 29], [11, 29], [18, 33], [22, 33], [27, 32], [9, 15], [11, 11], [13, 8], [18, 7], [22, 7], [27, 8], [29, 11], [31, 15], [13, 20], [16, 14], [24, 14], [27, 20], [16, 26], [24, 26], [20, 20]], [[1, 6], [6, 10], [10, 7], [7, 0], [0, 12], [12, 14], [14, 13], [13, 5], [5, 15], [15, 16], [16, 17], [17, 4], [4, 18], [18, 19], [19, 20], [20, 3], [3, 23], [23, 22], [22, 21], [21, 2], [2, 9], [9, 11], [11, 8], [8, 1], [6, 24], [24, 8], [1, 24], [25, 17], [4, 25], [18, 25], [26, 18], [19, 26], [8, 27], [27, 11], [9, 28], [28, 2], [19, 29], [29, 20], [11, 30], [30, 9], [21, 31], [31, 22], [22, 32], [32, 23], [21, 28], [23, 33], [33, 3], [33, 20], [6, 34], [34, 10], [10, 35], [35, 7], [7, 36], [36, 0], [36, 12], [12, 37], [37, 14], [14, 38], [38, 13], [13, 39], [39, 5], [39, 15], [15, 40], [40, 16], [16, 41], [41, 17], [24, 34], [34, 35], [35, 36], [36, 37], [37, 38], [38, 39], [39, 40], [40, 41], [41, 25], [25, 26], [26, 29], [29, 33], [33, 32], [32, 31], [31, 28], [28, 30], [30, 27], [27, 24], [42, 43], [43, 44], [44, 45], [45, 47], [47, 46], [46, 42], [34, 43], [43, 35], [43, 36], [43, 37], [38, 44], [44, 39], [44, 40], [44, 41], [46, 27], [30, 46], [46, 28], [31, 46], [32, 47], [47, 33], [47, 29], [26, 47], [24, 42], [45, 25], [43, 48], [48, 44], [48, 45], [48, 47], [48, 46], [48, 42]], [[6, 26, 0, 24], [5, 23, 26, 25], [5, 25, 83, 32], [5, 22, 32, 33], [5, 33, 82, 38], [5, 21, 38, 39], [5, 39, 81, 34], [5, 20, 34, 35], [4, 35, 44, 19], [4, 44, 80, 40], [4, 40, 41, 18], [4, 41, 79, 42], [4, 42, 43, 17], [4, 45, 46, 16], [3, 46, 47, 15], [3, 47, 77, 37], [3, 37, 36, 14], [3, 36, 76, 31], [3, 31, 30, 13], [3, 30, 75, 29], [3, 29, 28, 12], [2, 28, 27, 11], [2, 27, 74, 65], [2, 65, 64, 10], [2, 64, 73, 63], [2, 63, 62, 9], [2, 62, 72, 61], [2, 61, 60, 8], [1, 60, 59, 7], [1, 71, 58, 59], [1, 58, 57, 6], [1, 70, 56, 57], [1, 69, 54, 55], [1, 56, 55, 5], [1, 53, 54, 4], [6, 53, 52, 3], [6, 68, 51, 52], [6, 51, 50, 2], [6, 49, 50, 67], [6, 48, 1, 49], [6, 24, 48, 66], [4, 92, 69, 93], [3, 91, 68, 92], [3, 90, 67, 91], [2, 99, 82, 98], [2, 100, 81, 99], [1, 80, 100, 101], [1, 78, 102, 103], [6, 103, 104, 77], [6, 104, 105, 76], [5, 97, 96, 73], [5, 96, 95, 72], [4, 95, 94, 71], [0, 109, 108, 85], [0, 109, 110, 86], [0, 111, 110, 87], [0, 88, 112, 111], [0, 112, 89, 113], [0, 113, 84, 108], [3, 106, 84, 90, 66], [4, 93, 70, 94, 85], [5, 86, 107, 74, 97], [6, 75, 105, 87, 107], [1, 101, 88, 102, 79], [2, 98, 83, 106, 89], [4, 43, 78, 45]], [41, 41]];
public static const FiveStar:Array = [[[6, 29], [30, 29], [18, 1], [1, 10], [35, 10], [7, 22], [29, 22], [13, 27], [23, 27], [8, 8], [14, 5], [22, 5], [31, 15], [5, 15], [13, 21], [23, 21], [25, 13], [28, 8], [11, 13], [18, 10], [18, 16], [9, 18], [13, 9], [23, 9], [27, 18], [18, 24]], [[5, 0], [0, 7], [8, 1], [1, 6], [12, 4], [11, 2], [2, 10], [9, 3], [3, 13], [5, 14], [14, 7], [8, 15], [15, 6], [0, 14], [15, 1], [17, 4], [16, 12], [16, 17], [13, 18], [18, 9], [10, 19], [19, 11], [18, 3], [19, 2], [16, 4], [16, 20], [20, 19], [20, 18], [20, 14], [20, 15], [13, 21], [21, 5], [12, 24], [24, 6], [7, 25], [25, 8], [9, 22], [22, 10], [11, 23], [23, 17], [18, 19], [22, 18], [22, 19], [19, 16], [16, 23], [23, 19], [21, 18], [18, 14], [21, 14], [14, 15], [15, 25], [25, 14], [16, 15], [15, 24], [24, 16], [13, 5], [7, 8], [6, 12], [17, 11], [10, 9]], [[5, 22, 7, 19], [5, 8, 18, 22], [2, 24, 17, 15], [2, 16, 24, 4], [6, 2, 11, 14], [6, 14, 12, 3], [1, 13, 1, 10], [1, 13, 0, 9], [3, 6, 20, 23], [3, 23, 21, 5], [3, 49, 50, 51], [5, 53, 54, 52], [2, 54, 16, 32], [1, 34, 10, 51], [6, 35, 50, 11], [6, 12, 53, 33], [3, 28, 49, 29], [1, 9, 31, 48], [5, 30, 18, 46], [2, 46, 47, 48], [5, 19, 36, 41], [6, 41, 40, 42], [3, 42, 37, 20], [3, 21, 38, 45], [2, 39, 17, 44], [1, 43, 45, 44], [5, 25, 52, 29], [2, 47, 27, 28], [6, 27, 40, 26], [1, 26, 43, 25], [0, 56, 34, 35], [0, 55, 30, 31], [0, 36, 59, 37], [0, 38, 58, 39], [0, 33, 32, 57]], [37, 32]];
public static const ElvenMedalion:Array = [[[29, 29], [10, 10], [20, 10], [29, 1], [1, 29], [1, 1], [10, 20], [20, 20], [15, 29], [15, 1], [29, 15], [21, 26], [26, 22], [26, 8], [21, 4], [15, 15], [3, 8], [9, 4], [15, 6], [3, 22], [8, 27], [7, 15], [15, 24], [24, 15], [1, 15]], [[9, 3], [3, 10], [10, 13], [13, 14], [14, 9], [10, 12], [12, 11], [11, 8], [8, 0], [0, 10], [14, 3], [3, 13], [12, 0], [0, 11], [14, 2], [2, 13], [7, 11], [12, 7], [5, 16], [5, 17], [17, 9], [16, 17], [19, 20], [20, 8], [4, 19], [20, 4], [2, 18], [18, 14], [18, 9], [18, 17], [18, 1], [1, 17], [1, 16], [16, 21], [21, 1], [21, 19], [19, 6], [6, 21], [6, 20], [6, 22], [22, 7], [22, 8], [1, 15], [15, 6], [15, 7], [15, 2], [2, 23], [23, 7], [23, 10], [20, 22], [22, 11], [19, 24], [24, 21], [24, 16]], [[6, 10, 3, 11], [6, 4, 0, 10], [6, 11, 2, 1], [6, 6, 13, 12], [6, 12, 5, 9], [3, 17, 47, 48, 5], [3, 48, 2, 15, 46], [6, 16, 17, 6], [6, 7, 13, 8], [1, 22, 36, 38], [1, 36, 35, 37], [1, 24, 22, 25], [1, 33, 32, 34], [1, 32, 21, 31], [1, 21, 18, 19], [3, 31, 29, 30], [3, 29, 20, 28], [3, 27, 28, 4], [6, 14, 15, 3], [3, 26, 27, 14], [1, 34, 42, 43, 37], [6, 45, 46, 47, 44], [6, 45, 26, 30, 42], [6, 43, 39, 40, 44], [3, 49, 39, 38], [3, 23, 49, 41], [3, 50, 7, 41], [3, 50, 40, 16], [3, 53, 33, 52], [3, 52, 35, 51]], [31, 31]];
public static const SimpleStar:Array = [[[1, 1], [1, 29], [10, 15], [20, 15], [29, 1], [29, 29], [15, 10], [15, 20], [11, 3], [19, 3], [3, 11], [27, 11], [3, 19], [11, 27], [19, 27], [27, 19]], [[0, 10], [10, 8], [8, 0], [8, 9], [9, 4], [4, 11], [11, 15], [15, 5], [5, 14], [14, 13], [13, 1], [1, 12], [12, 10], [9, 11], [15, 14], [13, 12], [10, 6], [9, 3], [15, 7], [13, 2], [12, 2], [2, 10], [8, 6], [6, 9], [3, 11], [3, 15], [7, 14], [7, 13], [7, 2], [2, 6], [6, 3], [3, 7]], [[0, 1, 0, 2], [0, 13, 4, 5], [0, 11, 15, 10], [0, 8, 14, 7], [4, 16, 1, 22], [3, 23, 22, 3], [4, 30, 23, 17], [3, 24, 17, 13], [4, 25, 24, 6], [3, 18, 31, 25], [4, 26, 18, 14], [3, 9, 27, 26], [4, 19, 28, 27], [3, 15, 20, 19], [4, 20, 12, 21], [3, 21, 16, 29], [0, 29, 30, 31, 28]], [31, 31]];
public static const Level1:Array = [[[0, 0], [30, 0], [0, 30], [30, 30], [15, 15], [15, 0], [0, 15], [30, 15], [15, 30]], [[0, 5], [5, 4], [4, 0], [0, 6], [6, 4], [4, 2], [2, 6], [4, 8], [8, 2], [8, 3], [3, 4], [4, 7], [7, 3], [5, 1], [1, 4], [1, 7]], [[1, 0, 1, 2], [5, 3, 4, 2], [5, 5, 6, 4], [1, 7, 8, 5], [1, 9, 10, 7], [5, 11, 12, 10], [1, 13, 14, 1], [5, 15, 11, 14]], [31, 31]];
public static const Level2:Array = [[[1, 1], [1, 29], [29, 29], [29, 1], [15, 1], [15, 29], [1, 15], [29, 15], [7, 7], [23, 7], [7, 23], [23, 23], [15, 6], [6, 15], [24, 15], [15, 24], [15, 15]], [[0, 6], [6, 1], [1, 5], [5, 2], [2, 7], [7, 3], [3, 4], [4, 0], [12, 8], [8, 13], [13, 10], [10, 15], [15, 11], [11, 14], [14, 9], [9, 12], [12, 16], [16, 13], [13, 6], [0, 8], [8, 16], [16, 11], [11, 2], [7, 14], [14, 16], [16, 15], [15, 5], [1, 10], [10, 16], [16, 9], [9, 3], [4, 12], [6, 8], [8, 4], [4, 9], [9, 7], [7, 11], [11, 5], [5, 10], [10, 6]], [[0, 32, 0, 19], [5, 32, 9, 18], [5, 39, 18, 10], [0, 1, 39, 27], [0, 27, 38, 2], [1, 38, 11, 26], [1, 26, 12, 37], [0, 37, 22, 3], [0, 22, 36, 4], [0, 35, 30, 5], [0, 30, 34, 6], [1, 34, 15, 31], [1, 31, 8, 33], [0, 33, 19, 7], [0, 20, 8, 16], [0, 29, 16, 15], [0, 14, 24, 29], [5, 23, 14, 35], [5, 23, 36, 13], [0, 13, 21, 24], [0, 21, 12, 25], [0, 25, 11, 28], [0, 28, 10, 17], [0, 17, 9, 20]], [31, 31]];
public static const Level3:Array = [[[1, 1], [1, 29], [29, 29], [29, 1], [15, 5], [15, 25], [5, 15], [25, 15], [8, 8], [22, 8], [8, 22], [22, 22], [15, 10], [10, 15], [20, 15], [15, 20], [15, 15]], [[0, 6], [6, 1], [1, 5], [5, 2], [2, 7], [7, 3], [3, 4], [4, 0], [12, 8], [8, 13], [13, 10], [10, 15], [15, 11], [11, 14], [14, 9], [9, 12], [12, 16], [16, 13], [13, 6], [0, 8], [11, 2], [7, 14], [14, 16], [16, 15], [15, 5], [1, 10], [9, 3], [4, 12], [6, 8], [8, 4], [4, 9], [9, 7], [7, 11], [11, 5], [5, 10], [10, 6]], [[5, 28, 0, 19], [5, 28, 9, 18], [5, 35, 18, 10], [5, 1, 35, 25], [1, 25, 34, 2], [1, 34, 11, 24], [1, 24, 12, 33], [1, 33, 20, 3], [5, 20, 32, 4], [5, 31, 26, 5], [1, 26, 30, 6], [1, 30, 15, 27], [1, 27, 8, 29], [1, 29, 19, 7], [5, 21, 14, 31], [5, 21, 32, 13], [0, 23, 11, 10, 17], [0, 23, 12, 13, 22], [0, 22, 16, 15, 14], [0, 16, 17, 9, 8]], [31, 31]];
public static const Level4:Array = [[[4, 4], [26, 4], [4, 26], [26, 26], [29, 15], [1, 15], [15, 1], [15, 29], [15, 15], [6, 11], [6, 19], [11, 24], [19, 24], [24, 19], [24, 11], [19, 6], [11, 6]], [[5, 0], [0, 6], [6, 1], [1, 4], [4, 3], [3, 7], [7, 2], [2, 5], [5, 8], [8, 0], [8, 6], [8, 1], [8, 4], [8, 3], [8, 7], [2, 8], [8, 9], [9, 0], [9, 5], [5, 10], [10, 8], [10, 2], [8, 11], [11, 2], [11, 7], [8, 12], [12, 7], [12, 3], [8, 13], [13, 3], [13, 4], [8, 14], [14, 1], [14, 4], [8, 15], [15, 6], [15, 1], [8, 16], [16, 6], [16, 0]], [[5, 16, 17, 9], [5, 18, 0, 17], [0, 8, 18, 16], [1, 19, 8, 20], [1, 7, 19, 21], [0, 21, 20, 15], [1, 15, 22, 23], [1, 23, 24, 6], [0, 24, 22, 14], [1, 14, 25, 26], [1, 26, 27, 5], [0, 27, 25, 13], [1, 13, 28, 29], [1, 29, 30, 4], [0, 28, 12, 30], [5, 12, 31, 33], [5, 33, 32, 3], [0, 31, 11, 32], [5, 11, 34, 36], [5, 36, 35, 2], [0, 34, 10, 35], [5, 10, 37, 38], [0, 37, 9, 39], [5, 39, 1, 38]], [31, 31]];
public static const Level5:Array = [[[5, 5], [25, 5], [15, 1], [5, 25], [26, 25], [15, 29], [1, 15], [29, 15], [7, 12], [7, 18], [12, 7], [18, 7], [23, 12], [23, 18], [12, 23], [18, 23], [12, 12], [15, 10], [10, 15], [12, 18], [18, 12], [18, 18], [15, 20], [20, 15], [15, 15]], [[9, 6], [6, 8], [8, 0], [0, 10], [10, 2], [2, 11], [11, 1], [1, 12], [12, 7], [7, 13], [13, 4], [4, 15], [15, 5], [5, 14], [14, 3], [3, 9], [10, 11], [11, 12], [12, 13], [13, 15], [15, 14], [14, 9], [9, 8], [8, 10], [16, 24], [24, 20], [20, 17], [17, 16], [16, 18], [18, 19], [19, 24], [19, 22], [22, 21], [21, 24], [21, 23], [23, 20], [20, 11], [20, 12], [23, 12], [21, 13], [14, 19], [18, 9], [10, 17], [16, 10], [16, 8], [9, 19], [22, 15], [15, 21]], [[5, 2, 3, 23], [1, 16, 4, 5], [5, 17, 6, 7], [1, 18, 8, 9], [5, 19, 10, 11], [1, 12, 13, 20], [5, 14, 15, 21], [1, 22, 0, 1], [5, 44, 23, 43], [5, 43, 42, 27], [1, 26, 42, 16, 36], [1, 44, 22, 41, 28], [5, 41, 29, 45], [5, 21, 45, 40], [1, 39, 18, 38, 34], [1, 38, 35, 37], [5, 37, 36, 17], [2, 33, 25, 35, 34], [2, 31, 32, 33, 30], [2, 24, 30, 29, 28], [2, 27, 24, 25, 26], [1, 46, 20, 40, 31], [5, 47, 39, 19], [5, 47, 46, 32]], [31, 31]];
public static const Level6:Array = [[[0, 0], [20, 0], [0, 20], [20, 20], [10, 0], [0, 10], [20, 10], [10, 20], [17, 7], [13, 3], [7, 3], [3, 7], [3, 13], [7, 17], [13, 17], [17, 13], [7, 7], [7, 13], [13, 13], [13, 7], [10, 10], [10, 5], [5, 10], [10, 15], [15, 10]], [[0, 10], [5, 11], [2, 12], [12, 5], [11, 0], [10, 4], [4, 9], [9, 1], [1, 8], [8, 6], [6, 15], [15, 3], [3, 14], [14, 7], [7, 13], [13, 2], [11, 10], [10, 9], [9, 8], [8, 15], [15, 14], [14, 13], [13, 12], [12, 11], [21, 19], [19, 20], [20, 16], [16, 21], [19, 24], [24, 18], [18, 20], [18, 23], [23, 17], [17, 20], [17, 22], [22, 16], [18, 14], [10, 16], [16, 11], [9, 19], [19, 8], [18, 15], [17, 13], [12, 17]], [[2, 24, 25, 26, 27], [2, 28, 29, 30, 25], [2, 31, 32, 33], [2, 34, 35, 26, 33], [5, 0, 16, 4], [1, 23, 3, 1], [5, 22, 15, 2], [1, 21, 13, 14], [5, 12, 11, 20], [1, 10, 9, 19], [5, 8, 7, 18], [1, 6, 17, 5], [5, 37, 38, 16], [5, 39, 40, 18], [5, 36, 41, 20], [5, 42, 43, 22], [1, 27, 24, 39, 17, 37], [1, 23, 38, 35, 34, 43], [1, 31, 32, 42, 21, 36], [1, 41, 19, 40, 28, 29]], [21, 21]];
public static const Level7:Array = [[[4, 4], [26, 4], [4, 26], [26, 26], [1, 15], [29, 15], [15, 1], [15, 29], [15, 15], [5, 15], [10, 15], [15, 5], [25, 15], [23, 23], [15, 25], [7, 23], [7, 7], [23, 7], [20, 15], [15, 10], [15, 20], [11, 11], [19, 11], [19, 19], [11, 19]], [[0, 4], [4, 2], [2, 7], [7, 3], [3, 5], [5, 1], [1, 6], [6, 0], [0, 16], [16, 11], [11, 0], [11, 6], [11, 1], [1, 17], [17, 11], [16, 9], [9, 0], [9, 4], [9, 15], [9, 2], [2, 15], [15, 7], [7, 14], [14, 15], [14, 13], [13, 7], [13, 3], [3, 12], [12, 1], [12, 5], [12, 17], [12, 13], [16, 10], [10, 21], [21, 11], [21, 19], [19, 17], [19, 22], [22, 12], [22, 18], [18, 13], [18, 23], [23, 14], [23, 20], [20, 15], [20, 24], [24, 9], [24, 10], [10, 8], [8, 18], [8, 19], [8, 20]], [[1, 16, 17, 0], [1, 1, 17, 19], [1, 19, 18, 20], [2, 20, 21, 2], [2, 21, 23, 22], [2, 25, 22, 24], [2, 25, 26, 3], [5, 26, 31, 27], [5, 27, 29, 4], [5, 29, 28, 5], [5, 28, 30, 13], [4, 14, 12, 13], [4, 12, 11, 6], [4, 10, 7, 11], [4, 9, 8, 10], [1, 15, 16, 8], [1, 46, 15, 32, 47], [1, 46, 18, 44, 45], [2, 44, 23, 42, 43], [2, 42, 24, 40, 41], [5, 40, 31, 38, 39], [5, 38, 30, 36, 37], [4, 36, 14, 34, 35], [4, 34, 9, 32, 33], [4, 48, 50, 35, 33], [1, 47, 48, 51, 45], [2, 51, 43, 41, 49], [5, 49, 39, 37, 50]], [31, 31]];
public static const Level8:Array = [[[1, 1], [27, 1], [1, 27], [14, 14], [14, 9], [14, 19], [19, 14], [9, 14], [8, 8], [20, 20], [20, 8], [8, 20], [11, 3], [17, 3], [3, 11], [3, 17], [25, 17], [11, 25], [17, 25], [27, 27], [25, 11]], [[0, 8], [8, 7], [7, 0], [1, 10], [10, 6], [6, 1], [9, 6], [2, 11], [11, 7], [7, 2], [0, 4], [4, 8], [4, 1], [10, 4], [2, 5], [5, 11], [9, 5], [3, 10], [6, 3], [3, 4], [3, 7], [8, 3], [9, 3], [3, 5], [3, 11], [0, 12], [12, 4], [4, 13], [13, 1], [12, 13], [2, 15], [15, 7], [7, 14], [14, 0], [6, 16], [18, 5], [5, 17], [17, 2], [14, 15], [17, 18], [16, 19], [19, 6], [9, 19], [19, 18], [5, 19], [6, 20], [20, 1], [20, 16]], [[4, 3, 4, 5], [1, 0, 1, 2], [4, 7, 8, 9], [1, 10, 11, 0], [4, 12, 3, 13], [4, 14, 15, 7], [3, 17, 4, 18], [3, 19, 13, 17], [5, 21, 19, 11], [5, 1, 20, 21], [5, 22, 18, 6], [5, 23, 16, 22], [3, 24, 15, 23], [3, 8, 24, 20], [4, 25, 26, 10], [3, 27, 28, 12], [2, 29, 27, 26], [3, 30, 31, 9], [4, 32, 33, 2], [3, 36, 37, 14], [2, 32, 31, 38], [2, 39, 35, 36], [4, 40, 41, 34], [1, 42, 41, 6], [4, 43, 35, 44], [1, 44, 16, 42], [3, 45, 46, 5], [2, 47, 34, 45]], [29, 29]];
public static const Level9:Array = [[[1, 1], [27, 1], [1, 27], [14, 4], [14, 24], [24, 14], [4, 14], [21, 21], [22, 6], [7, 21], [11, 1], [17, 1], [1, 11], [1, 17], [27, 17], [11, 27], [17, 27], [27, 27], [27, 11], [6, 6], [11, 11], [11, 17], [17, 17], [17, 11]], [[6, 0], [8, 5], [5, 1], [7, 5], [9, 6], [6, 2], [0, 3], [3, 1], [8, 3], [2, 4], [4, 9], [7, 4], [0, 10], [10, 3], [3, 11], [11, 1], [2, 13], [13, 6], [6, 12], [12, 0], [5, 14], [16, 4], [4, 15], [15, 2], [14, 17], [17, 5], [17, 16], [4, 17], [5, 18], [18, 1], [3, 19], [19, 6], [6, 3], [4, 6], [5, 4], [5, 3], [20, 21], [21, 6], [23, 5], [22, 23], [3, 20], [20, 23], [4, 22], [22, 21], [8, 1], [19, 0], [17, 7], [2, 9]], [[4, 12, 13, 6], [3, 14, 15, 7], [3, 16, 17, 5], [4, 18, 19, 0], [3, 22, 23, 9], [4, 24, 25, 20], [4, 26, 21, 27], [3, 28, 29, 2], [2, 32, 30, 31], [2, 10, 33, 4], [2, 11, 3, 34], [2, 1, 35, 8], [2, 41, 39, 43, 36], [3, 32, 40, 36, 37], [4, 40, 41, 38, 35], [3, 38, 34, 42, 39], [4, 43, 37, 33, 42], [2, 44, 2, 1], [4, 7, 44, 8], [3, 6, 30, 45], [2, 45, 31, 0], [2, 3, 25, 46], [3, 11, 27, 46], [4, 10, 9, 47], [2, 5, 4, 47]], [29, 29]];
public static const RotatedHouse:Array = [[[1, 10], [11, 10], [19, 10], [29, 10], [6, 1], [24, 1], [15, 1], [29, 19], [6, 15], [1, 19], [24, 15], [15, 17], [7, 25], [1, 29], [10, 19], [20, 19], [23, 25], [29, 29]], [[0, 4], [4, 1], [1, 6], [6, 2], [2, 5], [5, 3], [9, 0], [0, 1], [1, 8], [8, 9], [2, 3], [3, 7], [7, 10], [10, 2], [2, 11], [11, 1], [1, 2], [12, 13], [13, 9], [8, 14], [14, 12], [12, 9], [8, 12], [14, 11], [11, 15], [15, 16], [16, 17], [17, 7], [7, 16], [10, 16], [1, 14], [2, 15], [15, 10], [12, 16]], [[5, 7, 0, 1], [5, 9, 6, 7, 8], [2, 16, 2, 3], [5, 10, 4, 5], [5, 8, 30, 19], [1, 22, 19, 20], [1, 22, 9, 21], [1, 18, 21, 17], [0, 33, 25, 24, 23, 20], [1, 25, 32, 29], [1, 28, 27, 26], [1, 29, 12, 28], [5, 12, 13, 10, 11], [5, 13, 32, 31], [1, 14, 31, 24], [1, 23, 30, 15], [2, 15, 16, 14]], [31, 31]];
public static const YoungButterfly:Array = [[[1, 1], [1, 9], [1, 29], [1, 20], [29, 1], [29, 29], [6, 4], [24, 4], [11, 6], [8, 27], [12, 20], [18, 20], [4, 24], [5, 12], [9, 13], [13, 12], [15, 6], [17, 12], [19, 6], [21, 13], [25, 12], [29, 9], [6, 19], [22, 27], [24, 19], [29, 20], [26, 24]], [[0, 1], [1, 6], [6, 0], [1, 13], [13, 6], [6, 8], [8, 13], [8, 14], [14, 13], [8, 15], [15, 14], [15, 16], [16, 8], [15, 17], [17, 16], [17, 18], [18, 16], [18, 19], [19, 17], [19, 20], [18, 20], [18, 7], [7, 20], [20, 21], [21, 7], [7, 4], [4, 21], [13, 3], [3, 1], [13, 22], [22, 3], [22, 14], [22, 10], [10, 14], [3, 2], [2, 12], [12, 3], [12, 22], [12, 9], [9, 2], [9, 22], [9, 10], [10, 15], [10, 11], [11, 17], [11, 19], [11, 23], [24, 26], [26, 25], [25, 24], [24, 23], [23, 5], [5, 25], [26, 5], [26, 23], [24, 11], [24, 19], [24, 20], [25, 20], [25, 21]], [[5, 0, 1, 2], [5, 3, 4, 1], [5, 5, 6, 4], [3, 7, 8, 6], [3, 9, 10, 7], [5, 11, 12, 9], [3, 11, 14, 13], [5, 15, 16, 14], [3, 17, 18, 15], [3, 17, 20, 19], [5, 21, 22, 20], [5, 23, 24, 22], [5, 25, 26, 24], [3, 27, 28, 3], [3, 29, 30, 27], [3, 31, 29, 8], [2, 32, 33, 31], [2, 36, 35, 34], [2, 36, 30, 37], [2, 37, 40, 38], [1, 35, 38, 39], [1, 40, 32, 41], [1, 44, 13, 42, 43], [1, 42, 33, 10], [1, 18, 44, 45], [3, 59, 23, 58], [3, 57, 58, 49], [3, 57, 56, 19], [2, 45, 56, 55], [1, 55, 50, 46], [2, 50, 47, 54], [2, 47, 49, 48], [2, 48, 52, 53], [1, 51, 54, 53]], [31, 31]];
public static const Banner:Array = [[[1, 5], [11, 6], [5, 8], [1, 9], [9, 9], [15, 8], [19, 6], [21, 9], [25, 8], [29, 5], [29, 9], [5, 12], [25, 12], [15, 12], [11, 1], [19, 1]], [[0, 2], [2, 3], [3, 0], [2, 1], [1, 0], [2, 4], [3, 11], [11, 4], [4, 1], [1, 5], [5, 6], [6, 7], [7, 8], [8, 10], [10, 9], [9, 6], [6, 1], [7, 12], [12, 10], [8, 6], [8, 9], [7, 5], [5, 4], [4, 13], [13, 5], [13, 7], [2, 11], [8, 12], [0, 14], [14, 1], [14, 15], [15, 6], [15, 9]], [[2, 4, 28, 29], [3, 16, 29, 30, 31], [2, 31, 32, 15], [0, 0, 4, 3], [6, 9, 16, 10], [1, 1, 2, 0], [5, 5, 3, 8], [0, 22, 8, 9], [0, 21, 10, 11], [1, 12, 11, 19], [3, 13, 20, 14], [0, 19, 15, 20], [3, 6, 1, 26], [2, 7, 26, 5], [4, 23, 22, 24], [4, 25, 24, 21], [0, 17, 12, 27], [0, 18, 27, 13]], [31, 20]];
public static const Alga:Array = [[[2, 1], [1, 6], [5, 4], [6, 8], [1, 11], [7, 13], [3, 16], [9, 17], [4, 21], [2, 25], [1, 29], [9, 25], [7, 29], [12, 28], [11, 12], [9, 21], [11, 4], [15, 1], [15, 14], [19, 4], [20, 8], [19, 12], [15, 8], [10, 8], [15, 19], [15, 25], [18, 28], [21, 17], [21, 21], [21, 25], [23, 29], [29, 29], [28, 25], [26, 21], [27, 16], [29, 11], [29, 6], [28, 1], [25, 4], [24, 8], [23, 13]], [[0, 1], [1, 2], [2, 0], [2, 3], [3, 1], [1, 4], [4, 3], [3, 5], [5, 7], [7, 14], [5, 4], [5, 6], [6, 4], [6, 7], [7, 15], [15, 6], [6, 8], [8, 11], [11, 15], [15, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 10], [13, 12], [13, 11], [9, 11], [14, 18], [18, 24], [24, 7], [7, 18], [15, 24], [11, 25], [25, 13], [25, 26], [26, 13], [22, 17], [17, 16], [16, 23], [23, 14], [18, 21], [21, 20], [20, 19], [19, 17], [22, 16], [22, 23], [22, 14], [22, 18], [22, 21], [22, 20], [22, 19], [21, 27], [27, 18], [24, 27], [27, 28], [28, 24], [25, 29], [29, 28], [29, 26], [29, 30], [30, 26], [30, 31], [31, 32], [32, 33], [33, 34], [34, 35], [35, 36], [36, 37], [37, 38], [38, 39], [39, 40], [40, 27], [38, 36], [36, 39], [39, 35], [35, 40], [40, 34], [34, 27], [34, 28], [28, 33], [29, 33], [29, 32], [29, 31]], [[3, 2, 1, 0], [3, 1, 4, 3], [3, 4, 6, 5], [3, 6, 10, 7], [3, 10, 11, 12], [3, 11, 13, 8], [3, 13, 14, 15], [3, 15, 16, 19], [5, 27, 22, 21], [5, 27, 20, 17], [5, 17, 19, 18], [5, 22, 23, 24], [5, 23, 26, 25], [4, 37, 45, 38], [4, 45, 46, 39], [4, 46, 47, 40], [4, 47, 48, 28], [4, 48, 49, 41], [4, 37, 44, 51], [4, 51, 43, 50], [4, 50, 42, 49], [4, 9, 31, 28], [4, 29, 30, 31], [4, 14, 30, 32], [4, 53, 41, 52], [4, 53, 54, 29], [4, 54, 55, 56], [5, 82, 83, 63], [5, 83, 62, 60], [5, 60, 61, 59], [5, 35, 36, 34], [5, 34, 26, 33], [5, 57, 35, 59], [5, 81, 82, 64], [5, 81, 58, 80], [3, 79, 80, 65], [3, 79, 55, 78], [3, 77, 78, 72], [3, 76, 77, 66], [3, 76, 71, 75], [3, 75, 74, 67], [3, 74, 70, 73], [3, 73, 69, 68]], [31, 31]];
public static const Banner2:Array = [[[1, 3], [1, 7], [10, 0], [6, 5], [20, 0], [29, 3], [29, 7], [24, 5], [12, 3], [18, 3], [15, 7], [8, 9], [22, 9], [15, 11], [1, 11], [1, 0], [29, 0], [29, 11]], [[0, 3], [3, 1], [6, 7], [7, 5], [5, 4], [4, 2], [2, 0], [3, 2], [0, 1], [4, 7], [5, 6], [2, 8], [8, 3], [8, 9], [9, 4], [9, 7], [1, 11], [11, 3], [8, 10], [10, 9], [3, 10], [10, 7], [11, 10], [10, 12], [12, 7], [12, 6], [11, 13], [13, 12], [10, 13], [11, 14], [14, 1], [0, 15], [15, 2], [4, 16], [16, 5], [12, 17], [17, 6]], [[6, 10, 2, 3], [3, 1, 8, 0], [1, 0, 6, 7], [3, 12, 7, 11], [0, 13, 14, 5, 11], [3, 15, 14, 9], [4, 9, 4, 3], [0, 20, 12, 18], [4, 18, 13, 19], [0, 19, 15, 21], [1, 23, 21, 24], [0, 25, 24, 2], [5, 22, 17, 20], [0, 16, 1, 17], [5, 29, 30, 16], [0, 6, 31, 32], [0, 4, 33, 34], [2, 28, 27, 23], [2, 26, 22, 28], [5, 35, 36, 25]], [31, 13]];
public static const ElvenClock:Array = [[[1, 1], [7, 1], [29, 1], [23, 1], [15, 1], [3, 5], [27, 5], [6, 7], [24, 7], [13, 13], [17, 13], [1, 29], [29, 29], [3, 25], [27, 25], [6, 23], [13, 17], [17, 17], [15, 29], [7, 29], [23, 29], [15, 21], [10, 20], [20, 20], [24, 23], [9, 26], [21, 26], [12, 24], [18, 24], [10, 10], [20, 10], [15, 9], [12, 6], [18, 6], [9, 4], [21, 4]], [[11, 13], [13, 15], [16, 9], [7, 5], [5, 0], [0, 1], [1, 4], [4, 3], [3, 2], [2, 6], [6, 8], [10, 17], [14, 12], [12, 20], [20, 18], [18, 19], [19, 11], [19, 13], [19, 15], [15, 22], [22, 16], [16, 21], [21, 22], [21, 17], [21, 23], [20, 14], [20, 24], [14, 24], [15, 25], [25, 18], [18, 26], [26, 24], [24, 23], [23, 17], [25, 27], [27, 18], [18, 28], [28, 21], [21, 27], [27, 22], [27, 28], [28, 23], [27, 15], [25, 19], [26, 20], [26, 28], [28, 24], [16, 17], [10, 9], [7, 29], [29, 9], [8, 30], [30, 10], [5, 1], [7, 1], [3, 6], [3, 8], [9, 31], [31, 10], [31, 29], [31, 30], [30, 33], [33, 32], [32, 29], [32, 31], [31, 33], [33, 4], [4, 32], [32, 34], [34, 1], [33, 35], [35, 3], [7, 34], [34, 4], [32, 7], [33, 8], [35, 4], [35, 8]], [[5, 0, 17, 16], [5, 17, 1, 18], [5, 18, 28, 43], [5, 43, 29, 15], [4, 28, 42, 34], [4, 42, 19, 39], [4, 29, 34, 35], [2, 36, 35, 40], [4, 36, 45, 30], [5, 30, 14, 44], [5, 31, 26, 44], [5, 26, 27, 25], [5, 25, 12, 13], [4, 46, 45, 31], [4, 46, 41, 32], [2, 37, 40, 38], [2, 39, 22, 38], [2, 24, 37, 41], [2, 22, 20, 21], [2, 23, 24, 33], [2, 23, 21, 47], [2, 2, 48, 11, 47], [2, 57, 58, 48], [2, 59, 50, 57], [2, 60, 52, 58], [2, 65, 61, 60], [2, 65, 62, 64], [2, 64, 59, 63], [2, 66, 67, 62], [5, 53, 4, 5], [5, 53, 54, 3], [5, 72, 54, 69], [5, 73, 6, 69], [4, 73, 67, 68], [4, 74, 68, 72], [4, 74, 49, 63], [4, 75, 61, 51], [4, 77, 75, 70], [5, 77, 71, 56], [5, 56, 55, 10], [5, 55, 8, 9], [4, 76, 70, 66], [5, 76, 7, 71]], [31, 31]];
public static const KingsCrown:Array = [[[3, 3], [1, 21], [27, 3], [29, 21], [10, 4], [20, 4], [5, 29], [25, 15], [11, 11], [19, 11], [20, 19], [10, 19], [13, 24], [17, 24], [25, 29], [15, 28], [7, 1], [23, 1], [0, 11], [30, 11], [13, 16], [17, 16], [15, 2], [15, 7], [5, 15], [23, 22], [7, 22], [15, 20]], [[7, 3], [4, 8], [5, 9], [7, 10], [10, 9], [11, 8], [1, 6], [11, 12], [12, 6], [12, 13], [13, 10], [13, 14], [14, 3], [14, 15], [15, 6], [12, 15], [15, 13], [17, 2], [17, 5], [16, 4], [0, 16], [9, 7], [5, 7], [7, 17], [2, 7], [2, 19], [19, 7], [0, 18], [11, 20], [20, 21], [21, 10], [4, 22], [22, 5], [5, 23], [23, 4], [8, 23], [23, 9], [9, 21], [20, 8], [18, 1], [3, 19], [1, 24], [24, 18], [24, 0], [24, 16], [24, 4], [24, 8], [24, 11], [1, 26], [26, 11], [26, 6], [12, 26], [25, 10], [25, 3], [25, 13], [14, 25], [21, 27], [27, 12], [24, 26], [7, 25]], [[1, 14, 8, 15], [5, 11, 13, 16], [2, 9, 16, 15], [5, 21, 3, 4], [1, 22, 21, 2], [2, 23, 18, 22], [5, 24, 23, 17], [1, 25, 26, 24], [2, 31, 32, 33, 34], [2, 37, 29, 38, 35, 36], [1, 4, 30, 37], [5, 38, 28, 5], [5, 2, 36, 33], [1, 34, 35, 1], [2, 40, 26, 0], [2, 41, 42, 39], [5, 43, 27, 42], [1, 44, 20, 43], [2, 45, 19, 44], [5, 46, 1, 45], [1, 47, 5, 46], [5, 50, 8, 51], [5, 7, 51, 49], [2, 50, 6, 48], [1, 54, 11, 55], [1, 52, 10, 54], [2, 53, 12, 55], [1, 56, 57, 9, 10, 30], [5, 29, 56, 57, 7, 28], [5, 58, 48, 41], [5, 47, 49, 58], [1, 59, 53, 0], [1, 3, 59, 52]], [31, 31]];
public static const Fish:Array = [[[1, 1], [2, 7], [5, 13], [10, 18], [16, 21], [10, 2], [17, 4], [23, 10], [25, 16], [26, 21], [25, 30], [28, 27], [32, 24], [35, 21], [4, 20], [8, 22], [6, 5], [9, 9], [12, 6], [17, 10], [12, 13], [19, 14], [18, 18]], [[0, 1], [1, 2], [2, 3], [3, 4], [4, 9], [9, 8], [8, 7], [7, 6], [6, 5], [5, 0], [2, 14], [14, 15], [15, 3], [1, 16], [16, 17], [17, 2], [5, 16], [17, 1], [16, 18], [18, 5], [17, 18], [18, 6], [2, 20], [20, 17], [17, 19], [19, 18], [6, 19], [19, 20], [20, 3], [7, 19], [20, 21], [21, 19], [7, 21], [21, 8], [21, 22], [4, 22], [22, 8], [22, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 9], [9, 11], [9, 12], [20, 22], [22, 3]], [[2, 0, 13, 16, 9], [4, 17, 13, 14], [5, 14, 20, 18], [4, 18, 16, 19], [5, 19, 8, 21], [3, 25, 21, 26], [4, 26, 7, 29], [3, 29, 32, 31], [4, 20, 25, 24], [5, 17, 15, 1], [4, 15, 23, 22], [3, 23, 24, 27], [5, 27, 31, 30], [4, 32, 6, 33], [5, 34, 33, 36], [4, 36, 5, 37], [5, 35, 37, 4], [4, 3, 46, 35], [5, 28, 45, 46], [3, 45, 30, 34], [3, 2, 22, 28], [2, 12, 2, 10, 11], [2, 38, 39, 43], [2, 43, 40, 44], [2, 44, 41, 42]], [37, 32]];
public static const SauronsTower:Array = [[[10, 1], [9, 5], [11, 9], [20, 1], [21, 5], [19, 9], [15, 1], [12, 4], [18, 4], [15, 7], [25, 4], [5, 4], [7, 10], [23, 10], [11, 15], [19, 15], [5, 15], [1, 22], [25, 15], [8, 19], [15, 22], [22, 19], [15, 18], [29, 22], [6, 23], [24, 23], [1, 29], [7, 29], [10, 26], [20, 26], [15, 29], [23, 29], [29, 29], [15, 12]], [[6, 7], [7, 9], [9, 8], [8, 6], [0, 11], [11, 12], [12, 2], [2, 1], [1, 0], [3, 4], [4, 5], [5, 13], [13, 10], [10, 3], [4, 10], [1, 11], [1, 12], [4, 13], [2, 9], [9, 5], [12, 16], [18, 13], [2, 14], [14, 16], [14, 33], [33, 2], [33, 9], [33, 5], [33, 15], [15, 5], [15, 18], [14, 22], [22, 15], [22, 20], [26, 17], [17, 24], [24, 28], [28, 27], [27, 26], [14, 19], [19, 22], [19, 16], [22, 21], [21, 15], [18, 21], [19, 20], [20, 21], [18, 23], [23, 21], [16, 17], [17, 19], [19, 24], [24, 20], [20, 25], [25, 21], [25, 23], [32, 23], [28, 20], [20, 29], [29, 25], [29, 28], [28, 30], [30, 27], [30, 29], [29, 31], [31, 32], [30, 31], [12, 14], [13, 15]], [[2, 0, 1, 2, 3], [6, 8, 15, 4], [6, 16, 5, 15], [6, 16, 7, 6], [6, 9, 13, 14], [6, 17, 14, 12], [6, 17, 11, 10], [6, 27, 26, 19], [6, 25, 18, 26], [5, 22, 25, 24], [5, 28, 27, 29], [6, 39, 40, 31], [5, 41, 23, 39], [6, 42, 32, 43], [5, 43, 30, 44], [6, 41, 50, 49], [2, 50, 51, 35], [5, 34, 35, 36, 37, 38], [5, 64, 65, 56, 55, 59], [5, 52, 51, 45], [5, 45, 40, 33], [5, 46, 33, 42], [5, 53, 46, 54], [2, 54, 48, 55], [6, 48, 44, 47], [6, 57, 36, 52], [2, 57, 58, 60], [6, 58, 53, 59], [2, 63, 64, 66], [2, 62, 37, 61], [2, 61, 60, 63], [5, 67, 23, 20], [5, 67, 6, 22], [5, 29, 11, 68], [5, 68, 21, 30], [6, 24, 28, 32, 31]], [31, 31]];
public static const ElvenHouse:Array = [[[15, 1], [1, 11], [11, 6], [7, 9], [19, 6], [15, 6], [29, 11], [23, 9], [7, 13], [12, 10], [18, 10], [23, 13], [15, 14], [11, 29], [10, 25], [20, 25], [19, 29], [15, 26], [9, 20], [13, 18], [17, 18], [13, 22], [17, 22], [21, 20]], [[0, 2], [2, 3], [3, 1], [1, 8], [8, 9], [9, 3], [9, 2], [2, 5], [5, 0], [0, 4], [4, 5], [5, 9], [5, 10], [10, 4], [4, 7], [7, 6], [6, 11], [11, 10], [10, 12], [12, 9], [10, 7], [8, 12], [12, 11], [14, 13], [15, 16], [16, 17], [17, 13], [13, 16], [12, 19], [19, 20], [20, 12], [19, 18], [18, 21], [21, 22], [22, 23], [23, 20], [20, 22], [22, 17], [17, 21], [21, 19], [14, 18], [8, 18], [8, 19], [11, 20], [11, 23], [23, 15], [15, 22], [21, 14], [14, 17], [17, 15]], [[4, 28, 30, 29], [4, 31, 39, 32], [4, 39, 29, 36, 33], [4, 38, 33, 37], [4, 34, 36, 35], [4, 19, 11, 12, 18], [3, 7, 0, 8], [3, 7, 11, 6], [3, 5, 1, 6], [3, 5, 2, 3, 4], [3, 10, 8, 9], [3, 10, 13, 12], [3, 13, 14, 20], [3, 20, 15, 16, 17], [3, 21, 4, 19], [3, 22, 18, 17], [5, 42, 21, 28], [5, 41, 42, 31], [5, 40, 32, 47], [5, 48, 47, 38], [5, 23, 48, 26], [5, 26, 25, 27], [5, 25, 49, 24], [5, 49, 37, 46], [5, 46, 34, 45], [5, 35, 43, 44], [5, 43, 30, 22]], [31, 31]];
public static const Pentagrams:Array = [[[1, 1], [29, 1], [9, 5], [21, 5], [15, 1], [1, 9], [29, 9], [12, 11], [18, 11], [1, 29], [29, 29], [1, 20], [29, 20], [9, 25], [21, 25], [15, 29], [12, 19], [18, 19], [24, 15], [6, 15]], [[0, 2], [2, 5], [5, 0], [2, 4], [4, 3], [3, 8], [8, 7], [7, 2], [0, 4], [4, 1], [1, 6], [6, 3], [3, 1], [5, 7], [8, 6], [13, 16], [16, 17], [17, 14], [14, 15], [15, 13], [13, 9], [9, 15], [15, 10], [10, 12], [12, 14], [13, 11], [11, 9], [11, 16], [17, 12], [7, 16], [8, 17], [14, 10], [8, 18], [18, 17], [18, 6], [6, 12], [12, 18], [7, 19], [19, 16], [19, 11], [11, 5], [5, 19]], [[0, 19, 15, 16, 17, 18], [0, 3, 4, 5, 6, 7], [2, 12, 11, 10], [2, 2, 0, 1], [5, 32, 14, 34], [5, 33, 36, 28], [1, 30, 32, 33], [1, 34, 35, 36], [1, 41, 39, 40], [5, 41, 13, 37], [5, 39, 38, 27], [1, 38, 37, 29], [1, 25, 27, 15], [1, 17, 28, 24], [2, 24, 23, 31], [2, 25, 20, 26], [5, 20, 19, 21], [5, 18, 31, 22], [1, 1, 7, 13], [2, 30, 16, 29, 6], [5, 0, 8, 3], [5, 4, 9, 12], [1, 5, 11, 14]], [31, 31]];
public static const Grass:Array = [[[1, 29], [29, 29], [3, 24], [6, 29], [24, 29], [12, 29], [18, 29], [27, 24], [13, 24], [17, 24], [22, 25], [8, 25], [8, 21], [22, 21], [27, 19], [24, 15], [17, 19], [13, 19], [3, 19], [6, 15], [1, 11], [29, 11], [15, 14], [13, 9], [17, 9], [10, 16], [9, 11], [3, 5], [8, 2], [20, 16], [15, 1], [21, 11], [22, 2], [27, 5]], [[5, 8], [8, 9], [9, 6], [6, 5], [6, 10], [10, 4], [4, 6], [10, 9], [8, 11], [11, 5], [11, 3], [3, 5], [3, 2], [2, 0], [0, 3], [2, 11], [10, 7], [7, 4], [7, 1], [1, 4], [2, 12], [12, 11], [12, 8], [9, 13], [13, 10], [13, 7], [13, 14], [14, 7], [14, 15], [15, 13], [13, 16], [16, 17], [17, 12], [12, 18], [18, 2], [18, 19], [19, 12], [18, 20], [20, 19], [14, 21], [21, 15], [22, 17], [22, 16], [12, 25], [25, 19], [25, 17], [27, 19], [25, 26], [26, 27], [26, 19], [26, 23], [23, 28], [28, 26], [25, 23], [23, 22], [22, 25], [22, 29], [29, 16], [29, 13], [29, 15], [23, 30], [30, 24], [24, 23], [24, 22], [24, 31], [31, 29], [29, 24], [24, 32], [32, 31], [31, 15], [15, 33], [33, 31]], [[5, 12, 13, 14], [5, 12, 15, 10], [5, 10, 9, 11], [5, 9, 8, 0], [5, 0, 1, 2, 3], [5, 2, 7, 4], [5, 4, 5, 6], [5, 5, 16, 17], [5, 17, 18, 19], [5, 15, 20, 21], [5, 21, 22, 8], [0, 22, 1, 23, 30, 31, 32], [5, 23, 24, 7], [5, 24, 25, 16], [5, 25, 26, 27], [5, 34, 33, 20], [3, 33, 36, 35], [3, 37, 38, 35], [3, 29, 28, 26], [3, 28, 40, 39], [2, 36, 44, 43], [2, 43, 45, 32], [3, 46, 48, 49], [3, 49, 47, 44], [3, 47, 53, 50], [3, 52, 51, 50], [2, 45, 55, 41], [2, 41, 42, 31], [2, 56, 57, 42], [2, 58, 59, 29], [2, 30, 57, 58], [2, 53, 54, 55], [3, 67, 68, 64], [3, 66, 64, 65], [3, 69, 59, 65], [3, 70, 71, 69], [3, 62, 60, 61], [3, 54, 62, 63], [2, 56, 63, 66]], [31, 31]];
public static const BarinBarLevel:Array = [[[1, 1], [29, 29], [1, 29], [29, 1], [1, 15], [15, 1], [29, 15], [15, 29], [5, 25], [25, 5], [25, 25], [15, 15], [15, 9], [15, 21], [21, 15], [9, 15], [5, 5]], [[0, 4], [4, 2], [2, 7], [7, 1], [1, 6], [6, 3], [3, 5], [5, 0], [5, 9], [9, 6], [6, 10], [10, 7], [7, 8], [8, 4], [12, 15], [15, 13], [13, 14], [14, 12], [12, 11], [13, 11], [14, 11], [11, 15], [15, 8], [13, 8], [13, 10], [14, 10], [14, 9], [9, 12], [4, 16], [16, 5], [12, 16], [16, 15]], [[4, 29, 7, 0, 28], [4, 9, 5, 6, 8], [4, 3, 4, 10, 11], [4, 12, 13, 1, 2], [1, 29, 8, 27, 30], [1, 31, 22, 13, 28], [1, 24, 11, 12, 23], [1, 26, 9, 10, 25], [5, 31, 30, 14], [5, 27, 26, 17], [5, 22, 23, 15], [5, 24, 25, 16], [4, 14, 18, 21], [1, 21, 19, 15], [4, 20, 16, 19], [1, 18, 17, 20]], [31, 31]];
public static const Combof3colors:Array = [[[1, 1], [1, 25], [29, 1], [29, 25], [6, 11], [15, 7], [10, 3], [20, 3], [5, 20], [5, 29], [24, 11], [25, 20], [11, 11], [19, 11], [20, 19], [10, 19], [15, 15], [12, 25], [18, 25], [25, 29]], [[0, 4], [4, 8], [8, 1], [1, 0], [2, 10], [10, 11], [11, 3], [3, 2], [4, 6], [6, 12], [12, 4], [12, 5], [5, 6], [5, 7], [7, 13], [13, 5], [13, 10], [10, 7], [11, 14], [14, 13], [6, 7], [10, 14], [4, 15], [15, 8], [15, 12], [12, 16], [16, 13], [1, 9], [9, 15], [15, 17], [17, 9], [17, 18], [18, 14], [14, 16], [16, 15], [18, 19], [19, 14], [19, 3]], [[1, 3, 0, 1, 2], [1, 1, 22, 23], [1, 28, 23, 2, 27], [1, 22, 10, 24], [2, 10, 8, 9], [2, 9, 12, 11], [2, 13, 14, 15], [2, 12, 20, 13], [2, 14, 17, 16], [2, 25, 34, 24], [2, 26, 19, 33], [2, 15, 11, 25, 26], [5, 19, 16, 21], [5, 6, 7, 4, 5], [5, 18, 21, 5], [5, 36, 18, 6, 37], [5, 32, 36, 35], [1, 30, 28, 29], [0, 33, 34, 29, 31, 32]], [31, 31]];
public static const ElvenCup:Array = [[[1, 1], [29, 1], [6, 3], [1, 6], [7, 9], [1, 10], [1, 14], [11, 3], [12, 8], [10, 13], [24, 3], [29, 6], [19, 3], [29, 10], [23, 9], [18, 8], [29, 14], [15, 20], [6, 19], [10, 24], [3, 24], [15, 25], [12, 29], [24, 19], [18, 29], [20, 24], [23, 28], [27, 24], [1, 29], [29, 29], [7, 28], [20, 13]], [[0, 3], [3, 5], [5, 6], [6, 9], [9, 8], [8, 7], [7, 2], [2, 0], [15, 12], [12, 10], [10, 1], [1, 11], [11, 13], [13, 16], [17, 9], [9, 18], [18, 17], [17, 23], [28, 20], [20, 19], [28, 30], [30, 19], [20, 30], [25, 26], [26, 29], [29, 27], [27, 25], [19, 22], [22, 30], [25, 24], [24, 26], [19, 21], [21, 22], [21, 24], [25, 21], [18, 20], [18, 19], [19, 17], [17, 21], [17, 25], [25, 23], [23, 27], [9, 31], [31, 17], [31, 23], [15, 31], [31, 16], [3, 2], [4, 2], [4, 3], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [18, 6], [23, 16], [31, 14], [14, 16], [14, 13], [14, 11], [14, 10], [14, 12], [14, 15], [11, 10], [26, 27]], [[3, 57, 58, 46], [3, 44, 46, 56], [3, 14, 42, 43], [3, 15, 14, 16], [3, 43, 44, 17], [3, 55, 3, 15], [3, 3, 51, 54], [4, 54, 53, 4], [4, 53, 52, 5], [4, 52, 48, 6], [2, 49, 47, 48], [2, 47, 7, 0], [2, 1, 49, 50], [2, 2, 50, 51], [2, 38, 31, 37], [2, 27, 31, 32], [2, 34, 38, 39], [2, 33, 34, 29], [4, 21, 27, 28], [4, 22, 19, 21], [4, 18, 22, 20], [4, 19, 35, 36], [3, 37, 36, 16], [3, 39, 17, 40], [4, 57, 45, 63], [4, 63, 8, 62], [4, 62, 9, 61], [2, 61, 64, 60], [2, 60, 12, 59], [2, 58, 59, 13], [2, 64, 10, 11], [4, 40, 41, 26], [4, 23, 26, 65], [4, 29, 23, 30], [4, 65, 25, 24]], [31, 31]];
public static const Level1a:Array = [[[1, 1], [15, 1], [29, 1], [1, 29], [29, 29], [15, 29], [29, 15], [1, 15], [15, 15], [8, 8], [8, 22], [22, 8], [22, 22]], [[0, 9], [9, 7], [7, 10], [10, 3], [10, 5], [5, 12], [12, 4], [12, 6], [6, 11], [11, 2], [11, 1], [1, 9], [0, 7], [7, 3], [3, 5], [5, 4], [4, 6], [6, 2], [2, 1], [1, 0], [9, 8], [8, 12], [8, 11], [8, 10], [7, 8], [8, 6], [8, 1], [8, 5]], [[0, 0, 11, 19], [5, 11, 26, 20], [3, 1, 20, 24], [0, 1, 12, 0], [3, 26, 10, 22], [0, 10, 18, 9], [0, 8, 17, 9], [5, 22, 8, 25], [5, 2, 24, 23], [3, 23, 27, 4], [0, 3, 13, 2], [0, 3, 4, 14], [5, 27, 21, 5], [3, 21, 25, 7], [0, 7, 16, 6], [0, 5, 6, 15]], [31, 31]];
public static const ElvenJewel:Array = [[[1, 1], [29, 1], [15, 5], [15, 1], [7, 10], [8, 4], [22, 4], [15, 9], [23, 10], [5, 15], [11, 15], [25, 15], [19, 15], [7, 20], [15, 21], [23, 20], [15, 25], [15, 29], [7, 26], [23, 26], [1, 29], [29, 29], [29, 10], [29, 20], [1, 20], [1, 10]], [[5, 3], [3, 2], [2, 5], [2, 6], [6, 3], [2, 4], [4, 5], [4, 7], [7, 2], [2, 8], [8, 7], [6, 8], [3, 1], [1, 6], [8, 1], [3, 0], [0, 5], [0, 4], [4, 10], [10, 7], [4, 9], [9, 10], [12, 11], [11, 8], [8, 12], [12, 7], [9, 13], [13, 10], [10, 14], [14, 12], [12, 15], [15, 11], [13, 14], [14, 15], [15, 16], [16, 13], [14, 16], [18, 16], [16, 19], [19, 15], [13, 18], [18, 17], [17, 16], [19, 17], [21, 17], [17, 20], [20, 18], [19, 21], [13, 20], [15, 21], [8, 22], [22, 11], [11, 23], [23, 15], [13, 24], [24, 9], [9, 25], [25, 4]], [[4, 16, 15, 0], [3, 0, 1, 2], [3, 1, 4, 3], [4, 13, 4, 12], [4, 13, 14, 11], [3, 9, 3, 11], [2, 8, 9, 10], [2, 7, 5, 8], [3, 5, 6, 2], [4, 6, 17, 16], [2, 18, 7, 19], [2, 25, 10, 24], [3, 24, 23, 22], [3, 21, 20, 18], [3, 26, 21, 27], [2, 27, 28, 32], [2, 29, 30, 33], [3, 30, 22, 31], [3, 40, 35, 37], [4, 48, 40, 46], [2, 35, 32, 36], [2, 34, 36, 33], [3, 34, 39, 38], [4, 39, 49, 47], [4, 43, 47, 44], [3, 43, 42, 38], [3, 41, 37, 42], [4, 45, 46, 41], [4, 31, 52, 53], [4, 51, 23, 50], [4, 54, 55, 26], [4, 56, 57, 20], [4, 19, 25, 29, 28]], [31, 31]];
public static const FacetDiamond:Array = [[[27, 20], [11, 19], [1, 14], [1, 27], [7, 16], [15, 12], [6, 25], [29, 14], [29, 27], [19, 19], [24, 25], [3, 20], [23, 16], [1, 8], [9, 8], [29, 8], [12, 1], [15, 28], [21, 8], [18, 1], [4, 2], [26, 2]], [[6, 1], [9, 10], [10, 17], [17, 6], [1, 17], [17, 9], [5, 9], [1, 5], [1, 9], [3, 6], [6, 11], [11, 3], [11, 4], [4, 1], [1, 11], [9, 0], [0, 8], [8, 10], [10, 0], [0, 12], [12, 9], [12, 7], [7, 0], [2, 11], [4, 2], [14, 2], [4, 14], [14, 13], [13, 2], [4, 5], [5, 14], [5, 12], [15, 7], [5, 18], [18, 15], [18, 12], [18, 7], [13, 20], [20, 16], [16, 14], [16, 19], [19, 18], [15, 21], [21, 19], [20, 14], [18, 21]], [[5, 44, 38, 39], [5, 37, 44, 27], [5, 28, 27, 25], [5, 24, 25, 26], [5, 23, 24, 12], [5, 12, 13, 14], [1, 10, 14, 0], [1, 11, 10, 9], [1, 0, 4, 3], [1, 4, 8, 5], [1, 5, 1, 2], [1, 1, 15, 18], [1, 18, 16, 17], [4, 8, 7, 6], [4, 7, 29, 13], [4, 6, 31, 20], [5, 15, 20, 19], [5, 22, 19, 21], [5, 36, 21, 35], [5, 36, 34, 32], [4, 33, 35, 31], [4, 30, 29, 26], [0, 39, 30, 33, 41, 40], [5, 41, 43, 45], [5, 45, 42, 34]], [31, 30]];
public static const Level30:Array = [[[15, 0], [30, 12], [24, 30], [0, 12], [6, 30], [15, 16], [10, 9], [20, 9], [7, 18], [23, 18], [15, 24], [0, 0], [0, 30], [30, 0], [30, 30]], [[0, 1], [1, 2], [0, 3], [3, 4], [4, 2], [0, 5], [5, 3], [5, 4], [2, 5], [5, 1], [3, 6], [6, 0], [6, 5], [3, 8], [8, 4], [8, 5], [11, 0], [0, 13], [13, 1], [1, 14], [14, 2], [4, 12], [12, 3], [3, 11], [0, 7], [7, 5], [7, 1], [1, 9], [9, 2], [9, 5], [10, 5], [10, 4], [2, 10]], [[1, 10, 11, 2], [3, 12, 6, 10], [2, 5, 12, 11], [1, 13, 14, 3], [6, 15, 7, 14], [3, 13, 15, 6], [5, 16, 2, 23], [2, 24, 25, 5], [1, 24, 26, 0], [3, 9, 25, 26], [3, 9, 27, 29], [6, 30, 31, 7], [6, 8, 32, 30], [6, 29, 28, 8], [1, 27, 1, 28], [5, 17, 18, 0], [1, 31, 32, 4], [5, 22, 3, 21], [5, 19, 20, 1]], [31, 31]];
public static const Husks:Array = [[[6, 11], [2, 18], [5, 15], [24, 11], [29, 12], [1, 12], [1, 25], [29, 25], [24, 21], [6, 21], [10, 18], [20, 18], [15, 16], [1, 4], [4, 6], [28, 18], [24, 15], [26, 6], [29, 4], [13, 9], [9, 13], [21, 13], [17, 9], [8, 6], [12, 3], [5, 1], [22, 6], [18, 3], [25, 1], [1, 29], [29, 29], [6, 29], [24, 29], [9, 25], [12, 29], [18, 29], [15, 25], [21, 25], [12, 21], [18, 21]], [[6, 9], [9, 1], [1, 6], [1, 2], [2, 9], [2, 5], [5, 1], [5, 0], [0, 2], [5, 14], [14, 0], [14, 13], [13, 5], [7, 8], [8, 15], [15, 7], [15, 16], [16, 8], [16, 4], [4, 15], [16, 3], [3, 4], [3, 17], [17, 4], [17, 18], [18, 4], [10, 12], [12, 20], [20, 10], [20, 19], [19, 12], [20, 23], [23, 19], [23, 24], [24, 19], [23, 25], [25, 24], [12, 22], [22, 21], [21, 11], [11, 12], [12, 21], [21, 26], [26, 22], [26, 27], [27, 22], [27, 28], [28, 26], [9, 10], [11, 8], [6, 29], [29, 31], [31, 33], [33, 9], [33, 10], [33, 34], [34, 31], [34, 36], [36, 35], [35, 34], [35, 37], [37, 32], [37, 8], [7, 30], [30, 32], [37, 11], [33, 36], [36, 39], [39, 37], [37, 36], [36, 38], [38, 33], [38, 10], [38, 39], [39, 11], [12, 39], [38, 12], [32, 35]], [[3, 35, 36, 33], [3, 32, 33, 34], [3, 31, 32, 29], [3, 29, 27, 30], [5, 28, 27, 26], [5, 72, 26, 76], [5, 76, 75, 73], [5, 75, 40, 74], [5, 40, 41, 39], [3, 41, 37, 38], [3, 38, 43, 42], [3, 43, 45, 44], [3, 44, 46, 47], [6, 71, 54, 72], [5, 71, 70, 66], [5, 70, 73, 67], [5, 67, 68, 69], [6, 68, 74, 65], [6, 65, 49, 62], [3, 23, 24, 25], [3, 21, 22, 23], [3, 18, 20, 21], [3, 17, 16, 14], [6, 13, 14, 15], [6, 64, 61, 62, 13, 63], [6, 77, 60, 61], [5, 60, 58, 69], [5, 59, 57, 58], [5, 57, 55, 66], [6, 52, 55, 56], [6, 50, 51, 52, 53, 0], [6, 53, 48, 54], [6, 1, 0, 2], [3, 1, 3, 4], [3, 3, 6, 5], [3, 5, 7, 8], [3, 7, 9, 10], [3, 9, 12, 11], [3, 16, 18, 19]], [31, 31]];
public static const ShildLevel:Array = [[[1, 2], [19, 2], [7, 4], [13, 4], [10, 12], [19, 12], [2, 20], [18, 20], [1, 12], [10, 20], [10, 27], [16, 27], [4, 27]], [[0, 8], [7, 5], [5, 1], [1, 3], [3, 2], [2, 0], [4, 8], [5, 4], [4, 3], [4, 2], [8, 6], [6, 9], [9, 4], [9, 7], [6, 12], [12, 10], [10, 11], [11, 7], [9, 10]], [[1, 7, 8, 3, 2], [2, 4, 8, 9], [5, 9, 5, 0, 6], [1, 6, 10, 11, 12], [5, 14, 15, 18, 11], [1, 17, 13, 18, 16], [5, 12, 7, 1, 13]], [21, 30]];
public static const Bird:Array = [[[2, 1], [9, 1], [6, 5], [23, 7], [26, 4], [29, 1], [8, 17], [0, 26], [3, 23], [7, 27], [13, 24], [29, 6], [27, 12], [17, 21], [22, 16], [20, 24], [26, 19], [21, 28], [28, 28], [31, 21], [15, 6], [19, 9], [24, 22], [19, 18], [12, 11], [7, 9], [13, 3], [16, 15], [6, 20]], [[0, 2], [8, 7], [7, 9], [9, 10], [10, 13], [13, 15], [15, 17], [17, 18], [18, 19], [19, 16], [16, 14], [14, 12], [12, 11], [11, 5], [5, 4], [4, 3], [3, 21], [21, 20], [1, 0], [22, 18], [15, 22], [22, 16], [22, 23], [23, 14], [23, 13], [13, 22], [22, 14], [22, 19], [22, 17], [4, 11], [4, 12], [12, 3], [12, 21], [21, 14], [8, 9], [6, 10], [6, 13], [2, 1], [6, 24], [24, 21], [2, 25], [1, 26], [26, 20], [20, 24], [24, 25], [25, 20], [2, 26], [20, 2], [24, 27], [27, 13], [27, 6], [27, 21], [27, 14], [27, 23], [25, 6], [6, 28], [28, 8], [8, 10], [10, 28]], [[4, 0, 37, 18], [4, 37, 46, 41], [4, 46, 42, 47], [4, 40, 45, 47], [3, 45, 43, 44], [3, 43, 17, 39], [3, 54, 44, 38], [3, 38, 48, 50], [3, 48, 39, 51], [3, 51, 33, 52], [5, 33, 11, 32], [5, 32, 16, 31], [5, 31, 15, 30], [5, 30, 29, 12], [5, 29, 14, 13], [3, 50, 49, 36], [5, 35, 36, 4], [5, 1, 34, 2], [3, 49, 24, 53], [3, 53, 52, 23], [5, 24, 25, 22], [5, 22, 23, 26], [3, 26, 10, 21], [3, 5, 20, 25], [4, 21, 27, 9], [4, 6, 20, 28], [4, 28, 19, 7], [4, 19, 27, 8], [5, 58, 55, 35], [5, 56, 58, 57], [5, 34, 57, 3]], [33, 30]];
public static const Level40:Array = [[[1, 15], [29, 15], [15, 29], [1, 8], [8, 1], [4, 4], [1, 22], [8, 29], [4, 26], [22, 29], [29, 22], [26, 26], [29, 8], [22, 1], [26, 4], [4, 12], [8, 8], [12, 4], [4, 18], [8, 22], [12, 26], [18, 26], [26, 18], [22, 22], [26, 12], [22, 8], [18, 4], [15, 1], [15, 15], [8, 15], [15, 22], [22, 15], [15, 8], [11, 11], [19, 11], [19, 19], [11, 19]], [[3, 5], [5, 4], [13, 14], [14, 12], [12, 1], [1, 10], [10, 11], [11, 9], [9, 2], [2, 7], [7, 8], [8, 6], [6, 0], [0, 3], [3, 15], [15, 0], [15, 16], [16, 17], [17, 4], [0, 18], [18, 6], [18, 15], [18, 19], [19, 20], [20, 7], [20, 2], [2, 21], [21, 9], [10, 22], [22, 1], [21, 23], [23, 22], [20, 21], [1, 24], [24, 12], [24, 25], [25, 26], [4, 27], [27, 13], [13, 26], [26, 27], [27, 17], [24, 22], [15, 29], [29, 18], [17, 26], [17, 32], [32, 26], [22, 31], [31, 24], [20, 30], [30, 21], [29, 16], [16, 32], [32, 25], [25, 31], [31, 23], [23, 30], [30, 19], [19, 29], [16, 33], [33, 29], [29, 36], [36, 19], [36, 30], [30, 35], [35, 23], [35, 31], [31, 34], [34, 25], [34, 32], [32, 28], [28, 30], [28, 31], [28, 29], [33, 32], [28, 34], [28, 33], [28, 36], [28, 35], [18, 8], [8, 20], [26, 14], [14, 24], [15, 5], [5, 17], [22, 11], [11, 21]], [[5, 18, 37, 41], [5, 40, 38, 39], [3, 34, 4, 33], [3, 29, 5, 28], [5, 26, 27, 8], [5, 25, 9, 24], [3, 20, 12, 19], [3, 15, 13, 14], [5, 19, 15, 21], [3, 45, 41, 40], [5, 42, 33, 29], [3, 25, 32, 26], [0, 44, 21, 43], [0, 52, 43, 16], [0, 53, 17, 46], [0, 46, 45, 47], [0, 54, 47, 36], [0, 55, 35, 49], [0, 48, 49, 42], [0, 31, 56, 48], [0, 30, 51, 57], [0, 32, 50, 51], [0, 50, 23, 58], [0, 22, 44, 59], [6, 61, 52, 60], [6, 75, 60, 53], [1, 70, 54, 69], [1, 68, 69, 55], [6, 66, 67, 56], [6, 57, 65, 66], [1, 58, 63, 64], [1, 63, 59, 62], [6, 71, 76, 70], [6, 76, 68, 73], [1, 79, 73, 67], [1, 72, 79, 65], [6, 72, 64, 78], [6, 62, 74, 78], [1, 74, 61, 77], [1, 77, 75, 71], [2, 80, 81, 23, 22], [2, 11, 20, 80], [2, 10, 81, 24], [2, 82, 83, 35, 36], [2, 82, 39, 2], [2, 83, 3, 34], [4, 84, 85, 17, 16], [4, 86, 87, 30, 31], [4, 27, 87, 7], [4, 6, 86, 28], [4, 14, 0, 84], [4, 85, 1, 18]], [31, 31]];
public static const CapsuledStar:Array = [[[1, 1], [29, 29], [7, 23], [23, 7], [4, 12], [12, 4], [18, 26], [26, 18], [5, 5], [15, 15], [25, 25], [10, 16], [20, 14], [11, 11], [19, 19], [16, 10], [14, 20]], [[0, 4], [4, 2], [2, 6], [6, 1], [1, 7], [7, 3], [3, 5], [5, 0], [4, 8], [8, 5], [5, 4], [6, 10], [10, 7], [7, 6], [8, 0], [10, 1], [13, 4], [4, 11], [11, 13], [13, 5], [5, 15], [15, 13], [15, 3], [3, 12], [12, 15], [12, 14], [14, 16], [16, 11], [11, 2], [2, 16], [16, 6], [6, 14], [14, 7], [7, 12], [13, 9], [9, 11], [9, 16], [9, 14], [9, 12], [9, 15]], [[1, 8, 0, 14], [3, 14, 7, 9], [0, 8, 9, 10], [3, 19, 20, 21], [1, 16, 17, 18], [0, 1, 17, 28], [3, 28, 27, 29], [1, 30, 26, 31], [3, 32, 25, 33], [1, 23, 24, 22], [3, 11, 15, 3], [1, 15, 12, 4], [0, 11, 13, 12], [0, 13, 31, 32], [0, 13, 31, 32], [0, 30, 2, 29], [0, 36, 37, 26], [0, 36, 27, 35], [0, 35, 18, 34], [0, 34, 21, 39], [0, 38, 39, 24], [0, 37, 38, 25], [0, 16, 10, 19], [0, 20, 6, 22], [0, 23, 5, 33]], [31, 31]];
public static const Arrow:Array = [[[1, 1], [1, 14], [14, 1], [6, 13], [13, 6], [11, 11], [16, 16], [20, 20], [25, 25], [29, 21], [21, 29], [24, 16], [16, 24], [11, 19], [19, 11]], [[0, 1], [1, 3], [3, 5], [5, 4], [4, 2], [2, 0], [0, 4], [0, 5], [0, 3], [3, 13], [13, 12], [12, 10], [10, 8], [8, 9], [9, 11], [11, 14], [14, 4], [5, 6], [6, 7], [7, 8], [7, 11], [7, 12], [6, 13], [6, 14], [5, 13], [5, 14], [7, 10], [7, 9]], [[1, 8, 1, 0], [5, 8, 7, 2], [5, 7, 3, 6], [1, 6, 5, 4], [0, 9, 2, 24], [0, 25, 3, 16], [5, 17, 25, 23], [5, 22, 24, 17], [0, 22, 10, 21, 18], [0, 20, 15, 23, 18], [5, 20, 14, 27], [5, 11, 21, 26], [0, 19, 27, 13], [0, 12, 26, 19]], [31, 31]];
public static const Bat:Array = [[[5, 3], [25, 3], [22, 9], [15, 5], [20, 3], [18, 8], [15, 11], [10, 3], [12, 8], [8, 9], [1, 1], [1, 11], [29, 1], [29, 11], [27, 17], [3, 17], [12, 16], [18, 16], [15, 29], [7, 22], [23, 22]], [[10, 0], [0, 9], [9, 8], [8, 6], [6, 5], [5, 3], [3, 8], [8, 7], [7, 3], [3, 4], [4, 5], [5, 2], [2, 1], [1, 12], [12, 13], [13, 14], [14, 2], [14, 1], [10, 11], [11, 15], [15, 9], [0, 15], [9, 16], [16, 6], [6, 17], [17, 2], [15, 19], [19, 18], [18, 20], [20, 14], [9, 19], [2, 20], [16, 19], [17, 20], [16, 18], [18, 17]], [[5, 21, 19, 18, 0], [5, 17, 13, 14, 15], [1, 26, 20, 30], [1, 20, 21, 1], [1, 12, 16, 17], [1, 31, 16, 29], [1, 4, 5, 6, 3], [5, 7, 8, 6], [5, 5, 9, 10], [5, 2, 3, 23, 22], [5, 4, 11, 25, 24], [1, 30, 22, 32], [1, 33, 25, 31], [5, 27, 32, 34], [5, 35, 33, 28], [0, 24, 35, 34, 23]], [31, 31]];
public static var ElvenCrown:Array = [[[1, 29], [29, 29], [5, 29], [9, 29], [25, 29], [21, 29], [9, 25], [11, 22], [19, 22], [21, 25], [11, 17], [3, 24], [5, 20], [7, 17], [5, 14], [1, 10], [7, 9], [5, 4], [15, 20], [15, 15], [27, 24], [25, 20], [23, 17], [19, 17], [9, 13], [12, 11], [10, 6], [13, 1], [15, 7], [18, 11], [17, 1], [20, 6], [23, 9], [25, 4], [21, 13], [29, 10], [25, 14]], [[0, 11], [11, 2], [2, 6], [6, 3], [0, 2], [2, 3], [6, 11], [11, 12], [12, 6], [6, 7], [7, 12], [12, 13], [13, 7], [7, 10], [10, 13], [13, 14], [14, 15], [15, 16], [16, 17], [10, 18], [18, 7], [9, 5], [9, 4], [4, 20], [20, 1], [1, 4], [4, 5], [9, 20], [21, 9], [21, 20], [21, 8], [8, 9], [21, 22], [22, 8], [8, 23], [23, 22], [23, 18], [18, 8], [10, 19], [19, 23], [13, 24], [24, 14], [24, 15], [24, 16], [24, 10], [16, 25], [25, 24], [25, 19], [25, 17], [17, 26], [26, 25], [25, 27], [27, 26], [27, 28], [28, 25], [28, 29], [29, 19], [28, 30], [30, 31], [31, 29], [29, 30], [31, 33], [33, 29], [29, 32], [32, 33], [32, 34], [34, 29], [34, 23], [32, 35], [35, 34], [35, 36], [36, 34], [36, 22], [22, 34]], [[5, 1, 4, 0], [5, 1, 6, 2], [5, 2, 3, 5], [5, 6, 7, 8], [5, 8, 10, 9], [5, 10, 11, 12], [4, 12, 14, 13], [4, 20, 13, 19], [4, 36, 37, 34], [5, 21, 22, 26], [5, 22, 27, 23], [5, 23, 24, 25], [5, 27, 28, 29], [5, 28, 31, 30], [5, 30, 33, 32], [4, 33, 34, 35], [4, 38, 39, 36, 19], [4, 40, 44, 14], [4, 40, 15, 41], [1, 16, 42, 41], [1, 42, 17, 43], [4, 47, 38, 44, 46], [4, 43, 45, 46], [1, 45, 18, 48], [1, 48, 49, 50], [1, 50, 52, 51], [0, 54, 47, 56, 55], [1, 53, 54, 51], [4, 67, 39, 56, 66], [1, 57, 55, 60], [1, 60, 58, 59], [1, 59, 61, 62], [1, 62, 64, 63], [4, 66, 63, 65], [1, 68, 69, 65], [1, 69, 70, 71], [4, 73, 71, 72], [4, 35, 67, 73]], [31, 31]];
public static var Pan:Array = [[[1, 2], [7, 4], [2, 8], [8, 10], [29, 2], [22, 10], [23, 4], [28, 8], [15, 8], [12, 14], [18, 14], [2, 15], [2, 22], [28, 15], [24, 27], [9, 20], [12, 28], [18, 28], [15, 20], [21, 20], [6, 27], [28, 22]], [[0, 3], [3, 1], [1, 0], [0, 2], [2, 3], [3, 9], [9, 10], [10, 5], [5, 6], [6, 4], [4, 7], [7, 5], [5, 8], [8, 3], [3, 11], [2, 11], [11, 12], [16, 17], [17, 14], [13, 7], [5, 13], [5, 4], [9, 8], [8, 10], [3, 15], [15, 9], [11, 15], [15, 12], [15, 16], [16, 18], [18, 17], [17, 19], [19, 14], [19, 13], [19, 5], [19, 10], [15, 18], [18, 19], [12, 20], [20, 15], [20, 16], [19, 21], [21, 13], [21, 14]], [[1, 0, 2, 1], [1, 4, 3, 0], [1, 15, 4, 14], [1, 14, 24, 26], [1, 24, 5, 25], [5, 5, 13, 22], [5, 22, 23, 6], [5, 23, 12, 7], [1, 21, 8, 9], [1, 11, 21, 10], [1, 20, 11, 19], [1, 34, 20, 33], [1, 35, 7, 34], [5, 27, 16, 26], [5, 27, 39, 38], [5, 39, 28, 40], [1, 28, 36, 29], [1, 29, 30, 17], [1, 30, 37, 31], [5, 31, 32, 18], [5, 32, 41, 43], [5, 41, 33, 42], [0, 25, 6, 35, 37, 36]], [31, 31]];
}
}//package RES.OBJECTS.OLEVELS
Section 87
//AIConvertChar (RES.OBJECTS.OLOGIC.AIConvertChar)
package RES.OBJECTS.OLOGIC {
public class AIConvertChar {
public static const ABC:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
public static function ToChar(_arg1:int):String{
var _local2:int;
var _local3:String;
_local2 = _arg1;
_local3 = "";
do {
_local3 = ABC.charAt((_local2 % ABC.length));
_local2 = (_local2 / ABC.length);
} while (_local2 != 0);
return (_local3);
}
public static function FromChar(_arg1:String):int{
var _local2:String;
var _local3:int;
_local2 = _arg1;
_local3 = 0;
while (_local2 != "") {
_local3 = (_local3 * ABC.length);
_local3 = (_local3 + ABC.indexOf(_local2.substr((_local2.length - 1), 1)));
_local2 = _local2.substr(0, (_local2.length - 1));
};
return (_local3);
}
public static function ToDoubleChar(_arg1:int):String{
var _local2:int;
var _local3:String;
_local2 = _arg1;
_local3 = "";
do {
_local3 = (_local3 + ABC.charAt((_local2 % ABC.length)));
_local2 = (_local2 / ABC.length);
} while (_local2 != 0);
while (_local3.length < 2) {
_local3 = (_local3 + "A");
};
return (_local3);
}
}
}//package RES.OBJECTS.OLOGIC
Section 88
//ILWidget (RES.OBJECTS.OLOGIC.ILWidget)
package RES.OBJECTS.OLOGIC {
public interface ILWidget {
function Free():Array;
function Dependent():Array;
}
}//package RES.OBJECTS.OLOGIC
Section 89
//OLArea (RES.OBJECTS.OLOGIC.OLArea)
package RES.OBJECTS.OLOGIC {
import RES.OBJECTS.UTILS.*;
public class OLArea implements ILWidget {
private var iColorInd:int;
private var iLinks:OUniqueArray;
private var isOpen:Boolean;
private var iOpenColor:int;
public function OLArea(_arg1:Array, _arg2:int){
var _local3:OLLink;
super();
iLinks = new OUniqueArray();
for each (_local3 in _arg1[0]) {
_local3.Areas.Add(this);
iLinks.push(_local3);
};
iOpenColor = _arg2;
}
public function get Open():Boolean{
return ((((((iOpenColor == 0)) && ((iColorInd >= 0)))) || ((((iOpenColor > 0)) && ((iOpenColor == iColorInd))))));
}
public function Free():Array{
var _local1:Array;
var _local2:OLLink;
_local1 = new Array();
_local1.push(this);
for each (_local2 in iLinks) {
_local2.Areas.Remove(this);
};
iLinks = null;
return (_local1);
}
public function get OpenColor():int{
return (iOpenColor);
}
public function set OpenColor(_arg1:int):void{
iOpenColor = _arg1;
}
public function set ColorInd(_arg1:int):void{
iColorInd = _arg1;
}
public function get Links():OUniqueArray{
return (iLinks);
}
public function get ColorInd():int{
return (iColorInd);
}
public function Dependent():Array{
var _local1:Array;
_local1 = new Array();
return (_local1);
}
}
}//package RES.OBJECTS.OLOGIC
Section 90
//OLFish (RES.OBJECTS.OLOGIC.OLFish)
package RES.OBJECTS.OLOGIC {
import RES.OBJECTS.UTILS.*;
public class OLFish implements ILWidget {
private var iKnot:OLKnot;
private var iValue:int;
public function OLFish(_arg1:Array){
iKnot = _arg1[0];
iKnot.Fish = this;
iValue = _arg1[1][0];
}
public function get Value():int{
return (iValue);
}
public function get Knot():OLKnot{
return (iKnot);
}
public function set Value(_arg1:int):void{
iValue = _arg1;
}
public function Free():Array{
iKnot.Fish = null;
return (null);
}
public function Move(_arg1:OLKnot):Array{
var _local2:OMap;
var _local3:OUniqueArray;
var _local4:OUniqueArray;
var _local5:OUniqueArray;
var _local6:Array;
var _local7:Boolean;
var _local8:int;
var _local9:OLKnot;
var _local10:OLLink;
var _local11:OLKnot;
var _local12:int;
var _local13:Object;
_local2 = new OMap();
_local3 = new OUniqueArray();
_local4 = new OUniqueArray();
_local5 = new OUniqueArray();
_local6 = new Array();
if (iKnot == _arg1){
return (_local6);
};
_local7 = false;
_local3.Add(iKnot);
_local2.Add(iKnot, 1);
_local5.Add(iKnot);
_local8 = 2;
while (!(_local7)) {
_local7 = true;
for each (_local9 in _local3) {
for each (_local10 in _local9.Links) {
for each (_local11 in _local10.Knots) {
if (_local9 != _local11){
if (((!(_local11.Fish)) && (_local5.Add(_local11)))){
_local2.Add(_local11, _local8);
_local4.Add(_local11);
};
};
};
};
};
if ((((_local4.length > 0)) && (!(_local4.Is(_arg1))))){
_local7 = false;
_local8++;
_local3 = _local4;
_local4 = new OUniqueArray();
};
};
if (!_local4.Is(_arg1)){
return (_local6);
};
_local9 = _arg1;
_local6.push(_local9);
while (_local9 != iKnot) {
_local7 = false;
_local12 = _local2.GetValue(_local9);
for each (_local10 in _local9.Links) {
for each (_local11 in _local10.Knots) {
if (_local9 != _local11){
_local13 = _local2.GetValue(_local11);
if (((_local13) && ((_local13 < _local12)))){
_local6.push(_local11);
_local9 = _local11;
_local7 = true;
};
};
if (_local7){
break;
};
};
if (_local7){
break;
};
};
};
iKnot.Fish = null;
_arg1.Fish = this;
iKnot = _arg1;
return (_local6);
}
public function Dependent():Array{
return (null);
}
}
}//package RES.OBJECTS.OLOGIC
Section 91
//OLFishQuery (RES.OBJECTS.OLOGIC.OLFishQuery)
package RES.OBJECTS.OLOGIC {
import ENGINE.CORE.*;
public class OLFishQuery {
private var iMinCount:int;
private var iValueList:Array;
private var iFishQuery:Array;
private var iRandom:ORandomInt;
public function OLFishQuery(_arg1:Array){
iValueList = _arg1[0];
iMinCount = _arg1[1];
iFishQuery = new Array();
iRandom = new ORandomInt();
iRandom.SeedRand(_arg1[2]);
}
public function get NextFish():Array{
var _local1:Array;
var _local2:int;
_local1 = new Array();
_local2 = 0;
while (_local2 < iMinCount) {
_local1.push(iFishQuery[_local2]);
_local2++;
};
return (_local1);
}
public function Free():void{
iValueList = null;
iFishQuery = null;
}
public function get Fish():Object{
var _local1:Array;
var _local2:int;
var _local3:Object;
var _local4:int;
var _local5:int;
var _local6:Object;
if (iFishQuery.length < (iMinCount + 1)){
_local1 = new Array();
_local2 = 0;
while (_local2 < iValueList.length) {
_local4 = 0;
while (_local4 < iValueList[_local2][1]) {
_local1.push(iValueList[_local2][0]);
_local4++;
};
_local2++;
};
_local2 = 0;
while (_local2 < 10) {
_local4 = 0;
while (_local4 < _local1.length) {
_local5 = iRandom.RandVal(_local1.length);
_local6 = _local1[_local5];
_local1[_local5] = _local1[_local4];
_local1[_local4] = _local6;
_local4++;
};
_local2++;
};
for each (_local3 in _local1) {
iFishQuery.push(_local3);
};
};
return (iFishQuery.shift());
}
}
}//package RES.OBJECTS.OLOGIC
Section 92
//OLGrid (RES.OBJECTS.OLOGIC.OLGrid)
package RES.OBJECTS.OLOGIC {
import RES.OBJECTS.UTILS.*;
public class OLGrid {
private var iWidgets:OUniqueArray;
public function OLGrid(){
iWidgets = new OUniqueArray();
}
public function NewKnot():OLKnot{
var _local1:OLKnot;
_local1 = new OLKnot();
iWidgets.Add(_local1);
return (_local1);
}
public function NewArea(_arg1:Array, _arg2:int):OLArea{
var _local3:OLArea;
_local3 = new OLArea([_arg1], _arg2);
iWidgets.Add(_local3);
return (_local3);
}
public function get Widgets():OUniqueArray{
return (iWidgets);
}
public function GetOpenColors():OUniqueArray{
var _local1:OUniqueArray;
var _local2:ILWidget;
var _local3:int;
_local1 = new OUniqueArray();
for each (_local2 in iWidgets) {
if ((_local2 is OLArea)){
_local3 = OLArea(_local2).OpenColor;
if (_local3 > 0){
_local1.Add(_local3);
};
};
};
return (_local1);
}
public function RemoveWidget(_arg1:ILWidget):Array{
var _local2:Array;
var _local3:ILWidget;
_local2 = _arg1.Free();
for each (_local3 in _local2) {
iWidgets.Remove(_local3);
};
return (_local2);
}
public function NewFish(_arg1:Array):OLFish{
var _local2:OLFish;
_local2 = new OLFish(_arg1);
iWidgets.Add(_local2);
return (_local2);
}
public function NewLink(_arg1:Array):OLLink{
var _local2:OLLink;
_local2 = new OLLink([_arg1]);
iWidgets.Add(_local2);
return (_local2);
}
public function Free():void{
iWidgets = null;
}
public function GetStructure():Array{
var _local1:Array;
var _local2:OMap;
var _local3:OMap;
var _local4:OMap;
var _local5:ILWidget;
var _local6:Array;
var _local7:Array;
var _local8:Array;
var _local9:Array;
var _local10:OLLink;
_local1 = new Array();
_local2 = new OMap();
_local3 = new OMap();
_local4 = new OMap();
for each (_local5 in iWidgets) {
if ((_local5 is OLKnot)){
_local2.Add(_local2.length, _local5);
} else {
if ((_local5 is OLLink)){
_local3.Add(_local3.length, _local5);
} else {
if ((_local5 is OLArea)){
_local4.Add(_local4.length, _local5);
};
};
};
};
_local6 = new Array();
_local7 = new Array();
_local8 = new Array();
for each (_local5 in iWidgets) {
if ((_local5 is OLKnot)){
_local6[_local2.GetValue(_local5)] = [OLKnot(_local5).Pos.x, OLKnot(_local5).Pos.y];
} else {
if ((_local5 is OLLink)){
_local7[_local3.GetValue(_local5)] = [_local2.GetValue(OLLink(_local5).Knots[0]), _local2.GetValue(OLLink(_local5).Knots[1])];
} else {
if ((_local5 is OLArea)){
_local9 = new Array();
_local9.push(OLArea(_local5).ColorInd);
for each (_local10 in OLArea(_local5).Links) {
_local9.push(_local3.GetValue(_local10));
};
_local8[_local4.GetValue(_local5)] = _local9;
};
};
};
};
_local1.push(_local6);
_local1.push(_local7);
_local1.push(_local8);
return (_local1);
}
public function Dependent(_arg1:ILWidget):Array{
var _local2:Array;
_local2 = _arg1.Dependent();
return (_local2);
}
}
}//package RES.OBJECTS.OLOGIC
Section 93
//OLGridController (RES.OBJECTS.OLOGIC.OLGridController)
package RES.OBJECTS.OLOGIC {
import RES.OBJECTS.UTILS.*;
import ENGINE.CORE.*;
public class OLGridController {
private var iKnots:OUniqueArray;
private var iRandom:ORandomInt;
private var iFishQuery:OLFishQuery;
private var iGrid:OLGrid;
private var iAreas:OUniqueArray;
public function OLGridController(_arg1:OLGrid, _arg2:int, _arg3:Array){
var _local4:Object;
super();
iGrid = _arg1;
iKnots = new OUniqueArray();
iAreas = new OUniqueArray();
for each (_local4 in iGrid.Widgets) {
if ((_local4 is OLKnot)){
iKnots.push(_local4);
};
if ((_local4 is OLArea)){
iAreas.push(_local4);
};
};
iRandom = new ORandomInt();
iRandom.SeedRand(_arg2);
iFishQuery = new OLFishQuery([_arg3, 4, _arg2]);
}
public function Find():Array{
var _local1:Array;
var _local2:OUniqueArray;
var _local3:OLArea;
var _local4:int;
var _local5:Boolean;
var _local6:OLLink;
var _local7:OLKnot;
_local1 = new Array();
_local2 = new OUniqueArray();
for each (_local3 in iAreas) {
_local4 = -1;
_local5 = true;
for each (_local6 in _local3.Links) {
for each (_local7 in _local6.Knots) {
if (((_local7.Fish) && ((_local4 == -1)))){
_local4 = _local7.Fish.Value;
};
if (((!(_local7.Fish)) || (!((_local4 == _local7.Fish.Value))))){
_local5 = false;
break;
};
};
if (!_local5){
break;
};
};
if (_local5){
_local1.push(_local3);
for each (_local6 in _local3.Links) {
for each (_local7 in _local6.Knots) {
_local2.Add(_local7.Fish);
};
};
};
};
return ([_local1, _local2]);
}
public function get CountFreeKnot():int{
var _local1:int;
var _local2:OLKnot;
for each (_local2 in iKnots) {
if (!_local2.Fish){
_local1++;
};
};
return (_local1);
}
public function AddFishInPlace(_arg1:int, _arg2:int):OLFish{
var _local3:Array;
_local3 = new Array();
return (iGrid.NewFish([iKnots[_arg1], [_arg2]]));
}
public function get FieldComplete():Boolean{
var _local1:Boolean;
var _local2:OLArea;
_local1 = true;
for each (_local2 in iAreas) {
if (!_local2.Open){
return (false);
};
};
return (_local1);
}
public function get CountBusyKnot():int{
var _local1:int;
var _local2:OLKnot;
for each (_local2 in iKnots) {
if (_local2.Fish){
_local1++;
};
};
return (_local1);
}
public function AddFish(_arg1:int=0):Array{
var _local2:Array;
var _local3:OUniqueArray;
var _local4:OLKnot;
var _local5:int;
_local2 = new Array();
_local3 = new OUniqueArray();
for each (_local4 in iKnots) {
if (!_local4.Fish){
_local3.Add(_local4);
};
};
OArrayUtils.MixArray(_local3, 10, iRandom);
_local5 = 0;
while ((((_local5 < _local3.length)) && ((_local5 < _arg1)))) {
_local2.push(iGrid.NewFish([_local3[_local5], [iFishQuery.Fish]]));
_local5++;
};
return (_local2);
}
public function Free():void{
iGrid.Free();
iGrid = null;
iKnots = null;
iAreas = null;
}
}
}//package RES.OBJECTS.OLOGIC
Section 94
//OLKnot (RES.OBJECTS.OLOGIC.OLKnot)
package RES.OBJECTS.OLOGIC {
import flash.geom.*;
import RES.OBJECTS.UTILS.*;
public class OLKnot implements ILWidget {
private var iFish:OLFish;
private var iPos:Point;
private var iLinks:OUniqueArray;
public function OLKnot(){
iLinks = new OUniqueArray();
iPos = new Point();
}
public function IsLink(_arg1:OLKnot):Boolean{
var _local2:OLLink;
var _local3:OLKnot;
if (_arg1 == this){
return (true);
};
for each (_local2 in Links) {
for each (_local3 in _local2.Knots) {
if (_arg1 == _local3){
return (true);
};
};
};
return (false);
}
public function set Pos(_arg1:Point):void{
iPos = _arg1;
}
public function Free():Array{
var _local1:Array;
_local1 = new Array();
_local1.push(this);
while (Links.length > 0) {
_local1 = _local1.concat(Links.shift().Free());
};
iLinks = null;
return (_local1);
}
public function get Pos():Point{
return (iPos);
}
public function set Fish(_arg1:OLFish):void{
iFish = _arg1;
}
public function get Fish():OLFish{
return (iFish);
}
public function get Links():OUniqueArray{
return (iLinks);
}
public function Dependent():Array{
var _local1:OUniqueArray;
var _local2:OLLink;
var _local3:Array;
var _local4:ILWidget;
_local1 = new OUniqueArray();
for each (_local2 in Links) {
_local1.Add(_local2);
_local3 = _local2.Dependent();
for each (_local4 in _local3) {
_local1.Add(_local4);
};
};
return (_local1);
}
}
}//package RES.OBJECTS.OLOGIC
Section 95
//OLLink (RES.OBJECTS.OLOGIC.OLLink)
package RES.OBJECTS.OLOGIC {
import RES.OBJECTS.UTILS.*;
public class OLLink implements ILWidget {
private var iKnots:OUniqueArray;
private var iAreas:OUniqueArray;
public function OLLink(_arg1:Array){
var _local2:OLKnot;
super();
iKnots = new OUniqueArray();
iAreas = new OUniqueArray();
for each (_local2 in _arg1[0]) {
_local2.Links.Add(this);
iKnots.push(_local2);
};
}
public function get Areas():OUniqueArray{
return (iAreas);
}
public function get Knots():OUniqueArray{
return (iKnots);
}
public function Free():Array{
var _local1:Array;
var _local2:OLKnot;
_local1 = new Array();
_local1.push(this);
for each (_local2 in iKnots) {
_local2.Links.Remove(this);
};
while (Areas.length > 0) {
_local1 = _local1.concat(Areas.shift().Free());
};
iKnots = null;
iAreas = null;
return (_local1);
}
public function Dependent():Array{
var _local1:OUniqueArray;
var _local2:OLArea;
var _local3:Array;
var _local4:ILWidget;
_local1 = new OUniqueArray();
for each (_local2 in Areas) {
_local1.Add(_local2);
_local3 = _local2.Dependent();
for each (_local4 in _local3) {
_local1.Add(_local4);
};
};
return (_local1);
}
}
}//package RES.OBJECTS.OLOGIC
Section 96
//OLOpponentPlay (RES.OBJECTS.OLOGIC.OLOpponentPlay)
package RES.OBJECTS.OLOGIC {
import flash.events.*;
import RES.OBJECTS.OGRAPHIC.*;
import flash.utils.*;
public class OLOpponentPlay {
private var iTCount:int;
private var iState:int;
private var iPos:int;
private var iField:OGFieldGame;
private var iRecord:String;
private var iTimer:Timer;
private var iTDelay:int;
public static const stEnd:int = 4;
public static const stPlay:int = 1;
public static const stWaitClickKnot:int = 3;
public static const stNone:int = 0;
public static const stWaitClickFish:int = 2;
public function OLOpponentPlay(_arg1:OGFieldGame, _arg2:String){
iField = _arg1;
iRecord = _arg2;
iTimer = new Timer(20);
iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
iPos = 0;
this.State = stNone;
}
private function get State():int{
return (iState);
}
private function ParseCommand():void{
if (iRecord.length == 0){
this.State = stEnd;
return;
};
iTCount = getTimer();
iPos = AIConvertChar.FromChar(iRecord.slice(0, 2));
iRecord = iRecord.substr(2);
iTDelay = (100 * AIConvertChar.FromChar(iRecord.slice(0, 2)));
iRecord = iRecord.substr(2);
this.State = stWaitClickFish;
}
private function OnTimer(_arg1:TimerEvent):void{
switch (iState){
case stNone:
break;
case stPlay:
break;
case stWaitClickFish:
if (((((((getTimer() - iTCount) > iTDelay)) && ((((iField.State == OGFieldGame.stWait)) || ((iField.State == OGFieldGame.stSelectedFish)))))) && ((iField.iField.numChildren > iPos)))){
iField.ClickCell(iPos);
ParseCommand();
};
break;
case stWaitClickKnot:
if (((((getTimer() - iTCount) > iTDelay)) && ((iField.State == OGFieldGame.stSelectedFish)))){
iField.ClickCell(iPos);
ParseCommand();
};
break;
case stEnd:
ParseCommand();
break;
};
}
private function set State(_arg1:int):void{
iState = _arg1;
switch (iState){
case stNone:
if (((iField) && (iRecord))){
this.State = stPlay;
};
break;
case stPlay:
iTimer.start();
ParseCommand();
break;
case stWaitClickFish:
break;
case stWaitClickKnot:
break;
case stEnd:
break;
};
}
public function AddCommand(_arg1:String):void{
this.iRecord = (this.iRecord + _arg1);
}
public function Free():void{
iTimer.removeEventListener(TimerEvent.TIMER, OnTimer);
this.iTimer = null;
}
}
}//package RES.OBJECTS.OLOGIC
Section 97
//OLUtils (RES.OBJECTS.OLOGIC.OLUtils)
package RES.OBJECTS.OLOGIC {
public class OLUtils {
public static function CloneArray(_arg1:Array):Array{
var _local2:Array;
var _local3:int;
_local2 = new Array();
_local3 = 0;
while (_local3 < _arg1.length) {
if ((_arg1[_local3] is Array)){
_local2.push(CloneArray(_arg1[_local3]));
} else {
_local2.push(_arg1[_local3]);
};
_local3++;
};
return (_local2);
}
}
}//package RES.OBJECTS.OLOGIC
Section 98
//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 99
//CParticle (RES.OBJECTS.Particle.CParticle)
package RES.OBJECTS.Particle {
public interface CParticle {
function onTimer():void;
}
}//package RES.OBJECTS.Particle
Section 100
//CParticleContainer (RES.OBJECTS.Particle.CParticleContainer)
package RES.OBJECTS.Particle {
import ENGINE.DISPLAY.*;
import flash.events.*;
public class CParticleContainer extends OSprite {
private var aParticlesList:Array;
public function CParticleContainer(){
aParticlesList = new Array();
super();
addEventListener(Event.ENTER_FRAME, onTimer);
}
public function _createExplodeParticles(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
var _local6:CParticle;
var _local7:int;
var _local8:int;
_local7 = _arg2;
while (_local7 < _arg4) {
_local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_UP);
aParticlesList.push(_local6);
(_local6 as CExplodeParticle).prX = _local7;
(_local6 as CExplodeParticle).prY = _arg3;
this.addChild((_local6 as OSprite));
_local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_DOWN);
aParticlesList.push(_local6);
(_local6 as CExplodeParticle).prX = _local7;
(_local6 as CExplodeParticle).prY = _arg5;
this.addChild((_local6 as OSprite));
_local7 = (_local7 + 4);
};
_local7 = _arg3;
while (_local7 < _arg5) {
_local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_LEFT);
aParticlesList.push(_local6);
(_local6 as CExplodeParticle).prX = _arg2;
(_local6 as CExplodeParticle).prY = _local7;
this.addChild((_local6 as OSprite));
_local6 = new CExplodeParticle(_arg1, this, CExplodeParticle.MOVE_RIGHT);
aParticlesList.push(_local6);
(_local6 as CExplodeParticle).prX = _arg4;
(_local6 as CExplodeParticle).prY = _local7;
this.addChild((_local6 as OSprite));
_local7 = (_local7 + 4);
};
}
public function removeParticle(_arg1:CParticle):void{
var _local2:int;
_local2 = 0;
while (_local2 < aParticlesList.length) {
if (aParticlesList[_local2] == _arg1){
this.removeChild((_arg1 as OSprite));
aParticlesList.splice(_local2, 1);
return;
};
_local2++;
};
}
public function addSimpleParticle(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:CParticle;
_local4 = new CSimpleFallParticle(_arg1, this);
aParticlesList.push(_local4);
(_local4 as CSimpleFallParticle).prX = _arg2;
(_local4 as CSimpleFallParticle).prY = _arg3;
this.addChild((_local4 as OSprite));
}
override public function Free():void{
this.removeEventListener(Event.ENTER_FRAME, onTimer);
super.Free();
}
public function onTimer(_arg1:Event):void{
var _local2:int;
_local2 = 0;
while (_local2 < aParticlesList.length) {
(aParticlesList[_local2] as CParticle).onTimer();
_local2++;
};
}
}
}//package RES.OBJECTS.Particle
Section 101
//CSimpleFallParticle (RES.OBJECTS.Particle.CSimpleFallParticle)
package RES.OBJECTS.Particle {
import ENGINE.DISPLAY.*;
import RES.OBJECTS.*;
public class CSimpleFallParticle extends OSprite implements CParticle {
protected var dAlpha:Number;
private var gBitmap:OBitmap;
private var cParticleContainer:CParticleContainer;
protected var dy:Number;
protected var dr:Number;
protected var dx:Number;
protected var dVelY:Number;
protected var dVelX:Number;
public function CSimpleFallParticle(_arg1:int, _arg2:CParticleContainer){
this.cParticleContainer = _arg2;
super();
gBitmap = new OBitmap();
gBitmap.CopyFrom(CPrototypeFactory.aParticles[_arg1]);
this.addChild(gBitmap);
this.dx = ((Math.random() * 3) - 1.5);
this.dy = ((Math.random() * 3) - 1.5);
this.dr = ((Math.random() * 10) + 1);
dVelX = (dx / 50);
dVelY = (dy / 50);
this.dAlpha = 0.01;
this.alpha = ((Math.random() * 0.8) + 0.1);
}
public function onTimer():void{
this.alpha = (this.alpha - this.dAlpha);
if (this.alpha <= 0.2){
cParticleContainer.removeParticle(this);
};
this.Move(dx, dy);
dx = (dx - dVelX);
dy = (dy - dVelY);
}
}
}//package RES.OBJECTS.Particle
Section 102
//OArrayUtils (RES.OBJECTS.UTILS.OArrayUtils)
package RES.OBJECTS.UTILS {
import ENGINE.CORE.*;
public class OArrayUtils {
public static function MixArray(_arg1:Array, _arg2:int, _arg3:ORandomInt=null):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:Object;
_local4 = 0;
while (_local4 < _arg2) {
_local5 = 0;
while (_local5 < _arg1.length) {
_local6 = (_arg3) ? _arg3.RandVal(_arg1.length) : (Math.random() * _arg1.length);
_local7 = _arg1[_local6];
_arg1[_local6] = _arg1[_local5];
_arg1[_local5] = _local7;
_local5++;
};
_local4++;
};
}
public static function ArrayToString(_arg1:Array, _arg2:int=0):String{
var _local3:String;
var _local4:int;
var _local5:int;
_local3 = "";
_local4 = 0;
while (_local4 < _arg2) {
_local3 = (_local3 + "\t");
_local4++;
};
_local3 = (_local3 + "[");
_local5 = 0;
while (_local5 < _arg1.length) {
if ((_arg1[_local5] is Array)){
if (_local3.charAt((_local3.length - 1)) != "\n"){
_local3 = (_local3 + "\n");
};
_local3 = (_local3 + ArrayToString(_arg1[_local5], (_arg2 + 1)));
if (_local5 < (_arg1.length - 1)){
_local3 = (_local3 + ",");
};
if (_local3.charAt((_local3.length - 1)) != "\n"){
_local3 = (_local3 + "\n");
};
} else {
if (_arg1[_local5] != null){
_local3 = (_local3 + _arg1[_local5].toString());
} else {
_local3 = (_local3 + "null");
};
if (_local5 < (_arg1.length - 1)){
_local3 = (_local3 + ",");
};
};
_local5++;
};
if (_local3.charAt((_local3.length - 1)) == "\n"){
_local4 = 0;
while (_local4 < _arg2) {
_local3 = (_local3 + "\t");
_local4++;
};
};
_local3 = (_local3 + "]");
return (_local3);
}
}
}//package RES.OBJECTS.UTILS
Section 103
//OMap (RES.OBJECTS.UTILS.OMap)
package RES.OBJECTS.UTILS {
public class OMap {
public var iMap1:Array;
public var iMap2:Array;
public function OMap(){
iMap1 = new Array();
iMap2 = new Array();
}
public function Remove(_arg1):void{
var _local2:int;
_local2 = iMap1.indexOf(_arg1);
if (_local2 > -1){
iMap1.splice(_local2, 1);
iMap2.splice(_local2, 1);
} else {
_local2 = iMap2.indexOf(_arg1);
if (_local2 > -1){
iMap1.splice(_local2, 1);
iMap2.splice(_local2, 1);
};
};
}
public function get length():int{
return (iMap1.length);
}
public function Add(_arg1, _arg2):void{
iMap1.push(_arg1);
iMap2.push(_arg2);
}
public function Free():void{
var _local1:*;
for each (_local1 in iMap1) {
_local1 = null;
};
for each (_local1 in iMap2) {
_local1 = null;
};
}
public function GetValue(_arg1){
var _local2:int;
_local2 = iMap1.indexOf(_arg1);
if (_local2 > -1){
return (iMap2[_local2]);
};
_local2 = iMap2.indexOf(_arg1);
if (_local2 > -1){
return (iMap1[_local2]);
};
return (null);
}
}
}//package RES.OBJECTS.UTILS
Section 104
//OUniqueArray (RES.OBJECTS.UTILS.OUniqueArray)
package RES.OBJECTS.UTILS {
public dynamic class OUniqueArray extends Array {
public function OUniqueArray(_arg1:int=0){
super(_arg1);
}
public function Add(_arg1:Object):Boolean{
if (this.indexOf(_arg1) == -1){
this.push(_arg1);
} else {
return (false);
};
return (true);
}
public function Is(_arg1:Object):Boolean{
var _local2:int;
_local2 = this.indexOf(_arg1);
if (_local2 == -1){
return (false);
};
return (true);
}
public function Remove(_arg1:Object):Boolean{
var _local2:int;
_local2 = this.indexOf(_arg1);
if (_local2 == -1){
return (false);
};
this.splice(_local2, 1);
return (true);
}
public function RemoveAt(_arg1:int):Object{
return (this.splice(_arg1, 1)[0]);
}
}
}//package RES.OBJECTS.UTILS
Section 105
//CPrototypeFactory (RES.OBJECTS.CPrototypeFactory)
package RES.OBJECTS {
import ENGINE.DISPLAY.*;
public class CPrototypeFactory {
public static var aStars:Array;
private static var iCellsIndex:int;
public static var aLetters:Array;
public static var aCells:Array;
public static var aParticles:Array;
private static var aAlphabet:Array;
public static var aSimpleCells:Array;
public static function createSimpleCellsBitmaps(_arg1:int):void{
CPrototypeFactory.createStar(_arg1);
}
public static function _createParticleBitmaps(_arg1:int):void{
var _local2:Array;
var _local3:Array;
var _local4:int;
CPrototypeFactory.aParticles = new Array();
_local2 = [ODisplay.SpriteLib, LinkzL.FallParticle];
_local3 = [ODisplay.SpriteScale, _local2, 1, 0, 0, 0];
_local4 = 0;
while (_local4 < _arg1) {
CPrototypeFactory.aParticles.push(ODisplay.OBitmapMake([null, _local3, 1, "GEL", LinkzL.iGameColor[_local4], "text 30", 1, 0, 0]));
_local4++;
};
}
public static function _createBitmaps(_arg1:int):void{
CPrototypeFactory._createParticleBitmaps(_arg1);
}
private static function createStar(_arg1:int):void{
}
}
}//package RES.OBJECTS
Section 106
//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 107
//OPanel (RES.WINDOWS.PANELS.OPanel)
package RES.WINDOWS.PANELS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
public class OPanel extends OIObject {
public var iBack:OSprite;
public function OPanel(_arg1:Array, _arg2:Array=null){
super(_arg1, _arg2);
}
override public function Init():void{
super.Init();
if (iBack){
iBack.addEventListener(MouseEvent.MOUSE_DOWN, OnDown);
iBack.addEventListener(MouseEvent.MOUSE_UP, OnUp);
};
}
private function OnDown(_arg1:MouseEvent):void{
this.parent.addChildAt(this, this.parent.numChildren);
this.startDrag();
}
override public function OnPress(_arg1:Event, _arg2):void{
if (((parent) && ((parent is OIObject)))){
OIObject(parent).OnPress(_arg1, _arg2);
};
}
private function OnUp(_arg1:MouseEvent):void{
this.stopDrag();
this.Pos((this.x / OGlobal.Scale), (this.y / OGlobal.Scale));
}
}
}//package RES.WINDOWS.PANELS
Section 108
//OWChoosePlayer (RES.WINDOWS.OWChoosePlayer)
package RES.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
public class OWChoosePlayer extends ODialog {
public var iDelete:OButton;
public var iNew:OButton;
public var iCancel:OButton;
private var iData;
public var iListBox:OListBox;
public var iAccept:OButton;
private var iCurPlayer:String;
public function OWChoosePlayer(){
super(LinkzL.OWChoosePlayer);
}
override public function Init():void{
super.Init();
this.iData = LinkzL.iGAME.prPlayersData;
this.iCurPlayer = LinkzL.iGAME.prPlayerName;
this.iListBox.SetCurrentElement(LinkzL.iGAME.prPlayerName, LinkzL.iGAME.prPlayerNames);
}
override public function set prActive(_arg1:Boolean):void{
if (_arg1){
this.iListBox.SetCurrentElement(LinkzL.iGAME.prPlayerName, LinkzL.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, LinkzL.miEnterNewName);
this.prActive = false;
return;
};
if (_arg2 == this.iDelete){
(this.parent as OWindow).OnPress(null, LinkzL.miDeletePlayerConfirm);
this.prActive = false;
return;
};
if (_arg2 == this.iCancel){
LinkzL.iGAME.prPlayersData = this.iData;
LinkzL.iGAME.prPlayerName = this.iCurPlayer;
(this.parent as OWindow).OnPress(null, LinkzL.miMenu);
this.prVisible = false;
return;
};
if (_arg2 == this.iAccept){
if (LinkzL.iMP.isConnected){
LinkzL.iMP.disconnect();
};
(this.parent as OWindow).OnPress(null, LinkzL.miMenu);
this.prVisible = false;
return;
};
if ((((_arg2 == this.iListBox)) && (!((LinkzL.iGAME.prPlayerName == this.iListBox.prCurrentLBParam))))){
LinkzL.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 109
//OWDemo (RES.WINDOWS.OWDemo)
package RES.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.OBJECTS.OGRAPHIC.*;
import flash.utils.*;
import RES.OBJECTS.OLOGIC.*;
public class OWDemo extends OIObject {
private const iSpeed:int = 5;
private var iWidgets:Array;
private var iFillCell:Array;
private var iCursor:OBitmap;
private var iField:OGFieldGame;
private var iTimer:int;
private var iSpeedMove:int;// = 10
private var iMap:Array;
private var iSpeedCursor:Point;
private var iSPC:Point;
private var iWidgetInd:int;
private var iEndMovePos:Point;
public static const stStart:int = 1;
public static const stClick:int = 3;
public static const stEndAnimation:int = 6;
public static const stMove:int = 2;
public static const Map1:Array = [[[0, 0], [18, 0], [0, 18], [18, 18], [9, 3], [15, 9], [9, 15], [3, 9]], [[6, 7], [7, 4], [5, 4], [6, 5], [0, 1], [1, 4], [4, 0], [0, 2], [2, 7], [7, 0], [2, 3], [3, 6], [6, 2], [1, 3], [3, 5], [5, 1]], [[0, 4, 5, 6], [0, 7, 8, 9], [0, 10, 11, 12], [0, 13, 14, 15], [0, 6, 1, 9], [0, 0, 12, 8], [0, 14, 11, 3], [0, 5, 15, 2], [1, 2, 1, 0, 3]], [19, 19]];
public static const Map2:Array = [[[0, 0], [18, 0], [0, 18], [18, 18], [9, 3], [15, 9], [9, 15], [3, 9]], [[6, 7], [7, 4], [5, 4], [6, 5], [0, 1], [1, 4], [4, 0], [0, 2], [2, 7], [7, 0], [2, 3], [3, 6], [6, 2], [1, 3], [3, 5], [5, 1]], [[0, 4, 5, 6], [0, 7, 8, 9], [0, 10, 11, 12], [0, 13, 14, 15], [0, 6, 1, 9], [0, 0, 12, 8], [0, 14, 11, 3], [0, 5, 15, 2], [3, 2, 1, 0, 3]], [19, 19]];
public static const Map3:Array = [[[0, 0], [18, 0], [0, 18], [18, 18], [9, 3], [15, 9], [9, 15], [3, 9]], [[6, 7], [7, 4], [5, 4], [6, 5], [0, 1], [1, 4], [4, 0], [0, 2], [2, 7], [7, 0], [2, 3], [3, 6], [6, 2], [1, 3], [3, 5], [5, 1]], [[0, 4, 5, 6], [0, 7, 8, 9], [0, 10, 11, 12], [0, 13, 14, 15], [0, 6, 1, 9], [0, 0, 12, 8], [0, 14, 11, 3], [0, 5, 15, 2], [5, 2, 1, 0, 3]], [19, 19]];
public static const stNone:int = 0;
public static const stEnd:int = 7;
public static var aLevel:Array = [Map1, 0, 0, 0, 0, 0];
public function OWDemo(){
iSPC = new Point(150, 150);
iSpeedMove = 10;
super([]);
}
override public function Init():void{
super.Init();
iCursor = ODisplay.OBitmapSpriteFillRect([ODisplay.OBitmapSpriteFillRect, 30, 30, [ODisplay.SpriteLib, LinkzL.OCursor], "GEL", "white", "border", 1, 0, 0, null, 0, true]);
iSpeedCursor = new Point();
iEndMovePos = new Point();
}
private function NewField():void{
var _local1:Array;
if (iField){
this.removeChild(iField);
iField.Free();
iField = null;
};
_local1 = OLUtils.CloneArray(iMap);
iField = new OGFieldGame([aLevel, [260, 260], 0, true]);
iField.SpeedMove = iSpeedMove;
iField.prVisible = true;
this.addChild(iField);
}
public function Play(_arg1:Array):void{
iFillCell = _arg1[0];
iMap = _arg1[3];
aLevel[0] = iMap;
aLevel[1] = _arg1[4];
iWidgets = OLUtils.CloneArray(_arg1[1]);
this.State = stStart;
}
override public function Free():void{
super.Free();
if (iField){
iField.Free();
iField = null;
};
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
switch (this.State){
case stNone:
break;
case stStart:
this.State = stMove;
break;
case stMove:
if (MoveCursor()){
this.State = stClick;
};
break;
case stClick:
if ((getTimer() - iTimer) > 2000){
if (iWidgets.length > 0){
this.State = stMove;
} else {
this.State = stEndAnimation;
};
};
break;
case stEndAnimation:
if ((getTimer() - iTimer) > 1500){
this.State = stEnd;
};
break;
case stEnd:
break;
};
}
public function MoveCursor():Boolean{
var _local1:Point;
var _local2:Point;
_local1 = iEndMovePos;
_local2 = new Point((_local1.x - iCursor.prX), (_local1.y - iCursor.prY));
iSpeedCursor.x = (_local2.x * Math.abs((iSpeed / _local2.length)));
iSpeedCursor.y = (_local2.y * Math.abs((iSpeed / _local2.length)));
iCursor.prX = (iCursor.prX + iSpeedCursor.x);
iCursor.prY = (iCursor.prY + iSpeedCursor.y);
return ((((Math.abs((iCursor.prX - _local1.x)) < 4)) && ((Math.abs((iCursor.prY - _local1.y)) < 4))));
}
override public function set State(_arg1:int):void{
this.iState = _arg1;
switch (this.iState){
case stNone:
break;
case stStart:
NewField();
iCursor.Pos(iSPC.x, iSPC.y);
iField.PastFish(iFillCell);
this.addChild(iCursor);
break;
case stMove:
iWidgetInd = iWidgets[0];
iEndMovePos = iField.GetPos(iWidgetInd);
iWidgets.shift();
break;
case stClick:
iField.ClickCell(iWidgetInd);
iTimer = getTimer();
break;
case stEndAnimation:
iTimer = getTimer();
break;
case stEnd:
break;
};
}
}
}//package RES.WINDOWS
Section 110
//OWEnterName (RES.WINDOWS.OWEnterName)
package RES.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
public class OWEnterName extends ODialog {
private var iHasCancel:Boolean;
public var iCancel:OButton;
public var iName:OInput;
public var iAccept:OButton;
public function OWEnterName(_arg1:Boolean=true){
this.iHasCancel = _arg1;
super(LinkzL.OWEnterName);
}
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;
}
override public function Init():void{
super.Init();
this.iName.prText = (LinkzL.iGAME.prPlayerName) ? LinkzL.iGAME.prPlayerName : "";
if (!this.iHasCancel){
this.iCancel.visible = false;
this.iAccept.prX = 155;
};
this.iName.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler);
}
public function set prName(_arg1:String):void{
this.iName.prText = _arg1;
}
override public function OnPress(_arg1:Event, _arg2):void{
var _local3:String;
var _local4:String;
if (!this.prMouseEnabled){
return;
};
if (_arg2 == this.iCancel){
if (!this.iCancel.visible){
return;
};
this.prVisible = false;
return;
};
if (_arg2 == this.iAccept){
_local3 = OUtils.ClearString(this.iName.prText.toUpperCase());
_local4 = removeSpaces(_local3);
if (_local4.length > 0){
LinkzL.iGAME.prPlayerName = _local4;
this.prVisible = false;
} else {
this.iName.prText = "";
};
};
}
override public function Free():void{
super.Free();
this.iName.removeEventListener(KeyboardEvent.KEY_DOWN, keyHandler);
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 removeSpaces(_arg1:String):String{
var _local2:String;
var _local3:int;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) != " "){
_local2 = (_local2 + _arg1.charAt(_local3));
};
_local3++;
};
return (_local2);
}
private function keyHandler(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 13:
OnPress(_arg1, this.iAccept);
break;
case 27:
OnPress(_arg1, this.iCancel);
break;
};
trace(((((((_arg1.target + "(") + _arg1.currentTarget) + "): ") + _arg1.keyCode) + "/") + _arg1.charCode));
}
}
}//package RES.WINDOWS
Section 111
//OWGame (RES.WINDOWS.OWGame)
package RES.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.GAME.*;
import RES.OBJECTS.OGRAPHIC.*;
import ENGINE.CORE.*;
import flash.utils.*;
import RES.OBJECTS.OLOGIC.*;
import flash.net.*;
import ENGINE.SMARTFOX.*;
import ENGINE.AD.*;
import RES.OBJECTS.*;
import RES.OBJECTS.OLEVELS.*;
public class OWGame extends OWindow {
private var iGame:OGFieldGame;
public var iScoreCounter:OCounter;
public var iAllSpr:OSprite;
private var iITimer:int;
private var iNameO:String;
private var iInfoP:OWInfoPanel;
private var iLevelVal:int;
public var iLevel:OIObject;
public var iScoreCounterO:OCounter;
private var iPlayer:OLOpponentPlay;
private var iInfo:OIObject;
public var iLevelCounter:OCounter;
private var iOppEndGame:Boolean;
private var iDAlpha:Number;// = 0.025
public var iGameName:OIObject;
private var iMultiPlayer:Boolean;
public var iSite:OIObject;
public var iMenu:OButton;
private var iRecordO:String;
private var iRNDIndex:int;
public var iScore:OIObject;
private var iSaveKoef:Number;// = 0.5
private var iGameO:OGFieldGame;
public var iScoreO:OIObject;
public static const stStart:int = 4;
public static const stLevelComplete:int = 6;
public static const stPause:int = 9;
public static const stShow:int = 0;
public static const stLevelNotComplete:int = 7;
public static const stShowResults:int = 8;
public static const stPlay:int = 5;
public static const stGameFieldHide:int = 10;
public static const stGoToPlay:int = 1;
public static const stLoadLevel:int = 3;
public static const stConnection:int = 2;
public function OWGame(){
iDAlpha = 0.025;
iSaveKoef = 0.5;
super(LinkzL.OWGame, ODialog.iDefAnimators);
}
private function get prGameIndex():int{
return (((LinkzL.GameType * 10) + iRNDIndex));
}
private function AddAllSpr():void{
if (!this.iAllSpr){
this.iAllSpr = new OSprite();
this.iAllSpr.height = 600;
this.iAllSpr.width = 800;
this.iAllSpr.hitArea = this.iAllSpr;
};
this.addEventListener(MouseEvent.CLICK, OnClick);
this.iAllSpr.hitArea = this.iAllSpr;
this.addChild(this.iAllSpr);
}
private function SplashInfoMessage():Boolean{
var _local1:Boolean;
_local1 = false;
if (this.iInfo.prAnimation){
return (false);
};
this.iInfo.alpha = (this.iInfo.alpha + this.iDAlpha);
if ((((this.iDAlpha > 0)) && ((this.iInfo.alpha >= 1)))){
this.iInfo.alpha = 1;
this.iDAlpha = (this.iDAlpha * -1);
};
if ((((this.iDAlpha < 0)) && ((this.iInfo.alpha <= 0)))){
this.iInfo.alpha = 0;
this.iDAlpha = (this.iDAlpha * -1);
_local1 = true;
};
return (_local1);
}
override public function Free():void{
super.Free();
if (iPlayer){
iPlayer.Free();
iPlayer = null;
};
}
private function OnKeyDown(_arg1:KeyboardEvent):void{
switch (this.State){
case stLevelComplete:
case stLevelNotComplete:
this.State = stGameFieldHide;
break;
};
}
private function OnClick(_arg1:MouseEvent):void{
switch (this.State){
case stLevelComplete:
case stLevelNotComplete:
this.State = stGameFieldHide;
break;
};
this.removeChild(this.iAllSpr);
this.removeEventListener(MouseEvent.CLICK, OnClick);
}
private function AddInfo(_arg1:OIObject, _arg2:Boolean=true):void{
if (this.iInfo){
this.removeChild(this.iInfo);
this.iInfo.Free();
this.iInfo = null;
};
if (_arg1){
this.iInfo = _arg1;
this.iInfo.Pos(0, 0);
this.iInfo.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;
switch (this.iState){
case stShow:
if (!this.prAnimation){
if (iLevelVal > 0){
this.State = stConnection;
} else {
this.State = stGoToPlay;
};
};
break;
case stGoToPlay:
if (!this.iInfo.prVisible){
this.AddInfo(null);
this.State = stConnection;
};
break;
case stConnection:
_local2 = getTimer();
_local3 = this.SplashInfoMessage();
if (((((_local2 - this.iITimer) > 5000)) && (_local3))){
this.State = stStart;
};
if (((((_local2 - this.iITimer) > 2000)) && ((LinkzL.iMP.State == OMultiplayer.stInZone)))){
this.State = stLoadLevel;
};
break;
case stLoadLevel:
_local3 = this.SplashInfoMessage();
if (((_local3) && (LinkzL.iMP.prOpponentTurn))){
_local4 = LinkzL.iMP.prOpponentTurn.split(",");
if (_local4.length > 2){
this.State = stStart;
break;
};
iMultiPlayer = !((((_local4[0] == "none")) && ((_local4[1] == "none"))));
this.iRecordO = ((((_local4[0] == "none")) && ((_local4[1] == "none")))) ? null : _local4[1];
this.iNameO = (this.iRecordO) ? _local4[0] : null;
this.State = stStart;
};
break;
case stStart:
if ((getTimer() - iITimer) > 2000){
this.State = stPlay;
};
break;
case stPlay:
iScoreCounter.prValue = ScoreCalc(iGame.Score);
if ((((iGame.State == OGFieldGame.stComplite)) || ((iGame.State == OGFieldGame.stNotComplite)))){
if (iGame.State == OGFieldGame.stComplite){
LinkzL.iGAME.Write(OGame.catTmp, "NewLevel", true);
this.State = stLevelComplete;
} else {
LinkzL.iGAME.Write(OGame.catTmp, "NewLevel", false);
this.State = stLevelNotComplete;
};
AddAllSpr();
};
if (((iMultiPlayer) && (!(iOppEndGame)))){
if (((!((iGameO.State == OGFieldGame.stComplite))) && (!((iGameO.State == OGFieldGame.stNotComplite))))){
iScoreCounterO.prValue = ScoreCalc(iGameO.Score);
};
if (((((iPlayer) && ((iGameO.State == OGFieldGame.stComplite)))) || ((iGameO.State == OGFieldGame.stNotComplite)))){
iInfoP.prScore = iScoreCounterO.prValue;
if (iGameO.State == OGFieldGame.stComplite){
iInfoP.State = OWInfoPanel.stCompleteLevel;
} else {
iInfoP.State = OWInfoPanel.stFailedLevel;
};
iGameO.prVisible = false;
iScoreCounterO.prVisible = false;
iScoreO.prVisible = false;
iOppEndGame = true;
};
};
break;
case stGameFieldHide:
if (!iGame.prAnimation){
this.State = stShowResults;
};
break;
case stShowResults:
if (((!(this.iInfo.prVisible)) && (!(this.iInfo.prAnimation)))){
this.State = stConnection;
};
break;
};
super.OnEnterFrame(_arg1);
}
override public function set State(_arg1:int):void{
var aState = _arg1;
this.iState = aState;
switch (this.iState){
case stShow:
break;
case stGoToPlay:
try {
this.AddInfo(new OWInstruction());
} catch(err:Error) {
this.AddInfo(null);
State = stConnection;
};
break;
case stConnection:
this.AddBanner(true, 800, 260);
iLevelVal = (LinkzL.iGAME.prLevel % OLLevels.LevelCount);
LinkzL.iMP.ClearOpponentTurn(true);
this.iITimer = getTimer();
this.AddInfo(LinkzS.ColorHeader(LinkzL.OWGameConnection), true);
if (LinkzL.iMP.State == OMultiplayer.stInZone){
this.State = stLoadLevel;
} else {
if (LinkzL.iMP.State != OMultiplayer.stConnection){
LinkzL.iMP.State = OMultiplayer.stNone;
LinkzL.iMP.Init(LinkzL.sDomain, LinkzL.sServer, LinkzL.sZone, LinkzL.sXTName, LinkzL.iGAME.prPlayerName);
};
};
iMultiPlayer = false;
break;
case stLoadLevel:
LinkzL.iMP.ClearOpponentTurn(true);
LinkzL.iMP.Turn(["rdl", iLevelVal, prGameIndex, LinkzL.iGAME.prPlayerName]);
break;
case stStart:
this.AddBanner(false);
iLevelCounter.prValue = (LinkzL.iGAME.prLevel + 1);
if (!this.iMultiPlayer){
LinkzL.OWGameNewLevelWithHoutOpponent[4] = ((LinkzL.strLevel + " # ") + (LinkzL.iGAME.prLevel + 1).toString());
this.AddInfo(LinkzS.ColorHeader(LinkzL.OWGameNewLevelWithHoutOpponent), true);
if (LinkzL.iMP.State == OMultiplayer.stInZone){
iInfoP.State = OWInfoPanel.stUserNotFound;
} else {
iInfoP.State = OWInfoPanel.stConnect;
};
} else {
LinkzL.OWGameNewLevel[0][4] = ((LinkzL.strLevel + " # ") + (LinkzL.iGAME.prLevel + 1).toString());
LinkzL.OWGameNewLevel[2][4] = this.iNameO;
this.AddInfo(OInterface.OIObjectMake(LinkzL.OWGameNewLevelWithOpponent), true);
iInfoP.prOpponent = this.iNameO;
iInfoP.State = OWInfoPanel.stOpponent;
};
iITimer = getTimer();
break;
case stPlay:
OSound.PlaySound(LinkzL.OSBubbleBang01);
this.AddInfo(null);
NewGame();
SetVisibleGame(true);
if (iMultiPlayer){
NewGameOpponent();
SetVisibleGameOpponent(true);
};
break;
case stLevelComplete:
LinkzL.iGAME.Write(OGame.catTmp, "Score", iScoreCounter.prValue);
LinkzL.iGAME.Write(OGame.catTmp, "Bonus", (((iMultiPlayer) && (!((iGameO.State == OGFieldGame.stComplite))))) ? iScoreCounterO.prValue : 0);
LinkzL.iGAME.Write(OGame.catTmp, "Result", (iScoreCounter.prValue + (((iMultiPlayer) && (!((iGameO.State == OGFieldGame.stComplite))))) ? iScoreCounterO.prValue : 0));
LinkzL.iGAME.Write(OGame.catTmp, "LevComp", 1);
LinkzL.iMP.Turn(["wrl", iLevelVal, prGameIndex, LinkzL.iGAME.prPlayerName, this.iGame.iRecord]);
iITimer = getTimer();
this.AddInfo(OInterface.OIObjectMake(LinkzL.OWGameCL), true);
LinkzL.iGAME.NextLevel();
break;
case stLevelNotComplete:
LinkzL.iGAME.Write(OGame.catTmp, "Score", iScoreCounter.prValue);
LinkzL.iGAME.Write(OGame.catTmp, "Bonus", 0);
LinkzL.iGAME.Write(OGame.catTmp, "Result", iScoreCounter.prValue);
LinkzL.iGAME.Write(OGame.catTmp, "LevComp", 0);
if (iGame.KoefState() < iSaveKoef){
LinkzL.iMP.Turn(["wrl", iLevelVal, prGameIndex, LinkzL.iGAME.prPlayerName, this.iGame.iRecord]);
};
iITimer = getTimer();
this.AddInfo(OInterface.OIObjectMake(LinkzL.OWGameNCL), true);
break;
case stGameFieldHide:
SetVisibleGame(false);
if (iMultiPlayer){
SetVisibleGameOpponent(false);
};
this.iInfo.prVisible = false;
break;
case stShowResults:
this.AddInfo(new OWResults());
break;
};
}
private function AddBanner(_arg1:Boolean, _arg2:int=0, _arg3:int=0):void{
if (LinkzL.sDebug == true){
return;
};
if (_arg1){
OAdBanners.AddTBanner(this, 0, 0, _arg2, _arg3);
OAdBanners.AddBBanner(this, 0, (600 - _arg3), _arg2, _arg3);
} else {
OAdBanners.RemoveTBanner(this);
OAdBanners.RemoveBBanner(this);
};
}
override public function Init():void{
super.Init();
this.iInfoP = new OWInfoPanel();
this.iInfoP.Pos(520, 0);
this.iInfoP.prVisible = false;
this.addChild(this.iInfoP);
this.State = stShow;
this.iRNDIndex = (Math.random() * 10);
CPrototypeFactory._createParticleBitmaps(7);
this.iSite.addEventListener(MouseEvent.CLICK, OnClickSite);
iSite.buttonMode = true;
iLevelVal = LinkzL.iGAME.prLevel;
}
private function NewGameOpponent():void{
if (iGameO){
iPlayer.Free();
iPlayer = null;
this.removeChild(iGameO);
iGameO.Free();
iGameO = null;
};
iScoreCounterO.prValue = 0;
iGameO = new OGFieldGame([OLLevels._LevelList(iLevelVal), [250, 250], prSeed, true]);
iPlayer = new OLOpponentPlay(iGameO, iRecordO);
this.addChild(iGameO);
iGameO.Pos(533, 95);
iOppEndGame = false;
}
override public function set prActive(_arg1:Boolean):void{
if (_arg1){
this.State = stShow;
};
super.prActive = _arg1;
}
private function SetVisibleGameOpponent(_arg1:Boolean):void{
if (iGameO){
iGameO.prVisible = _arg1;
};
if (iScoreO){
iScoreO.prVisible = _arg1;
};
if (iScoreCounterO){
iScoreCounterO.prVisible = _arg1;
};
}
private function get prLevelIndex():int{
return ((((iLevelVal + 1) * 10) + iRNDIndex));
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == this.iMenu){
if (this.iState > stPlay){
return;
};
if (LinkzL.iMP.State == OMultiplayer.stInGame){
LinkzL.iMP.State = OMultiplayer.stJoinMainRoom;
};
this.iState = stPause;
(this.parent as OWindow).OnPress(null, LinkzL.miMenu);
this.prVisible = false;
return;
};
}
private function NewGame():void{
if (iGame){
this.removeChild(iGame);
iGame.Free();
iGame = null;
};
iScoreCounter.prValue = 0;
iScoreCounterO.prValue = 0;
iGame = new OGFieldGame([OLLevels._LevelList(iLevelVal), [500, 500], prSeed, false]);
iGame.Pos(16, 30);
this.addChild(iGame);
}
private function get prSeed():int{
return ((29989 + (7 * (((iLevelVal + 1) * 10) + iRNDIndex))));
}
private function OnClickSite(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(LinkzL.strConnect2URL));
}
private function SetVisibleGame(_arg1:Boolean):void{
if (iGame){
iGame.prVisible = _arg1;
};
if (iGameName){
iGameName.prVisible = _arg1;
};
if (iSite){
iSite.prVisible = _arg1;
};
if (iMenu){
iMenu.prVisible = _arg1;
};
if (iLevel){
iLevel.prVisible = _arg1;
};
if (iLevelCounter){
iLevelCounter.prVisible = _arg1;
};
if (iScore){
iScore.prVisible = _arg1;
};
if (iScoreCounter){
iScoreCounter.prVisible = _arg1;
};
if (iInfoP){
iInfoP.prVisible = _arg1;
};
}
private function ScoreCalc(_arg1:Number):int{
return ((_arg1 * 5));
}
}
}//package RES.WINDOWS
Section 112
//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 iClose:OButton;
public var iPublish:OButton;
public var iClear:OButton;
public var iGlobal:OButton;
public var iType:OListBox;
public var iTable:OTab;
public function OWHighScores(){
var _local1:OScoreParams;
var _local2:int;
_local2 = 0;
while (_local2 < 5) {
_local1 = LinkzL.iGAME.GetLocalScores(0, _local2);
LinkzL.OWHighScoreLocal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : "";
LinkzL.OWHighScoreLocal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : "";
_local1 = LinkzL.iGAME.GetPersonalScores(0, _local2);
LinkzL.OWHighScorePersonal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : "";
LinkzL.OWHighScorePersonal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : "";
_local2++;
};
super(LinkzL.OWHighScores);
}
override public function set prActive(_arg1:Boolean):void{
var _local2:OScoreParams;
if (_arg1){
_local2 = LinkzL.iGAME.GetLocalScores(0, 0);
if (!_local2){
(iTable.getChildAt(0) as OSprite).Free();
};
_local2 = LinkzL.iGAME.GetPersonalScores(0, 0);
if (!_local2){
(iTable.getChildAt(1) as OSprite).Free();
};
};
super.prActive = _arg1;
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == this.iClose){
this.prVisible = false;
return;
};
if (_arg2 == this.iType){
this.iTable.prValue = this.iType.prCurrentInd;
return;
};
if (_arg2 == this.iClear){
(this.parent as OWindow).OnPress(null, LinkzL.miDeleteScoresConfirm);
this.prActive = false;
return;
};
(this.parent as OWindow).OnPress(null, LinkzL.miCommingSoon);
this.prActive = false;
}
override public function Free():void{
this.iType = null;
this.iTable = null;
this.iGlobal = null;
this.iPublish = null;
this.iClear = null;
this.iClose = null;
super.Free();
}
}
}//package RES.WINDOWS
Section 113
//OWInfoPanel (RES.WINDOWS.OWInfoPanel)
package RES.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import flash.utils.*;
import flash.net.*;
import RES.OBJECTS.*;
public class OWInfoPanel extends OIObject {
private var iTimer:int;
private var iMode:int;
private var iInfo:OInfoObject;
private var iScore:int;
private var iOpponent:String;
public static const stFailedLevel:int = 7;
public static const stConnect:int = 1;
public static const stEndLevel:int = 5;
public static const stCompleteLevel:int = 6;
public static const stInGame:int = 3;
public static const stNone:int = 0;
public static const stUserNotFound:int = 2;
public static const stOpponent:int = 4;
public function OWInfoPanel(){
super(null, OInterface.iDefAnimators);
}
public function set prOpponent(_arg1:String):void{
this.iOpponent = _arg1;
}
private function ShowConnect():void{
var _local1:String;
_local1 = LinkzL.OWColors[((this.iMode + 2) % LinkzL.OWColors.length)];
LinkzL.OWInfoPConnect[0][3] = _local1;
LinkzL.OWInfoPConnect[1][3] = _local1;
LinkzL.OWInfoPConnect[1][4] = _local1;
switch ((this.iMode % 3)){
case 0:
LinkzL.OWInfoPConnect[0][4] = LinkzL.strConnect1;
LinkzL.OWInfoPConnect[1][6] = LinkzL.strPlayOnline1;
break;
case 1:
LinkzL.OWInfoPConnect[0][4] = LinkzL.strConnect2;
LinkzL.OWInfoPConnect[1][6] = LinkzL.strMoreGames1;
break;
case 2:
LinkzL.OWInfoPConnect[0][4] = LinkzL.strConnect3;
LinkzL.OWInfoPConnect[1][6] = LinkzL.strSendMail;
break;
};
this.InitObject(LinkzL.OWInfoPConnect);
}
private function ShowUserNotFound():void{
var _local1:String;
var _local2:String;
var _local3:Array;
_local1 = LinkzL.iMP.prOpponentTurn;
LinkzL.iMP.ClearOpponentTurn(true);
LinkzL.iMP.Turn(["rdr"]);
_local2 = LinkzL.OWColors[Math.round((Math.random() * (LinkzL.OWColors.length - 1)))];
LinkzL.OWInfoPUserNotFound[0][3] = _local2;
LinkzL.OWInfoPUserNotFound[1][3] = _local2;
switch ((this.iMode % 5)){
case 0:
LinkzL.OWInfoPUserNotFound[0][4] = LinkzL.iMP.prUsersCount;
LinkzL.OWInfoPUserNotFound[0][6] = 200;
LinkzL.OWInfoPUserNotFound[1][6] = (LinkzL.OWInfoPUserNotFound[0][6] + 70);
LinkzL.OWInfoPUserNotFound[1][4] = LinkzL.strPlayersOnline1;
break;
default:
if (!_local1){
return;
};
_local3 = _local1.split(/,/);
LinkzL.OWInfoPUserNotFound[0][4] = ((int(_local3[0]) + 1).toString() + LinkzL.strPlace);
LinkzL.OWInfoPUserNotFound[0][6] = 180;
LinkzL.OWInfoPUserNotFound[1][6] = (LinkzL.OWInfoPUserNotFound[0][6] + 90);
LinkzL.OWInfoPUserNotFound[1][4] = ((_local3[1] + LinkzL.strHasReiting) + _local3[2]);
break;
};
this.InitObject(LinkzL.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 = LinkzL.strConnect1URL;
break;
case 1:
_local3 = LinkzL.strConnect2URL;
break;
case 2:
_local3 = LinkzL.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:
LinkzL.OWInfoP[0][2] = 30;
LinkzL.OWInfoP[0][3] = "yellow";
LinkzL.OWInfoP[0][6] = 265;
LinkzL.OWInfoP[0][4] = ((((LinkzL.strOpponent1 + "\n") + this.iOpponent) + "\n") + LinkzL.strOpponent2);
this.InitObject(LinkzL.OWInfoP);
this.iTimer = getTimer();
break;
case stOpponent:
LinkzL.OWInfoPPlayer[1][4] = this.iOpponent;
this.InitObject(LinkzL.OWInfoPPlayer);
break;
case stEndLevel:
LinkzL.OWInfoP[0][2] = 30;
LinkzL.OWInfoP[0][3] = "magenta";
LinkzL.OWInfoP[0][6] = 240;
LinkzL.OWInfoP[0][4] = ((this.iOpponent + LinkzL.strLevelScore) + this.iScore);
this.InitObject(LinkzL.OWInfoP);
this.iTimer = getTimer();
break;
case stCompleteLevel:
LinkzL.OWInfoP[0][2] = 30;
LinkzL.OWInfoP[0][3] = "yellow1";
LinkzL.OWInfoP[0][6] = 240;
LinkzL.OWInfoP[0][4] = ((this.iOpponent + LinkzL.strCompleteLevel) + this.iScore);
this.InitObject(LinkzL.OWInfoP);
this.iTimer = getTimer();
break;
case stFailedLevel:
LinkzL.OWInfoP[0][2] = 30;
LinkzL.OWInfoP[0][3] = "red";
LinkzL.OWInfoP[0][6] = 240;
LinkzL.OWInfoP[0][4] = ((this.iOpponent + LinkzL.strFailedLevel) + this.iScore);
this.InitObject(LinkzL.OWInfoP);
this.iTimer = getTimer();
break;
};
}
}
}//package RES.WINDOWS
Section 114
//OWInstruction (RES.WINDOWS.OWInstruction)
package RES.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import RES.OBJECTS.*;
public class OWInstruction extends OWindow {
private var iDemo:OWDemo;
private var iClose:OButton;
private var iTimer:int;
private var iPlayList:Array;
public var iCollect:Array;
public var iInfoText:OIObject;
private var iPlayIndex:int;// = 0
private static const stPlay:int = 1;
private static const stNone:int = 0;
private static const Play1:Array = [[[0, 1], [1, 1], [2, 1], [3, 1]], [34, 14, 35, 15, 36, 17, 37, 16], [2, 1], OWDemo.Map1];
private static const Play2:Array = [[[0, 3], [1, 3], [2, 3], [3, 3]], [34, 14, 35, 15, 36, 17, 37, 16], [2, 1], OWDemo.Map2];
private static const Play3:Array = [[[0, 5], [1, 5], [2, 5], [3, 5]], [34, 14, 35, 15, 36, 17, 37, 16], [2, 1], OWDemo.Map3];
public function OWInstruction(){
iPlayList = [Play1, Play2, Play3];
iPlayIndex = 0;
super(LinkzL.OWInstructions);
}
override public function Init():void{
CPrototypeFactory._createParticleBitmaps(7);
iCollect = new Array();
super.Init();
iDemo = new OWDemo();
iDemo.Pos(270, 95);
this.addChild(iDemo);
this.State = stPlay;
}
override public function OnPress(_arg1:Event, _arg2):void{
(this.parent as OWindow).OnPress(null, LinkzL.miLastWindow);
this.prVisible = false;
}
override public function Free():void{
super.Free();
if (iDemo){
iDemo.Free();
iDemo = null;
};
}
override public function OnEnterFrame(_arg1:Event):void{
switch (this.State){
case stPlay:
if (iDemo.State == OWDemo.stEnd){
this.State = stPlay;
};
break;
};
}
override public function set State(_arg1:int):void{
this.iState = _arg1;
switch (this.iState){
case stNone:
break;
case stPlay:
if (!iDemo.prVisible){
iDemo.prVisible = true;
};
iDemo.Play(iPlayList[iPlayIndex]);
iPlayIndex++;
if (iPlayIndex > (iPlayList.length - 1)){
iPlayIndex = 0;
};
break;
};
}
}
}//package RES.WINDOWS
Section 115
//OWIntro (RES.WINDOWS.OWIntro)
package RES.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
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(){
LinkzL.OWIntroParam[0][1] = [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]];
super(LinkzL.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 116
//OWMenu (RES.WINDOWS.OWMenu)
package RES.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import flash.utils.*;
import flash.net.*;
import ENGINE.SMARTFOX.*;
public class OWMenu extends ODialog {
public var iPlayers:OIObject;
public var iMoreGames:OButton;
public var iOptions:OButton;
public var iGameName:OIObject;
public var iBName:OButton;
public var iCPlayers:OCounter;
public var iTimer:int;
public var iPlayOnlineStrategy:OButton;
public var iHighScores:OButton;
public var iInstructions:OButton;
public var iInfo:OIObject;
public var iLevelEditor:OButton;
public function OWMenu(){
super(LinkzL.OWMenu);
}
override public function set prVisible(_arg1:Boolean):void{
super.prVisible = _arg1;
}
override public function Init():void{
LinkzL.OWMenu[0][4] = ((LinkzL.strWelcome + " ") + LinkzL.iGAME.prPlayerName);
super.Init();
if (LinkzL.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 = LinkzL.iMP.prUsersCount;
this.iPlayers.prAnimationEnabled = true;
this.iCPlayers.Pos((this.iPlayOnlineStrategy.prX + 20), this.iCPlayers.prY);
this.iPlayers.Pos((this.iCPlayers.prX + 90), this.iPlayers.prY);
this.ShowUserReiting(true);
}
override public function set prActive(_arg1:Boolean):void{
super.prActive = _arg1;
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == this.iBName){
(this.parent as OWindow).OnPress(null, LinkzL.miChoosePlayer);
this.prVisible = false;
return;
};
if (_arg2 == this.iPlayOnlineStrategy){
(this.parent as OWindow).OnPress(null, LinkzL.miGameMP);
LinkzL.GameType = LinkzL.STRATEGY;
this.prVisible = false;
return;
};
if (_arg2 == this.iLevelEditor){
(this.parent as OWindow).OnPress(null, LinkzL.miLevelEditor);
LinkzL.GameType = LinkzL.STRATEGY;
this.prVisible = false;
return;
};
if (_arg2 == this.iOptions){
(this.parent as OWindow).OnPress(null, LinkzL.miOptions);
this.prActive = false;
return;
};
if (_arg2 == this.iInstructions){
(this.parent as OWindow).OnPress(null, LinkzL.miInstructions);
this.prActive = false;
return;
};
if (_arg2 == this.iHighScores){
(this.parent as OWindow).OnPress(null, LinkzL.miHighScores);
this.prActive = false;
return;
};
if (_arg2 == this.iMoreGames){
navigateToURL(new URLRequest(LinkzL.sURLSite));
return;
};
(this.parent as OWindow).OnPress(null, LinkzL.miCommingSoon);
this.prActive = false;
}
override public function Free():void{
this.iBName = null;
this.iGameName = null;
this.iCPlayers = null;
this.iPlayers = null;
this.iPlayOnlineStrategy = null;
this.iOptions = null;
this.iInstructions = null;
this.iHighScores = null;
this.iMoreGames = null;
super.Free();
}
private function InitObject(_arg1:Array):void{
if (this.iInfo){
this.removeChild(this.iInfo);
this.iInfo.Free();
this.iInfo = null;
};
if (!_arg1){
return;
};
this.iInfo = new OIObject(_arg1, OInterface.iDefSlowAnimators);
this.addChild(this.iInfo);
this.iInfo.SetVisible(false);
this.iInfo.prVisible = true;
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
if (this.iCPlayers.prValue != LinkzL.iMP.prUsersCount){
if (LinkzL.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 = LinkzL.iMP.prUsersCount;
};
_local2 = getTimer();
if ((_local2 - this.iTimer) > 30000){
ShowUserReiting(false);
};
super.OnEnterFrame(_arg1);
}
private function ShowUserReiting(_arg1:Boolean):void{
var _local2:String;
var _local3:String;
var _local4:Array;
_local2 = LinkzL.OWColors[Math.round((Math.random() * (LinkzL.OWColors.length - 1)))];
LinkzL.OWMenuReiting[0][3] = _local2;
if (_arg1){
LinkzL.iMP.ClearOpponentTurn(true);
LinkzL.OWMenuReiting[0][4] = ((LinkzL.iGAME.prPlayerName + LinkzL.strReiting2) + LinkzL.iGAME.prScore.toString());
this.InitObject(LinkzL.OWMenuReiting);
};
this.iTimer = getTimer();
if (LinkzL.iMP.State != OMultiplayer.stInZone){
return;
};
_local3 = LinkzL.iMP.prOpponentTurn;
LinkzL.iMP.ClearOpponentTurn(true);
LinkzL.iMP.Turn(["rdr"]);
if (!_local3){
return;
};
_local4 = _local3.split(/,/);
LinkzL.OWMenuReiting[0][4] = (((((int(_local4[0]) + 1).toString() + LinkzL.strReiting1) + _local4[1]) + LinkzL.strReiting2) + _local4[2]);
this.InitObject(LinkzL.OWMenuReiting);
}
}
}//package RES.WINDOWS
Section 117
//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;
private var iSRes:Array;
public var iMusic:OListBox;
public var iCancel:OButton;
public var iAccept:OButton;
public function OWOptions(){
super(LinkzL.OWOptions);
}
private function AddResolution(_arg1:int, _arg2:int):void{
if ((((_arg1 <= Capabilities.screenResolutionX)) && ((_arg2 <= Capabilities.screenResolutionY)))){
this.iSRes.push([_arg1, _arg2]);
this.iSResList.push(((_arg1.toString() + " X ") + _arg2.toString()));
};
}
override public function Init():void{
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:Number;
LinkzL.OWOptions[0][2] = 340;
LinkzL.OWOptions[5][11] = 190;
LinkzL.OWOptions[6][8] = 260;
LinkzL.OWOptions[7][8] = 260;
super.Init();
this.iResolution.prVisible = false;
this.iSound.prCurrentInd = int((LinkzL.iGAME.prSoundVolume * 10));
this.iMusic.prCurrentInd = int((LinkzL.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;
LinkzL.iGAME.prSoundVolume = (this.iSound.prCurrentInd / 10);
LinkzL.iGAME.prMusicVolume = (this.iMusic.prCurrentInd / 10);
LinkzL.iGAME.prResX = this.iSRes[this.iResolution.prCurrentInd][0];
LinkzL.iGAME.prResY = this.iSRes[this.iResolution.prCurrentInd][1];
LinkzL.iGAME.prFullScreen = (this.iFullScreen.prCurrentInd) ? true : false;
fscommand("fullscreen", LinkzL.iGAME.prFullScreen.toString());
return;
};
}
override public function Free():void{
this.iSound = null;
this.iMusic = null;
this.iResolution = null;
this.iFullScreen = null;
this.iAccept = null;
this.iCancel = null;
this.iSRes = null;
this.iSResList = null;
super.Free();
}
private function InitResolutions():void{
this.iSRes = new Array();
this.iSResList = new Array();
AddResolution(640, 480);
AddResolution(800, 600);
AddResolution(0x0400, 600);
AddResolution(0x0400, 0x0300);
AddResolution(0x0500, 0x0300);
AddResolution(0x0500, 0x0400);
AddResolution(Capabilities.screenResolutionX, Capabilities.screenResolutionY);
}
}
}//package RES.WINDOWS
Section 118
//OWResults (RES.WINDOWS.OWResults)
package RES.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.GAME.*;
import ENGINE.CORE.*;
import flash.utils.*;
public class OWResults extends OAlert {
private var iWInd:int;// = 0
private var iTimer:Timer;
private var iDelta:Number;// = 0.025
public static const stScore:int = 3;
public static const stHits:int = 1;
public static const stStart:int = 0;
public static const stMisses:int = 2;
public function OWResults(){
var _local1:int;
var _local2:int;
var _local3:int;
iWInd = 0;
iDelta = 0.025;
_local1 = LinkzL.iGAME.Read(OGame.catTmp, "Score");
LinkzL.OWResultsLevelScore[1][5] = _local1.toString();
_local1 = LinkzL.iGAME.Read(OGame.catTmp, "Bonus");
LinkzL.OWResultsBonusScore[1][5] = _local1.toString();
_local1 = LinkzL.iGAME.Read(OGame.catTmp, "Result");
LinkzL.OWResultsTotalScore[1][5] = _local1.toString();
LinkzL.OWResults[5][6] = ((1)==LinkzL.iGAME.Read(OGame.catTmp, "LevComp")) ? LinkzL.strNextLevel : LinkzL.strPlayAgain;
LinkzL.iGAME.AddScore(_local1);
LinkzL.iGAME.AddScoreInTable(_local1);
_local2 = LinkzL.iGAME.prMode;
LinkzL.iGAME.prMode = 0;
LinkzL.iGAME.AddScore(_local1);
LinkzL.iGAME.AddScoreInTable(_local1);
LinkzL.iGAME.prMode = _local2;
_local3 = LinkzL.iGAME.prScore;
LinkzL.OWResultsRaiting[1][4] = _local3.toString();
LinkzL.iMP.Turn(["wrr", LinkzL.iGAME.prPlayerName, _local3]);
super(LinkzL.OWResults, null);
}
override public function Init():void{
super.Init();
this.Pos(0, 0);
this.iTimer = new Timer(500, 8);
this.iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
this.iTimer.start();
}
override public function Free():void{
this.iTimer.stop();
this.iTimer.removeEventListener(TimerEvent.TIMER, OnTimer);
this.iTimer = null;
super.Free();
}
private function OnTimer(_arg1:TimerEvent):void{
switch (this.iTimer.currentCount){
case 1:
(this.getChildAt(0) as OIObject).prVisible = true;
break;
case 2:
(this.getChildAt(1) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 3:
(this.getChildAt(2) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 4:
(this.getChildAt(3) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 5:
(this.getChildAt(4) as OIObject).prVisible = true;
(this.getChildAt(5) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
};
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
}
}
}//package RES.WINDOWS
Section 119
//Linkz (Linkz)
package {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import RES.WINDOWS.*;
import ENGINE.SMARTFOX.*;
import ENGINE.AD.*;
public class Linkz extends OApplication {
private var iSystem:OSystem;
public var iField:OSprite;
private var iWindow:OWindow;
public function Linkz(){
super("Linkz");
LinkzL.iGAME;
OSound.PlayListAdd("music.mp3");
OSound.PlayMusic();
OAdBanners.InitTBanner(LinkzL.sTBannerPrefix, LinkzL.sBannerID);
OAdBanners.InitBBanner(LinkzL.sBBannerPrefix, LinkzL.sBannerID);
}
protected function OnResize1(_arg1:Event):void{
var _local2:Stage;
_local2 = Stage(_arg1.target);
trace("ttttt", _local2);
}
override protected function OnMenuItem():void{
var _local1:int;
var _local2:DisplayObject;
var _local3:OWHighScores;
_local1 = this.prMenuItem;
switch (_local1){
case LinkzL.miNullWindow:
return;
case LinkzL.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 = LinkzL.miNullWindow;
break;
case LinkzL.miIntro:
this.iWindow = new OWIntro();
if (LinkzL.iGAME.prPlayerName == ""){
this.prMenuItem = LinkzL.miEnterNameFirst;
} else {
this.prMenuItem = LinkzL.miMenu;
};
break;
case LinkzL.miEnterNameFirst:
this.iWindow = new OWEnterName(false);
this.prMenuItem = LinkzL.miMenu;
break;
case LinkzL.miEnterNewName:
this.iWindow = new OWEnterName(true);
(this.iWindow as OWEnterName).prName = "";
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miMenu:
switch (LinkzL.iMP.State){
case OMultiplayer.stNone:
LinkzL.iMP.Init(LinkzL.sDomain, LinkzL.sServer, LinkzL.sZone, LinkzL.sXTName, LinkzL.iGAME.prPlayerName);
break;
case OMultiplayer.stConnectionError:
if (LinkzL.iMP.prErrorsCount < 5){
LinkzL.iMP.State = OMultiplayer.stNone;
LinkzL.iMP.Init(LinkzL.sDomain, LinkzL.sServer, LinkzL.sZone, LinkzL.sXTName, LinkzL.iGAME.prPlayerName);
};
break;
case OMultiplayer.stInGame:
LinkzL.iMP.State = OMultiplayer.stInZone;
break;
};
this.iWindow = new OWMenu();
this.prMenuItem = LinkzL.miNullWindow;
break;
case LinkzL.miCommingSoon:
this.iWindow = new OAlert(LinkzL.OWCommingSoon, null);
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miChoosePlayer:
this.iWindow = new OWChoosePlayer();
this.prMenuItem = LinkzL.miMenu;
break;
case LinkzL.miDeletePlayerConfirm:
this.iWindow = new OAlert(LinkzL.OWDeletePlayerConfirm, [LinkzL.miDeletePlayer, LinkzL.miLastWindow]);
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miDeletePlayer:
LinkzL.iGAME.DeletePlayer(LinkzL.iGAME.prPlayerName);
if (LinkzL.iGAME.prPlayerName != ""){
this.OnMenuItem();
return;
};
this.iWindow = new OWEnterName(false);
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miOptions:
this.iWindow = new OWOptions();
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miHighScores:
this.iWindow = new OWHighScores();
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miDeleteScoresConfirm:
this.iWindow = new OAlert(LinkzL.OWDeleteScoresConfirm, [LinkzL.miDeleteScores, LinkzL.miLastWindow]);
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miDeleteScores:
_local3 = (this.getChildAt((this.numChildren - 1)) as OWHighScores);
if (_local3.iTable.prValue == 0){
LinkzL.iGAME.ClearLocalScores(0);
} else {
LinkzL.iGAME.ClearPersonalScores(0);
};
this.OnMenuItem();
return;
case LinkzL.miGameMP:
this.iWindow = new OWGame();
this.prMenuItem = LinkzL.miMenu;
break;
case LinkzL.miResultsMP:
this.iWindow = new OWResults();
this.prMenuItem = LinkzL.miLastWindow;
break;
case LinkzL.miInstructions:
this.iWindow = new OWInstruction();
this.prMenuItem = LinkzL.miLastWindow;
break;
};
this.addChild(this.iWindow);
}
override public function Init():void{
if (((((!(this.stage)) || ((this.stage.stageHeight == 0)))) || ((this.stage.stageWidth == 0)))){
return;
};
this.InitBackground([LinkzL.OBG02], 0);
if (LinkzL.sDebug){
this.iSystem = new OSystem();
this.addChild(this.iSystem);
};
super.Init();
this.prMenuItem = LinkzL.miIntro;
OnMenuItem();
OGlobal.prStage.addEventListener(Event.RESIZE, OnResize1);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg1 == null){
this.prMenuItem = _arg2;
};
}
override protected function OnDeactivate(_arg1:Event):void{
LinkzL.iGAME.SaveCache();
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
LinkzL.iMP.OnEnterFrame();
if (LinkzL.sDebug){
OSystem.iUserText1 = (((((((" : " + LinkzL.iMP.State.toString()) + " : ") + LinkzL.iMP.prActiveRoomID.toString()) + " ") + LinkzL.iMP.prPlayerID.toString()) + " : ") + LinkzL.iMP.prError);
};
if (this.iWindow){
if (this.iWindow.prAnimation){
return;
};
if (!this.iWindow.prVisible){
this.removeChild(this.iWindow);
this.iWindow.Free();
this.iWindow = null;
this.OnMenuItem();
} else {
if (!this.iWindow.prActive){
this.OnMenuItem();
};
};
};
}
}
}//package
Section 120
//LinkzL (LinkzL)
package {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.GAME.*;
import ENGINE.CORE.*;
import ENGINE.SMARTFOX.*;
public class LinkzL {
public static const strCancel:String = "Cancel";
public static const OSSmileSInd:int = 12;
public static const strOpen:String = "Open";
public static const strSaveAs:String = "Save As";
public static const miDeletePlayer:int = 9;
public static const iGameColor:Array = ["white", "red", "red1", "green", "aqua", "blue", "magenta"];
public static const miDeleteScoresConfirm:int = 18;
private static const OWSelectGameGameModeColor:Array = ["60", "30", "180", "70", "190", "220", "280", "100", "40", "150", "170", "250", "50", "260", "140", "330", "300", "350", "80", "120"];
public static const strDefPlayerName:String = "WELL";
public static const strResults1:String = "Results:";
public static const strPresents:String = "presents";
public static const OSBubbleBangSInd:int = 0;
public static const miCommingSoon:int = 6;
public static const strConnect1URL:String = "http://www.wellgames.com/free_online/linkz/?g=linkz";
public static const strResults:String = "Results";
public static const strChoosePlayer:String = "Choose a Player";
public static const sBBannerPrefix:String = "bottom/";
public static const strCommingSoon:String = "Coming Soon...";
public static const strInstructionsText:String = ((("Use your mouse to move colored marbles\n" + "to the empty tiles making links around\n") + "the solid polygons of corresponding colors\n") + "to remove them from the playfield.\n");
public static const strShow:String = "Show";
public static const strConnect2URL:String = "http://www.wellgames.com/?g=linkz";
public static const miLastWindow:int = 1;
public static const strInputText:String = "Input Text";
public static const strFullScreen:String = "Full Screen";
private static const iWOptionsVolume:Array = [LinkzL.strOff, "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"];
public static const ARCADE:int = 2;
public static const strSite:String = "WELLGAMES.COM";
public static const miMenu:int = 5;
public static const SQUARE:int = 0;
public static const strNextLevel:String = "Next Level";
public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/free_online/linkz/?g=linkz";
public static const strMoreGames:String = "More Games";
public static const strPlace:String = " Place";
public static const strPlayAgain:String = "Play Again";
public static const strAddArea:String = "Add
area";
public static const strSound:String = "Sound Volume";
public static const miOptions:int = 10;
public static const sURLSite:String = "http://www.wellgames.com/?g=linkz";
public static const miDeleteScores:int = 19;
public static const strHighScores:String = "High Scores";
public static const strNewPlayer:String = "NEW PLAYER!";
public static const miDeletePlayerConfirm:int = 8;
public static const miInstructions:int = 24;
public static const strReiting2:String = "'s Rating Is ";
public static const strWindow:String = "Window";
public static const strDeleteScoresConfirm:String = "Are you sure you
want to delete
score table?";
public static const strReiting1:String = " Place: ";
public static const strHowToPlay:String = "How To Play";
public static const sServer:String = "www.wellgames.com";
public static const strCollect1:String = "Collect";
public static const strCollect2:String = "The line can be collected";
public static const strHasReiting:String = "'s
Rating Is
";
public static const sDebug:Boolean = false;
public static const strNew:String = "New";
public static const strLevelScoreR:String = "Level Score: ";
public static const strOff:String = "Off";
public static const strCollect:String = "Collect :";
public static const sTBannerPrefix:String = "top/";
public static const strFailed:String = "Failed";
public static const miGameMP:int = 21;
public static const strConnect2:String = "Try Other
Multiplayer
Games!";
public static const strConnect3:String = "Tell A Friend
About
Linkz!";
public static const miResultsMP:int = 22;
public static const strConnect1:String = "Play With
Other Gamers
In Multiplayer
Mode!";
public static const sXTName:String = "lk";
public static const strGainedScore:String = "gained score :";
public static const OWInstructionsInfo:Array = [[[LinkzS.Header, 550, 25, "yellow1", LinkzL.strInstructionsText, 0, 0, null, 0, true]]];
public static const HEXAGON:int = 1;
public static const DEMO:int = 3;
public static const TRIANGLE:int = 2;
public static const sURLGame:String = "http://www.wellgames.com/free_online/linkz/?g=linkz";
public static const miEnterNewName:int = 4;
public static const strWidth:String = "Width";
public static const miIntro:int = 2;
private static const OWHighScoresType:Array = [LinkzL.strLocal, LinkzL.strPersonal];
public static const strClose:String = "Close";
public static const strPrToCont:String = "press to continue";
public static const strEnterName:String = "please enter your name:";
public static const strFailedLevel:String = "
Has Failed
The Level
With Score
";
public static const strMoreGames1:String = "More Games";
public static const strLevelConfirm1:String = "score";
public static const strLevelConfirm2:String = "to get to the next level you must
beat your opponent";
public static const strMusic:String = "Music Volume";
public static const strPlayArcade:String = "Play Arcade!";
public static const strInstructions:String = "Instruction";
public static const strLevelScore:String = "'s
Level Score
Is ";
public static const strComplete:String = "complete!";
public static const miResultsSP:int = 15;
public static const strAccept:String = "Accept";
public static const strClear:String = "Clear";
public static const miSSaver:int = 25;
public static const iGameColorInd:Array = [0, 0, 30, 120, 180, 240, 300];
public static const strConnectionToServer:String = "Connecting To Server...";
public static const strOpponent:String = "Opponent";
public static const strSendMail:String = "Send Mail";
public static const strHeight:String = "Height";
public static const strPlayersOnline1:String = "Players
Online";
public static const strLevel1:String = "Level:";
public static const sZone:String = "Linkz";
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 miLevelEditor:int = 26;
public static const OSSmileEInd:int = 14;
public static const sBannerID:String = "linkz";
public static const strGameName:String = "Linkz!";
public static const strScore:String = "Score:";
public static const strYes:String = "Yes";
public static const miNullWindow:int = 0;
public static const sDomain:String = "wellgames.com";
public static const strCompleteLevel:String = "
Has Completed
The Level
With Score
";
public static const miHighScores:int = 17;
public static const strLevelEditor:String = "Level Editor";
public static const 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 = [LinkzL.strOff, LinkzL.strOn];
public static const strSave:String = "Save";
public static const strYourRaiting:String = "Your Rating:";
public static const strLevelConfirm:String = "To get to the next level you need more than";
public static const STRATEGY:int = 1;
public static const strPlayOnline1:String = "Play Online!";
public static const strChangePlayer:String = "click to change player";
public static const strCommingSoonI:String = "This option is not available
at the moment";
public static const strPersonal:String = "Personal";
public static const miChoosePlayer:int = 7;
public static const strPlayStrategy:String = "Play Strategy!";
public static const miEnterNameFirst:int = 3;
private static const OSoundParams:Array = [LinkzL.OSBubbleBang01, LinkzL.OSBubbleBang02, LinkzL.OSBubbleBang03, LinkzL.OSBubbleBang04];
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 strOn:String = "On";
public static const strWelcome:String = "Welcome";
public static const strPlayersOnline:String = "Players Online";
public static var OWInfoP:Array = [[LinkzS.Header, 250, 30, "yellow", LinkzL.strConnect1, 5, 265, null, 0, true]];
private static var OWGameSite:Array = [[LinkzS.Header, 250, 25, "blue", strSite, 0, 0, null, 0, true]];
public static var OIRight:Class = LinkzL_OIRight;
public static var OWHighScores:Array = [[LinkzS.BigFrame, 600, 440, "yellow", "white", 0, 0, null, 0, true], [LinkzS.Header, 600, 50, "yellow", LinkzL.strHighScores, 0, 20, null, 0, true], [LinkzS.ListBoxTextHSlider, 280, 50, "aqua1", false, 190, 40, "aqua1", "", LinkzL.OWHighScoresType, 160, 75, "iType", 0, true], [LinkzS.SmallBorder, 540, 200, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, LinkzL.OWHighScoreTabF, 45, 145, "iTable", 0, true], [LinkzS.MakeTextButton, 150, 60, "red", "red", 30, LinkzL.strClear, 110, 350, "iClear", 0, true], [LinkzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, LinkzL.strClose, 340, 350, "iClose", 0, true]];
public static var OWDeleteScoresConfirm:Array = [[LinkzS.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [LinkzS.Header, 420, 30, "aqua1", LinkzL.strDeleteScoresConfirm, 0, 85, null, 0, true], [LinkzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, LinkzL.strYes, 50, 190, "iButtons", 0, true], [LinkzS.MakeTextButton, 150, 60, "red", "red", 30, LinkzL.strNo, 220, 190, "iButtons", 1, true]];
public static var OWGameConnection:Array = [LinkzS.ColorHeader, 800, 50, LinkzL.OWColors, LinkzL.strConnectionToServer, OInterface.iDefSlowAnimators];
private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, LinkzL.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, LinkzL.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, LinkzL.OTimerAnimator, null];
public static var OWEnterName:Array = [[LinkzS.BigFrame, 460, 290, "aqua1", "white", 0, 0, null, 0, true], [LinkzS.Header, 460, 50, "aqua1", LinkzL.strNewPlayer, 0, 20, null, 0, true], [LinkzS.Header, 460, 30, "yellow", LinkzL.strEnterName, 0, 90, null, 0, true], [LinkzS.InputText, 400, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 130, "iName", 0, true], [LinkzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, LinkzL.strAccept, 70, 210, "iAccept", 0, true], [LinkzS.MakeTextButton, 150, 60, "red", "red", 30, LinkzL.strCancel, 240, 210, "iCancel", 0, true]];
public static var OCursor:Class = LinkzL_OCursor;
private static var OWGameCompletedLevel:Array = [[LinkzS.Header, 500, 60, "yellow", strLevel, 17, 0, null, 0, true], [LinkzS.Header, 500, 60, "yellow", strComplete, 17, 60, null, 0, true], [LinkzS.Header, 500, 35, "yellow", strPrToCont, 17, 130, null, 0, true]];
public static var OWCommingSoon:Array = [[LinkzS.BigFrame, 530, 290, "yellow1", "yellow", 0, 0, null, 0, true], [LinkzS.Header, 530, 50, "red", LinkzL.strCommingSoon, 0, 20, null, 0, true], [LinkzS.Header, 530, 30, "magenta", LinkzL.strCommingSoonI, 0, 125, null, 0, true], [LinkzS.MakeTextButton, 150, 60, "aqua1", "aqua1", 30, LinkzL.strClose, 190, 210, null, 0, true]];
public static var recLevel:String;
public static var OWResults:Array = [[LinkzS.ColorHeader, 800, 90, OWRecordColor, strResults, OInterface.iDefSlowAnimators, 0, 0, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 50, 130, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 50, 200, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 50, 270, null, 0, false], [OInterface.OIObjectMake, OWResultsRaiting, OInterface.iDefSlowAnimators, 0, 330, null, 0, false], [LinkzS.MakeTextButton, 320, 60, "yellow", "yellow", 30, LinkzL.strNextLevel, 240, 480, "iButtons", 0, false]];
public static var OWResultsLevelScore:Array = [[LinkzS.TextAlign, 695, 50, 50, "yellow", strGainedScore, 0, 1, 0, 0, null, 0, true], [LinkzS.TextAlign, 695, 50, 50, "yellow", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWGameNCL:Array = [OInterface.OIObjectMake, OWGameNotCompletedLevel, OInterface.iDefAnimators, 660, 50, null, 0, true];
public static var OILeft:Class = LinkzL_OILeft;
public static var OGFieldGame:Array = [];
public static var OWResizeParam:Array = [[LinkzS.ActiveFrame, 310, 100, "white", 0, 0, "iBack", 0, true], [LinkzS.Header, 150, 25, "aqua1", LinkzL.strWidth, 0, 10, null, 0, true], [LinkzS.MakeSpriteButton, 25, 25, "blue", "blue", OILeft, "GEL", 0.8, 150, 10, "iBWDec", 0, true], [ODisplay.IDisplayObjectMake, LinkzL.OWGameScoreF, 205, 8, "iWidth", 0, true], [LinkzS.MakeSpriteButton, 25, 25, "blue", "blue", OIRight, "GEL", 0.8, 260, 10, "iBWInc", 0, true], [LinkzS.Header, 150, 25, "aqua1", LinkzL.strHeight, 0, 55, null, 0, true], [LinkzS.MakeSpriteButton, 25, 25, "blue", "blue", OILeft, "GEL", 0.8, 150, 55, "iBHDec", 0, true], [ODisplay.IDisplayObjectMake, LinkzL.OWGameScoreF, 205, 53, "iHeight", 0, true], [LinkzS.MakeSpriteButton, 25, 25, "blue", "blue", OIRight, "GEL", 0.8, 260, 55, "iBHInc", 0, true]];
public static var OWResultsRaiting:Array = [[LinkzS.ColorText, 60, OWPlayersColor, strYourRaiting, OInterface.iDefSlowAnimators, 180, 0, null, 0, true], [LinkzS.Header, 800, 60, "aqua1", "9", 0, 70, null, 0, true]];
private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15};
public static var OFont:Class = LinkzL_OFont;
public static var OWResultsBonusScore:Array = [[LinkzS.TextAlign, 695, 50, 50, "red", strBonusScore, 0, 1, 0, 0, null, 0, true], [LinkzS.TextAlign, 695, 50, 50, "red", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWResultsTotalScore:Array = [[LinkzS.TextAlign, 695, 50, 50, "yellow1", strTotalScore, 0, 1, 0, 0, null, 0, true], [LinkzS.TextAlign, 695, 50, 50, "yellow1", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWGameNewLevelWithOpponent:Array = [OInterface.OIObjectMake, OWGameNewLevel, OInterface.iDefAnimators, 0, 0, null, 0, false];
public static var OPFieldEdit:Array = [[LinkzS.ActiveFrame, 120, 300, "white", 0, 0, "iBack", 0, true], [LinkzS.MakeTextButton, 110, 80, "yellow1", "yellow1", 25, LinkzL.strAddArea, 5, 25, "iBAddArea", 0, true], [LinkzS.MakeTextButton, 110, 80, "yellow", "yellow", 25, LinkzL.strShow, 5, 115, "iBShow", 0, true], [LinkzS.MakeTextButton, 110, 80, "green", "green", 25, LinkzL.strClear, 5, 205, "iBClear", 0, true]];
private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams);
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], [LinkzS.Header, 800, 50, "aqua1", LinkzL.strSite, 0, 160, "iHeader", 0, true], [LinkzS.Header, 800, 40, "aqua1", LinkzL.strPresents, 0, 400, "iFooter", 0, true], [LinkzS.Text, 120, "0", " ", 80, 0, "iName", 0, true], [LinkzS.Text, 120, "30", " ", 150, 0, "iName", 1, true], [LinkzS.Text, 120, "aqua1", "L", 170, 0, "iName", 2, true], [LinkzS.Text, 120, "yellow", "I", 247, 0, "iName", 3, true], [LinkzS.Text, 120, "green", "N", 315, 0, "iName", 4, true], [LinkzS.Text, 120, "red", "K", 410, 0, "iName", 5, true], [LinkzS.Text, 120, "magenta", "Z", 515, 0, "iName", 6, true], [LinkzS.Text, 120, "aqua", "!", 600, 0, "iName", 7, true], [LinkzS.Text, 120, "240", " ", 630, 0, "iName", 8, true], [LinkzS.Text, 120, "270", " ", 700, 0, "iName", 9, true]];
public static var OIDown:Class = LinkzL_OIDown;
public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[LinkzS.Header, 17, 25, "yellow1", " ", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "0", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "1", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "2", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "3", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "4", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "5", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "6", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "7", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "8", 0, 0, null, 0, false], [LinkzS.Header, 17, 25, "yellow1", "9", 0, 0, null, 0, false]], 17, 25, LinkzL.OWGameCounterAnimator, null];
public static var OWColors2:Array = ["330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0", "330", "270", "240", "210", "180", "150", "120", "90", "60", "30", "0"];
public static var OWColors3:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"];
public static var OWColors1:Array = ["30", "0", "90", "60", "150", "120", "210", "180", "270", "240", "330", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"];
public static var OBubble:Class = LinkzL_OBubble;
private static var iGameType:int = 0;
public static var OBG02:Class = LinkzL_OBG02;
public static var OWGameNewLevel:Array = [[LinkzS.ColorHeader, 800, 60, OWSelectGameGameModeColor, strSite, OInterface.iDefAnimators, 0, 0, null, 0, true], [LinkzS.ColorHeader, 800, 60, LinkzL.OWColors, strOpponent, OInterface.iDefAnimators, 0, 60, null, 0, true], [LinkzS.ColorHeader, 800, 60, LinkzL.OWColors2, strSite, OInterface.iDefAnimators, 0, 120, null, 0, true]];
public static var OWChoosePlayer:Array = [[LinkzS.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [LinkzS.Header, 500, 50, "aqua1", LinkzL.strChoosePlayer, 0, 20, null, 0, true], [LinkzS.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [LinkzS.MakeTextButton, 150, 60, "yellow", "yellow", 30, LinkzL.strNew, 30, 340, "iNew", 0, true], [LinkzS.MakeTextButton, 150, 60, "magenta", "magenta", 30, LinkzL.strDelete, 320, 340, "iDelete", 0, true], [LinkzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, LinkzL.strAccept, 90, 420, "iAccept", 0, true], [LinkzS.MakeTextButton, 150, 60, "red", "red", 30, LinkzL.strCancel, 260, 420, "iCancel", 0, true]];
public static var OSBubbleBang01:Class = LinkzL_OSBubbleBang01;
public static var OWSSaver:Array = [[LinkzS.MakeNFTextButton, 75, 25, "yellow", "yellow", 25, LinkzL.strMenu, 0, 0, "iMenu", 0, true], [LinkzS.MakeNFTextButton, 225, 25, "aqua1", "aqua1", 25, LinkzL.strSite, 0, 0, "iSite", 0, true]];
public static var OSBubbleBang03:Class = LinkzL_OSBubbleBang03;
public static var OSBubbleBang02:Class = LinkzL_OSBubbleBang02;
public static var OWDeletePlayerConfirm:Array = [[LinkzS.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [LinkzS.Header, 420, 30, "aqua1", LinkzL.strDeletePlayerConfirm, 0, 85, null, 0, true], [LinkzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, LinkzL.strYes, 50, 190, "iButtons", 0, true], [LinkzS.MakeTextButton, 150, 60, "red", "red", 30, LinkzL.strNo, 220, 190, "iButtons", 1, true]];
public static var OSBubbleBang04:Class = LinkzL_OSBubbleBang04;
public static var OWGameLevelElement:Array = [OInterface.OTabMake, [[LinkzS.Header, 17, 35, "yellow", " ", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "0", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "1", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "2", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "3", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "4", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "5", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "6", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "7", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "8", 0, 0, null, 0, false], [LinkzS.Header, 17, 35, "yellow", "9", 0, 0, null, 0, false]], 17, 35, LinkzL.OWGameCounterAnimator, null];
public static var OWGame:Array = [[LinkzS.ColorHeader, 250, 60, OWGameNameColor, strGameName, OInterface.iDefAnimators, 533, 20, "iGameName", 0, false], [LinkzS.MakeTextButton, 200, 50, "white", "white", 25, LinkzL.strMenu, 558, 490, "iMenu", 0, false], [OInterface.OIObjectMake, OWGameSite, OInterface.iDefAnimators, 533, 560, "iSite", 0, false], [LinkzS.ColorHeader, 80, 35, OWColors3, strLevel1, OInterface.iDefAnimators, 70, 550, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelF, 180, 557, "iLevelCounter", 0, false], [LinkzS.ColorHeader, 150, 35, OWColors2, strScore, OInterface.iDefAnimators, 270, 550, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 450, 556, "iScoreCounter", 0, false], [LinkzS.ColorHeader, 150, 25, OWColors1, strScore, OInterface.iDefAnimators, 550, 350, "iScoreO", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 650, 356, "iScoreCounterO", 0, false]];
public static var OGField:Array = [];
public static var OIUp:Class = LinkzL_OIUp;
public static var OWResultsRaitingS:Array = [[LinkzS.Header, 800, 80, "aqua1", "9", 0, 0, null, 0, true]];
public static var OWResultsScoreT:Array = [[LinkzS.Header, 800, 60, "yellow1", ((strLevel + " ") + strScore), 0, 0, null, 0, true]];
public static var OWRecordColor:Array = ["0", "60", "90", "150", "180", "240", "300", "360", "0", "60", "90", "150", "180", "240", "300", "360"];
private static var OWPlayersCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 67, 0, "iDigits", 4, true]], 85, 30];
private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 22, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 44, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 66, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 88, 0, "iDigits", 4, true]], 22, 35];
private static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[LinkzS.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [LinkzS.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, LinkzL.OTimerAnimator, null];
public static var OBubbleShadow:Class = LinkzL_OBubbleShadow;
public static var OWGameNameColor:Array = ["aqua1", "yellow", "green", "red", "magenta", "aqua", "white", "aqua1", "yellow", "green", "red", "magenta", "aqua", "white"];
private static var OWGameNotCompletedLevel:Array = [[LinkzS.Header, 500, 60, "red", strLevel, 17, 0, null, 0, true], [LinkzS.Header, 500, 60, "red", strFailed, 17, 60, null, 0, true], [LinkzS.Header, 500, 35, "red", strPrToCont, 17, 130, null, 0, true]];
public static var OWInfoPUserNotFound:Array = [[LinkzS.Header, 250, 30, "yellow", LinkzL.strConnect1, 5, 200, null, 0, true], [LinkzS.Header, 250, 30, "yellow", LinkzL.strConnect1, 5, 265, null, 0, true]];
public static var OWPlayersColor:Array = ["180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150"];
public static var OWInputParam:Array = [[LinkzS.BigFrame, 600, 400, "yellow1", "yellow", 0, 0, null, 0, true], [LinkzS.Header, 600, 40, "aqua1", LinkzL.strInputText, 0, 30, null, 0, true], [LinkzS.MakeTextButton, 150, 60, "aqua1", "aqua1", 30, LinkzL.strClose, 225, 310, "iClose", 0, true]];
public static var OWLevelEditor:Array = [[LinkzS.MakeTextButton, 200, 50, "white", "white", 25, LinkzL.strMenu, 558, 490, "iMenu", 0, false]];
public static var OWResultsColor:Array = ["yellow", "yellow", "yellow", "yellow", "yellow", "yellow", "yellow"];
public static var OWMenuReiting:Array = [[LinkzS.Header, 800, 30, "yellow", "W", 0, 375, null, 0, true]];
public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[LinkzS.Header, 22, 35, "yellow1", " ", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "0", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "1", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "2", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "3", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "4", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "5", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "6", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "7", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "8", 0, 0, null, 0, false], [LinkzS.Header, 22, 35, "yellow1", "9", 0, 0, null, 0, false]], 20, 35, LinkzL.OWGameCounterAnimator, null];
public static var FallParticle:Class = LinkzL_FallParticle;
public static var OWInfoPConnect:Array = [[LinkzS.Header, 250, 28, "yellow", LinkzL.strConnect1, 5, 200, null, 0, true], [LinkzS.MakeTextButton, 230, 50, "yellow", "yellow", 25, LinkzL.strPlayOnline, 15, 310, null, 0, true]];
public static var OWHighScoreLocal:Array = [[LinkzS.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, 35, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, 35, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, 70, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, 70, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, 105, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, 105, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, 140, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, 140, null, 0, true]];
public static var OWGameNewLevelWithHoutOpponent:Array = [LinkzS.ColorHeader, 800, 60, OWSelectGameGameModeColor, strSite, OInterface.iDefSlowAnimators, 0, 0, null, 0, true];
public static var OWMenu:Array = [[LinkzS.Header, 800, 40, "magenta1", LinkzL.strWelcome, 0, 10, null, 0, true], [LinkzS.Header, 800, 30, "white", LinkzL.strChangePlayer, 0, 55, null, 0, true], [LinkzS.ColorHeader, 800, 90, LinkzL.OWGameNameColor, LinkzL.strGameName, null, 0, 80, "iGameName", 0, true], [LinkzS.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 196, "iCPlayers", 0, true], [LinkzS.ColorText, 30, LinkzL.OWPlayersColor, LinkzL.strPlayersOnline, null, 20, 190, "iPlayers", 0, true], [LinkzS.MakeTextButton, 400, 100, "yellow", "yellow1", 50, LinkzL.strPlayOnline, 200, 250, "iPlayOnlineStrategy", 0, true], [LinkzS.MakeTextButton, 300, 60, "red1", "red1", 30, LinkzL.strOptions, 70, 440, "iOptions", 0, true], [LinkzS.MakeTextButton, 300, 60, "green", "green", 30, LinkzL.strInstructions, 430, 440, "iInstructions", 0, true], [LinkzS.MakeTextButton, 300, 60, "aqua", "aqua", 30, LinkzL.strHighScores, 30, 520, "iHighScores", 0, true], [LinkzS.MakeTextButton, 300, 60, "magenta", "magenta", 30, LinkzL.strMoreGames, 470, 520, "iMoreGames", 0, true]];
public static var OWHighScorePersonal:Array = [[LinkzS.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, 35, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, 35, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, 70, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, 70, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, 105, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, 105, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, 140, null, 0, true], [LinkzS.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, 140, null, 0, true]];
private static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 68, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 85, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 102, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 119, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 136, 0, "iDigits", 8, true]], 153, 25];
public static var OWOptions:Array = [[LinkzS.BigFrame, 540, 390, "aqua1", "white", 0, 0, null, 0, true], [LinkzS.Header, 540, 50, "aqua1", LinkzL.strOptions, 0, 20, null, 0, true], [LinkzS.ListBoxTextHSlider, 520, 50, "magenta", false, 90, 40, "magenta", LinkzL.strSound, LinkzL.iWOptionsVolume, 10, 90, "iSound", 0, true], [LinkzS.ListBoxTextHSlider, 520, 50, "yellow", false, 90, 40, "yellow", LinkzL.strMusic, LinkzL.iWOptionsVolume, 10, 140, "iMusic", 0, true], [LinkzS.ListBoxTextHSlider, 520, 50, "green1", false, 200, 40, "green1", LinkzL.strWindow, null, 10, 190, "iResolution", 0, true], [LinkzS.ListBoxTextHSlider, 520, 50, "red1", false, 90, 40, "red1", LinkzL.strFullScreen, LinkzL.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [LinkzS.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, LinkzL.strAccept, 110, 310, "iAccept", 0, true], [LinkzS.MakeTextButton, 150, 60, "red", "red", 30, LinkzL.strCancel, 280, 310, "iCancel", 0, true]];
public static var OPFileControl:Array = [[LinkzS.ActiveFrame, 120, 300, "white", 0, 0, "iBack", 0, true], [LinkzS.MakeTextButton, 110, 40, "yellow1", "yellow1", 25, LinkzL.strNew, 5, 25, "iBNew", 0, true], [LinkzS.MakeTextButton, 110, 40, "yellow", "yellow", 25, LinkzL.strOpen, 5, 100, "iBOpen", 0, true], [LinkzS.MakeTextButton, 110, 40, "green", "green", 25, LinkzL.strSave, 5, 175, "iBSave", 0, true], [LinkzS.MakeTextButton, 110, 40, "blue", "blue", 25, LinkzL.strSaveAs, 5, 250, "iBSaveAs", 0, true]];
public static var OWInstructions:Array = [[LinkzS.BigFrame, 700, 580, "yellow", "white", 50, 10, null, 0, true], [LinkzS.Header, 800, 50, "yellow", LinkzL.strHowToPlay, 0, 30, null, 0, true], [LinkzS.MakeTextButton, 180, 50, "yellow", "yellow", 30, LinkzL.strClose, 310, 510, null, 0, true], [LinkzS.Header, 800, 23, "yellow1", LinkzL.strInstructionsText, 0, 420, 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);
private static var OWGameLevelF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameLevelElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameLevelElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameLevelElement, 34, 0, "iDigits", 2, true]], 51, 35];
public static var OWGameCL:Array = [OInterface.OIObjectMake, OWGameCompletedLevel, OInterface.iDefAnimators, 660, 50, null, 0, true];
public static var OWInfoPPlayer:Array = [[LinkzS.ColorHeader, 270, 30, LinkzL.OWColors, LinkzL.strOpponent1, null, 5, 400, null, 0, true], [LinkzS.ColorHeader, 270, 30, LinkzL.OWPlayersColor, LinkzL.strLevel, null, 5, 435, null, 0, true]];
public static var iGAME:OGame = new OCGame();
public static function set GameType(_arg1:int):void{
iGameType = _arg1;
iGAME.prMode = iGameType;
}
public static function get GameType():int{
return (iGameType);
}
}
}//package
Section 121
//LinkzL_FallParticle (LinkzL_FallParticle)
package {
import mx.core.*;
public class LinkzL_FallParticle extends SpriteAsset {
}
}//package
Section 122
//LinkzL_OBG02 (LinkzL_OBG02)
package {
import mx.core.*;
public class LinkzL_OBG02 extends MovieClipAsset {
}
}//package
Section 123
//LinkzL_OBubble (LinkzL_OBubble)
package {
import mx.core.*;
public class LinkzL_OBubble extends SpriteAsset {
}
}//package
Section 124
//LinkzL_OBubbleShadow (LinkzL_OBubbleShadow)
package {
import mx.core.*;
public class LinkzL_OBubbleShadow extends SpriteAsset {
}
}//package
Section 125
//LinkzL_OCursor (LinkzL_OCursor)
package {
import mx.core.*;
public class LinkzL_OCursor extends SpriteAsset {
}
}//package
Section 126
//LinkzL_OFont (LinkzL_OFont)
package {
import mx.core.*;
public class LinkzL_OFont extends SpriteAsset {
}
}//package
Section 127
//LinkzL_OIDown (LinkzL_OIDown)
package {
import mx.core.*;
public class LinkzL_OIDown extends SpriteAsset {
}
}//package
Section 128
//LinkzL_OILeft (LinkzL_OILeft)
package {
import mx.core.*;
public class LinkzL_OILeft extends SpriteAsset {
}
}//package
Section 129
//LinkzL_OIRight (LinkzL_OIRight)
package {
import mx.core.*;
public class LinkzL_OIRight extends SpriteAsset {
}
}//package
Section 130
//LinkzL_OIUp (LinkzL_OIUp)
package {
import mx.core.*;
public class LinkzL_OIUp extends SpriteAsset {
}
}//package
Section 131
//LinkzL_OSBubbleBang01 (LinkzL_OSBubbleBang01)
package {
import mx.core.*;
public class LinkzL_OSBubbleBang01 extends SoundAsset {
}
}//package
Section 132
//LinkzL_OSBubbleBang02 (LinkzL_OSBubbleBang02)
package {
import mx.core.*;
public class LinkzL_OSBubbleBang02 extends SoundAsset {
}
}//package
Section 133
//LinkzL_OSBubbleBang03 (LinkzL_OSBubbleBang03)
package {
import mx.core.*;
public class LinkzL_OSBubbleBang03 extends SoundAsset {
}
}//package
Section 134
//LinkzL_OSBubbleBang04 (LinkzL_OSBubbleBang04)
package {
import mx.core.*;
public class LinkzL_OSBubbleBang04 extends SoundAsset {
}
}//package
Section 135
//LinkzS (LinkzS)
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 flash.text.*;
import ENGINE.CORE.*;
import ENGINE.SKIN.*;
public class LinkzS {
public static var iRegistered:Boolean = LinkzS.Register();
private static function Register():Boolean{
OEffects.RegisterEffect("GEL", new OEffectGel());
OEffects.RegisterColor("GEL", "red", {iCH:0, iCS:0.5, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "red1", {iCH:30, iCS:0.5, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "yellow", {iCH:60, iCS:0.6, iCB:0.99, iSH:45, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "yellow1", {iCH:90, iCS:0.6, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "green", {iCH:120, iCS:0.5, iCB:0.99, iSH:105, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "green1", {iCH:150, iCS:0.5, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "aqua", {iCH:180, iCS:0.4, iCB:0.99, iSH:165, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "aqua1", {iCH:210, iCS:0.4, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "blue", {iCH:240, iCS:0.3, iCB:0.99, iSH:225, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "blue1", {iCH:270, iCS:0.3, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "magenta", {iCH:300, iCS:0.4, iCB:0.99, iSH:295, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "magenta1", {iCH:330, iCS:0.4, iCB:0.99, iSH:345, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "white", {iCH:0, iCS:0, iCB:0.97, iSH:0, iSS:0, iSB:0.7});
OEffects.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 10", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2});
OEffects.RegisterFilter("GEL", "text 20", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2});
OEffects.RegisterFilter("GEL", "text 30", {iBorder:8, iAngle:90, iF0SD:3, iF0SB:6, iF1SD:5, iF1SB:6, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:130, iF2B:2});
OEffects.RegisterFilter("GEL", "text 40", {iBorder:8, iAngle:90, iF0SD:4, iF0SB:8, iF1SD:6, iF1SB:7, iF1GB:1, iF1GA:1, iF2GGD1:0, iF2GGB1:5, iF2GGC1:230, iF2GGD2:3, iF2GGB2:6, iF2GGC2:170, iF2B:2});
OEffects.RegisterFilter("GEL", "text 50", {iBorder:12, iAngle:90, iF0SD:5, iF0SB:10, iF1SD:7, iF1SB:8, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:6, iF2GGC1:240, iF2GGD2:4, iF2GGB2:6, iF2GGC2:130, iF2B:2});
OEffects.RegisterFilter("GEL", "text 60", {iBorder:14, iAngle:90, iF0SD:6, iF0SB:12, iF1SD:8, iF1SB:10, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:8, iF2GGC1:230, iF2GGD2:4, iF2GGB2:8, iF2GGC2:150, iF2B:2});
OEffects.RegisterFilter("GEL", "text 70", {iBorder:14, iAngle:90, iF0SD:6, iF0SB:12, iF1SD:9, iF1SB:10, iF1GB:1, iF1GA:1, iF2GGD1:-1, iF2GGB1:10, iF2GGC1:230, iF2GGD2:4, iF2GGB2:10, iF2GGC2:155, iF2B:2});
OEffects.RegisterFilter("GEL", "text 80", {iBorder:15, iAngle:90, iF0SD:7, iF0SB:13, iF1SD:11, iF1SB:11, iF1GB:1, iF1GA:1, iF2GGD1:-2, iF2GGB1:12, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:160, iF2B:2});
OEffects.RegisterFilter("GEL", "text 90", {iBorder:16, iAngle:90, iF0SD:8, iF0SB:14, iF1SD:12, iF1SB:12, iF1GB:1, iF1GA:1, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:14, iF2GGC2:170, iF2B:2});
OEffects.RegisterFilter("GEL", "spanel", {iBorder:16, iAngle:90, iF0SD:8, iF0SB:14, iF1SD:12, iF1SB:12, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:14, iF2GGC2:170, iF2B:2});
OEffects.RegisterFilter("GEL", "border", {iBorder:8, iAngle:60, iF0SD:3, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2});
OEffects.RegisterFilter("GEL", "bpanel ns", {iBorder:8, iAngle:90, iF0SD:0, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2});
OEffects.RegisterFilter("GEL", "spanel ns", {iBorder:16, iAngle:90, iF0SD:0, iF0SB:16, iF1SD:12, iF1SB:16, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:180, iF2B:2});
OEffects.RegisterFilter("GEL", "border ns", {iBorder:8, iAngle:60, iF0SD:0, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2});
return (true);
}
public static function TextAlignMy(_arg1:Array):OBitmap{
var _local2:Number;
var _local3:int;
var _local4:String;
_local2 = Math.round((1 + (_arg1[2] / 70)));
_local3 = Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90));
_local4 = ("text " + String(_local3));
return (ODisplay.OBitmapTextAlign([null, LinkzL.OFont, _arg1[3], _local2, _arg1[5], _arg1[6], _arg1[7], "GEL", _arg1[4], _local4, _arg1[8], _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[9]), OGlobal.ScaleFloor(_arg1[10])]));
}
public static function MakeSpriteButton(_arg1:Array):OButton{
var _local2:Array;
var _local3:OButton;
_local2 = [[ODisplay.OBitmapSpriteFillRect, _arg1[1], _arg1[2], [ODisplay.SpriteLib, _arg1[5]], "GEL", _arg1[3], _arg1[6], _arg1[7], 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]];
_local3 = new OButton(_local2);
_local3.Pos(OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9]));
return (_local3);
}
public static function SmallFrame(_arg1:Array):OBitmap{
return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], 24, 5, "GEL", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])]));
}
public static function ActiveFrame(_arg1:Array):OSprite{
var _local2:OBitmap;
var _local3:OSprite;
_local2 = ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], 20, 3, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", 1, OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)]);
_local3 = new OSprite();
_local3.addChild(_local2);
_local3.Pos(_arg1[4], _arg1[5]);
return (_local3);
}
public static function ListBoxTextElement(_arg1:Array):OListBoxElement{
var _local2:Number;
var _local3:Number;
var _local4:String;
var _local5:Array;
var _local6:OListBoxElement;
_local2 = (_arg1[2] - 10);
if (_local2 < 30){
_local2 = 30;
};
_local3 = Math.round((1 + (_local2 / 70)));
_local4 = ("text " + String((Math.round((_local2 / 10)) * 10)));
_local5 = [[ODisplay.OBitmapMake, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], 12, 6], 1, "GEL", _arg1[3], "border", 1, 0, 0, null, 0, false], [ODisplay.OBitmapMake, [ODisplay.SpriteTextInRect, LinkzL.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((Math.round((_arg1[5] / 10)) * 10), 30)));
_local4 = [[ODisplay.OBitmapTextInRect, LinkzL.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.min((Math.round((_arg1[1] / 10)) * 10), 90)));
return (ODisplay.OBitmapText([null, LinkzL.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 BigFrame(_arg1:Array):OBitmap{
return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], 64, 8, "GEL", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])]));
}
public static function ColorText(_arg1:Array):OIObject{
var _local2:Number;
var _local3:String;
var _local4:Sprite;
var _local5:TextField;
var _local6:TextFormat;
var _local7:Array;
var _local8:int;
var _local9:int;
var _local10:OIObject;
var _local11:String;
var _local12:Rectangle;
_local2 = Math.round((1 + (_arg1[1] / 70)));
_local3 = ("text " + String(Math.min((Math.round((_arg1[1] / 10)) * 10), 90)));
_local4 = ((LinkzL.OFont is Sprite)) ? (LinkzL.OFont as Sprite) : new ((LinkzL.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, LinkzL.OFont, _arg1[1], _local2, _local11], 1, "GEL", _arg1[2][_temp1], _local3, 1, _local12.x, _local12.y, null, 0, true]);
};
_local9++;
};
_local10 = new OIObject(_local7, _arg1[4]);
_local10.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6]));
return (_local10);
}
public static function SmallBorder(_arg1:Array):OBitmap{
return (ODisplay.OBitmapRoundBorder([null, _arg1[1], _arg1[2], 24, 6, "GEL", _arg1[3], "border", 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])]));
}
public static function MakeTextButton(_arg1:Array):OButton{
var _local2:Number;
var _local3:String;
var _local4:Array;
var _local5:OButton;
_local2 = Math.round((1 + (_arg1[5] / 70)));
_local3 = ("text " + String((Math.round((_arg1[5] / 10)) * 10)));
_local4 = [[ODisplay.OBitmapRoundFrameText, _arg1[1], _arg1[2], 24, 5, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", 1, LinkzL.OFont, _arg1[5], _local2, _arg1[6], "GEL", _arg1[3], _local3, 1, 0, 0, null, 0, true], [OSprite.Make, [[ODisplay.SpriteRoundRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale), (24 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]];
_local5 = new OButton(_local4);
_local5.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8]));
return (_local5);
}
public static function ListBoxTextHSlider(_arg1:Array):OListBox{
var _local2:Number;
var _local3:Number;
var _local4:String;
var _local5:Rectangle;
var _local6:Number;
var _local7:Array;
var _local8:Array;
var _local9:Array;
var _local10:Array;
var _local11:OListBox;
_local2 = _arg1[6];
_local3 = Math.round((1 + (_local2 / 70)));
_local4 = ("text " + String((Math.round((_local2 / 10)) * 10)));
_local5 = ODisplay.TextRect(LinkzL.OFont, _local2, _local3, _arg1[8]);
_local6 = (_arg1[6] - 10);
_local7 = (_arg1[4]) ? [[LinkzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array();
_local8 = [[ODisplay.OBitmapText, LinkzL.OFont, _local2, _local3, _arg1[8], "GEL", _arg1[3], _local4, 1, 15, ((_arg1[2] - _local5.height) * 0.5), null, 0, true], [LinkzS.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], LinkzL.OILeft, "text 60", 1, ((_arg1[1] - _arg1[5]) - 75), ((_arg1[2] - _local6) * 0.5), "iUp", 0, false], [LinkzS.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], LinkzL.OIRight, "text 60", 1, (_arg1[1] - 45), ((_arg1[2] - _local6) * 0.5), "iDown", 0, false]];
_local7 = _local7.concat(_local8);
_local9 = [LinkzS.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, LinkzS.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 = ((LinkzL.OFont is Sprite)) ? (LinkzL.OFont as Sprite) : new ((LinkzL.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, LinkzL.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:int;
var _local4:String;
_local2 = Math.round((1 + (_arg1[2] / 70)));
_local3 = Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90));
_local4 = ("text " + String(_local3));
return (ODisplay.OBitmapTextAlign([null, LinkzL.OFont, _arg1[3], _local2, _arg1[5], _arg1[6], _arg1[7], "GEL", _arg1[4], _local4, 1, _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])]));
}
public static function ListBoxText(_arg1:Array):OListBox{
var _local2:Number;
var _local3:Number;
var _local4:Array;
var _local5:Array;
var _local6:Array;
var _local7:int;
var _local8:OListBox;
_local2 = (_arg1[1] + 80);
_local3 = ((_arg1[2] * _arg1[5]) + 30);
_local4 = [[LinkzS.SmallBorder, _local2, _local3, _arg1[3], 0, 0, null, 0, true], [LinkzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], LinkzL.OIUp, "text 60", 1, (_local2 - 50), 20, "iUp", 0, false], [LinkzS.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], LinkzL.OIDown, "text 60", 1, (_local2 - 50), (_local3 - 50), "iDown", 0, false]];
_local5 = [LinkzS.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, LinkzS.ListBoxTextElementP, _local6, null);
_local8.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators;
_local8.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators;
_local8.prLBParams = _arg1[6];
_local8.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8]));
return (_local8);
}
public static function Header(_arg1:Array):OBitmap{
var _local2:Number;
var _local3:String;
_local2 = Math.round((1 + (_arg1[2] / 70)));
_local3 = ("text " + String(Math.min((Math.round((_arg1[2] / 10)) * 10), 90)));
return (ODisplay.OBitmapTextInRect([null, LinkzL.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.round((_local2 / 10)) * 10)));
_local5 = ODisplay.TextRect(LinkzL.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]) ? [[LinkzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array();
_local10 = [[ODisplay.OBitmapText, LinkzL.OFont, _local2, _local3, _arg1[9], "GEL", _arg1[3], _local4, 1, ((_arg1[1] - _local5.width) * 0.5), _arg1[10], null, 0, true], [LinkzS.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], LinkzL.OILeft, "text 60", 1, (_local6[0][0] - _local7), _local8, "iUp", 0, false], [LinkzS.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], LinkzL.OIRight, "text 60", 1, (_local6[0][0] + _arg1[5]), _local8, "iDown", 0, false]];
_local9 = _local9.concat(_local10);
_local11 = [LinkzS.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[8], "w", _arg1[8], 0, 0];
_local12 = new OListBox(_local9, _local11, LinkzS.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 = [[LinkzS.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true], [OInterface.OInputTextFieldMake, (_arg1[1] - 10), (_arg1[2] - 10), LinkzL.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
Section 136
//OCGame (OCGame)
package {
import ENGINE.GAME.*;
public class OCGame extends OGame {
public function OCGame(){
super(3, 5);
}
override public function DefaultInitLocalScores():void{
this.iScores.Clear(0);
this.iScores.AddScore("Emily", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Michael", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Jacob", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Isabella", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Madison", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.SortOn(0);
}
}
}//package