Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import flash.system.*;
import flash.net.*;
public class AdLoader {
private static var cpmstarLoaderCurent:Loader;
private static var PrevCpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
var _local3:Loader;
Security.allowDomain("server.cpmstar.com");
var _local4 = "http://server.cpmstar.com/adviewas3.swf";
_local3 = new Loader();
_local3.load(new URLRequest(((((_local4 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (_local3);
}
public static function removeChildAD(_arg1:Sprite):void{
var _spr:Sprite;
var parent = _arg1;
try {
_spr = (parent.getChildByName("adBox") as Sprite);
if (_spr == null){
return;
};
if (_spr.getChildByName("AD") != null){
_spr.removeChild(_spr.getChildByName("AD"));
};
if (parent.contains(_spr)){
parent.removeChild(_spr);
};
} catch(error:Error) {
trace(("<Error> " + error.message));
};
}
public static function loaderLoadAd(_arg1:int, _arg2:int):Loader{
var _local3:Loader;
Security.allowDomain("server.cpmstar.com");
var _local4 = "http://server.cpmstar.com/adviewas3.swf";
_local3 = new Loader();
_local3.load(new URLRequest(((((_local4 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (_local3);
}
public static function addChildAD(_arg1:Object, _arg2:int, _arg3:int=-1, _arg4:int=-1):void{
var _local6:MovieClip;
var _local7:DisplayObject;
var _local8:DisplayObject;
var _local5 = 1618;
_local6 = _arg1.getChildByName("adBox");
if (_local6 == null){
_local6 = new MovieClip();
_local6.name = "adBox";
_arg1.addChild(_local6);
};
if (_arg3 == -1){
_local6.x = (((OGlobal.StageRect.width - 300) / 2) - OApplication.sInstance.x);
} else {
_local6.x = _arg3;
};
if (_arg4 == -1){
_local6.y = (OGlobal.StageRect.height / 20);
} else {
_local6.y = _arg4;
};
if (PrevCpmstarLoader == null){
_local7 = AdLoader.LoadAd(_local5, _arg2);
} else {
_local7 = PrevCpmstarLoader;
};
_local7.name = "AD";
_local6.addChild(_local7);
PrevCpmstarLoader = cpmstarLoaderCurent;
_local8 = AdLoader.LoadAd(_local5, _arg2);
}
}
}//package CPMStar
Section 2
//OCPMStar (CPMStar.OCPMStar)
package CPMStar {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class OCPMStar extends Ad {
private var iTimer:Timer;
private var iID:int;
private var savedStageAlign:String;
private var iShowBanner:int;
public function OCPMStar(_arg1:int, _arg2:int){
this.iID = _arg1;
this.iShowBanner = _arg2;
this.iRect = new Rectangle(0, 0, 300, 300);
}
override public function GetName():String{
return (AdNames.AD_CPMSTAR);
}
protected function OnTimer(_arg1:TimerEvent=null):void{
if (this.iShowBanner != -1){
AdFinished();
} else {
if (iCbfnAdFinished != null){
iCbfnAdFinished();
iCbfnAdFinished = null;
};
};
}
protected function RemoveBanners():void{
AdLoader.removeChildAD((this.iApp as Sprite));
}
override protected function AdFinished():void{
iApp.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
iTimer.stop();
iTimer.removeEventListener(TimerEvent.TIMER, OnTimer);
iTimer = null;
RemoveBanners();
super.AdFinished();
}
override public function ShowInterLevelAd(_arg1:Function):void{
iApp.addEventListener(Event.ENTER_FRAME, onEnterFrame);
super.ShowInterLevelAd(_arg1);
var _local2:int = this.iShowBanner;
if (this.iShowBanner == -1){
_local2 = 10;
};
iTimer = new Timer((_local2 * 1000), 1);
iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
iTimer.start();
AddBanners();
}
override public function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void{
super.Init(_arg1, _arg2);
savedStageAlign = iApp.stage.align;
}
private function onEnterFrame(_arg1:Event):void{
if (iApp.stage.align != savedStageAlign){
iApp.stage.align = savedStageAlign;
};
}
override public function ShowEndGameAd(_arg1:Function):void{
_arg1();
}
override public function ShowPreGameAd(_arg1:Function):void{
_arg1();
}
protected function AddBanners():void{
AdLoader.addChildAD(this.iApp, this.iID);
}
}
}//package CPMStar
Section 3
//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{
}
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"];
};
}
public function DeleteBanner():void{
this.iBanner = null;
}
private function OnComplete(_arg1:Event):void{
this.iManager = this.iLoader.content;
}
}
}//package ENGINE.AD
Section 4
//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{
_slot1.iTBanner = new OAdBanner(_arg1, _arg2);
}
public static function RemoveBBanner(_arg1:DisplayObjectContainer):void{
var _local2:Sprite = (_slot1.iBBanner.prBanner as Sprite);
if (((_local2) && (_arg1.contains(_local2)))){
_arg1.removeChild(_local2);
};
_slot1.iBBanner.DeleteBanner();
}
public static function AddBBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{
_slot1.iBBanner.CreateBanner();
var _local6:Sprite = (_slot1.iBBanner.prBanner as Sprite);
if (!_local6){
return;
};
var _local7:Number = OGlobal.ToGlobal(_arg2);
var _local8:Number = OGlobal.ToGlobal(_arg3);
var _local9:Number = OGlobal.ToGlobal(_arg4);
var _local10:Number = 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 = (_slot1.iTBanner.prBanner as Sprite);
if (((_local2) && (_arg1.contains(_local2)))){
_arg1.removeChild(_local2);
};
_slot1.iTBanner.DeleteBanner();
}
public static function InitBBanner(_arg1:String, _arg2:String):void{
_slot1.iBBanner = new OAdBanner(_arg1, _arg2);
}
public static function AddTBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{
_slot1.iTBanner.CreateBanner();
var _local6:Sprite = (_slot1.iTBanner.prBanner as Sprite);
if (!_local6){
return;
};
var _local7:Number = OGlobal.ToGlobal(_arg2);
var _local8:Number = OGlobal.ToGlobal(_arg3);
var _local9:Number = OGlobal.ToGlobal(_arg4);
var _local10:Number = 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 5
//OCache (ENGINE.CORE.OCache)
package ENGINE.CORE {
import flash.utils.*;
public dynamic class OCache {
public function GetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int){
if (this[_arg1] == undefined){
return (null);
};
return (GetArrItem(_arg2, _arg3));
}
public function AddCategoryArr(_arg1:String, _arg2:String):Array{
var _local3:OCache = ((this[_arg1])==undefined) ? AddCategory(_arg1) : this[_arg1];
return (_local3.AddArr(_arg2));
}
public function GetCategoryNames(_arg1:String):Array{
var _local3:String;
if (this[_arg1] == undefined){
return (null);
};
var _local2:Array = new Array();
for (_local3 in this[_arg1]) {
_local2.push(_local3);
};
return ((_local2.length) ? _local2.sort() : null);
}
public function DeleteItem(_arg1:String):void{
if (this[_arg1] == undefined){
return;
};
delete this[_arg1];
}
public function GetCategoryItem(_arg1:String, _arg2:String){
if (this[_arg1] == undefined){
return (null);
};
return (this[_arg1].GetItem(_arg2));
}
public function Pack():ByteArray{
var _local1:ByteArray = new ByteArray();
_local1.writeObject(this);
return (_local1);
}
public function DeleteArrItem(_arg1:String, _arg2:int):void{
if (this[_arg1] == undefined){
return;
};
this[_arg1].splice(_arg2, 1);
}
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 IsCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):Boolean{
if (this[_arg1] == undefined){
return (false);
};
return (this[_arg1].IsArrItem(_arg2, _arg3));
}
public function Clear():void{
var _local1:String;
for (_local1 in this) {
delete this[_local1];
};
}
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 SetArrItem(_arg1:String, _arg2:int, _arg3):void{
if (this[_arg1] == undefined){
this[_arg1] = new Array();
};
this[_arg1][_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 SetItem(_arg1:String, _arg2):void{
this[_arg1] = _arg2;
}
public function GetNames():Array{
var _local2:String;
var _local1:Array = new Array();
for (_local2 in this) {
_local1.push(_local2);
};
return ((_local1.length) ? _local1.sort() : null);
}
public function SetCategoryItem(_arg1:String, _arg2:String, _arg3):void{
if (this[_arg1] == undefined){
this[_arg1] = new OCache();
};
this[_arg1].SetItem(_arg2, _arg3);
}
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 IsItem(_arg1:String):Boolean{
return (!((this[_arg1] == undefined)));
}
public function GetArrItem(_arg1:String, _arg2:int){
if ((((this[_arg1] == undefined)) || ((this[_arg1][_arg2] == undefined)))){
return (null);
};
return (this[_arg1][_arg2]);
}
public function AddCategory(_arg1:String):OCache{
this[_arg1] = new OCache();
return (this[_arg1]);
}
}
}//package ENGINE.CORE
Section 6
//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 = 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 = (((OGlobal.iStage.stageWidth / OGlobal.iStage.stageHeight))<=(800 / 600)) ? (OGlobal.iStage.stageWidth / 800) : (OGlobal.iStage.stageHeight / 600);
OGlobal.iSRect.x = 0;
OGlobal.iSRect.y = 0;
OGlobal.iSRect.width = OGlobal.iStage.stageWidth;
OGlobal.iSRect.height = OGlobal.iStage.stageHeight;
OGlobal.iVRect.width = Math.round((800 * _local3));
OGlobal.iVRect.height = Math.round((600 * _local3));
OGlobal.iVRect.x = Math.floor(((OGlobal.iStage.stageWidth - OGlobal.iVRect.width) / 2));
OGlobal.iVRect.y = Math.floor(((OGlobal.iStage.stageHeight - OGlobal.iVRect.height) / 2));
if (_arg2){
_arg1.x = OGlobal.iVRect.x;
_arg1.y = OGlobal.iVRect.y;
};
OGlobal.iScale = _local3;
}
public static function get prStage():Stage{
return (OGlobal.iStage);
}
public static function ClearScale(_arg1:Number=1):void{
OGlobal.iOldScale = OGlobal.iScale;
OGlobal.iScale = _arg1;
OGlobal.iVRect = OGlobal.iSRect.clone();
}
public static function ToGlobal(_arg1:Number):Number{
return ((_arg1 * OGlobal.iScale));
}
public static function set AppName(_arg1:String):void{
OGlobal.iAppName = ("WellGames_" + _arg1);
}
public static function get Domain():String{
return (OGlobal.iDomain);
}
public static function SetDomain():void{
var _local1:LocalConnection = 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 = (_arg1 * OGlobal.iScale);
return (((_local2 - Math.floor(_local2)) / OGlobal.iScale));
}
}
}//package ENGINE.CORE
Section 7
//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 = 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 = Rand();
return ((_local2 % _arg1));
}
public function SeedRand(_arg1:int=0):void{
if (_arg1 == 0){
iNextRandom = getTimer();
} else {
iNextRandom = _arg1;
};
}
}
}//package ENGINE.CORE
Section 8
//OSound (ENGINE.CORE.OSound)
package ENGINE.CORE {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.external.*;
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 = 0.5;
private static var iMusicChannel:SoundChannel;
private static var iMusicVolume:Number = 0.3;
private static var iMusic:Sound;
private static function SetMuteOn():void{
_slot1.Mute = true;
}
public static function PlaySoundInd(_arg1:int, _arg2:Number=0):Boolean{
if (_slot1.iSoundVolume == 0){
return (false);
};
_arg1 = Math.max(_arg1, 0);
_arg1 = Math.min(_arg1, (_slot1.iSoundsObjects.length - 1));
return (_slot1.PlaySound(_slot1.iSoundsObjects[_arg1], _arg2));
}
public static function PlaySoundRandom(_arg1:Number=0, _arg2:int=0, _arg3:int=-1):Boolean{
if (_slot1.iSoundVolume == 0){
return (false);
};
_arg2 = Math.max(_arg2, 0);
_arg2 = Math.min(_arg2, (_slot1.iSoundsObjects.length - 1));
if (_arg3 < 0){
_arg3 = (_slot1.iSoundsObjects.length - 1);
};
_arg3 = Math.max(_arg3, 0);
_arg3 = Math.min(_arg3, (_slot1.iSoundsObjects.length - 1));
var _local4:int = OUtils.Random(_arg2, _arg3);
return (_slot1.PlaySound(_slot1.iSoundsObjects[_local4], _arg1));
}
private static function OnMusicLoadComplete(_arg1:Event):void{
if (_slot1.iMusicVolume == 0){
return;
};
_slot1.iMusicChannel = iMusic.play(0, 0, new SoundTransform(_slot1.iMusicVolume, 0));
_slot1.RemoveMusic();
_slot1.iMusic.removeEventListener(IOErrorEvent.IO_ERROR, _slot1.OnMusicLoadIOError);
_slot1.iMusicChannel.addEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
}
public static function set SoundVolume(_arg1:Number):void{
_slot1.iSoundVolume = _arg1;
}
private static function OnMusicLoadIOError(_arg1:Event):void{
_slot1.RemoveMusic();
if ((_arg1.currentTarget is Sound)){
(_arg1.currentTarget as Sound).removeEventListener(IOErrorEvent.IO_ERROR, _slot1.OnMusicLoadIOError);
if (_arg1.currentTarget != _slot1.iMusic){
return;
};
};
_slot1.iMusicPlayList.splice(_slot1.iMusicInd, 1);
_slot1.iMusicInd = ((_slot1.iMusicInd > (_slot1.iMusicPlayList.length - 1))) ? (_slot1.iMusicPlayList.length - 1) : _slot1.iMusicInd;
_slot1.PlayMusic();
}
private static function OnMusicComplete(_arg1:Event):void{
_slot1.iMusicChannel.removeEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
_slot1.iMusicChannel = null;
_slot1.iMusicChannel = iMusic.play(0, 0, new SoundTransform(_slot1.iMusicVolume, 0));
_slot1.iMusicChannel.addEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
}
public static function PlaySound(_arg1:Class, _arg2:Number=0):Boolean{
if (_slot1.iSoundVolume == 0){
return (false);
};
var _local3:Sound = _slot1.iSounds[_arg1];
if (_local3 != null){
_local3.play(0, 0, new SoundTransform(_slot1.iSoundVolume, _arg2));
};
return (!((_local3 == null)));
}
private static function setGlobalVolume(_arg1:Number):void{
var _local2:SoundTransform = new SoundTransform();
_local2.volume = _arg1;
SoundMixer.soundTransform = _local2;
}
private static function RemoveMusic():void{
if (_slot1.iMusic){
_slot1.iMusic.removeEventListener(Event.COMPLETE, _slot1.OnMusicLoadComplete);
};
}
public static function StopMusic():void{
if (_slot1.iMusicChannel){
_slot1.iMusicChannel.removeEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
_slot1.iMusicChannel.stop();
_slot1.iMusicChannel = null;
};
}
public static function get SoundVolume():Number{
return (_slot1.iSoundVolume);
}
public static function PlayListClear():void{
_slot1.iMusicPlayList = new Array();
}
public static function PlayListAdd(_arg1:String):void{
_slot1.iMusicPlayList.push(_arg1);
_slot1.iMusicInd = (_slot1.iMusicPlayList.length - 1);
}
public static function PlayMusic():void{
if ((((_slot1.iMusicVolume == 0)) || (!(_slot1.iMusicPlayList.length)))){
return;
};
_slot1.StopMusic();
_slot1.iMusicInd = ((_slot1.iMusicInd + 1) % _slot1.iMusicPlayList.length);
var request:URLRequest = new URLRequest(_slot1.iMusicPlayList[_slot1.iMusicInd]);
_slot1.RemoveMusic();
_slot1.iMusic = new Sound();
_slot1.iMusic.addEventListener(Event.COMPLETE, _slot1.OnMusicLoadComplete, false, 0, true);
_slot1.iMusic.addEventListener(IOErrorEvent.IO_ERROR, _slot1.OnMusicLoadIOError, false, 0, true);
try {
_slot1.iMusic.load(request);
} catch(e:Error) {
};
}
public static function set Mute(_arg1:Boolean):void{
_slot1.setGlobalVolume((_arg1) ? 0 : 1);
}
private static function SetMuteOff():void{
_slot1.Mute = false;
}
public static function get Mute():Boolean{
return ((SoundMixer.soundTransform.volume == 0));
}
public static function RegisterEmbedSounds(_arg1:Array):Boolean{
var s:Sound;
var aP = _arg1;
_slot1.iSoundsObjects = aP;
var i:int;
while (i < aP.length) {
s = (new (aP[i]) as Sound);
_slot1.iSounds[aP[i]] = s;
i = (i + 1);
};
if (ExternalInterface.available){
try {
trace("Adding callback...\n");
ExternalInterface.addCallback("SetMuteOn", _slot1.SetMuteOn);
ExternalInterface.addCallback("SetMuteOff", _slot1.SetMuteOff);
} catch(error:SecurityError) {
trace((("A SecurityError occurred: " + error.message) + "\n"));
} catch(error:Error) {
trace((("An Error occurred: " + error.message) + "\n"));
};
};
return (true);
}
public static function set MusicVolume(_arg1:Number):void{
var _local2:SoundTransform;
_slot1.iMusicVolume = _arg1;
if (_slot1.iMusicChannel){
if (_arg1 == 0){
_slot1.StopMusic();
} else {
_local2 = _slot1.iMusicChannel.soundTransform;
_local2.volume = _arg1;
_slot1.iMusicChannel.soundTransform = _local2;
};
} else {
if (_slot1.iMusicVolume > 0){
_slot1.PlayMusic();
};
};
}
public static function get MusicVolume():Number{
return (_slot1.iMusicVolume);
}
}
}//package ENGINE.CORE
Section 9
//OSystem (ENGINE.CORE.OSystem)
package ENGINE.CORE {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
import flash.text.*;
public class OSystem extends Sprite {
private var iSTimer:String;
private var iLastTime:int;
private var iCount:int;
private var iText:TextField;
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 = System.totalMemory;
var _local3:int = (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 10
//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 = "";
var _local4:int = _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 _local7:Rectangle;
var _local6:Number = Math.round((1 + (_arg2 / 70)));
var _local8:String = ((_arg4)==null) ? "" : ((" (" + _arg4) + ")");
var _local9:String = (_arg3 + _local8);
_local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9);
if (_local7.width <= _arg5){
return (_local9);
};
_local8 = ("..." + _local8);
var _local10:int = (_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 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ";
var _local3 = "";
var _local4:int;
while (_local4 < _arg1.length) {
if (_local2.indexOf(_arg1.charAt(_local4)) > -1){
_local3 = (_local3 + _arg1.charAt(_local4));
};
_local4++;
};
return (_local3);
}
}
}//package ENGINE.CORE
Section 11
//OEffect (ENGINE.DISPLAY.EFFECTS.OEffect)
package ENGINE.DISPLAY.EFFECTS {
import ENGINE.DISPLAY.*;
import ENGINE.CORE.*;
import flash.filters.*;
public class OEffect {
protected var iFilters:OCache;
protected var iColors: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 12
//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 = 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 = 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 = 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 = 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 13
//IDisplayObject (ENGINE.DISPLAY.IDisplayObject)
package ENGINE.DISPLAY {
public interface IDisplayObject {
function get prVisible():Boolean;
function Move(_arg1:Number, _arg2:Number):void;
function get prWidth():Number;
function get prX():Number;
function get prY():Number;
function get prHeight():Number;
function Pos(_arg1:Number, _arg2:Number):void;
function set prX(_arg1:Number):void;
function set prY(_arg1:Number):void;
function set prVisible(_arg1:Boolean):void;
}
}//package ENGINE.DISPLAY
Section 14
//OBitmap (ENGINE.DISPLAY.OBitmap)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
import flash.text.*;
import ENGINE.DISPLAY.EFFECTS.*;
public class OBitmap extends Bitmap implements IDisplayObject {
protected var iX:Number;// = 0
protected var iOBM:OBM;// = null
protected var iY:Number;// = 0
public function OBitmap(_arg1:OBM=null, _arg2:Number=0, _arg3:Number=0){
this.iX = _arg2;
this.iY = _arg3;
Init(_arg1);
}
public function CopyFrom(_arg1:OBitmap):void{
this.iX = _arg1.iX;
this.iY = _arg1.iY;
this.Init(_arg1.iOBM);
}
public function get prHeight():Number{
return ((this.iOBM) ? (this.iOBM.iHeight / OGlobal.Scale) : 0);
}
public function get prX():Number{
return (this.iX);
}
public function get prOBM():OBM{
return (this.iOBM);
}
public function get prWidth():Number{
return ((this.iOBM) ? (this.iOBM.iWidth / OGlobal.Scale) : 0);
}
public function set prVisible(_arg1:Boolean):void{
this.visible = _arg1;
}
public function get prVisible():Boolean{
return (this.visible);
}
public function Clear():void{
this.Init(null);
}
public function set prY(_arg1:Number):void{
this.iY = _arg1;
Pos(this.iX, this.iY);
}
public function set prOBM(_arg1:OBM):void{
this.Init(_arg1);
}
public function Move(_arg1:Number, _arg2:Number):void{
Pos((this.iX + _arg1), (this.iY + _arg2));
}
public function set prX(_arg1:Number):void{
this.iX = _arg1;
Pos(this.iX, this.iY);
}
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 Init(_arg1:OBM):void{
this.iOBM = _arg1;
this.bitmapData = (_arg1) ? _arg1.iBM : null;
this.Pos(this.iX, this.iY);
}
public function get prY():Number{
return (this.iY);
}
public function Clone():OBitmap{
return (new OBitmap(this.iOBM.Clone(), this.iX, this.iY));
}
public static function MakeEffectFromListP(_arg1:Array):OBitmap{
var _local2:Sprite = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
var _local3:Sprite = (_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 _local6:TextField;
var _local7:TextFormat;
var _local2:Sprite = ((_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);
};
var _local3:Rectangle = _local2.getBounds(_local2);
var _local4:Number = ((_arg1[9] - _local3.width) / 2);
var _local5:Number = ((_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 _local3:TextField;
var _local4:TextFormat;
var _local2:Sprite = ((_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 = 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 = Math.min(_arg1[7], _arg1[8]);
var _local3:Sprite = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
var _local4:Rectangle = _local3.getBounds(_local3);
var _local5:Number = Math.max(_local4.width, _local4.height);
var _local6:Number = ((_local2 / _local5) * _arg1[2]);
var _local7:Number = ((_arg1[7] - (_local4.width * _local6)) / 2);
var _local8:Number = ((_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 = 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 = 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 = OEffects.Apply(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
return (new OBitmap(_local9, _arg7, _arg8));
}
}
}//package ENGINE.DISPLAY
Section 15
//OBM (ENGINE.DISPLAY.OBM)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBM {
public var iHeight:Number;
public var iBM:BitmapData;
public var iY:Number;
public var iWidth:Number;
public var iX: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 = 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 = new Sprite();
var _local3:Sprite = _arg1[1][0](_arg1[1]);
var _local4:Number = (OGlobal.Scale * _arg1[2]);
var _local5:Number = OGlobal.ToGlobal(_arg1[4]);
var _local6:Number = 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);
var _local7:Rectangle = _local3.getBounds(_local2);
_local2.removeChild(_local3);
var _local8:Sprite = 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);
var _local9:int = ((_local7.width + 4) + (_arg1[6] * 2));
var _local10:int = ((_local7.height + 4) + (_arg1[6] * 2));
var _local11:Number = Math.floor(_local7.x);
var _local12:Number = Math.floor(_local7.y);
var _local13:BitmapData = new BitmapData(_local9, _local10, true, 0);
var _local14:Matrix = 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 = new Sprite();
var _local3:Sprite = _arg1[1][0](_arg1[1]);
var _local4:Number = (OGlobal.Scale * _arg1[2]);
var _local5:Number = OGlobal.ToGlobal(_arg1[3]);
var _local6:Number = 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);
var _local7:Rectangle = _local3.getBounds(_local2);
var _local8:int = ((_local7.width + 4) + (_arg1[5] * 2));
var _local9:int = ((_local7.height + 4) + (_arg1[5] * 2));
var _local10:Number = Math.floor(_local7.x);
var _local11:Number = Math.floor(_local7.y);
var _local12:BitmapData = new BitmapData(_local8, _local9, true, 0);
var _local13:Matrix = 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 16
//ODisplay (ENGINE.DISPLAY.ODisplay)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
import flash.text.*;
import ENGINE.DISPLAY.EFFECTS.*;
public class ODisplay {
public static function SpriteErase(_arg1:Array):Sprite{
var _local2:Sprite = new Sprite();
var _local3:Sprite = new Sprite();
_local3.blendMode = BlendMode.LAYER;
var _local4:Sprite = _arg1[1][0](_arg1[1]);
var _local5:Sprite = _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 = new Sprite();
var _local3:Sprite = _arg1[1][0](_arg1[1]);
_local2.addChild(_local3);
var _local4:Rectangle = _local3.getBounds(_local2);
var _local5:Number = (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 _local6:TextField;
var _local7:TextFormat;
var _local5:Sprite = ((_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 = HSBToRGB(_arg1, _arg2, _arg3);
var _local6:uint = (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 _local6:OBM;
var _local7:Matrix;
var _local2:OBM = OEffects.Make(_arg1[1][0]);
var _local3:Number = (_local2.iX + (_arg1[1][0][7] * OGlobal.Scale));
var _local4:Number = (_local2.iY + (_arg1[1][0][8] * OGlobal.Scale));
var _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 = ((_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 = 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 = _arg1[1][0](_arg1[1]);
_local2.scaleX = _arg1[2];
_local2.scaleY = _arg1[2];
return (_local2);
}
public static function IDisplayObjectMake(_arg1:Array){
var _local2:IDisplayObject = _arg1[1][0](_arg1[1]);
_local2.Pos(_arg1[2], _arg1[3]);
return (_local2);
}
public static function SpriteAlign(_arg1:Array):Sprite{
var _local2:Sprite = new Sprite();
var _local3:Sprite = _arg1[1][0](_arg1[1]);
_local3.scaleX = _arg1[2];
_local3.scaleY = _arg1[2];
_local2.addChild(_local3);
var _local4:Rectangle = _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 = 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 = 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 = 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 = new Sprite();
var _local3:Sprite = _arg1[1][0](_arg1[1]);
_local3.scaleX = _arg1[2];
_local3.scaleY = _arg1[2];
_local2.addChild(_local3);
var _local4:Rectangle = _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 = _arg1[1][0](_arg1[1]);
var _local3:Number = (_arg1[4] * _arg1[2]);
var _local4:Number = (_arg1[5] * _arg1[2]);
var _local5:Matrix = new Matrix();
_local5.scale(_arg1[2], _arg1[2]);
_local5.translate(-(_local3), -(_local4));
_local5.rotate(((Math.PI / 180) * _arg1[3]));
var _local6:Matrix = new Matrix();
_local6.translate(_local3, _local4);
_local5.concat(_local6);
var _local7:Sprite = 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 _local3:TextField;
var _local4:TextFormat;
var _local2:Sprite = ((_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 = 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 = 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 = 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]);
var _local3:Number = (_arg1[1] - (_arg1[4] * 2));
var _local4:Number = (_arg1[2] - (_arg1[4] * 2));
var _local5:Number = ((_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 17
//OSprite (ENGINE.DISPLAY.OSprite)
package ENGINE.DISPLAY {
import flash.display.*;
import ENGINE.CORE.*;
public class OSprite extends Sprite implements IDisplayObject {
private var iX:Number;// = 0
private var iY:Number;// = 0
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 prHeight():Number{
return ((this.height / OGlobal.Scale));
}
public function Free():void{
var _local1:DisplayObject;
while (this.numChildren) {
_local1 = this.getChildAt(0);
if ((_local1 is OSprite)){
(_local1 as OSprite).Free();
};
this.removeChildAt(0);
};
}
public function get prX():Number{
return (this.iX);
}
public function get prVisible():Boolean{
return (this.visible);
}
public function get prWidth():Number{
return ((this.width / OGlobal.Scale));
}
public function set prY(_arg1:Number):void{
this.iY = _arg1;
this.y = (_arg1 * OGlobal.Scale);
}
public function set prVisible(_arg1:Boolean):void{
this.visible = _arg1;
}
public function set prX(_arg1:Number):void{
this.iX = _arg1;
this.x = (_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 Move(_arg1:Number, _arg2:Number):void{
Pos((this.iX + _arg1), (this.iY + _arg2));
}
public function get prY():Number{
return (this.iY);
}
public function lineTo(_arg1:Number, _arg2:Number):void{
this.graphics.lineTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale));
}
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 static function Make(_arg1:Array):OSprite{
var _local2:OSprite = new (OSprite);
var _local3:int = _arg1[1].length;
var _local4:int;
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 18
//OGame (ENGINE.GAME.OGame)
package ENGINE.GAME {
import ENGINE.INTERFACE.*;
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;
private var iID_funcSaveCache:int;// = -1
protected var iScores:OScoresTable;
public static const catTmp:String = "Tmp";
protected static const strgCurPlayer:String = "Current Player";
protected static const strgResX:String = "ResX";
protected static const strgResY:String = "ResY";
protected static const strgMusicVolume:String = "Music Volume";
protected static const strgFullScreen:String = "Full Screen";
protected static const strgSoundVolume:String = "Sound Volume";
private static const TIME_SAVE_CACHE:int = 2000;
public static const catGlobal:String = "Global";
public static const catPlayers:String = "Players";
protected static const strgLocalScores:String = "Local Scores";
public function OGame(_arg1:int=1, _arg2:int=10, _arg3:int=10){
this.iModes = _arg1;
this.iSTableSize = _arg2;
registerClassAlias("OCacheClass", OCache);
registerClassAlias("OGameParamsClass", OGameParams);
registerClassAlias("OScoreParamsClass", OScoreParams);
registerClassAlias("OScoresTableClass", OScoresTable);
registerClassAlias("OPlayerClass", OPlayer);
this.LoadCache();
var _local4:String = this.iCache.GetCategoryItem(catGlobal, strgCurPlayer);
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, 0.6);
this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, 0.3);
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;
this.LoadGlobalCache();
}
public function set prFullScreen(_arg1:Boolean):void{
this.iCache.SetCategoryItem(catGlobal, strgFullScreen, _arg1);
}
public function GetPersonalRecord(_arg1:int):int{
return (this.iPlayer.iScoreTable.GetRecord(_arg1));
}
public function set prPassword(_arg1:String):void{
this.iPlayer.iPassword = _arg1;
this.SaveCacheTimeOut();
}
public function DeletePlayer(_arg1:String):String{
var _local3:Array;
var _local2:String = (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, strgCurPlayer, _local3[0]);
};
return ((this.iPlayer) ? this.iPlayer.iName : null);
}
public function get prLevelScore():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore);
}
public function set prMode(_arg1:int):void{
this.iPlayer.iMode = _arg1;
this.SaveCacheTimeOut();
}
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++;
this.SaveCacheTimeOut();
}
public function get prGamesStartCount():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart);
}
public function get prPlayerNames():Array{
return (this.iCache.GetCategoryNames(catPlayers));
}
public function ClearPersonalScores(_arg1:int):void{
this.iPlayer.iScoreTable.Clear(_arg1);
this.SaveCacheTimeOut();
}
public function InitAfterLoadCache():void{
trace(("#ENGINE# Init AfterLoad Cache: " + this.prPlayerName));
}
public function AddScore(_arg1:int):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iScore = (this.iPlayer.iGParams[this.iPlayer.iMode].iScore + _arg1);
this.SaveCacheTimeOut();
}
public function get prPlayersData(){
var _local1:OCache = this.iCache.GetItem(catPlayers);
var _local2:ByteArray = _local1.Pack();
_local2.compress();
_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(e:Error) {
if (e.errorID == 2058){
a = so.data.iData;
this.iCache = a.readObject();
if (this.iCache == null){
this.iCache = new OCache();
};
} else {
this.iCache = new OCache();
};
};
};
so.close();
}
public function get prLevel():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevel);
}
private function SaveCacheTimeOut():void{
if (this.iID_funcSaveCache != -1){
return;
};
this.iID_funcSaveCache = setTimeout(this.CallSaveCache, TIME_SAVE_CACHE);
}
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++;
this.SaveCacheTimeOut();
return (true);
}
public function set prPlayersData(_arg1):void{
this.iCache.SetItem(catPlayers, _arg1);
}
public function set prResY(_arg1:int):void{
this.iCache.SetCategoryItem(catGlobal, strgResY, _arg1);
}
public function get prSavedGame():String{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame);
}
public function LoadGlobalCache():void{
var bMute:Boolean;
var sName:String;
var so:SharedObject = SharedObject.getLocal("WellGames", "/");
if (so.data.hasOwnProperty("mute") == true){
try {
bMute = so.data.mute;
OSound.Mute = bMute;
} catch(e:Error) {
trace(("#ENGINE# Error -> LoadGlobalCache -> " + e.message));
};
};
if ((((this.prPlayerName == "")) && ((so.data.hasOwnProperty("prPlayerName") == true)))){
try {
sName = so.data.prPlayerName;
if (sName.length > 0){
this.prPlayerName = sName;
};
} catch(e:Error) {
trace(("#ENGINE# Error -> LoadGlobalCache -> " + e.message));
};
};
so.close();
}
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);
this.SaveCacheTimeOut();
}
private function SaveGlobalCache():void{
var so:SharedObject;
try {
so = SharedObject.getLocal("Wellgames", "/");
so.data.mute = OApplication.sInstance.GetMute();
so.data.prPlayerName = this.prPlayerName;
so.flush();
so.close();
} catch(e:Error) {
trace(("#ENGINE# OGame.SaveGlobalMute -> Error -> " + e.message));
};
}
public function get prPassword():String{
return ((this.iPlayer.iPassword) ? this.iPlayer.iPassword : "");
}
public function get prMode():int{
return (this.iPlayer.iMode);
}
public function Start():void{
this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++;
}
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);
this.SaveCacheTimeOut();
}
public function SetLevelScore(_arg1:int):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = _arg1;
this.SaveCacheTimeOut();
}
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;
if (this.iScores.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel)){
this.iCache.SetCategoryItem(_slot1.catGlobal, _slot1.strgLocalScores, this.iScores);
_local2 = true;
};
if (this.iPlayer.iScoreTable.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel, true)){
this.iCache.SetCategoryItem(_slot1.catPlayers, this.prPlayerName, this.iPlayer);
_local2 = true;
};
this.SaveCacheTimeOut();
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 = 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, strgCurPlayer, _arg1);
this.SaveCacheTimeOut();
}
private function CallSaveCache():void{
this.iID_funcSaveCache = -1;
this.SaveCache();
}
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 fs:String;
var so:SharedObject;
try {
so = SharedObject.getLocal(OGlobal.AppName, "/");
so.data.iData = this.iCache.Pack();
fs = so.flush();
so.close();
this.SaveGlobalCache();
} catch(e:Error) {
trace(("#ENGINE# OGame.SaveCache -> Error -> " + e.message));
return (false);
};
return ((fs == SharedObjectFlushStatus.FLUSHED));
}
public function Read(_arg1:String, _arg2:String){
return (this.iCache.GetCategoryItem(_arg1, _arg2));
}
public function SetSaveGame(_arg1:String):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = _arg1;
this.SaveCacheTimeOut();
}
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);
this.SaveCacheTimeOut();
}
public function get prFullScreen():Boolean{
return (this.iCache.GetCategoryItem(catGlobal, strgFullScreen));
}
public function ClearLocalScores(_arg1:int):void{
this.iScores.Clear(_arg1);
this.SaveCacheTimeOut();
}
}
}//package ENGINE.GAME
Section 19
//OGameParams (ENGINE.GAME.OGameParams)
package ENGINE.GAME {
public class OGameParams {
public var iLevel:int;
public var iScore:int;
public var iSavedGame:String;
public var iExtended:Object;
public var iCGamesEnd:int;
public var iLevelScore:int;
public var iCGamesStart:int;
}
}//package ENGINE.GAME
Section 20
//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 var iLang:String;
public function OPlayer(_arg1:String=null, _arg2:String=null, _arg3:int=1, _arg4:int=10, _arg5:int=10, _arg6:String="en"){
this.iName = _arg1;
this.iPassword = _arg2;
this.iLang = _arg6;
this.iGParams = new Array(_arg3);
this.iRNDFactor = Math.round((Math.random() * (_arg5 - 1)));
var _local7:int;
while (_local7 < _arg3) {
this.iGParams[_local7] = new OGameParams();
_local7++;
};
this.iScoreTable = new OScoresTable(_arg3, _arg4);
}
}
}//package ENGINE.GAME
Section 21
//OScoreParams (ENGINE.GAME.OScoreParams)
package ENGINE.GAME {
public class OScoreParams {
public var iName:String;
public var iScore:int;
public var iLevel:int;
public var iTime:Number;
public function OScoreParams(_arg1:String=null, _arg2:int=0, _arg3:int=0){
this.iName = _arg1;
this.iScore = _arg2;
var _local4:Date = new Date();
this.iTime = _local4.time;
}
}
}//package ENGINE.GAME
Section 22
//OScoresTable (ENGINE.GAME.OScoresTable)
package ENGINE.GAME {
public class OScoresTable {
public var iMaxElements:int;
public var iTable:Array;
public function OScoresTable(_arg1:int=1, _arg2:int=10){
this.iMaxElements = _arg2;
this.iTable = new Array();
var _local3:int;
while (_local3 < _arg1) {
this.iTable[_local3] = new Array();
_local3++;
};
}
public function AddScore(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean=false):Boolean{
var _local7:int;
var _local6:Array = 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 GetRecord(_arg1:int):int{
if (!this.iTable[_arg1].length){
return (0);
};
return (this.iTable[_arg1][0].iScore);
}
public function FindByName(_arg1:int, _arg2:String):int{
var _local3:int;
while (_local3 < this.iTable[_arg1].length) {
if (this.iTable[_arg1][_local3].iName == _arg2){
return (_local3);
};
_local3++;
};
return (-1);
}
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 Clear(_arg1:int):void{
this.iTable[_arg1] = new Array();
}
public function SortOn(_arg1:int):void{
this.iTable[_arg1] = this.iTable[_arg1].sortOn("iScore", (Array.DESCENDING | Array.NUMERIC));
}
}
}//package ENGINE.GAME
Section 23
//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;
private var iEndAlpha:Number;
public var iSAlpha: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 = ((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 = (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 24
//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 iStartAlpha:Array;
private var iCurAlpha:Number;
private var iEndAlpha:Array;
private var iDAlpha:Array;
public var iSAlpha:Number;
public var iSInd:Array;
public var iPIter:int;
public function OA_AlphaFade(_arg1:Object, _arg2:OIObject=null){
super(_arg1, _arg2);
}
override protected function Start():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);
};
var _local1:int = this.iSInd.length;
this.iStartAlpha = new Array(_local1);
this.iEndAlpha = new Array(_local1);
this.iDAlpha = new Array(_local1);
var _local2:int;
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 _local4:int;
this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]);
var _local3:int = 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 25
//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 iDAlpha:Array;
private var iCurAlpha:Number;
private var iEndAlpha:Array;
public var iSAlpha:Number;
public var iInd:Array;
public var iPIter:int;
public function OA_AlphaInd(_arg1:Object, _arg2:OIObject=null){
super(_arg1, _arg2);
}
override protected function Start():int{
var _local3:DisplayObject;
var _local4:Number;
if (((!(this.iInd)) || ((this.iInd.length == 0)))){
return (stEnd);
};
var _local1:int = this.iInd.length;
this.iEndAlpha = new Array(_local1);
this.iDAlpha = new Array(_local1);
var _local2:int;
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 _local2:int;
var _local3:DisplayObject;
this.iCurAlpha = (this.iCurAlpha + this.iDAlpha[0]);
var _local1:int = 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 26
//OA_Scale (ENGINE.INTERFACE.ANIMATORS.OA_Scale)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OA_Scale extends OAnimator {
public var iSScale:Number;
public var iEScale:Number;
private var iDScale:Number;
private var iEndScale: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 = ((this.iSScale)>=0) ? this.iSScale : this.iTarget.scaleX;
this.iEndScale = ((this.iEScale)>=0) ? this.iEScale : this.iTarget.scaleX;
this.iDScale = ((this.iEndScale - _local1) / iPIter);
var _local2:Number = this.iTarget.prWidth;
var _local3:Number = 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 = this.iTarget.prWidth;
var _local2:Number = this.iTarget.prHeight;
var _local3:Number = (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 27
//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 get State():int{
return (this.iState);
}
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 set prTarget(_arg1:OIObject):void{
this.iTarget = _arg1;
}
public function Return():int{
return (stPlay);
}
protected function Start():int{
return (stPlay);
}
public function OnEnterFrame():void{
if (this.iState == stPlay){
Play();
};
}
public function Play():void{
this.State = stEnd;
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 28
//OAnimatorManager (ENGINE.INTERFACE.ANIMATORS.OAnimatorManager)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OAnimatorManager {
private var iTarget:OIObject;
private var iPlaying:Array;
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{
if (_arg1 == null){
return;
};
if (this.iPlaying.length > 0){
this.iPlaying[0].Return();
};
var _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 29
//OHtmlTextField (ENGINE.INTERFACE.ELEMENTS.OHtmlTextField)
package ENGINE.INTERFACE.ELEMENTS {
import ENGINE.DISPLAY.*;
import flash.display.*;
import ENGINE.CORE.*;
import flash.text.*;
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 _local13:Sprite;
super();
var _local12:Number = (_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 prFormat(_arg1:TextFormat):void{
this.iTextFormat = _arg1;
this.defaultTextFormat = _arg1;
this.setTextFormat(this.iTextFormat);
}
public function get prFormat():TextFormat{
return (this.iTextFormat);
}
public function set prText(_arg1:String):void{
this.htmlText = _arg1;
}
public function get prText():String{
return (this.htmlText);
}
}
}//package ENGINE.INTERFACE.ELEMENTS
Section 30
//OInputTextField (ENGINE.INTERFACE.ELEMENTS.OInputTextField)
package ENGINE.INTERFACE.ELEMENTS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.CORE.*;
import flash.text.*;
public class OInputTextField extends TextField {
private var iTextFormat:TextFormat;
public function OInputTextField(_arg1:Number, _arg2:Number, _arg3, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Array, _arg8:String, _arg9:int, _arg10:Number, _arg11:Number){
var _local12:Number = OGlobal.Scale;
this.type = TextFieldType.INPUT;
this.autoSize = TextFieldAutoSize.NONE;
this.embedFonts = true;
var _local13:Sprite = ((_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 prFormat(_arg1:TextFormat):void{
this.iTextFormat = _arg1;
this.defaultTextFormat = _arg1;
this.setTextFormat(this.iTextFormat);
}
protected function OnFocusIn(_arg1:FocusEvent):void{
this.setTextFormat(this.iTextFormat);
}
public function get prFormat():TextFormat{
return (this.iTextFormat);
}
public function set prText(_arg1:String):void{
this.text = (((!(_arg1)) || ((_arg1 == "")))) ? " " : _arg1;
}
public function get prText():String{
var _local1:String = this.text;
while (_local1.charAt() == " ") {
_local1 = _local1.substr(1);
};
while (_local1.charAt((_local1.length - 1)) == " ") {
_local1 = _local1.substr(0, (_local1.length - 1));
};
return (_local1);
}
}
}//package ENGINE.INTERFACE.ELEMENTS
Section 31
//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 = (_arg2) ? _arg2 : iDefAnimators;
super(_arg1, _local3);
}
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);
}
override public function OnMouseUp(_arg1:MouseEvent):void{
}
override public function OnRollOut(_arg1:MouseEvent):void{
this.prRool = false;
}
}
}//package ENGINE.INTERFACE.ELEMENTS
Section 32
//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){
this.iMessages = _arg2;
var _local4:Array = (_arg3) ? _arg3 : ODialog.iDefAnimators;
super(_arg1, _local4);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (((!(this.iMessages)) || (!(this.iButtons)))){
this.prVisible = false;
return;
};
var _local3:int;
var _local4:int;
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]);
} else {
OApplication.sInstance.prMenuItem = iMessages[_local4];
};
this.prVisible = false;
return;
};
_local4++;
};
}
override public function Init():void{
this.iButtons = new Array();
super.Init();
}
override public function Free():void{
this.iButtons = null;
super.Free();
}
}
}//package ENGINE.INTERFACE
Section 33
//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:DisplayObject;
private var iLastMute:Boolean;// = false
protected var iMenuItem:Array;
private var iMuteFocus:Boolean;// = false
public static var sInstance:OApplication;
public function OApplication(_arg1:String){
OApplication.sInstance = this;
OGlobal.AppName = _arg1;
if (this.stage){
OGlobal.SetDomain();
this.InitStage();
};
super(null);
if (!this.iStaged){
this.addEventListener(Event.ENTER_FRAME, NotStagedEnterFrame);
};
}
protected function OnDeactivate(_arg1:Event):void{
this.SoundOffFocus(true);
}
override public function Free():void{
OGlobal.prStage.removeEventListener(Event.DEACTIVATE, OnDeactivate);
OGlobal.prStage.removeEventListener(Event.ACTIVATE, OnActivate);
OGlobal.prStage.removeEventListener(Event.RESIZE, OnResize);
this.iMenuItem = null;
super.Free();
}
public function InitBackground(_arg1:Array, _arg2:int=0, _arg3:Boolean=true):void{
if (this.iBackground != null){
if (this.iBackground.parent != null){
this.iBackground.parent.removeChild(this.iBackground);
};
this.iBackground = null;
};
if (_arg3 == true){
this.iBackground = new OBackground(_arg1, _arg2);
} else {
this.iBackground = new (_arg1[_arg2]);
this.iBackground.width = (800 * OGlobal.Scale);
this.iBackground.height = (600 * OGlobal.Scale);
};
this.addChildAt(this.iBackground, 0);
}
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;
};
}
private function SoundOffFocus(_arg1:Boolean):void{
if (_arg1 == this.iMuteFocus){
return;
};
this.iMuteFocus = _arg1;
if (this.iMuteFocus == true){
this.iLastMute = OSound.Mute;
OSound.Mute = true;
} else {
OSound.Mute = this.iLastMute;
};
}
public function set prMenuItem(_arg1:int):void{
this.iMenuItem.push(_arg1);
}
protected function OnMenuItem():void{
}
protected function OnActivate(_arg1:Event):void{
this.SoundOffFocus(false);
}
public function get prMenuItem():int{
return ((this.iMenuItem.length) ? this.iMenuItem.pop() : -1);
}
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);
OGlobal.prStage.addEventListener(Event.ACTIVATE, this.OnActivate);
}
public function OnResize(_arg1:Event):void{
this.Free();
this.InitStage();
this.Init();
}
public function GetMute():Boolean{
if (this.iMuteFocus == true){
return (this.iLastMute);
};
return (OSound.Mute);
}
override public function Init():void{
if (!this.stage){
return;
};
super.Init();
this.iMenuItem = new Array();
this.iStaged = true;
this.visible = true;
}
}
}//package ENGINE.INTERFACE
Section 34
//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){
this.iImages = _arg1;
this.prIInd = _arg2;
}
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 Make():void{
var _local1:Sprite;
var _local2:BitmapData;
var _local3:OBM;
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);
var _local4:Rectangle = OGlobal.ViewporRect;
var _local5:Rectangle = OGlobal.StageRect;
this.x = -(_local4.x);
this.y = -(_local4.y);
var _local6:int = Math.floor((_local5.width / _local1.width));
if (_local6 == 0){
return;
};
var _local7:int = 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++;
};
var _local8:Number = OGlobal.Scale;
var _local9:int;
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++;
};
}
public function get prIInd():int{
return (this.iIInd);
}
override public function Free():void{
super.Free();
}
}
}//package ENGINE.INTERFACE
Section 35
//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 = ((_arg2)==null) ? OButton.iDefAnimators : _arg2;
super(_arg1, _local3);
}
override public function OnRollOver(_arg1:MouseEvent):void{
this.prRool = true;
}
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 Init():void{
this.useHandCursor = true;
this.buttonMode = true;
super.Init();
if (this.iHit){
this.iHit.visible = false;
this.hitArea = this.iHit;
};
}
override public function OnMouseDown(_arg1:MouseEvent):void{
this.prPress = true;
if ((this.parent is OIObject)){
(this.parent as OIObject).OnPress(_arg1, this);
};
}
override public function Free():void{
this.iHit = null;
super.Free();
}
}
}//package ENGINE.INTERFACE
Section 36
//OCounter (ENGINE.INTERFACE.OCounter)
package ENGINE.INTERFACE {
import ENGINE.INTERFACE.ANIMATORS.*;
public class OCounter extends OIObject {
public var iDigits0:Array;
protected var iValue0:int;
protected var iValue:int;
public var iDigits:Array;
protected var iHeight:Number;
public var iSeparator:OIObject;
protected var iWidth: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){
this.iWidth = _arg2;
this.iHeight = _arg3;
var _local5:Array = (_arg4) ? _arg4 : iDefAnimators;
super(_arg1, _local5);
}
private function Draw():void{
var _local4:int;
var _local6:int;
var _local1:Number = 0;
var _local2:String = this.iValue0.toString();
var _local3:String = 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++;
};
};
var _local5:Number = ((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 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();
}
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();
}
override public function Free():void{
this.iDigits = null;
this.iDigits0 = null;
this.iSeparator = null;
super.Free();
}
override public function Init():void{
this.iDigits = new Array();
this.iDigits0 = new Array();
super.Init();
}
public function get prValue():int{
return (this.iValue);
}
public function get prValue0():int{
return (this.iValue0);
}
}
}//package ENGINE.INTERFACE
Section 37
//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 = (_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 38
//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 = ((_arg2)==null) ? _slot1.iDefAnimators : _arg2;
super(_arg1, _local3);
}
override public function Init():void{
super.Init();
this.addEventListener(KeyboardEvent.KEY_UP, OnKeyUp);
}
protected function OnKeyUp(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 13)) && ((this.parent is OWindow)))){
(this.parent as OWindow).OnPress(null, this);
};
}
public function set prText(_arg1:String):void{
this.iText.prText = _arg1;
}
public function get prText():String{
return (this.iText.prText);
}
}
}//package ENGINE.INTERFACE
Section 39
//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 = 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 40
//OIObject (ENGINE.INTERFACE.OIObject)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
public class OIObject extends OSprite {
protected var iTrigger:uint;
protected var iAManager:OAnimatorManager;
protected var iParam:Array;
protected var iAParams:Array;
protected var iAEnabled:Boolean;// = true
protected var iState:int;
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);
super();
this.iParam = _arg1;
this.iAParams = _arg2;
this.Init();
}
public function OnMouseDown(_arg1:MouseEvent):void{
this.prPress = true;
}
public function PosCenter(_arg1:Number=800, _arg2:Number=600):void{
var _local3:Rectangle = 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 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 get prRool():Boolean{
return (((this.iTrigger & trRool) > 0));
}
public function OnPress(_arg1:Event, _arg2):void{
}
public function set prAnimationEnabled(_arg1:Boolean):void{
this.iAEnabled = _arg1;
}
public function SetVisible(_arg1:Boolean):void{
this.prAnimationEnabled = false;
this.prVisible = _arg1;
this.prAnimationEnabled = true;
}
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 OnEnterFrame(_arg1:Event):void{
if (this.iAManager){
this.iAManager.OnEnterFrame();
};
}
override public function get prVisible():Boolean{
return (((this.iTrigger & trVisible) > 0));
}
public function OnRollOut(_arg1:MouseEvent):void{
this.prRool = false;
}
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 set prAnimatorParams(_arg1:Array):void{
this.iAParams = _arg1;
if (!this.iAManager){
this.iAManager = new OAnimatorManager(this);
};
}
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 get prPress():Boolean{
return (((this.iTrigger & trPress) > 0));
}
public function set State(_arg1:int):void{
this.iState = _arg1;
}
public function get prActive():Boolean{
return (((this.iTrigger & trActive) > 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]);
};
};
}
public function get prAnimatorParams():Array{
return (this.iAParams);
}
public function OnMouseUp(_arg1:MouseEvent):void{
this.prPress = false;
}
public function get State():int{
return (this.iState);
}
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 AddAnimator(_arg1:Object, _arg2:Boolean=true):void{
var _local3:Boolean = (_arg2) ? ((((this.iAManager) && (this.prVisible))) && (this.iAEnabled)) : ((this.iAManager) && (this.iAEnabled));
if (_local3){
this.iAManager.AddAnimator(_arg1);
};
}
public function get prFocus():Boolean{
return (((this.iTrigger & trFocus) > 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]);
};
};
}
public function get prAnimation():Boolean{
if (((this.iAManager) && (this.iAManager.prAnimation))){
return (true);
};
var _local1:int;
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 OnRollOver(_arg1:MouseEvent):void{
this.prRool = true;
}
public function get prMouseEnabled():Boolean{
return (((this.prVisible) && (this.prActive)));
}
public function get prAnimationEnabled():Boolean{
return (this.iAEnabled);
}
}
}//package ENGINE.INTERFACE
Section 41
//OListBox (ENGINE.INTERFACE.OListBox)
package ENGINE.INTERFACE {
import flash.events.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.INTERFACE.ELEMENTS.*;
public class OListBox extends OIObject {
private var iLBParams:Array;
private var iEShowInd:int;
private var iElements:Array;
private var iECoord:Array;
private var iECurInd:int;
private var iEGenP:Function;
private var iPageScrool:Boolean;
private var iSelection:Boolean;// = true
public var iUp:OButton;
public var iDown:OButton;
private var iECount:int;
private var iCycling:Boolean;
private var iEGen:Array;
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 = (_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 get prCycling():Boolean{
return (this.iCycling);
}
public function get prPageScrool():Boolean{
return (this.iPageScrool);
}
public function set prCycling(_arg1:Boolean):void{
this.iCycling = _arg1;
InitElements();
}
protected function InitElements():void{
var _local4:Boolean;
this.FreeElements();
if (this.iLBParams == null){
return;
};
var _local1:int;
var _local2:int = (((this.iEShowInd + this.iECount) <= this.iLBParams.length)) ? (this.iEShowInd + this.iECount) : this.iLBParams.length;
var _local3:int = 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 get prCurrentLBParam(){
return ((this.iLBParams) ? this.iLBParams[this.iECurInd] : null);
}
public function set prCurrentInd(_arg1:int):void{
if (!this.iLBParams){
return;
};
this.SetCurrentElement(this.iLBParams[_arg1]);
}
override public function Free():void{
this.iUp = null;
this.iDown = null;
this.iElements = null;
super.Free();
}
public function set prSelection(_arg1:Boolean):void{
this.iSelection = _arg1;
InitElements();
}
public function get prCurrentInd():int{
return (this.iECurInd);
}
protected function SkipElements(_arg1:int):Boolean{
if (!this.iLBParams){
return (false);
};
var _local2:int = (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 SetCurrentElement(_arg1, _arg2:Array=null):void{
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;
var _local3:int;
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 FreeElements():void{
var _local1:int;
while (_local1 < this.iElements.length) {
if (!this.iElements[_local1]){
} else {
this.removeChild(this.iElements[_local1]);
this.iElements[_local1].Free();
this.iElements[_local1] = null;
};
_local1++;
};
}
public function get prSelection():Boolean{
return (this.iSelection);
}
protected function UnpressElements(_arg1:OListBoxElement):void{
var _local2:int;
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++;
};
}
override public function Init():void{
super.Init();
this.iElements = new Array();
this.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 set prLBParams(_arg1:Array):void{
this.iLBParams = _arg1;
this.iECurInd = 0;
this.iEShowInd = 0;
this.InitElements();
}
public function set prPageScrool(_arg1:Boolean):void{
this.iPageScrool = _arg1;
}
}
}//package ENGINE.INTERFACE
Section 42
//OProgress (ENGINE.INTERFACE.OProgress)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.geom.*;
public class OProgress extends OIObject {
private var iPBG:OBitmap;
private var iValue:Number;
public var iProgress:OBitmap;
public var iProgressBG:OBitmap;
public function OProgress(_arg1:Array, _arg2:Array=null){
super(_arg1, _arg2);
}
public function get prValue():Number{
return (this.iValue);
}
override public function Free():void{
this.iProgressBG = null;
this.iProgress = null;
super.Free();
}
override public function Init():void{
super.Init();
if (this.iProgressBG){
this.iPBG = this.iProgressBG.Clone();
};
}
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;
}
}
}//package ENGINE.INTERFACE
Section 43
//OTab (ENGINE.INTERFACE.OTab)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.ANIMATORS.*;
public class OTab extends OIObject {
private var iCurInd:int;
protected var iHeight:Number;
private var iVAnimator:Object;
protected var iWidth: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){
this.iWidth = _arg2;
this.iHeight = _arg3;
this.iVAnimator = (_arg4) ? _arg4 : iDefVAnimator;
var _local6:Array = (_arg5) ? _arg5 : iDefAnimators;
super(_arg1, _local6);
}
override public function get prWidth():Number{
return (this.iWidth);
}
public function PosValue(_arg1:Number, _arg2:Number):void{
(this.getChildAt(this.iCurInd) as IDisplayObject).Pos((_arg1 - this.prX), (_arg2 - this.prY));
}
public function get prValue():int{
return (this.iCurInd);
}
override public function get prHeight():Number{
return (this.iHeight);
}
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;
}
}
}//package ENGINE.INTERFACE
Section 44
//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 45
//OEffectGel (ENGINE.SKIN.OEffectGel)
package ENGINE.SKIN {
import ENGINE.DISPLAY.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
import ENGINE.DISPLAY.EFFECTS.*;
import flash.filters.*;
public class OEffectGel extends OEffect {
private var iF0S:DropShadowFilter;
private var iColor:uint;// = 0
private var iF2B:BlurFilter;
private var iF1G:GlowFilter;
private var iBorder:Number;// = 0
private var iF2GG1:GradientGlowFilter;
private var iF2GG2:GradientGlowFilter;
private var iF1S:DropShadowFilter;
override public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{
var _local18:Bitmap;
var _local5:OBM = OBM.Make([null, _arg1, _arg2, _arg3, _arg4, 0]);
var _local6:Number = OGlobal.Scale;
var _local7:Number = 0.85;
var _local8:Sprite = new Sprite();
var _local9:Sprite = new Sprite();
_local9.x = iBorder;
_local9.y = iBorder;
_local9.alpha = _local7;
_local8.addChild(_local9);
var _local10:ColorTransform = new ColorTransform(0, 0, 0);
_local10.color = this.iColor;
var _local11:Bitmap = 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);
};
var _local12:Bitmap = new Bitmap(_local5.iBM);
_local12.blendMode = "multiply";
_local12.filters = [this.iF1S];
_local9.addChild(_local12);
var _local13:Bitmap = new Bitmap(_local5.iBM);
_local13.blendMode = "multiply";
_local13.filters = [this.iF1G];
_local9.addChild(_local13);
var _local14:Sprite = new Sprite();
_local14.blendMode = "layer";
_local14.filters = [this.iF2B];
_local9.addChild(_local14);
var _local15:Bitmap = new Bitmap(_local5.iBM);
_local15.blendMode = "screen";
_local15.filters = [this.iF2GG1];
_local14.addChild(_local15);
var _local16:Bitmap = new Bitmap(_local5.iBM);
_local16.blendMode = "erase";
_local16.filters = [this.iF2GG2];
_local14.addChild(_local16);
var _local17:BitmapData = 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 _local10:int;
var _local11:int;
var _local12:Array;
var _local13:Array;
var _local4:Object = this.iColors.GetItem(_arg1);
var _local5:Object = this.iFilters.GetItem(_arg2);
if (_local5 == null){
return;
};
var _local6:Number = (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];
};
};
var _local7:uint = 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);
var _local8:Number = ((_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);
var _local9:Number = ((_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 46
//OMultiplayer (ENGINE.SMARTFOX.OMultiplayer)
package ENGINE.SMARTFOX {
import it.gotoandplay.smartfoxserver.handlers.*;
import it.gotoandplay.smartfoxserver.data.*;
import it.gotoandplay.smartfoxserver.*;
import ENGINE.CORE.*;
import flash.utils.*;
import it.gotoandplay.smartfoxserver.util.*;
public class OMultiplayer extends SmartFoxClient {
private var iOpponentID:int;
private var iTurn:Array;
private var iOpponentName:String;
private var iName:String;
private var iCmd:String;
private var iError:String;
private var iPassword:String;
private var iConnection:Boolean;// = false
private var iState:int;
private var iUsersCount:int;
private var iErrorsCount:int;
private var iAdress:String;
private var iXTName:String;
private var iTimer:int;
private var iGRoomParams:Array;
private var iZoneName:String;
private var iGameParams:Array;
private var iCMessages:Array;
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){
super(_arg1);
this.State = stNone;
}
public function get prActiveRoomID():int{
return (this.activeRoomId);
}
private function OnConnectionLost(_arg1:SFSEvent):void{
this.iConnection = false;
this.State = stNone;
}
public function get prErrorsCount():int{
return (this.iErrorsCount);
}
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 get prOpponentTurn():String{
return (((this.iTurn.length)>0) ? this.iTurn[0] : null);
}
public function Turn(_arg1:Array=null):void{
if (this.iState > stLoginError){
this.sendXtMessage(this.iXTName, _slot1.cmdMakeTurn, (_arg1) ? [_arg1.toString(), this.iOpponentID] : ["0", this.iOpponentID], "str");
};
}
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 prError():String{
return (this.iError);
}
public function ClearChatMessage(_arg1:Boolean=false):void{
if (_arg1){
this.iCMessages = new Array();
} else {
if (this.iCMessages[0]){
this.iCMessages.shift();
};
};
}
public function get prChatMessage():String{
return (((this.iCMessages.length)==0) ? null : 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;
}
public function get prGameParams():Array{
return (this.iGameParams);
}
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 ClearOpponentTurn(_arg1:Boolean=false):void{
if (_arg1){
this.iTurn = new Array();
} else {
if (this.iTurn[0]){
this.iTurn.shift();
};
};
}
public function ClearCmd():void{
this.iCmd = null;
}
public function set prGRoomParams(_arg1:Array):void{
this.iGRoomParams = _arg1;
}
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;
};
}
private function OnExtensionResponse(_arg1:SFSEvent):void{
if (_arg1.params.type != "str"){
return;
};
var _local2:Array = _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 = _slot1.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 = _slot1.stGameError;
} else {
this.activeRoomId = _local2[2];
this.playerId = _local2[3];
this.iOpponentID = _local2[4];
this.iOpponentName = _local2[5];
this.State = _slot1.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 cmdSend(_arg1:String, _arg2:Array=null):void{
if (this.iState > stLoginError){
this.sendXtMessage(this.iXTName, _arg1, (_arg2) ? _arg2 : [], "str");
};
}
public function ChatMessage(_arg1:Array=null):void{
this.sendXtMessage(this.iXTName, _slot1.cmdChatMessage, (_arg1) ? [_arg1.toString()] : ["0"], "str");
}
public function get State():int{
return (this.iState);
}
public function set prGameParams(_arg1:Array):void{
this.iGameParams = _arg1;
}
}
}//package ENGINE.SMARTFOX
Section 47
//Room (it.gotoandplay.smartfoxserver.data.Room)
package it.gotoandplay.smartfoxserver.data {
public class Room {
private var maxSpectators:int;
private var maxUsers:int;
private var userList:Array;
private var name:String;
private var userCount:int;
private var specCount:int;
private var temp:Boolean;
private var limbo:Boolean;
private var id:int;
private var myPlayerIndex:int;
private var game:Boolean;
private var variables:Array;
private var priv:Boolean;
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 getUser(_arg1):User{
var _local3:String;
var _local4:User;
var _local2:User;
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 removeUser(_arg1:int):void{
delete userList[_arg1];
userCount--;
}
public function addUser(_arg1:User, _arg2:int):void{
userList[_arg2] = _arg1;
userCount++;
}
public function setVariables(_arg1:Array):void{
this.variables = _arg1;
}
public function getUserCount():int{
return (this.userCount);
}
public function getId():int{
return (this.id);
}
public function setIsLimbo(_arg1:Boolean):void{
this.limbo = _arg1;
}
public function getVariables():Array{
return (variables);
}
public function isLimbo():Boolean{
return (this.limbo);
}
public function getMaxUsers():int{
return (this.maxUsers);
}
public function getMaxSpectators():int{
return (this.maxSpectators);
}
public function getName():String{
return (this.name);
}
public function isPrivate():Boolean{
return (this.priv);
}
public function setSpectatorCount(_arg1:int):void{
this.specCount = _arg1;
}
public function clearVariables():void{
this.variables = [];
}
public function isTemp():Boolean{
return (this.temp);
}
public function getMyPlayerIndex():int{
return (this.myPlayerIndex);
}
public function getSpectatorCount():int{
return (this.specCount);
}
public function getVariable(_arg1:String):Object{
return (variables[_arg1]);
}
public function setMyPlayerIndex(_arg1:int):void{
this.myPlayerIndex = _arg1;
}
public function isGame():Boolean{
return (this.game);
}
public function getUserList():Array{
return (this.userList);
}
}
}//package it.gotoandplay.smartfoxserver.data
Section 48
//User (it.gotoandplay.smartfoxserver.data.User)
package it.gotoandplay.smartfoxserver.data {
public class User {
private var isSpec:Boolean;
private var pId:int;
private var name:String;
private var variables:Array;
private var isMod:Boolean;
private var id:int;
public function User(_arg1:int, _arg2:String){
this.id = _arg1;
this.name = _arg2;
this.variables = [];
this.isSpec = false;
this.isMod = false;
}
public function getName():String{
return (this.name);
}
public function clearVariables():void{
this.variables = [];
}
public function getVariables():Array{
return (this.variables);
}
public function setModerator(_arg1:Boolean):void{
this.isMod = _arg1;
}
public function isSpectator():Boolean{
return (this.isSpec);
}
public function getId():int{
return (this.id);
}
public function isModerator():Boolean{
return (this.isMod);
}
public function setVariables(_arg1:Array):void{
this.variables = _arg1;
}
public function getVariable(_arg1:String):Object{
return (this.variables[_arg1]);
}
public function setIsSpectator(_arg1:Boolean):void{
this.isSpec = _arg1;
}
public function setPlayerId(_arg1:int):void{
this.pId = _arg1;
}
public function getPlayerId():int{
return (this.pId);
}
}
}//package it.gotoandplay.smartfoxserver.data
Section 49
//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 50
//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 51
//SysHandler (it.gotoandplay.smartfoxserver.handlers.SysHandler)
package it.gotoandplay.smartfoxserver.handlers {
import it.gotoandplay.smartfoxserver.data.*;
import it.gotoandplay.smartfoxserver.*;
import flash.utils.*;
import it.gotoandplay.smartfoxserver.util.*;
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 = int(_arg1.body.rm.@id);
var _local3:Array = sfs.getAllRooms();
var _local4:Object = {};
_local4.room = _local3[_local2];
delete _local3[_local2];
var _local5:SFSEvent = new SFSEvent(SFSEvent.onRoomDeleted, _local4);
sfs.dispatchEvent(_local5);
}
public function handleAdminMessage(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.user.@id);
var _local4:String = _arg1.body.txt;
var _local5:Object = {};
_local5.message = Entities.decodeEntities(_local4);
var _local6:SFSEvent = new SFSEvent(SFSEvent.onAdminMessage, _local5);
sfs.dispatchEvent(_local6);
}
public function handleUserVarsUpdate(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.user.@id);
var _local4:User = sfs.getRoom(_local2).getUser(_local3);
var _local5:Array = [];
if (_arg1.body.vars.toString().length > 0){
populateVariables(_local4.getVariables(), _arg1.body, _local5);
};
var _local6:Object = {};
_local6.user = _local4;
_local6.changedVars = _local5;
var _local7:SFSEvent = new SFSEvent(SFSEvent.onUserVariablesUpdate, _local6);
sfs.dispatchEvent(_local7);
}
public function handleUserLeaverRoom(_arg1:Object):void{
var _local2:int = int(_arg1.body.user.@id);
var _local3:int = int(_arg1.body.@r);
var _local4:Room = sfs.getRoom(_local3);
var _local5:String = _local4.getUser(_local2).getName();
_local4.removeUser(_local2);
var _local6:Object = {};
_local6.roomId = _local3;
_local6.userId = _local2;
_local6.userName = _local5;
var _local7:SFSEvent = new SFSEvent(SFSEvent.onUserLeaveRoom, _local6);
sfs.dispatchEvent(_local7);
}
public function handlePrivateMessage(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.user.@id);
var _local4:String = _arg1.body.txt;
var _local5:User = sfs.getRoom(_local2).getUser(_local3);
var _local6:Object = {};
_local6.message = Entities.decodeEntities(_local4);
_local6.sender = _local5;
_local6.roomId = _local2;
_local6.userId = _local3;
var _local7:SFSEvent = new SFSEvent(SFSEvent.onPrivateMessage, _local6);
sfs.dispatchEvent(_local7);
}
private function handleCreateRoomError(_arg1:Object):void{
var _local2:String = _arg1.body.room.@e;
var _local3:Object = {};
_local3.error = _local2;
var _local4:SFSEvent = new SFSEvent(SFSEvent.onCreateRoomError, _local3);
sfs.dispatchEvent(_local4);
}
private function handleBuddyRoom(_arg1:Object):void{
var _local2:String = _arg1.body.br.@r;
var _local3:Array = _local2.split(",");
var _local4:int;
while (_local4 < _local3.length) {
_local3[_local4] = int(_local3[_local4]);
_local4++;
};
var _local5:Object = {};
_local5.idList = _local3;
var _local6:SFSEvent = new SFSEvent(SFSEvent.onBuddyRoom, _local5);
sfs.dispatchEvent(_local6);
}
private function handleBuddyListUpdate(_arg1:Object):void{
var _local4:Object;
var _local5:XMLList;
var _local6:Object;
var _local7:Boolean;
var _local8:String;
var _local9:XML;
var _local2:Object = {};
var _local3:SFSEvent;
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 _local6:Object;
var _local7:SFSEvent;
var _local2:int = int(_arg1.body.@u);
var _local3:int = int(_arg1.body.@s);
var _local4:int = int(_arg1.body.@r);
var _local5:Room = 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 = _arg1.body.k.toString();
var _local3:Object = {};
_local3.key = _local2;
var _local4:SFSEvent = new SFSEvent(SFSEvent.onRandomKey, _local3);
sfs.dispatchEvent(_local4);
}
public function handlePublicMessage(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.user.@id);
var _local4:String = _arg1.body.txt;
var _local5:User = sfs.getRoom(_local2).getUser(_local3);
var _local6:Object = {};
_local6.message = Entities.decodeEntities(_local4);
_local6.sender = _local5;
_local6.roomId = _local2;
var _local7:SFSEvent = new SFSEvent(SFSEvent.onPublicMessage, _local6);
sfs.dispatchEvent(_local7);
}
public function handleUserEnterRoom(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.u.@i);
var _local4:String = _arg1.body.u.n;
var _local5 = (_arg1.body.u.@m == "1");
var _local6 = (_arg1.body.u.@s == "1");
var _local7:int = ((_arg1.body.u.@p)!=null) ? int(_arg1.body.u.@p) : -1;
var _local8:XMLList = _arg1.body.u.vars["var"];
var _local9:Room = sfs.getRoom(_local2);
var _local10:User = 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);
};
var _local11:Object = {};
_local11.roomId = _local2;
_local11.user = _local10;
var _local12:SFSEvent = new SFSEvent(SFSEvent.onUserEnterRoom, _local11);
sfs.dispatchEvent(_local12);
}
public function dispatchDisconnection():void{
var _local1:SFSEvent = new SFSEvent(SFSEvent.onConnectionLost, null);
sfs.dispatchEvent(_local1);
}
private function handleSpectatorSwitched(_arg1:Object):void{
var _local2:int = int(_arg1.body.rm.@id);
sfs.playerId = int(_arg1.body.pid.@id);
var _local3:Object = {};
_local3.success = (sfs.playerId > 0);
_local3.newId = sfs.playerId;
_local3.room = sfs.getRoom(_local2);
var _local4:SFSEvent = new SFSEvent(SFSEvent.onSpectatorSwitched, _local3);
sfs.dispatchEvent(_local4);
}
public function handleLoginOk(_arg1:Object):void{
var _local2:int = int(_arg1.body.login.@id);
var _local3:int = int(_arg1.body.login.@mod);
var _local4:String = _arg1.body.login.@n;
sfs.amIModerator = (_local3 == 1);
sfs.myUserId = _local2;
sfs.myUserName = _local4;
sfs.playerId = -1;
var _local5:Object = {};
_local5.success = true;
_local5.name = _local4;
_local5.error = "";
var _local6:SFSEvent = new SFSEvent(SFSEvent.onLogin, _local5);
sfs.dispatchEvent(_local6);
sfs.getRoomList();
}
public function handleRoomVarsUpdate(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.user.@id);
var _local4:Room = sfs.getRoom(_local2);
var _local5:Array = [];
if (_arg1.body.vars.toString().length > 0){
populateVariables(_local4.getVariables(), _arg1.body, _local5);
};
var _local6:Object = {};
_local6.room = _local4;
_local6.changedVars = _local5;
var _local7:SFSEvent = new SFSEvent(SFSEvent.onRoomVariablesUpdate, _local6);
sfs.dispatchEvent(_local7);
}
public function handleRoomList(_arg1:Object):void{
var _local3:XML;
var _local4:Object;
var _local5:SFSEvent;
var _local6:int;
var _local7:Room;
var _local2:Array = 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 _local6:XML;
var _local2:Object = {};
_local2.isOnline = ((_arg1.body.b.@s == "1")) ? true : false;
_local2.name = _arg1.body.b.n.toString();
_local2.id = _arg1.body.b.@i;
_local2.variables = {};
var _local3:XMLList = _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);
var _local4:Object = {};
_local4.list = sfs.buddyList;
var _local5:SFSEvent = new SFSEvent(SFSEvent.onBuddyList, _local4);
sfs.dispatchEvent(_local5);
}
private function handleRoomAdded(_arg1:Object):void{
var _local2:int = int(_arg1.body.rm.@id);
var _local3:String = _arg1.body.rm.name;
var _local4:int = int(_arg1.body.rm.@max);
var _local5:int = int(_arg1.body.rm.@spec);
var _local6:Boolean = ((_arg1.body.rm.@temp == "1")) ? true : false;
var _local7:Boolean = ((_arg1.body.rm.@game == "1")) ? true : false;
var _local8:Boolean = ((_arg1.body.rm.@priv == "1")) ? true : false;
var _local9:Boolean = ((_arg1.body.rm.@limbo == "1")) ? true : false;
var _local10:Room = new Room(_local2, _local3, _local4, _local5, _local6, _local7, _local8, _local9);
var _local11:Array = sfs.getAllRooms();
_local11[_local2] = _local10;
if (_arg1.body.rm.vars.toString().length > 0){
populateVariables(_local10.getVariables(), _arg1.body.rm);
};
var _local12:Object = {};
_local12.room = _local10;
var _local13:SFSEvent = 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 = int(_arg1.body.rm.@id);
var _local3:Object = {};
_local3.roomId = _local2;
var _local4:SFSEvent = new SFSEvent(SFSEvent.onRoomLeft, _local3);
sfs.dispatchEvent(_local4);
}
public function handleLoginKo(_arg1:Object):void{
var _local2:Object = {};
_local2.success = false;
_local2.error = _arg1.body.login.@e;
var _local3:SFSEvent = new SFSEvent(SFSEvent.onLogin, _local2);
sfs.dispatchEvent(_local3);
}
public function handleModMessage(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.user.@id);
var _local4:String = _arg1.body.txt;
var _local5:User = sfs.getRoom(_local2).getUser(_local3);
var _local6:Object = {};
_local6.message = Entities.decodeEntities(_local4);
_local6.sender = _local5;
var _local7:SFSEvent = new SFSEvent(SFSEvent.onModeratorMessage, _local6);
sfs.dispatchEvent(_local7);
}
public function handleApiOK(_arg1:Object):void{
sfs.isConnected = true;
var _local2:SFSEvent = new SFSEvent(SFSEvent.onConnection, {success:true});
sfs.dispatchEvent(_local2);
}
private function handleRoundTripBench(_arg1:Object):void{
var _local2:int = getTimer();
var _local3:int = (_local2 - sfs.getBenchStartTime());
var _local4:Object = {};
_local4.elapsed = _local3;
var _local5:SFSEvent = new SFSEvent(SFSEvent.onRoundTripResponse, _local4);
sfs.dispatchEvent(_local5);
}
public function handleJoinOk(_arg1:Object):void{
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;
var _local2:int = int(_arg1.body.@r);
var _local3:XMLList = _arg1.body;
var _local4:XMLList = _arg1.body.uLs.u;
var _local5:int = int(_arg1.body.pid.@id);
sfs.activeRoomId = _local2;
var _local6:Room = 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 handleApiKO(_arg1:Object):void{
var _local2:Object = {};
_local2.success = false;
_local2.error = "API are obsolete, please upgrade";
var _local3:SFSEvent = new SFSEvent(SFSEvent.onConnection, _local2);
sfs.dispatchEvent(_local3);
}
public function handleASObject(_arg1:Object):void{
var _local2:int = int(_arg1.body.@r);
var _local3:int = int(_arg1.body.user.@id);
var _local4:String = _arg1.body.dataObj;
var _local5:User = sfs.getRoom(_local2).getUser(_local3);
var _local6:Object = ObjectSerializer.getInstance().deserialize(new XML(_local4));
var _local7:Object = {};
_local7.obj = _local6;
_local7.sender = _local5;
var _local8:SFSEvent = new SFSEvent(SFSEvent.onObjectReceived, _local7);
sfs.dispatchEvent(_local8);
}
private function handleBuddyList(_arg1:Object):void{
var _local3:Object;
var _local6:XML;
var _local7:XMLList;
var _local8:XML;
var _local2:XMLList = _arg1.body.bList;
var _local4:Object = {};
var _local5:SFSEvent;
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 handleJoinKo(_arg1:Object):void{
sfs.changingRoom = false;
var _local2:Object = {};
_local2.error = _arg1.body.error.@msg;
var _local3:SFSEvent = new SFSEvent(SFSEvent.onJoinRoomError, _local2);
sfs.dispatchEvent(_local3);
}
public function handleMessage(_arg1:Object, _arg2:String):void{
var _local3:XML = (_arg1 as XML);
var _local4:String = _local3.body.@action;
var _local5:Function = handlersTable[_local4];
if (_local5 != null){
_local5.apply(this, [_arg1]);
} else {
trace(("Unknown sys command: " + _local4));
};
}
}
}//package it.gotoandplay.smartfoxserver.handlers
Section 52
//JSON (it.gotoandplay.smartfoxserver.json.JSON)
package it.gotoandplay.smartfoxserver.json {
public class JSON {
public static function decode(_arg1:String){
var _local2:JSONDecoder = new JSONDecoder(_arg1);
return (_local2.getValue());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 53
//JSONDecoder (it.gotoandplay.smartfoxserver.json.JSONDecoder)
package it.gotoandplay.smartfoxserver.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
tokenizer = new JSONTokenizer(_arg1);
nextToken();
value = parseValue();
}
private function parseObject():Object{
var _local2:String;
var _local1:Object = 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 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()));
}
public function getValue(){
return (value);
}
private function parseArray():Array{
var _local1:Array = 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);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 54
//JSONEncoder (it.gotoandplay.smartfoxserver.json.JSONEncoder)
package it.gotoandplay.smartfoxserver.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
jsonString = convertToString(_arg1);
}
private function escapeString(_arg1:String):String{
var _local3:String;
var _local6:String;
var _local7:String;
var _local2 = "";
var _local4:Number = _arg1.length;
var _local5:int;
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 arrayToString(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
public function getString():String{
return (jsonString);
}
private function objectToString(_arg1:Object):String{
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
var s = "";
var classInfo:XML = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(key) + ":") + convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((escapeString(v.@name.toString()) + ":") + convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
private function convertToString(_arg1):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");
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 55
//JSONParseError (it.gotoandplay.smartfoxserver.json.JSONParseError)
package it.gotoandplay.smartfoxserver.json {
public class JSONParseError extends Error {
private var _location:int;
private var _text:String;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
_location = _arg2;
_text = _arg3;
}
public function get location():int{
return (_location);
}
public function get text():String{
return (_text);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 56
//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 get value():Object{
return (_value);
}
public function get type():int{
return (_type);
}
public function set type(_arg1:int):void{
_type = _arg1;
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 57
//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 readString():JSONToken{
var _local3:String;
var _local4:int;
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.STRING;
var _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);
}
private function nextChar():String{
return ((ch = jsonString.charAt(loc++)));
}
public function getNextToken():JSONToken{
var _local2:String;
var _local3:String;
var _local4:String;
var _local1:JSONToken = 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 (isWhiteSpace(ch)) {
nextChar();
};
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, loc, jsonString));
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n"))));
}
private function skipIgnored():void{
skipWhite();
skipComments();
skipWhite();
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String = _arg1.toUpperCase();
return (((isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
private function readNumber():JSONToken{
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
var _local2 = "";
if (ch == "-"){
_local2 = (_local2 + "-");
nextChar();
};
if (!isDigit(ch)){
parseError("Expecting a digit");
};
if (ch == "0"){
_local2 = (_local2 + ch);
nextChar();
if (isDigit(ch)){
parseError("A digit cannot immediately follow 0");
};
} else {
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if (ch == "."){
_local2 = (_local2 + ".");
nextChar();
if (!isDigit(ch)){
parseError("Expecting a digit");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
if ((((ch == "e")) || ((ch == "E")))){
_local2 = (_local2 + "e");
nextChar();
if ((((ch == "+")) || ((ch == "-")))){
_local2 = (_local2 + ch);
nextChar();
};
if (!isDigit(ch)){
parseError("Scientific notation number needs exponent value");
};
while (isDigit(ch)) {
_local2 = (_local2 + ch);
nextChar();
};
};
var _local3:Number = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
}
}//package it.gotoandplay.smartfoxserver.json
Section 58
//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 59
//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;
_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 _local4:String;
var _local5:int;
var _local2 = "";
var _local3:int;
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 = _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 60
//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 = {};
obj2xml(_arg1, _local2);
return (_local2.xmlStr);
}
private function xml2obj(_arg1:XML, _arg2:Object):void{
var _local5:String;
var _local6:XML;
var _local7:String;
var _local8:String;
var _local9:String;
var _local10:String;
var _local11:String;
var _local3:int;
var _local4:XMLList = _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 setDebug(_arg1:Boolean):void{
this.debug = _arg1;
if (this.debug){
this.eof = "\n";
} else {
this.eof = "";
};
}
private function encodeEntities(_arg1:String):String{
return (_arg1);
}
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));
};
}
public function deserialize(_arg1:String):Object{
var _local2:XML = new XML(_arg1);
var _local3:Object = {};
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 61
//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 62
//SmartFoxClient (it.gotoandplay.smartfoxserver.SmartFoxClient)
package it.gotoandplay.smartfoxserver {
import flash.events.*;
import it.gotoandplay.smartfoxserver.handlers.*;
import it.gotoandplay.smartfoxserver.data.*;
import flash.utils.*;
import it.gotoandplay.smartfoxserver.util.*;
import it.gotoandplay.smartfoxserver.json.*;
import flash.net.*;
public class SmartFoxClient extends EventDispatcher {
public var buddyList:Array;
private var subVersion:Number;
private var connected:Boolean;
private var messageHandlers:Array;
public var buddyVars:Array;
public var myUserId:int;
private var majVersion:Number;
private var minVersion:Number;
private var roomList:Array;
private var socketConnection:Socket;
private var sysHandler:SysHandler;
public var myUserName:String;
public var debug:Boolean;
public var playerId:int;
private var byteBuffer:ByteArray;
private var extHandler:ExtHandler;
public var amIModerator:Boolean;
public var changingRoom:Boolean;
public var activeRoomId:int;
private var benchStartTime: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 _local3:*;
var _local4:String;
var _local5:String;
var _local6:String;
var _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 jsonReceived(_arg1:String):void{
var _local2:Object = JSON.decode(_arg1);
var _local3:String = _local2["t"];
var _local4:IMessageHandler = messageHandlers[_local3];
if (_local4 != null){
_local4.handleMessage(_local2["b"], XTMSG_TYPE_JSON);
};
}
public function set isConnected(_arg1:Boolean):void{
this.connected = _arg1;
}
private function checkBuddyDuplicates(_arg1:String):Boolean{
var _local3:Object;
var _local2:Boolean;
for each (_local3 in buddyList) {
if (_local3.name == _arg1){
_local2 = true;
break;
};
};
return (_local2);
}
private function handleSocketData(_arg1:Event):void{
var _local3:int;
var _local2:int = 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!!!");
}
public function get isConnected():Boolean{
return (this.connected);
}
private function send(_arg1:Object, _arg2:String, _arg3:Number, _arg4:String):void{
var _local5:String = makeXmlHeader(_arg1);
_local5 = (_local5 + ((((((("<body action='" + _arg2) + "' r='") + _arg3) + "'>") + _arg4) + "</body>") + closeHeader()));
if (this.debug){
trace((("[Sending]: " + _local5) + "\n"));
};
writeToSocket(_local5);
}
private function initialize():void{
this.changingRoom = false;
this.amIModerator = false;
this.playerId = -1;
this.connected = false;
this.roomList = [];
this.buddyList = [];
this.buddyVars = [];
}
private function handleSocketConnection(_arg1:Event):void{
var _local2:Object = {t:"sys"};
var _local3 = (((("<ver v='" + this.majVersion.toString()) + this.minVersion.toString()) + this.subVersion.toString()) + "' />");
send(_local2, "verChk", 0, _local3);
}
private function handleSocketDisconnection(_arg1:Event):void{
initialize();
var _local2:SFSEvent = new SFSEvent(SFSEvent.onConnectionLost, {});
dispatchEvent(_local2);
}
public function getRoomList():void{
var _local1:Object = {t:"sys"};
send(_local1, "getRmList", activeRoomId, "");
}
private function xmlReceived(_arg1:String):void{
var _local2:XML = new XML(_arg1);
var _local3:String = _local2.@t;
var _local4:String = _local2.body.@action;
var _local5:int = _local2.body.@r;
var _local6:IMessageHandler = messageHandlers[_local3];
if (_local6 != null){
_local6.handleMessage(_local2, XTMSG_TYPE_XML);
};
}
public function getBuddyRoom(_arg1:Object):void{
if (_arg1.id != -1){
send({t:"sys", bid:_arg1.id}, "roomB", -1, (("<b id='" + _arg1.id) + "' />"));
};
}
public function switchSpectator(_arg1:int=-1):void{
if (_arg1 == -1){
_arg1 = activeRoomId;
};
send({t:"sys"}, "swSpec", _arg1, "");
}
public function disconnect():void{
socketConnection.close();
connected = false;
sysHandler.dispatchDisconnection();
}
public function roundTripBench():void{
this.benchStartTime = getTimer();
send({t:"sys"}, "roundTrip", activeRoomId, "");
}
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{
if (_arg2 == -1){
_arg2 = activeRoomId;
};
var _local3:Object = {t:"sys"};
var _local4:Room = getActiveRoom();
var _local5:User = _local4.getUser(myUserId);
var _local6:String = 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 login(_arg1:String, _arg2:String, _arg3:String):void{
var _local4:Object = {t:"sys"};
var _local5 = (((((("<login z='" + _arg1) + "'><nick><![CDATA[") + _arg2) + "]]></nick><pword><![CDATA[") + _arg3) + "]]></pword></login>");
send(_local4, "login", 0, _local5);
}
public function createRoom(_arg1:Object, _arg2:int=-1):void{
var _local9:String;
if (_arg2 == -1){
_arg2 = activeRoomId;
};
var _local3:Object = {t:"sys"};
var _local4:String = (_arg1.isGame) ? "1" : "0";
var _local5 = "1";
var _local6:String = ((_arg1.maxUsers == null)) ? "0" : String(_arg1.maxUsers);
var _local7:String = ((_arg1.maxSpectators == null)) ? "0" : String(_arg1.maxSpectators);
if (((_arg1.isGame) && (!((_arg1.exitCurrent == null))))){
_local5 = (_arg1.exitCurrent) ? "1" : "0";
};
var _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);
}
public function joinRoom(_arg1, _arg2:String="", _arg3:Boolean=false, _arg4:Boolean=false, _arg5:int=-1):void{
var _local8:Room;
var _local9:Object;
var _local10:String;
var _local11:int;
var _local12:String;
var _local6 = -1;
var _local7:int = (_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!");
};
};
}
private function makeXmlHeader(_arg1:Object):String{
var _local3:String;
var _local2 = "<msg";
for (_local3 in _arg1) {
_local2 = (_local2 + ((((" " + _local3) + "='") + _arg1[_local3]) + "'"));
};
_local2 = (_local2 + ">");
return (_local2);
}
public function clearBuddyList():void{
buddyList = [];
send({t:"sys"}, "clearB", -1, "");
var _local1:Object = {};
_local1.list = buddyList;
var _local2:SFSEvent = 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 getRoomByName(_arg1:String):Room{
var _local3:Room;
var _local2:Room;
for each (_local3 in roomList) {
if (_local3.getName() == _arg1){
_local2 = _local3;
break;
};
};
return (_local2);
}
public function sendPrivateMessage(_arg1:String, _arg2:int, _arg3:int=-1):void{
if (_arg3 == -1){
_arg3 = activeRoomId;
};
var _local4:Object = {t:"sys"};
var _local5 = (((("<txt rcp='" + _arg2) + "'><![CDATA[") + Entities.encodeEntities(_arg1)) + "]]></txt>");
send(_local4, "prvMsg", _arg3, _local5);
}
public function setRoomVariables(_arg1:Array, _arg2:int=-1, _arg3:Boolean=true):void{
var _local5:String;
var _local6:Object;
if (_arg2 == -1){
_arg2 = activeRoomId;
};
var _local4:Object = {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 loadBuddyList():void{
send({t:"sys"}, "loadB", -1, "");
}
private function handleMessage(_arg1:String):void{
if (this.debug){
trace((((("[ RECEIVED ]: " + _arg1) + ", (len: ") + _arg1.length) + ")"));
};
var _local2:String = _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);
};
};
};
}
private function strReceived(_arg1:String):void{
var _local2:Array = _arg1.substr(1, (_arg1.length - 2)).split(MSG_STR);
var _local3:String = _local2[0];
var _local4:IMessageHandler = messageHandlers[_local3];
if (_local4 != null){
_local4.handleMessage(_local2.splice(1, (_local2.length - 1)), XTMSG_TYPE_STR);
};
}
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);
};
};
};
}
public function sendPublicMessage(_arg1:String, _arg2:int=-1):void{
if (_arg2 == -1){
_arg2 = activeRoomId;
};
var _local3:Object = {t:"sys"};
var _local4 = (("<txt><![CDATA[" + Entities.encodeEntities(_arg1)) + "]]></txt>");
send(_local3, "pubMsg", _arg2, _local4);
}
public function leaveRoom(_arg1:int):void{
var _local2:Object = {t:"sys"};
var _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!"));
};
}
private function writeToSocket(_arg1:String):void{
var _local2:ByteArray = new ByteArray();
_local2.writeMultiByte(_arg1, "utf-8");
_local2.writeByte(0);
socketConnection.writeBytes(_local2);
socketConnection.flush();
}
public function removeBuddy(_arg1:String):void{
var _local3:Object;
var _local4:String;
var _local5:Object;
var _local6:String;
var _local7:Object;
var _local8:SFSEvent;
var _local2:Boolean;
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);
};
}
public function getRoom(_arg1:int):Room{
return (roomList[_arg1]);
}
public function getAllRooms():Array{
return (roomList);
}
private function setupMessageHandlers():void{
sysHandler = new SysHandler(this);
extHandler = new ExtHandler(this);
addMessageHandler("sys", sysHandler);
addMessageHandler("xt", extHandler);
}
private function getXmlRoomVariable(_arg1:Object):String{
var _local2:String = _arg1.name.toString();
var _local3:* = _arg1.val.toString();
var _local4:String = (_arg1.priv) ? "1" : "0";
var _local5:String = (_arg1.persistent) ? "1" : "0";
var _local6:String;
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 ("");
}
public function sendObjectToGroup(_arg1:Object, _arg2:Array, _arg3:int):void{
var _local5:String;
var _local6:Object;
var _local7:String;
if (_arg3 == -1){
_arg3 = activeRoomId;
};
var _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);
}
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");
};
}
public function getRandomKey():void{
send({t:"sys"}, "rndK", -1, "");
}
public function sendObject(_arg1:Object, _arg2:int=-1):void{
if (_arg2 == -1){
_arg2 = activeRoomId;
};
var _local3 = (("<![CDATA[" + ObjectSerializer.getInstance().serialize(_arg1)) + "]]>");
var _local4:Object = {t:"sys"};
send(_local4, "asObj", _arg2, _local3);
}
public function connect(_arg1:String, _arg2:int):void{
if (!connected){
initialize();
socketConnection.connect(_arg1, _arg2);
} else {
trace("*** ALREADY CONNECTED ***");
};
}
public function setBuddyVariables(_arg1:Array):void{
var _local4:String;
var _local5:String;
var _local2:Object = {t:"sys"};
var _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 sendModeratorMessage(_arg1:String, _arg2:int, _arg3:int=-1):void{
var _local4:Object = {t:"sys"};
var _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 autoJoin():void{
var _local1:Object = {t:"sys"};
this.send(_local1, "autoJoin", (this.activeRoomId) ? this.activeRoomId : -1, "");
}
public function getActiveRoom():Room{
return (roomList[activeRoomId]);
}
}
}//package it.gotoandplay.smartfoxserver
Section 63
//OBang (MAIN.OBJECTS.OBang)
package MAIN.OBJECTS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBang extends OSprite {
public static const iMaxBubbles:int = 15;
public function OnEnterFrame(_arg1:Event):void{
var _local3:OBubble;
var _local2:int;
while (_local2 < this.numChildren) {
_local3 = (this.getChildAt(_local2) as OBubble);
_local3.OnEnterFrame(_arg1);
if (_local3.State == OBubble.stBang){
switch (_local3.prType){
case 0:
MakeFirework1(_local3);
break;
case 1:
MakeFirework2(_local3);
break;
case 2:
break;
case 3:
MakeFirework3(_local3, 4);
break;
};
this.removeChild(_local3);
_local3.Free();
} else {
_local2++;
};
};
}
public function MakeFirework2(_arg1:OBubble):void{
var _local4:Point;
var _local5:Point;
var _local6:Number;
var _local7:Number;
var _local8:OBubble;
var _local2:int = OUtils.Random(2, 4);
var _local3:int;
while (_local3 < _local2) {
if (this.numChildren >= OBang.iMaxBubbles){
return;
};
_local4 = Point.polar((Math.random() * _arg1.prRadius), ((Math.random() * Math.PI) * 2));
_local4.offset(_arg1.prX, _arg1.prY);
_local5 = Point.polar(OUtils.Random(2, 3), ((Math.random() * Math.PI) * 2));
_local6 = OUtils.Random((_arg1.prRadius / 3), (_arg1.prRadius / 2));
if (_local6 < 4){
_local6 = 4;
} else {
if (_local6 > 10){
_local6 = 10;
};
};
_local7 = OUtils.Random(-0.2, -0.1);
_local8 = OBubble.MakeFireworkBubble((_local6 * 2), _local6, _local7, ((_local7 / _local6) * 0.5), Math.round((Math.random() * 5)), _local4.x, _local4.y, _local5.x, _local5.y);
_local8.prType = 2;
this.addChild(_local8);
_local3++;
};
}
public function MakeFirework3(_arg1:OBubble, _arg2:int):void{
var _local5:OSprite;
var _local6:Point;
var _local7:Point;
var _local8:Number;
var _local9:Number;
var _local10:OBubble;
var _local3:int = ((_arg2)==4) ? OUtils.Random(1, 2) : OUtils.Random(2, 4);
var _local4:int;
while (_local4 < _local3) {
if (this.numChildren >= OBang.iMaxBubbles){
return;
};
_local5 = (_arg1.parent as OSprite);
_local6 = Point.polar((Math.random() * _arg1.prRadius), ((Math.random() * Math.PI) * 2));
_local6.offset((_arg1.prX + _local5.prX), (_arg1.prY + _local5.prY));
_local7 = Point.polar(OUtils.Random(1.5, 2), ((Math.random() * Math.PI) * 2));
_local8 = OUtils.Random((_arg1.prRadius / 3), OUtils.Random(2, 4));
if (_local8 < 4){
_local8 = 4;
} else {
if (_local8 > 10){
_local8 = 10;
};
};
_local9 = OUtils.Random(-0.3, -0.1);
_local10 = OBubble.MakeFireworkBubble((_local8 * 2), _local8, _local9, ((_local9 / _local8) * 0.5), _arg1.prCInd, _local6.x, _local6.y, _local7.x, _local7.y);
_local10.prType = _arg2;
this.addChild(_local10);
_local4++;
};
}
public function MakeFirework0():void{
var _local1:OBubble = OBubble.MakeFireworkBubble(OUtils.Random(4, 7), OUtils.Random(18, 20), OUtils.Random(0.08, 0.1), 0, Math.round((Math.random() * 5)), 400, 600, OUtils.Random(-2.5, 2.5), OUtils.Random(-3.5, -2));
_local1.prType = 0;
this.addChild(_local1);
}
public function MakeFirework1(_arg1:OBubble):void{
var _local4:Point;
var _local5:Point;
var _local6:Number;
var _local7:OBubble;
var _local2:int = OUtils.Random(3, 5);
var _local3:int;
while (_local3 < _local2) {
if (this.numChildren >= OBang.iMaxBubbles){
return;
};
_local4 = Point.polar((Math.random() * _arg1.prRadius), ((Math.random() * Math.PI) * 2));
_local4.offset(_arg1.prX, _arg1.prY);
_local5 = Point.polar(OUtils.Random(3, 4), ((Math.random() * Math.PI) * 2));
_local6 = OUtils.Random(((_arg1.prRadius / 4) * 3), _arg1.prRadius);
if (_local6 < 4){
_local6 = 4;
} else {
if (_local6 > 10){
_local6 = 10;
};
};
_local7 = OBubble.MakeFireworkBubble(_local6, (_local6 * 2), OUtils.Random(0.1, 0.2), 0, Math.round((Math.random() * 5)), _local4.x, _local4.y, _local5.x, _local5.y);
_local7.prType = 1;
this.addChild(_local7);
_local3++;
};
}
public function Clear():void{
super.Free();
}
override public function Free():void{
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
super.Free();
}
}
}//package MAIN.OBJECTS
Section 64
//OBubble (MAIN.OBJECTS.OBubble)
package MAIN.OBJECTS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBubble extends OSprite {
private var iBMSA:Array;
private var iType:int;
private var iCInd:int;
private var iBMA:Array;
private var iDelta:Number;
private var iRadius:Number;
private var iBMS:OBitmap;
private var iDAlpha:Number;
private var iState:int;// = 0
private var iDRadius:Number;
private var iERadius:Number;
private var iBM:OBitmap;
private var iVel:Point;
private var iSRadius:Number;
private var iBaseP:Point;
public static const stHide:int = 5;
public static const stMove:int = 10;
public static const stInvisible:int = 0;
public static const stFlyOut:int = 11;
public static const stBeforeShow:int = 1;
public static const stBeforeBang:int = 7;
public static const stBeforeFirework:int = 6;
public static const stNormal:int = 3;
public static const stBeforeHide:int = 4;
public static const stBeforeMove:int = 9;
public static const stBang:int = 8;
public static const stShow:int = 2;
public static var iColorsCount:int = 7;
public static var iCIndexes:Array = [0, 60, 120, 180, 240, 300, -1];
public function OBubble(_arg1:Number=15, _arg2:int=0, _arg3:Number=0, _arg4:Number=0){
this.iBMA = UI.iCache.GetItem("Bubble");
this.iBMSA = UI.iCache.GetItem("Shadow");
this.iBMS = new OBitmap();
this.addChild(this.iBMS);
this.iBM = new OBitmap();
this.iBMS.Pos(5, 5);
this.addChild(this.iBM);
this.iCInd = _arg2;
this.prRadius = _arg1;
this.iBaseP = new Point(_arg3, _arg4);
this.Pos(_arg3, _arg4);
}
public function set prRadius(_arg1:Number):void{
this.iRadius = _arg1;
if (this.iRadius < 2){
this.iRadius = 2;
};
if (this.iCInd < 0){
return;
};
var _local2:int = ((Math.round(((this.iRadius * 2) - 4)) * iColorsCount) + this.iCInd);
this.iBM.Init(this.iBMA[_local2].prOBM);
this.iBMS.Init(this.iBMSA[_local2].prOBM);
}
public function OnEnterFrame(_arg1:Event):void{
switch (this.iState){
case stBeforeShow:
if (this.iDelta-- <= 0){
this.State = stShow;
};
break;
case stShow:
this.prRadius = (this.prRadius + this.iDRadius);
this.alpha = (this.alpha + this.iDAlpha);
if ((((((this.iDRadius >= 0)) && ((this.iRadius >= this.iERadius)))) || ((((this.iDRadius < 0)) && ((this.iRadius <= this.iERadius)))))){
this.prRadius = this.iERadius;
this.State = stNormal;
};
break;
case stBeforeHide:
if (this.iDelta-- <= 0){
this.State = stHide;
};
break;
case stHide:
this.prRadius = (this.prRadius + this.iDRadius);
this.alpha = (this.alpha - this.iDAlpha);
if ((((((this.iDRadius >= 0)) && ((this.iRadius >= this.iERadius)))) || ((((this.iDRadius < 0)) && ((this.iRadius <= this.iERadius)))))){
this.prRadius = this.iSRadius;
this.alpha = 1;
this.State = stInvisible;
};
break;
case stBeforeFirework:
this.Move(this.iVel.x, this.iVel.y);
this.prRadius = (this.prRadius + this.iDRadius);
this.alpha = (this.alpha + this.iDAlpha);
if ((((((this.iDRadius >= 0)) && ((this.iRadius >= this.iERadius)))) || ((((this.iDRadius < 0)) && ((this.iRadius <= this.iERadius)))))){
this.State = stBang;
};
break;
case stBeforeBang:
if (this.iDelta-- <= 0){
this.State = stBang;
};
break;
case stBeforeMove:
if (this.iDelta-- <= 0){
this.State = stMove;
};
break;
case stMove:
this.Move(this.iVel.x, this.iVel.y);
this.alpha = (this.alpha - this.iDAlpha);
if (this.alpha <= 0){
this.Pos(this.iBaseP.x, this.iBaseP.y);
this.alpha = 1;
this.prCInd = -1;
};
break;
case stFlyOut:
if (this.iDelta-- <= 0){
this.State = stBang;
};
break;
};
}
public function set prDAlpha(_arg1:Number):void{
this.iDAlpha = _arg1;
}
public function set prCInd(_arg1:int):void{
this.iCInd = _arg1;
if (this.iCInd < 0){
this.State = stInvisible;
} else {
this.State = stNormal;
this.prRadius = this.iRadius;
};
}
public function get prRadius():Number{
return (this.iRadius);
}
public function set prVel(_arg1:Point):void{
this.iVel = _arg1;
}
public function InitHide(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int):void{
this.iDelta = _arg1;
this.iSRadius = _arg2;
this.iERadius = _arg3;
this.iDRadius = ((_arg3 - _arg2) / _arg5);
this.iDAlpha = ((1 - _arg4) / _arg5);
this.prRadius = _arg2;
this.alpha = 1;
if (_arg1){
this.State = stBeforeHide;
} else {
this.State = stHide;
};
}
public function get prVel():Point{
return (this.iVel);
}
public function get prDAlpha():Number{
return (this.iDAlpha);
}
public function get prDelta():int{
return (this.iDelta);
}
public function get prBasePoint():Point{
return (this.iBaseP);
}
public function set State(_arg1:int):void{
this.iState = _arg1;
switch (this.iState){
case stInvisible:
this.prVisible = false;
break;
case stBeforeShow:
this.prVisible = false;
break;
case stShow:
this.prVisible = true;
break;
case stBang:
this.prVisible = false;
break;
case stNormal:
this.prVisible = true;
break;
};
}
override public function Free():void{
this.iBMA = null;
this.iBMSA = null;
this.iBM = null;
this.iBMS = null;
super.Free();
}
public function get prCInd():int{
return (this.iCInd);
}
public function get prType():int{
return (this.iType);
}
public function InitShow(_arg1:int, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int):void{
this.iDelta = _arg1;
this.iSRadius = _arg2;
this.iERadius = _arg3;
this.iDRadius = ((_arg3 - _arg2) / _arg5);
this.iDAlpha = ((1 - _arg4) / _arg5);
this.prRadius = _arg2;
this.alpha = _arg4;
if (_arg1){
this.State = stBeforeShow;
} else {
this.State = stShow;
};
}
public function get State():int{
return (this.iState);
}
public function set prDelta(_arg1:int):void{
this.iDelta = _arg1;
}
public function set prBasePoint(_arg1:Point):void{
this.iBaseP = _arg1;
}
public function set prType(_arg1:int):void{
this.iType = _arg1;
}
public static function MakeBubble(_arg1:Array):OBitmap{
var _local3:DisplayObject;
var _local4:Array;
var _local2:Sprite = new ((UI.OBubbleC as Class));
var _local5:Number = (_arg1[1] / 91);
var _local6:Number = (_arg1[2] * OGlobal.Scale);
_local3 = _local2.getChildAt(0);
_local4 = _local3.filters;
_local4[0].color = ODisplay.HSBToRGB(iCIndexes[_arg1[3]], 1, 0.84);
_local4[0].blurX = (_local4[0].blurX * _local6);
_local4[0].blurY = (_local4[0].blurY * _local6);
_local4[0].distance = (_local4[0].distance * _local6);
_local3.filters = _local4;
_local3 = _local2.getChildAt(1);
_local4 = _local3.filters;
_local4[0].color = ODisplay.HSBToRGB(iCIndexes[_arg1[3]], 0.42, 1);
_local4[0].blurX = (_local4[0].blurX * _local6);
_local4[0].blurY = (_local4[0].blurY * _local6);
_local4[0].distance = (_local4[0].distance * _local6);
_local3.filters = _local4;
_local3 = _local2.getChildAt(2);
_local4 = _local3.filters;
_local4[0].color = ODisplay.HSBToRGB(iCIndexes[_arg1[3]], 0.33, 1);
_local4[0].blurX = (_local4[0].blurX * _local6);
_local4[0].blurY = (_local4[0].blurY * _local6);
_local4[0].distance = (_local4[0].distance * _local6);
_local3.filters = _local4;
_local3 = _local2.getChildAt(4);
_local4 = _local3.filters;
_local4[0].highlightColor = ODisplay.HSBToRGB(iCIndexes[_arg1[3]], 0.16, 1);
_local4[0].blurX = (_local4[0].blurX * _local6);
_local4[0].blurY = (_local4[0].blurY * _local6);
_local4[0].distance = (_local4[0].distance * _local6);
_local3.filters = _local4;
return (OBitmap.MakeTmp(_local2, _local5, 0, 0, 2));
}
public static function MakeShadow(_arg1:Array):OBitmap{
var _local3:DisplayObject;
var _local4:Array;
var _local2:Sprite = new ((UI.OBubbleShadowC as Class));
var _local5:Number = (_arg1[1] / 91);
_local3 = _local2.getChildAt(0);
_local4 = _local3.filters;
_local4[0].color = ODisplay.HSBToRGB(iCIndexes[_arg1[3]], 1, 0.33);
_local4[0].alpha = 0.33;
_local3.filters = _local4;
return (OBitmap.MakeTmp(_local2, _local5, 0, 0, 4));
}
public static function MakeFireworkBubble(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):OBubble{
var _local10:OBubble = new OBubble(_arg1, _arg5, _arg6, _arg7);
_local10.iSRadius = _arg1;
_local10.iERadius = _arg2;
_local10.iDRadius = _arg3;
_local10.iDAlpha = _arg4;
_local10.iVel = new Point(_arg8, _arg9);
_local10.State = stBeforeFirework;
return (_local10);
}
}
}//package MAIN.OBJECTS
Section 65
//OCursor (MAIN.OBJECTS.OCursor)
package MAIN.OBJECTS {
import ENGINE.DISPLAY.*;
import flash.events.*;
public class OCursor extends OSprite {
private var iState:int;
private static const stAnim2:int = 2;
private static const stNormal:int = 0;
private static const stAnim1:int = 1;
public function OCursor(_arg1:OBitmap){
this.addChild(_arg1);
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.State = stNormal;
}
private function set State(_arg1:int):void{
this.iState = _arg1;
switch (iState){
case stNormal:
this.scaleX = 1;
this.scaleY = 1;
break;
case stAnim1:
this.scaleX = 1;
this.scaleY = 1;
break;
case stAnim2:
this.scaleX = 0.7;
this.scaleY = 0.7;
break;
};
}
private function OnEnterFrame(_arg1:Event):void{
switch (iState){
case stAnim1:
this.scaleX = (this.scaleX - 0.05);
this.scaleY = (this.scaleY - 0.05);
if (this.scaleX < 0.7){
State = stAnim2;
};
break;
case stAnim2:
this.scaleX = (this.scaleX + 0.05);
this.scaleY = (this.scaleY + 0.05);
if (this.scaleX > 1){
State = stNormal;
};
break;
};
}
public function Blink():void{
this.State = stAnim1;
}
}
}//package MAIN.OBJECTS
Section 66
//OField (MAIN.OBJECTS.OField)
package MAIN.OBJECTS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import flash.geom.*;
import ENGINE.CORE.*;
import flash.utils.*;
import ENGINE.SMARTFOX.*;
public class OField extends OSprite {
private var iField:Array;
private var iBorderCount:int;
private var iDiameter:Number;
private var iCursor:OCursor;
private var iRecord:ORecord;
private var iNBub:OBubble;
private var iRand:ORandomInt;
private var iFBub:OBubble;
private var iColors:Array;
private var iBang:OBang;
private var iRandomP:int;// = 25
private var iBangCount:int;
private var dTime:Number;
private var iCounter:OCounter;
private var iScorePurBubble:int;// = 10
private var iFBubP:Point;
private var iRadius:Number;
private var iDir:Point;
private var iBubbleFall:Boolean;
private var iRTime:int;
private var iMaxColors:int;
private var iRRect:Rectangle;
private var iConnectDist2:Number;
private var iCIndexes:Array;
private var iState:int;// = 0
private var iBubbleCount:int;
private var iDY:Number;
private var iNewField:Array;
private var iTime:int;
private var iFC:int;
private var iRect:Rectangle;
private var iLostShoot:Boolean;
private var iMx:int;
private var iMy:int;
private var iFR:int;
public static const stGameOverShow:int = 10;
private static const iInd:Array = [[-1, -1], [-1, 0], [-1, 1], [0, -1], [0, 0], [0, 1], [1, -1], [1, 0], [1, 1]];
public static const stShowFBub:int = 2;
public static const stInvisible:int = 0;
public static const stAddNewBub:int = 6;
public static const iFCols:int = 16;
public static const stShuffle:int = 7;
public static const stMoveFBub:int = 4;
public static const stShowField:int = 1;
public static const stGameOver:int = 11;
public static const stNormal:int = 3;
public static const stLevelCompShow:int = 8;
public static const stCalcRemove:int = 5;
public static const stLevelComplete:int = 9;
public static const iFRows:int = 21;
private static var iLevels:Array = [[[3, 6, 25], [0, 1, 2], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0], [0, 0, 3, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 3, 0], [0, 0, 1, 1, 0, 0, 0, 3, 3, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 8, 0, 0, 3, 0, 2, 0, 3, 0, 0, 8, 0, 0], [0, 0, 0, 0, 0, 3, 0, 2, 2, 0, 3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 0, 2, 0, 3, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0], [0, 0, 3, 0, 3, 0, 0, 1, 0, 1, 0, 0, 3, 0, 3, 0], [0, 0, 2, 2, 0, 0, 0, 3, 3, 0, 0, 0, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0]], [[3, 0, 15], [3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 2, 3, 1, 1, 3, 2, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 0, 3, 3, 0, 3, 0, 0, 0, 0, 0], [0, 0, 0, 2, 0, 0, 1, 2, 3, 2, 1, 0, 0, 2, 0, 0], [0, 0, 0, 2, 3, 0, 1, 0, 0, 1, 0, 3, 2, 0, 0, 0], [0, 0, 0, 1, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 0, 0], [0, 0, 0, 1, 2, 0, 0, 2, 2, 0, 0, 2, 1, 0, 0, 0], [0, 0, 0, 0, 0, 2, 0, 0, 8, 0, 0, 2, 0, 0, 0, 0]], [[3, 0, 15], [0, 2, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0], [0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 0, 3, 2, 1, 2, 3, 0, 8, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0], [0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 2, 1, 2, 3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 0, 3, 2, 1, 2, 3, 0, 8, 0, 0, 0], [0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0]], [[3, 0, 15], [0, 1, 2], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 1, 3, 0, 3, 8, 3, 0, 3, 1, 3, 0, 0], [0, 0, 2, 0, 0, 2, 0, 1, 1, 0, 2, 0, 0, 2, 0, 0], [0, 0, 1, 0, 0, 0, 1, 3, 2, 3, 1, 0, 0, 0, 1, 0], [0, 3, 0, 8, 0, 0, 0, 1, 3, 0, 0, 0, 8, 0, 3, 0], [0, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0], [0, 0, 1, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 2, 1, 3, 1, 3, 2, 3, 1, 3, 1, 2, 0, 0], [0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 3, 0, 0], [0, 0, 2, 0, 0, 8, 0, 1, 2, 1, 0, 8, 0, 0, 2, 0], [0, 0, 1, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 1, 0, 0], [0, 0, 0, 2, 1, 3, 2, 0, 0, 0, 2, 3, 1, 2, 0, 0]], [[3, 0, 15], [3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [1, 0, 0, 2, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0], [2, 0, 3, 0, 3, 0, 3, 3, 0, 3, 0, 3, 0, 2, 0, 0], [0, 3, 2, 0, 0, 1, 2, 0, 2, 1, 0, 0, 2, 3, 0, 0], [0, 0, 0, 2, 8, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0], [0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0], [0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0], [0, 8, 2, 3, 2, 1, 2, 1, 2, 1, 2, 3, 2, 8, 0, 0], [3, 2, 1, 0, 0, 0, 3, 3, 0, 0, 0, 1, 2, 3, 0, 0], [0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 2, 8, 0, 0, 3, 3, 0, 0, 8, 2, 0, 0, 0, 0], [0, 0, 3, 1, 2, 3, 1, 2, 1, 3, 2, 1, 3, 0, 0, 0], [2, 1, 0, 0, 0, 2, 3, 3, 2, 0, 0, 0, 1, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[3, 0, 15], [1, 3, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 2, 0, 2, 0, 0, 3, 0, 0, 0, 3, 0, 0, 2, 0, 2], [0, 3, 1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 3, 1, 0], [0, 0, 8, 0, 0, 3, 2, 0, 0, 0, 2, 3, 0, 0, 8, 0], [0, 3, 0, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 0, 3, 0], [0, 0, 1, 0, 1, 0, 0, 3, 0, 3, 0, 0, 1, 0, 1, 0], [0, 0, 2, 3, 0, 0, 0, 2, 2, 0, 0, 0, 3, 2, 0, 0], [0, 0, 1, 8, 1, 0, 0, 3, 0, 3, 0, 0, 1, 8, 1, 0], [0, 3, 0, 0, 2, 0, 1, 0, 0, 1, 0, 2, 0, 0, 3, 0], [0, 1, 0, 0, 0, 3, 2, 0, 0, 0, 2, 3, 0, 0, 0, 1], [3, 0, 0, 0, 3, 8, 3, 0, 0, 3, 8, 3, 0, 0, 0, 3], [0, 1, 0, 0, 2, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 1], [0, 2, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 2, 0], [0, 0, 1, 2, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2, 1, 0]], [[3, 0, 15], [0, 1, 2], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 3, 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0], [0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], [0, 2, 0, 0, 0, 0, 2, 3, 3, 2, 0, 0, 0, 0, 2, 0], [0, 3, 1, 2, 3, 0, 1, 0, 8, 0, 1, 0, 3, 2, 1, 3], [1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 3, 2, 1, 3, 2, 1], [0, 0, 8, 2, 8, 0, 1, 0, 2, 0, 1, 0, 8, 2, 8, 0], [0, 0, 1, 3, 1, 3, 2, 1, 3, 2, 3, 1, 3, 1, 0, 0], [0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0], [0, 0, 2, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 2, 0, 0], [0, 0, 0, 3, 0, 0, 3, 1, 2, 3, 0, 0, 0, 3, 0, 0], [0, 0, 0, 1, 2, 0, 8, 3, 1, 8, 0, 2, 1, 0, 0, 0], [0, 0, 0, 0, 2, 3, 2, 1, 8, 1, 2, 3, 2, 0, 0, 0]], [[3, 0, 15], [3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 1, 2], [1, 3, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 3, 1], [0, 2, 2, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 2, 2], [0, 3, 0, 0, 0, 2, 3, 0, 0, 3, 2, 0, 0, 0, 3, 0], [0, 8, 8, 0, 1, 3, 1, 3, 8, 3, 1, 3, 1, 0, 8, 8], [0, 3, 0, 3, 0, 0, 3, 0, 0, 3, 0, 0, 3, 0, 3, 0], [0, 0, 1, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 8, 2, 3, 3, 2, 0, 2, 3, 3, 2, 8, 0, 0], [0, 0, 1, 2, 0, 0, 0, 2, 2, 0, 0, 0, 2, 1, 0, 0], [0, 3, 3, 0, 2, 0, 0, 3, 0, 3, 0, 0, 2, 0, 3, 3], [0, 1, 2, 0, 2, 8, 1, 0, 0, 1, 8, 2, 0, 2, 1, 0], [0, 0, 0, 0, 0, 1, 1, 3, 3, 3, 1, 1, 0, 0, 0, 0]], [[4, 0, 15], [1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0], [0, 3, 0, 4, 0, 0, 2, 0, 0, 2, 0, 0, 4, 0, 3, 0], [0, 3, 0, 0, 4, 3, 2, 0, 0, 0, 2, 3, 4, 0, 0, 3], [2, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0, 2], [0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 0, 1, 9, 0, 0, 0], [0, 0, 0, 9, 0, 1, 0, 0, 0, 0, 1, 0, 9, 0, 0, 0], [0, 1, 1, 9, 0, 0, 2, 0, 0, 0, 2, 0, 0, 9, 0, 0], [0, 0, 9, 0, 0, 4, 3, 2, 2, 3, 4, 0, 0, 9, 0, 0], [0, 8, 8, 1, 1, 4, 0, 2, 1, 2, 0, 4, 1, 1, 8, 8], [0, 0, 0, 0, 4, 0, 0, 3, 3, 0, 0, 4, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 2, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2]], [[4, 0, 15], [0, 1, 2, 3], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [1, 2, 3, 4, 1, 0, 0, 0, 0, 0, 0, 1, 4, 3, 2, 1], [8, 8, 8, 2, 0, 0, 0, 0, 0, 0, 0, 2, 8, 8, 8, 8], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 1, 0, 0, 8, 0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0], [0, 0, 0, 0, 3, 0, 0, 1, 3, 1, 0, 0, 3, 0, 0, 0], [0, 0, 4, 4, 8, 0, 0, 2, 2, 0, 0, 8, 4, 4, 0, 0], [0, 1, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 1], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 2, 2, 3, 3, 4, 8, 4, 3, 3, 2, 2, 0, 0], [0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0], [0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0]], [[4, 0, 15], [2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 2, 1, 0, 0, 0, 0, 3, 4, 3, 0, 0, 0, 0, 1, 2], [0, 0, 2, 3, 0, 1, 2, 0, 0, 2, 1, 0, 3, 2, 0, 0], [0, 0, 1, 0, 0, 8, 0, 4, 0, 4, 0, 8, 0, 0, 1, 0], [0, 2, 0, 0, 8, 0, 0, 3, 3, 0, 0, 8, 0, 0, 2, 0], [0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0], [0, 0, 8, 1, 1, 2, 0, 8, 8, 0, 2, 1, 1, 8, 0, 0], [0, 0, 2, 2, 0, 0, 2, 8, 4, 8, 2, 0, 0, 2, 2, 0], [0, 3, 0, 0, 0, 2, 3, 3, 3, 3, 2, 0, 0, 0, 3, 0], [0, 0, 4, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 4, 0], [0, 0, 3, 0, 2, 1, 0, 0, 0, 0, 1, 2, 0, 3, 0, 0], [0, 0, 0, 4, 3, 2, 2, 3, 0, 3, 2, 2, 3, 4, 0, 0], [0, 0, 0, 8, 4, 4, 0, 0, 0, 0, 4, 4, 8, 0, 0, 0], [0, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3]], [[4, 0, 15], [1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 4, 3, 2, 1, 1, 4, 3, 2, 3, 4, 1, 1, 2, 3, 4], [0, 3, 0, 2, 4, 0, 0, 0, 0, 0, 0, 4, 2, 0, 3, 0], [0, 4, 0, 3, 3, 0, 0, 8, 4, 8, 0, 0, 3, 3, 0, 4], [2, 2, 0, 2, 0, 0, 8, 2, 2, 8, 0, 0, 2, 0, 2, 2], [0, 0, 0, 1, 3, 0, 8, 3, 1, 3, 8, 0, 3, 1, 0, 0], [0, 0, 2, 0, 1, 8, 0, 0, 0, 0, 8, 1, 0, 2, 0, 0], [0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3], [0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0], [0, 1, 0, 0, 2, 0, 1, 0, 8, 0, 1, 0, 2, 0, 0, 1], [0, 2, 0, 4, 0, 2, 3, 0, 0, 3, 2, 0, 4, 0, 2, 0], [0, 0, 1, 3, 3, 4, 3, 0, 0, 0, 3, 4, 3, 3, 1, 0], [3, 2, 8, 3, 0, 1, 2, 0, 0, 2, 1, 0, 3, 8, 2, 3], [0, 2, 8, 0, 0, 0, 1, 2, 4, 2, 1, 0, 0, 0, 8, 2]], [[4, 0, 15], [0, 1, 2, 3], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 0, 4, 3, 4, 3, 4, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 0, 0, 0, 0, 0, 0], [0, 0, 2, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 2, 0], [0, 0, 3, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 3, 0, 0], [0, 0, 0, 4, 1, 2, 3, 3, 1, 2, 3, 2, 1, 4, 0, 0], [0, 0, 3, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 3, 0, 0], [0, 0, 2, 0, 8, 8, 0, 0, 0, 0, 0, 8, 8, 0, 2, 0], [0, 0, 1, 0, 0, 1, 2, 4, 4, 2, 1, 0, 0, 1, 0, 0], [0, 0, 0, 2, 0, 2, 0, 0, 1, 0, 0, 2, 0, 2, 0, 0], [0, 8, 8, 0, 4, 0, 0, 2, 2, 0, 0, 4, 0, 8, 8, 0], [0, 0, 3, 0, 0, 3, 0, 8, 1, 8, 0, 3, 0, 0, 3, 0], [0, 0, 2, 0, 0, 2, 1, 0, 0, 1, 2, 0, 0, 2, 0, 0], [0, 1, 2, 1, 2, 3, 0, 0, 8, 0, 0, 3, 2, 1, 2, 1], [0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0]], [[4, 0, 15], [2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [1, 2, 3, 4, 0, 0, 0, 2, 1, 2, 0, 0, 1, 2, 3, 4], [8, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 8], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 2, 3, 4, 2, 1, 0, 0, 0, 0, 1, 2, 4, 3, 2, 0], [0, 8, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 8], [1, 2, 3, 4, 0, 0, 3, 0, 0, 3, 0, 0, 4, 3, 2, 1], [0, 3, 0, 8, 0, 0, 0, 2, 8, 2, 0, 0, 0, 8, 0, 3], [4, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 4], [0, 3, 0, 0, 4, 8, 0, 1, 0, 1, 0, 8, 4, 0, 0, 3], [0, 2, 0, 3, 2, 0, 2, 0, 0, 2, 0, 2, 3, 0, 2, 0], [0, 4, 1, 2, 0, 3, 1, 0, 0, 0, 1, 3, 0, 2, 1, 4], [0, 1, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 1, 0], [0, 0, 3, 0, 0, 0, 2, 4, 8, 4, 2, 0, 0, 0, 3, 0], [0, 1, 1, 3, 3, 2, 0, 0, 0, 0, 2, 3, 3, 1, 1, 0]], [[4, 0, 15], [1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 3, 0, 0, 4, 3, 3, 3, 4, 0, 0, 3, 0, 0], [0, 0, 0, 3, 0, 0, 2, 1, 1, 2, 0, 0, 3, 0, 0, 0], [0, 0, 0, 0, 2, 2, 8, 8, 8, 8, 8, 2, 2, 0, 0, 0], [0, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 0], [0, 0, 0, 3, 0, 0, 2, 0, 0, 0, 2, 0, 0, 3, 0, 0], [8, 8, 8, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 8, 8, 8], [0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 2, 0, 0, 4, 0, 0], [0, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0], [0, 0, 0, 0, 4, 8, 8, 1, 1, 1, 8, 8, 4, 0, 0, 0], [0, 0, 0, 2, 0, 0, 3, 0, 0, 3, 0, 2, 0, 0, 0, 0], [0, 0, 0, 4, 0, 0, 0, 1, 0, 1, 0, 0, 4, 0, 0, 0], [0, 0, 2, 0, 0, 0, 0, 3, 3, 0, 0, 0, 2, 0, 0, 0], [0, 0, 4, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 4, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[4, 0, 15], [0, 1, 2, 3], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 4, 0, 0, 0, 4, 3, 1, 3, 4, 0, 0, 0, 4, 0], [0, 0, 3, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 3, 0, 0], [0, 0, 0, 2, 1, 0, 0, 3, 4, 3, 0, 0, 1, 2, 0, 0], [0, 0, 0, 8, 2, 0, 0, 1, 1, 0, 0, 2, 8, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 8, 8, 8, 0, 1, 0, 0, 0, 0], [8, 8, 0, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 0, 8, 8], [0, 0, 8, 2, 2, 0, 4, 0, 3, 0, 4, 0, 2, 2, 8, 0], [0, 0, 8, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 8, 0, 0], [0, 1, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 1], [0, 4, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 4, 0], [0, 0, 1, 1, 3, 4, 3, 0, 0, 0, 3, 4, 3, 1, 1, 0], [0, 0, 3, 0, 3, 1, 1, 0, 0, 1, 1, 3, 0, 3, 0, 0], [0, 0, 0, 2, 4, 4, 0, 8, 0, 8, 0, 4, 4, 2, 0, 0], [3, 3, 2, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 2, 3, 3]], [[4, 0, 15], [2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [1, 1, 1, 0, 0, 0, 4, 2, 3, 1, 4, 0, 0, 4, 4, 4], [3, 2, 2, 0, 0, 0, 1, 2, 3, 1, 0, 0, 0, 3, 2, 2], [0, 3, 0, 0, 0, 0, 0, 4, 3, 4, 0, 0, 0, 0, 1, 0], [3, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 1, 0], [4, 1, 0, 0, 0, 8, 8, 0, 1, 8, 8, 0, 0, 0, 1, 4], [8, 8, 0, 1, 0, 0, 0, 2, 2, 0, 0, 0, 1, 0, 8, 8], [0, 3, 0, 2, 0, 0, 3, 4, 3, 4, 3, 0, 0, 2, 0, 3], [0, 2, 0, 1, 4, 1, 0, 2, 2, 0, 1, 4, 1, 0, 2, 0], [0, 0, 8, 0, 2, 8, 0, 0, 0, 0, 0, 8, 2, 0, 8, 0], [0, 1, 0, 1, 0, 1, 2, 4, 4, 2, 1, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 1], [0, 2, 0, 2, 3, 4, 4, 0, 0, 4, 4, 3, 2, 0, 2, 0], [0, 0, 3, 3, 1, 1, 0, 0, 0, 0, 0, 1, 1, 3, 3, 0], [8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8]], [[4, 0, 15], [0, 1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 8, 3, 4, 3, 4, 3, 8, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, 8, 1, 4, 1, 8, 0, 2, 0, 0, 0], [0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 4, 0, 2, 0, 0, 0], [0, 0, 0, 4, 0, 3, 0, 8, 1, 8, 0, 3, 0, 2, 0, 0], [0, 0, 4, 0, 5, 0, 4, 2, 3, 1, 0, 1, 0, 2, 0, 0], [0, 0, 8, 0, 8, 0, 8, 3, 1, 4, 8, 0, 8, 0, 8, 0], [0, 0, 3, 0, 2, 0, 3, 4, 3, 2, 0, 2, 0, 1, 0, 0], [0, 0, 0, 3, 0, 4, 0, 8, 1, 8, 0, 4, 0, 1, 0, 0], [0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0], [0, 0, 0, 0, 2, 0, 8, 3, 3, 3, 8, 0, 2, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 8, 1, 1, 8, 2, 2, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[5, 0, 15], [1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 2, 1, 2, 3, 1, 0, 1, 3, 2, 1, 3, 0, 0], [0, 0, 4, 0, 8, 5, 8, 0, 0, 8, 5, 8, 0, 4, 0, 0], [0, 0, 2, 0, 0, 8, 8, 4, 5, 4, 8, 8, 0, 0, 3, 0], [0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0], [0, 1, 0, 0, 0, 5, 2, 0, 0, 0, 2, 3, 0, 0, 0, 1], [0, 2, 0, 0, 4, 0, 3, 0, 0, 3, 0, 1, 0, 0, 2, 0], [0, 0, 5, 0, 3, 0, 0, 4, 0, 4, 0, 0, 4, 0, 3, 0], [0, 0, 5, 2, 0, 0, 0, 5, 5, 0, 0, 0, 5, 3, 0, 0], [0, 0, 8, 1, 8, 1, 2, 3, 4, 3, 2, 1, 8, 5, 8, 0], [0, 0, 8, 8, 0, 0, 0, 5, 2, 0, 0, 0, 8, 8, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 4, 3, 0, 0, 4, 0, 0, 0, 0], [0, 0, 0, 0, 0, 2, 2, 8, 1, 8, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, 8, 8, 3, 0, 0, 0, 0, 0, 0]], [[5, 0, 15], [0, 1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 2, 1, 1, 4, 0, 5, 1, 0, 2, 1, 1, 4, 0, 0], [0, 9, 9, 9, 9, 9, 1, 2, 3, 9, 9, 9, 9, 9, 0, 0], [0, 3, 1, 1, 0, 0, 8, 3, 5, 8, 0, 0, 1, 1, 3, 0], [0, 3, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 3, 0, 0], [0, 0, 4, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 4, 0, 0], [0, 0, 4, 0, 0, 5, 0, 0, 0, 5, 0, 0, 4, 0, 0, 0], [0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0], [0, 0, 8, 0, 5, 8, 0, 0, 0, 8, 5, 0, 8, 0, 0, 0], [0, 0, 5, 1, 0, 5, 3, 3, 3, 3, 5, 0, 1, 1, 0, 0], [0, 5, 0, 1, 2, 0, 0, 4, 0, 0, 2, 1, 0, 1, 0, 0], [2, 3, 0, 1, 8, 1, 5, 4, 4, 5, 1, 8, 1, 0, 5, 2], [2, 3, 1, 0, 8, 2, 3, 0, 2, 3, 8, 0, 1, 5, 2, 0], [0, 0, 2, 0, 0, 8, 5, 1, 1, 4, 8, 0, 0, 4, 0, 0], [0, 0, 2, 3, 2, 8, 5, 1, 4, 8, 2, 3, 4, 0, 0, 0]], [[5, 0, 15], [1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [9, 0, 0, 9, 0, 4, 5, 1, 2, 3, 4, 0, 9, 0, 0, 9], [9, 0, 9, 2, 3, 8, 8, 8, 8, 8, 3, 2, 9, 0, 9, 0], [0, 9, 9, 1, 0, 1, 2, 3, 4, 5, 1, 0, 1, 9, 9, 0], [0, 9, 2, 0, 0, 8, 8, 8, 8, 8, 0, 0, 2, 9, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 2, 8, 4, 4, 0, 0, 1, 1, 8, 2, 0, 0, 0], [0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 5, 0, 0, 5, 4, 0, 0, 0, 0, 0], [0, 8, 0, 0, 0, 0, 3, 0, 8, 0, 4, 0, 0, 0, 8, 0], [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 1, 2, 2, 5, 5], [0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [0, 1, 0, 0, 5, 0, 0, 3, 3, 0, 0, 0, 4, 0, 1, 0], [0, 0, 2, 0, 0, 5, 0, 0, 5, 0, 0, 0, 4, 0, 1, 0], [0, 8, 8, 0, 0, 3, 0, 8, 8, 0, 0, 3, 0, 8, 8, 0]], [[5, 0, 15], [0, 1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0], [9, 9, 0, 0, 0, 9, 0, 0, 0, 0, 9, 0, 0, 0, 9, 9], [8, 8, 9, 0, 0, 9, 0, 0, 0, 0, 0, 9, 0, 0, 8, 8], [0, 0, 9, 0, 9, 0, 0, 0, 0, 0, 0, 9, 0, 9, 0, 0], [0, 0, 0, 9, 8, 9, 9, 9, 8, 9, 9, 9, 8, 9, 0, 0], [0, 0, 0, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 0, 0, 0], [0, 0, 0, 1, 9, 9, 8, 9, 9, 9, 8, 9, 9, 4, 0, 0], [0, 0, 2, 0, 0, 9, 8, 9, 9, 8, 9, 0, 0, 3, 0, 0], [0, 0, 2, 0, 1, 0, 9, 0, 0, 0, 9, 0, 1, 0, 3, 0], [0, 1, 3, 0, 0, 9, 8, 5, 5, 8, 9, 0, 0, 2, 1, 0], [0, 1, 5, 3, 2, 0, 0, 4, 4, 4, 0, 0, 1, 2, 0, 1], [0, 5, 4, 4, 8, 0, 3, 3, 3, 3, 0, 8, 1, 1, 2, 2], [0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[5, 0, 15], [1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 8, 1, 1, 8, 9, 9, 8, 1, 1, 8, 0, 0, 0], [0, 0, 8, 2, 2, 8, 9, 9, 9, 8, 2, 2, 8, 0, 0, 0], [0, 0, 8, 3, 3, 8, 9, 9, 9, 9, 8, 3, 3, 8, 0, 0], [0, 0, 8, 4, 4, 8, 9, 9, 9, 8, 4, 4, 8, 0, 0, 0], [0, 0, 0, 8, 5, 5, 8, 9, 9, 8, 5, 5, 8, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 3, 0, 0, 0, 5, 4, 5, 0, 0, 0, 3, 2, 1], [1, 0, 0, 3, 2, 1, 0, 0, 0, 0, 1, 2, 3, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0], [0, 4, 3, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 3, 4, 0], [0, 0, 0, 5, 5, 0, 0, 4, 0, 4, 0, 0, 5, 5, 0, 0], [0, 0, 3, 8, 0, 0, 8, 0, 0, 8, 0, 0, 8, 3, 0, 0], [0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[5, 0, 15], [0, 1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 9, 0, 0, 0, 9, 9, 9, 9, 9, 0, 0, 0, 9, 0], [0, 0, 9, 0, 0, 9, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0], [0, 0, 0, 9, 9, 9, 0, 3, 1, 5, 0, 9, 9, 9, 0, 0], [0, 0, 9, 0, 0, 9, 8, 2, 4, 8, 9, 0, 0, 9, 0, 0], [0, 9, 9, 0, 0, 0, 9, 8, 8, 8, 9, 0, 0, 0, 9, 9], [0, 0, 1, 4, 5, 0, 0, 0, 0, 0, 0, 5, 4, 1, 0, 0], [0, 8, 2, 3, 8, 4, 0, 0, 0, 0, 3, 8, 2, 3, 8, 0], [0, 8, 8, 8, 2, 3, 3, 4, 3, 3, 2, 8, 8, 8, 0, 0], [0, 2, 2, 4, 5, 5, 0, 3, 3, 0, 0, 2, 4, 5, 1, 0], [2, 8, 3, 1, 8, 5, 2, 3, 2, 2, 8, 3, 1, 8, 1, 0], [2, 2, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 5, 5], [0, 1, 1, 0, 0, 0, 4, 5, 5, 4, 0, 0, 0, 1, 1, 5], [0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 4, 0, 0, 2, 0, 0], [0, 0, 0, 2, 3, 3, 0, 0, 0, 0, 3, 3, 2, 0, 0, 0]], [[5, 0, 15], [1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 0, 0, 0, 9, 9, 9], [9, 9, 8, 0, 0, 0, 8, 9, 9, 8, 0, 0, 0, 8, 9, 9], [4, 4, 3, 3, 0, 0, 0, 2, 2, 2, 0, 0, 1, 1, 5, 5], [0, 0, 8, 0, 2, 2, 8, 0, 0, 8, 1, 1, 0, 8, 0, 0], [0, 0, 0, 4, 4, 3, 3, 0, 0, 0, 3, 3, 4, 4, 0, 0], [0, 0, 8, 0, 5, 5, 8, 0, 0, 8, 1, 1, 0, 8, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 8, 0, 0, 0, 8, 5, 4, 8, 0, 0, 0, 8, 1, 1], [3, 3, 5, 5, 0, 0, 0, 5, 5, 4, 0, 0, 0, 4, 3, 3], [1, 1, 8, 0, 0, 0, 8, 3, 3, 8, 0, 0, 0, 8, 2, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 0, 0, 8, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0]], [[5, 0, 15], [0, 1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0], [1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 3, 0], [8, 8, 8, 9, 0, 0, 8, 9, 9, 8, 0, 0, 9, 8, 8, 8], [5, 0, 0, 9, 9, 8, 9, 9, 9, 8, 9, 9, 0, 0, 3, 0], [5, 4, 0, 9, 0, 8, 9, 9, 9, 9, 8, 0, 9, 0, 0, 3], [0, 4, 8, 9, 9, 0, 0, 0, 0, 0, 9, 9, 8, 0, 4, 0], [0, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 0], [1, 1, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 3, 3, 0], [2, 0, 0, 5, 1, 1, 4, 4, 5, 5, 3, 3, 4, 0, 0, 5], [2, 3, 3, 5, 8, 8, 1, 3, 2, 8, 8, 4, 1, 1, 5, 0], [0, 0, 0, 0, 0, 8, 1, 3, 3, 2, 8, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0]], [[5, 0, 15], [1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 9, 9, 9, 0, 0, 0, 1, 2, 3, 0, 0, 0, 9, 9, 9], [0, 9, 9, 3, 0, 0, 8, 8, 8, 8, 0, 0, 3, 9, 9, 0], [0, 0, 8, 8, 3, 2, 1, 0, 0, 0, 4, 5, 3, 8, 8, 0], [0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 4, 5, 0, 0, 0, 0], [0, 4, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0], [4, 2, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 2, 5, 5], [1, 1, 2, 0, 0, 4, 0, 0, 0, 0, 0, 5, 0, 2, 3, 3], [8, 8, 0, 0, 0, 8, 8, 1, 1, 8, 8, 0, 0, 0, 8, 8], [0, 3, 0, 0, 0, 3, 0, 2, 0, 4, 0, 1, 0, 0, 0, 5], [0, 3, 0, 0, 3, 0, 2, 0, 0, 4, 0, 1, 0, 0, 5, 0], [0, 0, 4, 0, 8, 8, 5, 0, 0, 0, 5, 8, 8, 0, 3, 0], [0, 0, 4, 2, 1, 5, 2, 3, 3, 4, 5, 1, 4, 3, 0, 0], [0, 0, 0, 2, 1, 0, 0, 2, 3, 4, 0, 0, 1, 4, 0, 0], [0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0]], [[5, 0, 15], [0, 1, 2, 3, 4], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [9, 9, 9, 0, 0, 0, 5, 4, 3, 2, 0, 0, 0, 0, 9, 9], [9, 9, 0, 8, 0, 0, 8, 8, 8, 0, 0, 8, 0, 9, 9, 9], [9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9], [1, 1, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 4, 4, 4], [8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8], [2, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3], [8, 8, 8, 0, 0, 1, 2, 2, 5, 4, 4, 0, 0, 8, 8, 8], [4, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 1], [4, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 1], [8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8], [1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5], [8, 8, 8, 0, 0, 3, 3, 0, 0, 5, 5, 0, 0, 8, 8, 8], [1, 1, 4, 4, 2, 2, 0, 0, 0, 0, 1, 1, 5, 5, 3, 3], [1, 0, 4, 0, 2, 0, 0, 0, 0, 0, 1, 0, 5, 0, 3, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [9, 9, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0], [9, 9, 9, 0, 0, 9, 9, 0, 0, 0, 9, 9, 0, 0, 9, 0], [9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9], [0, 0, 9, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 9, 0], [0, 0, 0, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 0], [0, 0, 0, 0, 8, 8, 8, 8, 6, 8, 8, 8, 8, 0, 0, 0], [0, 0, 0, 0, 0, 3, 4, 5, 6, 6, 5, 4, 3, 0, 0, 0], [0, 6, 5, 4, 1, 8, 8, 8, 0, 8, 8, 8, 1, 2, 3, 6], [0, 0, 6, 5, 4, 1, 2, 3, 4, 4, 3, 2, 1, 2, 3, 6], [0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 1, 1, 2, 3, 4, 4, 3, 3, 0, 0], [0, 3, 0, 3, 0, 0, 0, 8, 0, 8, 0, 0, 0, 4, 0, 4], [0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 1, 9, 9, 2, 2, 2, 0, 0, 6, 9, 9, 2, 2, 9, 0], [1, 0, 0, 0, 0, 0, 3, 0, 6, 0, 8, 8, 0, 0, 9, 0], [9, 0, 8, 8, 8, 0, 0, 3, 2, 0, 8, 1, 8, 0, 0, 4], [9, 0, 3, 3, 8, 0, 0, 2, 0, 8, 1, 2, 8, 0, 0, 4], [2, 0, 0, 2, 2, 8, 0, 0, 0, 8, 3, 3, 2, 8, 0, 9], [2, 0, 1, 1, 5, 0, 0, 0, 5, 4, 4, 1, 1, 5, 0, 6], [9, 0, 8, 8, 8, 5, 0, 0, 5, 6, 6, 2, 3, 6, 5, 6], [3, 0, 0, 2, 2, 8, 0, 0, 5, 2, 1, 5, 2, 6, 5, 1], [3, 0, 0, 0, 6, 6, 8, 0, 0, 5, 3, 3, 3, 4, 5, 1], [2, 0, 1, 3, 5, 5, 8, 0, 0, 8, 5, 5, 4, 8, 0, 6], [2, 0, 1, 3, 4, 4, 8, 6, 6, 3, 8, 6, 6, 8, 0, 6], [5, 0, 8, 8, 8, 8, 2, 0, 0, 3, 8, 8, 8, 0, 5, 0], [0, 5, 0, 0, 0, 4, 2, 0, 0, 0, 2, 0, 0, 1, 5, 0], [0, 1, 1, 3, 3, 4, 0, 0, 0, 0, 2, 4, 4, 1, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 5, 5, 0, 4, 4, 0, 3, 3, 0, 2, 2, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0], [0, 0, 8, 8, 8, 8, 8, 0, 0, 8, 8, 8, 8, 8, 0, 0], [0, 0, 4, 8, 1, 2, 3, 4, 5, 6, 1, 2, 3, 8, 2, 0], [0, 4, 0, 8, 1, 2, 3, 4, 5, 6, 1, 2, 8, 0, 2, 0], [0, 3, 0, 0, 8, 1, 2, 3, 4, 5, 6, 1, 8, 0, 0, 3], [0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0], [0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0], [2, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 0, 0, 4, 0], [0, 5, 0, 0, 8, 1, 2, 3, 0, 4, 5, 6, 8, 0, 0, 5], [0, 5, 0, 8, 1, 2, 3, 0, 0, 4, 5, 6, 8, 0, 5, 0], [1, 1, 0, 8, 8, 8, 8, 0, 4, 2, 8, 8, 8, 8, 6, 6], [6, 6, 5, 5, 4, 4, 3, 3, 4, 2, 3, 3, 2, 2, 1, 1]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 9, 9, 9, 9, 9, 1, 2, 9, 9, 9, 9, 9, 9, 0], [0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0], [0, 9, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 9], [9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9], [0, 4, 0, 0, 8, 8, 8, 0, 0, 0, 8, 8, 8, 0, 6, 6], [0, 4, 0, 8, 1, 1, 2, 5, 6, 4, 3, 3, 8, 0, 6, 0], [0, 0, 3, 8, 8, 8, 2, 5, 6, 6, 4, 8, 8, 8, 1, 0], [0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0], [0, 2, 8, 8, 8, 8, 1, 1, 4, 3, 8, 8, 8, 8, 2, 0], [0, 1, 0, 8, 1, 3, 3, 2, 4, 5, 3, 4, 4, 8, 0, 5], [1, 0, 0, 8, 8, 8, 8, 2, 5, 8, 8, 8, 8, 0, 0, 5], [1, 2, 2, 3, 3, 4, 4, 6, 5, 1, 4, 2, 3, 3, 6, 6], [0, 0, 0, 0, 5, 5, 6, 0, 0, 1, 4, 2, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [9, 9, 9, 9, 9, 0, 0, 2, 1, 4, 0, 9, 9, 9, 9, 9], [0, 0, 8, 9, 0, 8, 0, 2, 4, 0, 8, 0, 9, 8, 0, 0], [0, 9, 9, 9, 0, 0, 0, 8, 0, 8, 0, 0, 0, 9, 9, 9], [9, 8, 0, 4, 8, 2, 6, 0, 0, 2, 4, 8, 1, 0, 8, 9], [9, 8, 0, 3, 4, 5, 2, 6, 0, 0, 2, 4, 1, 4, 6, 8], [0, 0, 8, 3, 0, 5, 8, 0, 0, 8, 6, 6, 4, 8, 6, 0], [0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0], [0, 8, 9, 9, 8, 2, 0, 0, 0, 0, 3, 8, 9, 9, 8, 0], [0, 9, 9, 9, 0, 9, 2, 0, 0, 0, 3, 9, 9, 9, 9, 0], [0, 8, 9, 8, 0, 9, 8, 0, 0, 8, 9, 0, 8, 9, 8, 0], [0, 6, 6, 3, 3, 0, 1, 1, 0, 3, 3, 6, 6, 5, 5, 0], [0, 8, 4, 4, 8, 1, 2, 2, 4, 4, 3, 8, 1, 1, 8, 0], [0, 5, 2, 2, 3, 3, 2, 0, 0, 0, 4, 5, 5, 4, 4, 0], [0, 5, 8, 1, 1, 8, 0, 0, 0, 0, 8, 6, 6, 8, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0], [0, 0, 0, 0, 8, 2, 8, 0, 0, 0, 8, 1, 8, 0, 0, 0], [0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 0, 0, 0], [9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9], [0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0], [0, 0, 0, 8, 6, 8, 0, 0, 0, 0, 0, 8, 4, 8, 0, 0], [0, 0, 0, 0, 8, 8, 5, 0, 0, 0, 0, 5, 8, 8, 0, 0], [9, 9, 9, 9, 8, 5, 9, 9, 9, 9, 9, 5, 8, 9, 9, 9], [0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 4, 3, 0, 0], [0, 0, 8, 1, 8, 2, 0, 0, 0, 0, 0, 4, 8, 3, 8, 0], [0, 0, 3, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 6], [0, 0, 3, 8, 2, 2, 0, 8, 0, 8, 0, 4, 4, 8, 6, 0], [0, 0, 0, 0, 0, 0, 1, 1, 8, 8, 5, 5, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 9], [9, 9, 0, 0, 9, 6, 5, 4, 3, 2, 9, 0, 0, 9, 9, 0], [0, 9, 0, 0, 9, 8, 8, 8, 8, 8, 8, 9, 0, 0, 9, 0], [0, 0, 0, 9, 1, 2, 3, 4, 5, 6, 0, 9, 0, 0, 0, 0], [0, 0, 0, 9, 0, 8, 8, 8, 8, 8, 8, 0, 9, 0, 0, 0], [0, 0, 9, 0, 0, 6, 5, 4, 3, 2, 1, 0, 9, 0, 0, 0], [0, 0, 9, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 9, 0, 9], [9, 9, 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 1, 1, 0], [0, 5, 0, 0, 9, 8, 8, 8, 8, 8, 8, 1, 0, 0, 2, 0], [6, 5, 0, 4, 6, 5, 4, 3, 2, 1, 0, 3, 0, 2, 9, 0], [0, 0, 3, 4, 0, 8, 8, 8, 8, 8, 8, 0, 3, 4, 0, 0], [0, 0, 3, 0, 1, 2, 3, 4, 5, 6, 0, 0, 4, 0, 0, 0], [0, 0, 1, 2, 0, 8, 8, 8, 8, 8, 8, 0, 6, 5, 0, 0], [0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 6, 0, 5, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 5, 3, 1, 1, 2, 4, 0, 0, 0, 0, 0], [9, 8, 0, 9, 8, 5, 3, 1, 2, 4, 8, 9, 0, 8, 9, 0], [0, 9, 8, 0, 9, 8, 5, 6, 6, 6, 8, 9, 0, 8, 9, 0], [0, 9, 8, 0, 9, 8, 0, 0, 0, 8, 9, 0, 8, 9, 0, 0], [0, 0, 0, 0, 0, 0, 3, 0, 0, 4, 0, 0, 0, 0, 0, 0], [5, 6, 4, 0, 0, 0, 3, 0, 4, 0, 2, 3, 1, 0, 0, 0], [0, 5, 6, 4, 0, 0, 0, 2, 2, 0, 0, 2, 3, 1, 0, 0], [0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 8, 8, 8, 0, 0], [4, 4, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 4, 4], [8, 8, 8, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 8, 8, 8], [3, 3, 6, 0, 3, 1, 1, 0, 0, 0, 6, 6, 2, 0, 5, 4], [2, 6, 8, 0, 0, 8, 0, 0, 0, 8, 0, 0, 8, 5, 4, 0], [2, 1, 8, 2, 3, 8, 4, 5, 6, 5, 8, 4, 3, 8, 2, 1], [1, 8, 2, 3, 8, 4, 5, 6, 5, 5, 8, 4, 3, 8, 2, 1]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0], [0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0], [0, 0, 0, 9, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 9, 0], [0, 0, 9, 0, 0, 6, 6, 5, 5, 4, 4, 0, 0, 0, 9, 0], [0, 0, 9, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 9], [0, 9, 0, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 0, 0, 9], [0, 0, 9, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 9], [0, 0, 9, 0, 0, 6, 6, 5, 5, 4, 4, 0, 0, 0, 9, 0], [0, 0, 0, 9, 9, 9, 8, 8, 8, 8, 8, 8, 9, 9, 9, 0], [0, 0, 9, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 0, 9, 0], [0, 0, 9, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 9], [0, 0, 9, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 9, 0], [0, 0, 0, 9, 9, 9, 0, 0, 8, 8, 0, 0, 9, 9, 9, 0], [0, 0, 0, 0, 0, 9, 9, 9, 8, 9, 9, 9, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 8, 4, 4, 4, 8, 5, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 8, 5, 0, 0, 2, 8, 6, 0, 0, 0, 0], [0, 0, 0, 1, 8, 4, 5, 0, 2, 3, 8, 6, 0, 0, 0, 0], [0, 0, 0, 2, 8, 3, 4, 8, 8, 3, 4, 8, 5, 0, 0, 0], [0, 0, 2, 0, 2, 3, 8, 6, 8, 4, 5, 0, 5, 0, 0, 0], [0, 0, 3, 8, 1, 2, 8, 6, 1, 8, 5, 6, 8, 4, 0, 0], [0, 3, 8, 6, 1, 8, 5, 5, 2, 8, 6, 1, 8, 4, 0, 0], [0, 0, 8, 5, 6, 8, 4, 5, 2, 3, 8, 1, 2, 8, 0, 0], [0, 8, 4, 5, 8, 3, 4, 8, 3, 4, 8, 2, 3, 8, 0, 0], [0, 0, 0, 4, 8, 2, 3, 8, 8, 4, 5, 8, 3, 0, 0, 0], [0, 0, 0, 8, 1, 2, 8, 0, 8, 5, 6, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 8, 0, 0, 8, 6, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [2, 2, 3, 8, 8, 0, 0, 9, 9, 0, 0, 8, 8, 4, 3, 3], [1, 1, 6, 8, 0, 0, 9, 9, 9, 0, 0, 8, 5, 4, 2, 2], [4, 4, 5, 8, 8, 0, 0, 9, 9, 0, 0, 8, 8, 1, 1, 6], [2, 2, 3, 8, 0, 0, 0, 6, 0, 0, 0, 8, 4, 5, 5, 6], [5, 5, 3, 8, 8, 0, 0, 5, 6, 0, 0, 8, 8, 4, 2, 2], [1, 1, 2, 0, 0, 0, 5, 3, 4, 0, 0, 0, 1, 1, 3, 3], [3, 3, 2, 8, 8, 0, 0, 3, 4, 0, 0, 8, 8, 6, 6, 5], [6, 6, 5, 8, 0, 0, 0, 2, 0, 0, 0, 8, 3, 4, 4, 5], [4, 4, 5, 8, 8, 0, 0, 1, 2, 0, 0, 8, 8, 3, 2, 2], [1, 3, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 6, 6, 1, 1], [1, 2, 2, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 4, 5, 5], [6, 5, 4, 8, 0, 0, 0, 0, 0, 0, 0, 8, 4, 1, 3, 2], [6, 5, 4, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 1, 3, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [8, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 5, 5, 4, 4, 8], [8, 8, 8, 8, 0, 0, 8, 8, 8, 0, 0, 8, 8, 8, 8, 0], [0, 0, 0, 0, 2, 0, 0, 8, 8, 0, 0, 4, 0, 0, 0, 5], [8, 0, 0, 1, 2, 0, 0, 8, 0, 0, 3, 4, 0, 0, 5, 8], [1, 0, 0, 8, 1, 8, 9, 9, 9, 9, 8, 3, 8, 0, 0, 3], [1, 0, 0, 8, 8, 9, 9, 9, 9, 9, 8, 8, 0, 0, 3, 4], [2, 2, 0, 0, 0, 0, 6, 6, 8, 8, 2, 2, 4, 0, 0, 4], [8, 5, 5, 6, 6, 5, 6, 5, 0, 3, 3, 4, 1, 1, 6, 8], [3, 3, 0, 0, 4, 8, 8, 5, 6, 8, 8, 1, 0, 0, 0, 6], [4, 0, 0, 0, 4, 8, 4, 5, 6, 8, 1, 0, 0, 0, 2, 2], [4, 0, 0, 0, 3, 0, 4, 3, 3, 2, 5, 0, 0, 0, 0, 1], [8, 0, 0, 3, 0, 0, 1, 1, 2, 0, 5, 0, 0, 0, 1, 8], [0, 0, 0, 2, 0, 0, 0, 8, 8, 0, 0, 6, 0, 0, 0, 0], [0, 0, 2, 0, 0, 0, 0, 8, 0, 0, 0, 6, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [1, 2, 3, 4, 5, 6, 0, 8, 8, 0, 1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 8, 8, 8, 1, 2, 3, 4, 5, 6, 0], [8, 8, 8, 0, 0, 0, 9, 8, 8, 9, 0, 0, 0, 8, 8, 8], [0, 0, 8, 0, 4, 4, 0, 8, 0, 3, 3, 0, 8, 0, 0, 0], [0, 0, 8, 0, 5, 0, 0, 8, 8, 0, 0, 2, 0, 8, 0, 0], [0, 8, 0, 0, 5, 0, 0, 0, 0, 0, 2, 0, 0, 8, 0, 0], [0, 8, 0, 0, 0, 6, 0, 8, 8, 0, 1, 0, 0, 0, 8, 0], [8, 0, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 8, 0], [8, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 8], [4, 3, 1, 0, 0, 8, 1, 1, 1, 8, 0, 0, 0, 4, 3, 2], [4, 3, 1, 0, 0, 8, 2, 2, 3, 3, 8, 0, 0, 4, 3, 2], [0, 0, 0, 0, 8, 4, 4, 6, 5, 5, 8, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 1, 1, 6, 6, 2, 2, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 6, 8, 0, 8, 0, 0, 0, 2, 2, 8, 0, 8, 5, 0], [0, 6, 3, 8, 5, 8, 0, 0, 0, 1, 8, 6, 8, 4, 5, 0], [0, 0, 0, 3, 8, 5, 8, 0, 8, 1, 8, 6, 8, 4, 0, 0], [0, 0, 8, 1, 1, 4, 0, 0, 0, 0, 3, 2, 2, 8, 0, 0], [0, 0, 0, 8, 5, 8, 4, 8, 0, 8, 3, 8, 6, 8, 0, 0], [0, 0, 4, 4, 5, 3, 0, 0, 0, 0, 0, 1, 6, 2, 0, 0], [0, 0, 0, 2, 8, 3, 8, 0, 0, 0, 8, 1, 8, 2, 0, 0], [0, 1, 2, 8, 5, 8, 0, 0, 0, 0, 8, 4, 8, 3, 0, 0], [0, 0, 1, 3, 5, 0, 0, 6, 0, 4, 0, 0, 4, 3, 0, 0], [0, 0, 3, 8, 8, 8, 6, 0, 0, 4, 8, 8, 8, 0, 0, 0], [0, 0, 0, 6, 6, 5, 5, 0, 0, 0, 1, 1, 2, 2, 0, 0], [0, 0, 8, 1, 8, 2, 8, 0, 0, 8, 4, 8, 3, 8, 0, 0], [0, 0, 5, 5, 1, 2, 0, 0, 0, 0, 4, 6, 6, 3, 0, 0], [0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 8, 0, 8, 1, 1, 2, 2, 8, 0, 8, 0, 0, 0], [0, 0, 2, 8, 0, 8, 4, 0, 3, 8, 0, 8, 0, 0, 0, 0], [8, 0, 1, 2, 8, 0, 8, 4, 3, 8, 0, 8, 0, 6, 5, 8], [8, 1, 0, 3, 3, 5, 5, 6, 6, 0, 0, 0, 6, 5, 8, 0], [0, 8, 0, 0, 8, 0, 8, 0, 0, 8, 0, 8, 4, 4, 8, 0], [1, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 6, 0], [0, 1, 2, 0, 0, 4, 5, 5, 2, 2, 3, 0, 0, 5, 6, 0], [0, 0, 2, 8, 4, 8, 1, 6, 6, 8, 3, 8, 5, 0, 0, 0], [8, 0, 0, 3, 3, 0, 1, 0, 0, 0, 0, 4, 4, 0, 0, 8], [8, 1, 2, 3, 4, 8, 5, 6, 2, 8, 1, 6, 5, 4, 8, 0], [0, 8, 1, 2, 3, 4, 5, 6, 3, 2, 1, 6, 5, 4, 8, 0], [0, 8, 8, 0, 0, 0, 8, 3, 8, 0, 0, 0, 8, 8, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 8, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 0], [2, 2, 0, 8, 0, 8, 0, 0, 0, 8, 0, 8, 5, 5, 3, 0], [8, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 3, 8], [6, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 1, 1, 0], [0, 8, 4, 0, 8, 0, 8, 0, 0, 8, 0, 8, 0, 0, 8, 0], [0, 0, 8, 0, 0, 6, 6, 0, 0, 0, 4, 0, 8, 0, 0, 0], [0, 8, 0, 0, 8, 1, 0, 2, 0, 0, 4, 8, 0, 0, 8, 0], [0, 0, 0, 8, 1, 0, 0, 2, 3, 3, 5, 8, 0, 0, 0, 0], [8, 0, 8, 0, 2, 3, 3, 0, 0, 4, 4, 5, 0, 8, 0, 8], [4, 4, 5, 2, 1, 0, 0, 0, 0, 0, 6, 6, 0, 2, 1, 1], [8, 6, 8, 5, 1, 8, 0, 0, 0, 0, 8, 0, 5, 8, 2, 8], [6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 3, 3], [8, 1, 2, 3, 3, 0, 0, 0, 0, 0, 0, 6, 6, 5, 4, 8], [8, 1, 2, 8, 0, 0, 0, 8, 0, 0, 0, 8, 5, 4, 8, 0]], [[6, 0, 15], [0, 1, 2, 3, 4, 5], [629157, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 8, 8, 8, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 5, 6, 1, 2, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 8, 8, 8, 8, 8, 3, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 4, 5, 6, 1, 2, 3, 0, 0, 0, 0, 0], [0, 0, 0, 3, 8, 8, 8, 8, 8, 8, 8, 4, 0, 0, 0, 0], [0, 0, 0, 0, 3, 4, 5, 6, 1, 2, 3, 4, 0, 0, 0, 0], [0, 0, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 0, 0, 0], [0, 0, 0, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 0, 0, 0], [0, 0, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 0, 0, 0], [0, 0, 0, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 0, 0, 0], [0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 3, 3, 6, 6, 5, 5, 0, 0, 0, 0], [0, 0, 0, 0, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0]]];
public function OField(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:OCounter, _arg5:OBang, _arg6:int, _arg7:Rectangle){
this.iBang = _arg5;
this.iRadius = _arg1;
this.iCounter = _arg4;
this.iRRect = _arg7;
this.iDiameter = (this.iRadius * 2);
this.iConnectDist2 = (((this.iDiameter * this.iDiameter) * 0.66) * 0.66);
this.iRTime = -1;
this.iRand = new ORandomInt();
this.iRand.SeedRand(_arg6);
this.iRecord = new ORecord();
this.iBubbleCount = 0;
this.iBubbleFall = false;
FieldInit();
this.Pos(_arg2, _arg3);
iDir = new Point();
this.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown);
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.State = stInvisible;
}
public function get prRect():Rectangle{
return (this.iRect);
}
private function FieldInit():void{
var _local4:Number;
var _local5:int;
this.iDY = Math.round((Math.sqrt(3) * this.iRadius));
this.iRect = new Rectangle(0, 0, ((this.iDiameter * OField.iFCols) + this.iRadius), ((this.iDY * (OField.iFRows - 1)) + this.iDiameter));
var _local1:Sprite = new Sprite();
_local1.graphics.beginFill(0);
_local1.graphics.drawRect(0, 0, (this.iRect.width * OGlobal.Scale), (this.iRect.height * OGlobal.Scale));
_local1.visible = false;
this.addChild(_local1);
this.hitArea = _local1;
this.iField = new Array(OField.iFRows);
var _local2:Number = this.iRadius;
var _local3:int;
while (_local3 < OField.iFRows) {
this.iField[_local3] = new Array(OField.iFCols);
_local4 = (((_local3 % 2))==0) ? this.iRadius : this.iDiameter;
_local5 = 0;
while (_local5 < OField.iFCols) {
this.iField[_local3][_local5] = new OBubble(this.iRadius, -1, _local4, _local2);
this.addChild(this.iField[_local3][_local5]);
_local4 = (_local4 + this.iDiameter);
_local5++;
};
_local2 = (_local2 + this.iDY);
_local3++;
};
this.iFBubP = new Point(Math.round((((this.iDiameter * OField.iFCols) + this.iRadius) / 2)), ((_local2 - (2 * this.iDY)) + this.iDiameter));
this.iFBub = new OBubble(this.iRadius, -1, this.iFBubP.x, this.iFBubP.y);
this.addChild(this.iFBub);
this.iNBub = new OBubble(this.iRadius, -1, this.iFBubP.x, (this.iFBubP.y + this.iDiameter));
this.addChild(this.iNBub);
}
private function NeighbourCount(_arg1:int, _arg2:int):int{
var _local3:int;
if ((_arg1 % 2) == 0){
if ((((_arg1 > 0)) && ((_arg2 > 0)))){
if ((((iNewField[(_arg1 - 1)][(_arg2 - 1)] >= 0)) && (!((iNewField[(_arg1 - 1)][(_arg2 - 1)] == OBubble.iColorsCount))))){
return (1);
};
};
if (_arg1 > 0){
if ((((iNewField[(_arg1 - 1)][_arg2] >= 0)) && (!((iNewField[(_arg1 - 1)][_arg2] == OBubble.iColorsCount))))){
return (1);
};
};
if (_arg2 > 0){
if ((((iNewField[_arg1][(_arg2 - 1)] >= 0)) && (!((iNewField[_arg1][(_arg2 - 1)] == OBubble.iColorsCount))))){
return (1);
};
};
if (_arg2 < (iFCols - 1)){
if ((((iNewField[_arg1][(_arg2 + 1)] >= 0)) && (!((iNewField[_arg1][(_arg2 + 1)] == OBubble.iColorsCount))))){
return (1);
};
};
if ((((_arg1 < (iFRows - 1))) && ((_arg2 > 0)))){
if ((((iNewField[(_arg1 + 1)][(_arg2 - 1)] >= 0)) && (!((iNewField[(_arg1 + 1)][(_arg2 - 1)] == OBubble.iColorsCount))))){
return (1);
};
};
if (_arg1 < (iFRows - 1)){
if ((((iNewField[(_arg1 + 1)][_arg2] >= 0)) && (!((iNewField[(_arg1 + 1)][_arg2] == OBubble.iColorsCount))))){
return (1);
};
};
} else {
if (_arg1 > 0){
if ((((iNewField[(_arg1 - 1)][_arg2] >= 0)) && (!((iNewField[(_arg1 - 1)][_arg2] == OBubble.iColorsCount))))){
return (1);
};
};
if ((((_arg2 < (iFCols - 1))) && ((_arg1 > 0)))){
if ((((iNewField[(_arg1 - 1)][(_arg2 + 1)] >= 0)) && (!((iNewField[(_arg1 - 1)][(_arg2 + 1)] == OBubble.iColorsCount))))){
return (1);
};
};
if (_arg2 > 0){
if ((((iNewField[_arg1][(_arg2 - 1)] >= 0)) && (!((iNewField[_arg1][(_arg2 - 1)] == OBubble.iColorsCount))))){
return (1);
};
};
if (_arg2 < (iFCols - 1)){
if ((((iNewField[_arg1][(_arg2 + 1)] >= 0)) && (!((iNewField[_arg1][(_arg2 + 1)] == OBubble.iColorsCount))))){
return (1);
};
};
if (_arg1 < (iFRows - 1)){
if ((((iNewField[(_arg1 + 1)][_arg2] >= 0)) && (!((iNewField[(_arg1 + 1)][_arg2] == OBubble.iColorsCount))))){
return (1);
};
};
if ((((_arg1 < (iFRows - 1))) && ((_arg2 < (iFCols - 1))))){
if ((((iNewField[(_arg1 + 1)][(_arg2 + 1)] >= 0)) && (!((iNewField[(_arg1 + 1)][(_arg2 + 1)] == OBubble.iColorsCount))))){
return (1);
};
};
};
return (_local3);
}
private function FieldCalcFreeBub():void{
var _local3:int;
var _local4:OBubble;
var _local1:int;
var _local2:int;
while (_local2 < OField.iFRows) {
_local3 = 0;
while (_local3 < OField.iFCols) {
if ((((iNewField[_local2][_local3] < 0)) || ((iNewField[_local2][_local3] == (OBubble.iColorsCount - 1))))){
} else {
_local4 = iField[_local2][_local3];
if (NeighbourCount(_local2, _local3) == 0){
_local4.prType = (this.iBangCount++ + 1);
};
};
_local3++;
};
_local2++;
};
}
public function get prGameIndex():int{
return ((((UI.iGAME.prGamesStartCount + UI.iGAME.prLevel) + UI.iGAME.prRNDFactor) % 10));
}
private function FieldInitShow():void{
var _local3:int;
var _local4:OBubble;
var _local1:int;
var _local2:int;
while (_local2 < OField.iFRows) {
_local3 = 0;
while (_local3 < OField.iFCols) {
_local4 = this.iField[_local2][_local3];
if (_local4.prCInd < 0){
} else {
_local4.InitShow(_local1, 4, this.iRadius, 0, OUtils.Random(10, 15));
};
_local3++;
};
_local1 = (_local1 + 5);
_local2++;
};
this.iFBub.prVisible = false;
this.iNBub.prVisible = false;
}
private function FieldCalcAddNewBub():Array{
var _local3:int;
var _local4:Array;
var _local1:Array = new Array(OField.iFRows);
var _local2:int;
while (_local2 < OField.iFRows) {
_local1[_local2] = new Array();
_local3 = 0;
while (_local3 < OField.iFCols) {
if (iField[_local2][_local3].prCInd >= 0){
_local1[_local2].push(-1);
} else {
_local4 = this.Neighbours(_local2, _local3);
if ((((_local4.length > 0)) && ((_local4.length < 4)))){
if (this.iRand.RandVal(100) < (100 - iRandomP)){
_local1[_local2].push(_local4[this.iRand.RandVal(_local4.length)]);
} else {
_local1[_local2].push(prNextColor);
};
} else {
_local1[_local2].push(-1);
};
};
_local3++;
};
_local2++;
};
return (_local1);
}
private function Neighbours(_arg1:int, _arg2:int):Array{
var _local3:Array = new Array();
var _local4:int;
if ((_arg1 % 2) == 0){
if ((((_arg1 > 0)) && ((_arg2 > 0)))){
_local4 = ActiveCell((_arg1 - 1), (_arg2 - 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if (_arg1 > 0){
_local4 = ActiveCell((_arg1 - 1), _arg2);
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if (_arg2 > 0){
_local4 = ActiveCell(_arg1, (_arg2 - 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if (_arg2 < (iFCols - 1)){
_local4 = ActiveCell(_arg1, (_arg2 + 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if ((((_arg1 < (iFRows - 1))) && ((_arg2 > 0)))){
_local4 = ActiveCell((_arg1 + 1), (_arg2 - 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if (_arg1 < (iFRows - 1)){
_local4 = ActiveCell((_arg1 + 1), _arg2);
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
} else {
if (_arg1 > 0){
_local4 = ActiveCell((_arg1 - 1), _arg2);
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if ((((_arg2 < (iFCols - 1))) && ((_arg1 > 0)))){
_local4 = ActiveCell((_arg1 - 1), (_arg2 + 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if (_arg2 > 0){
_local4 = ActiveCell(_arg1, (_arg2 - 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if (_arg2 < (iFCols - 1)){
_local4 = ActiveCell(_arg1, (_arg2 + 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if (_arg1 < (iFRows - 1)){
_local4 = ActiveCell((_arg1 + 1), _arg2);
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
if ((((_arg1 < (iFRows - 1))) && ((_arg2 < (iFCols - 1))))){
_local4 = ActiveCell((_arg1 + 1), (_arg2 + 1));
if (_local4 > 0){
_local3.push((_local4 - 1));
};
};
};
return (_local3);
}
private function FieldBangBlackBub():void{
var _local3:int;
var _local4:OBubble;
var _local1 = 20;
var _local2:int;
while (_local2 < OField.iFRows) {
_local3 = 0;
while (_local3 < OField.iFCols) {
_local4 = this.iField[_local2][_local3];
if (_local4.prCInd < (OBubble.iColorsCount - 1)){
} else {
_local4.prType = _local1;
_local1 = (_local1 + 20);
_local4.prDelta = _local4.prType;
_local4.State = OBubble.stBeforeBang;
};
_local3++;
};
_local2++;
};
}
private function FieldCheckLevComplete():Boolean{
return ((this.iBubbleCount == 0));
}
public function EmulateMove(_arg1:Point, _arg2:Rectangle):void{
if (this.State != OField.stNormal){
return;
};
var _local3:Number = ((_arg1.x * this.iRect.width) / _arg2.width);
var _local4:Number = ((_arg1.y * this.iRect.height) / _arg2.height);
var _local5:Point = new Point((_local3 - this.iFBubP.x), (_local4 - this.iFBubP.y));
_local5.normalize(this.iRadius);
this.iFBub.prVel = _local5;
this.iBorderCount = this.iRecord.ReadSmallInt();
this.iBubbleFall = this.iRecord.ReadFall();
this.iFR = this.iRecord.ReadSmallInt();
this.iFC = this.iRecord.ReadSmallInt();
if (iBubbleFall){
this.iBubbleCount--;
};
if (iCursor){
iCursor.Pos((this.prX + _local3), (this.prY + _local4));
iCursor.Blink();
};
}
private function get prNextColor():int{
return (this.iColors[this.iRand.RandVal(this.iColors.length)]);
}
private function Dist2(_arg1:int, _arg2:int, _arg3:Point):Number{
if ((((((((_arg1 < 0)) || ((_arg1 >= OField.iFRows)))) || ((_arg2 < 0)))) || ((_arg2 >= OField.iFCols)))){
return (Number.MAX_VALUE);
};
var _local4:Number = (_arg3.x - this.iField[_arg1][_arg2].prX);
var _local5:Number = (_arg3.y - this.iField[_arg1][_arg2].prY);
var _local6:Number = ((_local4 * _local4) + (_local5 * _local5));
return (((this.iField[_arg1][_arg2].prCInd)<0) ? -(_local6) : _local6);
}
private function FieldShowRemove():Boolean{
var _local3:int;
var _local4:OBubble;
var _local1:Boolean;
var _local2:int;
while (_local2 < OField.iFRows) {
_local3 = 0;
while (_local3 < OField.iFCols) {
_local4 = this.iField[_local2][_local3];
if (!_local4.prType){
} else {
_local4.OnEnterFrame(null);
if (_local4.State != OBubble.stInvisible){
_local1 = true;
};
if (_local4.State == OBubble.stBang){
if (this.iBang){
this.iBang.MakeFirework3(_local4, 3);
};
_local4.prCInd = -1;
};
if (_local4.State == OBubble.stFlyOut){
_local4.prCInd = -1;
};
};
_local3++;
};
_local2++;
};
return (_local1);
}
private function FieldCheckGameOver():Boolean{
var _local1:int;
while (_local1 < OField.iFCols) {
if (this.iField[(OField.iFRows - 1)][_local1].prCInd >= 0){
return (true);
};
_local1++;
};
return (false);
}
private function FieldInitHide():void{
var _local3:Boolean;
var _local4:int;
var _local5:OBubble;
var _local1 = 90;
var _local2:int = (OField.iFRows - 1);
while (_local2 >= 0) {
_local3 = false;
_local4 = 0;
for (;_local4 < OField.iFCols;_local4++) {
_local5 = this.iField[_local2][_local4];
if (_local5.prCInd < 0){
continue;
} else {
_local3 = true;
};
_local5.InitHide(_local1, this.iRadius, 4, 0, OUtils.Random(10, 15));
};
if (_local3){
_local1 = (_local1 + 5);
};
_local2--;
};
this.iFBub.prVisible = false;
this.iNBub.prVisible = false;
}
public function get State():int{
return (this.iState);
}
private function CalcFCell(_arg1:Number, _arg2:Number):Boolean{
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:int;
var _local19:int;
var _local20:Number;
var _local3:Boolean;
var _local4:Point = new Point((_arg1 - this.iFBubP.x), (_arg2 - this.iFBubP.y));
var _local5:Point = _local4.clone();
_local5.normalize(((0.2 * this.iRadius) / 15));
var _local6:Point = this.iFBubP.clone();
this.iBorderCount = 0;
var _local7 = -1;
var _local8 = -1;
var _local9 = -1;
var _local10 = -1;
var _local11 = -1;
var _local12 = -1;
while (1) {
_local7 = (((_local6.y - this.iRadius) / this.iDY) + 1);
_local8 = (((_local7 % 2))==0) ? (_local6.x / this.iDiameter) : ((_local6.x - this.iRadius) / this.iDiameter);
if (_local8 < 0){
_local8 = 0;
};
_local15 = Number.MAX_VALUE;
_local16 = Number.MAX_VALUE;
_local17 = 0;
while (_local17 < 9) {
_local18 = (_local7 + OField.iInd[_local17][0]);
_local19 = (_local8 + OField.iInd[_local17][1]);
_local20 = Dist2(_local18, _local19, _local6);
if (_local20 < 0){
if (Math.abs(_local20) < _local16){
_local16 = Math.abs(_local20);
_local11 = _local18;
_local12 = _local19;
};
} else {
if (_local20 < _local15){
_local15 = _local20;
_local9 = _local18;
_local10 = _local19;
};
};
_local17++;
};
_local7 = _local11;
_local8 = _local12;
if (_local15 <= this.iConnectDist2){
if (iBang){
this.iBubbleCount++;
};
break;
};
if ((((_local7 > (iFRows - 2))) && ((_local5.y >= 0)))){
_local3 = true;
break;
};
_local6.offset(_local5.x, _local5.y);
if ((((((_local5.x >= 0)) && (((_local6.x + this.iRadius) >= this.iRect.width)))) || ((((_local5.x < 0)) && (((_local6.x - this.iRadius) <= 0)))))){
_local5.x = -(_local5.x);
this.iBorderCount++;
};
if ((((_local5.y < 0)) && (((_local6.y - this.iRadius) <= 0)))){
_local5.y = -(_local5.y);
this.iBorderCount++;
};
};
this.iFR = _local7;
this.iFC = _local8;
var _local13:int = getTimer();
var _local14:int = (_local13 - this.iTime);
if (_local14 >= 19999){
_local14 = 19999;
};
_local14 = (_local14 / 200);
if (this.iBang){
this.iRecord.WriteNode(_arg1, _arg2, _local14, iBorderCount, _local3, _local7, _local8);
};
this.iTime = _local13;
OSystem.iUserText2 = ((((((_arg1.toString() + "x") + _arg2.toString()) + "/") + this.iFR.toString()) + "x") + this.iFC.toString());
_local4.normalize(this.iRadius);
this.iFBub.prVel = _local4;
return (_local3);
}
private function SendGameToServer():void{
if (((((this.iBang) && (this.iRecord.prStr))) && ((UI.iMP.State == OMultiplayer.stInZone)))){
UI.iMP.Turn(["wrl", UI.iGAME.prLevel, this.prGameIndex, UI.iGAME.prPlayerName, this.iRecord.prStr]);
};
}
public function get prRTime():int{
return (this.iRTime);
}
override public function Free():void{
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.removeEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown);
this.iField = null;
if (iCursor){
iCursor = null;
};
super.Free();
}
private function FieldShowNewBub(_arg1:Array):void{
var _local4:int;
var _local5:OBubble;
var _local2:int;
var _local3:int;
while (_local3 < OField.iFRows) {
_local4 = 0;
for (;_local4 < OField.iFCols;_local4++) {
if (_arg1[_local3][_local4] >= 0){
_local5 = this.iField[_local3][_local4];
this.iField[_local3][_local4].prCInd = _arg1[_local3][_local4];
_local5.InitShow(2, 4, this.iRadius, 0, 5);
this.iBubbleCount++;
} else {
continue;
};
};
_local2 = (_local2 + 1);
_local3++;
};
}
private function FieldCalcColors():void{
var _local3:int;
var _local1:int;
while (_local1 < 12) {
this.iColors[_local1] = -1;
_local1++;
};
var _local2:int = (OField.iFRows - 1);
while (_local2 >= 0) {
_local3 = 0;
while (_local3 < OField.iFCols) {
if (ActiveCell(_local2, _local3) <= 0){
} else {
this.iColors[this.iField[_local2][_local3].prCInd] = this.iField[_local2][_local3].prCInd;
};
_local3++;
};
_local2--;
};
_local1 = 0;
while (_local1 < this.iColors.length) {
if (this.iColors[_local1] < 0){
this.iColors.splice(_local1, 1);
} else {
_local1++;
};
};
}
private function FieldOnEnterFrame():void{
var _local2:int;
var _local3:OBubble;
var _local1:int;
while (_local1 < OField.iFRows) {
_local2 = 0;
while (_local2 < OField.iFCols) {
_local3 = this.iField[_local1][_local2];
if (_local3.prCInd < 0){
} else {
_local3.OnEnterFrame(null);
};
_local2++;
};
_local1++;
};
}
public function OnMouseDown(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
if (this.iState == stNormal){
_local2 = Math.round((OGlobal.ToLocal((_arg1.stageX - OGlobal.ViewporRect.x)) - this.prX));
_local3 = Math.round((OGlobal.ToLocal((_arg1.stageY - OGlobal.ViewporRect.y)) - this.prY));
if ((_local3 - this.iFBubP.y) >= 0){
return;
};
this.iBubbleFall = this.CalcFCell(_local2, _local3);
this.State = stMoveFBub;
};
}
private function FieldCalcRemove():Boolean{
var _local7:int;
var _local8:OBubble;
iNewField = new Array(OField.iFRows);
var _local1:int;
while (_local1 < OField.iFRows) {
iNewField[_local1] = new Array(OField.iFCols);
_local7 = 0;
while (_local7 < OField.iFCols) {
this.iField[_local1][_local7].prType = 0;
iNewField[_local1][_local7] = this.iField[_local1][_local7].prCInd;
_local7++;
};
_local1++;
};
var _local2:int = this.iField[this.iFR][this.iFC].prCInd;
this.iBangCount = 0;
FieldCalcR(this.iFR, this.iFC, _local2);
if (!iBubbleFall){
if (this.iBangCount < 3){
this.iBangCount = 0;
this.iLostShoot = true;
return (false);
};
};
if (this.iBangCount < 0){
this.iBangCount = 0;
};
this.FieldCalcFreeBub();
var _local3:Boolean;
var _local4:Number = 0;
var _local5:int;
var _local6:int;
_local1 = 0;
while (_local1 < OField.iFRows) {
_local7 = 0;
while (_local7 < OField.iFCols) {
_local8 = this.iField[_local1][_local7];
if (!_local8.prType){
} else {
_local8.prDelta = _local8.prType;
_local8.State = OBubble.stBeforeBang;
if (((((this.iBubbleFall) && ((_local1 == iFR)))) && ((_local7 == iFC)))){
_local8.State = OBubble.stFlyOut;
} else {
_local6++;
this.iBubbleCount--;
};
_local4 = (_local4 + _local7);
_local5++;
};
_local7++;
};
_local1++;
};
_local4 = (_local4 / (_local5 * OField.iFCols));
if (this.iCounter){
this.iCounter.prValue = (this.iCounter.prValue + (_local6 * this.iScorePurBubble));
};
OSound.PlaySoundRandom(((_local4 * 2) - 1), (UI.OSBubbleBangSInd + 1), UI.OSBubbleBangEInd);
return (true);
}
private function ActiveCell(_arg1:int, _arg2:int):int{
if (this.iField[_arg1][_arg2].prCInd < 0){
return (-1);
};
if (this.iField[_arg1][_arg2].prCInd == (OBubble.iColorsCount - 1)){
return (0);
};
return ((this.iField[_arg1][_arg2].prCInd + 1));
}
private function FieldIsAllStates(_arg1:int):Boolean{
var _local3:int;
var _local4:OBubble;
var _local2:int;
while (_local2 < OField.iFRows) {
_local3 = 0;
while (_local3 < OField.iFCols) {
_local4 = this.iField[_local2][_local3];
if (_local4.prCInd < 0){
} else {
if (_local4.State != _arg1){
return (false);
};
};
_local3++;
};
_local2++;
};
return (true);
}
private function MoveFBub():Boolean{
var _local6:Number;
var _local1:Point = this.iFBub.prVel;
this.iFBub.Move(_local1.x, _local1.y);
if ((((((_local1.x >= 0)) && (((this.iFBub.prX + this.iRadius) >= this.iRect.width)))) || ((((_local1.x < 0)) && (((this.iFBub.prX - this.iRadius) <= 0)))))){
_local1.x = -(_local1.x);
this.iBorderCount--;
};
if ((((_local1.y < 0)) && (((this.iFBub.prY - this.iRadius) <= 0)))){
_local1.y = -(_local1.y);
this.iBorderCount--;
};
var _local2:OBubble = this.iField[this.iFR][this.iFC];
var _local3:Number = (_local2.prX - this.iFBub.prX);
var _local4:Number = (_local2.prY - this.iFBub.prY);
var _local5:Number = ((_local3 * _local3) + (_local4 * _local4));
if (((((iBubbleFall) && ((this.iBorderCount == 0)))) || (!(iBubbleFall)))){
if (_local5 < ((this.iDiameter * this.iDiameter) * 2)){
_local6 = (_local1.length * 0.8);
if (_local6 < 1.5){
_local6 = 1.5;
};
_local1.x = (_local1.x + _local3);
_local1.y = (_local1.y + _local4);
_local1.normalize(_local6);
if (_local5 <= ((_local6 * _local6) * 2)){
this.iFBub.prVisible = false;
if (!iBang){
this.iBubbleCount++;
};
_local2.prCInd = iFBub.prCInd;
return (false);
};
};
};
return (true);
}
public function OnEnterFrame(_arg1:Event):void{
var _local2:Number;
var _local3:int;
var _local4:Number;
var _local5:Number;
switch (this.iState){
case stShowField:
this.FieldOnEnterFrame();
if (this.FieldIsAllStates(OBubble.stNormal)){
this.State = stShowFBub;
};
break;
case stShowFBub:
_local2 = (-(this.iRadius) / 4);
this.iFBub.Move(0, _local2);
this.iNBub.Move(0, _local2);
if (this.iFBub.prY == this.iFBubP.y){
this.State = stNormal;
};
break;
case stNormal:
if (!this.iBang){
_local3 = getTimer();
if (iCursor != null){
iCursor.Move((iDir.x * (_local3 - dTime)), (iDir.y * (_local3 - dTime)));
dTime = getTimer();
};
if ((((this.iRTime >= 0)) && (((_local3 - this.iTime) >= this.iRTime)))){
this.EmulateMove(new Point(iMx, iMy), this.iRRect);
this.iRTime = (this.iRecord.ReadTime() * 200);
iMx = this.iRecord.ReadCoord();
iMy = this.iRecord.ReadCoord();
if (iCursor){
_local4 = ((iMx * this.iRect.width) / iRRect.width);
_local5 = ((iMy * this.iRect.height) / iRRect.height);
iDir = new Point((((this.prX + _local4) - iCursor.prX) / iRTime), (((this.prY + _local5) - iCursor.prY) / iRTime));
};
this.iTime = _local3;
this.State = stMoveFBub;
};
};
break;
case stMoveFBub:
if (!this.MoveFBub()){
if (this.iLostShoot){
this.State = stAddNewBub;
} else {
this.State = stCalcRemove;
};
break;
};
break;
case stCalcRemove:
if (!this.FieldShowRemove()){
this.State = stAddNewBub;
};
break;
case stAddNewBub:
this.FieldOnEnterFrame();
if (this.FieldIsAllStates(OBubble.stNormal)){
this.State = stShuffle;
};
break;
case stLevelCompShow:
this.FieldOnEnterFrame();
if (!this.FieldShowRemove()){
if (!iBang){
this.State = stLevelComplete;
} else {
if (iBang.numChildren == 0){
this.State = stLevelComplete;
};
};
};
break;
case stGameOverShow:
this.FieldOnEnterFrame();
if (this.FieldIsAllStates(OBubble.stInvisible)){
this.State = stGameOver;
};
break;
};
}
private function Shuffle():void{
var _local2:int;
var _local1:int;
while (_local1 < OField.iFRows) {
_local2 = 0;
while (_local2 < OField.iFCols) {
if (ActiveCell(_local1, _local2) > 0){
this.iField[_local1][_local2].prCInd = this.iCIndexes[this.iRand.RandVal(this.iCIndexes.length)];
};
_local2++;
};
_local1++;
};
}
public function set State(_arg1:int):void{
this.iState = _arg1;
switch (this.iState){
case stInvisible:
this.prVisible = false;
case stShowField:
this.prVisible = true;
this.FieldInitShow();
break;
case stShowFBub:
this.FieldCalcColors();
if (this.FieldCheckLevComplete()){
this.State = stLevelCompShow;
break;
};
if (this.FieldCheckGameOver()){
this.State = stGameOverShow;
break;
};
this.iFBub.prCInd = this.iNBub.prCInd;
if (!this.ColorPresent(this.iFBub.prCInd)){
this.iFBub.prCInd = this.prNextColor;
};
this.iNBub.prCInd = this.prNextColor;
this.iFBub.Pos(this.iFBubP.x, (this.iFBubP.y + this.iDiameter));
this.iFBub.prVisible = true;
this.iNBub.Pos(this.iFBubP.x, (this.iFBubP.y + (this.iDiameter * 2)));
this.iNBub.prVisible = true;
break;
case stNormal:
this.iTime = getTimer();
this.dTime = getTimer();
break;
case stMoveFBub:
this.iLostShoot = false;
break;
case stCalcRemove:
if (!this.FieldCalcRemove()){
this.State = stAddNewBub;
};
break;
case stAddNewBub:
if (this.iLostShoot){
this.FieldShowNewBub(this.FieldCalcAddNewBub());
} else {
this.State = stShuffle;
};
break;
case stShuffle:
if (this.iBubbleFall){
this.Shuffle();
};
this.State = stShowFBub;
break;
case stLevelCompShow:
this.SendGameToServer();
this.FieldBangBlackBub();
this.iFBub.prVisible = false;
this.iNBub.prVisible = false;
break;
case stGameOverShow:
this.SendGameToServer();
this.FieldInitHide();
UI.iGAME.SetSaveGame(null);
this.iFBub.prVisible = false;
this.iNBub.prVisible = false;
break;
};
}
private function FieldCalcR(_arg1:int, _arg2:int, _arg3:int):void{
if ((((((((_arg1 < 0)) || ((_arg1 >= OField.iFRows)))) || ((_arg2 < 0)))) || ((_arg2 >= OField.iFCols)))){
return;
};
var _local4:OBubble = this.iField[_arg1][_arg2];
if (((!((_local4.prCInd == _arg3))) || (_local4.prType))){
return;
};
_local4.prType = (this.iBangCount++ + 1);
this.iNewField[_arg1][_arg2] = -1;
if ((_arg1 % 2) == 0){
FieldCalcR((_arg1 - 1), (_arg2 - 1), _arg3);
FieldCalcR((_arg1 - 1), _arg2, _arg3);
FieldCalcR(_arg1, (_arg2 - 1), _arg3);
FieldCalcR(_arg1, (_arg2 + 1), _arg3);
FieldCalcR((_arg1 + 1), (_arg2 - 1), _arg3);
FieldCalcR((_arg1 + 1), _arg2, _arg3);
} else {
FieldCalcR((_arg1 - 1), _arg2, _arg3);
FieldCalcR((_arg1 - 1), (_arg2 + 1), _arg3);
FieldCalcR(_arg1, (_arg2 - 1), _arg3);
FieldCalcR(_arg1, (_arg2 + 1), _arg3);
FieldCalcR((_arg1 + 1), _arg2, _arg3);
FieldCalcR((_arg1 + 1), (_arg2 + 1), _arg3);
};
}
public function NewLevel(_arg1:int, _arg2:Array=null):void{
var _local4:Array;
this.iBubbleCount = 0;
var _local3:int = ((_arg1 < OField.iLevels.length)) ? _arg1 : (_arg1 % OField.iLevels.length);
if (_local3 >= 0){
_local4 = OField.iLevels[_local3];
} else {
_local4 = _arg2;
};
this.iMaxColors = _local4[0][0];
if ((((_local4[0].length > 2)) && ((_local3 >= 0)))){
this.iRandomP = (_local4[0][2] + (5 * Math.floor((_arg1 / OField.iLevels.length))));
} else {
this.iRandomP = _local4[0][2];
};
this.iCIndexes = _local4[1];
this.iColors = new Array();
var _local5:int;
while (_local5 < this.iMaxColors) {
this.iColors[_local5] = this.iCIndexes[_local5];
_local5++;
};
this.iScorePurBubble = ((UI.iGAME.prLevel + 1) * 10);
if (_arg2 == null){
this.iRand.SeedRand(_local4[2][this.prGameIndex]);
} else {
this.iRand.SeedRand(_local4[2][0]);
};
if (this.iBang){
this.iRecord.WriteStart();
};
var _local6:int;
var _local7:int;
_local6 = 0;
while (_local6 < OField.iFRows) {
_local7 = 0;
while (_local7 < OField.iFCols) {
this.iField[_local6][_local7].prCInd = -1;
this.iField[_local6][_local7].prRadius = this.iRadius;
_local7++;
};
_local6++;
};
_local6 = 3;
while (_local6 < _local4.length) {
_local7 = 0;
while (_local7 < _local4[_local6].length) {
switch (_local4[_local6][_local7]){
case 9:
this.iField[(_local6 - 3)][_local7].prCInd = this.prNextColor;
this.iBubbleCount++;
break;
case 0:
break;
case 8:
this.iField[(_local6 - 3)][_local7].prCInd = (OBubble.iColorsCount - 1);
break;
default:
if (_local4[_local6][_local7] <= iColors.length){
this.iField[(_local6 - 3)][_local7].prCInd = this.iColors[(_local4[_local6][_local7] - 1)];
this.iBubbleCount++;
};
break;
};
_local7++;
};
_local6++;
};
this.iFBub.prCInd = this.prNextColor;
this.iNBub.prCInd = this.prNextColor;
this.iBangCount = 3;
if (this.iCounter){
this.iCounter.prValue = 0;
};
this.State = stShowField;
}
public function set prCursor(_arg1:OCursor):void{
this.iCursor = _arg1;
}
public function get prRecord():String{
return (this.iRecord.prStr);
}
private function ColorPresent(_arg1:int):Boolean{
var _local2:int;
while (_local2 < this.iColors.length) {
if (this.iColors[_local2] == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public function set prRecord(_arg1:String):void{
var _local2:Number;
var _local3:Number;
this.iRecord.prStr = _arg1;
if (_arg1){
this.iRecord.ReadStart();
this.iRTime = (this.iRecord.ReadTime() * 200);
iMx = this.iRecord.ReadCoord();
iMy = this.iRecord.ReadCoord();
if (iCursor != null){
_local2 = ((iMx * this.iRect.width) / iRRect.width);
_local3 = ((iMy * this.iRect.height) / iRRect.height);
iDir = new Point((((this.prX + _local2) - iCursor.prX) / iRTime), (((this.prY + _local3) - iCursor.prY) / iRTime));
};
} else {
this.iRTime = -1;
};
}
}
}//package MAIN.OBJECTS
Section 67
//OInfoObject (MAIN.OBJECTS.OInfoObject)
package MAIN.OBJECTS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import flash.net.*;
public class OInfoObject extends OIObject {
public var iAppStore:OButton;
public var iAmazonStore:OButton;
public function OInfoObject(_arg1:Array, _arg2:Array=null){
super(_arg1, _arg2);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == this.iAmazonStore){
navigateToURL(new URLRequest(UI.sURLAmazonStore.split("[place]").join("5")));
return;
};
if (_arg2 == this.iAppStore){
navigateToURL(new URLRequest(UI.sURLAppStore.split("[place]").join("5")));
return;
};
(this.parent as OIObject).OnPress(_arg1, _arg2);
}
}
}//package MAIN.OBJECTS
Section 68
//ORecord (MAIN.OBJECTS.ORecord)
package MAIN.OBJECTS {
import ENGINE.CORE.*;
public class ORecord {
private var iStr:String;
private var iPos:int;
private var iRecLen:int;// = 2
private static var iCount:int = 62;
private static var sAlphabet:String;
public function ORecord(){
this.iPos = -1;
}
public function WriteNode(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean, _arg6:int, _arg7:int):void{
if (this.iPos < 0){
return;
};
this.iStr = (this.iStr + OUtils.AddZero(_arg3.toString(), 2));
this.iStr = (this.iStr + IntToCode(_arg1));
this.iStr = (this.iStr + IntToCode(_arg2));
this.iStr = (this.iStr + sAlphabet.substr(_arg4, 1));
this.iStr = (this.iStr + (_arg5) ? 1 : 0.toString());
this.iStr = (this.iStr + sAlphabet.substr(_arg6, 1));
this.iStr = (this.iStr + sAlphabet.substr(_arg7, 1));
}
public function WriteStart():void{
this.iStr = "";
this.iPos = 0;
sAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
}
public function ReadSmallInt():int{
if (this.iPos >= this.iStr.length){
return (-1);
};
var _local1:String = this.iStr.substr(this.iPos, 1);
this.iPos++;
return (sAlphabet.indexOf(_local1));
}
public function ReadTime():int{
if (this.iPos >= this.iStr.length){
return (-1);
};
var _local1:String = this.iStr.substr(this.iPos, 2);
this.iPos = (this.iPos + 2);
return (int(_local1));
}
public function ReadStart():void{
sAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
this.iPos = 0;
}
public function get prStr():String{
return (this.iStr);
}
public function ReadFall():Boolean{
if (this.iPos >= this.iStr.length){
return (false);
};
var _local1:String = this.iStr.substr(this.iPos, 1);
this.iPos++;
return (((int(_local1))==1) ? true : false);
}
private function IntToCode(_arg1:int):String{
var _local2:int = ((_arg1)>=(iCount * iCount)) ? ((iCount * iCount) - 1) : _arg1;
var _local3:int = (_local2 % iCount);
var _local4:int = (((_local2 - _local3) / iCount) % iCount);
return ((sAlphabet.charAt(_local4) + sAlphabet.charAt(_local3)));
}
public function set prStr(_arg1:String):void{
this.iStr = _arg1;
}
public function ReadCoord():int{
if (this.iPos >= this.iStr.length){
return (-1);
};
var _local1:String = this.iStr.substr(this.iPos, 2);
this.iPos = (this.iPos + 2);
return (CodeToInt(_local1));
}
public static function CodeToInt(_arg1:String):int{
return (((sAlphabet.indexOf(_arg1.charAt(0)) * iCount) + sAlphabet.indexOf(_arg1.charAt(1))));
}
}
}//package MAIN.OBJECTS
Section 69
//SButtonBitmap (MAIN.UTIL.SButtonBitmap)
package MAIN.UTIL {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import flash.utils.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import flash.filters.*;
public class SButtonBitmap extends OButton {
private var iLayerButton:OSprite;
protected var iListImage:Array;
private var flag_down:Boolean;
private var iLayerFrame:OSprite;
private var iID_TimeOut:int;
private var iImgText:DisplayObject;
private var iFilterOver:ColorMatrixFilter;
private var iStateButton:int;
protected static const STATE_OUT:int = 0;
protected static const STATE_OVER:int = 1;
protected static const STATE_DOWN:int = 2;
public function SButtonBitmap(_arg1:Number, _arg2:Number, _arg3:Class, _arg4:Class, _arg5:Class, _arg6:String, _arg7:int, _arg8:String, _arg9:Boolean=false, _arg10:Boolean=false){
var _local11:DisplayObject;
var _local12:Array;
var _local13:OBitmap;
var _local14:Array;
var _local15:OBitmap;
var _local16:Array;
var _local17:OBitmap;
var _local18:Array;
var _local19:OBitmap;
var _local20:OBitmap;
_local12 = [[OSprite.Make, [[ODisplay.SpriteRect, (_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale)]], 0, 0, "iHit", 0, false]];
super(_local12, OAnimatorManager.iNullAnimators);
this.iLayerFrame = (this.addChild(new OSprite()) as OSprite);
this.iLayerButton = (this.addChild(new OSprite()) as OSprite);
this.iLayerButton.buttonMode = false;
this.iLayerButton.tabChildren = false;
this.iLayerButton.tabEnabled = false;
this.iLayerButton.mouseChildren = false;
this.iLayerButton.mouseEnabled = false;
this.iLayerFrame.buttonMode = false;
this.iLayerFrame.tabChildren = false;
this.iLayerFrame.tabEnabled = false;
this.iLayerFrame.mouseChildren = false;
this.iLayerFrame.mouseEnabled = false;
this.flag_down = false;
this.iID_TimeOut = 0;
if (_arg9){
_local14 = [ODisplay.OBitmapSpriteFillRect, _arg1, _arg2, [ODisplay.SpriteLib, new (_arg3)], "GEL", _arg8, "text 60", 1, 0, 0, null, 0, true];
_local15 = ODisplay.OBitmapSpriteFillRect(_local14);
_local16 = [ODisplay.OBitmapSpriteFillRect, _arg1, _arg2, [ODisplay.SpriteLib, new (_arg3)], "GEL", _arg8, "text 60", 1, 0, 0, null, 0, true];
_local17 = ODisplay.OBitmapSpriteFillRect(_local16);
_local18 = [ODisplay.OBitmapSpriteFillRect, _arg1, _arg2, [ODisplay.SpriteLib, new (_arg3)], "GEL", _arg8, "text 60", 1, 0, 0, null, 0, true];
_local19 = ODisplay.OBitmapSpriteFillRect(_local18);
this.iListImage = [this.iLayerButton.addChild(_local15), this.iLayerButton.addChild(_local17), this.iLayerButton.addChild(_local19)];
if (_arg10){
_local20 = ODisplay.OBitmapRoundFrame([null, _arg1, _arg2, 16, 3, "GEL", _arg8, "border", 1, _arg8, "spanel ns", 1, OGlobal.ScaleFloor(0), OGlobal.ScaleFloor(0)]);
iLayerFrame.addChild(_local20);
};
this.iLayerButton.Pos((iLayerButton.prWidth / 5.5), (this.iLayerButton.prHeight / 5.5));
this.iLayerFrame.Pos(0, 0);
} else {
this.iListImage = [this.iLayerButton.addChild(this.makeImage(_arg3, _arg1, _arg2)), this.iLayerButton.addChild(this.makeImage(_arg4, _arg1, _arg2)), this.iLayerButton.addChild(this.makeImage(_arg4, _arg1, _arg2))];
};
this.setState(STATE_OUT);
if (_arg6 != ""){
this.iImgText = GL.Header([null, _arg1, _arg7, _arg8, _arg6, 0, 0]);
(this.iImgText as OBitmap).prY = ((_arg2 / 2) - (_arg7 / 2));
this.iLayerButton.addChild(this.iImgText);
this.iFilterOver = new ColorMatrixFilter(getContrast(1.5));
};
}
public function OffsetText(_arg1:Number, _arg2:Number):void{
if (this.iImgText != null){
this.iImgText.x = (this.iImgText.x + (_arg1 * OGlobal.Scale));
this.iImgText.y = (this.iImgText.y + (_arg2 * OGlobal.Scale));
};
}
protected function makeImage(_arg1:Class, _arg2:Number, _arg3:Number):DisplayObject{
var _local4:DisplayObject;
_local4 = new (_arg1);
_local4.width = (_arg2 * OGlobal.Scale);
_local4.height = (_arg3 * OGlobal.Scale);
if ((_local4 is Bitmap)){
(_local4 as Bitmap).smoothing = true;
};
if ((_local4 is Sprite)){
(_local4 as Sprite).mouseChildren = false;
(_local4 as Sprite).mouseEnabled = false;
(_local4 as Sprite).tabChildren = false;
(_local4 as Sprite).tabEnabled = false;
(_local4 as Sprite).buttonMode = false;
};
return (_local4);
}
protected function setState(_arg1:int):void{
var _local2:int;
this.iStateButton = _arg1;
if ((((this.flag_down == true)) && (!((this.iStateButton == STATE_DOWN))))){
return;
};
_local2 = 0;
while (_local2 < this.iListImage.length) {
(this.iListImage[_local2] as DisplayObject).visible = (_local2 == _arg1);
_local2++;
};
if (this.iImgText != null){
switch (_arg1){
case STATE_OUT:
this.iImgText.filters = [];
break;
case STATE_OVER:
this.iImgText.filters = [this.iFilterOver];
break;
};
};
}
override public function OnRollOver(_arg1:MouseEvent):void{
super.OnRollOver(_arg1);
this.setState(STATE_OVER);
}
override public function OnRollOut(_arg1:MouseEvent):void{
super.OnRollOut(_arg1);
this.setState(STATE_OUT);
}
private function OnEndAnimDowm():void{
this.flag_down = false;
super.OnMouseDown(null);
this.setState(this.iStateButton);
}
override public function set prVisible(_arg1:Boolean):void{
super.prVisible = _arg1;
this.iLayerButton.prVisible = _arg1;
if ((((_arg1 == true)) && ((this.visible == false)))){
this.visible = true;
};
}
override public function OnMouseDown(_arg1:MouseEvent):void{
this.setState(STATE_DOWN);
if (this.flag_down == true){
clearTimeout(this.iID_TimeOut);
this.flag_down = false;
};
if (this.iImgText){
this.iImgText.filters = [this.iFilterOver];
};
this.flag_down = true;
this.iID_TimeOut = setTimeout(this.OnEndAnimDowm, 1000);
}
private static function getContrast(_arg1:Number):Array{
return ([_arg1, 0, 0, 0, _arg1, 0, _arg1, 0, 0, _arg1, 0, 0, _arg1, 0, _arg1, 0, 0, 0, 1, 0]);
}
}
}//package MAIN.UTIL
Section 70
//SConfig (MAIN.UTIL.SConfig)
package MAIN.UTIL {
public class SConfig {
public static const USE_NETWORK:Boolean = true;
public static var cheatsEnabled:Boolean = false;
public static var language:String = "en";
public static var list_language:Array = [];
public static var AREA:String = "";
}
}//package MAIN.UTIL
Section 71
//SConfigLoader (MAIN.UTIL.SConfigLoader)
package MAIN.UTIL {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
public class SConfigLoader extends Sprite {
private var iViewLoader:Sprite;
private var iTotalSize:int;
private var pathSwf:String;// = ""
private var iRoot:DisplayObject;
private var iLoadList:Array;
private var iByteLoaded:int;
private var iLoadData:SLoadData;
private var i_func_complete:Function;
private static var iListFile:Array;
public function SConfigLoader(_arg1:Function, _arg2:DisplayObject){
this.i_func_complete = _arg1;
this.iRoot = _arg2;
this.iLoadList = [["config.xml", "global/config.xml", SLoadData.FILE_XML]];
SConfigLoader.iListFile = new Array();
this.iByteLoaded = 0;
this.iTotalSize = 100000000000;
XML.ignoreWhitespace = false;
this.iLoadData = new SLoadData();
this.iLoadData.addEventListener(SLoadData.EVENT_COMPLETE, this.OnLoadDataComplete);
this.iLoadData.addEventListener(SLoadData.EVENT_ERROR, this.OnLoadDataError);
this.LoadNextFile();
}
private function OnLoadDataError(_arg1:Event):void{
var _local2:String;
var _local3:Object;
var _local4:String;
trace("Loading Data -> Error");
_local2 = this.iLoadData.getID();
_local3 = null;
_local4 = this.iLoadData.getType();
switch (_local4){
case SLoadData.FILE_XML:
trace(("Change XML File " + this.iLoadData.getPath()));
_local3 = SDefaultXML.getXMLFile(this.iLoadData.getPath().replace(pathSwf, ""));
break;
};
if (_local3 != null){
trace("Change Succesfull");
this.iLoadData.setData(_local3);
this.OnLoadDataComplete(null);
};
}
private function AddLoadList(_arg1:XML):void{
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:String;
_local2 = 0;
while (_local2 < _arg1.file.length()) {
_local3 = _arg1.file[_local2].@id;
_local4 = _arg1.file[_local2].@path;
_local5 = _arg1.file[_local2].@type;
this.iLoadList.push([_local3, _local4, _local5]);
_local2++;
};
}
private function OnLoadDataComplete(_arg1:Event):void{
var _local2:String;
var _local3:Object;
var _local4:String;
trace((" Loaded File -> " + this.iLoadData.getPath()));
this.iByteLoaded = (this.iByteLoaded + this.iLoadData.getBytesLoaded());
_local2 = this.iLoadData.getID();
_local3 = this.iLoadData.getData();
_local4 = this.iLoadData.getType();
SConfigLoader.iListFile.push([_local2, _local3, _local4]);
switch (this.iLoadData.getID()){
case "config.xml":
SConfigLoader.readConfigXML(this.iRoot.root.loaderInfo.parameters, (_local3 as XML));
this.AddLoadList((_local3 as XML));
break;
case "list_assets.xml":
case "list_localized.xml":
this.AddLoadList((_local3 as XML));
break;
};
this.LoadNextFile();
}
private function InitLanguage():void{
var _local1:int;
var _local2:XML;
var _local3:String;
var _local4:String;
var _local5:String;
var _local6:String;
_local2 = getXMLFile("config.xml");
SConfig.list_language = new Array();
_local1 = 0;
while (_local1 < _local2.language.length()) {
_local3 = _local2.language[_local1].@id;
_local4 = _local2.language[_local1].@xml;
_local5 = _local2.language[_local1].@name;
_local6 = _local2.language[_local1].@ui;
if (_local6 == ""){
_local6 = "LibraryDefault";
};
SConfig.list_language.push([_local3, _local4, _local5, _local6]);
_local1++;
};
}
private function setProcess(_arg1:Number):void{
if (this.iViewLoader == null){
return;
};
if (_arg1 < 0){
_arg1 = 0;
};
if (_arg1 > 1){
_arg1 = 1;
};
this.iViewLoader.scaleX = _arg1;
}
private function LoadNextFile():void{
var _local1:String;
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:int;
if (this.iLoadList.length > 0){
_local1 = this.iLoadList[0][0];
_local2 = this.iLoadList[0][1];
_local3 = this.iLoadList[0][2];
this.iLoadList.splice(0, 1);
_local2 = SStrings.replace(_local2, "[LANG]", SConfig.language);
if (Preloader.baseUrl == ""){
_local4 = Preloader.sPath;
_local5 = 0;
_local6 = 0;
while (_local6 < _local4.length) {
if (_local4.charAt(_local6) == "/"){
_local5 = _local6;
};
_local6++;
};
_local4 = _local4.substr(0, (_local5 + 1));
pathSwf = _local4;
} else {
pathSwf = Preloader.baseUrl;
};
_local2 = (pathSwf + _local2);
this.iLoadData.Load(_local2, _local1, _local3);
} else {
trace(("Loaded -> " + this.iByteLoaded));
this.LoadComplete();
};
}
public function Free():void{
this.i_func_complete = null;
this.iLoadData.Free();
this.iRoot = null;
}
private function LoadComplete():void{
this.InitLanguage();
ValidLanguage();
this.i_func_complete();
}
private static function getBoolVal(_arg1:Object):Boolean{
if (((!((_arg1 == null))) && ((((((((_arg1 == Boolean(true))) || ((_arg1 == Boolean(1))))) || ((_arg1 == "true")))) || ((_arg1 == "1")))))){
return (true);
};
return (false);
}
public static function ValidLanguage():void{
var _local1:int;
_local1 = 0;
while (_local1 < SConfig.list_language.length) {
if (SConfig.language == SConfig.list_language[_local1][0]){
return;
};
_local1++;
};
trace((("LANGUAGE -> " + SConfig.language) + " , not found. Use language English"));
SConfig.language = "en";
}
public static function getSoundFile(_arg1:String):Sound{
var _local2:int;
_local2 = 0;
while (_local2 < SConfigLoader.iListFile.length) {
if (SConfigLoader.iListFile[_local2][2] != SLoadData.FILE_SOUND){
} else {
if (SConfigLoader.iListFile[_local2][0] == _arg1){
return (SConfigLoader.iListFile[_local2][1]);
};
};
_local2++;
};
trace((("ERROR -> SOUND FILE -> " + _arg1) + " -> NOT FOUND"));
return (null);
}
public static function getImageFile(_arg1:String):Bitmap{
var _local2:int;
_local2 = 0;
while (_local2 < SConfigLoader.iListFile.length) {
if (SConfigLoader.iListFile[_local2][2] != SLoadData.FILE_IMAGE){
} else {
if (SConfigLoader.iListFile[_local2][0] == _arg1){
return (SConfigLoader.iListFile[_local2][1]);
};
};
_local2++;
};
return (null);
}
public static function getDataFile(_arg1:String):ByteArray{
var _local2:int;
_local2 = 0;
while (_local2 < SConfigLoader.iListFile.length) {
if (SConfigLoader.iListFile[_local2][2] != SLoadData.FILE_DATA){
} else {
if (SConfigLoader.iListFile[_local2][0] == _arg1){
return (SConfigLoader.iListFile[_local2][1]);
};
};
_local2++;
};
trace((("ERROR -> DATA FILE -> " + _arg1) + " -> NOT FOUND"));
return (null);
}
public static function getXMLFile(_arg1:String):XML{
var _local2:int;
_local2 = 0;
while (_local2 < SConfigLoader.iListFile.length) {
if (SConfigLoader.iListFile[_local2][2] != SLoadData.FILE_XML){
} else {
if (SConfigLoader.iListFile[_local2][0] == _arg1){
return (SConfigLoader.iListFile[_local2][1]);
};
};
_local2++;
};
trace((("ERROR -> XML FILE -> " + _arg1) + " -> NOT FOUND"));
return (null);
}
private static function getParamConfigXML(_arg1:String, _arg2:Object, _arg3:XML):String{
var _local4:int;
trace(((("aFlashVars[" + _arg1) + "] = ") + _arg2[_arg1]));
if (_arg2[_arg1] != undefined){
return (_arg2[_arg1]);
};
if (_arg3 != null){
_local4 = 0;
while (_local4 < _arg3["var"].length()) {
if (_arg3["var"][_local4].@id == _arg1){
trace(((("getParamConfigXML(" + _arg1) + ") = ") + _arg3["var"][_local4]));
return (_arg3["var"][_local4]);
};
_local4++;
};
};
return ("");
}
public static function readConfigXML(_arg1:Object, _arg2:XML):void{
var _local3:String;
_local3 = getParamConfigXML("language", _arg1, _arg2);
if (_local3 != ""){
SConfig.language = _local3;
};
_local3 = getParamConfigXML("Lang", _arg1, _arg2);
if (_local3 != ""){
SConfig.language = _local3;
};
_local3 = getParamConfigXML("area", _arg1, _arg2);
if (_local3 != ""){
SConfig.AREA = _local3;
};
_local3 = getParamConfigXML("cheatsEnabled", _arg1, _arg2);
if (_local3 != ""){
SConfig.cheatsEnabled = getBoolVal(_local3);
};
}
}
}//package MAIN.UTIL
Section 72
//SDefaultXML (MAIN.UTIL.SDefaultXML)
package MAIN.UTIL {
public class SDefaultXML {
private static var text_fr:Class = SDefaultXML_text_fr;
private static var text_de:Class = SDefaultXML_text_de;
private static var text_ru:Class = SDefaultXML_text_ru;
private static var config_xml:Class = SDefaultXML_config_xml;
private static var text_en:Class = SDefaultXML_text_en;
private static var LIST:Array = [["global/config.xml", config_xml], ["localized/en/text.xml", text_en], ["localized/ru/text.xml", text_ru], ["localized/de/text.xml", text_de], ["localized/fr/text.xml", text_fr]];
public static function getXMLFile(_arg1:String):XML{
var _local2:int;
_local2 = 0;
while (_local2 < LIST.length) {
if (((!((_arg1.lastIndexOf(LIST[_local2][0]) == -1))) && (((_arg1.length - _arg1.lastIndexOf(LIST[_local2][0])) == LIST[_local2][0].length)))){
return (new XML(new (LIST[_local2][1])));
};
_local2++;
};
return (null);
}
}
}//package MAIN.UTIL
Section 73
//SDefaultXML_config_xml (MAIN.UTIL.SDefaultXML_config_xml)
package MAIN.UTIL {
import mx.core.*;
public class SDefaultXML_config_xml extends ByteArrayAsset {
}
}//package MAIN.UTIL
Section 74
//SDefaultXML_text_de (MAIN.UTIL.SDefaultXML_text_de)
package MAIN.UTIL {
import mx.core.*;
public class SDefaultXML_text_de extends ByteArrayAsset {
}
}//package MAIN.UTIL
Section 75
//SDefaultXML_text_en (MAIN.UTIL.SDefaultXML_text_en)
package MAIN.UTIL {
import mx.core.*;
public class SDefaultXML_text_en extends ByteArrayAsset {
}
}//package MAIN.UTIL
Section 76
//SDefaultXML_text_fr (MAIN.UTIL.SDefaultXML_text_fr)
package MAIN.UTIL {
import mx.core.*;
public class SDefaultXML_text_fr extends ByteArrayAsset {
}
}//package MAIN.UTIL
Section 77
//SDefaultXML_text_ru (MAIN.UTIL.SDefaultXML_text_ru)
package MAIN.UTIL {
import mx.core.*;
public class SDefaultXML_text_ru extends ByteArrayAsset {
}
}//package MAIN.UTIL
Section 78
//SLoadData (MAIN.UTIL.SLoadData)
package MAIN.UTIL {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
public class SLoadData extends Sprite {
private var iType:String;
private var iID:String;
private var iChangeData:Object;
private var iSound:Sound;
private var iLoader:URLLoader;
private var iPath:String;
private var iImage:Loader;
public static const EVENT_ERROR:String = "EVENT_ERROR";
public static const FILE_SOUND:String = "sound";
public static const FILE_DATA:String = "data";
public static const FILE_TEXT:String = "text";
public static const FILE_XML:String = "xml";
public static const FILE_IMAGE:String = "img";
public static const EVENT_COMPLETE:String = "EVENT_COMPLETE";
private function ClearListeners():void{
if (this.iLoader != null){
this.iLoader.removeEventListener(Event.COMPLETE, this.OnLoadComplete);
this.iLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.OnLoadSecurityError);
};
if (this.iSound != null){
this.iSound.removeEventListener(Event.COMPLETE, this.OnLoadComplete);
};
if (this.iImage != null){
this.iImage.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.OnLoadComplete);
};
}
public function Free():void{
this.ClearListeners();
this.iLoader = null;
this.iSound = null;
this.iImage = null;
}
public function Load(_arg1:String, _arg2:String, _arg3:String):void{
var aURL:URLRequest;
var aPath = _arg1;
var aID = _arg2;
var aType = _arg3;
this.iID = aID;
this.iPath = aPath;
this.iType = aType;
this.iLoader = null;
this.iSound = null;
this.iImage = null;
this.iChangeData = null;
switch (this.iType){
case FILE_XML:
case FILE_TEXT:
this.iLoader = new URLLoader();
this.iLoader.dataFormat = URLLoaderDataFormat.TEXT;
break;
case FILE_DATA:
this.iLoader = new URLLoader();
this.iLoader.dataFormat = URLLoaderDataFormat.BINARY;
break;
case FILE_SOUND:
this.iSound = new Sound();
break;
case FILE_IMAGE:
this.iImage = new Loader();
break;
};
trace(("Loading -> " + aPath));
aURL = new URLRequest(aPath);
if (this.iLoader != null){
this.iLoader.addEventListener(Event.COMPLETE, this.OnLoadComplete);
this.iLoader.addEventListener(IOErrorEvent.IO_ERROR, this.OnLoadError);
this.iLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.OnLoadSecurityError);
};
if (this.iSound != null){
this.iSound.addEventListener(Event.COMPLETE, this.OnLoadComplete);
this.iSound.addEventListener(IOErrorEvent.IO_ERROR, this.OnLoadError);
};
if (this.iImage != null){
this.iImage.contentLoaderInfo.addEventListener(Event.COMPLETE, this.OnLoadComplete);
this.iImage.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.OnLoadError);
};
if (SConfig.USE_NETWORK == true){
try {
if (this.iLoader != null){
this.iLoader.load(aURL);
};
if (this.iSound != null){
this.iSound.load(aURL);
};
if (this.iImage != null){
this.iImage.load(aURL);
};
} catch(aError:Error) {
this.ClearListeners();
this.dispatchEvent(new Event(EVENT_ERROR));
};
} else {
this.ClearListeners();
this.dispatchEvent(new Event(EVENT_ERROR));
};
}
public function getBytesLoaded():Number{
if (this.iLoader != null){
return (this.iLoader.bytesLoaded);
};
if (this.iSound != null){
return (this.iSound.bytesLoaded);
};
if (this.iImage != null){
return (this.iImage.contentLoaderInfo.bytesLoaded);
};
return (0);
}
public function getPath():String{
return (this.iPath);
}
private function OnLoadComplete(_arg1:Event):void{
this.ClearListeners();
this.dispatchEvent(new Event(EVENT_COMPLETE));
}
public function getData():Object{
var _local1:Bitmap;
if (this.iChangeData != null){
return (this.iChangeData);
};
if (this.iLoader != null){
switch (this.iType){
case FILE_XML:
return (new XML(this.iLoader.data));
case FILE_DATA:
case FILE_TEXT:
return (this.iLoader.data);
default:
return (this.iLoader.data);
};
};
if (this.iSound != null){
return (this.iSound);
};
if (this.iImage != null){
return (this.iImage.content);
};
return (null);
}
private function OnLoadSecurityError(_arg1:SecurityErrorEvent):void{
trace(("ERROR -> OLoadData -> OnLoadSecurityError -> SecurityErrorEvent -> " + _arg1.text));
this.ClearListeners();
this.dispatchEvent(new Event(EVENT_ERROR));
}
private function OnLoadError(_arg1:IOErrorEvent):void{
trace(("ERROR -> OLoadData -> OnLoadError -> IOErrorEvent -> " + _arg1.text));
this.ClearListeners();
this.dispatchEvent(new Event(EVENT_ERROR));
}
public function setData(_arg1:Object):void{
this.iChangeData = _arg1;
}
public function getType():String{
return (this.iType);
}
public function getID():String{
return (this.iID);
}
public function getProcess():int{
if (this.iLoader != null){
return (((this.iLoader.bytesLoaded * 100) / this.iLoader.bytesTotal));
};
if (this.iSound != null){
return (((this.iSound.bytesLoaded * 100) / this.iSound.bytesTotal));
};
if (this.iImage != null){
return (((this.iImage.contentLoaderInfo.bytesLoaded * 100) / this.iImage.contentLoaderInfo.bytesTotal));
};
return (0);
}
}
}//package MAIN.UTIL
Section 79
//SPanelSysButtons (MAIN.UTIL.SPanelSysButtons)
package MAIN.UTIL {
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import MAIN.WINDOWS.*;
public class SPanelSysButtons extends Sprite {
private var iLayerButtons:Sprite;
private var iFuncClickLang:Function;
private var btn_sound:Sprite;
private var btn_language:Sprite;
public var btn_fullscreen:Sprite;
public static var sInstance:SPanelSysButtons;
public function SPanelSysButtons(){
sInstance = this;
this.iLayerButtons = (this.addChild(new Sprite()) as Sprite);
this.iLayerButtons.scaleX = (this.iLayerButtons.scaleY = (OGlobal.Scale * 0.75));
if (this.stage == null){
this.addEventListener(Event.ADDED_TO_STAGE, this.OnAddedToStage);
} else {
this.OnAddedToStage(null);
};
}
private function OnAddedToStage(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, this.OnAddedToStage);
this.MakeSysButtons();
}
private function ClickFullscreen():void{
if (stage == null){
return;
};
try {
if (stage.displayState == StageDisplayState.FULL_SCREEN){
stage.displayState = StageDisplayState.NORMAL;
} else {
stage.displayState = StageDisplayState.FULL_SCREEN;
};
} catch(e:Error) {
trace("ERROR -> CHANGE DISPLAY STATE");
};
}
public function Free():void{
this.removeEventListener(Event.ADDED_TO_STAGE, this.OnAddedToStage);
sInstance = null;
this.iFuncClickLang = null;
this.btn_language.removeEventListener(MouseEvent.CLICK, this.OnButtonMouseDown);
this.btn_fullscreen.removeEventListener(MouseEvent.CLICK, this.OnButtonMouseDown);
this.btn_sound.removeEventListener(MouseEvent.CLICK, this.OnButtonMouseDown);
}
private function RefreshFullscreen():void{
if (stage == null){
return;
};
if (stage.displayState != StageDisplayState.FULL_SCREEN){
this.btn_fullscreen["btn_restore"].visible = false;
this.btn_fullscreen["btn_fullscreen"].visible = true;
} else {
this.btn_fullscreen["btn_restore"].visible = true;
this.btn_fullscreen["btn_fullscreen"].visible = false;
};
}
public function RefreshLanguage():void{
this.btn_language["text1"].text = (this.btn_language["text2"].text = SConfig.language.toUpperCase());
}
public function setFuncClickLang(_arg1:Function):void{
this.iFuncClickLang = _arg1;
}
private function MakeSysButtons():void{
this.btn_language = new UI.Lib_language();
this.btn_language.x = 0;
this.btn_language.y = 0;
this.btn_language["text1"].mouseEnabled = (this.btn_language["text2"].mouseEnabled = false);
this.iLayerButtons.addChild(this.btn_language);
this.btn_language.addEventListener(MouseEvent.CLICK, this.OnButtonMouseDown);
this.RefreshLanguage();
this.btn_fullscreen = new UI.Lib_fullscreen();
this.btn_fullscreen.x = 40;
this.btn_fullscreen.y = 0;
this.iLayerButtons.addChild(this.btn_fullscreen);
this.btn_fullscreen.addEventListener(MouseEvent.CLICK, this.OnButtonMouseDown);
this.RefreshFullscreen();
this.btn_sound = new UI.Lib_sound();
this.btn_sound.x = 80;
this.btn_sound.y = 0;
this.iLayerButtons.addChild(this.btn_sound);
this.btn_sound.addEventListener(MouseEvent.CLICK, this.OnButtonMouseDown);
this.RefreshButtonSound();
}
public function RefreshButtonSound():void{
this.btn_sound["btn_sound_off"].visible = OSound.Mute;
this.btn_sound["btn_sound_on"].visible = !(OSound.Mute);
}
private function OnButtonMouseDown(_arg1:MouseEvent):void{
var _local2:OWindow;
switch (_arg1.currentTarget){
case this.btn_language:
trace("Press -> Language");
_local2 = (OApplication.sInstance as Clusterz).getTopWindow();
if (((!((_local2 == null))) && ((_local2 is OWLanguage)))){
trace("Window Language already open");
return;
};
if (this.iFuncClickLang != null){
this.iFuncClickLang();
};
OApplication.sInstance.OnPress(null, UI.miLanguage);
if (_local2 != null){
_local2.prActive = false;
};
break;
case this.btn_fullscreen:
trace("Press -> Fullscreen");
this.ClickFullscreen();
this.RefreshFullscreen();
break;
case this.btn_sound:
trace("Press -> Sound");
OSound.Mute = !(OSound.Mute);
this.RefreshButtonSound();
break;
};
}
}
}//package MAIN.UTIL
Section 80
//SStrings (MAIN.UTIL.SStrings)
package MAIN.UTIL {
public class SStrings {
private static var iStringTable:Object;
private static var iConfigLoader:SConfigLoader;
public static function AddStrings(_arg1:XML):void{
var _local2:int;
var _local3:String;
var _local4:String;
if (SStrings.iStringTable == null){
SStrings.iStringTable = new Object();
};
_local2 = 0;
while (_local2 < _arg1.text.length()) {
_local3 = _arg1.text[_local2].@id;
_local4 = _arg1.text[_local2];
SStrings.iStringTable[_local3] = newLinesApply(_local4);
_local2++;
};
}
public static function getString(_arg1:String):String{
if ((((((SStrings.iStringTable == null)) || ((SStrings.iStringTable[_arg1] == undefined)))) || ((SStrings.iStringTable[_arg1] == null)))){
trace(("ERROR -> STRINGS NOT FOUND -> ID -> " + _arg1));
return ("");
};
return (SStrings.iStringTable[_arg1]);
}
public static function TimeToString(_arg1:int):String{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:String;
var _local6:String;
var _local7:String;
_local2 = Math.floor((_arg1 / 3600));
_arg1 = (_arg1 - (_local2 * 3600));
_local3 = Math.floor((_arg1 / 60));
_arg1 = (_arg1 - (_local3 * 60));
_local4 = _arg1;
if (_local2 > 0){
_local5 = (_local2.toString() + ":");
} else {
_local5 = "";
};
if (_local3 < 10){
_local6 = ("0" + _local3.toString());
} else {
_local6 = _local3.toString();
};
if (_local4 < 10){
_local7 = ("0" + _local4.toString());
} else {
_local7 = _local4.toString();
};
return ((((_local5 + _local6) + ":") + _local7));
}
public static function replace(_arg1:String, _arg2:String, _arg3:String):String{
var _local4:String;
var _local5:int;
var _local6:int;
while ((_local5 = _arg1.indexOf(_arg2)) >= 0) {
_local6 = (_local5 + _arg2.length);
_local4 = _arg1.substr(0, _local5);
_local4 = (_local4 + _arg3);
_local4 = (_local4 + _arg1.substr(_local6, _arg1.length));
_arg1 = _local4;
};
return (_arg1);
}
public static function newLinesApply(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
for (;_local2 < (_arg1.length - 1);_local2++) {
if (_arg1.substr(_local2, 2) == "\\n"){
_arg1 = ((_arg1.substring(0, _local2) + "\n") + _arg1.substring((_local2 + 2), _arg1.length));
continue;
};
};
return (_arg1);
}
}
}//package MAIN.UTIL
Section 81
//OWChoosePlayer (MAIN.WINDOWS.OWChoosePlayer)
package MAIN.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import MAIN.UTIL.*;
public class OWChoosePlayer extends ODialog {
public var iCancel:OButton;
public var iListBox:OListBox;
public var iAccept:OButton;
private var iData;
public var iDelete:OButton;
public var iNew:OButton;
private var iCurPlayer:String;
public function OWChoosePlayer(){
super(UI.OWChoosePlayer);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (!this.prMouseEnabled){
return;
};
if (_arg2 == this.iNew){
OApplication.sInstance.OnPress(null, UI.miEnterNewName);
this.prActive = false;
return;
};
if (_arg2 == this.iDelete){
OApplication.sInstance.OnPress(null, UI.miDeletePlayerConfirm);
this.prActive = false;
return;
};
if (_arg2 == this.iCancel){
UI.iGAME.prPlayersData = this.iData;
UI.iGAME.prPlayerName = this.iCurPlayer;
OApplication.sInstance.OnPress(null, UI.miMenu);
this.prVisible = false;
return;
};
if (_arg2 == this.iAccept){
if (UI.iMP.isConnected){
UI.iMP.disconnect();
};
OApplication.sInstance.OnPress(null, UI.miMenu);
if (((!((UI.iGAME.prLang == null))) && (!((SConfig.language == UI.iGAME.prLang))))){
SConfig.language = UI.iGAME.prLang;
SConfigLoader.ValidLanguage();
if (SPanelSysButtons.sInstance != null){
SPanelSysButtons.sInstance.RefreshLanguage();
};
UI.ReInit();
(OApplication.sInstance as Clusterz).CloseAllWindows();
} else {
if (UI.iGAME.prLang == null){
UI.iGAME.prLang = SConfig.language;
};
this.prVisible = false;
};
return;
};
if ((((_arg2 == this.iListBox)) && (!((UI.iGAME.prPlayerName == this.iListBox.prCurrentLBParam))))){
UI.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();
}
override public function Init():void{
super.Init();
this.iData = UI.iGAME.prPlayersData;
this.iCurPlayer = UI.iGAME.prPlayerName;
this.iListBox.SetCurrentElement(UI.iGAME.prPlayerName, UI.iGAME.prPlayerNames);
}
override public function set prActive(_arg1:Boolean):void{
if (_arg1){
SPanelSysButtons.sInstance.btn_fullscreen.visible = true;
this.iListBox.SetCurrentElement(UI.iGAME.prPlayerName, UI.iGAME.prPlayerNames);
};
super.prActive = _arg1;
}
}
}//package MAIN.WINDOWS
Section 82
//OWEnterName (MAIN.WINDOWS.OWEnterName)
package MAIN.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
public class OWEnterName extends ODialog {
public var iCancel:OButton;
private var iHasCancel:Boolean;
public var iAccept:OButton;
public var iName:OInput;
public function OWEnterName(_arg1:Boolean=true){
this.iHasCancel = _arg1;
super(UI.OWEnterName);
}
private function removeSpaces(_arg1:String):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) != " "){
_local2 = (_local2 + _arg1.charAt(_local3));
};
_local3++;
};
return (_local2);
}
override public function OnPress(_arg1:Event, _arg2):void{
var _local3:String;
var _local4:String;
var _local5:String;
if (!this.prMouseEnabled){
return;
};
if (_arg2 == this.iCancel){
if (!this.iCancel.visible){
return;
};
this.prVisible = false;
return;
};
if (_arg2 == this.iAccept){
_local4 = OUtils.ClearString(this.iName.prText.toUpperCase());
_local5 = removeSpaces(_local4);
if (_local5.length > 0){
_local3 = UI.iGAME.prLang;
UI.iGAME.prPlayerName = _local5;
UI.iGAME.prLang = _local3;
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 Init():void{
super.Init();
this.iName.prText = (UI.iGAME.prPlayerName) ? UI.iGAME.prPlayerName : "";
if (!this.iHasCancel){
this.iCancel.visible = false;
this.iAccept.prX = ((UI.OWEnterName[0][1] - ((this.iAccept as OButton).width / OGlobal.Scale)) / 2);
};
this.iName.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler);
}
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));
}
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;
}
public function set prName(_arg1:String):void{
this.iName.prText = _arg1;
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
SetNameFocus();
}
}
}//package MAIN.WINDOWS
Section 83
//OWGame (MAIN.WINDOWS.OWGame)
package MAIN.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import ENGINE.INTERFACE.*;
import flash.geom.*;
import MAIN.OBJECTS.*;
import ENGINE.CORE.*;
import flash.utils.*;
import ENGINE.GAME.*;
import MAIN.UTIL.*;
import flash.net.*;
import ENGINE.SMARTFOX.*;
import ENGINE.AD.*;
public class OWGame extends OWindow {
private var iInfoP:OWInfoPanel;
public var iLevelC:OCounter;
private var iNewGame:Boolean;
private var iField:OField;
private var iFailedO:Boolean;
public var iLevel:OIObject;
private var iDAlpha:Number;// = 0.025
public var iScore:OCounter;
private var iInfo:OIObject;
private var iBonus:int;
private var iBang:OBang;
public var iScoreO:OCounter;
private var iShowAd:Boolean;
public var iSite:OButton;
private var iTimer:int;
private var iFieldO:OField;
private var flag_pause:Boolean;
private var iBangInd:int;
public var iMenu:OButton;
private var flag_in_game_menu:Boolean;
public static const stInitGraphics:int = 0;
public static const stBGameOver:int = 8;
public static const stLevelInit:int = 4;
public static const stCloseAd:int = 10;
public static const stBLevelComplete:int = 6;
public static const stLoadLevel:int = 2;
public static const stConnection:int = 1;
public static const stGameOver:int = 9;
public static const stNormal:int = 5;
private static const TIME_WAIT_LOADING_ERROR:int = 4000;
public static const stLevelInfo:int = 3;
private static const TIME_WAIT_OPPONENT:int = 5000;
private static const TIME_WAIT_CONNECTION:int = 7000;
public static const stLevelComplete:int = 7;
public function OWGame(_arg1:OBang, _arg2:int, _arg3:Boolean){
this.iBang = _arg1;
this.iBangInd = _arg2;
this.iNewGame = _arg3;
super(UI.OWGame, ODialog.iDefAnimators);
}
override public function OnPress(_arg1:Event, _arg2):void{
var _local3:String;
var _local4:URLRequest;
if (_arg2 == this.iMenu){
this.prActive = false;
(OApplication.sInstance as Clusterz).OnPress(null, UI.miInGameMenu);
return;
};
if (_arg2 == this.iSite){
_local3 = UI.strConnect2URL;
_local4 = new URLRequest(_local3);
navigateToURL(_local4);
return;
};
}
private function AddBanner(_arg1:Boolean, _arg2:int=0, _arg3:int=0):void{
if (_arg1){
OAdBanners.AddTBanner(this, 10, 10, 516, 252);
OAdBanners.AddBBanner(this, 10, ((10 + 546) - 252), 516, 252);
} else {
OAdBanners.RemoveTBanner(this);
OAdBanners.RemoveBBanner(this);
};
}
override public function Free():void{
this.iLevel = null;
this.iLevelC = null;
this.iScore = null;
this.iScoreO = null;
this.iMenu = null;
this.iSite = null;
this.iField = null;
this.iFieldO = null;
super.Free();
}
private function OnAdFinished():void{
this.iShowAd = false;
}
private function HideFieldO():void{
if (((((((this.iFieldO.prRecord) && ((this.iFieldO.State == OField.stNormal)))) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))){
this.iFieldO.State = OField.stGameOverShow;
this.iScoreO.prVisible = false;
};
}
override public function Init():void{
super.Init();
var _local1:OBitmap = ODisplay.OBitmapRoundBorder([null, (485 + 30), 544, 40, 8, "GEL", "120,0.5,0.5,150,0.2,1.0", "border", 1, OGlobal.ScaleFloor(10), OGlobal.ScaleFloor(10)]);
this.addChild(_local1);
var _local2:int = getTimer();
this.iField = new OField(15, 20, 20, this.iScore, this.iBang, _local2, null);
this.addChild(this.iField);
this.iFieldO = new OField(8, 530, 75, this.iScoreO, null, _local2, this.iField.prRect);
this.addChild(this.iFieldO);
this.iFieldO.mouseEnabled = false;
this.iFieldO.mouseChildren = false;
this.iInfoP = new OWInfoPanel();
this.iInfoP.Pos(530, 0);
this.addChild(this.iInfoP);
this.addChild(this.iBang);
this.State = stInitGraphics;
}
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((10 + ((520 - this.iInfo.prWidth) / 2)), (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:int;
var _local5:Array;
super.OnEnterFrame(_arg1);
switch (this.iState){
case stInitGraphics:
if (!this.prAnimation){
this.State = stConnection;
};
break;
case stConnection:
_local2 = getTimer();
_local3 = this.SplashInfoMessage();
if (((((_local2 - this.iTimer) > TIME_WAIT_OPPONENT)) && ((UI.iMP.State == OMultiplayer.stInZone)))){
this.State = stLoadLevel;
break;
};
if (((((_local2 - this.iTimer) > TIME_WAIT_CONNECTION)) && ((_local3 == true)))){
this.State = stCloseAd;
break;
};
break;
case stLoadLevel:
_local3 = this.SplashInfoMessage();
_local2 = (getTimer() - this.iTimer);
if ((((((_local2 > 7000)) && (_local3))) && (UI.iMP.prOpponentTurn))){
_local5 = UI.iMP.prOpponentTurn.split(",");
if (_local5.length > 2){
this.State = stLevelInfo;
break;
};
this.iFieldO.prRecord = ((((_local5[0] == "none")) && ((_local5[1] == "none")))) ? null : _local5[1];
if (this.iFieldO.prRecord){
this.iInfoP.prOpponent = _local5[0];
this.iInfoP.State = OWInfoPanel.stInGame;
};
this.State = stCloseAd;
};
break;
case stCloseAd:
_local3 = this.SplashInfoMessage();
if (((_local3) && ((this.iShowAd == false)))){
Partner.iAdRotator.KillInterLevelAd();
this.State = stLevelInfo;
};
break;
case stLevelInfo:
_local2 = getTimer();
if ((_local2 - this.iTimer) > 2000){
if (this.iInfo.prVisible){
this.iInfo.prVisible = false;
} else {
if (!this.iInfo.prAnimation){
this.AddInfo(null);
this.State = stLevelInit;
};
};
};
break;
case stLevelInit:
if (this.iField.State == OField.stNormal){
this.VisibleElements(true);
if (this.iFieldO.prRecord){
this.iScoreO.prVisible = true;
};
this.State = stNormal;
};
break;
case stNormal:
_local4 = 0;
switch (this.iField.State){
case OField.stLevelCompShow:
_local4 = (((((this.iFieldO.prRecord) && ((this.iFieldO.prRTime >= 0)))) || (this.iFailedO))) ? this.iScoreO.prValue : 0;
if (_local4 > this.iBonus){
this.iBonus = _local4;
};
break;
case OField.stLevelComplete:
_local4 = (((((this.iFieldO.prRecord) && ((this.iFieldO.prRTime >= 0)))) || (this.iFailedO))) ? this.iScoreO.prValue : 0;
if (_local4 > this.iBonus){
this.iBonus = _local4;
};
this.State = stBLevelComplete;
this.VisibleElements(false);
break;
case OField.stGameOver:
this.State = stBGameOver;
this.VisibleElements(false);
break;
};
switch (this.iFieldO.State){
case OField.stLevelComplete:
case OField.stGameOver:
this.iFailedO = (this.iFieldO.State == OField.stGameOver);
if (this.iInfoP.State == OWInfoPanel.stOpponent){
this.iScoreO.prVisible = false;
this.iInfoP.prScore = this.iScoreO.prValue;
this.iInfoP.State = (this.iFailedO) ? OWInfoPanel.stFailedLevel : OWInfoPanel.stCompleteLevel;
};
break;
};
break;
case stBLevelComplete:
if ((((this.iFieldO.State == OField.stGameOver)) || ((this.iFieldO.State == OField.stLevelComplete)))){
this.iFieldO.State = OField.stInvisible;
if (this.iScoreO.prVisible){
this.iScoreO.prVisible = false;
};
this.iInfoP.prScore = this.iScoreO.prValue;
this.iInfoP.State = OWInfoPanel.stEndLevel;
this.State = stLevelComplete;
} else {
this.HideFieldO();
};
break;
case stLevelComplete:
if (((!(this.iInfo.prVisible)) && (!(this.iInfo.prAnimation)))){
this.AddInfo(null);
this.State = stConnection;
};
break;
case stBGameOver:
if (this.iFieldO.State == OField.stGameOver){
this.State = stGameOver;
} else {
this.HideFieldO();
};
break;
case stGameOver:
if (((!(this.iInfo.prVisible)) && (!(this.iInfo.prAnimation)))){
this.AddInfo(null);
UI.iGAME.Start();
this.State = stConnection;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:int;
this.iState = _arg1;
switch (this.iState){
case stInitGraphics:
this.VisibleElements(false);
break;
case stConnection:
(OApplication.sInstance as Object).iPanelSysButtons.visible = false;
UI.iMP.ClearOpponentTurn(true);
this.iShowAd = true;
Partner.iAdRotator.ShowInterLevelAd(this.OnAdFinished);
UI.iMP.ClearOpponentTurn(true);
this.iTimer = getTimer();
this.AddInfo(GL.ColorText(UI.OWGameConnection), true);
this.ChangePosTextConnection();
this.iTimer = getTimer();
if (UI.iMP.State != OMultiplayer.stConnection){
UI.iMP.State = OMultiplayer.stNone;
UI.iMP.Init(UI.sDomain, UI.sServer, UI.sZone, UI.sXTName, UI.iGAME.prPlayerName);
};
this.iInfoP.prVisible = false;
break;
case stLoadLevel:
this.iTimer = getTimer();
UI.iMP.ClearOpponentTurn(true);
UI.iMP.Turn(["rdl", UI.iGAME.prLevel, this.iField.prGameIndex, UI.iGAME.prPlayerName]);
break;
case stLevelInfo:
(OApplication.sInstance as Object).iPanelSysButtons.visible = true;
OSound.PlaySoundInd(1);
this.iLevelC.prValue = (UI.iGAME.prLevel + 1);
UI.OWGameNewLevel[3] = ((SStrings.getString("strLevel") + " - ") + (UI.iGAME.prLevel + 1).toString());
this.AddInfo(GL.ColorText(UI.OWGameNewLevel), true);
this.iTimer = getTimer();
break;
case stLevelInit:
this.iInfoP.prVisible = true;
this.iField.NewLevel(UI.iGAME.prLevel);
this.iBonus = 0;
if (UI.iMP.State == OMultiplayer.stInZone){
if (this.iFieldO.prRecord){
this.iFieldO.NewLevel(UI.iGAME.prLevel);
this.iFailedO = false;
this.iInfoP.State = OWInfoPanel.stOpponent;
} else {
this.iInfoP.State = OWInfoPanel.stUserNotFound;
};
} else {
this.iInfoP.State = OWInfoPanel.stConnect;
};
break;
case stBLevelComplete:
if (((((this.iFieldO.prRecord) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))) && (!((this.iInfoP.State == OWInfoPanel.stFailedLevel))))){
this.HideFieldO();
} else {
this.State = stLevelComplete;
};
break;
case stLevelComplete:
UI.iGAME.Write(OGame.catTmp, "Score", this.iScore.prValue);
_local2 = 0;
_local2 = (((((this.iFieldO.prRecord) && ((this.iFieldO.prRTime >= 0)))) || (this.iFailedO))) ? this.iScoreO.prValue : 0;
if (_local2 > this.iBonus){
this.iBonus = _local2;
};
if (!this.iFieldO.prRecord){
this.iBonus = 0;
};
UI.iGAME.Write(OGame.catTmp, "BScore", this.iBonus);
UI.iGAME.NextLevel();
this.iInfo = new OWResults();
this.addChild(this.iInfo);
this.iInfoP.State = OWInfoPanel.stUpSell;
break;
case stBGameOver:
if (((((this.iFieldO.prRecord) && (!((this.iInfoP.State == OWInfoPanel.stCompleteLevel))))) && (!((this.iInfoP.State == OWInfoPanel.stFailedLevel))))){
this.HideFieldO();
} else {
this.State = stGameOver;
};
break;
case stGameOver:
UI.iGAME.Write(OGame.catTmp, "Score", 0);
UI.iGAME.Write(OGame.catTmp, "BScore", 0);
this.HideFieldO();
if (this.iScoreO.prVisible){
this.iScoreO.prVisible = false;
};
this.iInfo = new OWResults(true);
this.addChild(this.iInfo);
this.iInfoP.State = OWInfoPanel.stUpSell;
break;
};
}
private function VisibleElements(_arg1:Boolean):void{
if (_arg1){
if (!this.iLevel.prVisible){
this.iLevel.prVisible = true;
};
if (!this.iLevelC.prVisible){
this.iLevelC.prVisible = true;
};
if (!this.iScore.prVisible){
this.iScore.prVisible = true;
};
} else {
this.iLevel.prVisible = false;
this.iLevelC.prVisible = false;
this.iScore.prVisible = false;
};
}
private function ChangePosTextConnection():void{
var _local1:Number;
var _local2:Rectangle;
_local2 = Partner.iAdRotator.getInterLevelRect();
if (_local2 == null){
return;
};
_local1 = ((_local2.height + 30) / OGlobal.Scale);
if (_local1 < 250){
_local1 = 250;
};
if (_local1 > 500){
_local1 = 500;
};
this.iInfo.prY = _local1;
}
public function SplashInfoMessage():Boolean{
var _local1:Boolean;
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);
}
private function InitMaker():Array{
var _local2:int;
var _local3:int;
var _local1:Array = new Array();
var _local4:int;
_local2 = 4;
while (_local2 <= 15) {
_local3 = 0;
while (_local3 < 6) {
_local1.push([OBubble.MakeBubble, (_local2 * 0.97), ((_local2 / 91) * 3), _local3, "Bubble", _local4, true]);
_local4++;
_local3++;
};
_local2++;
};
_local4 = 0;
_local2 = 4;
while (_local2 <= 15) {
_local3 = 0;
while (_local3 < 6) {
_local1.push([OBubble.MakeShadow, _local2, ((_local2 / 91) * 3), _local3, "Shadow", _local4, true]);
_local4++;
_local3++;
};
_local2++;
};
return (_local1);
}
}
}//package MAIN.WINDOWS
Section 84
//OWHighScores (MAIN.WINDOWS.OWHighScores)
package MAIN.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.GAME.*;
public class OWHighScores extends ODialog {
public var iType:OListBox;
public var iClear:OButton;
public var iTable:OTab;
public var iClose:OButton;
public function OWHighScores(){
var _local1:OScoreParams;
var _local2:int;
while (_local2 < 5) {
_local1 = UI.iGAME.GetLocalScores(0, _local2);
UI.OWHighScoreLocal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : "";
UI.OWHighScoreLocal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : "";
_local1 = UI.iGAME.GetPersonalScores(0, _local2);
UI.OWHighScorePersonal[(0 + (_local2 * 2))][5] = (_local1) ? _local1.iName : "";
UI.OWHighScorePersonal[(1 + (_local2 * 2))][5] = (_local1) ? _local1.iScore.toString() : "";
_local2++;
};
super(UI.OWHighScores);
}
override public function set prActive(_arg1:Boolean):void{
var _local2:OScoreParams;
if (_arg1){
_local2 = UI.iGAME.GetLocalScores(0, 0);
if (!_local2){
(iTable.getChildAt(0) as OSprite).Free();
};
_local2 = UI.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){
OApplication.sInstance.OnPress(null, UI.miDeleteScoresConfirm);
this.prActive = false;
return;
};
OApplication.sInstance.OnPress(null, UI.miCommingSoon);
this.prActive = false;
}
override public function Free():void{
this.iType = null;
this.iTable = null;
this.iClear = null;
this.iClose = null;
super.Free();
}
}
}//package MAIN.WINDOWS
Section 85
//OWInfoPanel (MAIN.WINDOWS.OWInfoPanel)
package MAIN.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import MAIN.OBJECTS.*;
import flash.utils.*;
import MAIN.UTIL.*;
import flash.net.*;
public class OWInfoPanel extends OIObject {
private var iOpponent:String;
private var iScore:int;
private var iMode:int;
private var iInfo:OInfoObject;
private var iTimer:int;
public static const stFailedLevel:int = 7;
public static const stConnect:int = 1;
public static const stEndLevel:int = 5;
public static const stUpSell:int = 8;
public static const stCompleteLevel:int = 6;
public static const stInGame:int = 3;
public static const stNone:int = 0;
public static const stUserNotFound:int = 2;
public static const stOpponent:int = 4;
public function OWInfoPanel(){
super(null);
}
public function set prScore(_arg1:int):void{
this.iScore = _arg1;
}
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:
UI.OWInfoP[0][2] = 30;
UI.OWInfoP[0][3] = "yellow";
UI.OWInfoP[0][6] = 265;
UI.OWInfoP[0][4] = ((((SStrings.getString("strOpponent1") + "\n") + this.iOpponent) + "\n") + SStrings.getString("strOpponent2"));
this.InitObject(UI.OWInfoP);
this.iTimer = getTimer();
break;
case stOpponent:
UI.OWInfoPPlayer[1][4] = this.iOpponent;
this.InitObject(UI.OWInfoPPlayer);
break;
case stEndLevel:
UI.OWInfoP[0][2] = ((this.iOpponent.length)>7) ? 20 : 27;
UI.OWInfoP[0][3] = "magenta";
UI.OWInfoP[0][6] = 240;
UI.OWInfoP[0][4] = ((this.iOpponent + SStrings.getString("strLevelScore")) + this.iScore);
this.InitObject(UI.OWInfoP);
this.iTimer = getTimer();
break;
case stCompleteLevel:
UI.OWInfoP[0][2] = ((this.iOpponent.length)>7) ? 20 : 30;
UI.OWInfoP[0][3] = "yellow1";
UI.OWInfoP[0][6] = 240;
UI.OWInfoP[0][4] = ((this.iOpponent + SStrings.getString("strCompleteLevel")) + this.iScore);
this.InitObject(UI.OWInfoP);
this.iTimer = getTimer();
break;
case stFailedLevel:
UI.OWInfoP[0][2] = ((this.iOpponent.length)>7) ? 20 : 30;
UI.OWInfoP[0][3] = "red";
UI.OWInfoP[0][6] = 240;
UI.OWInfoP[0][4] = ((this.iOpponent + SStrings.getString("strFailedLevel")) + this.iScore);
this.InitObject(UI.OWInfoP);
this.iTimer = getTimer();
break;
case stUpSell:
trace("UpSell");
this.InitObject(UI.OWInfoUpSell);
break;
};
}
override public function OnPress(_arg1:Event, _arg2):void{
var _local3:String;
switch ((this.iMode % 3)){
case 0:
_local3 = UI.strConnect1URL;
break;
case 1:
_local3 = UI.strConnect2URL;
break;
case 2:
_local3 = UI.strConnect3URL;
break;
};
var _local4:URLRequest = new URLRequest(_local3);
navigateToURL(_local4);
}
private function ShowConnect():void{
var _local1:String = UI.OWColors[((this.iMode + 2) % UI.OWColors.length)];
UI.OWInfoPConnect[0][3] = _local1;
UI.OWInfoPConnect[1][3] = _local1;
UI.OWInfoPConnect[1][4] = _local1;
switch ((this.iMode % 3)){
case 0:
UI.OWInfoPConnect[0][4] = SStrings.getString("strConnect1");
UI.OWInfoPConnect[1][6] = SStrings.getString("strPlayOnline");
break;
case 1:
UI.OWInfoPConnect[0][4] = SStrings.getString("strConnect2");
UI.OWInfoPConnect[1][6] = SStrings.getString("strMoreGames");
break;
case 2:
UI.OWInfoPConnect[0][4] = SStrings.getString("strConnect3");
UI.OWInfoPConnect[1][6] = SStrings.getString("strSendMail");
break;
};
this.InitObject(UI.OWInfoPConnect);
}
private function InitObject(_arg1:Array):void{
if (((this.iInfo) && (this.contains(this.iInfo)))){
this.removeChild(this.iInfo);
this.iInfo.Free();
this.iInfo = null;
};
if (((!(_arg1)) || ((_arg1 == [])))){
return;
};
this.iInfo = new OInfoObject(_arg1, OInterface.iDefSlowAnimators);
this.addChild(this.iInfo);
this.iInfo.SetVisible(false);
this.iInfo.prVisible = true;
}
override public function Init():void{
super.Init();
}
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;
};
}
private function ShowUserNotFound():void{
var _local1:String;
var _local3:Array;
_local1 = UI.iMP.prOpponentTurn;
UI.iMP.ClearOpponentTurn(true);
UI.iMP.Turn(["rdr"]);
var _local2:String = UI.OWColors[Math.round((Math.random() * (UI.OWColors.length - 1)))];
UI.OWInfoPUserNotFound[0][3] = _local2;
UI.OWInfoPUserNotFound[1][3] = _local2;
switch ((this.iMode % 5)){
case 0:
UI.OWInfoPUserNotFound[0][4] = UI.iMP.prUsersCount;
UI.OWInfoPUserNotFound[0][6] = 200;
UI.OWInfoPUserNotFound[1][6] = (UI.OWInfoPUserNotFound[0][6] + 70);
UI.OWInfoPUserNotFound[1][4] = SStrings.getString("strPlayersOnline1");
UI.OWInfoPUserNotFound[1][2] = 30;
break;
default:
if (!_local1){
return;
};
_local3 = _local1.split(/,/);
if (_local3.length < 3){
UI.OWInfoPUserNotFound[0][4] = UI.iMP.prUsersCount;
UI.OWInfoPUserNotFound[0][6] = 200;
UI.OWInfoPUserNotFound[1][6] = (UI.OWInfoPUserNotFound[0][6] + 70);
UI.OWInfoPUserNotFound[1][4] = SStrings.getString("strPlayersOnline1");
UI.OWInfoPUserNotFound[1][2] = 30;
} else {
UI.OWInfoPUserNotFound[0][4] = ((int(_local3[0]) + 1).toString() + SStrings.getString("strPlace"));
UI.OWInfoPUserNotFound[0][6] = 180;
UI.OWInfoPUserNotFound[1][6] = (UI.OWInfoPUserNotFound[0][6] + 90);
UI.OWInfoPUserNotFound[1][2] = 22;
UI.OWInfoPUserNotFound[1][4] = ((_local3[1] + SStrings.getString("strHasReiting")) + _local3[2]);
};
break;
};
this.InitObject(UI.OWInfoPUserNotFound);
}
override public function Free():void{
this.iInfo = null;
super.Free();
}
public function set prOpponent(_arg1:String):void{
this.iOpponent = _arg1;
}
}
}//package MAIN.WINDOWS
Section 86
//OWInGameMenu (MAIN.WINDOWS.OWInGameMenu)
package MAIN.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import flash.utils.*;
import flash.net.*;
public class OWInGameMenu extends OWindow {
public var btnMoreGames:OButton;
public var btnInstructions:OButton;
public var btnResume:OButton;
public var btnOptions:OButton;
public var btnMainMenu:OButton;
public static const BTN_INSTRUCTIONS:int = 2;
public static const BTN_MAIN_MENU:int = 4;
public static const BTN_NONE:int = -1;
public static const BTN_RESUME:int = 0;
public static const BTN_MORE_GAMES:int = 3;
public static const BTN_OPTIONS:int = 1;
public static var PRESS_BTN:int = 0;
public function OWInGameMenu(){
OWInGameMenu.PRESS_BTN = OWInGameMenu.BTN_NONE;
(OApplication.sInstance as Clusterz).iLayerAPI.visible = false;
super(UI.OWInGameMenuParam);
}
override public function OnPress(_arg1:Event, _arg2):void{
switch (_arg2){
case this.btnResume:
trace("Press -> InGameMenu -> Resume");
OWInGameMenu.PRESS_BTN = OWInGameMenu.BTN_RESUME;
(OApplication.sInstance as Clusterz).iLayerAPI.visible = true;
this.SetVisible(false);
break;
case this.btnOptions:
trace("Press -> InGameMenu -> Options");
OWInGameMenu.PRESS_BTN = OWInGameMenu.BTN_OPTIONS;
OApplication.sInstance.prMenuItem = UI.miOptions;
this.prActive = false;
break;
case this.btnInstructions:
trace("Press -> InGameMenu -> Instructions");
OWInGameMenu.PRESS_BTN = OWInGameMenu.BTN_INSTRUCTIONS;
OApplication.sInstance.prMenuItem = UI.miInstructions;
this.prActive = false;
break;
case this.btnMoreGames:
trace("Press -> InGameMenu -> More Games");
OWInGameMenu.PRESS_BTN = OWInGameMenu.BTN_MORE_GAMES;
navigateToURL(new URLRequest(UI.strConnect2URL));
break;
case this.btnMainMenu:
trace(("Press -> InGameMenu -> Main Menu" + getTimer()));
OWInGameMenu.PRESS_BTN = OWInGameMenu.BTN_MAIN_MENU;
(OApplication.sInstance as Clusterz).InitAd(false);
(OApplication.sInstance as Clusterz).CloseAllWindows();
OApplication.sInstance.prMenuItem = UI.miLastWindow;
this.prVisible = false;
break;
};
}
}
}//package MAIN.WINDOWS
Section 87
//OWInstructions (MAIN.WINDOWS.OWInstructions)
package MAIN.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import ENGINE.INTERFACE.*;
import flash.geom.*;
import MAIN.OBJECTS.*;
import ENGINE.CORE.*;
import flash.utils.*;
public class OWInstructions extends OWindow {
private const iLevelMap:Array;
private const iGameIndex:int = 1;
private const iRecordStr:String = "065S3I009A054y4B00AA06394600A6043d5000C704363n0095032x390075032s2w0075040P4L2049060e541064041t3N0084037W5Y109C041R1Y21K4087Y5y1089057U6B109A080S5j1093053R5L00E703384J0095044n5S00E904543I008A033C3J0086042U3o0094045I2z007A043O2x0076045F2o006A050E3G2046";
public var iInstr1:OBitmap;
public var iClose:OButton;
public var iInstr2:OBitmap;
private var iTimer:int;
private var iCursor:OCursor;
public var iScore:OCounter;
private var iDemo:OField;
private var iRect:Rectangle;
private static const iYPos:int = 120;
private static const iXPos:int = 100;
private static const iR:int = 10;
public static const stEndGame:int = 3;
public static const stShowGame:int = 1;
public static const stStartGame:int = 0;
private static const iBubRadius:int = 15;
public function OWInstructions(){
iLevelMap = [[4, 6, 0], [0, 1, 2, 3], [5, 857455, 477020, 372779, 420140, 235998, 176169, 300672, 190670, 269648], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 8, 4, 3, 3, 2, 2, 4, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 4, 1, 1, 4, 3, 3, 4, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 1, 8, 8, 3, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 4, 8, 4, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0]];
super(UI.OWInstructions);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iClose){
this.prVisible = false;
};
}
override public function Free():void{
iDemo = null;
iScore = null;
super.Free();
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
switch (iState){
case stStartGame:
if (((iDemo) && ((iDemo.State == OField.stNormal)))){
State = stShowGame;
};
break;
case stShowGame:
if ((getTimer() - iTimer) > 10000){
if (iInstr1.prVisible){
iInstr1.prVisible = false;
iInstr2.prVisible = true;
} else {
iInstr2.prVisible = false;
iInstr1.prVisible = true;
};
iTimer = getTimer();
};
if (((iDemo) && ((iDemo.State == OField.stLevelComplete)))){
State = stEndGame;
};
break;
case stEndGame:
if ((getTimer() - iTimer) > 500){
State = stStartGame;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:Number;
iState = _arg1;
switch (iState){
case stStartGame:
_local2 = Math.round((Math.sqrt(3) * iBubRadius));
this.iRect = new Rectangle(0, 0, (((2 * iBubRadius) * OField.iFCols) + iBubRadius), ((_local2 * (OField.iFRows - 1)) + (2 * iBubRadius)));
iDemo = new OField(iR, iXPos, iYPos, iScore, null, iGameIndex, iRect);
iDemo.prCursor = iCursor;
iDemo.prRecord = iRecordStr;
iDemo.NewLevel(-1, this.iLevelMap);
this.addChild(iDemo);
this.addChild(iCursor);
iCursor.prVisible = false;
this.iDemo.mouseEnabled = false;
this.iDemo.mouseChildren = false;
break;
case stShowGame:
iScore.prValue = 0;
iScore.prVisible = true;
iCursor.prVisible = true;
iTimer = getTimer();
break;
case stEndGame:
this.removeChild(iDemo);
iDemo.Free();
iCursor.prVisible = false;
this.removeChild(iCursor);
iScore.prVisible = false;
iTimer = getTimer();
break;
};
}
override public function Init():void{
super.Init();
var _local1:OBitmap = ODisplay.OBitmapRoundBorder([null, ((2 * iR) * (OField.iFCols + 1)), ((2 * iR) * (OField.iFRows - 3)), 10, 4, "GEL", "120,0.5,0.7,120,0.5,0.7", "border", 0.5, OGlobal.ScaleFloor((iXPos - 5)), OGlobal.ScaleFloor((iYPos - 5))]);
this.addChild(_local1);
iCursor = new OCursor(ODisplay.OBitmapSpriteFillRect([ODisplay.OBitmapSpriteFillRect, 20, 20, [ODisplay.SpriteLib, UI.OCursor], "GEL", "white", "border", 1, 0, 0, null, 0, true]));
State = stStartGame;
}
}
}//package MAIN.WINDOWS
Section 88
//OWIntro (MAIN.WINDOWS.OWIntro)
package MAIN.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
public class OWIntro extends OWindow {
public var iFooter:OBitmap;
public var iGameName:OIObject;
public var iHit:OSprite;
private var iAlpha:Array;
public var iHeader:OBitmap;
private var iTimer:Number;
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(){
UI.OWIntroParam[0][1] = [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]];
super(UI.OWIntroParam);
}
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;
};
}
override public function Free():void{
super.Free();
this.iHeader = null;
this.iFooter = null;
}
override public function OnMouseDown(_arg1:MouseEvent):void{
if (this.iState < OWIntro.stShowFooter){
return;
};
this.prVisible = false;
super.OnMouseDown(_arg1);
}
override public function Init():void{
var _local3:DisplayObject;
super.Init();
this.iHeader.alpha = 0;
this.iFooter.alpha = 0;
this.iGameName.prY = (320 - (this.iGameName.prHeight / 2));
var _local1:int = this.iGameName.numChildren;
this.iAlpha = new Array(_local1);
var _local2:int;
while (_local2 < _local1) {
_local3 = this.iGameName.getChildAt(_local2);
_local3.alpha = 0;
this.iAlpha[_local2] = (-(_local2) * 0.3);
_local2++;
};
this.hitArea = this.iHit;
this.State = stBeforeShow;
}
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.iGameName.getChildAt((this.iGameName.numChildren - 1)).alpha >= 1){
this.State = stNormal;
} else {
_local2 = 0;
while (_local2 < this.iGameName.numChildren) {
this.iAlpha[_local2] = (this.iAlpha[_local2] + 0.025);
if (this.iAlpha[_local2] > 1){
this.iAlpha[_local2] = 1;
};
if (this.iAlpha[_local2] >= 0){
this.iGameName.getChildAt(_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);
this.iGameName.alpha = (this.iGameName.alpha - 0.05);
};
break;
};
}
}
}//package MAIN.WINDOWS
Section 89
//OWLanguage (MAIN.WINDOWS.OWLanguage)
package MAIN.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import MAIN.UTIL.*;
public class OWLanguage extends OWindow {
public var btnChange:OButton;
public var iListBox:OListBox;
public var btnCancel:OButton;
public function OWLanguage(){
super(UI.OWLanguageParam);
}
override public function Init():void{
var _local1:int;
var _local2:int;
var _local3:Array;
super.Init();
_local3 = new Array();
_local2 = 0;
_local1 = 0;
while (_local1 < SConfig.list_language.length) {
if (SConfig.list_language[_local1][0] == SConfig.language){
_local2 = _local1;
};
_local3.push(SConfig.list_language[_local1][2]);
_local1++;
};
(OApplication.sInstance as Clusterz).iLayerAPI.visible = false;
this.iListBox.SetCurrentElement(_local3[_local2], _local3);
}
private function ChangeLanguage():void{
var _local1:String;
_local1 = SConfig.language;
SConfig.language = SConfig.list_language[this.iListBox.prCurrentInd][0];
if (SConfig.language != _local1){
if (UI.iMP.isConnected){
UI.iMP.disconnect();
};
if (SPanelSysButtons.sInstance != null){
SPanelSysButtons.sInstance.RefreshLanguage();
};
OApplication.sInstance.prMenuItem = UI.miMenu;
UI.ReInit();
(OApplication.sInstance as Clusterz).InitAd(false);
(OApplication.sInstance as Clusterz).CloseAllWindows();
} else {
OApplication.sInstance.prMenuItem = UI.miLastWindow;
this.prVisible = false;
};
}
override public function OnPress(_arg1:Event, _arg2):void{
switch (_arg2){
case this.btnChange:
this.ChangeLanguage();
(OApplication.sInstance as Clusterz).iLayerAPI.visible = true;
break;
case this.btnCancel:
OApplication.sInstance.prMenuItem = UI.miLastWindow;
(OApplication.sInstance as Clusterz).iLayerAPI.visible = true;
this.prVisible = false;
break;
};
super.OnPress(_arg1, _arg2);
}
}
}//package MAIN.WINDOWS
Section 90
//OWMenu (MAIN.WINDOWS.OWMenu)
package MAIN.WINDOWS {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import flash.utils.*;
import MAIN.UTIL.*;
import flash.net.*;
public class OWMenu extends ODialog {
public var iMoreGames:OButton;
public var iPlayers:OIObject;
public var iTextChange:OBitmap;
public var iAppStore:OButton;
public var iAmazonStore:OButton;
public var iCPlayers:OCounter;
public var iTimer:int;
public var iBName:OButton;
public var iGameName:OIObject;
public var iHighScores:OButton;
public var iInstructions:OButton;
public var iOptions:OButton;
public var iPlayOnline:OButton;
public var iInfo:OIObject;
public function OWMenu(){
super(UI.OWMenu);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == this.iBName){
OApplication.sInstance.OnPress(null, UI.miChoosePlayer);
this.prVisible = false;
return;
};
if (_arg2 == this.iPlayOnline){
OApplication.sInstance.OnPress(null, UI.miPlayGame);
this.prVisible = false;
return;
};
if (_arg2 == this.iOptions){
OApplication.sInstance.OnPress(null, UI.miOptions);
this.prActive = false;
return;
};
if (_arg2 == this.iInstructions){
OApplication.sInstance.OnPress(null, UI.miInstructions);
this.prActive = false;
return;
};
if (_arg2 == this.iHighScores){
OApplication.sInstance.OnPress(null, UI.miHighScores);
this.prActive = false;
return;
};
if (_arg2 == this.iMoreGames){
navigateToURL(new URLRequest(UI.strConnect2URL));
return;
};
if (_arg2 == this.iAmazonStore){
navigateToURL(new URLRequest(UI.sURLAmazonStore.split("[place]").join("4")));
return;
};
if (_arg2 == this.iAppStore){
navigateToURL(new URLRequest(UI.sURLAppStore.split("[place]").join("4")));
return;
};
OApplication.sInstance.OnPress(null, UI.miCommingSoon);
this.prActive = false;
}
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 set prActive(_arg1:Boolean):void{
super.prActive = _arg1;
}
override public function OnEnterFrame(_arg1:Event):void{
if (this.iCPlayers.prValue != UI.iMP.prUsersCount){
if (UI.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 = UI.iMP.prUsersCount;
};
var _local2:int = getTimer();
if ((_local2 - this.iTimer) > 30000){
ShowUserReiting(false);
};
super.OnEnterFrame(_arg1);
}
override public function set prVisible(_arg1:Boolean):void{
super.prVisible = _arg1;
}
private function ShowUserReiting(_arg1:Boolean):void{
}
override public function Free():void{
this.iBName = null;
this.iGameName = null;
this.iCPlayers = null;
this.iPlayers = null;
this.iPlayOnline = null;
this.iOptions = null;
this.iInstructions = null;
this.iHighScores = null;
this.iMoreGames = null;
this.InitObject(null);
super.Free();
}
override public function Init():void{
UI.OWMenu[0][4] = ((SStrings.getString("strWelcome") + " ") + UI.iGAME.prPlayerName);
super.Init();
if (UI.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 = UI.iMP.prUsersCount;
this.iPlayers.prAnimationEnabled = true;
this.iCPlayers.Pos((this.iPlayOnline.prX - 35), (this.iCPlayers.prY + (2.5 * OGlobal.Scale)));
this.iPlayers.Pos((this.iCPlayers.prX + 90), this.iPlayers.prY);
this.ShowUserReiting(true);
if (OGlobal.prStage.displayState == StageDisplayState.FULL_SCREEN){
this.iTextChange.visible = false;
this.iBName.SetVisible(false);
};
}
}
}//package MAIN.WINDOWS
Section 91
//OWOptions (MAIN.WINDOWS.OWOptions)
package MAIN.WINDOWS {
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import flash.system.*;
import flash.net.*;
import flash.external.*;
public class OWOptions extends ODialog {
public var iCancel:OButton;
public var iFullScreen:OListBox;
public var iSound:OListBox;
public var iAccept:OButton;
private var iSResList:Array;
public var iResolution:OListBox;
private var iSRes:Array;
public var iMusic:OListBox;
public function OWOptions(){
super(UI.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 OnPress(_arg1:Event, _arg2):void{
if (_arg2 == this.iCancel){
this.prVisible = false;
return;
};
if (_arg2 == this.iAccept){
this.prVisible = false;
UI.iGAME.prSoundVolume = (this.iSound.prCurrentInd / 10);
UI.iGAME.prMusicVolume = (this.iMusic.prCurrentInd / 10);
UI.iGAME.prResX = this.iSRes[this.iResolution.prCurrentInd][0];
UI.iGAME.prResY = this.iSRes[this.iResolution.prCurrentInd][1];
UI.iGAME.prFullScreen = (this.iFullScreen.prCurrentInd) ? true : false;
this.AnalisFullscreen();
return;
};
}
override public function Init():void{
var _local6:Number;
UI.OWOptions[0][2] = 340;
UI.OWOptions[5][11] = 190;
UI.OWOptions[6][8] = 260;
UI.OWOptions[7][8] = 260;
super.Init();
this.iResolution.prVisible = false;
this.iSound.prCurrentInd = int((UI.iGAME.prSoundVolume * 10));
this.iMusic.prCurrentInd = int((UI.iGAME.prMusicVolume * 10));
this.InitResolutions();
this.iResolution.prLBParams = this.iSResList;
var _local1:int = OGlobal.prStage.stageWidth;
var _local2:int = OGlobal.prStage.stageHeight;
var _local3:Number = 10000;
var _local4:int;
var _local5:int;
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;
}
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);
}
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 AnalisFullscreen():void{
if (stage == null){
return;
};
try {
if ((((UI.iGAME.prFullScreen == true)) && ((stage.displayState == StageDisplayState.FULL_SCREEN)))){
return;
};
if ((((UI.iGAME.prFullScreen == false)) && (!((stage.displayState == StageDisplayState.FULL_SCREEN))))){
return;
};
if (UI.iGAME.prFullScreen == true){
stage.displayState = StageDisplayState.FULL_SCREEN;
} else {
stage.displayState = StageDisplayState.NORMAL;
};
} catch(e:Error) {
trace("ERROR (OWOptions) -> CHANGE DISPLAY STATE");
};
}
}
}//package MAIN.WINDOWS
Section 92
//OWResults (MAIN.WINDOWS.OWResults)
package MAIN.WINDOWS {
import flash.events.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import flash.utils.*;
import ENGINE.GAME.*;
import MAIN.UTIL.*;
import flash.net.*;
public class OWResults extends OAlert {
public var iSubmit:OButton;
private var iNewGame:Boolean;
private var iRecord:Boolean;
private var iTimer:Timer;
public function OWResults(_arg1:Boolean=false){
this.iNewGame = _arg1;
super(UI.OWResults, null);
}
override public function OnPress(_arg1:Event, _arg2):void{
switch (_arg2){
case this.iSubmit:
SendScores();
return;
};
super.OnPress(_arg1, _arg2);
}
private function OnTimer(_arg1:TimerEvent):void{
switch (this.iTimer.currentCount){
case 1:
(this.getChildAt(0) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 2:
(this.getChildAt(1) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 3:
(this.getChildAt(2) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 4:
(this.getChildAt(3) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 5:
(this.getChildAt(4) as OIObject).prVisible = true;
OSound.PlaySoundInd(1);
break;
case 6:
this.iButtons[0].prVisible = true;
if (((((!(this.iNewGame)) && (!(this.iRecord)))) && (false))){
this.getChildAt(6).visible = true;
this.getChildAt(7).visible = true;
};
if (Partner.P_SubmitScore){
iSubmit.prVisible = true;
};
OSound.PlaySoundInd(4);
break;
};
}
override public function Free():void{
this.iTimer.stop();
this.iTimer.removeEventListener(TimerEvent.TIMER, OnTimer);
this.iTimer = null;
super.Free();
}
private function SendScores():void{
var _local1:URLRequest = new URLRequest(UI.sURLRating);
var _local2:URLVariables = new URLVariables();
_local1.method = URLRequestMethod.POST;
_local2.gamename = UI.strGameName.replace("!", "").toLowerCase();
_local2.game = UI.sZone.toLowerCase();
_local2.user = UI.iGAME.prPlayerName;
_local2.score = UI.OWResultsTotalScore[1][5];
_local2.level = UI.iGAME.prLevel;
_local2.lang = UI.sLang;
_local1.data = _local2;
navigateToURL(_local1, "_blank");
}
override public function Init():void{
var _local1:int = UI.iGAME.Read(OGame.catTmp, "Score");
var _local2:int = UI.iGAME.Read(OGame.catTmp, "BScore");
this.iRecord = true;
if (this.iRecord){
UI.iGAME.SetLevelScore((_local1 + _local2));
};
UI.iGAME.AddScore((_local1 + _local2));
UI.iGAME.AddScoreInTable(UI.iGAME.prScore);
UI.iMP.Turn(["wrr", UI.iGAME.prPlayerName, UI.iGAME.prScore]);
if (this.iNewGame){
UI.OWResults[0][3] = SStrings.getString("strGameOver");
} else {
UI.OWResults[0][3] = SStrings.getString("strLevelComplete");
UI.OWResults[0][5] = 30;
};
UI.OWResultsLevelScore[1][5] = _local1.toString();
UI.OWResultsBonusScore[1][5] = _local2.toString();
UI.OWResultsTotalScore[1][5] = (_local1 + _local2).toString();
UI.OWResultsReiting[1][4] = UI.iGAME.prScore;
if (((this.iNewGame) || (!(this.iRecord)))){
UI.OWResults[5][3] = "yellow";
UI.OWResults[5][4] = "yellow";
UI.OWResults[5][6] = SStrings.getString("strReplayLevel");
} else {
UI.OWResults[5][3] = "yellow1";
UI.OWResults[5][4] = "yellow1";
UI.OWResults[5][6] = SStrings.getString("strNextLevel");
};
if (((!(this.iNewGame)) && (!(this.iRecord)))){
UI.OWResults[7][4] = ((((SStrings.getString("strLevelConfirm1") + " ") + UI.iGAME.prLevelScore.toString()) + " ") + SStrings.getString("strLevelConfirm2"));
};
super.Init();
this.Pos(0, 0);
if (!Partner.P_SubmitScore){
iSubmit.prVisible = false;
(iButtons[0] as OButton).prX = ((600 - ((iButtons[0] as OButton).width / OGlobal.Scale)) / 2);
};
(this.getChildAt(0) as OIObject).prX = ((560 - ((this.getChildAt(0) as OIObject).width / OGlobal.Scale)) / 2);
this.iTimer = new Timer(750, 6);
this.iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
this.iTimer.start();
}
}
}//package MAIN.WINDOWS
Section 93
//MochiAd (Mochi.mochi.as3.MochiAd)
package Mochi.mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static var load_options:Object;
private static var PROD_SERVER:String = "http://x.mochiads.com/";
private static var CDN_SERVER:String = "http://xs.mochiads.com/";
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.right - _local3.left);
_local5 = (_local3.top - _local3.bottom);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowDomain(PROD_SERVER);
Security.allowDomain(CDN_SERVER);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
private static function onLoadError(_arg1):void{
trace("[MochiAds] Blocked URL");
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var mc:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {server:PROD_SERVER, method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!(clip is DisplayObject)){
trace("Warning: Object passed as container clip not a descendant of the DisplayObject type");
return (null);
};
if (MovieClip(clip).stage == null){
trace("Warning: Container clip for ad is not attached to the stage");
return (null);
};
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
options.as3_swf = "localhost";
};
var init_url:String = options.server;
if (options.server == PROD_SERVER){
init_url = CDN_SERVER;
};
var hostname:String = _allowDomains(init_url);
options.server = (((options.server + "srv/1/") + options.id) + ".json?do_init=1");
var lc:LocalConnection = new LocalConnection();
lc.client = mc;
var name:String = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
options.lc = name;
options.st = getTimer();
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
load_options = options;
var loader:Loader = new Loader();
var g:Function = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
var req:URLRequest = new URLRequest(((init_url + "container/MochiAdsCDN-AS3.swf?do_init=1&cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.GET;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoad);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onLoadError);
try {
if (!options.skip){
loader.load(req);
};
} catch(e) {
onLoadError(e);
};
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
private static function onLoad(_arg1:Event):void{
var container:*;
var event = _arg1;
try {
container = event.target.content;
container.initialize(load_options);
} catch(e) {
onLoadError(e);
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:5500, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}, progress_override:function (_arg1:Object):Number{
return (NaN);
}, bar_offset:0};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
if (options.skip){
ad_timeout = 0;
};
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
var bar_w:Number = ((w - bar.x) - 10);
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(bar_w, 0);
outline.lineTo(bar_w, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var progress:Number = Math.min(1, options.progress_override(clip));
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local12:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
var _local7:Number = Math.min(1, options.progress_override(_local1));
if (_local7 == 1){
complete = true;
};
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local8:Number = ((100 * _local6) / _local5);
if (!isNaN(_local7)){
_local8 = (100 * _local7);
};
var _local9:Number = ((100 * _local3) / chk.ad_msec);
var _local10:Object = this._mochiad_bar._inside;
var _local11:Number = Math.min(100, Math.min(((_local8) || (0)), _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10.scaleX = (_local11 * 0.01);
options.ad_progress(_local11);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8});
if (_local8 >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local12 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (unloaded){
MochiAd.unload(_local1);
} else {
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
}
}//package Mochi.mochi.as3
Section 94
//MochiCoins (Mochi.mochi.as3.MochiCoins)
package Mochi.mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const NO_USER:String = "NoUser";
public static const IO_ERROR:String = "IOError";
public static const ITEM_NEW:String = "ItemNew";
public static const ITEM_OWNED:String = "ItemOwned";
public static const STORE_ITEMS:String = "StoreItems";
public static const ERROR:String = "Error";
public static const STORE_SHOW:String = "StoreShow";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static var _inventory:MochiInventory;
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function get inventory():MochiInventory{
return (_inventory);
}
public static function showStore(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:_arg1}, null, null);
}
public static function requestFunding(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFunding", _arg1);
}
public static function showItem(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showItem call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:_arg1}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showVideo(_arg1:Object=null):void{
if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){
trace("ERROR: showVideo call must pass an Object with an item key");
return;
};
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:_arg1}, null, null);
}
addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_inventory = new MochiInventory();
});
addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_inventory = null;
});
}
}//package Mochi.mochi.as3
Section 95
//MochiDigits (Mochi.mochi.as3.MochiDigits)
package Mochi.mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function reencode():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function get value():Number{
return (Number(this.toString()));
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package Mochi.mochi.as3
Section 96
//MochiEventDispatcher (Mochi.mochi.as3.MochiEventDispatcher)
package Mochi.mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
eventTable = {};
}
public function triggerEvent(_arg1:String, _arg2:Object):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
return;
};
for (_local3 in eventTable[_arg1]) {
var _local6 = eventTable[_arg1];
_local6[_local3](_arg2);
};
}
public function removeEventListener(_arg1:String, _arg2:Function):void{
var _local3:Object;
if (eventTable[_arg1] == undefined){
eventTable[_arg1] = [];
return;
};
for (_local3 in eventTable[_arg1]) {
if (eventTable[_arg1][_local3] != _arg2){
} else {
eventTable[_arg1].splice(Number(_local3), 1);
};
};
}
public function addEventListener(_arg1:String, _arg2:Function):void{
removeEventListener(_arg1, _arg2);
eventTable[_arg1].push(_arg2);
}
}
}//package Mochi.mochi.as3
Section 97
//MochiEvents (Mochi.mochi.as3.MochiEvents)
package Mochi.mochi.as3 {
public class MochiEvents {
public static const FORMAT_NONE:String = "NoForm";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const IO_ERROR:String = "IOError";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ACHIEVEMENTS_OWNED:String = "AchievementOwned";
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_NEW:String = "AchievementReceived";
public static const GAME_ACHIEVEMENTS:String = "GameAchievements";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const IO_PENDING:String = "IOPending";
public static const ERROR:String = "Error";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var gameStart:Number;
private static var levelStart:Number;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function showAwards(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.stayOnTop();
MochiServices.send("events_showAwards", _arg1);
}
public static function trackEvent(_arg1:String, _arg2=null):void{
MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null);
}
public static function getAchievements(_arg1:Object=null):void{
MochiServices.send("events_getAchievements", _arg1);
}
public static function setNotifications(_arg1:Object):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("events_setNotifications", _arg1, null, null);
}
public static function endPlay():void{
MochiServices.send("events_clearRoundID", null, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startPlay(_arg1:String="gameplay"):void{
MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function unlockAchievement(_arg1:Object):void{
MochiServices.send("events_unlockAchievement", _arg1);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function startSession(_arg1:String):void{
MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null);
}
}
}//package Mochi.mochi.as3
Section 98
//MochiInventory (Mochi.mochi.as3.MochiInventory)
package Mochi.mochi.as3 {
import flash.events.*;
import flash.utils.*;
public dynamic class MochiInventory extends Proxy {
private var _timer:Timer;
private var _names:Array;
private var _syncID:Number;
private var _consumableProperties:Object;
private var _storeSync:Object;
private var _outstandingID:Number;
private var _syncPending:Boolean;
public static const READY:String = "InvReady";
public static const ERROR:String = "Error";
public static const IO_ERROR:String = "IoError";
private static const KEY_SALT:String = " syncMaint";
public static const WRITTEN:String = "InvWritten";
public static const NOT_READY:String = "InvNotReady";
public static const VALUE_ERROR:String = "InvValueError";
private static const CONSUMER_KEY:String = "MochiConsumables";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiInventory():void{
MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned);
MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut);
_storeSync = new Object();
_syncPending = false;
_outstandingID = 0;
_syncID = 0;
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, sync);
_timer.start();
if (MochiSocial.loggedIn){
loggedIn();
} else {
loggedOut();
};
}
private function newItems(_arg1:Object):void{
if (!this[(_arg1.id + KEY_SALT)]){
this[(_arg1.id + KEY_SALT)] = 0;
};
if (!this[_arg1.id]){
this[_arg1.id] = 0;
};
this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count);
this[_arg1.id] = (this[_arg1.id] + _arg1.count);
if (((_arg1.privateProperties) && (_arg1.privateProperties.consumable))){
if (!this[_arg1.privateProperties.tag]){
this[_arg1.privateProperties.tag] = 0;
};
this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count));
};
}
public function release():void{
MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems);
MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn);
MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (-1);
};
if (_consumableProperties[_arg1]){
return (MochiDigits(_consumableProperties[_arg1]).value);
};
return (undefined);
}
private function loggedIn(_arg1:Object=null):void{
MochiUserData.get(CONSUMER_KEY, getConsumableBag);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return (false);
};
if (_consumableProperties[_arg1] == undefined){
return (false);
};
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{
return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1));
}
private function putConsumableBag(_arg1:MochiUserData):void{
_syncPending = false;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
_outstandingID = -1;
};
triggerEvent(WRITTEN, {});
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
var _local3:MochiDigits;
if (_consumableProperties == null){
triggerEvent(ERROR, {type:NOT_READY});
return;
};
if (!(_arg2 is Number)){
triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2});
return;
};
if (_consumableProperties[_arg1]){
_local3 = MochiDigits(_consumableProperties[_arg1]);
if (_local3.value == _arg2){
return;
};
_local3.value = _arg2;
} else {
_names.push(_arg1);
_consumableProperties[_arg1] = new MochiDigits(_arg2);
};
_syncID++;
}
private function itemOwned(_arg1:Object):void{
_storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count};
}
private function sync(_arg1:Event=null):void{
var _local3:String;
if (((_syncPending) || ((_syncID == _outstandingID)))){
return;
};
_outstandingID = _syncID;
var _local2:Object = {};
for (_local3 in _consumableProperties) {
_local2[_local3] = MochiDigits(_consumableProperties[_local3]).value;
};
MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag);
_syncPending = true;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{
return (_names[(_arg1 - 1)]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
if (!_consumableProperties[_arg1]){
return (false);
};
_names.splice(_names.indexOf(_arg1), 1);
delete _consumableProperties[_arg1];
return (true);
}
private function getConsumableBag(_arg1:MochiUserData):void{
var _local2:String;
var _local3:Number;
if (_arg1.error){
triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error});
return;
};
_consumableProperties = {};
_names = new Array();
if (_arg1.data){
for (_local2 in _arg1.data) {
_names.push(_local2);
_consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]);
};
};
for (_local2 in _storeSync) {
_local3 = _storeSync[_local2].count;
if (_consumableProperties[(_local2 + KEY_SALT)]){
_local3 = (_local3 - _consumableProperties[(_local2 + KEY_SALT)].value);
};
if (_local3 == 0){
} else {
newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties});
};
};
triggerEvent(READY, {});
}
private function loggedOut(_arg1:Object=null):void{
_consumableProperties = null;
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
}
}//package Mochi.mochi.as3
Section 99
//MochiServices (Mochi.mochi.as3.MochiServices)
package Mochi.mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiServices {
public static const CONNECTED:String = "onConnected";
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _queue:Array;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _nextCallbackID:Number;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var _callbacks:Object;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = _callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete _callbacks[cb];
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1));
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID});
};
if (_clip != null){
if (_callbacks != null){
_callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_nextCallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function detach(_arg1:Event):void{
var _local2:LoaderInfo = LoaderInfo(_arg1.target);
_local2.removeEventListener(Event.COMPLETE, detach);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.removeEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
private static function loadLCBridgeComplete(_arg1:Event):void{
var _local2:Loader = LoaderInfo(_arg1.target).loader;
_mochiLocalConnection = MovieClip(_local2.content);
listen();
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_mochiLocalConnection.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.9.5 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (((_clip) && (_queue))){
while (_queue.length > 0) {
_local2 = _queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _callbacks[_local2.callbackID];
};
delete _callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(_arg1:Object):void{
var _local2:String = _arg1.target;
var _local3:String = _arg1.event;
switch (_local2){
case "services":
MochiServices.triggerEvent(_arg1.event, _arg1.args);
break;
case "events":
MochiEvents.triggerEvent(_arg1.event, _arg1.args);
break;
case "coins":
MochiCoins.triggerEvent(_arg1.event, _arg1.args);
break;
case "social":
MochiSocial.triggerEvent(_arg1.event, _arg1.args);
break;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
if (_arg1.stage){
_local3 = _arg1.stage.loaderInfo.parameters.mochiad_options;
} else {
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
};
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://link.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_clip.parent){
_clip.parent.removeChild(_clip);
};
if (_arg1 != null){
if ((_arg1 is DisplayObjectContainer)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is DisplayObjectContainer)){
DisplayObjectContainer(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError("NotConnected");
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError("NotConnected");
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function loadError(_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
}
public static function get childClip():Object{
return (_clip);
}
private static function initComChannels():void{
if (!_connected){
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift());
};
};
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
trace("Waiting for MochiAds services to connect...");
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
private static function loadLCBridge(_arg1:Object):void{
var _local2:Loader = new Loader();
var _local3:String = (_servURL + _mochiLC);
var _local4:URLRequest = new URLRequest(_local3);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadLCBridgeComplete);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
_local2.load(_local4);
_arg1.addChild(_local2);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
MochiServices.onError("NotConnected");
return (null);
};
if (urlOptions(_arg2).servURL){
_servURL = urlOptions(_arg2).servURL;
};
var _local3:String = (_servURL + _services);
if (urlOptions(_arg2).servicesURL){
_local3 = urlOptions(_arg2).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(_local3);
_clip = new MovieClip();
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, detach);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
var _local4:URLRequest = new URLRequest(_local3);
var _local5:URLVariables = new URLVariables();
_local5.listenLC = _listenChannelName;
_local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options;
_local5.api_version = getVersion();
if (widget){
_local5.widget = true;
};
_local4.data = _local5;
_loader.load(_local4);
_clip.addChild(_loader);
_sendChannel = new LocalConnection();
_queue = [];
_nextCallbackID = 0;
_callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
if ((clip is DisplayObject)){
if (clip.stage == null){
trace("MochiServices connect requires the containing clip be attached to the stage");
};
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
}
public static function bringToTop(_arg1:Event=null):void{
var e = _arg1;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
} else {
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, connectWait);
_timer = null;
};
}
}
}//package Mochi.mochi.as3
Section 100
//MochiSocial (Mochi.mochi.as3.MochiSocial)
package Mochi.mochi.as3 {
public class MochiSocial {
public static const LOGGED_IN:String = "LoggedIn";
public static const ACTION_CANCELED:String = "onCancel";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const IO_ERROR:String = "IOError";
public static const NO_USER:String = "NoUser";
public static const FRIEND_LIST:String = "FriendsList";
public static const PROFILE_DATA:String = "ProfileData";
public static const GAMEPLAY_DATA:String = "GameplayData";
public static const ACTION_COMPLETE:String = "onComplete";
public static const LOGIN_SHOW:String = "LoginShow";
public static const PROFILE_HIDE:String = "ProfileHide";
public static const USER_INFO:String = "UserInfo";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const ERROR:String = "Error";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOWN:String = "LoginShown";
public static var _user_info:Object = null;
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public static function requestFan(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestFan", _arg1);
}
public static function postToStream(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_postToStream", _arg1);
}
public static function getFriendsList(_arg1:Object=null):void{
MochiServices.send("social_getFriendsList", _arg1);
}
public static function requestLogin(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_requestLogin", _arg1);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function saveUserProperties(_arg1:Object):void{
MochiServices.send("social_saveUserProperties", _arg1);
}
public static function triggerEvent(_arg1:String, _arg2:Object):void{
_dispatcher.triggerEvent(_arg1, _arg2);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.removeEventListener(_arg1, _arg2);
}
public static function inviteFriends(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_inviteFriends", _arg1);
}
public static function get loggedIn():Boolean{
return (!((_user_info == null)));
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
_dispatcher.addEventListener(_arg1, _arg2);
}
public static function showLoginWidget(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("social_showLoginWidget", {options:_arg1});
}
public static function getAPIURL():String{
if (!_user_info){
return (null);
};
return (_user_info.api_url);
}
public static function showProfile(_arg1:Object=null):void{
MochiServices.setContainer();
MochiServices.stayOnTop();
MochiServices.send("social_showProfile", _arg1);
}
public static function hideLoginWidget():void{
MochiServices.send("social_hideLoginWidget");
}
public static function getAPIToken():String{
if (!_user_info){
return (null);
};
return (_user_info.api_token);
}
MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{
_user_info = _arg1;
});
MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{
_user_info = null;
});
}
}//package Mochi.mochi.as3
Section 101
//MochiUserData (Mochi.mochi.as3.MochiUserData)
package Mochi.mochi.as3 {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class MochiUserData extends EventDispatcher {
public var callback:Function;// = null
public var operation:String;// = null
public var error:Event;// = null
public var data;// = null
public var _loader:URLLoader;
public var key:String;// = null
public function MochiUserData(_arg1:String="", _arg2:Function=null){
this.key = _arg1;
this.callback = _arg2;
}
public function serialize(_arg1):ByteArray{
var _local2:ByteArray = new ByteArray();
_local2.objectEncoding = ObjectEncoding.AMF3;
_local2.writeObject(_arg1);
_local2.compress();
return (_local2);
}
public function errorHandler(_arg1:IOErrorEvent):void{
data = null;
error = _arg1;
if (callback != null){
performCallback();
} else {
dispatchEvent(_arg1);
};
close();
}
public function putEvent(_arg1):void{
request("put", serialize(_arg1));
}
public function deserialize(_arg1:ByteArray){
_arg1.objectEncoding = ObjectEncoding.AMF3;
_arg1.uncompress();
return (_arg1.readObject());
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString())));
}
public function getEvent():void{
request("get", serialize(null));
}
override public function toString():String{
return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]"));
}
public function performCallback():void{
try {
callback(this);
} catch(e:Error) {
trace(("[MochiUserData] exception during callback: " + e));
};
}
public function request(_arg1:String, _arg2:ByteArray):void{
var _operation = _arg1;
var _data = _arg2;
operation = _operation;
var api_url:String = MochiSocial.getAPIURL();
var api_token:String = MochiSocial.getAPIToken();
if ((((api_url == null)) || ((api_token == null)))){
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in"));
return;
};
_loader = new URLLoader();
var args:URLVariables = new URLVariables();
args.op = _operation;
args.key = key;
var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString()));
req.method = URLRequestMethod.POST;
req.contentType = "application/x-mochi-userdata";
req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)];
req.data = _data;
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
try {
_loader.load(req);
} catch(e:SecurityError) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString())));
};
}
public function completeHandler(_arg1:Event):void{
var event = _arg1;
try {
if (_loader.data.length){
data = deserialize(_loader.data);
} else {
data = null;
};
} catch(e:Error) {
errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString())));
return;
};
if (callback != null){
performCallback();
} else {
dispatchEvent(event);
};
close();
}
public function close():void{
if (_loader){
_loader.removeEventListener(Event.COMPLETE, completeHandler);
_loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_loader.close();
_loader = null;
};
error = null;
callback = null;
}
public static function get(_arg1:String, _arg2:Function):void{
var _local3:MochiUserData = new MochiUserData(_arg1, _arg2);
_local3.getEvent();
}
public static function put(_arg1:String, _arg2, _arg3:Function):void{
var _local4:MochiUserData = new MochiUserData(_arg1, _arg3);
_local4.putEvent(_arg2);
}
}
}//package Mochi.mochi.as3
Section 102
//OMochiAd (Mochi.OMochiAd)
package Mochi {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
import flash.utils.*;
import Mochi.mochi.as3.*;
public class OMochiAd extends Ad {
protected var iClickAvayAdShowTime:int;
protected var iClickAvayAdPosY:Number;
protected var bClickAvayAd:Boolean;
protected var iClip:MovieClip;
protected var iTimer:Timer;
protected var iClickAvayAdPosX:Number;
protected var iMochiID:String;
public function OMochiAd(_arg1:uint=0, _arg2:String="test", _arg3:Boolean=false, _arg4:int=10, _arg5:Number=250, _arg6:Number=7){
super(_arg1);
iMochiID = _arg2;
bClickAvayAd = _arg3;
iClickAvayAdShowTime = (_arg4 * 1000);
iClickAvayAdPosX = _arg5;
iClickAvayAdPosY = _arg6;
this.iRect = new Rectangle(0, 0, 300, 250);
}
protected function OnTimer(_arg1:TimerEvent=null):void{
if (this.iClickAvayAdShowTime > 0){
AdFinished();
} else {
if (iCbfnAdFinished != null){
iCbfnAdFinished();
iCbfnAdFinished = null;
};
};
}
override public function ShowInterLevelAd(_arg1:Function):void{
var _local2:int;
super.ShowInterLevelAd(_arg1);
this.iClip = new MovieClip();
this.iApp.addChild(this.iClip);
if (!bClickAvayAd){
MochiAd.showInterLevelAd({clip:this.iClip, id:this.iMochiID, ad_finished:this.AdFinished, ad_failed:this.ad_failed, ad_skipped:this.ad_skipped});
} else {
this.iClip.y = iClickAvayAdPosY;
this.iClip.x = (((800 * OGlobal.Scale) - 300) / 2);
_local2 = iClickAvayAdShowTime;
if (iClickAvayAdShowTime <= 0){
_local2 = 4000;
};
iTimer = new Timer(_local2, 1);
iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
iTimer.start();
MochiAd.showClickAwayAd({clip:this.iClip, id:this.iMochiID, ad_failed:this.OnTimer, ad_skipped:this.ad_skipped});
};
}
override protected function AdFinished():void{
trace("AdFinished");
if (iTimer){
iTimer.stop();
iTimer.removeEventListener(TimerEvent.TIMER, OnTimer);
iTimer = null;
};
if (this.iClip){
MochiAd.unload(this.iClip);
this.iApp.removeChild(this.iClip);
this.iClip = null;
};
super.AdFinished();
}
override public function ShowEndGameAd(_arg1:Function):void{
_arg1();
}
override public function ShowPreGameAd(_arg1:Function):void{
super.ShowPreGameAd(_arg1);
this.iClip = new MovieClip();
this.iApp.addChild(this.iClip);
MochiAd.showPreGameAd({clip:this.iClip, id:this.iMochiID, ad_finished:this.AdFinished, ad_failed:this.ad_failed, ad_skipped:this.ad_skipped, res:((Math.round((800 * OGlobal.Scale)).toString() + "x") + Math.round((600 * OGlobal.Scale)).toString())});
if (iClickAvayAdShowTime <= 0){
iTimer = new Timer(10000, 1);
iTimer.addEventListener(TimerEvent.TIMER, OnTimerPreGame);
iTimer.start();
};
}
protected function OnTimerPreGame(_arg1:TimerEvent=null):void{
AdFinished();
}
private function ad_failed():void{
trace("Mochi ad_failed");
}
override public function GetName():String{
return (AdNames.AD_MOCHI);
}
private function ad_skipped():void{
trace("Mochi ad_skipped");
}
override public function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void{
super.Init(_arg1, _arg2);
if (MochiServices.connected == false){
MochiServices.connect(iMochiID, _arg1, this.onConnectError);
};
}
public function onConnectError(_arg1:String):void{
trace("status", _arg1);
}
}
}//package Mochi
Section 103
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.6.0.21751";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 104
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.6.0.21751";
}
}//package mx.core
Section 105
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.6.0.21751";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 106
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.6.0.21751";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 107
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.6.0.21751";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 108
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.6.0.21751";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 109
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "3.6.0.21751";
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 110
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.6.0.21751";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 111
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 112
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 113
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 114
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
import flash.media.*;
import flash.text.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 115
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 116
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 117
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
import flash.utils.*;
public interface IFlexModuleFactory {
function get preloadedRSLs():Dictionary;
function allowInsecureDomain(... _args):void;
function create(... _args):Object;
function allowDomain(... _args):void;
function info():Object;
}
}//package mx.core
Section 118
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 119
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 120
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 121
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 122
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 123
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup)
package mx.core {
import flash.events.*;
public interface ISWFBridgeGroup {
function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider;
function removeChildBridge(_arg1:IEventDispatcher):void;
function get parentBridge():IEventDispatcher;
function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void;
function set parentBridge(_arg1:IEventDispatcher):void;
function containsBridge(_arg1:IEventDispatcher):Boolean;
function getChildBridges():Array;
}
}//package mx.core
Section 124
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider)
package mx.core {
import flash.events.*;
public interface ISWFBridgeProvider {
function get childAllowsParent():Boolean;
function get swfBridge():IEventDispatcher;
function get parentAllowsChild():Boolean;
}
}//package mx.core
Section 125
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 126
//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 127
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.6.0.21751";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 128
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.6.0.21751";
}
}//package mx.core
Section 129
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.6.0.21751";
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;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 130
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 131
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.6.0.21751";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 132
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.6.0.21751";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 133
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.6.0.21751";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 134
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import flash.display.*;
import mx.core.*;
import flash.geom.*;
import flash.filters.*;
import mx.utils.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.6.0.21751";
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 135
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.events.*;
import flash.display.*;
import mx.core.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function moveFocus(_arg1:String, _arg2:DisplayObject=null):void;
function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function removeSWFBridge(_arg1:IEventDispatcher):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 136
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package mx.managers
Section 137
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.events.*;
import flash.display.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 138
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 139
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 140
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import flash.display.*;
import mx.core.*;
import flash.geom.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function set focusPane(_arg1:Sprite):void;
function get toolTipChildren():IChildList;
function useSWFBridge():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function deployMouseShields(_arg1:Boolean):void;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void;
function getSandboxRoot():DisplayObject;
function get swfBridgeGroup():ISWFBridgeGroup;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function get document():Object;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function getTopLevelRoot():DisplayObject;
function removeChildBridge(_arg1:IEventDispatcher):void;
function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function isTopLevel():Boolean;
function isTopLevelRoot():Boolean;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle;
}
}//package mx.managers
Section 141
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var changingListenersInOtherSystemManagers:Boolean;
public static var bootstrapLoaderInfoURL:String;
public static var showMouseCursor:Boolean;
public static var dispatchingEventToOtherSystemManagers:Boolean;
}
}//package mx.managers
Section 142
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 143
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.6.0.21751";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import flash.display.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.events.*;
import flash.net.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
var _local4:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local4 = new ModuleEvent(ModuleEvent.PROGRESS);
_local4.bytesLoaded = info.size;
_local4.bytesTotal = info.size;
dispatchEvent(_local4);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2, _arg3);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
loader.content.removeEventListener("error", moduleErrorHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
loader.content.addEventListener("error", moduleErrorHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{
var _local3:LoaderContext = new LoaderContext();
_local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local3)){
_local3["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.loadBytes(_arg2, _local3);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_arg3){
loadBytes(_arg1, _arg3);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var _local4:URLRequest = new URLRequest(_url);
var _local5:LoaderContext = new LoaderContext();
_local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (((!((_arg2 == null))) && ((Security.sandboxType == Security.REMOTE)))){
_local5.securityDomain = _arg2;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local4, _local5);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((_arg1 is ModuleEvent)){
_local2 = ModuleEvent(_arg1);
} else {
_local2 = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(_local2);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.READY);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(_local2);
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 144
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 145
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 146
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function getPreferredLocaleChain():Array;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function initializeLocaleChain(_arg1:Array):void;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 147
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 148
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
public class LocaleSorter {
mx_internal static const VERSION:String = "3.6.0.21751";
private static function normalizeLocale(_arg1:String):String{
return (_arg1.toLowerCase().replace(/-/g, "_"));
}
public static function sortLocalesByPreference(_arg1:Array, _arg2:Array, _arg3:String=null, _arg4:Boolean=false):Array{
var result:Array;
var hasLocale:Object;
var i:int;
var j:int;
var k:int;
var l:int;
var locale:String;
var plocale:LocaleID;
var appLocales = _arg1;
var systemPreferences = _arg2;
var ultimateFallbackLocale = _arg3;
var addAll = _arg4;
var promote:Function = function (_arg1:String):void{
if (typeof(hasLocale[_arg1]) != "undefined"){
result.push(appLocales[hasLocale[_arg1]]);
delete hasLocale[_arg1];
};
};
result = [];
hasLocale = {};
var locales:Array = trimAndNormalize(appLocales);
var preferenceLocales:Array = trimAndNormalize(systemPreferences);
addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale);
j = 0;
while (j < locales.length) {
hasLocale[locales[j]] = j;
j = (j + 1);
};
i = 0;
l = preferenceLocales.length;
while (i < l) {
plocale = LocaleID.fromString(preferenceLocales[i]);
promote(preferenceLocales[i]);
promote(plocale.toString());
while (plocale.transformToParent()) {
promote(plocale.toString());
};
plocale = LocaleID.fromString(preferenceLocales[i]);
j = 0;
while (j < l) {
locale = preferenceLocales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
j = 0;
k = locales.length;
while (j < k) {
locale = locales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
i = (i + 1);
};
if (addAll){
j = 0;
k = locales.length;
while (j < k) {
promote(locales[j]);
j = (j + 1);
};
};
return (result);
}
private static function addUltimateFallbackLocale(_arg1:Array, _arg2:String):void{
var _local3:String;
if (((!((_arg2 == null))) && (!((_arg2 == ""))))){
_local3 = normalizeLocale(_arg2);
if (_arg1.indexOf(_local3) == -1){
_arg1.push(_local3);
};
};
}
private static function trimAndNormalize(_arg1:Array):Array{
var _local2:Array = [];
var _local3:int;
while (_local3 < _arg1.length) {
_local2.push(normalizeLocale(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package mx.resources
class LocaleID {
private var privateLangs:Boolean;// = false
private var script:String;// = ""
private var variants:Array;
private var privates:Array;
private var extensions:Object;
private var lang:String;// = ""
private var region:String;// = ""
private var extended_langs:Array;
public static const STATE_PRIMARY_LANGUAGE:int = 0;
public static const STATE_REGION:int = 3;
public static const STATE_EXTENDED_LANGUAGES:int = 1;
public static const STATE_EXTENSIONS:int = 5;
public static const STATE_SCRIPT:int = 2;
public static const STATE_VARIANTS:int = 4;
public static const STATE_PRIVATES:int = 6;
private function LocaleID(){
extended_langs = [];
variants = [];
extensions = {};
privates = [];
super();
}
public function equals(_arg1:LocaleID):Boolean{
return ((toString() == _arg1.toString()));
}
public function canonicalize():void{
var _local1:String;
for (_local1 in extensions) {
if (extensions.hasOwnProperty(_local1)){
if (extensions[_local1].length == 0){
delete extensions[_local1];
} else {
extensions[_local1] = extensions[_local1].sort();
};
};
};
extended_langs = extended_langs.sort();
variants = variants.sort();
privates = privates.sort();
if (script == ""){
script = LocaleRegistry.getScriptByLang(lang);
};
if ((((script == "")) && (!((region == ""))))){
script = LocaleRegistry.getScriptByLangAndRegion(lang, region);
};
if ((((region == "")) && (!((script == ""))))){
region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
};
}
public function toString():String{
var _local2:String;
var _local1:Array = [lang];
appendElements(_local1, extended_langs);
if (script != ""){
_local1.push(script);
};
if (region != ""){
_local1.push(region);
};
appendElements(_local1, variants);
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1.push(_local2);
appendElements(_local1, extensions[_local2]);
};
};
if (privates.length > 0){
_local1.push("x");
appendElements(_local1, privates);
};
return (_local1.join("_"));
}
public function isSiblingOf(_arg1:LocaleID):Boolean{
return ((((lang == _arg1.lang)) && ((script == _arg1.script))));
}
public function transformToParent():Boolean{
var _local2:String;
var _local3:Array;
var _local4:String;
if (privates.length > 0){
privates.splice((privates.length - 1), 1);
return (true);
};
var _local1:String;
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1 = _local2;
};
};
if (_local1){
_local3 = extensions[_local1];
if (_local3.length == 1){
delete extensions[_local1];
return (true);
};
_local3.splice((_local3.length - 1), 1);
return (true);
};
if (variants.length > 0){
variants.splice((variants.length - 1), 1);
return (true);
};
if (script != ""){
if (LocaleRegistry.getScriptByLang(lang) != ""){
script = "";
return (true);
};
if (region == ""){
_local4 = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
if (_local4 != ""){
region = _local4;
script = "";
return (true);
};
};
};
if (region != ""){
if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){
region = "";
return (true);
};
};
if (extended_langs.length > 0){
extended_langs.splice((extended_langs.length - 1), 1);
return (true);
};
return (false);
}
private static function appendElements(_arg1:Array, _arg2:Array):void{
var _local3:uint;
var _local4:uint = _arg2.length;
while (_local3 < _local4) {
_arg1.push(_arg2[_local3]);
_local3++;
};
}
public static function fromString(_arg1:String):LocaleID{
var _local5:Array;
var _local8:String;
var _local9:int;
var _local10:String;
var _local2:LocaleID = new (LocaleID);
var _local3:int = STATE_PRIMARY_LANGUAGE;
var _local4:Array = _arg1.replace(/-/g, "_").split("_");
var _local6:int;
var _local7:int = _local4.length;
while (_local6 < _local7) {
_local8 = _local4[_local6].toLowerCase();
if (_local3 == STATE_PRIMARY_LANGUAGE){
if (_local8 == "x"){
_local2.privateLangs = true;
} else {
if (_local8 == "i"){
_local2.lang = (_local2.lang + "i-");
} else {
_local2.lang = (_local2.lang + _local8);
_local3 = STATE_EXTENDED_LANGUAGES;
};
};
} else {
_local9 = _local8.length;
if (_local9 == 0){
} else {
_local10 = _local8.charAt(0).toLowerCase();
if ((((_local3 <= STATE_EXTENDED_LANGUAGES)) && ((_local9 == 3)))){
_local2.extended_langs.push(_local8);
if (_local2.extended_langs.length == 3){
_local3 = STATE_SCRIPT;
};
} else {
if ((((_local3 <= STATE_SCRIPT)) && ((_local9 == 4)))){
_local2.script = _local8;
_local3 = STATE_REGION;
} else {
if ((((_local3 <= STATE_REGION)) && ((((_local9 == 2)) || ((_local9 == 3)))))){
_local2.region = _local8;
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 <= STATE_VARIANTS)) && ((((((((_local10 >= "a")) && ((_local10 <= "z")))) && ((_local9 >= 5)))) || ((((((_local10 >= "0")) && ((_local10 <= "9")))) && ((_local9 >= 4)))))))){
_local2.variants.push(_local8);
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 < STATE_PRIVATES)) && ((_local9 == 1)))){
if (_local8 == "x"){
_local3 = STATE_PRIVATES;
_local5 = _local2.privates;
} else {
_local3 = STATE_EXTENSIONS;
_local5 = ((_local2.extensions[_local8]) || ([]));
_local2.extensions[_local8] = _local5;
};
} else {
if (_local3 >= STATE_EXTENSIONS){
_local5.push(_local8);
};
};
};
};
};
};
};
};
_local6++;
};
_local2.canonicalize();
return (_local2);
}
}
class LocaleRegistry {
private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28};
private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"];
private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}};
private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32};
private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}};
private function LocaleRegistry(){
}
public static function getScriptByLangAndRegion(_arg1:String, _arg2:String):String{
var _local3:Object = SCRIPT_ID_BY_LANG_AND_REGION[_arg1];
if (_local3 == null){
return ("");
};
var _local4:Object = _local3[_arg2];
if (_local4 == null){
return ("");
};
return (SCRIPTS[int(_local4)].toLowerCase());
}
public static function getScriptByLang(_arg1:String):String{
var _local2:Object = SCRIPT_ID_BY_LANG[_arg1];
if (_local2 == null){
return ("");
};
return (SCRIPTS[int(_local2)].toLowerCase());
}
public static function getDefaultRegionForLangAndScript(_arg1:String, _arg2:String):String{
var _local3:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[_arg1];
var _local4:Object = SCRIPT_BY_ID[_arg2];
if ((((_local3 == null)) || ((_local4 == null)))){
return ("");
};
return (((_local3[int(_local4)]) || ("")));
}
}
Section 149
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.6.0.21751";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 150
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.6.0.21751";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
try {
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
} catch(e:Error) {
instance = new ResourceManagerImpl();
};
};
return (instance);
}
}
}//package mx.resources
Section 151
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.6.0.21751";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function initializeLocaleChain(_arg1:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
private function getSystemPreferredLocales():Array{
var _local1:Array;
if (Capabilities["languages"]){
_local1 = Capabilities["languages"];
} else {
_local1 = [Capabilities.language];
};
return (_local1);
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:String;
var _local3:ResourceModuleInfo = resourceModules[_arg1];
if (!_local3){
return;
};
if (_local3.resourceModule){
_local4 = _local3.resourceModule.resourceBundles;
if (_local4){
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = _local4[_local6].locale;
_local8 = _local4[_local6].bundleName;
removeResourceBundle(_local7, _local8);
_local6++;
};
};
};
resourceModules[_arg1] = null;
delete resourceModules[_arg1];
_local3.moduleInfo.unload();
if (_arg2){
this.update();
};
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 152
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import flash.display.*;
import mx.core.*;
import mx.styles.*;
import mx.skins.*;
import mx.graphics.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.6.0.21751";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = Math.max((radius - Math.max(_local6.top, _local6.left, _local6.right)), 0);
_local10 = (bRoundedCorners) ? Math.max((radius - Math.max(_local6.bottom, _local6.left, _local6.right)), 0) : 0;
radiusObj = {tl:_local9, tr:_local9, bl:_local10, br:_local10};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local11 = getStyle("highlightAlphas");
_local12 = (_local11) ? _local11[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local12, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 153
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.6.0.21751";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
if (_local3){
blendMode = _local3;
};
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 154
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.6.0.21751";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 155
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import flash.display.*;
import mx.core.*;
import flash.geom.*;
import mx.styles.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.6.0.21751";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return ((_styleName) ? _styleName.getStyle(_arg1) : null);
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 156
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import flash.display.*;
import mx.core.*;
import flash.geom.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import mx.resources.*;
import flash.net.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.6.0.21751";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
if (((((_backgroundImageBounds) && (_arg1))) && (_backgroundImageBounds.equals(_arg1)))){
return;
};
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 157
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import flash.display.*;
import mx.core.*;
import flash.utils.*;
import mx.managers.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.6.0.21751";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_local5 = styleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 158
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 159
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 160
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 161
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 162
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 163
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.6.0.21751";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 164
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.6.0.21751";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 165
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.6.0.21751";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 166
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.6.0.21751";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 167
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.6.0.21751";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 168
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "3.6.0.21751";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 169
//YandexDirectEvent (ru.yandex.direct.events.YandexDirectEvent)
package ru.yandex.direct.events {
import flash.events.*;
public class YandexDirectEvent extends Event {
public static const CLICKED:String = "clicked";
public function YandexDirectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package ru.yandex.direct.events
Section 170
//BannersLoader (ru.yandex.direct.BannersLoader)
package ru.yandex.direct {
import flash.events.*;
import flash.net.*;
public class BannersLoader extends EventDispatcher {
private var _bannersContent:String;
private var _loader:URLLoader;
private function loader_completeHandler(_arg1:Event):void{
removeLoaderEventsListeners();
_bannersContent = _loader.data.toString();
dispatchEvent(new Event(Event.COMPLETE));
}
public function load(_arg1:String):void{
if (_loader){
cancel();
};
_loader = new URLLoader();
_loader.addEventListener(Event.COMPLETE, loader_completeHandler);
_loader.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, loader_securityErrorHandler);
_loader.load(new URLRequest(_arg1));
}
private function loader_securityErrorHandler(_arg1:SecurityErrorEvent):void{
removeLoaderEventsListeners();
dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, _arg1.text));
}
private function removeLoaderEventsListeners():void{
_loader.removeEventListener(Event.COMPLETE, loader_completeHandler);
}
private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{
removeLoaderEventsListeners();
dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, _arg1.text));
}
public function get bannersContent():String{
return (_bannersContent);
}
public function cancel():void{
_loader.close();
removeLoaderEventsListeners();
}
}
}//package ru.yandex.direct
Section 171
//ColorTheme (ru.yandex.direct.ColorTheme)
package ru.yandex.direct {
public class ColorTheme {
public static const GREEN:String = "green";
public static const GRAY:String = "gray";
public static const ORANGE:String = "orange";
public static const RED:String = "red";
public static const BLUE:String = "blue";
public static const YELLOW:String = "yellow";
public static const BLACK:String = "black";
}
}//package ru.yandex.direct
Section 172
//YandexDirectWrapper (ru.yandex.direct.YandexDirectWrapper)
package ru.yandex.direct {
import flash.events.*;
import flash.display.*;
import ru.yandex.direct.events.*;
import flash.net.*;
public class YandexDirectWrapper extends Sprite {
private var _targetRef:String;
private var _colorTheme:String;
private var _width:Number;// = 600
private var _module:Object;
private var _externalUid:uint;
private var _code:String;
private var _gender:String;// = ""
private var _yearOfBirth:uint;
private var _statId:uint;
private var _loader:Loader;
private var _bannersLoader:BannersLoader;
public static const MODULE_URL:String = "http://an.yandex.ru/system/yandex-direct-beta.swf";
public static const HEIGHT:int = 44;
public function YandexDirectWrapper(_arg1:String, _arg2:String=""){
_loader = new Loader();
_bannersLoader = new BannersLoader();
super();
_code = _arg1;
_colorTheme = _arg2;
}
private function loadBanners():void{
_bannersLoader.addEventListener(Event.COMPLETE, bannersLoader_completeHandler);
_bannersLoader.addEventListener(ErrorEvent.ERROR, bannersLoader_errorHandler);
_bannersLoader.load(_module.bannersUrl);
}
override public function get height():Number{
return (HEIGHT);
}
private function loadYandexDirect():void{
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler);
_targetRef = getTargetRefFromUrl(stage.loaderInfo.url);
var _local1:URLRequest = new URLRequest(MODULE_URL);
var _local2:URLVariables = new URLVariables();
_local2.targetRef = _targetRef;
_local2.code = _code;
_local2.colorTheme = _colorTheme;
_local2.gender = _gender;
_local2.yearOfBirth = _yearOfBirth;
_local2.externalUid = _externalUid;
_local2.statId = _statId;
_local2.nc = Math.random();
_local1.data = _local2;
_loader.load(_local1);
}
public function setStatId(_arg1:int):void{
_statId = _arg1;
}
public function setGender(_arg1:String):void{
_gender = _arg1;
}
private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{
removeLoaderEventsListeners();
dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, ("Unable to load Yandex.Direct: " + _arg1)));
}
public function setUid(_arg1:uint):void{
_externalUid = _arg1;
}
public function run():void{
if (!stage){
addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
} else {
loadYandexDirect();
};
}
private function bannersLoader_completeHandler(_arg1:Event):void{
_module.setBannersContent(_bannersLoader.bannersContent);
}
private function module_clickedHandler():void{
dispatchEvent(new YandexDirectEvent(YandexDirectEvent.CLICKED));
}
override public function get width():Number{
return (_width);
}
private function removeBannersLoaderEventsListener():void{
_bannersLoader.removeEventListener(Event.COMPLETE, bannersLoader_completeHandler);
_bannersLoader.removeEventListener(ErrorEvent.ERROR, bannersLoader_errorHandler);
}
private function loader_completeHandler(_arg1:Event):void{
removeLoaderEventsListeners();
_module = _loader.content;
addModule();
loadBanners();
}
override public function set height(_arg1:Number):void{
throw (new Error("YandexDirectWrapper.height is readonly property"));
}
private function addedToStageHandler(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
loadYandexDirect();
}
public function setYearOfBirth(_arg1:uint):void{
_yearOfBirth = _arg1;
}
private function addModule():void{
_module.width = _width;
addChild(Sprite(_module));
_module.setBannerClickHandler(module_clickedHandler);
_module.addEventListener(ErrorEvent.ERROR, module_errorHandler);
_module.addEventListener(Event.COMPLETE, module_completeHandler);
}
private function removeLoaderEventsListeners():void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loader_completeHandler);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler);
}
private function bannersLoader_errorHandler(_arg1:ErrorEvent):void{
dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, ("Unable to load Banners: " + _arg1)));
}
private function stage_resizeHandler(_arg1:Event):void{
_width = stage.stageWidth;
}
private function module_errorHandler(_arg1:ErrorEvent):void{
dispatchEvent(_arg1);
}
private function getTargetRefFromUrl(_arg1:String):String{
var _local2:int = (_arg1.indexOf("://") + 4);
_local2 = _arg1.indexOf("/", _local2);
return (_arg1.substring(0, _local2));
}
private function module_completeHandler(_arg1:Event):void{
loadBanners();
}
override public function set width(_arg1:Number):void{
_width = _arg1;
if (_module){
_module.width = _width;
};
}
}
}//package ru.yandex.direct
Section 173
//OWellgamesAd (WellgamesAd.OWellgamesAd)
package WellgamesAd {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import ENGINE.AD.*;
public class OWellgamesAd extends Ad {
protected var flag_show_top:Boolean;
protected var iShowTimeSeconds:int;// = 10
protected var iX:int;
protected var iY:int;
protected var flag_show_bottom:Boolean;
protected var iTimer:Timer;
protected var iWidth:int;
protected var sBannerID:String;
protected var iListLang:Array;
protected var iHeight:int;
public function OWellgamesAd(_arg1:String, _arg2:Array, _arg3:int=0, _arg4:int=10, _arg5:int=0, _arg6:int=0, _arg7:int=800, _arg8:int=260){
super(_arg3);
this.sBannerID = _arg1;
this.iListLang = _arg2;
this.iShowTimeSeconds = _arg4;
this.iX = _arg5;
this.iY = _arg6;
this.iWidth = _arg7;
this.iHeight = _arg8;
this.flag_show_top = false;
this.flag_show_bottom = false;
}
protected function RemoveBanners():void{
if (this.flag_show_top == true){
OAdBanners.RemoveTBanner(iApp);
};
if (this.flag_show_bottom == true){
OAdBanners.RemoveBBanner(iApp);
};
}
override public function ShowInterLevelAd(_arg1:Function):void{
super.ShowInterLevelAd(_arg1);
var _local2:int = this.iShowTimeSeconds;
if (this.iShowTimeSeconds == -1){
_local2 = 10;
};
iTimer = new Timer((_local2 * 1000), 1);
iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
iTimer.start();
AddBanners();
}
protected function OnTimer(_arg1:TimerEvent=null):void{
if (this.iShowTimeSeconds != -1){
AdFinished();
} else {
if (iCbfnAdFinished != null){
iCbfnAdFinished();
iCbfnAdFinished = null;
};
};
}
override protected function AdFinished():void{
if (this.iTimer != null){
iTimer.stop();
iTimer.removeEventListener(TimerEvent.TIMER, OnTimer);
iTimer = null;
};
RemoveBanners();
super.AdFinished();
}
override public function ShowPreGameAd(_arg1:Function):void{
_arg1();
}
protected function AddBanners():void{
if (this.flag_show_top == true){
OAdBanners.AddTBanner(iApp, iX, iY, iWidth, iHeight);
};
if (this.flag_show_bottom == true){
OAdBanners.AddBBanner(iApp, iX, (600 - iHeight), iWidth, iHeight);
};
}
override public function ShowEndGameAd(_arg1:Function):void{
_arg1();
}
override public function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void{
var _local3:int;
var _local4:int;
super.Init(_arg1, _arg2);
if ((((this.iListLang == null)) || ((this.iListLang.length == 0)))){
return;
};
_local4 = 0;
_local3 = 0;
while (_local3 < this.iListLang.length) {
if (_arg2.toLowerCase() == String(this.iListLang[_local3][0]).toLowerCase()){
_local4 = _local3;
break;
};
_local3++;
};
this.flag_show_top = !((this.iListLang[_local4][1][0] == null));
if (this.flag_show_top == true){
OAdBanners.InitTBanner(this.iListLang[_local4][1][0], sBannerID);
};
this.flag_show_bottom = !((this.iListLang[_local4][1][1] == null));
if (this.flag_show_bottom == true){
OAdBanners.InitBBanner(this.iListLang[_local4][1][1], sBannerID);
};
}
override public function GetName():String{
return (AdNames.AD_WELLGAMES);
}
}
}//package WellgamesAd
Section 174
//OYandexAd (YandexAd.OYandexAd)
package YandexAd {
import flash.events.*;
import flash.display.*;
import ENGINE.CORE.*;
import flash.utils.*;
import flash.system.*;
import ru.yandex.direct.*;
import ru.yandex.direct.events.*;
public class OYandexAd extends Ad {
private var yandexAdTop:YandexDirectWrapper;
private var yandexAdArray:Array;
protected var flag_show_top:Boolean;
private var gameID:String;
private var iShowBanner:int;
protected var flag_show_bottom:Boolean;
private var iTimer:Timer;
private var bannerX:Number;
private var bannerY:Number;
private var statID:int;
private var bannerWidth:int;
private var yandexAdBottom:YandexDirectWrapper;
public function OYandexAd(_arg1:String, _arg2:int, _arg3:Array, _arg4:int=-1, _arg5:int=500, _arg6:Number=100){
super(0);
statID = _arg2;
gameID = _arg1;
yandexAdArray = _arg3;
iShowBanner = _arg4;
if (_arg5 >= 500){
bannerWidth = _arg5;
} else {
bannerWidth = 500;
};
bannerY = _arg6;
}
override public function ShowInterLevelAd(_arg1:Function):void{
var _local3:Number;
super.ShowInterLevelAd(_arg1);
var _local2:int = this.iShowBanner;
if (this.iShowBanner == -1){
_local2 = 10;
};
iTimer = new Timer((_local2 * 1000), 1);
iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
iTimer.start();
bannerX = ((OGlobal.StageRect.width - bannerWidth) / 2);
if (flag_show_top){
yandexAdTop = addBanner(bannerX, bannerY);
};
if (flag_show_bottom){
_local3 = (OGlobal.StageRect.height - bannerY);
yandexAdBottom = addBanner(bannerX, _local3);
};
}
private function wrapper_errorHandler(_arg1:ErrorEvent):void{
trace("ErrorEvent", _arg1.text);
AdFinished();
}
private function wrapper_clickedHandler(_arg1:YandexDirectEvent):void{
trace("event", _arg1);
}
override public function ShowEndGameAd(_arg1:Function):void{
super.ShowEndGameAd(_arg1);
AdFinished();
}
protected function OnTimer(_arg1:TimerEvent=null):void{
if (this.iShowBanner != -1){
AdFinished();
} else {
if (iCbfnAdFinished != null){
iCbfnAdFinished();
iCbfnAdFinished = null;
};
};
}
private function yandexad_destroy():void{
var _local1:int;
if (flag_show_top){
if (((yandexAdTop) && (iApp.contains(yandexAdTop)))){
iApp.removeChild(yandexAdTop);
};
yandexAdTop = null;
};
if (flag_show_bottom){
if (((yandexAdBottom) && (iApp.contains(yandexAdBottom)))){
iApp.removeChild(yandexAdBottom);
};
yandexAdBottom = null;
};
}
override protected function AdFinished():void{
iTimer.stop();
iTimer.removeEventListener(TimerEvent.TIMER, OnTimer);
iTimer = null;
yandexad_destroy();
super.AdFinished();
}
override public function ShowPreGameAd(_arg1:Function):void{
var _local3:Number;
super.ShowPreGameAd(_arg1);
var _local2:int = this.iShowBanner;
if (this.iShowBanner == -1){
_local2 = 10;
};
iTimer = new Timer((_local2 * 1000), 1);
iTimer.addEventListener(TimerEvent.TIMER, OnTimer);
iTimer.start();
bannerX = ((OGlobal.StageRect.width - bannerWidth) / 2);
if (flag_show_top){
yandexAdTop = addBanner(bannerX, bannerY);
};
if (flag_show_bottom){
_local3 = (OGlobal.StageRect.height - bannerY);
yandexAdBottom = addBanner(bannerX, _local3);
};
}
override public function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void{
Security.allowDomain("an.yandex.ru");
super.Init(_arg1, _arg2);
flag_show_top = !((yandexAdArray.indexOf("top") == -1));
flag_show_bottom = !((yandexAdArray.indexOf("bottom") == -1));
}
private function addBanner(_arg1:Number=100, _arg2:Number=150):YandexDirectWrapper{
var _local3:String = ColorTheme.BLUE;
var _local4:YandexDirectWrapper = new YandexDirectWrapper(gameID, _local3);
_local4.setStatId(statID);
_local4.addEventListener(YandexDirectEvent.CLICKED, wrapper_clickedHandler);
_local4.addEventListener(ErrorEvent.ERROR, wrapper_errorHandler);
iApp.addChild(_local4);
_local4.width = bannerWidth;
_local4.x = _arg1;
_local4.y = _arg2;
_local4.run();
return (_local4);
}
}
}//package YandexAd
Section 175
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 176
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 177
//_advancedDataGridStylesStyle (_advancedDataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _advancedDataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".advancedDataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".advancedDataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 178
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 179
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.shadowDirection = "center";
this.fontWeight = "normal";
this.dropShadowEnabled = true;
this.leading = 0;
this.backgroundColor = 0xFFFFFF;
this.shadowDistance = 1;
this.cornerRadius = 0;
this.borderThickness = 0;
this.paddingLeft = 5;
this.paddingRight = 5;
};
};
}
}
}//package
Section 180
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 181
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.backgroundColor = 0xFFFFFF;
this.borderThickness = 0;
};
};
}
}
}//package
Section 182
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.borderStyle = "errorTipRight";
this.paddingTop = 4;
this.borderColor = 13510953;
this.color = 0xFFFFFF;
this.fontSize = 9;
this.shadowColor = 0;
this.paddingLeft = 4;
this.paddingBottom = 4;
this.paddingRight = 4;
};
};
}
}
}//package
Section 183
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fillColor = 0xFFFFFF;
this.kerning = false;
this.iconColor = 0x111111;
this.textRollOverColor = 2831164;
this.horizontalAlign = "left";
this.shadowCapColor = 14015965;
this.backgroundAlpha = 1;
this.filled = true;
this.textDecoration = "none";
this.roundedBottomCorners = true;
this.fontThickness = 0;
this.focusBlendMode = "normal";
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.horizontalGap = 8;
this.borderCapColor = 9542041;
this.buttonColor = 7305079;
this.indentation = 17;
this.selectionDisabledColor = 0xDDDDDD;
this.closeDuration = 250;
this.embedFonts = false;
this.paddingTop = 0;
this.letterSpacing = 0;
this.focusAlpha = 0.4;
this.bevel = true;
this.fontSize = 10;
this.shadowColor = 0xEEEEEE;
this.borderAlpha = 1;
this.paddingLeft = 0;
this.fontWeight = "normal";
this.indicatorGap = 14;
this.focusSkin = HaloFocusRect;
this.dropShadowEnabled = false;
this.leading = 2;
this.borderSkin = HaloBorder;
this.fontSharpness = 0;
this.modalTransparencyDuration = 100;
this.borderThickness = 1;
this.backgroundSize = "auto";
this.borderStyle = "inset";
this.borderColor = 12040892;
this.fontAntiAliasType = "advanced";
this.errorColor = 0xFF0000;
this.shadowDistance = 2;
this.horizontalGridLineColor = 0xF7F7F7;
this.stroked = false;
this.modalTransparencyColor = 0xDDDDDD;
this.cornerRadius = 0;
this.verticalAlign = "top";
this.textIndent = 0;
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.verticalGridLineColor = 14015965;
this.themeColor = 40447;
this.version = "3.0.0";
this.shadowDirection = "center";
this.modalTransparency = 0.5;
this.repeatInterval = 35;
this.openDuration = 250;
this.textAlign = "left";
this.fontFamily = "Verdana";
this.textSelectedColor = 2831164;
this.paddingBottom = 0;
this.strokeWidth = 1;
this.fontGridFitType = "pixel";
this.horizontalGridLines = false;
this.useRollOver = true;
this.verticalGridLines = true;
this.repeatDelay = 500;
this.fontStyle = "normal";
this.dropShadowColor = 0;
this.focusThickness = 2;
this.verticalGap = 6;
this.disabledColor = 11187123;
this.paddingRight = 0;
this.focusRoundedCorners = "tl tr bl br";
this.borderSides = "left top right bottom";
this.disabledIconColor = 0x999999;
this.modalTransparencyBlur = 3;
this.color = 734012;
this.selectionDuration = 250;
this.highlightAlphas = [0.3, 0];
};
};
}
}
}//package
Section 184
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 185
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 186
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingBottom = 2;
this.paddingRight = 2;
};
};
}
}
}//package
Section 187
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 0xFFFFFF;
this.backgroundColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderAlpha = 1;
};
};
}
}
}//package
Section 188
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.backgroundColor = 0xFFFFFF;
this.backgroundImage = "";
this.horizontalAlign = "left";
this.paddingLeft = 0;
this.paddingBottom = 0;
this.paddingRight = 0;
};
};
}
}
}//package
Section 189
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.textAlign = "left";
};
};
}
}
}//package
Section 190
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 191
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderStyle = "inset";
this.borderColor = 14015965;
this.highlightColor = 12897484;
this.backgroundColor = 0xFFFFFF;
this.shadowCapColor = 14015965;
this.shadowColor = 14015965;
this.paddingLeft = 5;
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.paddingRight = 5;
};
};
}
}
}//package
Section 192
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 193
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 194
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0xFFFFFF;
this.textAlign = "center";
};
};
}
}
}//package
Section 195
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 196
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 197
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 198
//Ad (Ad)
package {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class Ad implements IAd {
protected var iCbfnAdFinished:Function;
protected var iLastTime:int;
protected var bInit:Boolean;
protected var iLanguage:String;
protected var iDelay:uint;
protected var iShowState:Boolean;
protected var iRect:Rectangle;
protected var iApp:DisplayObjectContainer;
public function Ad(_arg1:uint=0){
iDelay = (_arg1 * 1000);
iLastTime = -1;
bInit = false;
}
public function KillAd():void{
if (iShowState){
AdFinished();
};
}
public function ShowInterLevelAd(_arg1:Function):void{
iLastTime = getTimer();
iShowState = true;
iCbfnAdFinished = _arg1;
}
public function ShowEndGameAd(_arg1:Function):void{
iLastTime = getTimer();
iShowState = true;
iCbfnAdFinished = _arg1;
}
protected function AdFinished():void{
trace("[Ad.as] -> AdFinished()");
iShowState = false;
if (iCbfnAdFinished != null){
iCbfnAdFinished();
iCbfnAdFinished = null;
};
}
public function ShowPreGameAd(_arg1:Function):void{
iLastTime = getTimer();
iShowState = true;
iCbfnAdFinished = _arg1;
}
public function GetName():String{
return ("");
}
public function getRect():Rectangle{
return (this.iRect);
}
public function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void{
this.iCbfnAdFinished = null;
this.KillAd();
this.iLanguage = _arg2;
bInit = true;
this.iApp = _arg1;
}
public function DelayComplete():Boolean{
if (iLastTime == -1){
return (true);
};
return (((getTimer() - iLastTime) >= iDelay));
}
}
}//package
Section 199
//AdManager (AdManager)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import it.gotoandplay.smartfoxserver.json.*;
import flash.net.*;
public class AdManager {
private const REQUEST_COMPLETE:String = "request-complete";
private const GET_LOCATION_SERVICE_URL:String = "http://wellgames.com/geo/";
private const REQUEST_ERROR:String = "request-error";
private const WAIT_REQUEST:String = "wait-request";
private const WAIT:int = 5000;
private const WAIT_FINISHED:String = "wait-finished";
private const FLASH_VARS_COMPLETE:String = "flash-vars-complete";
private var _endGameAdOpt:Array;
private var _location:String;// = "*"
private var _state:String;// = ""
private var _preGameAdOPt:Array;
private var _interGameAdOpt:Array;
private var _app:Sprite;
private var _callback:Function;
private var _interLevelAdResult:Array;
private var _endGameAdResult:Array;
private var _url:String;// = "*"
private var _preGameAdResult:Array;
public function AdManager(_arg1:Array=null, _arg2:Array=null, _arg3:Array=null){
_preGameAdOPt = (_arg1) ? _arg1 : [];
_interGameAdOpt = (_arg2) ? _arg2 : [];
_endGameAdOpt = (_arg3) ? _arg3 : [];
}
private function makeRequest():void{
var _local1:URLLoader = new URLLoader();
_local1.addEventListener(Event.COMPLETE, onLocationComplete);
_local1.addEventListener(IOErrorEvent.IO_ERROR, onError);
_local1.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
_local1.load(new URLRequest(GET_LOCATION_SERVICE_URL));
}
private function startTimer():void{
var _local1:Timer = new Timer(WAIT);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, onTimer);
_local1.start();
}
private function getFlashVars():Boolean{
var _local1:Object = _app.loaderInfo.parameters;
if (_local1.hasOwnProperty("location")){
_location = _local1["location"];
trace(("_location = " + _location));
return (true);
};
if ((((_url.indexOf("absolutist.com") == -1)) && ((_url.indexOf("wellgames.com") == -1)))){
_location = "*";
trace(("_location = " + _location));
return (true);
};
return (false);
}
private function onLocationComplete(_arg1:Event):void{
var _local2:URLLoader = (_arg1.target as URLLoader);
if (_state == WAIT_REQUEST){
_state = REQUEST_COMPLETE;
trace(_state);
_location = JSON.decode((_local2.data as String)).country;
trace(("_location = " + _location));
configurateAdArrays();
};
}
private function getAdList(_arg1:Array):Array{
var _local2:Array;
var _local3:int;
var _local4:Array;
var _local5:Array;
var _local6:Array;
for each (_local2 in _arg1) {
_local3 = 0;
_local4 = _local2[0];
_local5 = _local2[1];
_local6 = _local2[2];
_local3 = 0;
while (_local3 < _local4.length) {
if (((!((_url.indexOf(_local4[_local3]) == -1))) && (!((_local5.indexOf(_location) == -1))))){
return (_local6);
};
_local3++;
};
};
for each (_local2 in _arg1) {
_local4 = _local2[0];
_local5 = _local2[1];
_local6 = _local2[2];
if (((!((_local4.indexOf("*") == -1))) && (!((_local5.indexOf("*") == -1))))){
return (_local6);
};
};
return ([]);
}
public function get endGameAd():Array{
return (_endGameAdResult);
}
public function get interLevelAd():Array{
return (_interLevelAdResult);
}
private function onTimer(_arg1:TimerEvent):void{
var _local2:Timer = (_arg1.target as Timer);
_local2.stop();
_local2.removeEventListener(TimerEvent.TIMER_COMPLETE, onTimer);
if (_state == WAIT_REQUEST){
_state = WAIT_FINISHED;
trace(_state);
configurateAdArrays();
};
}
private function onError(_arg1:Event):void{
switch (_arg1.type){
case IOErrorEvent.IO_ERROR:
break;
case SecurityErrorEvent.SECURITY_ERROR:
break;
};
if (_state == WAIT_REQUEST){
_state = REQUEST_ERROR;
trace(_state);
configurateAdArrays();
};
}
private function configurateAdArrays():void{
_preGameAdResult = getAdList(_preGameAdOPt);
_interLevelAdResult = getAdList(_interGameAdOpt);
_endGameAdResult = getAdList(_endGameAdOpt);
_callback();
}
public function getLocation(_arg1:Sprite, _arg2:Function):void{
_app = _arg1;
_callback = _arg2;
_url = new LocalConnection().domain;
trace(("_url new = " + _url));
if (getFlashVars()){
_state = FLASH_VARS_COMPLETE;
trace(_state);
configurateAdArrays();
} else {
_state = WAIT_REQUEST;
trace(_state);
makeRequest();
};
}
public function get preGameAd():Array{
return (_preGameAdResult);
}
}
}//package
Section 200
//AdNames (AdNames)
package {
public class AdNames {
public static const AD_CPMSTAR:String = "cpmstar";
public static const AD_WELLGAMES:String = "wellgames";
public static const AD_ALFY:String = "alfy";
public static const AD_MOCHI:String = "mochi";
}
}//package
Section 201
//AdRotator (AdRotator)
package {
import flash.display.*;
import flash.geom.*;
public class AdRotator {
private var iCurPreGameAd:Ad;
private var iPreGameAds:AdsList;
private var iCurInterLevelAd:Ad;
private var iEndGameAds:AdsList;
private var iLanguage:String;
private var iCurEndGameAd:Ad;
private var iInterLevelAds:AdsList;
public function AdRotator(_arg1:Array=null, _arg2:Array=null, _arg3:Array=null){
iPreGameAds = new AdsList(_arg1);
iInterLevelAds = new AdsList(_arg2);
iEndGameAds = new AdsList(_arg3);
this.iLanguage = "en";
}
public function getInterLevelRect():Rectangle{
if (this.iCurInterLevelAd == null){
return (null);
};
return (this.iCurInterLevelAd.getRect());
}
public function KillEndGameAd():void{
if (iCurEndGameAd){
iCurEndGameAd.KillAd();
};
}
public function GetNameInterLevelAD():String{
if (this.iCurInterLevelAd == null){
return ("");
};
return (this.iCurInterLevelAd.GetName());
}
public function ShowInterLevelAd(_arg1:Function=null):void{
if (((iInterLevelAds.Valid) && (iInterLevelAds.SetAd()))){
iCurInterLevelAd = iInterLevelAds.CurAd;
iCurInterLevelAd.ShowInterLevelAd(_arg1);
iInterLevelAds.NextAd();
} else {
if (_arg1 != null){
_arg1();
};
};
}
public function KillInterLevelAd():void{
if (iCurInterLevelAd){
iCurInterLevelAd.KillAd();
};
}
public function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void{
this.iLanguage = _arg2;
if (iPreGameAds.Valid){
iPreGameAds.Init(_arg1, _arg2);
};
if (iInterLevelAds.Valid){
iInterLevelAds.Init(_arg1, _arg2);
};
if (iEndGameAds.Valid){
iEndGameAds.Init(_arg1, _arg2);
};
}
public function ShowEndGameAd(_arg1:Function=null):void{
if (((iEndGameAds.Valid) && (iEndGameAds.SetAd()))){
iCurEndGameAd = iEndGameAds.CurAd;
iCurEndGameAd.ShowEndGameAd(_arg1);
iEndGameAds.NextAd();
} else {
if (_arg1 != null){
_arg1();
};
};
}
public function ShowPreGameAd(_arg1:Function=null):void{
if (((iPreGameAds.Valid) && (iPreGameAds.SetAd()))){
iCurPreGameAd = iPreGameAds.CurAd;
iCurPreGameAd.ShowPreGameAd(_arg1);
iPreGameAds.NextAd();
} else {
if (_arg1 != null){
_arg1();
};
};
}
public function KillPreGameAd():void{
if (iCurPreGameAd){
iCurPreGameAd.KillAd();
};
}
}
}//package
Section 202
//AdsList (AdsList)
package {
import flash.display.*;
public class AdsList {
private var iAds:Array;
private var iCurIndex:int;
public function AdsList(_arg1:Array){
iAds = _arg1;
iCurIndex = 0;
}
public function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void{
var _local3:Ad;
for each (_local3 in iAds) {
_local3.Init(_arg1, _arg2);
};
}
public function SetAd():Boolean{
var _local1:Boolean;
var _local2:int = iCurIndex;
while (true) {
if (!CurAd.DelayComplete()){
NextAd();
if (_local2 == iCurIndex){
break;
};
} else {
_local1 = true;
break;
};
};
return (_local1);
}
public function get CurAd():Ad{
return (iAds[iCurIndex]);
}
public function get Valid():Boolean{
return (((iAds) && ((iAds.length > 0))));
}
public function NextAd():void{
if (++iCurIndex == iAds.length){
iCurIndex = 0;
};
}
}
}//package
Section 203
//Clusterz (Clusterz)
package {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import flash.geom.*;
import MAIN.OBJECTS.*;
import ENGINE.CORE.*;
import flash.system.*;
import MAIN.UTIL.*;
import MAIN.WINDOWS.*;
import flash.net.*;
import ENGINE.SMARTFOX.*;
import ENGINE.AD.*;
import flash.ui.*;
public class Clusterz extends OApplication {
public var iBang:OBang;
public var iLayerWindow:Sprite;
private var iShowDemo:Boolean;// = true
public var iLayerAPI:MovieClip;
public var iPanelSysButtons:SPanelSysButtons;
private var iSystem:OSystem;
private var iWindow:OWindow;
public static const stNormal:int = 0;
public static const stInstruction:int = 1;
private static var musicStartPlay:Boolean = false;
public function Clusterz(){
var myContextMenu:ContextMenu;
var menuSelectHandler:Function;
var menuItemSelectHandler:Function;
menuSelectHandler = function (_arg1:ContextMenuEvent):void{
};
menuItemSelectHandler = function (_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest("http://www.wellgames.com/?ContextMenu"));
};
super("Clusterz");
if (UI.iGAME.prPlayerName == ""){
trace(("Use Language -> " + SConfig.language));
} else {
trace(("Restore Language -> " + UI.iGAME.prLang));
if (UI.iGAME.prLang != null){
SConfig.language = UI.iGAME.prLang;
};
SConfigLoader.ValidLanguage();
};
UI.ReInit();
UI.iGAME;
OSound.PlayListAdd("music.mp3");
var item:ContextMenuItem = new ContextMenuItem("MoreGame: Wellgames.com");
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
myContextMenu.builtInItems.quality = true;
myContextMenu.customItems.push(item);
this.contextMenu = myContextMenu;
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);
myContextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, menuSelectHandler);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg1 == null){
this.prMenuItem = _arg2;
};
}
private function InitGame():void{
this.prMenuItem = UI.miIntro;
this.OnMenuItem();
iLayerAPI.x = (-130 * OGlobal.Scale);
iLayerAPI.y = (20 * OGlobal.Scale);
iLayerAPI.visible = true;
if (!musicStartPlay){
OSound.PlayMusic();
musicStartPlay = true;
};
}
override protected function OnDeactivate(_arg1:Event):void{
super.OnDeactivate(_arg1);
if (iPanelSysButtons){
iPanelSysButtons.RefreshButtonSound();
};
UI.iGAME.SaveCache();
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
if ((((this.iWindow is OWMenu)) || ((this.iWindow is OWIntro)))){
if (Math.random() < 0.02){
this.iBang.MakeFirework0();
};
};
UI.iMP.OnEnterFrame();
if (UI.sDebug){
OSystem.iUserText1 = (((((((((" : " + UI.iMP.State.toString()) + " : ") + UI.iMP.prActiveRoomID.toString()) + " ") + UI.iMP.prPlayerID.toString()) + " : ") + UI.iMP.prError) + " : ") + OGlobal.Domain);
};
if (this.iWindow){
if (this.iWindow.prAnimation){
return;
};
if (!this.iWindow.prVisible){
if (this.iLayerWindow.contains(this.iWindow)){
this.iLayerWindow.removeChild(this.iWindow);
};
this.iWindow.Free();
this.iWindow = null;
this.OnMenuItem();
} else {
if (!this.iWindow.prActive){
this.OnMenuItem();
};
};
};
if ((((State == stNormal)) && (iBang))){
iBang.OnEnterFrame(null);
};
}
public function CloseAllWindows():void{
var _local1:int;
var _local2:OWindow;
var _local3:Array;
_local3 = new Array();
_local1 = 0;
while (_local1 < this.iLayerWindow.numChildren) {
if ((this.iLayerWindow.getChildAt(_local1) is OWindow)){
_local3.push(this.iLayerWindow.getChildAt(_local1));
};
_local1++;
};
_local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local3[_local1];
_local2.Free();
if (_local1 != (_local3.length - 1)){
this.iLayerWindow.removeChild(_local2);
} else {
_local2.prVisible = false;
};
_local1++;
};
this.iLayerWindow.addChild(iBang);
iLayerAPI.visible = true;
}
private function MakeBackgroundImage():BitmapData{
var _local1:Sprite = new Sprite();
var _local2:Matrix = new Matrix();
var _local3:int = OGlobal.StageRect.height;
_local2.createGradientBox(50, _local3, (Math.PI / 2));
_local1.graphics.beginGradientFill(GradientType.LINEAR, [4954918, 12709283], [1, 1], [0, 0xFF], _local2);
_local1.graphics.drawRect(0, 0, 50, _local3);
var _local4:BitmapData = new BitmapData(50, _local3, false, 0);
_local4.draw(_local1);
return (_local4);
}
override protected function OnActivate(_arg1:Event):void{
super.OnActivate(_arg1);
if (iPanelSysButtons){
iPanelSysButtons.RefreshButtonSound();
};
}
override public function Init():void{
if (((((!(this.stage)) || ((this.stage.stageHeight == 0)))) || ((this.stage.stageWidth == 0)))){
return;
};
this.InitBackground([this.MakeBackgroundImage()], 0);
if (UI.sDebug){
this.iSystem = new OSystem();
this.addChild(this.iSystem);
};
this.InitImageCache();
super.Init();
Partner.initAlfyAd();
if (UI.iGAME.prPlayerName == ""){
this.prMenuItem = UI.miIntro;
} else {
this.prMenuItem = UI.miIntro;
};
if (this.iLayerWindow != null){
if (this.iLayerWindow.parent != null){
this.iLayerWindow.parent.removeChild(this.iLayerWindow);
};
this.iLayerWindow = null;
};
if (this.iPanelSysButtons != null){
this.iPanelSysButtons.Free();
if (this.iPanelSysButtons.parent != null){
this.removeChild(this.iPanelSysButtons);
};
this.iPanelSysButtons = null;
};
this.iLayerWindow = (this.addChild(new Sprite()) as Sprite);
if (this.iLayerAPI == null){
this.iLayerAPI = (this.addChild(new MovieClip()) as MovieClip);
} else {
this.addChild(this.iLayerAPI);
};
this.iPanelSysButtons = new SPanelSysButtons();
this.iPanelSysButtons.x = ((690 + 24) * OGlobal.Scale);
this.iPanelSysButtons.y = (0 * OGlobal.Scale);
this.addChild(this.iPanelSysButtons);
this.iPanelSysButtons.visible = false;
iLayerAPI.x = (0 * OGlobal.Scale);
iLayerAPI.y = (0 * OGlobal.Scale);
OAds.InitAd(this, InitAd);
this.iBang = new OBang();
this.iLayerWindow.addChild(this.iBang);
}
override protected function OnMenuItem():void{
var _local2:OWHighScores;
var _local1:int = this.prMenuItem;
if (_local1 != UI.miInstructions){
State = stNormal;
};
switch (_local1){
case UI.miNullWindow:
return;
case UI.miLastWindow:
this.iWindow = this.getTopWindow();
if (this.iWindow){
this.iWindow.prActive = true;
return;
};
this.iWindow = new OWMenu();
this.prMenuItem = UI.miNullWindow;
break;
case UI.miIntro:
this.iWindow = new OWIntro();
if (UI.iGAME.prPlayerName == ""){
this.prMenuItem = UI.miEnterNameFirst;
} else {
this.prMenuItem = UI.miMenu;
};
break;
case UI.miEnterNameFirst:
this.iWindow = new OWEnterName(false);
this.prMenuItem = UI.miMenu;
break;
case UI.miEnterNewName:
this.iWindow = new OWEnterName(true);
(this.iWindow as OWEnterName).prName = "";
this.prMenuItem = UI.miLastWindow;
break;
case UI.miMenu:
if (UI.iGAME.prPlayerName == ""){
this.prMenuItem = UI.miEnterNameFirst;
this.OnMenuItem();
return;
};
if (this.iPanelSysButtons != null){
this.iPanelSysButtons.visible = true;
this.iPanelSysButtons.btn_fullscreen.visible = true;
};
iShowDemo = true;
switch (UI.iMP.State){
case OMultiplayer.stNone:
UI.iMP.Init(UI.sDomain, UI.sServer, UI.sZone, UI.sXTName, UI.iGAME.prPlayerName);
break;
case OMultiplayer.stConnectionError:
if (UI.iMP.prErrorsCount < 5){
UI.iMP.State = OMultiplayer.stNone;
UI.iMP.Init(UI.sDomain, UI.sServer, UI.sZone, UI.sXTName, UI.iGAME.prPlayerName);
};
break;
};
this.iWindow = new OWMenu();
this.prMenuItem = UI.miNullWindow;
break;
case UI.miCommingSoon:
this.iWindow = new OAlert(UI.OWCommingSoon, null);
this.prMenuItem = UI.miLastWindow;
break;
case UI.miChoosePlayer:
this.iWindow = new OWChoosePlayer();
this.prMenuItem = UI.miMenu;
break;
case UI.miDeletePlayerConfirm:
this.iWindow = new OAlert(UI.OWDeletePlayerConfirm, [UI.miDeletePlayer, UI.miLastWindow]);
this.prMenuItem = UI.miLastWindow;
break;
case UI.miDeletePlayer:
UI.iGAME.DeletePlayer(UI.iGAME.prPlayerName);
if (UI.iGAME.prPlayerName != ""){
this.OnMenuItem();
return;
};
if (iPanelSysButtons != null){
iPanelSysButtons.btn_fullscreen.visible = false;
};
this.iWindow = new OWEnterName(false);
this.prMenuItem = UI.miLastWindow;
break;
case UI.miOptions:
this.iWindow = new OWOptions();
this.prMenuItem = UI.miLastWindow;
break;
case UI.miHighScores:
this.iWindow = new OWHighScores();
this.prMenuItem = UI.miLastWindow;
break;
case UI.miDeleteScoresConfirm:
this.iWindow = new OAlert(UI.OWDeleteScoresConfirm, [UI.miDeleteScores, UI.miLastWindow]);
this.prMenuItem = UI.miLastWindow;
break;
case UI.miDeleteScores:
_local2 = (this.getTopWindow() as OWHighScores);
if (_local2.iTable.prValue == 0){
UI.iGAME.ClearLocalScores(0);
} else {
UI.iGAME.ClearPersonalScores(0);
};
this.OnMenuItem();
return;
case UI.miPlayGame:
if ((((UI.iGAME.prLevel > 0)) || (!(iShowDemo)))){
UI.iGAME.Start();
this.iBang.Clear();
this.iWindow = new OWGame(this.iBang, this.iLayerWindow.getChildIndex(this.iBang), false);
this.prMenuItem = UI.miMenu;
} else {
this.State = stInstruction;
this.iWindow = new OWInstructions();
this.iShowDemo = false;
this.prMenuItem = UI.miPlayGame;
};
break;
case UI.miInstructions:
this.State = stInstruction;
this.iWindow = new OWInstructions();
this.prMenuItem = UI.miLastWindow;
break;
case UI.miInGameMenu:
this.iWindow = new OWInGameMenu();
this.prMenuItem = UI.miLastWindow;
break;
case UI.miLanguage:
this.iWindow = new OWLanguage();
this.prMenuItem = UI.miLastWindow;
break;
};
this.iLayerWindow.addChild(this.iWindow);
}
public function InitAd(_arg1:Boolean=true):void{
Partner.iAdRotator.Init(this.iLayerAPI, SConfig.language);
if (_arg1){
Partner.iAdRotator.ShowPreGameAd(this.InitGame);
};
}
public function getTopWindow():OWindow{
var _local1:DisplayObject;
var _local2:OWindow;
if (this.iLayerWindow.numChildren > 0){
_local1 = this.iLayerWindow.getChildAt((this.iLayerWindow.numChildren - 1));
};
_local2 = ((_local1 is OWindow)) ? (_local1 as OWindow) : null;
return (_local2);
}
private function InitImageCache():void{
var _local1:Number;
var _local2:int;
UI.iCache = new OCache();
var _local3:int;
_local1 = 2;
while (_local1 <= 20) {
_local2 = 0;
while (_local2 < OBubble.iColorsCount) {
UI.iCache.SetArrItem("Bubble", _local3, OBubble.MakeBubble([null, (_local1 * 0.97), ((_local1 / 91) * 3), _local2]));
_local3++;
_local2++;
};
_local1 = (_local1 + 0.5);
};
_local3 = 0;
_local1 = 2;
while (_local1 <= 20) {
_local2 = 0;
while (_local2 < OBubble.iColorsCount) {
UI.iCache.SetArrItem("Shadow", _local3, OBubble.MakeShadow([null, _local1, ((_local1 / 91) * 3), _local2]));
_local3++;
_local2++;
};
_local1 = (_local1 + 0.5);
};
}
}
}//package
Section 204
//GL (GL)
package {
import ENGINE.DISPLAY.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import flash.geom.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.INTERFACE.ELEMENTS.*;
import flash.text.*;
import ENGINE.DISPLAY.EFFECTS.*;
import MAIN.UTIL.*;
import ENGINE.SKIN.*;
public class GL {
public static var iRegistered:Boolean = GL.Register();
public static function ListBoxText(_arg1:Array):OListBox{
var _local2:Number = (_arg1[1] + 80);
var _local3:Number = ((_arg1[2] * _arg1[5]) + 30);
var _local4:Array = [[GL.SmallBorder, _local2, _local3, _arg1[3], 0, 0, null, 0, true], [GL.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], UI.OIUp, "text 60", 1, (_local2 - 50), 20, "iUp", 0, false], [GL.MakeSpriteButton, 30, 30, _arg1[3], _arg1[4], UI.OIDown, "text 60", 1, (_local2 - 50), (_local3 - 50), "iDown", 0, false]];
var _local5:Array = [GL.ListBoxTextElement, _arg1[1], _arg1[2], _arg1[3], "w", _arg1[4], 0, 0];
var _local6:Array = new Array(_arg1[5]);
var _local7:int;
while (_local7 < _arg1[5]) {
_local6[_local7] = [15, ((_local7 * _arg1[2]) + 15)];
_local7++;
};
var _local8:OListBox = new OListBox(_local4, _local5, GL.ListBoxTextElementP, _local6, null);
_local8.iUp.prAnimatorParams = OInterface.iDefLBButtonAnimators;
_local8.iDown.prAnimatorParams = OInterface.iDefLBButtonAnimators;
_local8.prLBParams = _arg1[6];
_local8.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8]));
return (_local8);
}
private static function Register():Boolean{
OEffects.RegisterEffect("GEL", new OEffectGel());
OEffects.RegisterColor("GEL", "red", {iCH:0, iCS:0.5, iCB:1, iSH:345, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "red1", {iCH:30, iCS:0.5, iCB:1, iSH:45, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "yellow", {iCH:60, iCS:0.6, iCB:1, iSH:45, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "yellow1", {iCH:90, iCS:0.6, iCB:1, iSH:105, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "green", {iCH:120, iCS:0.5, iCB:1, iSH:105, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "green1", {iCH:150, iCS:0.5, iCB:1, iSH:165, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "aqua", {iCH:180, iCS:0.4, iCB:1, iSH:165, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "aqua1", {iCH:210, iCS:0.4, iCB:1, iSH:225, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "blue", {iCH:240, iCS:0.3, iCB:1, iSH:225, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "blue1", {iCH:270, iCS:0.3, iCB:1, iSH:295, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "magenta", {iCH:300, iCS:0.4, iCB:1, iSH:295, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "magenta1", {iCH:330, iCS:0.4, iCB:1, iSH:345, iSS:0.9, iSB:0.6});
OEffects.RegisterColor("GEL", "white", {iCH:0, iCS:0, iCB:0.97, iSH:0, iSS:0, iSB:0.7});
OEffects.RegisterFilter("GEL", "bpanel", {iBorder:24, iAngle:90, iF0SD:16, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2});
OEffects.RegisterFilter("GEL", "text 18", {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 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", "border1", {iBorder:8, iAngle:60, iF0SD:12, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2});
OEffects.RegisterFilter("GEL", "bpanel ns", {iBorder:8, iAngle:90, iF0SD:0, iF0SB:11, iF1SD:16, iF1SB:23, iF1GB:8, iF1GA:0.5, iF2GGD1:-4, iF2GGB1:18, iF2GGC1:230, iF2GGD2:4, iF2GGB2:16, iF2GGC2:170, iF2B:2});
OEffects.RegisterFilter("GEL", "spanel ns", {iBorder:16, iAngle:90, iF0SD:0, iF0SB:16, iF1SD:12, iF1SB:16, iF1GB:6, iF1GA:0.5, iF2GGD1:-2, iF2GGB1:14, iF2GGC1:230, iF2GGD2:4, iF2GGB2:12, iF2GGC2:180, iF2B:2});
OEffects.RegisterFilter("GEL", "border ns", {iBorder:8, iAngle:60, iF0SD:0, iF0SB:6, iF1SD:6, iF1SB:4, iF1GB:2, iF1GA:0.25, iF2GGD1:0.2, iF2GGB1:3, iF2GGC1:240, iF2GGD2:3, iF2GGB2:4, iF2GGC2:150, iF2B:2});
return (true);
}
public static function MakeSpriteButton(_arg1:Array):OButton{
var _local2:Array = [[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]];
var _local3:OButton = 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 ListBoxTextElement(_arg1:Array):OListBoxElement{
var _local2:Number = (_arg1[2] - 10);
if (_local2 < 30){
_local2 = 30;
};
var _local3:Number = Math.round((1 + (_local2 / 70)));
var _local4:String = ("text " + String(Math.max(30, Math.min((Math.round((_local2 / 10)) * 10), 90))));
var _local5:Array = [[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, UI.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]];
var _local6:OListBoxElement = 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 = Math.round((1 + (_arg1[5] / 70)));
var _local3:String = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[5] / 10)) * 10), 90))));
var _local4:Array = [[ODisplay.OBitmapTextInRect, UI.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]];
var _local5:OButton = 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 = Math.round((1 + (_arg1[1] / 70)));
var _local3:String = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[1] / 10)) * 10), 90))));
return (ODisplay.OBitmapText([null, UI.OFont, _arg1[1], _local2, _arg1[3], "GEL", _arg1[2], _local3, 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])]));
}
public static function InvisibleButton(_arg1:Array):OButton{
var _local2:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (_arg1[1] * OGlobal.Scale), (_arg1[2] * OGlobal.Scale)]], 0, 0, "iHit", 0, false]];
var _local3:OButton = new OButton(_local2, OAnimatorManager.iNullAnimators);
_local3.Pos(OGlobal.ScaleFloor(_arg1[3]), OGlobal.ScaleFloor(_arg1[4]));
_local3.prVisible = true;
_local3.prActive = true;
return (_local3);
}
public static function MakeTextButton(_arg1:Array):OButton{
var _local2:Number = Math.round((1 + (_arg1[5] / 70)));
var _local3:String = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[5] / 10)) * 10), 90))));
var _local4:Number = ((_arg1[2] <= 60)) ? 1 : 1.2;
var _local5:Array = [[ODisplay.OBitmapRoundFrameText, _arg1[1], _arg1[2], _arg1[2], 5, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", _local4, UI.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]];
var _local6:OButton = new OButton(_local5);
_local6.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8]));
return (_local6);
}
public static function ColorText(_arg1:Array):OIObject{
var _local11:String;
var _local12:Rectangle;
var _local2:Number = Math.round((1 + (_arg1[1] / 70)));
var _local3:String = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[1] / 10)) * 10), 90))));
var _local4:Sprite = ((UI.OFont is Sprite)) ? (UI.OFont as Sprite) : new ((UI.OFont as Class));
if (!(_local4.getChildAt(0) is TextField)){
return (null);
};
var _local5:TextField = (_local4.getChildAt(0) as TextField);
_local5.autoSize = TextFieldAutoSize.LEFT;
_local5.text = _arg1[3];
var _local6:TextFormat = _local5.defaultTextFormat;
_local6.size = _arg1[1];
_local6.letterSpacing = _local2;
_local5.setTextFormat(_local6);
var _local7:Array = new Array();
var _local8:int;
var _local9:int;
while (_local9 < _local5.length) {
_local11 = _arg1[3].substr(_local9, 1);
if (_local11 == " "){
} else {
if (_local11 == "\n"){
} else {
_local12 = _local5.getCharBoundaries(_local9);
var _temp1 = _local8;
_local8 = (_local8 + 1);
_local7.push([ODisplay.OBitmapMake, [ODisplay.SpriteText, UI.OFont, _arg1[1], _local2, _local11], 1, "GEL", _arg1[2][(_temp1 % _arg1[2].length)], _local3, 1, _local12.x, _local12.y, null, 0, true]);
};
};
_local9++;
};
var _local10:OIObject = new OIObject(_local7, _arg1[4]);
_local10.Pos(OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6]));
return (_local10);
}
public static function TextSmallFrame(_arg1:Array):OBitmap{
var _local2:Number = Math.round((1 + (_arg1[4] / 70)));
var _local3:String = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[4] / 10)) * 10), 90))));
return (ODisplay.OBitmapRoundFrameText([null, _arg1[1], _arg1[2], 24, 5, "GEL", _arg1[3], "border", 1, _arg1[3], "spanel ns", 1, UI.OFont, _arg1[4], _local2, _arg1[5], "GEL", _arg1[6], _local3, 1, OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8])]));
}
public static function BigFrame(_arg1:Array):OBitmap{
return (ODisplay.OBitmapRoundFrame([null, _arg1[1], _arg1[2], 64, 8, "GEL", _arg1[3], "border", 1, _arg1[4], "spanel ns", 1, OGlobal.ScaleFloor(_arg1[5]), OGlobal.ScaleFloor(_arg1[6])]));
}
public static function ListBoxTextElementP(_arg1:Array, _arg2:String):void{
_arg1[4] = _arg2;
}
public static function ListBoxTextHSlider(_arg1:Array):OListBox{
var _local2:Number = _arg1[6];
var _local3:Number = Math.round((1 + (_local2 / 70)));
var _local4:String = ("text " + String(Math.max(30, Math.min((Math.round((_local2 / 10)) * 10), 90))));
var _local5:Rectangle = ODisplay.TextRect(UI.OFont, _local2, _local3, _arg1[8]);
var _local6:Number = (_arg1[6] - 10);
var _local7:Array = (_arg1[4]) ? [[GL.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array();
var _local8:Array = [[ODisplay.OBitmapText, UI.OFont, _local2, _local3, _arg1[8], "GEL", _arg1[3], _local4, 1, 15, ((_arg1[2] - _local5.height) * 0.5), null, 0, true], [GL.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], UI.OILeft, "text 60", 1, ((_arg1[1] - _arg1[5]) - 75), ((_arg1[2] - _local6) * 0.5), "iUp", 0, false], [GL.MakeSpriteButton, _local6, _local6, _arg1[3], _arg1[4], UI.OIRight, "text 60", 1, (_arg1[1] - 45), ((_arg1[2] - _local6) * 0.5), "iDown", 0, false]];
_local7 = _local7.concat(_local8);
var _local9:Array = [GL.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[7], "w", _arg1[7], 0, 0];
var _local10:Array = [[((_arg1[1] - 45) - _arg1[5]), ((_arg1[2] - _arg1[6]) * 0.5)]];
var _local11:OListBox = new OListBox(_local7, _local9, GL.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 _local13:String;
var _local14:Rectangle;
var _local2:Number = Math.round((1 + (_arg1[2] / 70)));
var _local3:String = ("text " + String(Math.max(30, Math.min((Math.round((_arg1[2] / 10)) * 10), 90))));
var _local4:Sprite = ((UI.OFont is Sprite)) ? (UI.OFont as Sprite) : new ((UI.OFont as Class));
if (!(_local4.getChildAt(0) is TextField)){
return (null);
};
var _local5:TextField = (_local4.getChildAt(0) as TextField);
_local5.autoSize = TextFieldAutoSize.LEFT;
_local5.text = _arg1[4];
var _local6:TextFormat = _local5.defaultTextFormat;
_local6.size = _arg1[2];
_local6.letterSpacing = _local2;
_local5.setTextFormat(_local6);
var _local7:Rectangle = _local5.getBounds(_local4);
var _local8:Number = ((_arg1[1] - _local7.width) / 2);
var _local9:Array = new Array();
var _local10:int;
var _local11:int;
while (_local11 < _local5.length) {
_local13 = _arg1[4].substr(_local11, 1);
if (_local13 == " "){
} else {
if (_local13 == "\n"){
} else {
_local14 = _local5.getCharBoundaries(_local11);
var _temp1 = _local10;
_local10 = (_local10 + 1);
_local9.push([ODisplay.OBitmapMake, [ODisplay.SpriteText, UI.OFont, _arg1[2], _local2, _local13], 1, "GEL", _arg1[3][_temp1], _local3, 1, (_local14.x + _local8), _local14.y, null, 0, true]);
};
};
_local11++;
};
var _local12:OIObject = 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 = Math.round((1 + (_arg1[2] / 70)));
var _local3:String = ("text " + String(Math.min((Math.round((_arg1[2] / 10)) * 10), 90)));
return (ODisplay.OBitmapTextAlign([null, UI.OFont, _arg1[3], _local2, _arg1[5], _arg1[6], _arg1[7], "GEL", _arg1[4], _local3, 1, _arg1[1], _arg1[2], OGlobal.ScaleFloor(_arg1[8]), OGlobal.ScaleFloor(_arg1[9])]));
}
public static function SmallBorder(_arg1:Array):OBitmap{
return (ODisplay.OBitmapRoundBorder([null, _arg1[1], _arg1[2], 24, 6, "GEL", _arg1[3], "border", 1, OGlobal.ScaleFloor(_arg1[4]), OGlobal.ScaleFloor(_arg1[5])]));
}
public static function Header(_arg1:Array):OBitmap{
var _local2:Number = Math.round((1 + (_arg1[2] / 70)));
var _local3:String = ("text " + String(Math.min((Math.round((_arg1[2] / 10)) * 10), 90)));
return (ODisplay.OBitmapTextInRect([null, UI.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 = _arg1[6];
var _local3:Number = Math.round((1 + (_local2 / 70)));
var _local4:String = ("text " + String(Math.max(30, Math.min((Math.round((_local2 / 10)) * 10), 90))));
var _local5:Rectangle = ODisplay.TextRect(UI.OFont, _local2, _local3, _arg1[9]);
var _local6:Array = [[((_arg1[1] - _arg1[5]) * 0.5), _arg1[7]]];
var _local7:Number = (_arg1[6] - 10);
var _local8:Number = (_local6[0][1] + ((_arg1[6] - _local7) * 0.5));
var _local9:Array = (_arg1[4]) ? [[GL.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true]] : new Array();
var _local10:Array = [[ODisplay.OBitmapText, UI.OFont, _local2, _local3, _arg1[9], "GEL", _arg1[3], _local4, 1, ((_arg1[1] - _local5.width) * 0.5), _arg1[10], null, 0, true], [GL.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], UI.OILeft, "text 60", 1, (_local6[0][0] - _local7), _local8, "iUp", 0, false], [GL.MakeSpriteButton, _local7, _local7, _arg1[3], _arg1[4], UI.OIRight, "text 60", 1, (_local6[0][0] + _arg1[5]), _local8, "iDown", 0, false]];
_local9 = _local9.concat(_local10);
var _local11:Array = [GL.ListBoxTextElement, _arg1[5], _arg1[6], _arg1[8], "w", _arg1[8], 0, 0];
var _local12:OListBox = new OListBox(_local9, _local11, GL.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 = [[GL.SmallBorder, _arg1[1], _arg1[2], _arg1[3], 0, 0, null, 0, true], [OInterface.OInputTextFieldMake, (_arg1[1] - 10), (_arg1[2] - 10), UI.OFont, (_arg1[2] - 30), 1, false, _arg1[5], _arg1[4], _arg1[6], 5, 8, "iText", 0, true]];
var _local3:OInput = new OInput(_local2);
_local3.Pos(OGlobal.ScaleFloor(_arg1[7]), OGlobal.ScaleFloor(_arg1[8]));
return (_local3);
}
public static function MakeImageButton(_arg1:Array):OButton{
var _local2:SButtonBitmap;
var _local3:Number = (new (_arg1[6][0]).width / new (_arg1[6][0]).height);
_local2 = new SButtonBitmap(_arg1[1], _arg1[2], _arg1[6][0], _arg1[6][1], _arg1[6][2], _arg1[3], _arg1[4], _arg1[5]);
_local2.Pos(_arg1[7], _arg1[8]);
return (_local2);
}
}
}//package
Section 205
//IAd (IAd)
package {
import flash.display.*;
public interface IAd {
function Init(_arg1:DisplayObjectContainer, _arg2:String="en"):void;
function KillAd():void;
function ShowEndGameAd(_arg1:Function):void;
function GetName():String;
function ShowPreGameAd(_arg1:Function):void;
function ShowInterLevelAd(_arg1:Function):void;
}
}//package
Section 206
//LibraryDefault (LibraryDefault)
package {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import MAIN.UTIL.*;
public class LibraryDefault {
public static var sLang:String = "EN";
public static var miPlayGame:int = 14;
public static var OWLanguageParam:Array;
public static var miEnterNewName:int = 4;
public static var miGameNew:int = 15;
public static var miNullWindow:int = 0;
public static var sDomain:String = "wellgames.com";
public static var strSite:String = "WELLGAMES.COM";
public static var miMenu:int = 5;
public static var OWMenuReiting:Array;
public static var miHighScores:int = 11;
public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[GL.Header, 18, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 18, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 18, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 18, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 18, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 18, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 18, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 18, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 18, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 18, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 18, 30, "270", "9", 0, 0, null, 0, false]], 18, 30, LibraryDefault.OWGameCounterAnimator, null];
public static var miDeletePlayer:int = 9;
public static var miIntro:int = 2;
public static var strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/free_online/clusterz/?g=clusterz";
public static var miDeleteScoresConfirm:int = 12;
public static var OWResultsTotalScore:Array;
public static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15};
public static var OWInfoPConnect:Array;
public static var OWResultsBonusScore:Array;
public static var OSBubbleBangEInd:int = 10;
public static var OWHighScoreLocal:Array = [[GL.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, (140 + 20), null, 0, true]];
public static var OWHighScoresType:Array;
public static var iWOptionsOnOff:Array;
public static var miInstructions:int = 17;
public static var miOptions:int = 10;
public static var OWMenu:Array;
public static var miDeleteScores:int = 13;
public static var OWInfoP:Array;
public static var OWHighScores:Array;
public static var OWDeleteScoresConfirm:Array;
public static var iPosXLabelGameOver:int = 25;
public static var OWInGameMenuParam:Array;
public static var miCommingSoon:int = 6;
public static var strConnect1URL:String = "http://www.wellgames.com/free_online/clusterz/?g=clusterz";
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 OWHighScoreTabF:Array;
public static var OWEnterName:Array;
public static var miDeletePlayerConfirm:int = 8;
public static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 13, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 26, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 39, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 52, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 65, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 78, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 91, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 104, 0, "iDigits", 8, true]], 110, 23];
public static var OWGameAlert:Array;
public static var OSBubbleBangSInd:int = 0;
public static var miGameContinue:int = 16;
public static var OWIntroParam:Array;
public static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 18, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 36, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 54, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 72, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 90, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 126, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 144, 0, "iDigits", 8, true]], 250, 30];
public static var OWGameConnection:Array;
public static var miChoosePlayer:int = 7;
public static var OWHighScorePersonal:Array = [[GL.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, (140 + 20), null, 0, true]];
public static var sServer:String = "www.wellgames.com";
public 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];
public static var OWOptions:Array;
public static var sDebug:Boolean = false;
public static var OWGameLevelCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true]], 250, 30];
public static var OSoundParams:Array = [UI.OSBubbleBang01, UI.OSBubbleBang02, UI.OSBubbleBang03, UI.OSBubbleBang04, UI.OSBubbleBang05, UI.OSBubbleBang06, UI.OSBubbleBang07, UI.OSBubbleBang08, UI.OSBubbleBang09, UI.OSBubbleBang10, UI.OSBubbleBang11];
public static var miEnterNameFirst:int = 3;
public static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[GL.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, LibraryDefault.OTimerAnimator, null];
public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[GL.Header, 13, 23, "0", " ", 0, 0, null, 0, false], [GL.Header, 13, 23, "0", "0", 0, 0, null, 0, false], [GL.Header, 13, 23, "30", "1", 0, 0, null, 0, false], [GL.Header, 13, 23, "60", "2", 0, 0, null, 0, false], [GL.Header, 13, 23, "90", "3", 0, 0, null, 0, false], [GL.Header, 13, 23, "120", "4", 0, 0, null, 0, false], [GL.Header, 13, 23, "150", "5", 0, 0, null, 0, false], [GL.Header, 13, 23, "180", "6", 0, 0, null, 0, false], [GL.Header, 13, 23, "210", "7", 0, 0, null, 0, false], [GL.Header, 13, 23, "240", "8", 0, 0, null, 0, false], [GL.Header, 13, 23, "270", "9", 0, 0, null, 0, false]], 13, 22, LibraryDefault.OWGameCounterAnimator, null];
public static var sBBannerPrefix:String = "ru/bottom/";
public static var OWCommingSoon:Array;
public static var OWDeletePlayerConfirm:Array;
public static var OWResultsReiting:Array;
public static var OWGameCounterAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:4};
public static var sURLRating:String = "http://wellgames.com/rating/wellratings.php";
public static var OWGameNameColor:Array = ["blue1", "red", "yellow", "yellow1", "aqua1", "yellow1", "yellow", "red", "blue1"];
public static var sTBannerPrefix:String = "ru/top/";
public static var OWInstructions:Array;
public static var sZone:String = "Clasterz";
public static var OWIPGameName:Array;
public static var strConnect2URL:String = "http://www.wellgames.com/?g=clusterz";
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 OWInfoPUserNotFound:Array;
public static var OWChoosePlayer:Array;
public static var sBannerID:String = "clusterz";
public static var miLastWindow:int = 1;
public static var OWGameNewLevel:Array;
public static var sXTName:String = "cr";
public static var strGameName:String = "CLUSTERZ!";
public static var iWOptionsVolume:Array;
public static var OWInfoPPlayer:Array;
public static var OWGame:Array;
public static var OWInfoUpSell:Array;
public static var OWResultsLevelScore:Array;
public static var OWResults:Array;
public static function ReInit():void{
OWGameNameColor = ["blue1", "red", "yellow", "yellow1", "aqua1", "yellow1", "yellow", "red", "blue1"];
OWIntroParam = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [GL.Header, 800, 50, "aqua1", LibraryDefault.strSite, 0, 160, "iHeader", 0, true], [GL.Header, 800, 40, "aqua1", SStrings.getString("strPresents"), 0, 400, "iFooter", 0, true], [GL.ColorText, 120, LibraryDefault.OWGameNameColor, LibraryDefault.strGameName, null, 75, 100, "iGameName", 0, true]];
OWLanguageParam = [[GL.BigFrame, 460, 385, "green1", "green1", 170, 120, null, 0, true], [GL.Header, 350, 40, "blue", SStrings.getString("strLanguage"), 225, 145, null, 0, true], [GL.ListBoxText, 320, 40, "yellow", "yellow", 5, null, 200, 195, "iListBox", 0, true], [GL.MakeTextButton, 190, 46, "aqua", "aqua", 25, SStrings.getString("strChange"), 200, 439, "btnChange", 0, true], [GL.MakeTextButton, 190, 46, "yellow1", "yellow1", 25, SStrings.getString("strCancel"), 410, 439, "btnCancel", 0, true]];
OWInGameMenuParam = [[GL.BigFrame, 350, 335, "green1", "green1", 225, 145, null, 0, true], [GL.MakeTextButton, 250, 46, "red", "red", 25, SStrings.getString("strMainMenu"), 275, 180, "btnMainMenu", 0, true], [GL.MakeTextButton, 250, 46, "aqua1", "aqua1", 25, SStrings.getString("strOptions"), 275, 235, "btnOptions", 0, true], [GL.MakeTextButton, 250, 46, "aqua", "aqua", 25, SStrings.getString("strInstructions"), 275, 290, "btnInstructions", 0, true], [GL.MakeTextButton, 250, 46, "yellow1", "yellow1", 25, SStrings.getString("strMoreGames"), 275, 345, "btnMoreGames", 0, true], [GL.MakeTextButton, 250, 46, "yellow", "yellow", 25, SStrings.getString("strResume"), 275, 400, "btnResume", 0, true]];
OWChoosePlayer = [[GL.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 500, 40, "aqua1", SStrings.getString("strChoosePlayer"), 0, 20, null, 0, true], [GL.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [GL.MakeTextButton, 200, 60, "yellow", "yellow", 30, SStrings.getString("strNew"), 20, 340, "iNew", 0, true], [GL.MakeTextButton, 200, 60, "magenta", "magenta", 30, SStrings.getString("strDelete"), 280, 340, "iDelete", 0, true], [GL.MakeTextButton, 200, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 40, 420, "iAccept", 0, true], [GL.MakeTextButton, 200, 60, "red", "red", 30, SStrings.getString("strCancel"), 260, 420, "iCancel", 0, true]];
OWEnterName = [[GL.BigFrame, 460, 320, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 460, 40, "aqua1", SStrings.getString("strNewPlayer"), 0, 20, null, 0, true], [GL.Header, 460, 30, "yellow", SStrings.getString("strEnterName"), 0, 90, null, 0, true], [GL.Header, 460, 25, "magenta1", SStrings.getString("strEnterNameLat"), 0, 195, null, 0, true], [GL.InputText, 400, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 125, "iName", 0, true], [GL.MakeTextButton, 200, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 20, 235, "iAccept", 0, true], [GL.MakeTextButton, 200, 60, "red", "red", 30, SStrings.getString("strCancel"), 240, 235, "iCancel", 0, true]];
OWPlayersColor = ["180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150"];
OWMenuReiting = [[GL.Header, 800, 30, "yellow", "W", 0, 380, null, 0, true]];
OWMenu = [[GL.Header, 800, 30, "magenta1", SStrings.getString("strWelcome"), 0, 10, null, 0, true], [GL.Header, 800, 30, "white", SStrings.getString("strChangePlayer"), 0, 55, "iTextChange", 0, true], [GL.ColorText, 120, LibraryDefault.OWGameNameColor, LibraryDefault.strGameName, null, 70, 75, "iGameName", 0, true], [GL.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 226, "iCPlayers", 0, true], [GL.ColorText, 30, LibraryDefault.OWPlayersColor, SStrings.getString("strPlayersOnline"), null, 20, 220, "iPlayers", 0, true], [GL.MakeTextButton, 300, 75, "aqua1", "aqua1", 40, SStrings.getString("strPlayOnline"), 250, 275, "iPlayOnline", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 588, 278, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 30, 278, "iAppStore", 0, true], [GL.MakeTextButton, 320, 60, "yellow", "yellow", 25, SStrings.getString("strOptions"), 50, 425, "iOptions", 0, true], [GL.MakeTextButton, 320, 60, "yellow1", "yellow1", 25, SStrings.getString("strInstructions"), 420, 425, "iInstructions", 0, true], [GL.MakeTextButton, 320, 60, "aqua", "aqua", 25, SStrings.getString("strHighScores"), 30, 505, "iHighScores", 0, true], [GL.MakeTextButton, 320, 60, "magenta", "magenta", 25, SStrings.getString("strMoreGames"), 450, 505, "iMoreGames", 0, true]];
OWGameAlert = [[GL.MakeTextButton, 250, 60, "yellow", "yellow", 30, SStrings.getString("strContinueGame"), 0, 0, "iButtons", 0, true], [GL.MakeTextButton, 250, 60, "yellow1", "yellow1", 30, SStrings.getString("strNewGame"), 0, 70, "iButtons", 1, true]];
OWCommingSoon = [[GL.BigFrame, 530, 290, "yellow1", "yellow", 0, 0, null, 0, true], [GL.Header, 530, 50, "red", SStrings.getString("strCommingSoon"), 0, 20, null, 0, true], [GL.Header, 530, 30, "magenta", SStrings.getString("strCommingSoonI"), 0, 125, null, 0, true], [GL.MakeTextButton, 170, 60, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 180, 210, null, 0, true]];
OWDeletePlayerConfirm = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeletePlayerConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
iWOptionsVolume = [SStrings.getString("strOff"), "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"];
iWOptionsOnOff = [SStrings.getString("strOff"), SStrings.getString("strOn")];
OWOptions = [[GL.BigFrame, 720, 390, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 600, 50, "aqua1", SStrings.getString("strOptions"), 50, 30, null, 0, true], [GL.ListBoxTextHSlider, 710, 50, "magenta", false, 160, 32, "magenta", SStrings.getString("strSound"), LibraryDefault.iWOptionsVolume, 10, 90, "iSound", 0, true], [GL.ListBoxTextHSlider, 710, 50, "yellow", false, 160, 32, "yellow", SStrings.getString("strMusic"), LibraryDefault.iWOptionsVolume, 10, 140, "iMusic", 0, true], [GL.ListBoxTextHSlider, 600, 50, "green1", false, 200, 32, "green1", SStrings.getString("strWindow"), null, 10, 190, "iResolution", 0, true], [GL.ListBoxTextHSlider, 675, 50, "red1", false, 90, 32, "red1", SStrings.getString("strFullScreen"), LibraryDefault.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [GL.MakeTextButton, 200, 60, "yellow1", "yellow1", 27, SStrings.getString("strAccept"), 110, 310, "iAccept", 0, true], [GL.MakeTextButton, 200, 60, "red", "red", 27, SStrings.getString("strCancel"), ((110 + 200) + 100), 310, "iCancel", 0, true]];
OWHighScoresType = [SStrings.getString("strLocal"), SStrings.getString("strPersonal")];
OWHighScoreTabF = [OInterface.OTabMake, [[OInterface.OIObjectMake, LibraryDefault.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, LibraryDefault.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, LibraryDefault.OTimerAnimator, null];
OWHighScores = [[GL.BigFrame, 620, 480, "yellow", "white", 0, 0, null, 0, true], [GL.Header, 620, 50, "yellow", SStrings.getString("strHighScores"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 280, 50, "aqua1", false, 210, 40, "aqua1", "", LibraryDefault.OWHighScoresType, 160, 75, "iType", 0, true], [GL.SmallBorder, 540, 220, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, LibraryDefault.OWHighScoreTabF, 45, 145, "iTable", 0, true], [GL.MakeTextButton, 190, 60, "red", "red", 30, SStrings.getString("strClear"), 100, 380, "iClear", 0, true], [GL.MakeTextButton, 190, 60, "yellow1", "yellow1", 30, SStrings.getString("strClose"), 330, 380, "iClose", 0, true]];
OWDeleteScoresConfirm = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeleteScoresConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
OWResultsLevelScore = [[GL.TextAlign, 465, 34, 32, "yellow", SStrings.getString("strGainedScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 32, "yellow", "9", 2, 1, 0, 0, null, 0, true]];
OWResultsBonusScore = [[GL.TextAlign, 465, 34, 32, "red", SStrings.getString("strBonusScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 32, "red", "9", 2, 1, 0, 0, null, 0, true]];
OWResultsTotalScore = [[GL.TextAlign, 465, 34, 32, "yellow1", SStrings.getString("strTotalScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 32, "yellow1", "9", 2, 1, 0, 0, null, 0, true]];
OWResultsReiting = [[GL.ColorText, 40, OWPlayersColor, SStrings.getString("strYourReiting"), OInterface.iDefSlowAnimators, 85, 0, null, 0, true], [GL.Header, 465, 40, "aqua1", "9", 0, 60, null, 0, true]];
OWResults = [[GL.ColorText, 45, OWColors, SStrings.getString("strLevelComplete"), OInterface.iDefSlowAnimators, 40, 60, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 35, 150, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 35, 195, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 35, 240, null, 0, false], [OInterface.OIObjectMake, OWResultsReiting, OInterface.iDefSlowAnimators, 35, 285, null, 0, false], [GL.MakeTextButton, 390, 60, "yellow1", "yellow1", 30, SStrings.getString("strNextLevel"), 85, 400, "iButtons", 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm"), 0, 480, null, 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm1"), 0, 507, null, 0, false], [GL.MakeTextButton, 390, 60, "yellow1", "yellow1", 30, SStrings.getString("strSubmitScore"), 85, 475, "iSubmit", 0, false]];
OWIPGameName = [[GL.ColorText, 40, LibraryDefault.OWGameNameColor, LibraryDefault.strGameName, null, 5, 150, null, 0, true]];
OWInfoPConnect = [[GL.Header, 250, 25, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.MakeTextButton, 260, 50, "yellow", "yellow", 25, SStrings.getString("strPlayOnline"), 5, 310, null, 0, true]];
OWInfoPUserNotFound = [[GL.Header, 250, 40, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 270, null, 0, true]];
OWInfoUpSell = [[GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 40, 300, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 40, 220, "iAppStore", 0, true]];
OWInfoP = [[GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 265, null, 0, true]];
OWInfoPPlayer = [[GL.ColorHeader, 270, 25, LibraryDefault.OWColors, SStrings.getString("strOpponent1"), null, 0, 415, null, 0, true], [GL.ColorHeader, 270, 25, LibraryDefault.OWPlayersColor, SStrings.getString("strLevel"), null, 0, 445, null, 0, true]];
OWGameCounterAnimator = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:4};
OWGameNewLevel = [GL.ColorText, 60, LibraryDefault.OWColors, SStrings.getString("strLevel"), OInterface.iDefSlowAnimators];
OWGameConnection = [GL.ColorText, 30, LibraryDefault.OWColors, SStrings.getString("strConnectionToServer"), OInterface.iDefSlowAnimators];
OWGameScoreElement = [OInterface.OTabMake, [[GL.Header, 18, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 18, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 18, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 18, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 18, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 18, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 18, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 18, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 18, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 18, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 18, 30, "270", "9", 0, 0, null, 0, false]], 18, 30, LibraryDefault.OWGameCounterAnimator, null];
OWGameScoreF = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 18, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 36, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 54, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 72, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 90, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 126, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 144, 0, "iDigits", 8, true]], 250, 30];
OWGameScoreElementO = [OInterface.OTabMake, [[GL.Header, 13, 23, "0", " ", 0, 0, null, 0, false], [GL.Header, 13, 23, "0", "0", 0, 0, null, 0, false], [GL.Header, 13, 23, "30", "1", 0, 0, null, 0, false], [GL.Header, 13, 23, "60", "2", 0, 0, null, 0, false], [GL.Header, 13, 23, "90", "3", 0, 0, null, 0, false], [GL.Header, 13, 23, "120", "4", 0, 0, null, 0, false], [GL.Header, 13, 23, "150", "5", 0, 0, null, 0, false], [GL.Header, 13, 23, "180", "6", 0, 0, null, 0, false], [GL.Header, 13, 23, "210", "7", 0, 0, null, 0, false], [GL.Header, 13, 23, "240", "8", 0, 0, null, 0, false], [GL.Header, 13, 23, "270", "9", 0, 0, null, 0, false]], 13, 22, LibraryDefault.OWGameCounterAnimator, null];
OWGameScoreFO = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 13, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 26, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 39, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 52, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 65, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 78, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 91, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 104, 0, "iDigits", 8, true]], 110, 23];
OWGameLevelCounterF = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true]], 250, 30];
OWGame = [[GL.ColorText, 45, LibraryDefault.OWGameNameColor, LibraryDefault.strGameName, null, 535, 13, null, 0, true], [GL.Header, 250, 25, "aqua1", LibraryDefault.strSite, 537, 505, null, 0, true], [GL.InvisibleButton, 250, 25, 537, 505, "iSite", 0, true], [GL.ColorText, 30, LibraryDefault.OWPlayersColor, SStrings.getString("strLevel"), null, 15, 550, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelCounterF, 65, 562, "iLevelC", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 268, 562, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 680, 375, "iScoreO", 0, false], [GL.MakeTextButton, 120, 50, "aqua1", "aqua1", 25, SStrings.getString("strMenu"), 610, 540, "iMenu", 0, true]];
OWInstructions = [[GL.BigFrame, 700, 520, "yellow", "white", 50, 40, null, 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreF, 280, 500, "iScore", 0, false], [GL.Header, 700, 50, "yellow", SStrings.getString("strInstructions"), 50, 60, null, 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText1"), 490, 280, "iInstr1", 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText2"), 490, 290, "iInstr2", 0, false], [GL.MakeTextButton, 190, 50, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 510, 490, "iClose", 0, true]];
OSoundParams = [UI.OSBubbleBang01, UI.OSBubbleBang02, UI.OSBubbleBang03, UI.OSBubbleBang04, UI.OSBubbleBang05, UI.OSBubbleBang06, UI.OSBubbleBang07, UI.OSBubbleBang08, UI.OSBubbleBang09, UI.OSBubbleBang10, UI.OSBubbleBang11];
areaChange();
}
private static function areaChange():void{
var _local1:Array;
var _local2:RegExp;
var _local3:Boolean;
var _local4:String;
var _local5:int;
if (SConfig.AREA == ""){
_local1 = new Array();
_local2 = new RegExp("([\\w]*)://([\\w./%|]*)");
_local1 = Preloader.sPath.match(_local2);
if (_local1[1] != "file"){
_local3 = false;
_local4 = "";
_local5 = 0;
while (_local5 < _local1[2].length) {
if ((((((_local1[2].charAt(_local5) == "/")) && (!(_local3)))) && (!((_local1[2].charAt((_local5 + 1)) == "/"))))){
_local3 = true;
_local5 = (_local5 + 1);
} else {
if ((((_local1[2].charAt(_local5) == "/")) && (_local3))){
_local3 = false;
break;
};
};
if (_local3){
_local4 = (_local4 + _local1[2].charAt(_local5));
};
_local5++;
};
if (_local4.length == 2){
SConfig.AREA = _local4;
};
};
};
if (SConfig.AREA != ""){
strConnect1URL = (((((((("http://www.wellgames.com/" + SConfig.AREA.toLowerCase()) + "/") + "free_online/") + UI.sBannerID) + "/?g=") + UI.sBannerID) + "_") + SConfig.AREA.toLowerCase());
strConnect2URL = (((((("http://www.wellgames.com/" + SConfig.AREA.toLowerCase()) + "/") + "?g=") + UI.sBannerID) + "_") + SConfig.AREA.toLowerCase());
strConnect3URL = (((((((("http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/" + SConfig.AREA.toLowerCase()) + "/") + "free_online/") + UI.sBannerID) + "/?g=") + UI.sBannerID) + "_") + SConfig.AREA.toLowerCase());
sLang = SConfig.AREA.toUpperCase();
};
}
}
}//package
Section 207
//OAds (OAds)
package {
import ENGINE.INTERFACE.*;
public class OAds {
private static var iFunction:Function;
public static function InitAd(_arg1:OApplication, _arg2:Function):void{
iFunction = _arg2;
if (Partner.iAdRotator == null){
if (((Partner["iAdManager"]) && (!((Partner["iAdManager"] == null))))){
Partner["iAdManager"].getLocation(_arg1, onLocation);
return;
};
Partner.iAdRotator = new AdRotator([], [], []);
};
iFunction();
}
private static function onLocation():void{
var _local1:AdManager = Partner["iAdManager"];
Partner.iAdRotator = new AdRotator(_local1.preGameAd, _local1.interLevelAd, _local1.endGameAd);
iFunction();
}
}
}//package
Section 208
//OCGame (OCGame)
package {
import ENGINE.GAME.*;
import MAIN.UTIL.*;
public class OCGame extends OGame {
public function OCGame(){
super(2, 5);
}
public function set prLang(_arg1:String):void{
this.iPlayer.iLang = _arg1;
}
override public function DefaultInitLocalScores():void{
this.iScores.Clear(0);
this.iScores.AddScore("Emily", (int(((Math.random() * 987) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Michael", (int(((Math.random() * 987) + 300)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Jacob", (int(((Math.random() * 987) + 400)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Isabella", (int(((Math.random() * 987) + 500)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Madison", (int(((Math.random() * 987) + 600)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.SortOn(0);
}
public function get prLang():String{
trace(("this.iPlayer " + this.iPlayer));
if (this.iPlayer != null){
return (this.iPlayer.iLang);
};
return (SConfig.language);
}
}
}//package
Section 209
//Partner (Partner)
package {
import CPMStar.*;
import YandexAd.*;
import Mochi.*;
import WellgamesAd.*;
public class Partner {
public static const P_SubmitScore:Boolean = true;
public static const IdGame:String = "clusterz";
private static var iWellAd:Ad = new OWellgamesAd(IdGame, LIST_BANER_WELL, 0, -1, 0, -50, 800, 400);
public static var iAdManager:AdManager;
public static var iAdRotator:AdRotator;
private static var iCPMStar:OCPMStar = new OCPMStar(3008, 10);
private static var iMochiAd_pre_game:OMochiAd = new OMochiAd(300, "5e9412953d911fb7", false);
private static var LIST_BANER_WELL:Array = [["en", ["top/", "bottom/"]], ["de", ["de/top/", "de/bottom/"]], ["fr", ["fr/top/", "fr/bottom/"]], ["ru", ["ru/top/", "ru/bottom/"]], ["cn", ["cn/top/", "cn/bottom/"]]];
private static var LIST_BANER_YANDEX:Array = ["top"];
private static var iYandex:OYandexAd = new OYandexAd("107631", 3008, LIST_BANER_YANDEX, -1);
public static function initAlfyAd():void{
iAdManager = new AdManager([[["*"], ["*"], [iMochiAd_pre_game]]], [[["wellgames.com"], ["UA", "RU", "BY", "KZ"], [iYandex, iYandex, iWellAd]], [["absolutist.com", "*"], ["UA", "*"], [iCPMStar, iCPMStar, iWellAd]]], [[[], [], []]]);
}
}
}//package
Section 210
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import MAIN.UTIL.*;
public class Preloader extends MovieClip {
private var flag_time:Boolean;
private var iLayerLoader:Sprite;
private var iViewLoader:Sprite;
private var iTimer:int;
private var iLayerLogo:Sprite;
private var iLayerBackground:Sprite;
private var iConfigLoader:Object;
private var flag_full_loading:Boolean;
private static const TEXT_LOADING_CN:String = "Loading...";
private static const LOGO_X:Number = 50;
private static const LOGO_Y:Number = 30;
private static const LOADER_HEIGHT:Number = 4;
private static const TEXT_LOADING_DE:String = "Laden...";
private static const LOADER_BORDER:Number = 5;
private static const WND_HEIGHT:Number = 600;
private static const TEXT_LOADING_FR:String = "Chargement...";
private static const TEXT_LOADING_Y:Number = 78;
private static const TEXT_LOADING_RU:String = "Загрузка...";
private static const TIME_MIN_VISIBLE:int = 1500;
private static const LOADER_X:Number = 50;
private static const LOADER_Y:Number = 90;
private static const WND_WIDTH:Number = 800;
private static const LOADER_WIDTH:Number = 80;
private static const TEXT_LOADING_EN:String = "Loading...";
public static var Lib_TextLoading:Class = Preloader_Lib_TextLoading;
public static var baseUrl:String = "";
private static var Lib_Logo:Class = Preloader_Lib_Logo;
public static var sPath:String = "";
public function Preloader(){
this.flag_full_loading = false;
this.flag_time = false;
this.iTimer = getTimer();
this.iLayerBackground = (this.addChild(new Sprite()) as Sprite);
this.iLayerLogo = (this.addChild(new Sprite()) as Sprite);
this.iLayerLoader = (this.addChild(new Sprite()) as Sprite);
this.InitView();
this.addEventListener(Event.ENTER_FRAME, this.OnEnterFrame);
this.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.OnIOError);
sPath = this.loaderInfo.url;
if (this.loaderInfo.parameters["baseUrl"] != undefined){
baseUrl = this.loaderInfo.parameters["baseUrl"];
};
}
private function MakeLoader():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = WND_WIDTH;
_local2 = WND_HEIGHT;
_local3 = ((_local1 * LOADER_WIDTH) / 100);
_local4 = ((_local2 * LOADER_HEIGHT) / 100);
_local5 = (((_local1 * LOADER_X) / 100) - (_local3 / 2));
_local6 = (((_local2 * LOADER_Y) / 100) - (_local4 / 2));
_local7 = LOADER_BORDER;
this.iLayerLoader.graphics.lineStyle(3, 3561651);
this.iLayerLoader.graphics.beginFill(0, 0);
this.iLayerLoader.graphics.drawRect((_local5 - _local7), (_local6 - _local7), (_local3 + (_local7 * 2)), (_local4 + (_local7 * 2)));
this.iLayerLoader.graphics.endFill();
this.iViewLoader = (this.iLayerLoader.addChild(new Sprite()) as Sprite);
this.iViewLoader.x = _local5;
this.iViewLoader.y = _local6;
this.iViewLoader.graphics.beginFill(3561651);
this.iViewLoader.graphics.drawRect(0, 0, _local3, _local4);
this.iViewLoader.graphics.endFill();
this.iViewLoader.scaleX = 0;
}
private function StartLoadingConfig():void{
var _local1:Class;
_local1 = (SConfigLoader as Class);
this.iConfigLoader = new _local1(StartGame, root);
}
private function analiseFullLoading():void{
if (this.flag_full_loading == true){
return;
};
if (this.currentFrame == this.totalFrames){
stop();
this.flag_full_loading = true;
};
}
private function StartGame():void{
var _local1:Class;
if (this.iConfigLoader != null){
this.iConfigLoader.Free();
};
this.removeChild(this.iLayerBackground);
this.removeChild(this.iLayerLoader);
this.removeChild(this.iLayerLogo);
this.iLayerBackground = null;
this.iLayerLoader = null;
this.iLayerLogo = null;
this.iViewLoader = null;
_local1 = (getDefinitionByName("Clusterz") as Class);
this.addChild((new (_local1) as DisplayObject));
}
private function loadingFinished():void{
this.removeEventListener(Event.ENTER_FRAME, this.OnEnterFrame);
this.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, this.OnIOError);
this.StartLoadingConfig();
}
private function OnEnterFrame(_arg1:Event):void{
this.animateProgress();
this.analiseFullLoading();
if ((((this.flag_full_loading == true)) && ((this.flag_time == true)))){
this.loadingFinished();
};
}
private function MakeLogo():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:DisplayObject;
_local5 = new Lib_Logo();
this.iLayerLogo.addChild(_local5);
_local1 = WND_WIDTH;
_local2 = WND_HEIGHT;
_local3 = (((_local1 * LOGO_X) / 100) - (_local5.width / 2));
_local4 = (((_local2 * LOGO_Y) / 100) - (_local5.height / 2));
_local5.x = _local3;
_local5.y = _local4;
}
private function MakeBackground():void{
this.iLayerBackground.graphics.beginFill(0xFFFFFF);
this.iLayerBackground.graphics.drawRect(0, 0, WND_WIDTH, WND_HEIGHT);
this.iLayerBackground.graphics.endFill();
}
private function OnIOError(_arg1:IOErrorEvent):void{
trace(("Preloadre Error -> " + _arg1.text));
}
private function MakeTextLoading():void{
var _local1:int;
var _local2:DisplayObject;
var _local3:String;
var _local4:String;
var _local5:Array;
_local5 = [["/de/", TEXT_LOADING_DE], ["/fr/", TEXT_LOADING_FR], ["/ru/", TEXT_LOADING_RU], ["/cn/", TEXT_LOADING_CN]];
_local4 = this.loaderInfo.url;
_local3 = TEXT_LOADING_EN;
_local1 = 0;
while (_local1 < _local5.length) {
if (_local4.indexOf(_local5[_local1][0]) > 0){
_local3 = _local5[_local1][1];
break;
};
_local1++;
};
_local2 = new Lib_TextLoading();
_local2["txt"].text = _local3;
_local2.x = 0;
_local2.y = ((WND_HEIGHT * TEXT_LOADING_Y) / 100);
this.iLayerLoader.addChild(_local2);
}
private function animateProgress():void{
var _local1:Number;
var _local2:Number;
_local1 = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal);
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > 1){
_local1 = 1;
};
_local2 = ((getTimer() - this.iTimer) / TIME_MIN_VISIBLE);
if (_local2 < 0){
_local2 = 0;
};
if (_local2 >= 1){
this.flag_time = true;
_local2 = 1;
};
this.iViewLoader.scaleX = ((_local1)<_local2) ? _local1 : _local2;
}
private function InitView():void{
this.MakeBackground();
this.MakeLoader();
this.MakeLogo();
this.MakeTextLoading();
}
}
}//package
Section 211
//Preloader_Lib_Logo (Preloader_Lib_Logo)
package {
import mx.core.*;
public class Preloader_Lib_Logo extends BitmapAsset {
}
}//package
Section 212
//Preloader_Lib_TextLoading (Preloader_Lib_TextLoading)
package {
import flash.display.*;
import mx.core.*;
public class Preloader_Lib_TextLoading extends SpriteAsset {
public var btn_sound_off:DisplayObject;
public var text2:DisplayObject;
public var text1:DisplayObject;
public var txt:DisplayObject;
public var btn_sound_on:DisplayObject;
public var btn_restore:DisplayObject;
public var btn:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 213
//UI (UI)
package {
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import flash.utils.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import MAIN.UTIL.*;
import ENGINE.SMARTFOX.*;
public class UI {
public static const strConnect1URLTemplate:String = "http://www.wellgames.com/[lang]/free_online/clusterz/?g=clusterz_[lang]";
public static const strConnect3URLTemplate:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/[lang]/free_online/clusterz/?g=clusterz_[lang]";
public static const strConnect2URLTemplate:String = "http://www.wellgames.com/[lang]/?g=clusterz_[lang]";
public static var OSBubbleBang10:Class = UI_OSBubbleBang10;
public static var OSBubbleBang11:Class = UI_OSBubbleBang11;
public static var miEnterNewName:int = 4;
public static var OIUp:Class = UI_OIUp;
public static var OSSmileSInd:int = 12;
public static var miDeletePlayer:int = 9;
public static var miIntro:int = 2;
public static var miDeleteScoresConfirm:int = 12;
private static var OWHighScoresType:Array;
public static var OWInfoP:Array;
public static var OIRight:Class = UI_OIRight;
public static var OWHighScores:Array;
public static var OWDeleteScoresConfirm:Array;
public static var OWInGameMenuParam:Array;
public static var OSBubbleBangSInd:int = 0;
public static var miGameContinue:int = 16;
public static var strConnect1URL:String = "http://www.wellgames.com/free_online/clusterz/?g=clusterz";
private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, UI.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, UI.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, UI.OTimerAnimator, null];
public static var OWEnterName:Array;
public static var OWGameConnection:Array;
public static var miCommingSoon:int = 6;
public static var OCursor:Class = UI_OCursor;
public static var OSSmile03:Class = UI_OSSmile03;
public static var OSSmile01:Class = UI_OSSmile01;
public static var OSSmile02:Class = UI_OSSmile02;
public static var iCache:OCache = new OCache();
public static var OWCommingSoon:Array;
public static var sBBannerPrefix:String = "bottom/";
public static var Lib_sound:Class = UI_Lib_sound;
public static var sURLRating:String = "http://wellgames.com/rating/wellratings.php";
public static var OWGameNameColor:Array = ["blue1", "red", "yellow", "yellow1", "aqua1", "yellow1", "yellow", "red", "blue1"];
public static var sZone:String = "Clasterz";
public static var OWInfoPUserNotFound:Array;
public static var strConnect2URL:String = "http://www.wellgames.com/?g=clusterz";
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 sBannerID:String = "clusterz";
public static var miLastWindow:int = 1;
public static var OWInfoUpSell:Array;
public static var OSSmileEInd:int = 14;
public static var amazon_store:Class = UI_amazon_store;
public static var OBubbleShadowC:Class = UI_OBubbleShadowC;
public static var OWResults:Array;
public static var strGameName:String = "CLUSTERZ!";
private static var iWOptionsVolume:Array;
public static var OWResultsLevelScore:Array;
public static var sLang:String = "EN";
public static var miPlayGame:int = 14;
public static var OILeft:Class = UI_OILeft;
public static var OWLanguageParam:Array;
public static var miGameNew:int = 15;
public static var miNullWindow:int = 0;
public static var miLanguage:int = 28;
public static var sDomain:String = "wellgames.com";
public static var strSite:String = "WELLGAMES.COM";
public static var miMenu:int = 5;
public static var OWMenuReiting:Array = [[GL.Header, 800, 30, "yellow", "W", 0, 380, null, 0, true]];
public static var miHighScores:int = 11;
public static var OWGameScoreElement:Array;
public static var OSOops2:Class = UI_OSOops2;
public static var OWInfoPConnect:Array;
public static var strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/free_online/clusterz/?g=clusterz";
public static var OWResultsTotalScore:Array;
private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15};
public static var OFont:Class = UI_OFont;
public static var OWResultsBonusScore:Array;
public static var app_store:Class = UI_app_store;
private static var iWOptionsOnOff:Array;
public static var OSEEE:Class = UI_OSEEE;
public static var OSBubbleBangEInd:int = 10;
public static var OWHighScoreLocal:Array;
private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams);
public static var sURLAppStore:String = "http://redir.absolutist.com/4-[place]-3008/http://itunes.apple.com/us/app/bubble-clusters/id503831872?mt=8";
public static var miOptions:int = 10;
public static var OWMenu:Array;
public static var miInstructions:int = 17;
public static var iPosXLabelGameOver:int = 90;
public static var miDeleteScores:int = 13;
public static var miInGameMenu:int = 27;
public static var OWHighScorePersonal:Array;
public static var miDeletePlayerConfirm:int = 8;
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 OWGameAlert:Array;
public static var OWIntroParam:Array;
public static var miChoosePlayer:int = 7;
public static var sServer:String = "www.wellgames.com";
public static var OIDown:Class = UI_OIDown;
public static var OWOptions:Array;
public static var sDebug:Boolean = false;
public static var sURLAmazonStore:String = "http://redir.absolutist.com/4-[place]-3008/http://www.amazon.com/Absolutist-Ltd-Bubble-Clusterz/dp/B008O5IBHC/";
private static var OSoundParams:Array = [UI.OSBubbleBang01, UI.OSBubbleBang02, UI.OSBubbleBang03, UI.OSBubbleBang04, UI.OSBubbleBang05, UI.OSBubbleBang06, UI.OSBubbleBang07, UI.OSBubbleBang08, UI.OSBubbleBang09, UI.OSBubbleBang10, UI.OSBubbleBang11];
public static var miEnterNameFirst:int = 3;
public static var OWInstructions:Array;
private static var OWGameCounterAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:4};
public static var OWDeletePlayerConfirm:Array;
public static var OWResultsReiting:Array;
public static var sTBannerPrefix:String = "top/";
public static var OWIPGameName:Array = [[GL.ColorText, 40, UI.OWGameNameColor, UI.strGameName, null, 5, 150, null, 0, true]];
public static var Lib_fullscreen:Class = UI_Lib_fullscreen;
public static var OWChoosePlayer:Array;
public static var sXTName:String = "cr";
public static var OWInfoPPlayer:Array;
public static var OWGameNewLevel:Array;
public static var OBubbleC:Class = UI_OBubbleC;
public static var OSBubbleBang01:Class = UI_OSBubbleBang01;
public static var OSBubbleBang02:Class = UI_OSBubbleBang02;
public static var OSBubbleBang03:Class = UI_OSBubbleBang03;
public static var OSBubbleBang04:Class = UI_OSBubbleBang04;
public static var OSBubbleBang05:Class = UI_OSBubbleBang05;
public static var OSBubbleBang06:Class = UI_OSBubbleBang06;
public static var OSBubbleBang07:Class = UI_OSBubbleBang07;
public static var OSBubbleBang08:Class = UI_OSBubbleBang08;
public static var OSBubbleBang09:Class = UI_OSBubbleBang09;
public static var Lib_language:Class = UI_Lib_language;
public static var iGAME:OCGame = new OCGame();
public static var OSOops:int = 15;
public static var iMP:OMultiplayer = new OMultiplayer(sDebug);
public static var OWGame:Array;
private static function list_class_language():void{
}
public static function ReInit():void{
var _local1:int;
var _local2:XML;
var _local3:Class;
var _local4:int;
var _local5:String;
var _local6:String;
_local4 = 0;
_local1 = 0;
while (_local1 < SConfig.list_language.length) {
if (SConfig.list_language[_local1][0] == SConfig.language){
_local4 = _local1;
break;
};
_local1++;
};
if (UI.iGAME.prPlayerName == ""){
trace("User Not Found");
} else {
UI.iGAME.prLang = SConfig.language;
};
trace(("Apply Language -> " + SConfig.language));
_local2 = SConfigLoader.getXMLFile(SConfig.list_language[_local4][1]);
SStrings.AddStrings(_local2);
_local3 = (getDefinitionByName(SConfig.list_language[_local4][3]) as Class);
if (SConfig.list_language[_local4][3] == "LibraryDefault"){
LibraryDefault.ReInit();
};
var _local7:XML = describeType(UI);
var _local8:int;
while (_local8 < _local7.variable.length()) {
_local5 = _local7.variable[_local8].@name;
_local6 = _local7.variable[_local8].@type;
if ((((_local5.substring(0, 2) == "OW")) && ((_local6 == "Array")))){
if (((((!((UI[_local5] == undefined))) && (!((_local3[_local5] == undefined))))) || ((UI[_local5] == null)))){
UI[_local5] = _local3[_local5];
};
};
_local8++;
};
strConnect1URL = strConnect1URLTemplate.split("[lang]").join(SConfig.language);
strConnect2URL = strConnect2URLTemplate.split("[lang]").join(SConfig.language);
strConnect3URL = strConnect3URLTemplate.split("[lang]").join(SConfig.language);
strSite = _local3.strSite;
strGameName = _local3.strGameName;
sURLRating = _local3.sURLRating;
sLang = _local3.sLang;
}
}
}//package
Section 214
//UI_amazon_store (UI_amazon_store)
package {
import mx.core.*;
public class UI_amazon_store extends BitmapAsset {
}
}//package
Section 215
//UI_app_store (UI_app_store)
package {
import mx.core.*;
public class UI_app_store extends BitmapAsset {
}
}//package
Section 216
//UI_DE (UI_DE)
package {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import MAIN.UTIL.*;
public class UI_DE {
public static const sLang:String = "DE";
public static const miPlayGame:int = 14;
public static const miEnterNewName:int = 4;
public static const miGameNew:int = 15;
public static const miNullWindow:int = 0;
public static const sDomain:String = "wellgames.com";
public static const strSite:String = "WELLGAMES.COM";
public static const miMenu:int = 5;
public static const miHighScores:int = 11;
public static const miDeletePlayer:int = 9;
public static const miIntro:int = 2;
public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/de/free_online/clusterz/?g=clusterz_de";
public static const miDeleteScoresConfirm:int = 12;
public static const OSBubbleBangEInd:int = 10;
private static const OWHighScoresType:Array = [SStrings.getString("strLocal"), SStrings.getString("strPersonal")];
private static const iWOptionsOnOff:Array = [SStrings.getString("strOff"), SStrings.getString("strOn")];
public static const miInstructions:int = 17;
public static const miOptions:int = 10;
public static const miDeleteScores:int = 13;
public static const iPosXLabelGameOver:int = 15;
public static const miCommingSoon:int = 6;
public static const strConnect1URL:String = "http://www.wellgames.com/de/free_online/clusterz/?g=clusterz_de";
public static const miDeletePlayerConfirm:int = 8;
public static const OSBubbleBangSInd:int = 0;
public static const miGameContinue:int = 16;
public static const miChoosePlayer:int = 7;
public static const sServer:String = "www.wellgames.com";
public static const sDebug:Boolean = false;
private static const OSoundParams:Array = [UI.OSBubbleBang01, UI.OSBubbleBang02, UI.OSBubbleBang03, UI.OSBubbleBang04, UI.OSBubbleBang05, UI.OSBubbleBang06, UI.OSBubbleBang07, UI.OSBubbleBang08, UI.OSBubbleBang09, UI.OSBubbleBang10, UI.OSBubbleBang11];
public static const miEnterNameFirst:int = 3;
public static const sBBannerPrefix:String = "de/bottom/";
public static const sURLRating:String = "http://wellgames.com/rating/wellratings.php";
public static const sTBannerPrefix:String = "de/top/";
public static const sZone:String = "Clasterz";
public static const strConnect2URL:String = "http://www.wellgames.com/de/?g=clusterz_de";
public static const sBannerID:String = "clusterz";
public static const miLastWindow:int = 1;
public static const sXTName:String = "cr";
public static const strGameName:String = "CLUSTERZ!";
private static const iWOptionsVolume:Array = [SStrings.getString("strOff"), "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"];
public static var OWLanguageParam:Array = [[GL.BigFrame, 460, 385, "green1", "green1", 170, 120, null, 0, true], [GL.Header, 350, 40, "blue", SStrings.getString("strLanguage"), 225, 145, null, 0, true], [GL.ListBoxText, 320, 40, "yellow", "yellow", 5, null, 200, 195, "iListBox", 0, true], [GL.MakeTextButton, 190, 46, "aqua", "aqua", 25, SStrings.getString("strChange"), 200, 439, "btnChange", 0, true], [GL.MakeTextButton, 190, 46, "yellow1", "yellow1", 25, SStrings.getString("strCancel"), 410, 439, "btnCancel", 0, true]];
public static var OWMenuReiting:Array = [[GL.Header, 800, 30, "yellow", "W", 0, 380, null, 0, true]];
public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[GL.Header, 18, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 18, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 18, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 18, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 18, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 18, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 18, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 18, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 18, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 18, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 18, 30, "270", "9", 0, 0, null, 0, false]], 18, 30, UI_DE.OWGameCounterAnimator, null];
public static var OWResultsTotalScore:Array = [[GL.TextAlign, 465, 34, 29, "yellow1", SStrings.getString("strTotalScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 29, "yellow1", "9", 2, 1, 0, 0, null, 0, true]];
private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15};
public static var OWInfoPConnect:Array = [[GL.Header, 250, 25, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.MakeTextButton, 260, 50, "yellow", "yellow", 25, SStrings.getString("strPlayOnline"), 5, 310, null, 0, true]];
public static var OWResultsBonusScore:Array = [[GL.TextAlign, 465, 34, 29, "red", SStrings.getString("strBonusScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 29, "red", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWHighScoreLocal:Array = [[GL.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams);
public static var OWMenu:Array = [[GL.Header, 800, 30, "magenta1", SStrings.getString("strWelcome"), 0, 10, null, 0, true], [GL.Header, 800, 30, "white", SStrings.getString("strChangePlayer"), 0, 55, "iTextChange", 0, true], [GL.ColorText, 120, UI_DE.OWGameNameColor, UI_DE.strGameName, null, 70, 75, "iGameName", 0, true], [GL.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 226, "iCPlayers", 0, true], [GL.ColorText, 30, UI_DE.OWPlayersColor, SStrings.getString("strPlayersOnline"), null, 20, 220, "iPlayers", 0, true], [GL.MakeTextButton, 300, 75, "aqua1", "aqua1", 40, SStrings.getString("strPlayOnline"), 250, 275, "iPlayOnline", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 588, 278, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 30, 278, "iAppStore", 0, true], [GL.MakeTextButton, 320, 60, "yellow", "yellow", 30, SStrings.getString("strOptions"), 50, 425, "iOptions", 0, true], [GL.MakeTextButton, 320, 60, "yellow1", "yellow1", 30, SStrings.getString("strInstructions"), 420, 425, "iInstructions", 0, true], [GL.MakeTextButton, 320, 60, "aqua", "aqua", 30, SStrings.getString("strHighScores"), 30, 505, "iHighScores", 0, true], [GL.MakeTextButton, 320, 60, "magenta", "magenta", 30, SStrings.getString("strMoreGames"), 450, 505, "iMoreGames", 0, true]];
public static var OWInfoP:Array = [[GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 265, null, 0, true]];
public static var OWHighScores:Array = [[GL.BigFrame, 600, 480, "yellow", "white", 0, 0, null, 0, true], [GL.Header, 600, 50, "yellow", SStrings.getString("strHighScores"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 280, 50, "aqua1", false, 210, 40, "aqua1", "", UI_DE.OWHighScoresType, 160, 75, "iType", 0, true], [GL.SmallBorder, 540, 220, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, UI_DE.OWHighScoreTabF, 45, 145, "iTable", 0, true], [GL.MakeTextButton, 205, 60, "red", "red", 30, SStrings.getString("strClear"), 70, 380, "iClear", 0, true], [GL.MakeTextButton, 205, 60, "yellow1", "yellow1", 30, SStrings.getString("strClose"), 330, 380, "iClose", 0, true]];
public static var OWDeleteScoresConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeleteScoresConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWInGameMenuParam:Array = [[GL.BigFrame, 350, 335, "green1", "green1", 225, 145, null, 0, true], [GL.MakeTextButton, 250, 46, "red", "red", 25, SStrings.getString("strMainMenu"), 275, 180, "btnMainMenu", 0, true], [GL.MakeTextButton, 250, 46, "aqua1", "aqua1", 25, SStrings.getString("strOptions"), 275, 235, "btnOptions", 0, true], [GL.MakeTextButton, 250, 46, "aqua", "aqua", 25, SStrings.getString("strInstructions"), 275, 290, "btnInstructions", 0, true], [GL.MakeTextButton, 250, 46, "yellow1", "yellow1", 25, SStrings.getString("strMoreGames"), 275, 345, "btnMoreGames", 0, true], [GL.MakeTextButton, 250, 46, "yellow", "yellow", 25, SStrings.getString("strResume"), 275, 400, "btnResume", 0, true]];
public static var OWColors:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"];
private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, UI_DE.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, UI_DE.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, UI_DE.OTimerAnimator, null];
public static var OWEnterName:Array = [[GL.BigFrame, 500, 320, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 460, 50, "aqua1", SStrings.getString("strNewPlayer"), 20, 20, null, 0, true], [GL.Header, 460, 30, "yellow", SStrings.getString("strEnterName"), 20, 90, null, 0, true], [GL.Header, 460, 25, "magenta1", SStrings.getString("strEnterNameLat"), 20, 195, null, 0, true], [GL.InputText, 440, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 125, "iName", 0, true], [GL.MakeTextButton, 205, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 40, 235, "iAccept", 0, true], [GL.MakeTextButton, 205, 60, "red", "red", 30, SStrings.getString("strCancel"), 0xFF, 235, "iCancel", 0, true]];
private static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 13, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 26, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 39, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 52, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 65, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 78, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 91, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 104, 0, "iDigits", 8, true]], 110, 23];
public static var OWGameAlert:Array = [[GL.MakeTextButton, 250, 60, "yellow", "yellow", 30, SStrings.getString("strContinueGame"), 0, 0, "iButtons", 0, true], [GL.MakeTextButton, 250, 60, "yellow1", "yellow1", 30, SStrings.getString("strNewGame"), 0, 70, "iButtons", 1, true]];
public static var OWIntroParam:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [GL.Header, 800, 50, "aqua1", UI_DE.strSite, 0, 160, "iHeader", 0, true], [GL.Header, 800, 40, "aqua1", SStrings.getString("strPresents"), 0, 400, "iFooter", 0, true], [GL.ColorText, 120, UI_DE.OWGameNameColor, UI_DE.strGameName, null, 75, 100, "iGameName", 0, true]];
private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 18, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 36, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 54, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 72, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 90, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 126, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 144, 0, "iDigits", 8, true]], 250, 30];
public static var OWGameConnection:Array = [GL.ColorText, 30, UI_DE.OWColors, SStrings.getString("strConnectionToServer"), OInterface.iDefSlowAnimators];
public static var OWHighScorePersonal:Array = [[GL.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var OWPlayersCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 67, 0, "iDigits", 4, true]], 85, 30];
public static var OWOptions:Array = [[GL.BigFrame, 540, 390, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 540, 50, "aqua1", SStrings.getString("strOptions"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 520, 50, "magenta", false, 90, 40, "magenta", SStrings.getString("strSound"), UI_DE.iWOptionsVolume, 10, 90, "iSound", 0, true], [GL.ListBoxTextHSlider, 520, 50, "yellow", false, 90, 40, "yellow", SStrings.getString("strMusic"), UI_DE.iWOptionsVolume, 10, 140, "iMusic", 0, true], [GL.ListBoxTextHSlider, 520, 50, "green1", false, 200, 40, "green1", SStrings.getString("strWindow"), null, 10, 190, "iResolution", 0, true], [GL.ListBoxTextHSlider, 520, 50, "red1", false, 90, 40, "red1", SStrings.getString("strFullScreen"), UI_DE.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [GL.MakeTextButton, 210, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 55, 310, "iAccept", 0, true], [GL.MakeTextButton, 210, 60, "red", "red", 30, SStrings.getString("strCancel"), 275, 310, "iCancel", 0, true]];
private static var OWGameLevelCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true]], 250, 30];
private static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[GL.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, UI_DE.OTimerAnimator, null];
public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[GL.Header, 13, 23, "0", " ", 0, 0, null, 0, false], [GL.Header, 13, 23, "0", "0", 0, 0, null, 0, false], [GL.Header, 13, 23, "30", "1", 0, 0, null, 0, false], [GL.Header, 13, 23, "60", "2", 0, 0, null, 0, false], [GL.Header, 13, 23, "90", "3", 0, 0, null, 0, false], [GL.Header, 13, 23, "120", "4", 0, 0, null, 0, false], [GL.Header, 13, 23, "150", "5", 0, 0, null, 0, false], [GL.Header, 13, 23, "180", "6", 0, 0, null, 0, false], [GL.Header, 13, 23, "210", "7", 0, 0, null, 0, false], [GL.Header, 13, 23, "240", "8", 0, 0, null, 0, false], [GL.Header, 13, 23, "270", "9", 0, 0, null, 0, false]], 13, 22, UI_DE.OWGameCounterAnimator, null];
public static var OWCommingSoon:Array = [[GL.BigFrame, 530, 290, "yellow1", "yellow", 0, 0, null, 0, true], [GL.Header, 530, 50, "red", SStrings.getString("strCommingSoon"), 0, 20, null, 0, true], [GL.Header, 530, 30, "magenta", SStrings.getString("strCommingSoonI"), 0, 125, null, 0, true], [GL.MakeTextButton, 170, 60, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 180, 210, null, 0, true]];
public static var OWDeletePlayerConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeletePlayerConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWResultsReiting:Array = [[GL.ColorText, 40, OWPlayersColor, SStrings.getString("strYourReiting"), OInterface.iDefSlowAnimators, 105, 0, null, 0, true], [GL.Header, 465, 40, "aqua1", "9", 0, 60, 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 OWGameNameColor:Array = ["blue1", "red", "yellow", "yellow1", "aqua1", "yellow1", "yellow", "red", "blue1"];
public static var OWInstructions:Array = [[GL.BigFrame, 700, 520, "yellow", "white", 50, 40, null, 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreF, 280, 500, "iScore", 0, false], [GL.Header, 700, 50, "yellow", SStrings.getString("strInstructions"), 50, 60, null, 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText1"), 490, 280, "iInstr1", 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText2"), 490, 290, "iInstr2", 0, false], [GL.MakeTextButton, 200, 50, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 490, 490, "iClose", 0, true]];
public static var OWIPGameName:Array = [[GL.ColorText, 40, UI_DE.OWGameNameColor, UI_DE.strGameName, null, 5, 150, 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 OWInfoPUserNotFound:Array = [[GL.Header, 250, 40, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 270, null, 0, true]];
public static var OWChoosePlayer:Array = [[GL.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 500, 43, "aqua1", SStrings.getString("strChoosePlayer"), 0, 25, null, 0, true], [GL.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [GL.MakeTextButton, 170, 60, "yellow", "yellow", 30, SStrings.getString("strNew"), 30, 340, "iNew", 0, true], [GL.MakeTextButton, 170, 60, "magenta", "magenta", 30, SStrings.getString("strDelete"), 300, 340, "iDelete", 0, true], [GL.MakeTextButton, 205, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 30, 420, "iAccept", 0, true], [GL.MakeTextButton, 205, 60, "red", "red", 30, SStrings.getString("strCancel"), 265, 420, "iCancel", 0, true]];
public static var OWGameNewLevel:Array = [GL.ColorText, 60, UI_DE.OWColors, SStrings.getString("strLevel"), OInterface.iDefSlowAnimators];
public static var OWInfoPPlayer:Array = [[GL.ColorHeader, 270, 25, UI_DE.OWColors, SStrings.getString("strOpponent1"), null, 0, 415, null, 0, true], [GL.ColorHeader, 270, 25, UI_DE.OWPlayersColor, SStrings.getString("strLevel"), null, 0, 445, null, 0, true]];
public static var OWGame:Array = [[GL.ColorText, 45, UI_DE.OWGameNameColor, UI_DE.strGameName, null, 535, 13, null, 0, true], [GL.Header, 250, 25, "aqua1", UI_DE.strSite, 537, 505, null, 0, true], [GL.InvisibleButton, 250, 25, 537, 505, "iSite", 0, true], [GL.ColorText, 30, UI_DE.OWPlayersColor, SStrings.getString("strLevel"), null, 50, 553, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelCounterF, 60, 562, "iLevelC", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 268, 562, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 680, 375, "iScoreO", 0, false], [GL.MakeTextButton, 120, 50, "aqua1", "aqua1", 25, SStrings.getString("strMenu"), 610, 540, "iMenu", 0, true]];
public static var OWInfoUpSell:Array = [[GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 40, 300, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 40, 220, "iAppStore", 0, true]];
public static var OWResultsLevelScore:Array = [[GL.TextAlign, 465, 34, 29, "yellow", SStrings.getString("strGainedScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 29, "yellow", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWResults:Array = [[GL.ColorText, 39, OWColors, SStrings.getString("strLevelComplete"), OInterface.iDefSlowAnimators, 40, 60, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 35, 150, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 35, 195, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 35, 240, null, 0, false], [OInterface.OIObjectMake, OWResultsReiting, OInterface.iDefSlowAnimators, 35, 285, null, 0, false], [GL.MakeTextButton, 380, 60, "yellow1", "yellow1", 30, SStrings.getString("strNextLevel"), 85, 400, "iButtons", 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm"), 0, 480, null, 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm1"), 0, 507, null, 0, false], [GL.MakeTextButton, 380, 60, "yellow1", "yellow1", 30, SStrings.getString("strSubmitScore"), 85, 475, "iSubmit", 0, false]];
}
}//package
Section 217
//UI_EN (UI_EN)
package {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import MAIN.UTIL.*;
public class UI_EN {
public static const miPlayGame:int = 14;
public static const miEnterNewName:int = 4;
public static const miGameNew:int = 15;
public static const miNullWindow:int = 0;
public static const sDomain:String = "wellgames.com";
public static const strSite:String = "WELLGAMES.COM";
public static const miMenu:int = 5;
public static const miHighScores:int = 11;
public static const miDeletePlayer:int = 9;
public static const miIntro:int = 2;
public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/free_online/clusterz/?g=clusterz";
public static const miDeleteScoresConfirm:int = 12;
public static const OSBubbleBangEInd:int = 10;
private static const OWHighScoresType:Array = [SStrings.getString("strLocal"), SStrings.getString("strPersonal")];
private static const iWOptionsOnOff:Array = [SStrings.getString("strOff"), SStrings.getString("strOn")];
public static const miInstructions:int = 17;
public static const miOptions:int = 10;
public static const miDeleteScores:int = 13;
public static const iPosXLabelGameOver:int = 90;
public static const miCommingSoon:int = 6;
public static const strConnect1URL:String = "http://www.wellgames.com/free_online/clusterz/?g=clusterz";
public static const miDeletePlayerConfirm:int = 8;
public static const OSBubbleBangSInd:int = 0;
public static const miGameContinue:int = 16;
public static const miChoosePlayer:int = 7;
public static const sServer:String = "www.wellgames.com";
public static const sDebug:Boolean = false;
private static const OSoundParams:Array = [UI.OSBubbleBang01, UI.OSBubbleBang02, UI.OSBubbleBang03, UI.OSBubbleBang04, UI.OSBubbleBang05, UI.OSBubbleBang06, UI.OSBubbleBang07, UI.OSBubbleBang08, UI.OSBubbleBang09, UI.OSBubbleBang10, UI.OSBubbleBang11];
public static const miEnterNameFirst:int = 3;
public static const sBBannerPrefix:String = "bottom/";
public static const sTBannerPrefix:String = "top/";
public static const sZone:String = "Clasterz";
public static const strConnect2URL:String = "http://www.wellgames.com/?g=clusterz";
public static const sBannerID:String = "clusterz";
public static const miLastWindow:int = 1;
public static const sXTName:String = "cr";
public static const strGameName:String = "CLUSTERZ!";
private static const iWOptionsVolume:Array = [SStrings.getString("strOff"), "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"];
public static var sLang:String = "EN";
public static var OWLanguageParam:Array = [[GL.BigFrame, 460, 385, "green1", "green1", 170, 120, null, 0, true], [GL.Header, 350, 40, "blue", SStrings.getString("strLanguage"), 225, 145, null, 0, true], [GL.ListBoxText, 320, 40, "yellow", "yellow", 5, null, 200, 195, "iListBox", 0, true], [GL.MakeTextButton, 190, 46, "aqua", "aqua", 25, SStrings.getString("strChange"), 200, 439, "btnChange", 0, true], [GL.MakeTextButton, 190, 46, "yellow1", "yellow1", 25, SStrings.getString("strCancel"), 410, 439, "btnCancel", 0, true]];
public static var OWMenuReiting:Array = [[GL.Header, 800, 30, "yellow", "W", 0, 380, null, 0, true]];
public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[GL.Header, 18, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 18, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 18, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 18, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 18, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 18, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 18, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 18, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 18, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 18, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 18, 30, "270", "9", 0, 0, null, 0, false]], 18, 30, UI_EN.OWGameCounterAnimator, null];
public static var OWResultsTotalScore:Array = [[GL.TextAlign, 465, 34, 34, "yellow1", SStrings.getString("strTotalScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 34, "yellow1", "9", 2, 1, 0, 0, null, 0, true]];
private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15};
public static var OWInfoPConnect:Array = [[GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.MakeTextButton, 230, 50, "yellow", "yellow", 25, SStrings.getString("strPlayOnline"), 15, 310, null, 0, true]];
public static var OWResultsBonusScore:Array = [[GL.TextAlign, 465, 34, 34, "red", SStrings.getString("strBonusScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 34, "red", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWHighScoreLocal:Array = [[GL.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams);
public static var OWMenu:Array = [[GL.Header, 800, 30, "magenta1", SStrings.getString("strWelcome"), 0, 10, null, 0, true], [GL.Header, 800, 30, "white", SStrings.getString("strChangePlayer"), 0, 55, "iTextChange", 0, true], [GL.ColorText, 120, UI_EN.OWGameNameColor, UI.strGameName, null, 70, 75, "iGameName", 0, true], [GL.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 226, "iCPlayers", 0, true], [GL.ColorText, 30, UI_EN.OWPlayersColor, SStrings.getString("strPlayersOnline"), null, 20, 220, "iPlayers", 0, true], [GL.MakeTextButton, 300, 75, "aqua1", "aqua1", 40, SStrings.getString("strPlayOnline"), 250, 275, "iPlayOnline", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 588, 278, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 30, 278, "iAppStore", 0, true], [GL.MakeTextButton, 320, 60, "yellow", "yellow", 30, SStrings.getString("strOptions"), 50, 425, "iOptions", 0, true], [GL.MakeTextButton, 320, 60, "yellow1", "yellow1", 30, SStrings.getString("strInstructions"), 420, 425, "iInstructions", 0, true], [GL.MakeTextButton, 320, 60, "aqua", "aqua", 30, SStrings.getString("strHighScores"), 30, 505, "iHighScores", 0, true], [GL.MakeTextButton, 320, 60, "magenta", "magenta", 30, SStrings.getString("strMoreGames"), 450, 505, "iMoreGames", 0, true]];
public static var OWInfoP:Array = [[GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 265, null, 0, true]];
public static var OWHighScores:Array = [[GL.BigFrame, 600, 480, "yellow", "white", 0, 0, null, 0, true], [GL.Header, 600, 50, "yellow", SStrings.getString("strHighScores"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 280, 50, "aqua1", false, 190, 40, "aqua1", "", UI_EN.OWHighScoresType, 160, 75, "iType", 0, true], [GL.SmallBorder, 540, 220, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, UI_EN.OWHighScoreTabF, 45, 145, "iTable", 0, true], [GL.MakeTextButton, 170, 60, "red", "red", 30, SStrings.getString("strClear"), 100, 380, "iClear", 0, true], [GL.MakeTextButton, 170, 60, "yellow1", "yellow1", 30, SStrings.getString("strClose"), 330, 380, "iClose", 0, true]];
public static var OWDeleteScoresConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeleteScoresConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWInGameMenuParam:Array = [[GL.BigFrame, 350, 335, "green1", "green1", 225, 145, null, 0, true], [GL.MakeTextButton, 250, 46, "red", "red", 25, SStrings.getString("strMainMenu"), 275, 180, "btnMainMenu", 0, true], [GL.MakeTextButton, 250, 46, "aqua1", "aqua1", 25, SStrings.getString("strOptions"), 275, 235, "btnOptions", 0, true], [GL.MakeTextButton, 250, 46, "aqua", "aqua", 25, SStrings.getString("strInstructions"), 275, 290, "btnInstructions", 0, true], [GL.MakeTextButton, 250, 46, "yellow1", "yellow1", 25, SStrings.getString("strMoreGames"), 275, 345, "btnMoreGames", 0, true], [GL.MakeTextButton, 250, 46, "yellow", "yellow", 25, SStrings.getString("strResume"), 275, 400, "btnResume", 0, true]];
public static var OWColors:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"];
private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, UI_EN.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, UI_EN.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, UI_EN.OTimerAnimator, null];
public static var OWEnterName:Array = [[GL.BigFrame, 500, 320, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 460, 50, "aqua1", SStrings.getString("strNewPlayer"), 20, 20, null, 0, true], [GL.Header, 460, 30, "yellow", SStrings.getString("strEnterName"), 20, 90, null, 0, true], [GL.Header, 460, 25, "magenta1", SStrings.getString("strEnterNameLat"), 20, 195, null, 0, true], [GL.InputText, 440, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 125, "iName", 0, true], [GL.MakeTextButton, 200, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 45, 235, "iAccept", 0, true], [GL.MakeTextButton, 200, 60, "red", "red", 30, SStrings.getString("strCancel"), 0xFF, 235, "iCancel", 0, true]];
private static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 13, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 26, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 39, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 52, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 65, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 78, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 91, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 104, 0, "iDigits", 8, true]], 110, 23];
public static var OWGameAlert:Array = [[GL.MakeTextButton, 250, 60, "yellow", "yellow", 30, SStrings.getString("strContinueGame"), 0, 0, "iButtons", 0, true], [GL.MakeTextButton, 250, 60, "yellow1", "yellow1", 30, SStrings.getString("strNewGame"), 0, 70, "iButtons", 1, true]];
public static var OWIntroParam:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [GL.Header, 800, 50, "aqua1", UI.strSite, 0, 160, "iHeader", 0, true], [GL.Header, 800, 40, "aqua1", SStrings.getString("strPresents"), 0, 400, "iFooter", 0, true], [GL.ColorText, 120, UI_EN.OWGameNameColor, UI.strGameName, null, 75, 100, "iGameName", 0, true]];
private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 18, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 36, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 54, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 72, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 90, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 126, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 144, 0, "iDigits", 8, true]], 250, 30];
public static var OWGameConnection:Array = [GL.ColorText, 30, UI_EN.OWColors, SStrings.getString("strConnectionToServer"), OInterface.iDefSlowAnimators];
public static var upOwResults:int = (Partner.P_SubmitScore) ? -55 : 0;
;
public static var OWHighScorePersonal:Array = [[GL.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var OWPlayersCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 67, 0, "iDigits", 4, true]], 85, 30];
public static var OWOptions:Array = [[GL.BigFrame, 540, 390, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 540, 50, "aqua1", SStrings.getString("strOptions"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 520, 50, "magenta", false, 90, 40, "magenta", SStrings.getString("strSound"), UI_EN.iWOptionsVolume, 10, 90, "iSound", 0, true], [GL.ListBoxTextHSlider, 520, 50, "yellow", false, 90, 40, "yellow", SStrings.getString("strMusic"), UI_EN.iWOptionsVolume, 10, 140, "iMusic", 0, true], [GL.ListBoxTextHSlider, 520, 50, "green1", false, 200, 40, "green1", SStrings.getString("strWindow"), null, 10, 190, "iResolution", 0, true], [GL.ListBoxTextHSlider, 520, 50, "red1", false, 90, 40, "red1", SStrings.getString("strFullScreen"), UI_EN.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [GL.MakeTextButton, 170, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 90, 310, "iAccept", 0, true], [GL.MakeTextButton, 170, 60, "red", "red", 30, SStrings.getString("strCancel"), 280, 310, "iCancel", 0, true]];
private static var OWGameLevelCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true]], 250, 30];
private static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[GL.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, UI_EN.OTimerAnimator, null];
public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[GL.Header, 13, 23, "0", " ", 0, 0, null, 0, false], [GL.Header, 13, 23, "0", "0", 0, 0, null, 0, false], [GL.Header, 13, 23, "30", "1", 0, 0, null, 0, false], [GL.Header, 13, 23, "60", "2", 0, 0, null, 0, false], [GL.Header, 13, 23, "90", "3", 0, 0, null, 0, false], [GL.Header, 13, 23, "120", "4", 0, 0, null, 0, false], [GL.Header, 13, 23, "150", "5", 0, 0, null, 0, false], [GL.Header, 13, 23, "180", "6", 0, 0, null, 0, false], [GL.Header, 13, 23, "210", "7", 0, 0, null, 0, false], [GL.Header, 13, 23, "240", "8", 0, 0, null, 0, false], [GL.Header, 13, 23, "270", "9", 0, 0, null, 0, false]], 13, 22, UI_EN.OWGameCounterAnimator, null];
public static var OWCommingSoon:Array = [[GL.BigFrame, 530, 290, "yellow1", "yellow", 0, 0, null, 0, true], [GL.Header, 530, 50, "red", SStrings.getString("strCommingSoon"), 0, 20, null, 0, true], [GL.Header, 530, 30, "magenta", SStrings.getString("strCommingSoonI"), 0, 125, null, 0, true], [GL.MakeTextButton, 170, 60, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 180, 210, null, 0, true]];
public static var OWDeletePlayerConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeletePlayerConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWResultsReiting:Array = [[GL.ColorText, 40, OWPlayersColor, SStrings.getString("strYourReiting"), OInterface.iDefSlowAnimators, 85, 0, null, 0, true], [GL.Header, 465, 40, "aqua1", "9", 0, 60, 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 sURLRating:String = "http://wellgames.com/rating/wellratings.php";
public static var OWGameNameColor:Array = ["blue1", "red", "yellow", "yellow1", "aqua1", "yellow1", "yellow", "red", "blue1"];
public static var OWInstructions:Array = [[GL.BigFrame, 700, 520, "yellow", "white", 50, 40, null, 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreF, 280, 500, "iScore", 0, false], [GL.Header, 700, 50, "yellow", SStrings.getString("strInstructions"), 50, 60, null, 0, true], [GL.Header, 200, 23, "green", SStrings.getString("strInstructionsText1"), 490, 280, "iInstr1", 0, true], [GL.Header, 200, 23, "green", SStrings.getString("strInstructionsText2"), 490, 290, "iInstr2", 0, false], [GL.MakeTextButton, 160, 50, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 510, 490, "iClose", 0, true]];
public static var OWIPGameName:Array = [[GL.ColorText, 40, UI_EN.OWGameNameColor, UI.strGameName, null, 5, 150, 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 OWInfoPUserNotFound:Array = [[GL.Header, 250, 40, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 270, null, 0, true]];
public static var OWChoosePlayer:Array = [[GL.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 500, 50, "aqua1", SStrings.getString("strChoosePlayer"), 0, 20, null, 0, true], [GL.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [GL.MakeTextButton, 170, 60, "yellow", "yellow", 30, SStrings.getString("strNew"), 30, 340, "iNew", 0, true], [GL.MakeTextButton, 170, 60, "magenta", "magenta", 30, SStrings.getString("strDelete"), 300, 340, "iDelete", 0, true], [GL.MakeTextButton, 170, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 70, 420, "iAccept", 0, true], [GL.MakeTextButton, 170, 60, "red", "red", 30, SStrings.getString("strCancel"), 260, 420, "iCancel", 0, true]];
public static var OWGameNewLevel:Array = [GL.ColorText, 60, UI_EN.OWColors, SStrings.getString("strLevel"), OInterface.iDefSlowAnimators];
public static var OWInfoPPlayer:Array = [[GL.ColorHeader, 270, 25, UI_EN.OWColors, SStrings.getString("strOpponent1"), null, 0, 415, null, 0, true], [GL.ColorHeader, 270, 25, UI_EN.OWPlayersColor, SStrings.getString("strLevel"), null, 0, 445, null, 0, true]];
public static var OWGame:Array = [[GL.ColorText, 45, UI_EN.OWGameNameColor, UI.strGameName, null, 535, 13, null, 0, true], [GL.Header, 250, 25, "aqua1", UI.strSite, 537, 505, null, 0, true], [GL.InvisibleButton, 250, 25, 537, 505, "iSite", 0, true], [GL.ColorText, 30, UI_EN.OWPlayersColor, SStrings.getString("strLevel"), null, 50, 551, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelCounterF, 60, 562, "iLevelC", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 268, 558, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 680, 375, "iScoreO", 0, false], [GL.MakeTextButton, 120, 50, "aqua1", "aqua1", 25, SStrings.getString("strMenu"), 610, 540, "iMenu", 0, true]];
public static var OWInfoUpSell:Array = [[GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 40, 300, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 40, 220, "iAppStore", 0, true]];
public static var OWResultsLevelScore:Array = [[GL.TextAlign, 465, 34, 34, "yellow", SStrings.getString("strGainedScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 34, "yellow", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWResults:Array = [[GL.ColorText, 55, OWColors, SStrings.getString("strLevelComplete"), OInterface.iDefSlowAnimators, 30, 60, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 35, 150, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 35, 195, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 35, 240, null, 0, false], [OInterface.OIObjectMake, OWResultsReiting, OInterface.iDefSlowAnimators, 35, 285, null, 0, false], [GL.MakeTextButton, 320, 60, "yellow1", "yellow1", 30, SStrings.getString("strNextLevel"), 115, 400, "iButtons", 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm"), 0, 480, null, 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm1"), 0, 507, null, 0, false], [GL.MakeTextButton, 320, 60, "yellow1", "yellow1", 30, SStrings.getString("strSubmitScore"), 115, 475, "iSubmit", 0, false]];
}
}//package
Section 218
//UI_FR (UI_FR)
package {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import MAIN.UTIL.*;
public class UI_FR {
public static const sLang:String = "FR";
public static const miPlayGame:int = 14;
public static const miEnterNewName:int = 4;
public static const miGameNew:int = 15;
public static const miNullWindow:int = 0;
public static const sDomain:String = "localhost";
public static const strSite:String = "WELLGAMES.COM";
public static const miMenu:int = 5;
public static const miHighScores:int = 11;
public static const miDeletePlayer:int = 9;
public static const miIntro:int = 2;
public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/fr/free_online/clusterz/?g=clusterz_fr";
public static const miDeleteScoresConfirm:int = 12;
public static const OSBubbleBangEInd:int = 10;
private static const OWHighScoresType:Array = [SStrings.getString("strLocal"), SStrings.getString("strPersonal")];
private static const iWOptionsOnOff:Array = [SStrings.getString("strOff"), SStrings.getString("strOn")];
public static const miInstructions:int = 17;
public static const miOptions:int = 10;
public static const miDeleteScores:int = 13;
public static const iPosXLabelGameOver:int = 90;
public static const miCommingSoon:int = 6;
public static const strConnect1URL:String = "http://www.wellgames.com/fr/free_online/clusterz/?g=clusterz_fr";
public static const miDeletePlayerConfirm:int = 8;
public static const OSBubbleBangSInd:int = 0;
public static const miGameContinue:int = 16;
public static const miChoosePlayer:int = 7;
public static const sServer:String = "www.wellgames.com";
public static const sDebug:Boolean = false;
private static const OSoundParams:Array = [UI.OSBubbleBang01, UI.OSBubbleBang02, UI.OSBubbleBang03, UI.OSBubbleBang04, UI.OSBubbleBang05, UI.OSBubbleBang06, UI.OSBubbleBang07, UI.OSBubbleBang08, UI.OSBubbleBang09, UI.OSBubbleBang10, UI.OSBubbleBang11];
public static const miEnterNameFirst:int = 3;
public static const sBBannerPrefix:String = "fr/bottom/";
public static const sURLRating:String = "http://wellgames.com/rating/wellratings.php";
public static const sTBannerPrefix:String = "fr/top/";
public static const sZone:String = "Clasterz";
public static const strConnect2URL:String = "http://www.wellgames.com/fr/?g=clusterz_fr";
public static const sBannerID:String = "clusterz";
public static const miLastWindow:int = 1;
public static const sXTName:String = "cr";
public static const strGameName:String = "CLUSTERZ!";
private static const iWOptionsVolume:Array = [SStrings.getString("strOff"), "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"];
public static var OWLanguageParam:Array = [[GL.BigFrame, 460, 385, "green1", "green1", 170, 120, null, 0, true], [GL.Header, 350, 40, "blue", SStrings.getString("strLanguage"), 225, 145, null, 0, true], [GL.ListBoxText, 320, 40, "yellow", "yellow", 5, null, 200, 195, "iListBox", 0, true], [GL.MakeTextButton, 190, 46, "aqua", "aqua", 25, SStrings.getString("strChange"), 200, 439, "btnChange", 0, true], [GL.MakeTextButton, 190, 46, "yellow1", "yellow1", 25, SStrings.getString("strCancel"), 410, 439, "btnCancel", 0, true]];
public static var OWMenuReiting:Array = [[GL.Header, 800, 30, "yellow", "W", 0, 380, null, 0, true]];
public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[GL.Header, 18, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 18, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 18, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 18, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 18, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 18, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 18, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 18, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 18, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 18, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 18, 30, "270", "9", 0, 0, null, 0, false]], 18, 30, UI_FR.OWGameCounterAnimator, null];
public static var OWResultsTotalScore:Array = [[GL.TextAlign, 465, 34, 29, "yellow1", SStrings.getString("strTotalScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 29, "yellow1", "9", 2, 1, 0, 0, null, 0, true]];
private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15};
public static var OWInfoPConnect:Array = [[GL.Header, 250, 25, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.MakeTextButton, 260, 50, "yellow", "yellow", 25, SStrings.getString("strPlayOnline"), 5, 310, null, 0, true]];
public static var OWResultsBonusScore:Array = [[GL.TextAlign, 465, 34, 29, "red", SStrings.getString("strBonusScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 29, "red", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWHighScoreLocal:Array = [[GL.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams);
public static var OWMenu:Array = [[GL.Header, 800, 30, "magenta1", SStrings.getString("strWelcome"), 0, 10, null, 0, true], [GL.Header, 800, 30, "white", SStrings.getString("strChangePlayer"), 0, 55, "iTextChange", 0, true], [GL.ColorText, 120, UI_FR.OWGameNameColor, UI_FR.strGameName, null, 70, 75, "iGameName", 0, true], [GL.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 226, "iCPlayers", 0, true], [GL.ColorText, 30, UI_FR.OWPlayersColor, SStrings.getString("strPlayersOnline"), null, 20, 220, "iPlayers", 0, true], [GL.MakeTextButton, 300, 75, "aqua1", "aqua1", 40, SStrings.getString("strPlayOnline"), 250, 275, "iPlayOnline", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 588, 278, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 30, 278, "iAppStore", 0, true], [GL.MakeTextButton, 320, 60, "yellow", "yellow", 30, SStrings.getString("strOptions"), 50, 425, "iOptions", 0, true], [GL.MakeTextButton, 320, 60, "yellow1", "yellow1", 30, SStrings.getString("strInstructions"), 420, 425, "iInstructions", 0, true], [GL.MakeTextButton, 320, 60, "aqua", "aqua", 30, SStrings.getString("strHighScores"), 30, 505, "iHighScores", 0, true], [GL.MakeTextButton, 320, 60, "magenta", "magenta", 30, SStrings.getString("strMoreGames"), 450, 505, "iMoreGames", 0, true]];
public static var OWInfoP:Array = [[GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 265, null, 0, true]];
public static var OWHighScores:Array = [[GL.BigFrame, 600, 480, "yellow", "white", 0, 0, null, 0, true], [GL.Header, 600, 50, "yellow", SStrings.getString("strHighScores"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 280, 50, "aqua1", false, 210, 40, "aqua1", "", UI_FR.OWHighScoresType, 160, 75, "iType", 0, true], [GL.SmallBorder, 540, 220, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, UI_FR.OWHighScoreTabF, 45, 145, "iTable", 0, true], [GL.MakeTextButton, 205, 60, "red", "red", 30, SStrings.getString("strClear"), 70, 380, "iClear", 0, true], [GL.MakeTextButton, 205, 60, "yellow1", "yellow1", 30, SStrings.getString("strClose"), 330, 380, "iClose", 0, true]];
public static var OWDeleteScoresConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeleteScoresConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWInGameMenuParam:Array = [[GL.BigFrame, 350, 335, "green1", "green1", 225, 145, null, 0, true], [GL.MakeTextButton, 250, 46, "red", "red", 25, SStrings.getString("strMainMenu"), 275, 180, "btnMainMenu", 0, true], [GL.MakeTextButton, 250, 46, "aqua1", "aqua1", 25, SStrings.getString("strOptions"), 275, 235, "btnOptions", 0, true], [GL.MakeTextButton, 250, 46, "aqua", "aqua", 25, SStrings.getString("strInstructions"), 275, 290, "btnInstructions", 0, true], [GL.MakeTextButton, 250, 46, "yellow1", "yellow1", 25, SStrings.getString("strMoreGames"), 275, 345, "btnMoreGames", 0, true], [GL.MakeTextButton, 250, 46, "yellow", "yellow", 25, SStrings.getString("strResume"), 275, 400, "btnResume", 0, true]];
public static var OWColors:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"];
private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, UI_FR.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, UI_FR.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, UI_FR.OTimerAnimator, null];
public static var OWEnterName:Array = [[GL.BigFrame, 500, 320, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 460, 50, "aqua1", SStrings.getString("strNewPlayer"), 20, 20, null, 0, true], [GL.Header, 460, 30, "yellow", SStrings.getString("strEnterName"), 20, 90, null, 0, true], [GL.Header, 460, 25, "magenta1", SStrings.getString("strEnterNameLat"), 20, 195, null, 0, true], [GL.InputText, 440, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 125, "iName", 0, true], [GL.MakeTextButton, 200, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 45, 235, "iAccept", 0, true], [GL.MakeTextButton, 200, 60, "red", "red", 30, SStrings.getString("strCancel"), 0xFF, 235, "iCancel", 0, true]];
private static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 13, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 26, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 39, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 52, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 65, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 78, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 91, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 104, 0, "iDigits", 8, true]], 110, 23];
public static var OWGameAlert:Array = [[GL.MakeTextButton, 250, 60, "yellow", "yellow", 30, SStrings.getString("strContinueGame"), 0, 0, "iButtons", 0, true], [GL.MakeTextButton, 250, 60, "yellow1", "yellow1", 30, SStrings.getString("strNewGame"), 0, 70, "iButtons", 1, true]];
public static var OWIntroParam:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [GL.Header, 800, 50, "aqua1", UI_FR.strSite, 0, 160, "iHeader", 0, true], [GL.Header, 800, 40, "aqua1", SStrings.getString("strPresents"), 0, 400, "iFooter", 0, true], [GL.ColorText, 120, UI_FR.OWGameNameColor, UI_FR.strGameName, null, 75, 100, "iGameName", 0, true]];
private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 18, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 36, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 54, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 72, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 90, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 126, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 144, 0, "iDigits", 8, true]], 250, 30];
public static var OWGameConnection:Array = [GL.ColorText, 30, UI_FR.OWColors, SStrings.getString("strConnectionToServer"), OInterface.iDefSlowAnimators];
public static var OWHighScorePersonal:Array = [[GL.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var OWPlayersCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 67, 0, "iDigits", 4, true]], 85, 30];
public static var OWOptions:Array = [[GL.BigFrame, 600, 400, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 600, 50, "aqua1", SStrings.getString("strOptions"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 580, 50, "magenta", false, 90, 35, "magenta", SStrings.getString("strSound"), UI_FR.iWOptionsVolume, 10, 90, "iSound", 0, true], [GL.ListBoxTextHSlider, 580, 50, "yellow", false, 90, 35, "yellow", SStrings.getString("strMusic"), UI_FR.iWOptionsVolume, 10, 140, "iMusic", 0, true], [GL.ListBoxTextHSlider, 580, 50, "green1", false, 200, 35, "green1", SStrings.getString("strWindow"), null, 10, 190, "iResolution", 0, true], [GL.ListBoxTextHSlider, 580, 50, "red1", false, 90, 35, "red1", SStrings.getString("strFullScreen"), UI_FR.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [GL.MakeTextButton, 210, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 55, 310, "iAccept", 0, true], [GL.MakeTextButton, 210, 60, "red", "red", 30, SStrings.getString("strCancel"), 335, 310, "iCancel", 0, true]];
private static var OWGameLevelCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true]], 250, 30];
private static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[GL.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, UI_FR.OTimerAnimator, null];
public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[GL.Header, 13, 23, "0", " ", 0, 0, null, 0, false], [GL.Header, 13, 23, "0", "0", 0, 0, null, 0, false], [GL.Header, 13, 23, "30", "1", 0, 0, null, 0, false], [GL.Header, 13, 23, "60", "2", 0, 0, null, 0, false], [GL.Header, 13, 23, "90", "3", 0, 0, null, 0, false], [GL.Header, 13, 23, "120", "4", 0, 0, null, 0, false], [GL.Header, 13, 23, "150", "5", 0, 0, null, 0, false], [GL.Header, 13, 23, "180", "6", 0, 0, null, 0, false], [GL.Header, 13, 23, "210", "7", 0, 0, null, 0, false], [GL.Header, 13, 23, "240", "8", 0, 0, null, 0, false], [GL.Header, 13, 23, "270", "9", 0, 0, null, 0, false]], 13, 22, UI_FR.OWGameCounterAnimator, null];
public static var OWCommingSoon:Array = [[GL.BigFrame, 530, 290, "yellow1", "yellow", 0, 0, null, 0, true], [GL.Header, 530, 50, "red", SStrings.getString("strCommingSoon"), 0, 20, null, 0, true], [GL.Header, 530, 30, "magenta", SStrings.getString("strCommingSoonI"), 0, 125, null, 0, true], [GL.MakeTextButton, 170, 60, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 180, 210, null, 0, true]];
public static var OWDeletePlayerConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeletePlayerConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWResultsReiting:Array = [[GL.ColorHeader, 400, 40, OWPlayersColor, SStrings.getString("strYourReiting"), OInterface.iDefSlowAnimators, 32, 0, null, 0, true], [GL.Header, 465, 40, "aqua1", "9", 0, 110, 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 OWGameNameColor:Array = ["blue1", "red", "yellow", "yellow1", "aqua1", "yellow1", "yellow", "red", "blue1"];
public static var OWInstructions:Array = [[GL.BigFrame, 700, 520, "yellow", "white", 50, 40, null, 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreF, 280, 500, "iScore", 0, false], [GL.Header, 700, 50, "yellow", SStrings.getString("strInstructions"), 50, 60, null, 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText1"), 490, 280, "iInstr1", 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText2"), 490, 290, "iInstr2", 0, false], [GL.MakeTextButton, 200, 50, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 490, 490, "iClose", 0, true]];
public static var OWIPGameName:Array = [[GL.ColorText, 40, UI_FR.OWGameNameColor, UI_FR.strGameName, null, 5, 150, 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 OWInfoPUserNotFound:Array = [[GL.Header, 250, 40, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 270, null, 0, true]];
public static var OWChoosePlayer:Array = [[GL.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 500, 43, "aqua1", SStrings.getString("strChoosePlayer"), 0, 25, null, 0, true], [GL.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [GL.MakeTextButton, 170, 60, "yellow", "yellow", 30, SStrings.getString("strNew"), 30, 340, "iNew", 0, true], [GL.MakeTextButton, 170, 60, "magenta", "magenta", 30, SStrings.getString("strDelete"), 300, 340, "iDelete", 0, true], [GL.MakeTextButton, 205, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 30, 420, "iAccept", 0, true], [GL.MakeTextButton, 205, 60, "red", "red", 30, SStrings.getString("strCancel"), 265, 420, "iCancel", 0, true]];
public static var OWGameNewLevel:Array = [GL.ColorText, 60, UI_FR.OWColors, SStrings.getString("strLevel"), OInterface.iDefSlowAnimators];
public static var OWInfoPPlayer:Array = [[GL.ColorHeader, 270, 25, UI_FR.OWColors, SStrings.getString("strOpponent1"), null, 0, 415, null, 0, true], [GL.ColorHeader, 270, 25, UI_FR.OWPlayersColor, SStrings.getString("strLevel"), null, 0, 445, null, 0, true]];
public static var OWGame:Array = [[GL.ColorText, 45, UI_FR.OWGameNameColor, UI_FR.strGameName, null, 535, 13, null, 0, true], [GL.Header, 250, 25, "aqua1", UI_FR.strSite, 537, 505, null, 0, true], [GL.InvisibleButton, 250, 25, 537, 505, "iSite", 0, true], [GL.ColorText, 30, UI_FR.OWPlayersColor, SStrings.getString("strLevel"), null, 50, 552, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelCounterF, 60, 562, "iLevelC", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 268, 562, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 680, 375, "iScoreO", 0, false], [GL.MakeTextButton, 120, 50, "aqua1", "aqua1", 25, SStrings.getString("strMenu"), 610, 540, "iMenu", 0, true]];
public static var OWInfoUpSell:Array = [[GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 40, 300, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 40, 220, "iAppStore", 0, true]];
public static var OWResultsLevelScore:Array = [[GL.TextAlign, 465, 34, 29, "yellow", SStrings.getString("strGainedScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 29, "yellow", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWResults:Array = [[GL.ColorText, 39, OWColors, SStrings.getString("strLevelComplete"), OInterface.iDefSlowAnimators, 40, (60 - 50), null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 35, (150 - 50), null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 35, (195 - 50), null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 35, (240 - 50), null, 0, false], [OInterface.OIObjectMake, OWResultsReiting, OInterface.iDefSlowAnimators, 35, (285 - 50), null, 0, false], [GL.MakeTextButton, 480, 60, "yellow1", "yellow1", 30, SStrings.getString("strNextLevel"), 27, (450 - 50), "iButtons", 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm"), 0, 480, null, 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm1"), 0, 507, null, 0, false], [GL.MakeTextButton, 480, 60, "yellow1", "yellow1", 30, SStrings.getString("strSubmitScore"), 27, (525 - 50), "iSubmit", 0, false]];
}
}//package
Section 219
//UI_Lib_fullscreen (UI_Lib_fullscreen)
package {
import flash.display.*;
import mx.core.*;
public class UI_Lib_fullscreen extends SpriteAsset {
public var btn_restore:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 220
//UI_Lib_language (UI_Lib_language)
package {
import flash.display.*;
import mx.core.*;
public class UI_Lib_language extends SpriteAsset {
public var btn_restore:DisplayObject;
public var text1:DisplayObject;
public var text2:DisplayObject;
public var btn:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 221
//UI_Lib_sound (UI_Lib_sound)
package {
import flash.display.*;
import mx.core.*;
public class UI_Lib_sound extends SpriteAsset {
public var btn_sound_off:DisplayObject;
public var text2:DisplayObject;
public var text1:DisplayObject;
public var btn_sound_on:DisplayObject;
public var btn_restore:DisplayObject;
public var btn:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 222
//UI_OBubbleC (UI_OBubbleC)
package {
import flash.display.*;
import mx.core.*;
public class UI_OBubbleC extends SpriteAsset {
public var btn_restore:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 223
//UI_OBubbleShadowC (UI_OBubbleShadowC)
package {
import flash.display.*;
import mx.core.*;
public class UI_OBubbleShadowC extends SpriteAsset {
public var btn_sound_off:DisplayObject;
public var text2:DisplayObject;
public var text1:DisplayObject;
public var btn_sound_on:DisplayObject;
public var btn_restore:DisplayObject;
public var btn:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 224
//UI_OCursor (UI_OCursor)
package {
import mx.core.*;
public class UI_OCursor extends SpriteAsset {
}
}//package
Section 225
//UI_OFont (UI_OFont)
package {
import flash.display.*;
import mx.core.*;
public class UI_OFont extends SpriteAsset {
public var btn_sound_off:DisplayObject;
public var text2:DisplayObject;
public var text1:DisplayObject;
public var btn_sound_on:DisplayObject;
public var btn_restore:DisplayObject;
public var btn:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 226
//UI_OIDown (UI_OIDown)
package {
import flash.display.*;
import mx.core.*;
public class UI_OIDown extends SpriteAsset {
public var btn_sound_off:DisplayObject;
public var text2:DisplayObject;
public var text1:DisplayObject;
public var btn_sound_on:DisplayObject;
public var btn_restore:DisplayObject;
public var btn:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 227
//UI_OILeft (UI_OILeft)
package {
import mx.core.*;
public class UI_OILeft extends SpriteAsset {
}
}//package
Section 228
//UI_OIRight (UI_OIRight)
package {
import flash.display.*;
import mx.core.*;
public class UI_OIRight extends SpriteAsset {
public var btn_restore:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 229
//UI_OIUp (UI_OIUp)
package {
import flash.display.*;
import mx.core.*;
public class UI_OIUp extends SpriteAsset {
public var btn_restore:DisplayObject;
public var btn_fullscreen:DisplayObject;
}
}//package
Section 230
//UI_OSBubbleBang01 (UI_OSBubbleBang01)
package {
import mx.core.*;
public class UI_OSBubbleBang01 extends SoundAsset {
}
}//package
Section 231
//UI_OSBubbleBang02 (UI_OSBubbleBang02)
package {
import mx.core.*;
public class UI_OSBubbleBang02 extends SoundAsset {
}
}//package
Section 232
//UI_OSBubbleBang03 (UI_OSBubbleBang03)
package {
import mx.core.*;
public class UI_OSBubbleBang03 extends SoundAsset {
}
}//package
Section 233
//UI_OSBubbleBang04 (UI_OSBubbleBang04)
package {
import mx.core.*;
public class UI_OSBubbleBang04 extends SoundAsset {
}
}//package
Section 234
//UI_OSBubbleBang05 (UI_OSBubbleBang05)
package {
import mx.core.*;
public class UI_OSBubbleBang05 extends SoundAsset {
}
}//package
Section 235
//UI_OSBubbleBang06 (UI_OSBubbleBang06)
package {
import mx.core.*;
public class UI_OSBubbleBang06 extends SoundAsset {
}
}//package
Section 236
//UI_OSBubbleBang07 (UI_OSBubbleBang07)
package {
import mx.core.*;
public class UI_OSBubbleBang07 extends SoundAsset {
}
}//package
Section 237
//UI_OSBubbleBang08 (UI_OSBubbleBang08)
package {
import mx.core.*;
public class UI_OSBubbleBang08 extends SoundAsset {
}
}//package
Section 238
//UI_OSBubbleBang09 (UI_OSBubbleBang09)
package {
import mx.core.*;
public class UI_OSBubbleBang09 extends SoundAsset {
}
}//package
Section 239
//UI_OSBubbleBang10 (UI_OSBubbleBang10)
package {
import mx.core.*;
public class UI_OSBubbleBang10 extends SoundAsset {
}
}//package
Section 240
//UI_OSBubbleBang11 (UI_OSBubbleBang11)
package {
import mx.core.*;
public class UI_OSBubbleBang11 extends SoundAsset {
}
}//package
Section 241
//UI_OSEEE (UI_OSEEE)
package {
import mx.core.*;
public class UI_OSEEE extends SoundAsset {
}
}//package
Section 242
//UI_OSOops2 (UI_OSOops2)
package {
import mx.core.*;
public class UI_OSOops2 extends SoundAsset {
}
}//package
Section 243
//UI_OSSmile01 (UI_OSSmile01)
package {
import mx.core.*;
public class UI_OSSmile01 extends SoundAsset {
}
}//package
Section 244
//UI_OSSmile02 (UI_OSSmile02)
package {
import mx.core.*;
public class UI_OSSmile02 extends SoundAsset {
}
}//package
Section 245
//UI_OSSmile03 (UI_OSSmile03)
package {
import mx.core.*;
public class UI_OSSmile03 extends SoundAsset {
}
}//package
Section 246
//UI_RU (UI_RU)
package {
import ENGINE.DISPLAY.*;
import ENGINE.INTERFACE.*;
import ENGINE.CORE.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import MAIN.UTIL.*;
public class UI_RU {
public static const sLang:String = "RU";
public static const miPlayGame:int = 14;
public static const miEnterNewName:int = 4;
public static const miGameNew:int = 15;
public static const miNullWindow:int = 0;
public static const sDomain:String = "wellgames.com";
public static const strSite:String = "WELLGAMES.COM";
public static const miMenu:int = 5;
public static const miHighScores:int = 11;
public static const miDeletePlayer:int = 9;
public static const miIntro:int = 2;
public static const strConnect3URL:String = "http://absolutist.com/cgi-bin/tell_a_friend.pl?url=http://wellgames.com/ru/free_online/clusterz/?g=clusterz_ru";
public static const miDeleteScoresConfirm:int = 12;
public static const OSBubbleBangEInd:int = 10;
private static const OWHighScoresType:Array = [SStrings.getString("strLocal"), SStrings.getString("strPersonal")];
private static const iWOptionsOnOff:Array = [SStrings.getString("strOff"), SStrings.getString("strOn")];
public static const miInstructions:int = 17;
public static const miOptions:int = 10;
public static const miDeleteScores:int = 13;
public static const iPosXLabelGameOver:int = 25;
public static const miCommingSoon:int = 6;
public static const strConnect1URL:String = "http://www.wellgames.com/ru/free_online/clusterz/?g=clusterz_ru";
public static const miDeletePlayerConfirm:int = 8;
public static const OSBubbleBangSInd:int = 0;
public static const miGameContinue:int = 16;
public static const miChoosePlayer:int = 7;
public static const sServer:String = "www.wellgames.com";
public static const sDebug:Boolean = false;
private static const OSoundParams:Array = [UI.OSBubbleBang01, UI.OSBubbleBang02, UI.OSBubbleBang03, UI.OSBubbleBang04, UI.OSBubbleBang05, UI.OSBubbleBang06, UI.OSBubbleBang07, UI.OSBubbleBang08, UI.OSBubbleBang09, UI.OSBubbleBang10, UI.OSBubbleBang11];
public static const miEnterNameFirst:int = 3;
public static const sBBannerPrefix:String = "ru/bottom/";
public static const sURLRating:String = "http://wellgames.com/rating/wellratings.php";
public static const sTBannerPrefix:String = "ru/top/";
public static const sZone:String = "Clasterz";
public static const strConnect2URL:String = "http://www.wellgames.com/ru/?g=clusterz_ru";
public static const sBannerID:String = "clusterz";
public static const miLastWindow:int = 1;
public static const sXTName:String = "cr";
public static const strGameName:String = "CLUSTERZ!";
private static const iWOptionsVolume:Array = [SStrings.getString("strOff"), "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"];
public static var OWLanguageParam:Array = [[GL.BigFrame, 460, 385, "green1", "green1", 170, 120, null, 0, true], [GL.Header, 350, 40, "blue", SStrings.getString("strLanguage"), 225, 145, null, 0, true], [GL.ListBoxText, 320, 40, "yellow", "yellow", 5, null, 200, 195, "iListBox", 0, true], [GL.MakeTextButton, 190, 46, "aqua", "aqua", 25, SStrings.getString("strChange"), 200, 439, "btnChange", 0, true], [GL.MakeTextButton, 190, 46, "yellow1", "yellow1", 25, SStrings.getString("strCancel"), 410, 439, "btnCancel", 0, true]];
public static var OWMenuReiting:Array = [[GL.Header, 800, 30, "yellow", "W", 0, 380, null, 0, true]];
public static var OWGameScoreElement:Array = [OInterface.OTabMake, [[GL.Header, 18, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 18, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 18, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 18, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 18, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 18, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 18, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 18, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 18, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 18, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 18, 30, "270", "9", 0, 0, null, 0, false]], 18, 30, UI_RU.OWGameCounterAnimator, null];
public static var OWResultsTotalScore:Array = [[GL.TextAlign, 465, 34, 32, "yellow1", SStrings.getString("strTotalScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 32, "yellow1", "9", 2, 1, 0, 0, null, 0, true]];
private static var OTimerAnimator:Object = {F:OA_AlphaFade.Make, iSAlpha:-1, iEAlpha:0, iSInd:[0], iEInd:[1], iPIter:15};
public static var OWInfoPConnect:Array = [[GL.Header, 250, 25, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.MakeTextButton, 260, 50, "yellow", "yellow", 25, SStrings.getString("strPlayOnline"), 5, 310, null, 0, true]];
public static var OWResultsBonusScore:Array = [[GL.TextAlign, 465, 34, 32, "red", SStrings.getString("strBonusScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 32, "red", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWHighScoreLocal:Array = [[GL.TextAlign, 510, 30, 30, "red", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "red1", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "yellow1", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "green", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams);
public static var OWMenu:Array = [[GL.Header, 800, 30, "magenta1", SStrings.getString("strWelcome"), 0, 10, null, 0, true], [GL.Header, 800, 30, "white", SStrings.getString("strChangePlayer"), 0, 55, "iTextChange", 0, true], [GL.ColorText, 120, UI_RU.OWGameNameColor, UI_RU.strGameName, null, 70, 75, "iGameName", 0, true], [GL.InvisibleButton, 400, 75, 200, 10, "iBName", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterF, 20, 226, "iCPlayers", 0, true], [GL.ColorText, 30, UI_RU.OWPlayersColor, SStrings.getString("strPlayersOnline"), null, 20, 220, "iPlayers", 0, true], [GL.MakeTextButton, 300, 75, "aqua1", "aqua1", 40, SStrings.getString("strPlayOnline"), 250, 275, "iPlayOnline", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 588, 278, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 30, 278, "iAppStore", 0, true], [GL.MakeTextButton, 320, 60, "yellow", "yellow", 25, SStrings.getString("strOptions"), 50, 425, "iOptions", 0, true], [GL.MakeTextButton, 320, 60, "yellow1", "yellow1", 25, SStrings.getString("strInstructions"), 420, 425, "iInstructions", 0, true], [GL.MakeTextButton, 320, 60, "aqua", "aqua", 25, SStrings.getString("strHighScores"), 30, 505, "iHighScores", 0, true], [GL.MakeTextButton, 320, 60, "magenta", "magenta", 25, SStrings.getString("strMoreGames"), 450, 505, "iMoreGames", 0, true]];
public static var OWInfoP:Array = [[GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 265, null, 0, true]];
public static var OWHighScores:Array = [[GL.BigFrame, 620, 480, "yellow", "white", 0, 0, null, 0, true], [GL.Header, 620, 50, "yellow", SStrings.getString("strHighScores"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 280, 50, "aqua1", false, 210, 40, "aqua1", "", UI_RU.OWHighScoresType, 160, 75, "iType", 0, true], [GL.SmallBorder, 540, 220, "yellow", 30, 130, null, 0, true], [ODisplay.IDisplayObjectMake, UI_RU.OWHighScoreTabF, 45, 145, "iTable", 0, true], [GL.MakeTextButton, 190, 60, "red", "red", 30, SStrings.getString("strClear"), 100, 380, "iClear", 0, true], [GL.MakeTextButton, 190, 60, "yellow1", "yellow1", 30, SStrings.getString("strClose"), 330, 380, "iClose", 0, true]];
public static var OWDeleteScoresConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeleteScoresConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWInGameMenuParam:Array = [[GL.BigFrame, 350, 335, "green1", "green1", 225, 145, null, 0, true], [GL.MakeTextButton, 250, 46, "red", "red", 25, SStrings.getString("strMainMenu"), 275, 180, "btnMainMenu", 0, true], [GL.MakeTextButton, 250, 46, "aqua1", "aqua1", 25, SStrings.getString("strOptions"), 275, 235, "btnOptions", 0, true], [GL.MakeTextButton, 250, 46, "aqua", "aqua", 25, SStrings.getString("strInstructions"), 275, 290, "btnInstructions", 0, true], [GL.MakeTextButton, 250, 46, "yellow1", "yellow1", 25, SStrings.getString("strMoreGames"), 275, 345, "btnMoreGames", 0, true], [GL.MakeTextButton, 250, 46, "yellow", "yellow", 25, SStrings.getString("strResume"), 275, 400, "btnResume", 0, true]];
public static var OWColors:Array = ["0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330"];
private static var OWHighScoreTabF:Array = [OInterface.OTabMake, [[OInterface.OIObjectMake, UI_RU.OWHighScoreLocal, null, 0, 0, null, 0, false], [OInterface.OIObjectMake, UI_RU.OWHighScorePersonal, null, 0, 0, null, 0, false]], 410, 270, UI_RU.OTimerAnimator, null];
public static var OWEnterName:Array = [[GL.BigFrame, 460, 320, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 460, 50, "aqua1", SStrings.getString("strNewPlayer"), 0, 20, null, 0, true], [GL.Header, 460, 30, "yellow", SStrings.getString("strEnterName"), 0, 90, null, 0, true], [GL.Header, 460, 25, "magenta1", SStrings.getString("strEnterNameLat"), 0, 195, null, 0, true], [GL.InputText, 400, 60, "yellow", "well", [45, 0.9, 0.6], 11, 30, 125, "iName", 0, true], [GL.MakeTextButton, (170 + 20), 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), 20, 235, "iAccept", 0, true], [GL.MakeTextButton, (190 + 20), 60, "red", "red", 30, SStrings.getString("strCancel"), 240, 235, "iCancel", 0, true]];
private static var OWGameScoreFO:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElementO, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 13, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 26, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 39, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 52, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 65, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 78, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 91, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElementO, 104, 0, "iDigits", 8, true]], 110, 23];
public static var OWGameAlert:Array = [[GL.MakeTextButton, 250, 60, "yellow", "yellow", 30, SStrings.getString("strContinueGame"), 0, 0, "iButtons", 0, true], [GL.MakeTextButton, 250, 60, "yellow1", "yellow1", 30, SStrings.getString("strNewGame"), 0, 70, "iButtons", 1, true]];
public static var OWIntroParam:Array = [[OSprite.Make, [[ODisplay.SpriteRect, (800 * OGlobal.Scale), (600 * OGlobal.Scale)]], 0, 0, "iHit", 0, false], [GL.Header, 800, 50, "aqua1", UI_RU.strSite, 0, 160, "iHeader", 0, true], [GL.Header, 800, 40, "aqua1", SStrings.getString("strPresents"), 0, 400, "iFooter", 0, true], [GL.ColorText, 120, UI_RU.OWGameNameColor, UI_RU.strGameName, null, 75, 100, "iGameName", 0, true]];
private static var OWGameScoreF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWGameScoreElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 18, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 36, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 54, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 72, 0, "iDigits", 4, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 90, 0, "iDigits", 5, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 108, 0, "iDigits", 6, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 126, 0, "iDigits", 7, true], [ODisplay.IDisplayObjectMake, OWGameScoreElement, 144, 0, "iDigits", 8, true]], 250, 30];
public static var OWGameConnection:Array = [GL.ColorText, 30, UI_RU.OWColors, SStrings.getString("strConnectionToServer"), OInterface.iDefSlowAnimators];
public static var OWHighScorePersonal:Array = [[GL.TextAlign, 510, 30, 30, "aqua1", "W", 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "aqua1", "9", 2, 1, 0, 0, null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "W", 0, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue", "9", 2, 1, 0, (35 + 5), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "W", 0, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "blue1", "9", 2, 1, 0, (70 + 10), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "W", 0, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta", "9", 2, 1, 0, (105 + 15), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "W", 0, 1, 0, (140 + 20), null, 0, true], [GL.TextAlign, 510, 30, 30, "magenta1", "9", 2, 1, 0, (140 + 20), null, 0, true]];
private static var OWPlayersCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 51, 0, "iDigits", 3, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 67, 0, "iDigits", 4, true]], 85, 30];
public static var OWOptions:Array = [[GL.BigFrame, 540, 390, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 540, 50, "aqua1", SStrings.getString("strOptions"), 0, 20, null, 0, true], [GL.ListBoxTextHSlider, 520, 50, "magenta", false, 90, 40, "magenta", SStrings.getString("strSound"), UI_RU.iWOptionsVolume, 10, 90, "iSound", 0, true], [GL.ListBoxTextHSlider, 520, 50, "yellow", false, 90, 40, "yellow", SStrings.getString("strMusic"), UI_RU.iWOptionsVolume, 10, 140, "iMusic", 0, true], [GL.ListBoxTextHSlider, 520, 50, "green1", false, 200, 40, "green1", SStrings.getString("strWindow"), null, 10, 190, "iResolution", 0, true], [GL.ListBoxTextHSlider, 520, 50, "red1", false, 90, 40, "red1", SStrings.getString("strFullScreen"), UI_RU.iWOptionsOnOff, 10, 240, "iFullScreen", 0, true], [GL.MakeTextButton, 210, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), (73 - 10), 310, "iAccept", 0, true], [GL.MakeTextButton, 210, 60, "red", "red", 30, SStrings.getString("strCancel"), (283 + 10), 310, "iCancel", 0, true]];
private static var OWGameLevelCounterF:Array = [OInterface.OCounterMake, [[ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 0, 0, "iDigits", 0, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 17, 0, "iDigits", 1, true], [ODisplay.IDisplayObjectMake, OWPlayersCounterElement, 34, 0, "iDigits", 2, true]], 250, 30];
private static var OWPlayersCounterElement:Array = [OInterface.OTabMake, [[GL.Header, 17, 30, "0", " ", 0, 0, null, 0, false], [GL.Header, 17, 30, "0", "0", 0, 0, null, 0, false], [GL.Header, 17, 30, "30", "1", 0, 0, null, 0, false], [GL.Header, 17, 30, "60", "2", 0, 0, null, 0, false], [GL.Header, 17, 30, "90", "3", 0, 0, null, 0, false], [GL.Header, 17, 30, "120", "4", 0, 0, null, 0, false], [GL.Header, 17, 30, "150", "5", 0, 0, null, 0, false], [GL.Header, 17, 30, "180", "6", 0, 0, null, 0, false], [GL.Header, 17, 30, "210", "7", 0, 0, null, 0, false], [GL.Header, 17, 30, "240", "8", 0, 0, null, 0, false], [GL.Header, 17, 30, "270", "9", 0, 0, null, 0, false]], 17, 30, UI_RU.OTimerAnimator, null];
public static var OWGameScoreElementO:Array = [OInterface.OTabMake, [[GL.Header, 13, 23, "0", " ", 0, 0, null, 0, false], [GL.Header, 13, 23, "0", "0", 0, 0, null, 0, false], [GL.Header, 13, 23, "30", "1", 0, 0, null, 0, false], [GL.Header, 13, 23, "60", "2", 0, 0, null, 0, false], [GL.Header, 13, 23, "90", "3", 0, 0, null, 0, false], [GL.Header, 13, 23, "120", "4", 0, 0, null, 0, false], [GL.Header, 13, 23, "150", "5", 0, 0, null, 0, false], [GL.Header, 13, 23, "180", "6", 0, 0, null, 0, false], [GL.Header, 13, 23, "210", "7", 0, 0, null, 0, false], [GL.Header, 13, 23, "240", "8", 0, 0, null, 0, false], [GL.Header, 13, 23, "270", "9", 0, 0, null, 0, false]], 13, 22, UI_RU.OWGameCounterAnimator, null];
public static var OWCommingSoon:Array = [[GL.BigFrame, 530, 290, "yellow1", "yellow", 0, 0, null, 0, true], [GL.Header, 530, 50, "red", SStrings.getString("strCommingSoon"), 0, 20, null, 0, true], [GL.Header, 530, 30, "magenta", SStrings.getString("strCommingSoonI"), 0, 125, null, 0, true], [GL.MakeTextButton, 170, 60, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 180, 210, null, 0, true]];
public static var OWDeletePlayerConfirm:Array = [[GL.BigFrame, 420, 270, "red", "yellow", 0, 0, null, 0, true], [GL.Header, 420, 30, "aqua1", SStrings.getString("strDeletePlayerConfirm"), 0, 85, null, 0, true], [GL.MakeTextButton, 150, 60, "yellow1", "yellow1", 30, SStrings.getString("strYes"), 50, 190, "iButtons", 0, true], [GL.MakeTextButton, 150, 60, "red", "red", 30, SStrings.getString("strNo"), 220, 190, "iButtons", 1, true]];
public static var OWResultsReiting:Array = [[GL.ColorText, 40, OWPlayersColor, SStrings.getString("strYourReiting"), OInterface.iDefSlowAnimators, 85, 0, null, 0, true], [GL.Header, 465, 40, "aqua1", "9", 0, 60, 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 OWGameNameColor:Array = ["blue1", "red", "yellow", "yellow1", "aqua1", "yellow1", "yellow", "red", "blue1"];
public static var OWInstructions:Array = [[GL.BigFrame, 700, 520, "yellow", "white", 50, 40, null, 0, true], [ODisplay.IDisplayObjectMake, OWGameScoreF, 280, 500, "iScore", 0, false], [GL.Header, 700, 50, "yellow", SStrings.getString("strInstructions"), 50, 60, null, 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText1"), 490, 280, "iInstr1", 0, true], [GL.Header, 200, 20, "green", SStrings.getString("strInstructionsText2"), 490, 290, "iInstr2", 0, false], [GL.MakeTextButton, 190, 50, "aqua1", "aqua1", 30, SStrings.getString("strClose"), 510, 490, "iClose", 0, true]];
public static var OWIPGameName:Array = [[GL.ColorText, 40, UI_RU.OWGameNameColor, UI_RU.strGameName, null, 5, 150, 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 OWInfoPUserNotFound:Array = [[GL.Header, 250, 40, "yellow", SStrings.getString("strConnect1"), 5, 200, null, 0, true], [GL.Header, 250, 30, "yellow", SStrings.getString("strConnect1"), 5, 270, null, 0, true]];
public static var OWChoosePlayer:Array = [[GL.BigFrame, 500, 500, "aqua1", "white", 0, 0, null, 0, true], [GL.Header, 500, 50, "aqua1", SStrings.getString("strChoosePlayer"), 0, 20, null, 0, true], [GL.ListBoxText, 360, 40, "yellow", "yellow", 5, null, 30, 90, "iListBox", 0, true], [GL.MakeTextButton, 170, 60, "yellow", "yellow", 30, SStrings.getString("strNew"), 30, 340, "iNew", 0, true], [GL.MakeTextButton, 170, 60, "magenta", "magenta", 30, SStrings.getString("strDelete"), 300, 340, "iDelete", 0, true], [GL.MakeTextButton, 210, 60, "yellow1", "yellow1", 30, SStrings.getString("strAccept"), (50 - 10), 420, "iAccept", 0, true], [GL.MakeTextButton, 210, 60, "red", "red", 30, SStrings.getString("strCancel"), (260 + 10), 420, "iCancel", 0, true]];
public static var OWGameNewLevel:Array = [GL.ColorText, 60, UI_RU.OWColors, SStrings.getString("strLevel"), OInterface.iDefSlowAnimators];
public static var OWInfoPPlayer:Array = [[GL.ColorHeader, 270, 25, UI_RU.OWColors, SStrings.getString("strOpponent1"), null, 0, 415, null, 0, true], [GL.ColorHeader, 270, 25, UI_RU.OWPlayersColor, SStrings.getString("strLevel"), null, 0, 445, null, 0, true]];
public static var OWGame:Array = [[GL.ColorText, 45, UI_RU.OWGameNameColor, UI_RU.strGameName, null, 535, 13, null, 0, true], [GL.Header, 250, 25, "aqua1", UI_RU.strSite, 537, 505, null, 0, true], [GL.InvisibleButton, 250, 25, 537, 505, "iSite", 0, true], [GL.ColorText, 30, UI_RU.OWPlayersColor, SStrings.getString("strLevel"), null, 15, 553, "iLevel", 0, false], [ODisplay.IDisplayObjectMake, OWGameLevelCounterF, 65, 562, "iLevelC", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreF, 268, 562, "iScore", 0, false], [ODisplay.IDisplayObjectMake, OWGameScoreFO, 680, 375, "iScoreO", 0, false], [GL.MakeTextButton, 120, 50, "aqua1", "aqua1", 25, SStrings.getString("strMenu"), 610, 540, "iMenu", 0, true]];
public static var OWInfoUpSell:Array = [[GL.MakeImageButton, 182, 69, "", 30, "red", [UI.amazon_store, UI.amazon_store, UI.amazon_store], 40, 300, "iAmazonStore", 0, true], [GL.MakeImageButton, 182, 69, "", 30, "red", [UI.app_store, UI.app_store, UI.app_store], 40, 220, "iAppStore", 0, true]];
public static var OWResultsLevelScore:Array = [[GL.TextAlign, 465, 34, 32, "yellow", SStrings.getString("strGainedScore"), 0, 1, 0, 0, null, 0, true], [GL.TextAlign, 465, 34, 32, "yellow", "9", 2, 1, 0, 0, null, 0, true]];
public static var OWResults:Array = [[GL.ColorText, 45, OWColors, SStrings.getString("strLevelComplete"), OInterface.iDefSlowAnimators, 25, 60, null, 0, false], [OInterface.OIObjectMake, OWResultsLevelScore, OInterface.iDefSlowAnimators, 35, 150, null, 0, false], [OInterface.OIObjectMake, OWResultsBonusScore, OInterface.iDefSlowAnimators, 35, 195, null, 0, false], [OInterface.OIObjectMake, OWResultsTotalScore, OInterface.iDefSlowAnimators, 35, 240, null, 0, false], [OInterface.OIObjectMake, OWResultsReiting, OInterface.iDefSlowAnimators, 35, 285, null, 0, false], [GL.MakeTextButton, 390, 60, "yellow1", "yellow1", 30, SStrings.getString("strNextLevel"), 85, 400, "iButtons", 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm"), 0, 480, null, 0, false], [GL.Header, 530, 25, "yellow", SStrings.getString("strLevelConfirm1"), 0, 507, null, 0, false], [GL.MakeTextButton, 390, 60, "yellow1", "yellow1", 30, SStrings.getString("strSubmitScore"), 85, 475, "iSubmit", 0, false]];
}
}//package