Section 1
//OAdBanner (ENGINE.AD.OAdBanner)
package ENGINE.AD {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class OAdBanner {
private var iManager:DisplayObject;
private var iID:String;
private var iBanner:DisplayObject;
private var iPrefix:String;
private var iLoader:Loader;
private static const strURL:String = "http://wellgames.com/ad/";
public function OAdBanner(_arg1:String, _arg2:String){
this.iPrefix = _arg1;
this.iID = _arg2;
this.iLoader = new Loader();
this.iLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, OnIOError);
this.iLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, OnComplete);
this.iLoader.load(new URLRequest(this.prURL));
}
private function OnIOError(_arg1:IOErrorEvent):void{
}
public function DeleteBanner():void{
this.iBanner = null;
}
private function get prURL():String{
return ((((((OAdBanner.strURL + this.iPrefix) + "AdBanner.swf?r=") + this.iPrefix) + this.iID) + "&i=-1"));
}
public function get prBanner():DisplayObject{
return (this.iBanner);
}
public function CreateBanner():void{
if (this.iManager){
this.iBanner = this.iManager["prBanner"];
};
}
private function OnComplete(_arg1:Event):void{
this.iManager = this.iLoader.content;
}
}
}//package ENGINE.AD
Section 2
//OAdBanners (ENGINE.AD.OAdBanners)
package ENGINE.AD {
import flash.display.*;
import ENGINE.CORE.*;
public class OAdBanners {
public static var iBBanner:OAdBanner;
public static var iTBanner:OAdBanner;
public static function InitTBanner(_arg1:String, _arg2:String):void{
OAdBanners.iTBanner = new OAdBanner(_arg1, _arg2);
}
public static function RemoveBBanner(_arg1:DisplayObjectContainer):void{
var _local2:Sprite;
_local2 = (OAdBanners.iBBanner.prBanner as Sprite);
if (((_local2) && (_arg1.contains(_local2)))){
_arg1.removeChild(_local2);
};
OAdBanners.iBBanner.DeleteBanner();
}
public static function AddBBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{
var _local6:Sprite;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
OAdBanners.iBBanner.CreateBanner();
_local6 = (OAdBanners.iBBanner.prBanner as Sprite);
if (!_local6){
return;
};
_local7 = OGlobal.ToGlobal(_arg2);
_local8 = OGlobal.ToGlobal(_arg3);
_local9 = OGlobal.ToGlobal(_arg4);
_local10 = OGlobal.ToGlobal(_arg5);
_local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2)));
_local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2)));
_arg1.addChild(_local6);
}
public static function RemoveTBanner(_arg1:DisplayObjectContainer):void{
var _local2:Sprite;
_local2 = (OAdBanners.iTBanner.prBanner as Sprite);
if (((_local2) && (_arg1.contains(_local2)))){
_arg1.removeChild(_local2);
};
OAdBanners.iTBanner.DeleteBanner();
}
public static function InitBBanner(_arg1:String, _arg2:String):void{
OAdBanners.iBBanner = new OAdBanner(_arg1, _arg2);
}
public static function AddTBanner(_arg1:DisplayObjectContainer, _arg2:int, _arg3:int, _arg4:int=0, _arg5:int=0):void{
var _local6:Sprite;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
OAdBanners.iTBanner.CreateBanner();
_local6 = (OAdBanners.iTBanner.prBanner as Sprite);
if (!_local6){
return;
};
_local7 = OGlobal.ToGlobal(_arg2);
_local8 = OGlobal.ToGlobal(_arg3);
_local9 = OGlobal.ToGlobal(_arg4);
_local10 = OGlobal.ToGlobal(_arg5);
_local6.x = Math.floor((_local7 + ((_local9 - _local6.width) / 2)));
_local6.y = Math.floor((_local8 + ((_local10 - _local6.height) / 2)));
_arg1.addChild(_local6);
}
}
}//package ENGINE.AD
Section 3
//OCache (ENGINE.CORE.OCache)
package ENGINE.CORE {
import flash.utils.*;
public dynamic class OCache {
public function Pack():ByteArray{
var _local1:ByteArray;
_local1 = new ByteArray();
_local1.writeObject(this);
return (_local1);
}
public function AddCategoryArr(_arg1:String, _arg2:String):Array{
var _local3:OCache;
_local3 = ((this[_arg1])==undefined) ? AddCategory(_arg1) : this[_arg1];
return (_local3.AddArr(_arg2));
}
public function GetArrItem(_arg1:String, _arg2:int){
if ((((this[_arg1] == undefined)) || ((this[_arg1][_arg2] == undefined)))){
return (null);
};
return (this[_arg1][_arg2]);
}
public function DeleteArrItem(_arg1:String, _arg2:int):void{
if (this[_arg1] == undefined){
return;
};
this[_arg1].splice(_arg2, 1);
}
public function IsCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):Boolean{
if (this[_arg1] == undefined){
return (false);
};
return (this[_arg1].IsArrItem(_arg2, _arg3));
}
public function GetCategoryItem(_arg1:String, _arg2:String){
if (this[_arg1] == undefined){
return (null);
};
return (this[_arg1].GetItem(_arg2));
}
public function SetCategoryItem(_arg1:String, _arg2:String, _arg3):void{
if (this[_arg1] == undefined){
this[_arg1] = new OCache();
};
this[_arg1].SetItem(_arg2, _arg3);
}
public function SetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int, _arg4):void{
if (this[_arg1] == undefined){
this[_arg1] = new OCache();
};
this[_arg1].SetArrItem(_arg2, _arg3, _arg4);
}
public function IsCategoryItem(_arg1:String, _arg2:String):Boolean{
if (this[_arg1] == undefined){
return (false);
};
return (this[_arg1].IsItem(_arg2));
}
public function DeleteCategoryItem(_arg1:String, _arg2:String):void{
if (this[_arg1] == undefined){
return;
};
this[_arg1].DeleteItem(_arg2);
}
public function AddCategory(_arg1:String):OCache{
this[_arg1] = new OCache();
return (this[_arg1]);
}
public function GetCategoryArrItem(_arg1:String, _arg2:String, _arg3:int){
if (this[_arg1] == undefined){
return (null);
};
return (GetArrItem(_arg2, _arg3));
}
public function GetCategoryNames(_arg1:String):Array{
var _local2:Array;
var _local3:String;
if (this[_arg1] == undefined){
return (null);
};
_local2 = new Array();
for (_local3 in this[_arg1]) {
_local2.push(_local3);
};
return ((_local2.length) ? _local2.sort() : null);
}
public function AddArr(_arg1:String):Array{
this[_arg1] = new Array();
return (this[_arg1]);
}
public function GetItem(_arg1:String){
if (this[_arg1] == undefined){
return (null);
};
return (this[_arg1]);
}
public function IsArrItem(_arg1:String, _arg2:int):Boolean{
return (((!((this[_arg1] == undefined))) && (!((this[_arg1][_arg2] == undefined)))));
}
public function DeleteCategoryArrItem(_arg1:String, _arg2:String, _arg3:int):void{
if (this[_arg1] == undefined){
return;
};
this[_arg1].DeleteArrItem(_arg2, _arg3);
}
public function Clear():void{
var _local1:String;
for (_local1 in this) {
delete this[_local1];
};
}
public function SetArrItem(_arg1:String, _arg2:int, _arg3):void{
if (this[_arg1] == undefined){
this[_arg1] = new Array();
};
this[_arg1][_arg2] = _arg3;
}
public function SetItem(_arg1:String, _arg2):void{
this[_arg1] = _arg2;
}
public function GetNames():Array{
var _local1:Array;
var _local2:String;
_local1 = new Array();
for (_local2 in this) {
_local1.push(_local2);
};
return ((_local1.length) ? _local1.sort() : null);
}
public function IsItem(_arg1:String):Boolean{
return (!((this[_arg1] == undefined)));
}
public function DeleteItem(_arg1:String):void{
if (this[_arg1] == undefined){
return;
};
delete this[_arg1];
}
}
}//package ENGINE.CORE
Section 4
//OGlobal (ENGINE.CORE.OGlobal)
package ENGINE.CORE {
import flash.display.*;
import flash.geom.*;
import flash.net.*;
public class OGlobal {
private static var iFPS:int = 60;
private static var iDomain:String;
private static var iSRect:Rectangle = new Rectangle();
private static var iVRect:Rectangle = new Rectangle(0, 0, 800, 600);
private static var iStage:Stage;
private static var iScale:Number = 1;
private static var iAppName:String;
private static var iOldScale:Number = 1;
public static function get FPS():int{
return (OGlobal.iFPS);
}
public static function CheckDomain(_arg1:String):Boolean{
var _local2:int;
_local2 = OGlobal.iDomain.indexOf(_arg1);
return ((((_local2 >= 0)) && ((_local2 <= 4))));
}
public static function ToLocal(_arg1:Number):Number{
return ((_arg1 / OGlobal.iScale));
}
public static function set FPS(_arg1:int):void{
OGlobal.iFPS = _arg1;
if (OGlobal.iStage){
OGlobal.iStage.frameRate = _arg1;
};
}
public static function Rescale(_arg1:Sprite, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = (((OGlobal.iStage.stageWidth / OGlobal.iStage.stageHeight))<=(800 / 600)) ? (OGlobal.iStage.stageWidth / 800) : (OGlobal.iStage.stageHeight / 600);
OGlobal.iSRect.x = 0;
OGlobal.iSRect.y = 0;
OGlobal.iSRect.width = OGlobal.iStage.stageWidth;
OGlobal.iSRect.height = OGlobal.iStage.stageHeight;
OGlobal.iVRect.width = Math.round((800 * _local3));
OGlobal.iVRect.height = Math.round((600 * _local3));
OGlobal.iVRect.x = Math.floor(((OGlobal.iStage.stageWidth - OGlobal.iVRect.width) / 2));
OGlobal.iVRect.y = Math.floor(((OGlobal.iStage.stageHeight - OGlobal.iVRect.height) / 2));
if (_arg2){
_arg1.x = OGlobal.iVRect.x;
_arg1.y = OGlobal.iVRect.y;
};
OGlobal.iScale = _local3;
}
public static function get prStage():Stage{
return (OGlobal.iStage);
}
public static function ClearScale(_arg1:Number=1):void{
OGlobal.iOldScale = OGlobal.iScale;
OGlobal.iScale = _arg1;
OGlobal.iVRect = OGlobal.iSRect.clone();
}
public static function ToGlobal(_arg1:Number):Number{
return ((_arg1 * OGlobal.iScale));
}
public static function set AppName(_arg1:String):void{
OGlobal.iAppName = ("WellGames_" + _arg1);
}
public static function get Domain():String{
return (OGlobal.iDomain);
}
public static function SetDomain():void{
var _local1:LocalConnection;
_local1 = new LocalConnection();
OGlobal.iDomain = _local1.domain;
}
public static function get StageRect():Rectangle{
return (OGlobal.iSRect);
}
public static function ScaleFloor(_arg1:Number):Number{
return ((Math.floor((_arg1 * OGlobal.iScale)) / OGlobal.iScale));
}
public static function get Scale():Number{
return (OGlobal.iScale);
}
public static function get ViewporRect():Rectangle{
return (OGlobal.iVRect);
}
public static function get AppName():String{
return (OGlobal.iAppName);
}
public static function set prStage(_arg1:Stage):void{
OGlobal.iStage = _arg1;
}
public static function RestoreScale():void{
OGlobal.iScale = OGlobal.iOldScale;
}
public static function ScaleMod(_arg1:Number):Number{
var _local2:Number;
_local2 = (_arg1 * OGlobal.iScale);
return (((_local2 - Math.floor(_local2)) / OGlobal.iScale));
}
}
}//package ENGINE.CORE
Section 5
//ORandomInt (ENGINE.CORE.ORandomInt)
package ENGINE.CORE {
import flash.utils.*;
public class ORandomInt {
private var iNextRandom:int;
public function ORandomInt(){
iNextRandom = getTimer();
}
public function RandNumber():Number{
var _local1:Number;
_local1 = Rand();
return ((_local1 / 32767));
}
public function Rand():int{
iNextRandom = ((iNextRandom * 1103515245) + 12345);
return (((iNextRandom >> 16) & 32767));
}
public function get NextRandom():int{
return (this.iNextRandom);
}
public function RandOnInterval(_arg1:Number=0, _arg2:Number=1):int{
return ((_arg1 + (Rand() % ((1 + _arg2) - _arg1))));
}
public function RandVal(_arg1:int):int{
var _local2:Number;
_local2 = Rand();
return ((_local2 % _arg1));
}
public function SeedRand(_arg1:int=0):void{
if (_arg1 == 0){
iNextRandom = getTimer();
} else {
iNextRandom = _arg1;
};
}
}
}//package ENGINE.CORE
Section 6
//OSound (ENGINE.CORE.OSound)
package ENGINE.CORE {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
public class OSound {
private static var iMusicInd:int = 0;
private static var iSoundsObjects:Array;
private static var iSounds:Dictionary = new Dictionary(true);
private static var iMusicPlayList:Array = new Array();
private static var iSoundVolume:Number = 1;
private static var iMusicChannel:SoundChannel;
private static var iMusicVolume:Number = 1;
private static var iMusic:Sound;
public static function PlaySoundInd(_arg1:int, _arg2:Number=0):Boolean{
if (OSound.iSoundVolume == 0){
return (false);
};
_arg1 = Math.max(_arg1, 0);
_arg1 = Math.min(_arg1, (OSound.iSoundsObjects.length - 1));
return (OSound.PlaySound(OSound.iSoundsObjects[_arg1], _arg2));
}
public static function set MusicVolume(_arg1:Number):void{
var _local2:SoundTransform;
OSound.iMusicVolume = _arg1;
if (OSound.iMusicChannel){
if (_arg1 == 0){
OSound.StopMusic();
} else {
_local2 = OSound.iMusicChannel.soundTransform;
_local2.volume = _arg1;
OSound.iMusicChannel.soundTransform = _local2;
};
} else {
if (OSound.iMusicVolume > 0){
OSound.PlayMusic();
};
};
}
private static function OnMusicLoadComplete(_arg1:Event):void{
if (OSound.iMusicVolume == 0){
return;
};
OSound.iMusicChannel = iMusic.play(0, 0, new SoundTransform(OSound.iMusicVolume, 0));
OSound.RemoveMusic();
OSound.iMusicChannel.addEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
}
public static function set SoundVolume(_arg1:Number):void{
OSound.iSoundVolume = _arg1;
}
private static function OnMusicLoadIOError(_arg1:Event):void{
OSound.RemoveMusic();
OSound.iMusicPlayList.splice(OSound.iMusicInd, 1);
OSound.iMusicInd = ((OSound.iMusicInd > (OSound.iMusicPlayList.length - 1))) ? (OSound.iMusicPlayList.length - 1) : OSound.iMusicInd;
OSound.PlayMusic();
}
private static function OnMusicComplete(_arg1:Event):void{
PlayMusic();
}
public static function PlaySound(_arg1:Class, _arg2:Number=0):Boolean{
var _local3:Sound;
if (OSound.iSoundVolume == 0){
return (false);
};
_local3 = OSound.iSounds[_arg1];
if (_local3 != null){
_local3.play(0, 0, new SoundTransform(OSound.iSoundVolume, _arg2));
};
return (!((_local3 == null)));
}
private static function RemoveMusic():void{
if (OSound.iMusic){
OSound.iMusic.removeEventListener(Event.COMPLETE, OSound.OnMusicLoadComplete);
OSound.iMusic.removeEventListener(IOErrorEvent.IO_ERROR, OSound.OnMusicLoadIOError);
OSound.iMusic = null;
};
}
public static function StopMusic():void{
if (OSound.iMusicChannel){
OSound.iMusicChannel.removeEventListener(Event.SOUND_COMPLETE, OnMusicComplete);
OSound.iMusicChannel.stop();
OSound.iMusicChannel = null;
};
}
public static function get SoundVolume():Number{
return (OSound.iSoundVolume);
}
public static function PlayListClear():void{
OSound.iMusicPlayList = new Array();
}
public static function PlayListAdd(_arg1:String):void{
OSound.iMusicPlayList.push(_arg1);
OSound.iMusicInd = (OSound.iMusicPlayList.length - 1);
}
public static function PlayMusic():void{
var request:URLRequest;
if ((((OSound.iMusicVolume == 0)) || (!(OSound.iMusicPlayList.length)))){
return;
};
OSound.StopMusic();
OSound.iMusicInd = ((OSound.iMusicInd + 1) % OSound.iMusicPlayList.length);
request = new URLRequest(OSound.iMusicPlayList[OSound.iMusicInd]);
OSound.iMusic = new Sound();
OSound.iMusic.addEventListener(Event.COMPLETE, OSound.OnMusicLoadComplete);
OSound.iMusic.addEventListener(IOErrorEvent.IO_ERROR, OSound.OnMusicLoadIOError);
try {
OSound.iMusic.load(request);
} catch(e:Error) {
};
}
public static function RegisterEmbedSounds(_arg1:Array):Boolean{
var _local2:int;
var _local3:Sound;
OSound.iSoundsObjects = _arg1;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = (new (_arg1[_local2]) as Sound);
OSound.iSounds[_arg1[_local2]] = _local3;
_local2++;
};
return (true);
}
public static function PlaySoundRandom(_arg1:Number=0, _arg2:int=0, _arg3:int=-1):Boolean{
var _local4:int;
if (OSound.iSoundVolume == 0){
return (false);
};
_arg2 = Math.max(_arg2, 0);
_arg2 = Math.min(_arg2, (OSound.iSoundsObjects.length - 1));
if (_arg3 < 0){
_arg3 = (OSound.iSoundsObjects.length - 1);
};
_arg3 = Math.max(_arg3, 0);
_arg3 = Math.min(_arg3, (OSound.iSoundsObjects.length - 1));
_local4 = OUtils.Random(_arg2, _arg3);
return (OSound.PlaySound(OSound.iSoundsObjects[_local4], _arg1));
}
public static function get MusicVolume():Number{
return (OSound.iMusicVolume);
}
}
}//package ENGINE.CORE
Section 7
//OSystem (ENGINE.CORE.OSystem)
package ENGINE.CORE {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.system.*;
public class OSystem extends Sprite {
private var iLastTime:int;
private var iCount:int;
private var iText:TextField;
private var iSTimer:String;
public static var iUserText1:String = "";
public static var iUserText:String = "";
public static var iUserText2:String = "";
public function OSystem(){
this.iText = new TextField();
this.iText.autoSize = TextFieldAutoSize.LEFT;
this.iText.mouseEnabled = false;
this.addChild(this.iText);
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.iLastTime = getTimer();
this.iSTimer = "";
}
public function OnEnterFrame(_arg1:Event):void{
var _local2:uint;
var _local3:int;
_local2 = System.totalMemory;
_local3 = (getTimer() - this.iLastTime);
this.iCount++;
if (_local3 >= 1000){
this.iSTimer = String((Math.round(((_local3 / this.iCount) * 100)) / 100));
this.iLastTime = getTimer();
this.iCount = 0;
};
iText.text = ((((((((((_local2.toString() + " ") + this.iSTimer) + " ") + OGlobal.prStage.frameRate) + " | ") + OSystem.iUserText) + " ") + OSystem.iUserText1) + " ") + OSystem.iUserText2);
}
}
}//package ENGINE.CORE
Section 8
//OUtils (ENGINE.CORE.OUtils)
package ENGINE.CORE {
import ENGINE.DISPLAY.*;
import flash.geom.*;
public class OUtils {
public static function AddZero(_arg1:String, _arg2:int):String{
var _local3:String;
var _local4:int;
_local3 = "";
_local4 = _arg1.length;
while (_local4 < _arg2) {
_local3 = (_local3 + "0");
_local4++;
};
_local3 = (_local3 + _arg1);
return (_local3);
}
public static function Random(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * Math.random())));
}
public static function StringToTarget(_arg1:Class, _arg2:int, _arg3:String, _arg4:String, _arg5:int):String{
var _local6:Number;
var _local7:Rectangle;
var _local8:String;
var _local9:String;
var _local10:int;
_local6 = Math.round((1 + (_arg2 / 70)));
_local8 = ((_arg4)==null) ? "" : ((" (" + _arg4) + ")");
_local9 = (_arg3 + _local8);
_local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9);
if (_local7.width <= _arg5){
return (_local9);
};
_local8 = ("..." + _local8);
_local10 = (_arg3.length - 1);
while (_local10 > 0) {
_local9 = (_arg3.substr(0, _local10) + _local8);
_local7 = ODisplay.TextRect(_arg1, _arg2, _local6, _local9);
if (_local7.width <= _arg5){
return (_local9);
};
_local10--;
};
return ((_arg3.substr(0, 1) + _local8));
}
public static function ClearString(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:int;
_local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ";
_local3 = "";
_local4 = 0;
while (_local4 < _arg1.length) {
if (_local2.indexOf(_arg1.charAt(_local4)) > -1){
_local3 = (_local3 + _arg1.charAt(_local4));
};
_local4++;
};
return (_local3);
}
}
}//package ENGINE.CORE
Section 9
//OEffect (ENGINE.DISPLAY.EFFECTS.OEffect)
package ENGINE.DISPLAY.EFFECTS {
import ENGINE.DISPLAY.*;
import ENGINE.CORE.*;
import flash.filters.*;
public class OEffect {
protected var iColors:OCache;
protected var iFilters:OCache;
public function OEffect(){
this.iColors = new OCache();
this.iFilters = new OCache();
}
public function RegisterColor(_arg1:String, _arg2):void{
this.iColors.SetItem(_arg1, _arg2);
}
public function Init(_arg1:String, _arg2:String, _arg3:Number=1):void{
}
public function RegisterFilter(_arg1:String, _arg2):void{
this.iFilters.SetItem(_arg1, _arg2);
}
public function Apply(_arg1:Array, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0):OBM{
return (null);
}
public static function MakeBevelFilter(_arg1:Array):BevelFilter{
return (new BevelFilter(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[11], _arg1[12]));
}
}
}//package ENGINE.DISPLAY.EFFECTS
Section 10
//OEffects (ENGINE.DISPLAY.EFFECTS.OEffects)
package ENGINE.DISPLAY.EFFECTS {
import ENGINE.DISPLAY.*;
import ENGINE.CORE.*;
public class OEffects {
private static var iEffects:OCache = new OCache();
public static function RegisterColor(_arg1:String, _arg2:String, _arg3):void{
var _local4:OEffect;
_local4 = iEffects.GetItem(_arg1);
if (_local4 == null){
return;
};
_local4.RegisterColor(_arg2, _arg3);
}
public static function RegisterEffect(_arg1:String, _arg2:OEffect):void{
iEffects.SetItem(_arg1, _arg2);
}
public static function Make(_arg1:Array):OBM{
var _local2:OEffect;
_local2 = iEffects.GetItem(_arg1[3]);
if (_local2 == null){
return (null);
};
_local2.Init(_arg1[4], _arg1[5], _arg1[6]);
return (_local2.Apply(_arg1[1], _arg1[2], _arg1[7], _arg1[8]));
}
public static function GetEffect(_arg1:String):OEffect{
return (iEffects.GetItem(_arg1));
}
public static function RegisterFilter(_arg1:String, _arg2:String, _arg3):void{
var _local4:OEffect;
_local4 = iEffects.GetItem(_arg1);
if (_local4 == null){
return;
};
_local4.RegisterFilter(_arg2, _arg3);
}
public static function Apply(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBM{
var _local9:OEffect;
_local9 = iEffects.GetItem(_arg3);
if (_local9 == null){
return (null);
};
_local9.Init(_arg4, _arg5, _arg6);
return (_local9.Apply([ODisplay.SpriteLib, _arg1], _arg2, _arg7, _arg8));
}
}
}//package ENGINE.DISPLAY.EFFECTS
Section 11
//IDisplayObject (ENGINE.DISPLAY.IDisplayObject)
package ENGINE.DISPLAY {
public interface IDisplayObject {
function set prVisible(_arg1:Boolean):void;
function get prWidth():Number;
function get prHeight():Number;
function set prX(_arg1:Number):void;
function set prY(_arg1:Number):void;
function get prVisible():Boolean;
function Move(_arg1:Number, _arg2:Number):void;
function Pos(_arg1:Number, _arg2:Number):void;
function get prX():Number;
function get prY():Number;
}
}//package ENGINE.DISPLAY
Section 12
//OBitmap (ENGINE.DISPLAY.OBitmap)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.DISPLAY.EFFECTS.*;
import ENGINE.CORE.*;
import flash.text.*;
public class OBitmap extends Bitmap implements IDisplayObject {
protected var iY:Number;// = 0
protected var iX:Number;// = 0
protected var iOBM:OBM;// = null
public function OBitmap(_arg1:OBM=null, _arg2:Number=0, _arg3:Number=0){
iX = 0;
iY = 0;
iOBM = null;
super();
this.iX = _arg2;
this.iY = _arg3;
Init(_arg1);
}
public function get prVisible():Boolean{
return (this.visible);
}
public function set prX(_arg1:Number):void{
this.iX = _arg1;
Pos(this.iX, this.iY);
}
public function Clear():void{
this.Init(null);
}
public function set prOBM(_arg1:OBM):void{
this.Init(_arg1);
}
public function Pos(_arg1:Number, _arg2:Number):void{
this.iX = _arg1;
this.iY = _arg2;
if (this.iOBM){
this.x = ((this.iX * OGlobal.Scale) + this.iOBM.iX);
this.y = ((this.iY * OGlobal.Scale) + this.iOBM.iY);
} else {
this.x = (this.iX * OGlobal.Scale);
this.y = (this.iY * OGlobal.Scale);
};
}
public function set prY(_arg1:Number):void{
this.iY = _arg1;
Pos(this.iX, this.iY);
}
public function Init(_arg1:OBM):void{
this.iOBM = _arg1;
this.bitmapData = (_arg1) ? _arg1.iBM : null;
this.Pos(this.iX, this.iY);
}
public function set prVisible(_arg1:Boolean):void{
this.visible = _arg1;
}
public function Clone():OBitmap{
return (new OBitmap(this.iOBM.Clone(), this.iX, this.iY));
}
public function get prX():Number{
return (this.iX);
}
public function get prY():Number{
return (this.iY);
}
public function get prOBM():OBM{
return (this.iOBM);
}
public function get prHeight():Number{
return ((this.iOBM) ? (this.iOBM.iHeight / OGlobal.Scale) : 0);
}
public function get prWidth():Number{
return ((this.iOBM) ? (this.iOBM.iWidth / OGlobal.Scale) : 0);
}
public function CopyFrom(_arg1:OBitmap):void{
this.iX = _arg1.iX;
this.iY = _arg1.iY;
this.Init(_arg1.iOBM);
}
public function Move(_arg1:Number, _arg2:Number):void{
Pos((this.iX + _arg1), (this.iY + _arg2));
}
public static function MakeEffectFromListP(_arg1:Array):OBitmap{
var _local2:Sprite;
var _local3:Sprite;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
_local3 = (_local2.getChildAt(_arg1[2]) as Sprite);
return (OBitmap.MakeEffect(_local3, _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _local3.x, _local3.y));
}
public static function MakeEffectP(_arg1:Array):OBitmap{
return (OBitmap.MakeEffect(_arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8]));
}
public static function MakeEffectTextInRectP(_arg1:Array):OBitmap{
var _local2:Sprite;
var _local3:Rectangle;
var _local4:Number;
var _local5:Number;
var _local6:TextField;
var _local7:TextFormat;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if ((_local2.getChildAt(0) is TextField)){
_local6 = (_local2.getChildAt(0) as TextField);
_local6.autoSize = TextFieldAutoSize.LEFT;
_local6.text = _arg1[4];
_local7 = _local6.defaultTextFormat;
_local7.size = _arg1[2];
_local7.letterSpacing = _arg1[3];
_local6.setTextFormat(_local7);
} else {
return (null);
};
_local3 = _local2.getBounds(_local2);
_local4 = ((_arg1[9] - _local3.width) / 2);
_local5 = ((_arg1[10] - _local3.height) / 2);
return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], (_arg1[11] + _local4), (_arg1[12] + _local5)));
}
public static function MakeEffectTextP(_arg1:Array):OBitmap{
var _local2:Sprite;
var _local3:TextField;
var _local4:TextFormat;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if ((_local2.getChildAt(0) is TextField)){
_local3 = (_local2.getChildAt(0) as TextField);
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.text = _arg1[4];
_local4 = _local3.defaultTextFormat;
_local4.size = _arg1[2];
_local4.letterSpacing = _arg1[3];
_local3.setTextFormat(_local4);
} else {
return (null);
};
return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]));
}
public static function MakeRoundRectBorderEffectP(_arg1:Array):OBitmap{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
_local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4]));
return (OBitmap.MakeEffect(_local2, 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]));
}
public static function MakeEffectInRectP(_arg1:Array):OBitmap{
var _local2:Number;
var _local3:Sprite;
var _local4:Rectangle;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = Math.min(_arg1[7], _arg1[8]);
_local3 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
_local4 = _local3.getBounds(_local3);
_local5 = Math.max(_local4.width, _local4.height);
_local6 = ((_local2 / _local5) * _arg1[2]);
_local7 = ((_arg1[7] - (_local4.width * _local6)) / 2);
_local8 = ((_arg1[8] - (_local4.height * _local6)) / 2);
return (OBitmap.MakeEffect(_local3, _local6, _arg1[3], _arg1[4], _arg1[5], _arg1[6], (_arg1[9] + _local7), (_arg1[10] + _local8)));
}
public static function MakeTmp(_arg1, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):OBitmap{
var _local6:OBM;
_local6 = OBM.Make([null, [ODisplay.SpriteLib, _arg1], _arg2, _arg3, _arg4, _arg5]);
return (new OBitmap(_local6, _arg3, _arg4));
}
public static function MakeP(_arg1:Array):OBitmap{
return (OBitmap.MakeTmp(_arg1[1], _arg1[2], _arg1[3], _arg1[4]));
}
public static function MakeRoundRectEffectP(_arg1:Array):OBitmap{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
return (OBitmap.MakeEffect(_local2, 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]));
}
public static function Make(_arg1:Array):OBitmap{
return (new OBitmap(_arg1[1][0](_arg1[1]), _arg1[2], _arg1[3]));
}
public static function MakeEffect(_arg1, _arg2:Number, _arg3:String, _arg4:String, _arg5:String, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0):OBitmap{
var _local9:OBM;
_local9 = OEffects.Apply(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
return (new OBitmap(_local9, _arg7, _arg8));
}
}
}//package ENGINE.DISPLAY
Section 13
//OBM (ENGINE.DISPLAY.OBM)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBM {
public var iX:Number;
public var iHeight:Number;
public var iBM:BitmapData;
public var iY:Number;
public var iWidth:Number;
public function OBM(_arg1:BitmapData=null, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){
this.iBM = _arg1;
this.iX = _arg2;
this.iY = _arg3;
this.iWidth = _arg4;
this.iHeight = _arg5;
}
public function Clone():OBM{
var _local1:BitmapData;
_local1 = this.iBM.clone();
return (new OBM(_local1, this.iX, this.iY, this.iWidth, this.iHeight));
}
public static function MakeFill(_arg1:Array):OBM{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Rectangle;
var _local8:Sprite;
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:BitmapData;
var _local14:Matrix;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local4 = (OGlobal.Scale * _arg1[2]);
_local5 = OGlobal.ToGlobal(_arg1[4]);
_local6 = OGlobal.ToGlobal(_arg1[5]);
_local3.scaleX = _local4;
_local3.scaleY = _local4;
_local3.x = (_local3.x * OGlobal.Scale);
_local3.y = (_local3.y * OGlobal.Scale);
_local3.x = (_local3.x + _local5);
_local3.y = (_local3.y + _local6);
_local2.addChild(_local3);
_local7 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
_local8 = new Sprite();
_local8.graphics.beginBitmapFill(_arg1[3]);
_local8.graphics.drawRect((_local7.x - 1), (_local7.y - 1), (_local7.width + 2), (_local7.height + 2));
_local8.graphics.endFill();
_local8.mask = _local3;
_local2.addChild(_local8);
_local9 = ((_local7.width + 4) + (_arg1[6] * 2));
_local10 = ((_local7.height + 4) + (_arg1[6] * 2));
_local11 = Math.floor(_local7.x);
_local12 = Math.floor(_local7.y);
_local13 = new BitmapData(_local9, _local10, true, 0);
_local14 = new Matrix(1, 0, 0, 1, ((-(_local11) + 1) + _arg1[6]), ((-(_local12) + 1) + _arg1[6]));
_local13.draw(_local2, _local14);
return (new OBM(_local13, (((_local11 - _local5) - 1) - _arg1[6]), (((_local12 - _local6) - 1) - _arg1[6]), _local7.width, _local7.height));
}
public static function Make(_arg1:Array):OBM{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Rectangle;
var _local8:int;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:BitmapData;
var _local13:Matrix;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local4 = (OGlobal.Scale * _arg1[2]);
_local5 = OGlobal.ToGlobal(_arg1[3]);
_local6 = OGlobal.ToGlobal(_arg1[4]);
_local3.scaleX = _local4;
_local3.scaleY = _local4;
_local3.x = (_local3.x * OGlobal.Scale);
_local3.y = (_local3.y * OGlobal.Scale);
_local3.x = (_local3.x + _local5);
_local3.y = (_local3.y + _local6);
_local2.addChild(_local3);
_local7 = _local3.getBounds(_local2);
_local8 = ((_local7.width + 4) + (_arg1[5] * 2));
_local9 = ((_local7.height + 4) + (_arg1[5] * 2));
_local10 = Math.floor(_local7.x);
_local11 = Math.floor(_local7.y);
_local12 = new BitmapData(_local8, _local9, true, 0);
_local13 = new Matrix(1, 0, 0, 1, ((-(_local10) + 1) + _arg1[5]), ((-(_local11) + 1) + _arg1[5]));
_local12.draw(_local2, _local13);
return (new OBM(_local12, (((_local10 - _local5) - 1) - _arg1[5]), (((_local11 - _local6) - 1) - _arg1[5]), _local7.width, _local7.height));
}
}
}//package ENGINE.DISPLAY
Section 14
//ODisplay (ENGINE.DISPLAY.ODisplay)
package ENGINE.DISPLAY {
import flash.display.*;
import flash.geom.*;
import ENGINE.DISPLAY.EFFECTS.*;
import ENGINE.CORE.*;
import flash.text.*;
public class ODisplay {
public static function SpriteErase(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Sprite;
var _local5:Sprite;
_local2 = new Sprite();
_local3 = new Sprite();
_local3.blendMode = BlendMode.LAYER;
_local4 = _arg1[1][0](_arg1[1]);
_local5 = _arg1[2][0](_arg1[2]);
_local5.blendMode = BlendMode.ERASE;
_local3.addChild(_local4);
_local3.addChild(_local5);
_local2.addChild(_local3);
return (_local2);
}
public static function HSBToRGB(_arg1:Number, _arg2:Number, _arg3:Number):uint{
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:int;
var _local11:int;
var _local12:int;
_arg1 = (_arg1 % 360);
if (_arg2 > 1){
_arg2 = 1;
};
if (_arg3 > 1){
_arg3 = 1;
};
if (_arg2 == 0){
_local4 = (_arg3 * 0xFF);
return ((((_local4 << 16) | (_local4 << 8)) | _local4));
};
if (_arg1 == 360){
_arg1 = 0;
} else {
_arg1 = (_arg1 / 60);
};
_local5 = Math.floor(_arg1);
_local6 = (_arg1 - _local5);
_local7 = (_arg3 * (1 - _arg2));
_local8 = (_arg3 * (1 - (_arg2 * _local6)));
_local9 = (_arg3 * (1 - (_arg2 * (1 - _local6))));
switch (_local5){
case 0:
_local10 = (_arg3 * 0xFF);
_local11 = (_local9 * 0xFF);
_local12 = (_local7 * 0xFF);
break;
case 1:
_local10 = (_local8 * 0xFF);
_local11 = (_arg3 * 0xFF);
_local12 = (_local7 * 0xFF);
break;
case 2:
_local10 = (_local7 * 0xFF);
_local11 = (_arg3 * 0xFF);
_local12 = (_local9 * 0xFF);
break;
case 3:
_local10 = (_local7 * 0xFF);
_local11 = (_local8 * 0xFF);
_local12 = (_arg3 * 0xFF);
break;
case 4:
_local10 = (_local9 * 0xFF);
_local11 = (_local7 * 0xFF);
_local12 = (_arg3 * 0xFF);
break;
case 5:
_local10 = (_arg3 * 0xFF);
_local11 = (_local7 * 0xFF);
_local12 = (_local8 * 0xFF);
break;
};
return ((((_local10 << 16) | (_local11 << 8)) | _local12));
}
public static function OBitmapXBorderSprite(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[15], _arg1[16]], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[9]], _arg1[10], _arg1[1], _arg1[2]], _arg1[9], _arg1[11], _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[16]]]]));
}
public static function OBitmapAngleFrameSprite(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]]));
}
public static function OBitmapXBorder(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function OBitmapAngleFrameText(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]]));
}
public static function OBitmapRoundFrameText(_arg1:Array):OBitmap{
if (_arg1[4]){
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[20], _arg1[21]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]]));
};
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[20] + _arg1[4]), (_arg1[21] + _arg1[4])], [null, [ODisplay.SpriteTextInRect, _arg1[12], _arg1[13], _arg1[14], _arg1[15], _arg1[1], _arg1[2]], 1, _arg1[16], _arg1[17], _arg1[18], _arg1[19], _arg1[20], _arg1[21]]]]));
}
public static function SpriteFillRect(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Rectangle;
var _local5:Number;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local2.addChild(_local3);
_local4 = _local3.getBounds(_local2);
_local5 = (Math.max(_arg1[2], _arg1[3]) / Math.max(_local4.width, _local4.height));
_local3.scaleX = _local5;
_local3.scaleY = _local5;
_local4 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
_local3.x = (_local3.x + ((_arg1[2] - _local4.width) / 2));
_local3.y = (_local3.y + ((_arg1[3] - _local4.height) / 2));
return (_local3);
}
public static function TextRect(_arg1, _arg2:Number, _arg3:Number, _arg4:String):Rectangle{
var _local5:Sprite;
var _local6:TextField;
var _local7:TextFormat;
_local5 = ((_arg1 is Sprite)) ? (_arg1 as Sprite) : new ((_arg1 as Class));
if ((_local5.getChildAt(0) is TextField)){
_local6 = (_local5.getChildAt(0) as TextField);
_local6.autoSize = TextFieldAutoSize.LEFT;
_local6.text = _arg4;
_local7 = _local6.defaultTextFormat;
_local7.size = _arg2;
_local7.letterSpacing = _arg3;
_local6.setTextFormat(_local7);
} else {
return (null);
};
return (_local5.getBounds(_local5));
}
public static function OBitmapXBorderText(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteXBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[17], _arg1[18]], [null, [ODisplay.SpriteTextInRect, _arg1[9], _arg1[10], _arg1[11], _arg1[12], _arg1[1], _arg1[2]], 1, _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18]]]]));
}
public static function OBitmapRoundRect(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteRoundRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]]));
}
public static function OBitmapAngleFrame(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteAngleRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] * (_arg1[1] - (_arg1[4] * 2))) / _arg1[1])], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]]));
}
public static function HSBAToRGBA(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):uint{
var _local5:uint;
var _local6:uint;
_local5 = HSBToRGB(_arg1, _arg2, _arg3);
_local6 = (0xFF * _arg4);
_local6 = (_local6 << 24);
return ((_local5 + _local6));
}
public static function OBitmapTextAlign(_arg1:Array):OBitmap{
return (OBitmapMake([null, [ODisplay.SpriteTextAlign, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[5], _arg1[6], _arg1[11], _arg1[12]], 1, _arg1[7], _arg1[8], _arg1[9], _arg1[10], _arg1[13], _arg1[14]]));
}
public static function OBitmapList(_arg1:Array):OBitmap{
var _local2:OBM;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:OBM;
var _local7:Matrix;
_local2 = OEffects.Make(_arg1[1][0]);
_local3 = (_local2.iX + (_arg1[1][0][7] * OGlobal.Scale));
_local4 = (_local2.iY + (_arg1[1][0][8] * OGlobal.Scale));
_local5 = 1;
while (_local5 < _arg1[1].length) {
_local6 = OEffects.Make(_arg1[1][_local5]);
_local7 = new Matrix(1, 0, 0, 1, (((_arg1[1][_local5][7] * OGlobal.Scale) + _local6.iX) - _local3), (((_arg1[1][_local5][8] * OGlobal.Scale) + _local6.iY) - _local4));
_local2.iBM.draw(_local6.iBM, _local7);
_local5++;
};
return (new OBitmap(_local2, _arg1[1][0][7], _arg1[1][0][8]));
}
public static function SpriteLibList(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if (_arg1[2] >= _local2.numChildren){
return (null);
};
return ((_local2.getChildAt(_arg1[2]) as Sprite));
}
public static function SpriteXBorder(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.lineStyle(_arg1[4]);
_local2.graphics.moveTo(0, _arg1[3]);
_local2.graphics.lineTo(_arg1[1], _arg1[3]);
_local2.graphics.moveTo(0, (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3]));
_local2.graphics.moveTo(_arg1[3], 0);
_local2.graphics.lineTo(_arg1[3], _arg1[2]);
_local2.graphics.moveTo((_arg1[1] - _arg1[3]), 0);
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]);
return (_local2);
}
public static function SpriteLib(_arg1:Array):Sprite{
return (((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class)));
}
public static function OBitmapAngleBorder(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteAngleBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function OBitmapRoundBorder(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function SpriteScale(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = _arg1[1][0](_arg1[1]);
_local2.scaleX = _arg1[2];
_local2.scaleY = _arg1[2];
return (_local2);
}
public static function IDisplayObjectMake(_arg1:Array){
var _local2:IDisplayObject;
_local2 = _arg1[1][0](_arg1[1]);
_local2.Pos(_arg1[2], _arg1[3]);
return (_local2);
}
public static function SpriteAlign(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Rectangle;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local3.scaleX = _arg1[2];
_local3.scaleY = _arg1[2];
_local2.addChild(_local3);
_local4 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
switch (_arg1[3]){
case 1:
_local3.x = (_local3.x + ((_arg1[5] - _local4.width) / 2));
break;
case 2:
_local3.x = (_local3.x + (_arg1[5] - _local4.width));
break;
};
switch (_arg1[4]){
case 1:
_local3.y = (_local3.y + ((_arg1[6] - _local4.height) / 2));
break;
case 2:
_local3.y = (_local3.y + (_arg1[6] - _local4.height));
break;
};
return (_local3);
}
public static function OBitmapAngleRect(_arg1:Array):OBitmap{
return (OBitmapMake([null, [SpriteAngleRect, _arg1[1], _arg1[2], _arg1[3]], 1, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]]));
}
public static function SpriteRect(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRect(0, 0, _arg1[1], _arg1[2]);
return (_local2);
}
public static function OBitmapSpriteFillRect(_arg1:Array):OBitmap{
var _local2:Sprite;
_local2 = ODisplay.SpriteFillRect([null, _arg1[3], _arg1[1], _arg1[2]]);
return (OBitmapMake([null, [ODisplay.SpriteFillRect, _arg1[3], _arg1[1], _arg1[2]], _local2.scaleX, _arg1[4], _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9]]));
}
public static function OBitmapText(_arg1:Array):OBitmap{
return (OBitmapMake([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[9], _arg1[10]]));
}
public static function OBitmapMake(_arg1:Array):OBitmap{
return (new OBitmap(OEffects.Make(_arg1), _arg1[7], _arg1[8]));
}
public static function SpriteRoundRect(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
return (_local2);
}
public static function SpriteInRect(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Rectangle;
_local2 = new Sprite();
_local3 = _arg1[1][0](_arg1[1]);
_local3.scaleX = _arg1[2];
_local3.scaleY = _arg1[2];
_local2.addChild(_local3);
_local4 = _local3.getBounds(_local2);
_local2.removeChild(_local3);
_local3.x = (_local3.x + ((_arg1[3] - _local4.width) / 2));
_local3.y = (_local3.y + ((_arg1[4] - _local4.height) / 2));
return (_local3);
}
public static function SpriteScaleRotate(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Number;
var _local4:Number;
var _local5:Matrix;
var _local6:Matrix;
var _local7:Sprite;
_local2 = _arg1[1][0](_arg1[1]);
_local3 = (_arg1[4] * _arg1[2]);
_local4 = (_arg1[5] * _arg1[2]);
_local5 = new Matrix();
_local5.scale(_arg1[2], _arg1[2]);
_local5.translate(-(_local3), -(_local4));
_local5.rotate(((Math.PI / 180) * _arg1[3]));
_local6 = new Matrix();
_local6.translate(_local3, _local4);
_local5.concat(_local6);
_local7 = new Sprite();
_local7.addChild(_local2);
_local2.transform.matrix = _local5;
return (_local7);
}
public static function OBitmapRoundFrameSprite(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[18], _arg1[19]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[18] + _arg1[4]), (_arg1[19] + _arg1[4])], [null, [ODisplay.SpriteInRect, [ODisplay.SpriteLib, _arg1[12]], _arg1[13], _arg1[1], _arg1[2]], _arg1[13], _arg1[14], _arg1[15], _arg1[16], _arg1[17], _arg1[18], _arg1[19]]]]));
}
public static function SpriteText(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:TextField;
var _local4:TextFormat;
_local2 = ((_arg1[1] is Sprite)) ? (_arg1[1] as Sprite) : new ((_arg1[1] as Class));
if ((_local2.getChildAt(0) is TextField)){
_local3 = (_local2.getChildAt(0) as TextField);
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.text = _arg1[4];
_local4 = _local3.defaultTextFormat;
_local4.size = _arg1[2];
_local4.letterSpacing = _arg1[3];
_local3.setTextFormat(_local4);
} else {
return (null);
};
return (_local2);
}
public static function SpriteTextAlign(_arg1:Array):Sprite{
return (ODisplay.SpriteAlign([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8]]));
}
public static function OBitmapTextInRect(_arg1:Array):OBitmap{
return (OBitmapMake([null, [ODisplay.SpriteTextInRect, _arg1[1], _arg1[2], _arg1[3], _arg1[4], _arg1[9], _arg1[10]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[11], _arg1[12]]));
}
public static function SpriteRoundBorder(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.drawRoundRect(0, 0, _arg1[1], _arg1[2], _arg1[3]);
_local2.graphics.drawRoundRect(_arg1[4], _arg1[4], (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), (_arg1[3] - _arg1[4]));
return (_local2);
}
public static function SpriteAngleRect(_arg1:Array):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.moveTo(_arg1[3], 0);
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0);
_local2.graphics.lineTo(_arg1[1], _arg1[3]);
_local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]);
_local2.graphics.lineTo(_arg1[3], _arg1[2]);
_local2.graphics.lineTo(0, (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo(0, _arg1[3]);
_local2.graphics.endFill();
return (_local2);
}
public static function SpriteAngleBorder(_arg1:Array):Sprite{
var _local2:Sprite;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = new Sprite();
_local2.graphics.beginFill(0);
_local2.graphics.moveTo(_arg1[3], 0);
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), 0);
_local2.graphics.lineTo(_arg1[1], _arg1[3]);
_local2.graphics.lineTo(_arg1[1], (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo((_arg1[1] - _arg1[3]), _arg1[2]);
_local2.graphics.lineTo(_arg1[3], _arg1[2]);
_local2.graphics.lineTo(0, (_arg1[2] - _arg1[3]));
_local2.graphics.lineTo(0, _arg1[3]);
_local3 = (_arg1[1] - (_arg1[4] * 2));
_local4 = (_arg1[2] - (_arg1[4] * 2));
_local5 = ((_arg1[3] * _local3) / _arg1[1]);
_local2.graphics.moveTo((_arg1[4] + _local5), (_arg1[4] + 0));
_local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + 0));
_local2.graphics.lineTo((_arg1[4] + _local3), (_arg1[4] + _local5));
_local2.graphics.lineTo((_arg1[4] + _local3), ((_arg1[4] + _local4) - _local5));
_local2.graphics.lineTo(((_arg1[4] + _local3) - _local5), (_arg1[4] + _local4));
_local2.graphics.lineTo((_arg1[4] + _local5), (_arg1[4] + _local4));
_local2.graphics.lineTo((_arg1[4] + 0), ((_arg1[4] + _local4) - _local5));
_local2.graphics.lineTo((_arg1[4] + 0), (_arg1[4] + _local5));
return (_local2);
}
public static function SpriteTextInRect(_arg1:Array):Sprite{
return (ODisplay.SpriteInRect([null, [ODisplay.SpriteText, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6]]));
}
public static function OBitmapRoundFrame(_arg1:Array):OBitmap{
return (ODisplay.OBitmapList([null, [[null, [ODisplay.SpriteRoundBorder, _arg1[1], _arg1[2], _arg1[3], _arg1[4]], 1, _arg1[5], _arg1[6], _arg1[7], _arg1[8], _arg1[12], _arg1[13]], [null, [ODisplay.SpriteRoundRect, (_arg1[1] - (_arg1[4] * 2)), (_arg1[2] - (_arg1[4] * 2)), ((_arg1[3] - _arg1[4]) - 2)], 1, _arg1[5], _arg1[9], _arg1[10], _arg1[11], (_arg1[12] + _arg1[4]), (_arg1[13] + _arg1[4])]]]));
}
}
}//package ENGINE.DISPLAY
Section 15
//OSprite (ENGINE.DISPLAY.OSprite)
package ENGINE.DISPLAY {
import flash.display.*;
import ENGINE.CORE.*;
public class OSprite extends Sprite implements IDisplayObject {
private var iY:Number;// = 0
private var iX:Number;// = 0
public function OSprite(){
iX = 0;
iY = 0;
super();
}
public function get prVisible():Boolean{
return (this.visible);
}
public function set prX(_arg1:Number):void{
this.iX = _arg1;
this.x = (_arg1 * OGlobal.Scale);
}
public function set prY(_arg1:Number):void{
this.iY = _arg1;
this.y = (_arg1 * OGlobal.Scale);
}
public function Pos(_arg1:Number, _arg2:Number):void{
this.iX = _arg1;
this.iY = _arg2;
this.x = (this.iX * OGlobal.Scale);
this.y = (this.iY * OGlobal.Scale);
}
public function set prVisible(_arg1:Boolean):void{
this.visible = _arg1;
}
public function lineStyle(_arg1:Number, _arg2:uint=0, _arg3:Number=1, _arg4:Boolean=false, _arg5:String="normal", _arg6:String=null, _arg7:String=null, _arg8:Number=3):void{
this.graphics.lineStyle((_arg1 * OGlobal.Scale), _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, (_arg8 * OGlobal.Scale));
}
public function drawCircle(_arg1:Number, _arg2:Number, _arg3:Number):void{
this.graphics.drawCircle((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale), (_arg3 * OGlobal.Scale));
}
public function moveTo(_arg1:Number, _arg2:Number):void{
this.graphics.moveTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale));
}
public function get prX():Number{
return (this.iX);
}
public function get prY():Number{
return (this.iY);
}
public function Free():void{
var _local1:DisplayObject;
while (this.numChildren) {
_local1 = this.getChildAt(0);
if ((_local1 is OSprite)){
(_local1 as OSprite).Free();
};
this.removeChildAt(0);
};
}
public function lineTo(_arg1:Number, _arg2:Number):void{
this.graphics.lineTo((_arg1 * OGlobal.Scale), (_arg2 * OGlobal.Scale));
}
public function get prHeight():Number{
return ((this.height / OGlobal.Scale));
}
public function get prWidth():Number{
return ((this.width / OGlobal.Scale));
}
public function Move(_arg1:Number, _arg2:Number):void{
Pos((this.iX + _arg1), (this.iY + _arg2));
}
public static function Make(_arg1:Array):OSprite{
var _local2:OSprite;
var _local3:int;
var _local4:int;
_local2 = new (OSprite);
_local3 = _arg1[1].length;
_local4 = 0;
while (_local4 < _local3) {
_local2.addChild(_arg1[1][_local4][0](_arg1[1][_local4]));
_local4++;
};
_local2.Pos(_arg1[2], _arg1[3]);
return (_local2);
}
}
}//package ENGINE.DISPLAY
Section 16
//OGame (ENGINE.GAME.OGame)
package ENGINE.GAME {
import ENGINE.CORE.*;
import flash.utils.*;
import flash.net.*;
public class OGame {
protected var iSTableSize:int;
protected var iCache:OCache;
protected var iPlayer:OPlayer;
protected var iRNDFactor:int;
protected var iModes:int;
protected var iScores:OScoresTable;
public static const catGlobal:String = "Global";
public static const catTmp:String = "Tmp";
protected static const strgMusicVolume:String = "Music Volume";
protected static const strgResX:String = "ResX";
protected static const strgResY:String = "ResY";
protected static const strgСurPlayer:String = "Current Player";
protected static const strgFullScreen:String = "Full Screen";
protected static const strgSoundVolume:String = "Sound Volume";
protected static const strgLocalScores:String = "Local Scores";
public static const catPlayers:String = "Players";
public function OGame(_arg1:int=1, _arg2:int=10, _arg3:int=10){
var _local4:String;
super();
this.iModes = _arg1;
this.iSTableSize = _arg2;
registerClassAlias("OCacheClass", OCache);
registerClassAlias("OGameParamsClass", OGameParams);
registerClassAlias("OScoreParamsClass", OScoreParams);
registerClassAlias("OScoresTableClass", OScoresTable);
registerClassAlias("OPlayerClass", OPlayer);
this.LoadCache();
_local4 = this.iCache.GetCategoryItem(catGlobal, strgСurPlayer);
if (_local4){
this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local4);
this.iScores = this.iCache.GetCategoryItem(catGlobal, strgLocalScores);
this.InitAfterLoadCache();
} else {
this.iScores = new OScoresTable(_arg1, this.iSTableSize);
this.DefaultInitLocalScores();
this.iCache.SetCategoryItem(catGlobal, strgLocalScores, this.iScores);
this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, 1);
this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, 1);
this.iCache.SetCategoryItem(catGlobal, strgResX, OGlobal.StageRect.width);
this.iCache.SetCategoryItem(catGlobal, strgResY, OGlobal.StageRect.height);
this.iCache.SetCategoryItem(catGlobal, strgFullScreen, false);
};
OSound.SoundVolume = this.prSoundVolume;
OSound.MusicVolume = this.prMusicVolume;
}
public function set prFullScreen(_arg1:Boolean):void{
this.iCache.SetCategoryItem(catGlobal, strgFullScreen, _arg1);
}
public function set prMode(_arg1:int):void{
this.iPlayer.iMode = _arg1;
}
public function get prGamesStartCount():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart);
}
public function get prLevelScore():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore);
}
public function set prPassword(_arg1:String):void{
this.iPlayer.iPassword = _arg1;
}
public function DeletePlayer(_arg1:String):String{
var _local2:String;
var _local3:Array;
_local2 = (this.iPlayer) ? this.iPlayer.iName : "";
this.iCache.DeleteCategoryItem(catPlayers, _arg1);
if (_arg1 == _local2){
_local3 = this.iCache.GetCategoryNames(catPlayers);
if (!_local3){
this.iPlayer = null;
return (null);
};
this.iPlayer = this.iCache.GetCategoryItem(catPlayers, _local3[0]);
this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _local3[0]);
};
return ((this.iPlayer) ? this.iPlayer.iName : null);
}
public function get prPlayerNames():Array{
return (this.iCache.GetCategoryNames(catPlayers));
}
public function ClearPersonalScores(_arg1:int):void{
this.iPlayer.iScoreTable.Clear(_arg1);
}
public function GetPersonalRecord(_arg1:int):int{
return (this.iPlayer.iScoreTable.GetRecord(_arg1));
}
public function InitAfterLoadCache():void{
}
public function AddScore(_arg1:int):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iScore = (this.iPlayer.iGParams[this.iPlayer.iMode].iScore + _arg1);
}
public function get prPlayersData(){
var _local1:OCache;
var _local2:ByteArray;
_local1 = this.iCache.GetItem(catPlayers);
_local2 = _local1.Pack();
_local2.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;
this.iCache = a.readObject();
} catch(error:Error) {
this.iCache = new OCache();
};
};
so.close();
}
public function NewGame():void{
this.iPlayer.iGParams[this.iPlayer.iMode].iLevel = 0;
this.iPlayer.iGParams[this.iPlayer.iMode].iScore = 0;
this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = 0;
this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = null;
this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++;
}
public function get prLevel():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iLevel);
}
public function get prSoundVolume():Number{
return (this.iCache.GetCategoryItem(catGlobal, strgSoundVolume));
}
public function get prPlayerName():String{
return ((this.iPlayer) ? this.iPlayer.iName : "");
}
public function get prScore():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iScore);
}
public function NextLevel():Boolean{
this.iPlayer.iGParams[this.iPlayer.iMode].iLevel++;
return (true);
}
public function set prPlayersData(_arg1):void{
this.iCache.SetItem(catPlayers, _arg1);
}
public function Read(_arg1:String, _arg2:String){
return (this.iCache.GetCategoryItem(_arg1, _arg2));
}
public function get prSavedGame():String{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame);
}
public function set prResX(_arg1:int):void{
this.iCache.SetCategoryItem(catGlobal, strgResX, _arg1);
}
public function get prRNDFactor():int{
return (this.iPlayer.iRNDFactor);
}
public function get prMusicVolume():Number{
return (this.iCache.GetCategoryItem(catGlobal, strgMusicVolume));
}
public function Write(_arg1:String, _arg2:String, _arg3):void{
this.iCache.SetCategoryItem(_arg1, _arg2, _arg3);
}
public function Start():void{
this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesStart++;
}
public function get prPassword():String{
return ((this.iPlayer.iPassword) ? this.iPlayer.iPassword : "");
}
public function get prMode():int{
return (this.iPlayer.iMode);
}
public function End():void{
this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd++;
}
public function set prSoundVolume(_arg1:Number):void{
OSound.SoundVolume = _arg1;
this.iCache.SetCategoryItem(catGlobal, strgSoundVolume, _arg1);
}
public function SetLevelScore(_arg1:int):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iLevelScore = _arg1;
}
public function GetLocalScores(_arg1:int, _arg2:int):OScoreParams{
return (this.iScores.GetScore(_arg1, _arg2));
}
public function GetPersonalScores(_arg1:int, _arg2:int):OScoreParams{
return (this.iPlayer.iScoreTable.GetScore(_arg1, _arg2));
}
public function AddScoreInTable(_arg1:int):Boolean{
var _local2:Boolean;
_local2 = false;
if (this.iScores.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel)){
this.iCache.SetCategoryItem(OGame.catGlobal, OGame.strgLocalScores, this.iScores);
_local2 = true;
};
if (this.iPlayer.iScoreTable.AddScore(this.prPlayerName, _arg1, this.prMode, this.prLevel, true)){
this.iCache.SetCategoryItem(OGame.catPlayers, this.prPlayerName, this.iPlayer);
_local2 = true;
};
return (_local2);
}
public function get prResX():int{
return (this.iCache.GetCategoryItem(catGlobal, strgResX));
}
public function get prResY():int{
return (this.iCache.GetCategoryItem(catGlobal, strgResY));
}
public function set prPlayerName(_arg1:String):void{
var _local2:OPlayer;
_local2 = this.iCache.GetCategoryItem(catPlayers, _arg1);
if (!_local2){
_local2 = new OPlayer(_arg1, "", this.iModes, this.iSTableSize);
this.iCache.SetCategoryItem(catPlayers, _arg1, _local2);
};
this.iPlayer = _local2;
this.iCache.SetCategoryItem(catGlobal, strgСurPlayer, _arg1);
}
public function DefaultInitLocalScores():void{
this.iScores.Clear(0);
this.iScores.AddScore("Emily", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Michael", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Jacob", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Isabella", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Madison", (int(((Math.random() * 100) + 50)) * 50), 0, int(((Math.random() * 5) + 3)));
this.iScores.SortOn(0);
}
public function SaveCache():Boolean{
var _local1:SharedObject;
var _local2:String;
_local1 = SharedObject.getLocal(OGlobal.AppName);
_local1.data.iData = this.iCache.Pack();
_local2 = _local1.flush();
_local1.close();
return ((_local2 == SharedObjectFlushStatus.FLUSHED));
}
public function set prResY(_arg1:int):void{
this.iCache.SetCategoryItem(catGlobal, strgResY, _arg1);
}
public function SetSaveGame(_arg1:String):void{
this.iPlayer.iGParams[this.iPlayer.iMode].iSavedGame = _arg1;
}
public function get prGamesEndCount():int{
return (this.iPlayer.iGParams[this.iPlayer.iMode].iCGamesEnd);
}
public function set prMusicVolume(_arg1:Number):void{
OSound.MusicVolume = _arg1;
this.iCache.SetCategoryItem(catGlobal, strgMusicVolume, _arg1);
}
public function get prFullScreen():Boolean{
return (this.iCache.GetCategoryItem(catGlobal, strgFullScreen));
}
public function ClearLocalScores(_arg1:int):void{
this.iScores.Clear(_arg1);
}
}
}//package ENGINE.GAME
Section 17
//OGameParams (ENGINE.GAME.OGameParams)
package ENGINE.GAME {
public class OGameParams {
public var iLevel:int;
public var iScore:int;
public var iSavedGame:String;
public var iCGamesEnd:int;
public var iLevelScore:int;
public var iCGamesStart:int;
}
}//package ENGINE.GAME
Section 18
//OPlayer (ENGINE.GAME.OPlayer)
package ENGINE.GAME {
public class OPlayer {
public var iPassword:String;
public var iScoreTable:OScoresTable;
public var iGParams:Array;
public var iMode:int;
public var iRNDFactor:int;
public var iName:String;
public function OPlayer(_arg1:String=null, _arg2:String=null, _arg3:int=1, _arg4:int=10, _arg5:int=10){
var _local6:int;
super();
this.iName = _arg1;
this.iPassword = _arg2;
this.iGParams = new Array(_arg3);
this.iRNDFactor = Math.round((Math.random() * (_arg5 - 1)));
_local6 = 0;
while (_local6 < _arg3) {
this.iGParams[_local6] = new OGameParams();
_local6++;
};
this.iScoreTable = new OScoresTable(_arg3, _arg4);
}
}
}//package ENGINE.GAME
Section 19
//OScoreParams (ENGINE.GAME.OScoreParams)
package ENGINE.GAME {
public class OScoreParams {
public var iScore:int;
public var iName:String;
public var iLevel:int;
public var iTime:Number;
public function OScoreParams(_arg1:String=null, _arg2:int=0, _arg3:int=0){
var _local4:Date;
super();
this.iName = _arg1;
this.iScore = _arg2;
_local4 = new Date();
this.iTime = _local4.time;
}
}
}//package ENGINE.GAME
Section 20
//OScoresTable (ENGINE.GAME.OScoresTable)
package ENGINE.GAME {
public class OScoresTable {
public var iTable:Array;
public var iMaxElements:int;
public function OScoresTable(_arg1:int=1, _arg2:int=10){
var _local3:int;
super();
this.iMaxElements = _arg2;
this.iTable = new Array();
_local3 = 0;
while (_local3 < _arg1) {
this.iTable[_local3] = new Array();
_local3++;
};
}
public function FindByName(_arg1:int, _arg2:String):int{
var _local3:int;
_local3 = 0;
while (_local3 < this.iTable[_arg1].length) {
if (this.iTable[_arg1][_local3].iName == _arg2){
return (_local3);
};
_local3++;
};
return (-1);
}
public function Clear(_arg1:int):void{
this.iTable[_arg1] = new Array();
}
public function GetRecord(_arg1:int):int{
if (!this.iTable[_arg1].length){
return (0);
};
return (this.iTable[_arg1][0].iScore);
}
public function AddScore(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean=false):Boolean{
var _local6:Array;
var _local7:int;
_local6 = this.iTable[_arg3];
if ((((_local6.length < this.iMaxElements)) || ((_local6[(_local6.length - 1)].iScore < _arg2)))){
_local7 = (_arg5) ? -1 : this.FindByName(_arg3, _arg1);
if (_local7 >= 0){
if (_arg2 < _local6[_local7].iScore){
return (false);
};
_local6[_local7] = new OScoreParams(_arg1, _arg2, _arg4);
this.SortOn(_arg3);
return (true);
};
if (_local6.length < this.iMaxElements){
_local6[_local6.length] = new OScoreParams(_arg1, _arg2, _arg4);
this.SortOn(_arg3);
return (true);
};
if (_local6[(_local6.length - 1)].iScore > _arg2){
return (false);
};
_local6[(_local6.length - 1)] = new OScoreParams(_arg1, _arg2, _arg4);
this.SortOn(_arg3);
return (true);
};
return (false);
}
public function IsRecord(_arg1:int, _arg2:int):Boolean{
if (!this.iTable[_arg1].length){
return (true);
};
return ((_arg2 >= this.iTable[_arg1][0].iScore));
}
public function GetScore(_arg1:int, _arg2:int):OScoreParams{
return (this.iTable[_arg1][_arg2]);
}
public function SortOn(_arg1:int):void{
this.iTable[_arg1] = this.iTable[_arg1].sortOn("iScore", (Array.DESCENDING | Array.NUMERIC));
}
}
}//package ENGINE.GAME
Section 21
//OA_Alpha (ENGINE.INTERFACE.ANIMATORS.OA_Alpha)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OA_Alpha extends OAnimator {
public var iEAlpha:Number;
private var iDAlpha:Number;
public var iSAlpha:Number;
private var iEndAlpha:Number;
public var iPIter:int;
public function OA_Alpha(_arg1:Object, _arg2:OIObject=null){
super(_arg1, _arg2);
}
override protected function Start():int{
var _local1:Number;
_local1 = ((this.iSAlpha)>=0) ? this.iSAlpha : this.iTarget.alpha;
this.iEndAlpha = ((this.iEAlpha)>=0) ? this.iEAlpha : this.iTarget.alpha;
this.iDAlpha = ((this.iEndAlpha - _local1) / iPIter);
this.iTarget.visible = true;
this.iTarget.alpha = _local1;
return (((Math.abs(this.iDAlpha) > 0.001)) ? stPlay : stEnd);
}
override public function Play():void{
var _local1:Number;
_local1 = (this.iTarget.alpha + this.iDAlpha);
if ((((((this.iDAlpha > 0)) && ((_local1 >= this.iEndAlpha)))) || ((((this.iDAlpha <= 0)) && ((_local1 <= this.iEndAlpha)))))){
this.iTarget.alpha = this.iEndAlpha;
if (this.iTarget.alpha == 0){
this.iTarget.visible = false;
};
this.State = OAnimator.stEnd;
} else {
this.iTarget.alpha = _local1;
};
}
public static function Make(_arg1:Object, _arg2:OIObject=null):OA_Alpha{
return (new OA_Alpha(_arg1, _arg2));
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 22
//OAnimator (ENGINE.INTERFACE.ANIMATORS.OAnimator)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OAnimator {
private var iState:int;
protected var iTarget:OIObject;
public static const stStart:int = 1;
public static const stEnd:int = 3;
public static const stPause:int = 0;
public static const stReturn:int = 4;
public static const stPlay:int = 2;
public function OAnimator(_arg1:Object, _arg2:OIObject=null){
var _local3:String;
super();
for (_local3 in _arg1) {
if (this.hasOwnProperty(_local3)){
this[_local3] = _arg1[_local3];
};
};
this.iTarget = _arg2;
this.State = stPause;
}
public function set State(_arg1:int):void{
this.iState = _arg1;
switch (this.iState){
case stStart:
this.State = this.Start();
break;
case stReturn:
this.State = Return();
break;
};
}
public function Play():void{
this.State = stEnd;
}
public function set prTarget(_arg1:OIObject):void{
this.iTarget = _arg1;
}
protected function Start():int{
return (stPlay);
}
public function get State():int{
return (this.iState);
}
public function Return():int{
return (stPlay);
}
public function OnEnterFrame():void{
if (this.iState == stPlay){
Play();
};
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 23
//OAnimatorManager (ENGINE.INTERFACE.ANIMATORS.OAnimatorManager)
package ENGINE.INTERFACE.ANIMATORS {
import ENGINE.INTERFACE.*;
public class OAnimatorManager {
private var iPlaying:Array;
private var iTarget:OIObject;
public static const anActivate:int = 2;
public static const anDeactivate:int = 3;
public static const anShow:int = 0;
public static const iAnimatorsCount:int = 10;
public static const anHide:int = 1;
public static const anPress:int = 8;
public static const anRoolOver:int = 6;
public static const anUnpress:int = 9;
public static const anFocusOut:int = 5;
public static const anRoolOut:int = 7;
public static const anUncheck:int = 10;
public static const anCheck:int = 9;
public static const anFocusIn:int = 4;
public static const iNullAnimators:Array = [null, null, null, null, null, null, null, null, null, null];
public function OAnimatorManager(_arg1:OIObject){
this.iTarget = _arg1;
this.iPlaying = new Array();
}
public function get prAnimation():Boolean{
return ((iPlaying.length > 0));
}
public function AddAnimator(_arg1:Object):void{
var _local2:*;
if (_arg1 == null){
return;
};
if (this.iPlaying.length > 0){
this.iPlaying[0].Return();
};
_local2 = _arg1.F(_arg1);
_local2.prTarget = this.iTarget;
this.iPlaying.push(_local2);
}
public function OnEnterFrame():void{
if (this.iPlaying.length == 0){
return;
};
switch (this.iPlaying[0].State){
case OAnimator.stEnd:
this.iPlaying[0] = null;
this.iPlaying.splice(0, 1);
break;
case OAnimator.stPause:
this.iPlaying[0].State = OAnimator.stStart;
break;
case OAnimator.stPlay:
this.iPlaying[0].Play();
break;
};
}
public function Free():void{
this.iTarget = null;
this.iPlaying = null;
}
}
}//package ENGINE.INTERFACE.ANIMATORS
Section 24
//OApplication (ENGINE.INTERFACE.OApplication)
package ENGINE.INTERFACE {
import flash.events.*;
import flash.display.*;
import ENGINE.CORE.*;
import flash.external.*;
public class OApplication extends OWindow {
private var iStaged:Boolean;// = false
protected var iBackground:OBackground;
protected var iMenuItem:Array;
public function OApplication(_arg1:String){
iStaged = false;
OGlobal.AppName = _arg1;
if (this.stage){
OGlobal.SetDomain();
this.InitStage();
};
super(null);
if (!this.iStaged){
this.addEventListener(Event.ENTER_FRAME, NotStagedEnterFrame);
};
}
private function NotStagedEnterFrame(_arg1:Event):void{
if (!iStaged){
if (!this.stage){
return;
};
OGlobal.SetDomain();
this.InitStage();
this.Init();
this.removeEventListener(Event.ENTER_FRAME, NotStagedEnterFrame);
this.iStaged = true;
};
}
override public function Init():void{
if (!this.stage){
return;
};
super.Init();
this.iMenuItem = new Array();
this.iStaged = true;
this.visible = true;
}
protected function OnMenuItem():void{
}
public function get prMenuItem():int{
return ((this.iMenuItem.length) ? this.iMenuItem.pop() : -1);
}
public function set prMenuItem(_arg1:int):void{
this.iMenuItem.push(_arg1);
}
public function OnResize(_arg1:Event):void{
this.Free();
this.InitStage();
this.Init();
}
override public function Free():void{
OGlobal.prStage.removeEventListener(Event.DEACTIVATE, OnDeactivate);
OGlobal.prStage.removeEventListener(Event.RESIZE, OnResize);
this.iMenuItem = null;
super.Free();
}
public function InitBackground(_arg1:Array, _arg2:int=0):void{
this.iBackground = new OBackground(_arg1, _arg2);
this.addChildAt(this.iBackground, 0);
}
protected function OnDeactivate(_arg1:Event):void{
}
public function InitStage(_arg1:Stage=null):void{
var s:String;
var b:int;
var aStage = _arg1;
if (((aStage) || (this.stage))){
OGlobal.prStage = (aStage) ? aStage : this.stage;
};
if (!OGlobal.prStage){
return;
};
OGlobal.prStage.scaleMode = StageScaleMode.NO_SCALE;
OGlobal.prStage.align = StageAlign.TOP_LEFT;
OGlobal.prStage.quality = StageQuality.BEST;
OGlobal.prStage.stageFocusRect = false;
OGlobal.Rescale(this);
OGlobal.FPS = 60;
if (ExternalInterface.available){
s = ("function getInternetExplorerVersion() { var rv = -1; if (navigator.appName == \"Microsoft Internet Explorer\") { var ua = navigator.userAgent;" + "var re = new RegExp(\"MSIE ([0-9]{1,}[.0-9]{0,})\"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; }");
b = 0;
try {
b = ExternalInterface.call(s);
} catch(e:Error) {
OGlobal.prStage.frameRate = OGlobal.FPS;
};
if (b > 0){
OGlobal.FPS = (OGlobal.FPS * 2);
};
};
OGlobal.prStage.frameRate = OGlobal.FPS;
OGlobal.prStage.addEventListener(Event.RESIZE, OnResize);
OGlobal.prStage.addEventListener(Event.DEACTIVATE, OnDeactivate);
}
}
}//package ENGINE.INTERFACE
Section 25
//OBackground (ENGINE.INTERFACE.OBackground)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBackground extends OSprite {
protected var iImages:Array;
protected var iIInd:int;// = 0
public function OBackground(_arg1:Array, _arg2:int=0){
iIInd = 0;
super();
this.iImages = _arg1;
this.prIInd = _arg2;
}
public function Make():void{
var _local1:Sprite;
var _local2:BitmapData;
var _local3:OBM;
var _local4:Rectangle;
var _local5:Rectangle;
var _local6:int;
var _local7:int;
var _local8:Number;
var _local9:int;
var _local10:Bitmap;
var _local11:int;
var _local12:OBitmap;
if (this.iImages == null){
return;
};
this.Free();
if ((this.iImages[this.iIInd] is Class)){
_local1 = new (this.iImages[this.iIInd]);
_local2 = new BitmapData(_local1.width, _local1.height, false, 4294967295);
_local2.draw(_local1);
};
if ((this.iImages[this.iIInd] is BitmapData)){
_local2 = this.iImages[this.iIInd];
_local1 = new Sprite();
_local10 = new Bitmap(_local2);
_local1.addChild(_local10);
};
_local3 = new OBM(_local2, 0, 0, _local1.width, _local1.height);
_local4 = OGlobal.ViewporRect;
_local5 = OGlobal.StageRect;
this.x = -(_local4.x);
this.y = -(_local4.y);
_local6 = Math.floor((_local5.width / _local1.width));
if (_local6 == 0){
return;
};
_local7 = Math.floor((_local5.height / _local1.height));
if (_local7 == 0){
return;
};
if ((_local5.width - (_local6 * _local1.width)) > 0){
_local6++;
};
if ((_local5.height - (_local7 * _local1.height)) > 0){
_local7++;
};
_local8 = OGlobal.Scale;
_local9 = 0;
while (_local9 < _local7) {
_local11 = 0;
while (_local11 < _local6) {
_local12 = new OBitmap(_local3, ((_local11 * _local1.width) / _local8), ((_local9 * _local1.height) / _local8));
this.addChild(_local12);
_local11++;
};
_local9++;
};
}
override public function Free():void{
super.Free();
}
public function set prIInd(_arg1:int):void{
this.iIInd = _arg1;
if (this.iImages == null){
this.iIInd = -1;
return;
};
if (this.iIInd >= (this.iImages.length - 1)){
this.iIInd = (this.iImages.length - 1);
};
Make();
}
public function get prIInd():int{
return (this.iIInd);
}
}
}//package ENGINE.INTERFACE
Section 26
//ODialog (ENGINE.INTERFACE.ODialog)
package ENGINE.INTERFACE {
import ENGINE.INTERFACE.ANIMATORS.*;
public class ODialog extends OWindow {
public static const iDefAnimators:Array = [{F:OA_Alpha.Make, iSAlpha:0, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:1, iPIter:12}, {F:OA_Alpha.Make, iSAlpha:-1, iEAlpha:0.2, iPIter:12}, null, null, null, null, null, null];
public function ODialog(_arg1:Array, _arg2:Array=null){
var _local3:Array;
_local3 = (_arg2) ? _arg2 : ODialog.iDefAnimators;
super(_arg1, _local3);
}
override public function Init():void{
super.Init();
this.SetVisible(false);
this.PosCenter();
this.prVisible = true;
}
}
}//package ENGINE.INTERFACE
Section 27
//OIObject (ENGINE.INTERFACE.OIObject)
package ENGINE.INTERFACE {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.ANIMATORS.*;
import ENGINE.CORE.*;
public class OIObject extends OSprite {
protected var iTrigger:uint;
protected var iAEnabled:Boolean;// = true
protected var iAManager:OAnimatorManager;
protected var iState:int;
protected var iAParams:Array;
protected var iParam:Array;
public static var trActive:uint = 2;
public static var trPress:uint = 16;
public static var trRool:uint = 8;
public static var trFocus:uint = 3;
public static var trVisible:uint = 1;
public function OIObject(_arg1:Array, _arg2:Array=null){
iTrigger = (trVisible | trActive);
iAEnabled = true;
super();
this.iParam = _arg1;
this.iAParams = _arg2;
this.Init();
}
public function get prMouseEnabled():Boolean{
return (((this.prVisible) && (this.prActive)));
}
public function get prRool():Boolean{
return (((this.iTrigger & trRool) > 0));
}
public function set prFocus(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trFocus);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anFocusIn]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trFocus));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anFocusOut]);
};
};
}
override public function get prVisible():Boolean{
return (((this.iTrigger & trVisible) > 0));
}
public function set prRool(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trRool);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOver]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trRool));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anRoolOut]);
};
};
}
override public function set prVisible(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trVisible);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anShow], false);
};
} else {
this.iTrigger = (this.iTrigger & ~(trVisible));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anHide], false);
};
};
if (((!(this.iAManager)) || (!(this.iAEnabled)))){
this.visible = _arg1;
};
this.mouseEnabled = this.prMouseEnabled;
this.mouseChildren = this.mouseEnabled;
}
public function OnRollOver(_arg1:MouseEvent):void{
this.prRool = true;
}
public function Init():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:DisplayObject;
var _local5:String;
if (this.iParam){
_local1 = this.iParam.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = this.iParam[_local2].length;
_local4 = this.iParam[_local2][0](this.iParam[_local2]);
_local5 = this.iParam[_local2][(_local3 - 3)];
if (_local5){
if ((this[_local5] is Array)){
this[_local5][this.iParam[_local2][(_local3 - 2)]] = _local4;
} else {
this[_local5] = _local4;
};
};
if ((_local4 is OIObject)){
(_local4 as OIObject).SetVisible(this.iParam[_local2][(_local3 - 1)]);
} else {
if ((_local4 is IDisplayObject)){
(_local4 as IDisplayObject).prVisible = this.iParam[_local2][(_local3 - 1)];
} else {
_local4.visible = this.iParam[_local2][(_local3 - 1)];
};
};
this.addChild(_local4);
_local2++;
};
};
this.iAManager = (this.iAParams) ? new OAnimatorManager(this) : null;
this.tabEnabled = false;
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.addEventListener(MouseEvent.ROLL_OVER, OnRollOver);
this.addEventListener(MouseEvent.ROLL_OUT, OnRollOut);
this.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown);
this.addEventListener(MouseEvent.MOUSE_UP, OnMouseUp);
}
public function get prAnimationEnabled():Boolean{
return (this.iAEnabled);
}
public function set prActive(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trActive);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anActivate]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trActive));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anDeactivate]);
};
};
this.mouseEnabled = this.prMouseEnabled;
this.mouseChildren = this.mouseEnabled;
}
public function OnMouseUp(_arg1:MouseEvent):void{
this.prPress = false;
}
public function get prPress():Boolean{
return (((this.iTrigger & trPress) > 0));
}
public function get State():int{
return (this.iState);
}
public function OnPress(_arg1:Event, _arg2):void{
}
public function OnRollOut(_arg1:MouseEvent):void{
this.prRool = false;
}
override public function Free():void{
this.removeEventListener(MouseEvent.MOUSE_UP, OnMouseUp);
this.removeEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown);
this.removeEventListener(MouseEvent.ROLL_OUT, OnRollOut);
this.removeEventListener(MouseEvent.ROLL_OVER, OnRollOver);
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
super.Free();
if (this.iAManager){
this.iAManager.Free();
};
this.iAManager = null;
}
public function get prAnimation():Boolean{
var _local1:int;
if (((this.iAManager) && (this.iAManager.prAnimation))){
return (true);
};
_local1 = 0;
while (_local1 < this.numChildren) {
if (!(this.getChildAt(_local1) is OIObject)){
} else {
if ((this.getChildAt(_local1) as OIObject).prAnimation){
return (true);
};
};
_local1++;
};
return (false);
}
public function get prActive():Boolean{
return (((this.iTrigger & trActive) > 0));
}
public function PosCenter(_arg1:Number=800, _arg2:Number=600):void{
var _local3:Rectangle;
_local3 = this.getBounds(this);
this.Pos(OGlobal.ScaleFloor((((_arg1 - this.prWidth) - (OGlobal.ToLocal(_local3.x) * 2)) / 2)), OGlobal.ScaleFloor((((_arg2 - this.prHeight) - (OGlobal.ToLocal(_local3.y) * 2)) / 2)));
}
public function AddAnimator(_arg1:Object, _arg2:Boolean=true):void{
var _local3:Boolean;
_local3 = (_arg2) ? ((((this.iAManager) && (this.prVisible))) && (this.iAEnabled)) : ((this.iAManager) && (this.iAEnabled));
if (_local3){
this.iAManager.AddAnimator(_arg1);
};
}
public function set prAnimationEnabled(_arg1:Boolean):void{
this.iAEnabled = _arg1;
}
public function set prPress(_arg1:Boolean):void{
if (_arg1){
this.iTrigger = (this.iTrigger | trPress);
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anPress]);
};
} else {
this.iTrigger = (this.iTrigger & ~(trPress));
if (this.iAManager){
this.AddAnimator(this.iAParams[OAnimatorManager.anUnpress]);
};
};
}
public function OnMouseDown(_arg1:MouseEvent):void{
this.prPress = true;
}
public function OnEnterFrame(_arg1:Event):void{
if (this.iAManager){
this.iAManager.OnEnterFrame();
};
}
public function SetVisible(_arg1:Boolean):void{
this.prAnimationEnabled = false;
this.prVisible = _arg1;
this.prAnimationEnabled = true;
}
public function set prAnimatorParams(_arg1:Array):void{
this.iAParams = _arg1;
if (!this.iAManager){
this.iAManager = new OAnimatorManager(this);
};
}
public function set State(_arg1:int):void{
this.iState = _arg1;
}
public function get prAnimatorParams():Array{
return (this.iAParams);
}
public function get prFocus():Boolean{
return (((this.iTrigger & trFocus) > 0));
}
}
}//package ENGINE.INTERFACE
Section 28
//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 29
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 30
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 31
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 32
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function set height(_arg1:Number):void;
function get scaleY():Number;
function move(_arg1:Number, _arg2:Number):void;
function get scaleX():Number;
function set mask(_arg1:DisplayObject):void;
function set scaleX(_arg1:Number):void;
function set name(_arg1:String):void;
function set scaleY(_arg1:Number):void;
function get visible():Boolean;
function get measuredWidth():Number;
function set visible(_arg1:Boolean):void;
function get alpha():Number;
function get height():Number;
function get width():Number;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set y(_arg1:Number):void;
function get x():Number;
function get y():Number;
function set alpha(_arg1:Number):void;
}
}//package mx.core
Section 33
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaters():Array;
function get instanceIndices():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 34
//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 35
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "2.0.1.0";
}
}//package mx.core
Section 36
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject {
private var _measuredWidth:Number;
private var _measuredHeight:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function SpriteAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 37
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import flash.utils.*;
import mx.core.*;
public class NameUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local3:DisplayObject;
var _local4:String;
var _local5:Array;
_local3 = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
var _local2:String;
var _local3:int;
var _local4:int;
if (!_arg1){
return (null);
};
_local2 = getQualifiedClassName(_arg1);
_local3 = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
_local4 = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 38
//OBombBonus (RES.GAME.OElements.OBombBonus)
package RES.GAME.OElements {
import flash.display.*;
import flash.geom.*;
public class OBombBonus extends OBonus {
public function OBombBonus(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
super(_arg1, "GRAY_LIGHT", _arg2, _arg3, _arg4);
}
private function IsInSquare(_arg1:int, _arg2:int, _arg3:int):Boolean{
var _local4:Number;
_local4 = Math.sqrt((((_arg1 - iCordInPlatform.x) * (_arg1 - iCordInPlatform.x)) + ((_arg2 - iCordInPlatform.y) * (_arg2 - iCordInPlatform.y))));
return ((_local4 <= _arg3));
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
_local4 = new Array();
if (_arg3){
_local4 = super.Action(_arg1, _arg2, _arg3);
if ((((_local4 == null)) || ((isActive == false)))){
return (_local4);
};
};
if (((_arg2) && (isActive))){
this.removeChild(dopSprite);
isActive = false;
};
if (_arg3){
return (_local4);
};
_local5 = 2;
_local6 = (iCordInPlatform.x - _local5);
if (_local6 < 0){
_local6 = 0;
};
_local7 = (iCordInPlatform.y - _local5);
if (_local7 < 0){
_local7 = 0;
};
_local8 = (iCordInPlatform.x + _local5);
if (_local8 > (_arg1[0].length - 1)){
_local8 = (_arg1[0].length - 1);
};
_local9 = (iCordInPlatform.y + _local5);
if (_local9 > (_arg1.length - 1)){
_local9 = (_arg1.length - 1);
};
_local10 = _local7;
while (_local10 <= _local9) {
_local11 = _local6;
for (;_local11 <= _local8;_local11++) {
if (_arg1[_local10][_local11][2] == null){
} else {
if (_arg1[_local10][_local11][2].IsLock()){
} else {
if (IsInSquare(_local11, _local10, _local5)){
_local4.push(_arg1[_local10][_local11][2]);
continue;
};
};
};
};
_local10++;
};
return (_local4);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Sprite;
var _local5:ColorTransform;
var _local6:Sprite;
_local2 = new Sprite();
_local3 = (new TwinzL.OBomb() as Sprite);
_local3.width = (this.iSize * 0.8);
_local3.height = (this.iSize * 0.8);
_local2.addChild(_local3);
_local4 = (new TwinzL.OBomb() as Sprite);
_local4.width = (this.iSize * 0.8);
_local4.height = (this.iSize * 0.8);
_local5 = _local2.transform.colorTransform;
_local5.color = _arg1;
_local4.transform.colorTransform = _local5;
_local4.blendMode = BlendMode.MULTIPLY;
_local2.addChild(_local4);
_local6 = new Sprite();
_local6.graphics.lineStyle(2, 0);
_local6.graphics.drawRect((-(this.iSize) / 2), (-(this.iSize) / 2), this.iSize, this.iSize);
return (_local2);
}
}
}//package RES.GAME.OElements
Section 39
//OBonus (RES.GAME.OElements.OBonus)
package RES.GAME.OElements {
import flash.display.*;
import flash.geom.*;
import ENGINE.CORE.*;
public class OBonus extends OElement {
protected var dopSprite:Sprite;
protected var dopRightSprite:Sprite;
protected var dopUpSprite:Sprite;
protected var isActive:Boolean;// = true
protected var dopLeftSprite:Sprite;
protected var iColorBonus:Object;
public function OBonus(_arg1:String, _arg2:String, _arg3:Number=0, _arg4:Number=0, _arg5:uint=20){
isActive = true;
dopSprite = new Sprite();
iColorBonus = OElementColor.GetColor(_arg2);
super(_arg1, _arg3, _arg4, _arg5);
dopSprite.mouseEnabled = false;
dopSprite.mouseChildren = false;
this.addChild(dopSprite);
}
protected function DrawLeftSprite():void{
var _local1:Matrix;
var _local2:Matrix;
_local1 = new Matrix();
_local2 = new Matrix();
_local2.rotate(((Math.PI / 180) * -90));
_local1.concat(_local2);
_local2 = new Matrix();
_local2.scale((Math.sqrt(3) / 2), this.iPercentH);
_local1.concat(_local2);
_local2 = new Matrix();
_local2.b = Math.tan(((Math.PI / 180) * 30));
_local1.concat(_local2);
if (dopLeftSprite == null){
dopLeftSprite = new Sprite();
dopLeftSprite.addChild(GetSprite(iColorBonus.Left));
dopSprite.addChild(dopLeftSprite);
};
dopLeftSprite.transform.matrix = _local1;
dopLeftSprite.y = (((iSize / 2) - ((iSize * Math.sin(((Math.PI / 180) * 30))) / 2)) + ((iSize * (1 - iPercentH)) / 2));
dopLeftSprite.x = ((-(iSize) * Math.sqrt(3)) / 4);
}
protected function DrawSprite():void{
var _local1:Matrix;
var _local2:Matrix;
if (dopUpSprite == null){
dopUpSprite = new Sprite();
dopUpSprite.addChild(GetSprite(this.iColorBonus.Up));
_local1 = new Matrix();
_local2 = new Matrix();
_local2.rotate(((-(Math.PI) / 180) * 45));
_local1.concat(_local2);
_local2 = new Matrix();
_local2.scale(OGlobal.ToGlobal((Math.sqrt(3) / Math.sqrt(2))), OGlobal.ToGlobal((1 / Math.sqrt(2))));
_local1.concat(_local2);
dopUpSprite.transform.matrix = _local1;
dopSprite.addChild(dopUpSprite);
};
dopUpSprite.y = OGlobal.ToGlobal(((-(iSize) / 2) + (iSize * (1 - iPercentH))));
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
return (super.Action(_arg1, _arg2, _arg3));
}
override public function IsBonusElement():Boolean{
return (isActive);
}
override protected function DrawSolidElement():void{
super.DrawSolidElement();
if (isActive){
DrawSprite();
};
}
override public function Free():void{
iColorBonus = null;
dopSprite = null;
dopUpSprite = null;
dopLeftSprite = null;
dopRightSprite = null;
super.Free();
}
protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
return (_local2);
}
protected function DrawRightSprite():void{
var _local1:Matrix;
var _local2:Matrix;
_local1 = new Matrix();
_local2 = new Matrix();
_local2.scale((Math.sqrt(3) / 2), this.iPercentH);
_local1.concat(_local2);
_local2 = new Matrix();
_local2.b = Math.tan(((-(Math.PI) / 180) * 30));
_local1.concat(_local2);
if (dopRightSprite == null){
dopRightSprite = new Sprite();
dopRightSprite.addChild(GetSprite(iColorBonus.Right));
dopSprite.addChild(dopRightSprite);
};
dopRightSprite.transform.matrix = _local1;
dopRightSprite.y = (((iSize / 2) - ((iSize * Math.sin(((Math.PI / 180) * 30))) / 2)) + ((iSize * (1 - iPercentH)) / 2));
dopRightSprite.x = ((iSize * Math.sqrt(3)) / 4);
}
}
}//package RES.GAME.OElements
Section 40
//OColorBombBonus (RES.GAME.OElements.OColorBombBonus)
package RES.GAME.OElements {
import flash.display.*;
import flash.geom.*;
public class OColorBombBonus extends OBonus {
public function OColorBombBonus(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
super("GRAY_LIGHT", _arg1, _arg2, _arg3, _arg4);
}
override public function get Color():int{
if (isActive){
return (iColorBonus.Up);
};
return (iColor.Up);
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Object;
var _local5:Array;
var _local6:int;
var _local7:int;
_local4 = this.iColor;
_local5 = new Array();
if (_arg3){
_local5 = super.Action(_arg1, _arg2, _arg3);
if ((((_local5 == null)) || ((isActive == false)))){
return (_local5);
};
};
if (((_arg2) && (isActive))){
this.removeChild(dopSprite);
this.iColor = this.iColorBonus;
this.DrawSolidElement();
isActive = false;
};
if (_arg3){
return (_local5);
};
_local6 = 0;
while (_local6 < _arg1.length) {
_local7 = 0;
for (;_local7 < _arg1[_local6].length;_local7++) {
if (_arg1[_local6][_local7][2] == null){
} else {
if (_arg1[_local6][_local7][2].IsLock()){
} else {
if ((((iCordInPlatform.x == _local7)) && ((iCordInPlatform.y == _local6)))){
_local5.push(_arg1[_local6][_local7][2]);
} else {
if ((_arg1[_local6][_local7][2] as OElement).Color == iColorBonus.Up){
_local5.push(_arg1[_local6][_local7][2]);
continue;
};
};
};
};
};
_local6++;
};
return (_local5);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Sprite;
var _local5:ColorTransform;
var _local6:Sprite;
_local2 = new Sprite();
_local3 = (new TwinzL.OBomb() as Sprite);
_local3.width = (this.iSize * 0.8);
_local3.height = (this.iSize * 0.8);
_local2.addChild(_local3);
_local4 = (new TwinzL.OBomb() as Sprite);
_local4.width = (this.iSize * 0.8);
_local4.height = (this.iSize * 0.8);
_local5 = _local2.transform.colorTransform;
_local5.color = _arg1;
_local4.transform.colorTransform = _local5;
_local4.blendMode = BlendMode.MULTIPLY;
_local2.addChild(_local4);
_local6 = new Sprite();
_local6.graphics.lineStyle(2, 0);
_local6.graphics.drawRect((-(this.iSize) / 2), (-(this.iSize) / 2), this.iSize, this.iSize);
return (_local2);
}
}
}//package RES.GAME.OElements
Section 41
//OColumnDelBonus (RES.GAME.OElements.OColumnDelBonus)
package RES.GAME.OElements {
import flash.display.*;
public class OColumnDelBonus extends OBonus {
public function OColumnDelBonus(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
super(_arg1, "GRAY_LIGHT", _arg2, _arg3, _arg4);
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Array;
var _local5:int;
var _local6:int;
_local4 = new Array();
if (_arg3){
_local4 = super.Action(_arg1, _arg2, _arg3);
if ((((_local4 == null)) || ((isActive == false)))){
return (_local4);
};
};
if (((_arg2) && (isActive))){
this.removeChild(dopSprite);
isActive = false;
};
if (_arg3){
return (_local4);
};
_local5 = iCordInPlatform.y;
_local6 = 0;
while (_local6 < _arg1[_local5].length) {
if (_arg1[_local5][_local6][2] == null){
} else {
if (_arg1[_local5][_local6][2].IsLock()){
} else {
_local4.push(_arg1[_local5][_local6][2]);
};
};
_local6++;
};
if (_local4.length == 0){
_local4 = null;
};
return (_local4);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local2 = new Sprite();
_local2.graphics.lineStyle(1, _arg1);
_local2.graphics.beginFill(_arg1);
_local3 = ((iSize * 0.8) / 2);
_local4 = ((iSize * 0.8) / 2);
_local5 = ((iSize * 0.3) / 2);
_local6 = ((iSize * 0.1) / 2);
_local7 = ((iSize * 0.5) / 2);
_local2.graphics.moveTo(0, -(_local3));
_local2.graphics.lineTo(-(_local4), (-(_local3) + _local7));
_local2.graphics.lineTo(-(_local5), ((-(_local3) + _local7) - _local6));
_local2.graphics.lineTo(-(_local5), ((_local3 - _local7) + _local6));
_local2.graphics.lineTo(-(_local4), (_local3 - _local7));
_local2.graphics.lineTo(0, _local3);
_local2.graphics.lineTo(_local4, (_local3 - _local7));
_local2.graphics.lineTo(_local5, ((_local3 - _local7) + _local6));
_local2.graphics.lineTo(_local5, ((-(_local3) + _local7) - _local6));
_local2.graphics.lineTo(_local4, (-(_local3) + _local7));
_local2.graphics.lineTo(0, -(_local3));
return (_local2);
}
}
}//package RES.GAME.OElements
Section 42
//OCustomTextBlock (RES.GAME.OElements.OCustomTextBlock)
package RES.GAME.OElements {
import flash.display.*;
import ENGINE.CORE.*;
import flash.filters.*;
import flash.text.*;
public class OCustomTextBlock extends OTextBlock {
private var iTextSetings:Object;
private var iBackground:Boolean;
private var iColorText:int;
private var iWidth:Number;
private var iHeight:Number;
private var iBorders:String;
private var iDepth:Number;
public function OCustomTextBlock(_arg1:String, _arg2:String="", _arg3:Number=20, _arg4:Number=20, _arg5:Number=20, _arg6:Object=null, _arg7:int=0, _arg8:String=null, _arg9:Boolean=false, _arg10:int=0xFFFFFF){
iWidth = _arg3;
iHeight = _arg4;
iDepth = _arg5;
iTextSetings = ((_arg6)==null) ? new Object() : _arg6;
iBorders = ((_arg8)==null) ? "" : _arg8;
iBackground = _arg9;
iColorText = 14998521;
super(_arg1, _arg2, _arg5, _arg7);
}
override protected function DrawSprite():void{
if (dopUpSprite == null){
dopUpSprite = new Sprite();
dopUpSprite.addChild(GetSprite(this.iColorBonus.Up));
dopSprite.addChild(dopUpSprite);
};
dopUpSprite.y = OGlobal.ToGlobal((iHeight / 2));
dopUpSprite.x = OGlobal.ToGlobal((iWidth / 2));
}
override protected function DrawBlock(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
if (iPercent == 0){
return;
};
if (iPercentH == 0){
return;
};
_local5 = (_arg4 * iPercent);
_local6 = (_arg4 * (1 - iPercentH));
_local5 = (int((_local5 * 100)) / 100);
_local6 = (int((_local6 * 100)) / 100);
_local7 = (int(((((1 / 2) * Math.sqrt(2)) / 2) * 100)) / 100);
_local8 = Math.round((iWidth / iDepth));
_local9 = Math.round((iHeight / iDepth));
_local10 = _arg2;
_local11 = _arg3;
_arg4 = (iDepth - 1);
if (iBackground == false){
_arg1.clear();
_arg1.beginFill(0, 0);
_arg1.drawRect(_arg2, _arg3, (_local8 * iDepth), (_local9 * iDepth));
_arg1.endFill();
return;
};
_local12 = 0;
while (_local12 < _local8) {
_local13 = (_local9 - 1);
while (_local13 >= 0) {
_arg2 = (_local10 + (_local12 * iDepth));
_arg3 = (_local11 + (_local13 * iDepth));
_arg2 = (_arg2 + _arg4);
_arg1.beginFill(iColor.Up);
_arg1.drawRect(OGlobal.ToGlobal((_arg2 - _arg4)), OGlobal.ToGlobal(_arg3), OGlobal.ToGlobal(_arg4), OGlobal.ToGlobal(_arg4));
_arg1.endFill();
_arg1.beginFill(iColor.Right);
_arg1.moveTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(_arg3));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 - _arg4)), OGlobal.ToGlobal(_arg3));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 - (_arg4 * (1 - _local7)))), OGlobal.ToGlobal((_arg3 - (_arg4 * _local7))));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_arg4 * _local7))), OGlobal.ToGlobal((_arg3 - (_arg4 * _local7))));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(_arg3));
_arg1.endFill();
_arg1.beginFill(iColor.Left);
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_arg4 * _local7))), OGlobal.ToGlobal((_arg3 - (_arg4 * _local7))));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_arg4 * _local7))), OGlobal.ToGlobal((_arg3 + (_arg4 * (1 - _local7)))));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal((_arg3 + _arg4)));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(_arg3));
_arg1.endFill();
_local13--;
};
_local12++;
};
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:TextField;
var _local4:TextFormat;
var _local5:Number;
var _local6:TextField;
var _local7:uint;
var _local8:DropShadowFilter;
var _local9:Array;
_local2 = (new TwinzL.OFont() as Sprite);
_local3 = (_local2.getChildAt(0) as TextField);
_local4 = _local3.getTextFormat();
_local5 = ((iDepth * ((iTextSetings.aSize)==null) ? 1 : iTextSetings.aSize) * OGlobal.Scale);
_local4.color = iColorText;
_local4.size = _local5;
_local4.align = ((iTextSetings.aAlign)==null) ? TextFormatAlign.LEFT : iTextSetings.aAlign;
_local4.indent = (_local5 * ((iTextSetings.aIndent)==null) ? 1 : iTextSetings.aIndent);
_local4.leading = (_local5 * ((iTextSetings.aLeading)==null) ? 0 : iTextSetings.aLeading);
_local4.letterSpacing = (_local5 * ((iTextSetings.aLetterSpacing)==null) ? 0 : iTextSetings.aLetterSpacing);
_local6 = new TextField();
_local6.autoSize = TextFieldAutoSize.LEFT;
_local6.multiline = true;
_local7 = iWidth;
if (iTextSetings.aTextWidth != null){
_local7 = uint((iTextSetings.aTextWidth * iWidth));
};
_local6.width = (_local7 * OGlobal.Scale);
_local6.wordWrap = true;
_local6.text = iStr;
_local6.embedFonts = true;
_local6.setTextFormat(_local4);
_local2 = new Sprite();
_local2.addChild(_local6);
_local6.x = (-(_local6.width) / 2);
_local6.y = (-(_local6.height) / 2);
_local8 = new DropShadowFilter(2, 120, 4341111, 0.75, 2, 2);
_local9 = new Array();
_local9.push(_local8);
_local2.filters = _local9;
return (_local2);
}
}
}//package RES.GAME.OElements
Section 43
//ODelayBonus (RES.GAME.OElements.ODelayBonus)
package RES.GAME.OElements {
import flash.display.*;
import RES.GAME.OLine.*;
public class ODelayBonus extends OBonus {
public function ODelayBonus(_arg1:String, _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
super(_arg1, "GRAY_LIGHT", _arg2, _arg3, _arg4);
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Array;
_local4 = new Array();
if (_arg3){
_local4 = super.Action(_arg1, _arg2, _arg3);
if ((((_local4 == null)) || ((isActive == false)))){
return (_local4);
};
};
if (((_arg2) && (isActive))){
this.removeChild(dopSprite);
isActive = false;
OLine.Delay();
};
return (_local4);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:int;
_local2 = (new TwinzL.DelayBonus() as Sprite);
if (_local2.width > _local2.height){
_local3 = _local2.width;
_local2.scaleX = ((iSize * 0.8) / _local3);
_local2.scaleY = ((iSize * 0.8) / _local3);
} else {
_local3 = _local2.height;
_local2.scaleX = ((iSize * 0.8) / _local3);
_local2.scaleY = ((iSize * 0.8) / _local3);
};
return (_local2);
}
}
}//package RES.GAME.OElements
Section 44
//ODownDiagonalDelBonus (RES.GAME.OElements.ODownDiagonalDelBonus)
package RES.GAME.OElements {
import flash.display.*;
public class ODownDiagonalDelBonus extends OBonus {
public function ODownDiagonalDelBonus(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
super(_arg1, "GRAY_LIGHT", _arg2, _arg3, _arg4);
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Array;
var _local5:int;
var _local6:int;
_local4 = new Array();
if (_arg3){
_local4 = super.Action(_arg1, _arg2, _arg3);
if ((((_local4 == null)) || ((isActive == false)))){
return (_local4);
};
};
if (((_arg2) && (isActive))){
this.removeChild(dopSprite);
isActive = false;
};
if (_arg3){
return (_local4);
};
_local5 = (iCordInPlatform.x - 1);
_local6 = (iCordInPlatform.y - 1);
while ((((_local5 < (_arg1[0].length - 1))) && ((_local6 < (_arg1.length - 1))))) {
_local5++;
_local6++;
if (_arg1[_local6][_local5][2] == null){
} else {
if (_arg1[_local6][_local5][2].IsLock()){
} else {
_local4.push(_arg1[_local6][_local5][2]);
};
};
};
_local5 = iCordInPlatform.x;
_local6 = iCordInPlatform.y;
while ((((_local5 > 0)) && ((_local6 > 0)))) {
_local5--;
_local6--;
if (_arg1[_local6][_local5][2] == null){
} else {
if (_arg1[_local6][_local5][2].IsLock()){
} else {
_local4.push(_arg1[_local6][_local5][2]);
};
};
};
if (_local4.length == 0){
_local4 = null;
};
return (_local4);
}
override protected function GetSprite(_arg1:int):Sprite{
var sprite:Sprite;
var a:int;
var b:int;
var c:int;
var d:int;
var e:int;
var convert:Object;
var aColor = _arg1;
sprite = new Sprite();
sprite.graphics.lineStyle(1, aColor);
sprite.graphics.beginFill(aColor);
a = ((iSize * 0.8) / 2);
b = ((iSize * 0.8) / 2);
c = ((iSize * 0.3) / 2);
d = ((iSize * 0.1) / 2);
e = ((iSize * 0.5) / 2);
convert = new Object();
convert.cos = Math.cos((Math.PI / 4));
convert.sin = Math.sin((Math.PI / 4));
convert.cX = function (_arg1:Number, _arg2:Number):Number{
return (((_arg1 * this.cos) + (_arg2 * this.sin)));
};
convert.cY = function (_arg1:Number, _arg2:Number):Number{
return (((_arg1 * this.cos) - (_arg2 * this.sin)));
};
sprite.graphics.moveTo(convert.cX(0, -(a)), convert.cY(0, -(a)));
sprite.graphics.lineTo(convert.cX(-(b), (-(a) + e)), convert.cY(-(b), (-(a) + e)));
sprite.graphics.lineTo(convert.cX(-(c), ((-(a) + e) - d)), convert.cY(-(c), ((-(a) + e) - d)));
sprite.graphics.lineTo(convert.cX(-(c), ((a - e) + d)), convert.cY(-(c), ((a - e) + d)));
sprite.graphics.lineTo(convert.cX(-(b), (a - e)), convert.cY(-(b), (a - e)));
sprite.graphics.lineTo(convert.cX(0, a), convert.cY(0, a));
sprite.graphics.lineTo(convert.cX(b, (a - e)), convert.cY(b, (a - e)));
sprite.graphics.lineTo(convert.cX(c, ((a - e) + d)), convert.cY(c, ((a - e) + d)));
sprite.graphics.lineTo(convert.cX(c, ((-(a) + e) - d)), convert.cY(c, ((-(a) + e) - d)));
sprite.graphics.lineTo(convert.cX(b, (-(a) + e)), convert.cY(b, (-(a) + e)));
sprite.graphics.lineTo(convert.cX(0, -(a)), convert.cY(0, -(a)));
return (sprite);
}
}
}//package RES.GAME.OElements
Section 45
//OElement (RES.GAME.OElements.OElement)
package RES.GAME.OElements {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import RES.GAME.*;
import ENGINE.CORE.*;
import flash.utils.*;
import RES.*;
public class OElement extends CSprite {
private var iEndPoint:Point;
protected var iY:Number;
protected var iSize:uint;
public var iDebugArray:Array;
private var iDirection:Point;
protected var iX:Number;
protected var iPercentH:Number;// = 1
protected var iLock:Boolean;// = false
private var isTransit:Boolean;// = false
private var iSpriteSelect:Sprite;
public var iMouseEnable:Boolean;// = true
private var iTimer:int;
private var iCallString:String;
public var iRemoveEvent:Boolean;// = true
private var iSpeed:Number;// = 0
protected var cAcceleration:int;// = 3000
private var iMaxDeltaSelect:Number;
protected var iColor:Object;
public var iState:int;
public var refNewPlatform:OPlatform;// = null
public var iAnimationEnable:Boolean;// = true
private var iDeltaSelect:Number;
public var isInvisible:Boolean;// = false
public var iSelect:Boolean;// = false
protected var iPercent:Number;// = 1
protected var cMaxSpeed:int;// = 1000
public var iCordInPlatform:Point;
public var iStateSelect:int;
private var iStepDeltaSelect:Number;
public static const stNormalSelect:int = 5;
public static const stMoveAndDel:int = 2;
public static const stNormal:int = 0;
public static const stMove:int = 1;
public static const stShowSelect:int = 3;
public static const stHideSelect:int = 4;
public static var StageRect:Rectangle = OGlobal.StageRect;
public static var counter:int = 0;
public function OElement(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
iDebugArray = [];
cMaxSpeed = 1000;
cAcceleration = 3000;
isInvisible = false;
refNewPlatform = null;
iMouseEnable = true;
iAnimationEnable = true;
iRemoveEvent = true;
iSpeed = 0;
iEndPoint = new Point();
iLock = false;
iSelect = false;
iPercent = 1;
iPercentH = 1;
isTransit = false;
counter = (counter + 1);
iColor = OElementColor.GetColor(_arg1);
iSize = _arg4;
iMaxDeltaSelect = (int(((iSize * OElementColor.SHIFT) * 100)) / 100);
iStepDeltaSelect = (int(((iMaxDeltaSelect / 5) * 100)) / 100);
iDeltaSelect = 0;
super();
DrawSolidElement();
iSpriteSelect = DrawSelectSprite();
this.addChild(iSpriteSelect);
iSpriteSelect.mouseChildren = true;
iSpriteSelect.mouseEnabled = false;
iSpriteSelect.alpha = 0;
iSpriteSelect.visible = false;
SetPos(_arg2, _arg3);
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function MoveAndDell(_arg1:Point, _arg2:Number, _arg3:Number=1000):void{
iDirection = _arg1.clone();
iDirection.x = 0;
iDirection.y = (iDirection.y / Math.abs(iDirection.y));
iSpeed = ((_arg2)==-1) ? cMaxSpeed : _arg2;
if (_arg2 == -1){
iTimer = getTimer();
};
this.State = stMoveAndDel;
}
private function onMouseUp(_arg1:Event):void{
this.stopDrag();
}
public function Stop():void{
this.State = stNormal;
iSpeed = 0;
}
public function get IsMove():Boolean{
return ((((this.State == stMove)) || ((State == stMoveAndDel))));
}
public function get Speed():Number{
return (iSpeed);
}
public function get IsTransit():Boolean{
return (isTransit);
}
public function get Size():uint{
return (iSize);
}
public function set IsTransit(_arg1:Boolean):void{
isTransit = _arg1;
}
public function get Direction():Point{
return (iDirection);
}
public function IsBonusElement():Boolean{
return (false);
}
protected function DrawBrokenElement():void{
var _local1:Number;
this.graphics.clear();
_local1 = (int(((Math.sqrt(3) / 2) * 100)) / 100);
DrawBlock(this.graphics, 0, ((-(iSize) / 2) - 0.5), ((iSize / 2) - 0.5));
DrawBlock(this.graphics, (((iSize / 2) + 0.5) * _local1), (((iSize / 2) + 0.5) / 2), ((iSize / 2) - 0.5));
DrawBlock(this.graphics, (-(((iSize / 2) + 0.5)) * _local1), (((iSize / 2) + 0.5) / 2), ((iSize / 2) - 0.5));
DrawBlock(this.graphics, (((iSize / 2) + 0.5) * _local1), (-(((iSize / 2) + 0.5)) / 2), ((iSize / 2) - 0.5));
DrawBlock(this.graphics, (-(((iSize / 2) + 0.5)) * _local1), (-(((iSize / 2) + 0.5)) / 2), ((iSize / 2) - 0.5));
DrawBlock(this.graphics, 0, ((iSize / 2) + 0.5), ((iSize / 2) - 0.5));
DrawBlock(this.graphics, 0, 0, ((iSize / 2) - 0.5));
}
public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Array;
_local4 = OPlatform.getIsland(_arg1, this.iCordInPlatform);
if (_local4.length >= 3){
return (_local4);
};
return (null);
}
public function get State():int{
return (iState);
}
protected function DrawSelectSprite():Sprite{
var _local1:Sprite;
var _local2:Number;
_local1 = new Sprite();
_local2 = iPercentH;
iPercentH = ((Math.abs(iMaxDeltaSelect) + 1) / iSize);
DrawBlock(_local1.graphics, 0, 0, iSize);
iPercentH = _local2;
return (_local1);
}
public function get Color():int{
return (iColor.Up);
}
protected function DrawSolidElement():void{
this.graphics.clear();
DrawBlock(this.graphics, 0, 0, iSize);
}
public function Lock():void{
if (iLock){
return;
};
iLock = true;
DrawBrokenElement();
}
protected function DrawBlock(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (iPercent == 0){
return;
};
if (iPercentH == 0){
return;
};
_local5 = (_arg4 * iPercent);
_local6 = (_arg4 * (1 - iPercentH));
_local5 = (int((_local5 * 100)) / 100);
_local6 = (int((_local6 * 100)) / 100);
_local7 = (int(((Math.sqrt(3) / 2) * 100)) / 100);
_local8 = 0;
_arg1.beginFill(iColor.Up);
_arg1.moveTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(((_arg3 + _local8) + _local6)));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 - (_arg4 * _local7))), OGlobal.ToGlobal((((_arg3 - (_arg4 / 2)) + _local8) + _local6)));
_arg1.lineTo(OGlobal.ToGlobal(((_arg2 - (_arg4 * _local7)) + (_local5 * _local7))), OGlobal.ToGlobal((((_arg3 - ((_arg4 + _local5) / 2)) + _local8) + _local6)));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_local5 * _local7))), OGlobal.ToGlobal((((_arg3 - (_local5 / 2)) + _local8) + _local6)));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(((_arg3 + _local8) + _local6)));
_arg1.endFill();
_arg1.beginFill(iColor.Left);
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(((_arg3 + _arg4) + _local8)));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 - (_arg4 * _local7))), OGlobal.ToGlobal(((_arg3 + (_arg4 / 2)) + _local8)));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 - (_arg4 * _local7))), OGlobal.ToGlobal((((_arg3 - (_arg4 / 2)) + _local8) + _local6)));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(((_arg3 + _local8) + _local6)));
_arg1.endFill();
_arg1.beginFill(iColor.Right);
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_local5 * _local7))), OGlobal.ToGlobal((((_arg3 - (_local5 / 2)) + _local8) + _local6)));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_local5 * _local7))), OGlobal.ToGlobal((((_arg3 + _arg4) - (_local5 / 2)) + _local8)));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(((_arg3 + _arg4) + _local8)));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(((_arg3 + _local8) + _local6)));
_arg1.endFill();
}
public function IsLock():Boolean{
return (iLock);
}
public function get prX():Number{
return (iX);
}
override public function Free():void{
counter = (counter - 1);
this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
super.Free();
}
public function get prY():Number{
return (iY);
}
public function UnLock():void{
if (!iLock){
return;
};
iLock = false;
DrawSolidElement();
}
public function MoveAndCall(_arg1:Number, _arg2:Number, _arg3:Number=-1, _arg4:Boolean=true, _arg5:String=null):void{
MoveTo(_arg1, _arg2, _arg4);
if (_arg3 != -1){
iSpeed = _arg3;
};
this.iCallString = _arg5;
}
public function SetPos(_arg1:Number=0, _arg2:Number=0, _arg3:Boolean=false):void{
this.iX = _arg1;
this.iY = _arg2;
this.x = OGlobal.ToGlobal(iX);
this.y = OGlobal.ToGlobal((iY + iDeltaSelect));
}
private function onMouseDown(_arg1:Event):void{
(this.parent as Sprite).addChild(this);
this.startDrag();
}
public function set IsSelect(_arg1:Boolean):void{
if (_arg1 == iSelect){
return;
};
iSelect = _arg1;
if (iAnimationEnable == false){
return;
};
if (iSelect){
iStateSelect = stShowSelect;
iSpriteSelect.visible = true;
} else {
iStateSelect = stHideSelect;
};
if ((((_arg1 == false)) && ((iStateSelect == stNormalSelect)))){
trace("Select Error");
};
}
public function MoveTo(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{
var _local4:Number;
iEndPoint.x = _arg1;
iEndPoint.y = _arg2;
if (_arg3){
iDirection = new Point((_arg1 - this.prX), (_arg2 - this.prY));
_local4 = Math.sqrt(((iDirection.x * iDirection.x) + (iDirection.y * iDirection.y)));
iDirection.x = (iDirection.x / _local4);
iDirection.y = (iDirection.y / _local4);
iSpeed = 0;
this.State = stMove;
};
}
public function set Direction(_arg1:Point):void{
iDirection = _arg1.clone();
}
public function ShowPercent(_arg1:Number=-1, _arg2:Number=-1):void{
iPercent = ((_arg1)==-1) ? iPercent : _arg1;
iPercentH = ((_arg2)==-1) ? iPercentH : _arg2;
DrawSolidElement();
}
public function get DeltaSelect():Number{
return (iDeltaSelect);
}
public function get IsSelect():Boolean{
return (iSelect);
}
public function set State(_arg1:int):void{
iState = _arg1;
switch (iState){
case stNormal:
iSpeed = 0;
break;
case stMove:
iTimer = getTimer();
break;
};
}
public function onEnterFrame(_arg1:Event):void{
var _local2:Number;
var _local3:Rectangle;
var _local4:String;
switch (iState){
case stNormal:
break;
case stMove:
_local2 = ((getTimer() - iTimer) / 1000);
this.SetPos((this.prX + ((iDirection.x * iSpeed) * _local2)), (this.prY + ((iDirection.y * iSpeed) * _local2)));
iTimer = getTimer();
if (iSpeed < cMaxSpeed){
iSpeed = (iSpeed + (cAcceleration * _local2));
if (iSpeed > cMaxSpeed){
iSpeed = cMaxSpeed;
};
};
if ((((iEndPoint.x - this.prX) * iDirection.x) + ((iEndPoint.y - this.prY) * iDirection.y)) < 0){
if (this.iCallString == OElementEvents.REGISTER){
};
if (this.iCallString == null){
this.SetPos(iEndPoint.x, iEndPoint.y);
this.State = stNormal;
break;
};
if ((((this.iCallString == OElementEvents.ENDMOVE)) || ((this.iCallString == OElementEvents.ONPOS)))){
this.SetPos(iEndPoint.x, iEndPoint.y);
this.State = stNormal;
};
if (this.iCallString != ""){
_local4 = iCallString;
iCallString = "";
this.dispatchEvent(new OEvent(_local4));
};
};
break;
case stMoveAndDel:
_local2 = ((getTimer() - iTimer) / 1000);
this.SetPos((this.prX + ((iDirection.x * iSpeed) * _local2)), (this.prY + ((iDirection.y * iSpeed) * _local2)));
iTimer = getTimer();
if (iSpeed < cMaxSpeed){
iSpeed = (iSpeed + (cAcceleration * _local2));
if (iSpeed > cMaxSpeed){
iSpeed = cMaxSpeed;
};
};
if (this.stage == null){
break;
};
_local3 = this.getRect(OGlobal.prStage);
if ((((((((_local3.x < (-(_local3.width) + StageRect.x))) || ((_local3.y < (-(_local3.height) + StageRect.y))))) || ((_local3.x > StageRect.width)))) || ((_local3.y > StageRect.height)))){
this.visible = false;
this.State = stNormal;
this.dispatchEvent(new OEvent(OElementEvents.FREE));
};
break;
};
switch (iStateSelect){
case stShowSelect:
iDeltaSelect = (iDeltaSelect + iStepDeltaSelect);
if (Math.abs(iDeltaSelect) >= Math.abs(iMaxDeltaSelect)){
iDeltaSelect = iMaxDeltaSelect;
iStateSelect = stNormalSelect;
};
this.y = OGlobal.ToGlobal((this.iY + iDeltaSelect));
iSpriteSelect.y = -(OGlobal.ToGlobal(iDeltaSelect));
break;
case stHideSelect:
if ((iDeltaSelect * (iDeltaSelect - iStepDeltaSelect)) <= 0){
iDeltaSelect = 0;
iStateSelect = stNormalSelect;
iSpriteSelect.visible = false;
} else {
iDeltaSelect = (iDeltaSelect - iStepDeltaSelect);
};
this.y = OGlobal.ToGlobal((this.iY + iDeltaSelect));
iSpriteSelect.y = -(OGlobal.ToGlobal(iDeltaSelect));
break;
};
}
public function get MaxDeltaSelect():Number{
return (iMaxDeltaSelect);
}
}
}//package RES.GAME.OElements
Section 46
//OElementColor (RES.GAME.OElements.OElementColor)
package RES.GAME.OElements {
import ENGINE.DISPLAY.*;
public class OElementColor {
public static const TURQUOISE:Object = {cUp:{cH:158, cS:0.69, cB:0.83, cL:1.2}, cLeft:{cH:158, cS:1, cB:0.56, cL:1.2}, cRight:{cH:158, cS:1, cB:0.7, cL:1.2}};
public static const AQUA:Object = {cUp:{cH:184, cS:0.69, cB:0.83, cL:1.2}, cLeft:{cH:184, cS:1, cB:0.56, cL:1.2}, cRight:{cH:184, cS:1, cB:0.7, cL:1.2}};
public static const GRAY_LIGHT:Object = {cUp:{cH:0, cS:0, cB:0.91, cL:1.2}, cLeft:{cH:0, cS:0, cB:0.71, cL:1.2}, cRight:{cH:0, cS:0, cB:0.79, cL:1.2}};
public static const MAGENTA:Object = {cUp:{cH:300, cS:0.58, cB:0.76, cL:1.2}, cLeft:{cH:300, cS:0.86, cB:0.49, cL:1.2}, cRight:{cH:300, cS:0.87, cB:0.62, cL:1.2}};
public static const BLUE_DARK:Object = {cUp:{cH:222, cS:0.92, cB:0.41, cL:1.2}, cLeft:{cH:222, cS:0.92, cB:0.25, cL:1.2}, cRight:{cH:222, cS:0.92, cB:0.36, cL:1.2}};
public static const RED_VIOLET:Object = {cUp:{cH:332, cS:0.69, cB:0.83, cL:1.2}, cLeft:{cH:332, cS:1, cB:0.56, cL:1.2}, cRight:{cH:332, cS:1, cB:0.7, cL:1.2}};
public static const SILVER:Object = {cUp:{cH:0, cS:0, cB:0.74, cL:1.2}, cLeft:{cH:0, cS:0, cB:0.53, cL:1.2}, cRight:{cH:0, cS:0, cB:0.58, cL:1.2}};
public static const BLACK:Object = {cUp:{cH:0, cS:0, cB:0.27, cL:1.2}, cLeft:{cH:0, cS:0, cB:0.14, cL:1.2}, cRight:{cH:0, cS:0, cB:0.17, cL:1.2}};
public static const GREEN:Object = {cUp:{cH:118, cS:0.69, cB:0.83, cL:1.2}, cLeft:{cH:118, cS:1, cB:0.56, cL:1.2}, cRight:{cH:118, cS:1, cB:0.7, cL:1.2}};
public static const OUTLINING:Object = {cTh:1, cA:0.3};
public static const GRAY:Object = {cUp:{cH:0, cS:0, cB:0.54, cL:1.2}, cLeft:{cH:0, cS:0, cB:0.28, cL:1.2}, cRight:{cH:0, cS:0, cB:0.35, cL:1.2}};
public static const ORANGE:Object = {cUp:{cH:39, cS:0.77, cB:0.88, cL:1.2}, cLeft:{cH:39, cS:1, cB:0.56, cL:1.2}, cRight:{cH:39, cS:1, cB:0.7, cL:1.2}};
public static const AZURE:Object = {cUp:{cH:200, cS:0.69, cB:0.83, cL:1.2}, cLeft:{cH:200, cS:1, cB:0.56, cL:1.2}, cRight:{cH:200, cS:1, cB:0.7, cL:1.2}};
public static const RED:Object = {cUp:{cH:4, cS:0.69, cB:0.83, cL:1.2}, cLeft:{cH:4, cS:0.99, cB:0.56, cL:1.2}, cRight:{cH:4, cS:0.99, cB:0.7, cL:1.2}};
public static const BLUE:Object = {cUp:{cH:240, cS:0.56, cB:0.86, cL:1.2}, cLeft:{cH:240, cS:0.73, cB:0.64, cL:1.2}, cRight:{cH:240, cS:0.77, cB:0.75, cL:1.2}};
public static const GREEN_LIGHT:Object = {cUp:{cH:76, cS:0.77, cB:0.88, cL:1.2}, cLeft:{cH:76, cS:1, cB:0.56, cL:1.2}, cRight:{cH:76, cS:1, cB:0.7, cL:1.2}};
public static const VIOLET:Object = {cUp:{cH:270, cS:0.65, cB:0.84, cL:1.2}, cLeft:{cH:270, cS:0.91, cB:0.58, cL:1.2}, cRight:{cH:270, cS:0.93, cB:0.71, cL:1.2}};
public static var COLORS:Array = ["RED", "ORANGE", "GREEN", "BLUE"];
public static var SHIFT:Number = -0.2;
public static function GetColor(_arg1:String):Object{
var _local2:Object;
var _local3:Object;
_local2 = new Object();
_local3 = OElementColor[_arg1.toUpperCase()];
_local2.Up = ODisplay.HSBToRGB(_local3.cUp.cH, _local3.cUp.cS, _local3.cUp.cB);
_local2.Left = ODisplay.HSBToRGB(_local3.cLeft.cH, _local3.cLeft.cS, _local3.cLeft.cB);
_local2.Right = ODisplay.HSBToRGB(_local3.cRight.cH, _local3.cRight.cS, _local3.cRight.cB);
_local2.OutLining = OElementColor.OUTLINING;
return (_local2);
}
}
}//package RES.GAME.OElements
Section 47
//OElementEvents (RES.GAME.OElements.OElementEvents)
package RES.GAME.OElements {
public class OElementEvents {
public static const REGISTER:String = "REGISTER";
public static const UNLOCK:String = "UNLOCK";
public static const LOCK:String = "LOCK";
public static const ENDMOVE:String = "ENDMOVE";
public static const DELETE:String = "DELETE";
public static const FREE:String = "FREE";
public static const ONPOS:String = "ONPOS";
public static const StartEffect:String = "StartEffect";
public static const EndEffect:String = "EndEffect";
public static const UNREGISTER:String = "UNREGISTER";
}
}//package RES.GAME.OElements
Section 48
//OHole (RES.GAME.OElements.OHole)
package RES.GAME.OElements {
import flash.display.*;
public class OHole extends OElement {
public function OHole(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
_arg1 = "BLACK";
super(_arg1, _arg2, _arg3, _arg4);
this.mouseEnabled = false;
this.Lock();
}
override public function Lock():void{
this.iLock = true;
}
override public function UnLock():void{
}
override protected function DrawBlock(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number):void{
}
override public function set mouseEnabled(_arg1:Boolean):void{
super.mouseEnabled = false;
}
}
}//package RES.GAME.OElements
Section 49
//OMusicControl (RES.GAME.OElements.OMusicControl)
package RES.GAME.OElements {
import flash.events.*;
import flash.display.*;
public class OMusicControl extends OSimpleTextBlock {
private var krest:Sprite;
public function OMusicControl(_arg1:String, _arg2:String, _arg3:uint=20, _arg4:int=0){
_arg2 = "M";
super(_arg1, _arg2, _arg3, _arg4);
this.addEventListener(MouseEvent.CLICK, onClick);
}
override public function Free():void{
this.removeEventListener(MouseEvent.CLICK, onClick);
super.Free();
}
private function onClick(_arg1:Event):void{
trace("Click");
krest.visible = !(krest.visible);
TwinzL.iGAME.prMusicVolume = (krest.visible) ? 0 : 1;
}
private function MakeKrest():void{
var _local1:Sprite;
krest = new Sprite();
_local1 = (new TwinzL.OKrestSymbol() as Sprite);
_local1.width = (this.iSize * 0.8);
_local1.height = (this.iSize * 0.8);
krest.addChild(_local1);
krest.visible = (TwinzL.iGAME.prMusicVolume == 0);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:Sprite;
_local2 = new Sprite();
_local3 = (new TwinzL.OMusicSymbol() as Sprite);
_local3.width = (this.iSize * 0.8);
_local3.height = (this.iSize * 0.8);
_local2.addChild(_local3);
if (krest == null){
MakeKrest();
};
_local2.addChild(krest);
return (_local2);
}
}
}//package RES.GAME.OElements
Section 50
//OPauseControl (RES.GAME.OElements.OPauseControl)
package RES.GAME.OElements {
import flash.display.*;
public class OPauseControl extends OSimpleTextBlock {
public function OPauseControl(_arg1:String, _arg2:String="A", _arg3:uint=20, _arg4:int=0){
_arg2 = "P";
super(_arg1, _arg2, _arg3, _arg4);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:Sprite;
var _local4:Number;
_local2 = new Sprite();
_local3 = (new TwinzL.OPauseSymbol() as Sprite);
_local4 = ((this.iSize * 0.8) / _local3.height);
_local3.width = (_local3.width * _local4);
_local3.height = (_local3.height * _local4);
_local2.addChild(_local3);
return (_local2);
}
}
}//package RES.GAME.OElements
Section 51
//ORowDelBonus (RES.GAME.OElements.ORowDelBonus)
package RES.GAME.OElements {
import flash.display.*;
public class ORowDelBonus extends OBonus {
public function ORowDelBonus(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
super(_arg1, "GRAY_LIGHT", _arg2, _arg3, _arg4);
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Array;
var _local5:int;
var _local6:int;
_local4 = new Array();
if (_arg3){
_local4 = super.Action(_arg1, _arg2, _arg3);
if ((((_local4 == null)) || ((isActive == false)))){
return (_local4);
};
};
if (((_arg2) && (isActive))){
this.removeChild(dopSprite);
isActive = false;
};
if (_arg3){
return (_local4);
};
_local5 = iCordInPlatform.x;
_local6 = 0;
while (_local6 < _arg1.length) {
if (_arg1[_local6][_local5][2] == null){
} else {
if (_arg1[_local6][_local5][2].IsLock()){
} else {
_local4.push(_arg1[_local6][_local5][2]);
};
};
_local6++;
};
if (_local4.length == 0){
_local4 = null;
};
return (_local4);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local2 = new Sprite();
_local2.graphics.lineStyle(1, _arg1);
_local2.graphics.beginFill(_arg1);
_local3 = ((iSize * 0.8) / 2);
_local4 = ((iSize * 0.8) / 2);
_local5 = ((iSize * 0.3) / 2);
_local6 = ((iSize * 0.1) / 2);
_local7 = ((iSize * 0.5) / 2);
_local2.graphics.moveTo(-(_local3), 0);
_local2.graphics.lineTo((-(_local3) + _local7), -(_local4));
_local2.graphics.lineTo(((-(_local3) + _local7) - _local6), -(_local5));
_local2.graphics.lineTo(((_local3 - _local7) + _local6), -(_local5));
_local2.graphics.lineTo((_local3 - _local7), -(_local4));
_local2.graphics.lineTo(_local3, 0);
_local2.graphics.lineTo((_local3 - _local7), _local4);
_local2.graphics.lineTo(((_local3 - _local7) + _local6), _local5);
_local2.graphics.lineTo(((-(_local3) + _local7) - _local6), _local5);
_local2.graphics.lineTo((-(_local3) + _local7), _local4);
_local2.graphics.lineTo(-(_local3), 0);
return (_local2);
}
}
}//package RES.GAME.OElements
Section 52
//OSimpleTextBlock (RES.GAME.OElements.OSimpleTextBlock)
package RES.GAME.OElements {
import flash.display.*;
import ENGINE.CORE.*;
public class OSimpleTextBlock extends OTextBlock {
public function OSimpleTextBlock(_arg1:String, _arg2:String="A", _arg3:uint=20, _arg4:int=0){
super(_arg1, _arg2, _arg3, _arg4);
}
override protected function DrawSprite():void{
if (dopUpSprite == null){
dopUpSprite = new Sprite();
dopUpSprite.addChild(GetSprite(this.iColorBonus.Up));
dopSprite.addChild(dopUpSprite);
};
dopUpSprite.y = OGlobal.ToGlobal((iSize / 2));
dopUpSprite.x = OGlobal.ToGlobal((iSize / 2));
dopUpSprite.width = (dopUpSprite.width * OGlobal.Scale);
dopUpSprite.height = (dopUpSprite.height * OGlobal.Scale);
}
override protected function DrawBlock(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (iPercent == 0){
return;
};
if (iPercentH == 0){
return;
};
_local5 = (_arg4 * iPercent);
_local6 = (_arg4 * (1 - iPercentH));
_local5 = (int((_local5 * 100)) / 100);
_local6 = (int((_local6 * 100)) / 100);
_local7 = (int(((((1 / 2) * Math.sqrt(2)) / 2) * 100)) / 100);
_arg2 = (_arg2 + _arg4);
_arg1.beginFill(iColor.Up);
_arg1.drawRect(OGlobal.ToGlobal((_arg2 - _arg4)), OGlobal.ToGlobal(_arg3), OGlobal.ToGlobal(_arg4), OGlobal.ToGlobal(_arg4));
_arg1.endFill();
_arg1.beginFill(iColor.Right);
_arg1.moveTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(_arg3));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 - _arg4)), OGlobal.ToGlobal(_arg3));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 - (_arg4 * (1 - _local7)))), OGlobal.ToGlobal((_arg3 - (_arg4 * _local7))));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_arg4 * _local7))), OGlobal.ToGlobal((_arg3 - (_arg4 * _local7))));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(_arg3));
_arg1.endFill();
_arg1.beginFill(iColor.Left);
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_arg4 * _local7))), OGlobal.ToGlobal((_arg3 - (_arg4 * _local7))));
_arg1.lineTo(OGlobal.ToGlobal((_arg2 + (_arg4 * _local7))), OGlobal.ToGlobal((_arg3 + (_arg4 * (1 - _local7)))));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal((_arg3 + _arg4)));
_arg1.lineTo(OGlobal.ToGlobal(_arg2), OGlobal.ToGlobal(_arg3));
_arg1.endFill();
}
}
}//package RES.GAME.OElements
Section 53
//OSoundControl (RES.GAME.OElements.OSoundControl)
package RES.GAME.OElements {
import flash.events.*;
import flash.display.*;
public class OSoundControl extends OSimpleTextBlock {
private var krest:Sprite;
public function OSoundControl(_arg1:String, _arg2:String, _arg3:uint=20, _arg4:int=0){
_arg2 = "S";
super(_arg1, _arg2, _arg3, _arg4);
this.addEventListener(MouseEvent.CLICK, onClick);
}
override public function Free():void{
this.removeEventListener(MouseEvent.CLICK, onClick);
super.Free();
}
private function onClick(_arg1:Event):void{
krest.visible = !(krest.visible);
TwinzL.iGAME.prSoundVolume = (krest.visible) ? 0 : 0.8;
}
private function MakeKrest():void{
var _local1:Sprite;
krest = new Sprite();
_local1 = (new TwinzL.OKrestSymbol() as Sprite);
_local1.width = (this.iSize * 0.8);
_local1.height = (this.iSize * 0.8);
krest.addChild(_local1);
krest.visible = (TwinzL.iGAME.prSoundVolume == 0);
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:Sprite;
_local2 = new Sprite();
_local3 = (new TwinzL.OSoundSymbol() as Sprite);
_local3.width = (this.iSize * 0.8);
_local3.height = (this.iSize * 0.8);
_local2.addChild(_local3);
if (krest == null){
MakeKrest();
};
_local2.addChild(krest);
return (_local2);
}
}
}//package RES.GAME.OElements
Section 54
//OTextBlock (RES.GAME.OElements.OTextBlock)
package RES.GAME.OElements {
import flash.display.*;
import flash.text.*;
public class OTextBlock extends OBonus {
private var iAlpha:int;
public var iStr:String;
public var object:Object;
public var iTextSprite:Sprite;
public function OTextBlock(_arg1:String, _arg2:String="A", _arg3:uint=20, _arg4:int=0){
iStr = _arg2;
iAlpha = _arg4;
super(_arg1, "GRAY_LIGHT", 0, 0, _arg3);
cMaxSpeed = 1500;
cAcceleration = 5000;
}
override protected function DrawLeftSprite():void{
}
override public function Free():void{
var _local1:int;
if ((object is Array)){
_local1 = (object as Array).indexOf(this);
if (_local1 != -1){
(object as Array)[_local1] = null;
(object as Array).splice(_local1, 1);
};
object = null;
};
super.Free();
}
override protected function GetSprite(_arg1:int):Sprite{
var _local2:Sprite;
var _local3:TextField;
var _local4:TextFormat;
var _local5:TextField;
var _local6:Number;
_local2 = (new TwinzL.OFont() as Sprite);
_local3 = (_local2.getChildAt(0) as TextField);
_local4 = _local3.getTextFormat();
_local4.color = _arg1;
_local4.size = 150;
_local5 = new TextField();
_local5.autoSize = TextFieldAutoSize.LEFT;
_local5.text = iStr;
_local5.embedFonts = true;
_local5.setTextFormat(_local4);
_local2 = new Sprite();
_local2.addChild(_local5);
_local5.x = (-(_local5.width) / 2);
_local5.y = (-(_local5.height) / 2);
_local6 = Math.max(((this.iSize * 0.8) / _local5.getBounds(this).height));
_local2.width = (_local2.width * _local6);
_local2.height = (_local2.height * _local6);
_local2.rotation = iAlpha;
iTextSprite = _local2;
return (_local2);
}
override protected function DrawRightSprite():void{
}
}
}//package RES.GAME.OElements
Section 55
//OUpDiagonalDelBonus (RES.GAME.OElements.OUpDiagonalDelBonus)
package RES.GAME.OElements {
import flash.display.*;
public class OUpDiagonalDelBonus extends OBonus {
public function OUpDiagonalDelBonus(_arg1:String="RED", _arg2:Number=0, _arg3:Number=0, _arg4:uint=20){
super(_arg1, "GRAY_LIGHT", _arg2, _arg3, _arg4);
}
override public function Action(_arg1:Array, _arg2:Boolean=false, _arg3:Boolean=true):Array{
var _local4:Array;
var _local5:int;
var _local6:int;
_local4 = new Array();
if (_arg3){
_local4 = super.Action(_arg1, _arg2, _arg3);
if ((((_local4 == null)) || ((isActive == false)))){
return (_local4);
};
};
if (((_arg2) && (isActive))){
this.removeChild(dopSprite);
isActive = false;
};
if (_arg3){
return (_local4);
};
_local5 = (iCordInPlatform.x + 1);
_local6 = (iCordInPlatform.y - 1);
while ((((_local5 > 0)) && ((_local6 < (_arg1.length - 1))))) {
_local5--;
_local6++;
if (_arg1[_local6][_local5][2] == null){
} else {
if (_arg1[_local6][_local5][2].IsLock()){
} else {
_local4.push(_arg1[_local6][_local5][2]);
};
};
};
_local5 = iCordInPlatform.x;
_local6 = iCordInPlatform.y;
while ((((_local5 < (_arg1[0].length - 1))) && ((_local6 > 0)))) {
_local5++;
_local6--;
if (_arg1[_local6][_local5][2] == null){
} else {
if (_arg1[_local6][_local5][2].IsLock()){
} else {
_local4.push(_arg1[_local6][_local5][2]);
};
};
};
if (_local4.length == 0){
_local4 = null;
};
return (_local4);
}
override protected function GetSprite(_arg1:int):Sprite{
var sprite:Sprite;
var a:int;
var b:int;
var c:int;
var d:int;
var e:int;
var convert:Object;
var aColor = _arg1;
sprite = new Sprite();
sprite.graphics.lineStyle(1, aColor);
sprite.graphics.beginFill(aColor);
a = ((iSize * 0.8) / 2);
b = ((iSize * 0.8) / 2);
c = ((iSize * 0.3) / 2);
d = ((iSize * 0.1) / 2);
e = ((iSize * 0.5) / 2);
convert = new Object();
convert.cos = Math.cos((Math.PI / 4));
convert.sin = Math.sin((Math.PI / 4));
convert.cX = function (_arg1:Number, _arg2:Number):Number{
return (((_arg1 * this.cos) + (_arg2 * this.sin)));
};
convert.cY = function (_arg1:Number, _arg2:Number):Number{
return (((_arg1 * this.cos) - (_arg2 * this.sin)));
};
sprite.graphics.moveTo(convert.cX(-(a), 0), convert.cY(-(a), 0));
sprite.graphics.lineTo(convert.cX((-(a) + e), -(b)), convert.cY((-(a) + e), -(b)));
sprite.graphics.lineTo(convert.cX(((-(a) + e) - d), -(c)), convert.cY(((-(a) + e) - d), -(c)));
sprite.graphics.lineTo(convert.cX(((a - e) + d), -(c)), convert.cY(((a - e) + d), -(c)));
sprite.graphics.lineTo(convert.cX((a - e), -(b)), convert.cY((a - e), -(b)));
sprite.graphics.lineTo(convert.cX(a, 0), convert.cY(a, 0));
sprite.graphics.lineTo(convert.cX((a - e), b), convert.cY((a - e), b));
sprite.graphics.lineTo(convert.cX(((a - e) + d), c), convert.cY(((a - e) + d), c));
sprite.graphics.lineTo(convert.cX(((-(a) + e) - d), c), convert.cY(((-(a) + e) - d), c));
sprite.graphics.lineTo(convert.cX((-(a) + e), b), convert.cY((-(a) + e), b));
sprite.graphics.lineTo(convert.cX(-(a), 0), convert.cY(-(a), 0));
return (sprite);
}
}
}//package RES.GAME.OElements
Section 56
//ODiscreteLine (RES.GAME.OLine.ODiscreteLine)
package RES.GAME.OLine {
import flash.events.*;
import flash.geom.*;
import RES.GAME.OElements.*;
public class ODiscreteLine extends OLine {
private var iFreeLines:int;
private var iBlockMinCount:int;
private var iClickCount:int;
private var iBlockCount:int;
private var iDelay:int;// = 0
private var iStep:Number;
private var iBlockMaxCount:int;
public static const stTimer:int = 1;
public static const stEndTime:int = 2;
public static const stNormal:int = 0;
public static const stShowH:int = 3;
public function ODiscreteLine(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Point, _arg5:Object, _arg6:Number=0.25, _arg7:Object=null, _arg8:Boolean=false){
iDelay = 0;
iClickCount = _arg5.click;
iBlockCount = _arg5.block;
iBlockMinCount = _arg5.blockMin;
iBlockMaxCount = _arg5.blockMax;
if (((!((iBlockMinCount == int.MAX_VALUE))) && (!((iBlockMaxCount == int.MAX_VALUE))))){
iBlockCount = int.MAX_VALUE;
} else {
if (iBlockCount == int.MAX_VALUE){
iBlockCount = 1;
};
};
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
iPos = (iSizePlatform.y - 1);
iFreeLines = iSizePlatform.x;
iStep = -(SetStep(iSizePlatform.x));
NewLine();
this.State = stNormal;
mouseEnabled = true;
mouseChildren = false;
}
override public function Stop():void{
if (State != stShowH){
State = stNormal;
};
flagToStop = true;
}
private function onMouseClick(_arg1:Event):void{
}
private function SetStep(_arg1:int):Number{
if (iBlockCount != int.MAX_VALUE){
return ((iBlockCount / iClickCount));
};
return (((iBlockMinCount + (((iBlockMaxCount - iBlockMinCount) * _arg1) / iSizePlatform.x)) / iClickCount));
}
override protected function Start(_arg1:int=-1):void{
var _local2:OElement;
iFreeLines = ((_arg1 == -1)) ? iSizePlatform.x : _arg1;
for each (_local2 in iArray) {
if (_local2 != null){
_local2.alpha = 1;
};
};
}
override public function ShowAllLine():void{
var _local1:int;
_local1 = 0;
while (_local1 < iArray.length) {
iArray[_local1].visible = true;
_local1++;
};
iStep = -(SetStep(iFreeLines));
iDelay = 0;
}
override public function Delay(_arg1:Boolean):void{
iDelay = 2;
}
override protected function IsReady():Boolean{
if (this.State == stNormal){
return (true);
};
return (false);
}
override protected function StateAddLine():void{
State = stShowH;
}
override protected function NewLine(_arg1:int=-1):void{
super.NewLine(_arg1);
CustomAddLineEvent();
this.State = stNormal;
}
override protected function IsCanAdd():Boolean{
if (this.State == stShowH){
return (false);
};
return (true);
}
override public function onEnterFrame(_arg1:Event):void{
var _local2:OElement;
super.onEnterFrame(_arg1);
switch (iState){
case stTimer:
break;
case stShowH:
iHPercent = (iHPercent + (1 / 8));
if (iHPercent >= 1){
iHPercent = 1;
};
for each (_local2 in iArray) {
if (_local2 != null){
_local2.ShowPercent(-1, iHPercent);
};
};
if (iHPercent == 1){
if (flagToStop){
State = stNormal;
} else {
State = stEndTime;
};
};
break;
case stEndTime:
OLine.AddLine();
break;
};
}
override public function ReCalculateTime(_arg1:int):void{
iFreeLines = _arg1;
}
override public function CustomAddLineEvent():void{
if (iDelay > 0){
iDelay--;
return;
};
if (iCount <= 0){
return;
};
iStep = (iStep + SetStep(iFreeLines));
while (iStep >= 1) {
iStep--;
iArray[iPos].visible = true;
iPos--;
if (iPos < 0){
iStep = (iStep - SetStep(iFreeLines));
OLine.AddLineEvent();
return;
};
};
}
override public function set State(_arg1:int):void{
iState = _arg1;
switch (iState){
case stNormal:
break;
case stTimer:
break;
case stShowH:
break;
case stEndTime:
break;
};
}
}
}//package RES.GAME.OLine
Section 57
//OLine (RES.GAME.OLine.OLine)
package RES.GAME.OLine {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import RES.GAME.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import RES.*;
public class OLine extends Sprite {
protected var isPause:Boolean;// = false
protected var iCount:int;
protected var iPos:int;
protected var iBonusConfig:Object;
protected var iVecY:Point;
protected var iVecX:Point;
protected var iArray:Array;
protected var iSizePlatform:Point;
protected var iState:int;
protected var flagToStop:Boolean;// = false
protected var iLength:int;
protected var iHPercent:Number;
protected var iSizeBlock:Number;
protected var iDemoMode:Boolean;
protected var iStartH:Number;
public static const EVENT_ADD_LINE:String = "ADD_LINE";
public static const EVENT_NEW_LINE:String = "NEW_LINE";
private static var flagAddLine:Boolean = false;
public static var LinesLeft:int = 0;
private static var flagStartAll:Boolean = false;
private static var flagAddLineEvent:Boolean = false;
public static var Instances:Array = new Array();
public function OLine(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Point, _arg5:Object, _arg6:Number=0.25, _arg7:Object=null, _arg8:Boolean=false){
flagToStop = false;
isPause = false;
iDemoMode = _arg8;
iStartH = _arg6;
iHPercent = _arg6;
iVecX = _arg1.clone();
iVecY = _arg2.clone();
iSizePlatform = _arg4;
iLength = ((iSizePlatform.y)<=0) ? 1 : iSizePlatform.y;
iSizeBlock = _arg3;
iCount = _arg5.count;
iBonusConfig = _arg7;
OLine.LinesLeft = iCount;
super();
DrawGrid();
OLine.Instances.push(this);
Init();
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function Stop():void{
}
public function set prX(_arg1:Number):void{
this.x = OGlobal.ToGlobal(_arg1);
}
public function set prY(_arg1:Number):void{
this.y = OGlobal.ToGlobal(_arg1);
}
public function Init():void{
}
protected function Start(_arg1:int=-1):void{
}
public function ShowAllLine():void{
}
public function Delay(_arg1:Boolean):void{
}
public function get State():int{
return (iState);
}
protected function StateAddLine():void{
}
protected function IsReady():Boolean{
return (true);
}
public function get prX():Number{
return (OGlobal.ToLocal(this.x));
}
public function get prY():Number{
return (OGlobal.ToLocal(this.y));
}
public function NextLine(_arg1:int=-1):void{
iCount--;
OLine.LinesLeft = iCount;
this.dispatchEvent(new OEvent(OLine.EVENT_NEW_LINE));
if (iCount > 0){
NewLine(_arg1);
};
}
protected function NewLine(_arg1:int=-1):void{
var _local2:OElement;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
iHPercent = iStartH;
iPos = (iLength - 1);
while (this.numChildren > 0) {
this.removeChildAt(0);
};
iArray = new Array();
_local3 = 0;
while (_local3 < iLength) {
_local4 = OGlobalRandom.NextValue(0, (OElementColor.COLORS.length - 1), true);
if (iBonusConfig != null){
_local5 = iBonusConfig.maxPR;
_local6 = OGlobalRandom.NextValue(1, _local5);
_local7 = -1;
_local8 = 0;
while (_local8 < iBonusConfig.array.length) {
if (iBonusConfig.array[_local8].pGame >= _local6){
_local7 = _local8;
break;
};
_local6 = (_local6 - iBonusConfig.array[_local8].pGame);
_local8++;
};
if (_local7 != -1){
_local2 = new iBonusConfig.array[_local7].Function(OElementColor.COLORS[_local4], 0, 0, (iSizeBlock - 1));
} else {
_local2 = new OElement(OElementColor.COLORS[_local4], 0, 0, (iSizeBlock - 1));
};
} else {
_local2 = new OElement(OElementColor.COLORS[_local4], 0, 0, (iSizeBlock - 1));
};
_local2.SetPos((iVecY.x * _local3), (iVecY.y * _local3));
_local2.ShowPercent(1, iHPercent);
_local2.visible = false;
_local2.mouseEnabled = !(this.iDemoMode);
iArray.push(_local2);
this.addChild(_local2);
_local3++;
};
}
protected function IsCanAdd():Boolean{
return (true);
}
public function SetPos(_arg1:Number, _arg2:Number):void{
this.prX = _arg1;
this.prY = _arg2;
}
public function onEnterFrame(_arg1:Event):void{
}
public function Free():void{
var _local1:int;
var _local2:DisplayObject;
this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
_local1 = OLine.Instances.indexOf(this);
if (_local1 != -1){
OLine.Instances[_local1] = null;
OLine.Instances.splice(_local1, 1);
};
OLine.flagStartAll = false;
OLine.flagAddLineEvent = false;
OLine.flagAddLine = false;
while (this.numChildren > 0) {
_local2 = this.removeChildAt(0);
if ((_local2 is OElement)){
(_local2 as OElement).Free();
};
};
while (iArray.length > 0) {
iArray.shift();
};
}
private function DrawGrid():void{
var _local1:int;
var _local2:int;
this.graphics.clear();
_local1 = ODisplay.HSBToRGB(150, 1, 1);
this.graphics.lineStyle(1, _local1, 0.6);
_local2 = 0;
while (_local2 <= 1) {
this.graphics.moveTo(OGlobal.ToGlobal((iVecX.x * _local2)), OGlobal.ToGlobal((iVecX.y * _local2)));
this.graphics.lineTo(OGlobal.ToGlobal(((iVecX.x * _local2) + (iVecY.x * iLength))), OGlobal.ToGlobal(((iVecX.y * _local2) + (iVecY.y * iLength))));
_local2++;
};
_local2 = 0;
while (_local2 <= iLength) {
this.graphics.moveTo(OGlobal.ToGlobal((iVecY.x * _local2)), OGlobal.ToGlobal((iVecY.y * _local2)));
this.graphics.lineTo(OGlobal.ToGlobal(((iVecY.x * _local2) + iVecX.x)), OGlobal.ToGlobal(((iVecY.y * _local2) + iVecX.y)));
_local2++;
};
}
public function CustomAddLineEvent():void{
}
public function Pause(_arg1:Boolean):void{
isPause = _arg1;
}
public function GetElement(_arg1:int):OElement{
var _local2:OElement;
if ((((_arg1 >= iLength)) || ((_arg1 < 0)))){
return (null);
};
_local2 = (iArray[_arg1] as OElement);
if (_local2 == null){
return (null);
};
iArray[_arg1] = null;
this.removeChild(_local2);
return (_local2);
}
public function set State(_arg1:int):void{
iState = _arg1;
}
public function ReCalculateTime(_arg1:int):void{
}
public static function ReCalculateTime():void{
var _local1:int;
var _local2:OLine;
_local1 = int.MAX_VALUE;
for each (_local2 in OLine.Instances) {
_local1 = Math.min((_local2.parent as OPlatform).GetFreeLine(), _local1);
};
for each (_local2 in OLine.Instances) {
_local2.ReCalculateTime(_local1);
};
}
public static function Delay(_arg1:Boolean=true):void{
var _local2:OLine;
for each (_local2 in OLine.Instances) {
_local2.Delay(_arg1);
};
}
public static function AddLineEvent():void{
var _local1:OLine;
if (flagAddLineEvent){
return;
};
if ((((LinesLeft == 0)) && (((Instances[0] is OTimeLine) == false)))){
return;
};
flagAddLineEvent = true;
for each (_local1 in Instances) {
_local1.dispatchEvent(new OEvent(OLine.EVENT_ADD_LINE));
_local1.StateAddLine();
};
flagStartAll = false;
OSound.PlaySoundInd(OMusic.OSSound1Ind);
}
public static function CustomAction():void{
var _local1:OLine;
for each (_local1 in OLine.Instances) {
_local1.CustomAddLineEvent();
};
}
public static function StrongAddLine():void{
var _local1:OLine;
for each (_local1 in OLine.Instances) {
_local1.ShowAllLine();
};
AddLineEvent();
}
public static function AddLine():void{
var _local1:int;
var _local2:OLine;
if (flagAddLine){
return;
};
_local1 = int.MAX_VALUE;
if (OField.GetNumChildrens() > 0){
return;
};
for each (_local2 in OLine.Instances) {
if (_local2.IsCanAdd() == false){
return;
};
if ((_local2.parent as OPlatform).IsCanAddNewLine() == false){
return;
};
_local1 = Math.min((_local2.parent as OPlatform).GetFreeLine(), _local1);
};
flagAddLine = true;
for each (_local2 in OLine.Instances) {
(_local2.parent as OPlatform).AddNewLine();
if ((_local2 is OTimeLine)){
_local2.iCount = (_local2.iCount + 2);
};
_local2.NextLine(_local1);
};
flagStartAll = false;
if (OLine.LinesLeft > 0){
OLine.StartAll();
};
OField.instance.CheckLevelOver();
}
public static function Pause(_arg1:Boolean):void{
var _local2:OLine;
for each (_local2 in Instances) {
_local2.Pause(_arg1);
};
}
public static function StartAll():void{
var _local1:int;
var _local2:OLine;
if (OLine.Instances.length == 0){
return;
};
if (flagStartAll){
return;
};
_local1 = int.MAX_VALUE;
for each (_local2 in OLine.Instances) {
if (_local2.IsReady() == false){
return;
};
_local1 = Math.min((_local2.parent as OPlatform).GetFreeLine(), _local1);
};
flagStartAll = true;
for each (_local2 in OLine.Instances) {
_local2.Start(_local1);
};
flagAddLine = false;
flagAddLineEvent = false;
}
}
}//package RES.GAME.OLine
Section 58
//OTimeLine (RES.GAME.OLine.OTimeLine)
package RES.GAME.OLine {
import flash.events.*;
import flash.geom.*;
import RES.GAME.OElements.*;
import flash.utils.*;
public class OTimeLine extends OLine {
private const coefDelay:Number = 2;
private var timeDelay:int;// = -1
private var iTimeToBlock:int;
private var iTimer:int;
private var iTimerDelay:int;
private var iCurTime:int;
private var iTimeMax:int;
private var iTimeMin:int;
private var iDopColors:Array;
public static const stTimer:int = 1;
public static const EVENT_END_TIME:String = "END_TIME";
public static const stEndTime:int = 2;
public static const stNormal:int = 0;
public static const stShowH:int = 3;
public function OTimeLine(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Point, _arg5:Object, _arg6:Number=0.25, _arg7:Object=null, _arg8:Boolean=false){
timeDelay = -1;
iDopColors = [];
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
iTimeMin = _arg5.min;
iTimeMax = _arg5.max;
iTimeToBlock = SetTime(iSizePlatform.x);
iDopColors = _arg5.Colors;
iDopColors.sortOn("count", Array.NUMERIC);
NewLine();
iPos = (iLength - 1);
iCurTime = 0;
State = stNormal;
mouseEnabled = false;
mouseChildren = false;
buttonMode = false;
}
override public function Stop():void{
if (State != stShowH){
State = stNormal;
};
flagToStop = true;
}
private function SetTime(_arg1:int):int{
return (int(((iTimeMax - int((((iTimeMax - iTimeMin) * _arg1) / iSizePlatform.x))) / iSizePlatform.y)));
}
override protected function Start(_arg1:int=-1):void{
iTimeToBlock = SetTime(_arg1);
if (timeDelay != -1){
iTimeToBlock = (iTimeToBlock * coefDelay);
};
State = stTimer;
}
override public function Delay(_arg1:Boolean):void{
if (_arg1){
if (timeDelay > 0){
timeDelay = (timeDelay + 10000);
return;
};
timeDelay = 10000;
iTimeToBlock = (iTimeToBlock * coefDelay);
iTimerDelay = getTimer();
} else {
timeDelay = -1;
iTimeToBlock = (iTimeToBlock / coefDelay);
};
}
override protected function IsReady():Boolean{
if (this.State == stNormal){
return (true);
};
return (false);
}
override protected function NewLine(_arg1:int=-1):void{
iCurTime = 0;
if ((((iDopColors.length > 0)) && ((iDopColors[0].count <= iCount)))){
OElementColor.COLORS.push(iDopColors[0].name);
iDopColors.shift();
};
super.NewLine(_arg1);
this.State = stNormal;
}
override protected function IsCanAdd():Boolean{
if (this.State == stShowH){
return (false);
};
return (true);
}
override public function onEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
var _local4:OElement;
super.onEnterFrame(_arg1);
_local2 = getTimer();
switch (iState){
case stTimer:
if (isPause == true){
iState = stNormal;
break;
};
if ((_local2 - iTimer) < iTimeToBlock){
break;
};
iTimer = _local2;
_local3 = (iArray[iPos] as OElement);
_local3.visible = true;
iPos--;
if ((iPos < 0)){
if (!flagToStop){
OLine.AddLineEvent();
};
State = stShowH;
};
break;
case stShowH:
iHPercent = (iHPercent + (1 / 8));
if (iHPercent >= 1){
iHPercent = 1;
};
for each (_local4 in iArray) {
_local4.ShowPercent(-1, iHPercent);
};
if (iHPercent == 1){
if (flagToStop){
State = stNormal;
} else {
State = stEndTime;
};
};
break;
case stEndTime:
OLine.AddLine();
break;
};
if (timeDelay != -1){
if ((getTimer() - iTimerDelay) > timeDelay){
OLine.Delay(false);
};
};
}
override public function ReCalculateTime(_arg1:int):void{
iTimeToBlock = SetTime(_arg1);
if (timeDelay != -1){
iTimeToBlock = (iTimeToBlock * coefDelay);
};
}
override public function Pause(_arg1:Boolean):void{
super.Pause(_arg1);
if (_arg1 == false){
if (iState == stNormal){
iTimer = getTimer();
iState = stTimer;
};
};
}
override public function set State(_arg1:int):void{
iState = _arg1;
switch (iState){
case stNormal:
break;
case stTimer:
iTimer = getTimer();
break;
case stShowH:
break;
case stEndTime:
break;
};
}
}
}//package RES.GAME.OLine
Section 59
//OEvent (RES.GAME.OEvent)
package RES.GAME {
import flash.events.*;
public class OEvent extends Event {
private var finished:Boolean;// = false
private var object:Object;
public function OEvent(_arg1:String, _arg2:Object=null){
finished = false;
super(_arg1, true, true);
this.object = _arg2;
this.finished = false;
}
public function IsFinish():Boolean{
return (finished);
}
public function get EventObject():Object{
return (object);
}
public function Finish():void{
this.finished = true;
}
public function set EventObject(_arg1:Object):void{
object = _arg1;
}
}
}//package RES.GAME
Section 60
//OField (RES.GAME.OField)
package RES.GAME {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import RES.*;
import RES.GAME.OLine.*;
public class OField extends Sprite {
private var iCountEffects:int;// = 0
private var iInvisibleField:Sprite;
private var iBonusConfig:Object;
private var iTimer:int;
private var iInvisibleFieldUp:Sprite;
private var iGameOver:Boolean;// = false
private var iSizePlatform:Point;
private var iLineConfig:Object;
private var iLockArray:Array;
private var iState:int;
private var iDemoMode:Boolean;
private var iCountToDell:int;// = 0
private var iSizeBlock:uint;
private var iStartFill:int;
private var iHoleMap:Object;
private var iPlatforms:Array;
private var iInvisibleFieldDown:Sprite;
public static const EVENT_GAME_OVER:String = "GAME_OVER";
public static const stNormal:int = 0;
public static const EVENT_INSIDE_LEVEL_COMPLETE:String = "INSIDE_LEVEL_COMPLETE";
public static const stCheckLevelComplete:int = 1;
public static const EVENT_LEVEL_COMPLETE:String = "LEVEL_COMPLETE";
public static const stLevelComplete:int = 2;
public static var instance:OField;
public function OField(_arg1:int=600, _arg2:uint=12, _arg3:uint=10, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Boolean=false, _arg8:Object=null){
iCountEffects = 0;
iCountToDell = 0;
iGameOver = false;
ORecordGame.SetField(this);
OField.instance = this;
iDemoMode = _arg7;
iSizePlatform = new Point(_arg2, _arg3);
iSizeBlock = (((_arg1 - 20) / 2) / ((((iSizePlatform.x + iSizePlatform.y) / 2) + 1) + 0.5));
iLineConfig = _arg4;
iBonusConfig = _arg6;
iStartFill = ((_arg5)==null) ? -1 : int(_arg5);
iHoleMap = _arg8;
super();
Init();
this.mouseEnabled = !(iDemoMode);
this.State = stNormal;
}
private function OnGameOver(_arg1:OEvent):void{
var _local2:OPlatform;
if (_arg1.IsFinish()){
return;
};
for each (_local2 in iPlatforms) {
_local2.GameOver = true;
};
iGameOver = true;
}
private function OnEndEffect(_arg1:Event):void{
var _local2:OPlatform;
if (iCountEffects == 0){
trace("ERROR");
return;
};
iCountEffects--;
if (iCountEffects == 0){
for each (_local2 in iPlatforms) {
_local2.Effect = false;
};
this.removeEventListener(OElementEvents.EndEffect, OnEndEffect);
};
}
private function OnFree(_arg1:OEvent):void{
var _local2:OElement;
if (_arg1.IsFinish()){
return;
};
_local2 = (_arg1.target as OElement);
_local2.removeEventListener(OElementEvents.FREE, OnFree);
_local2.parent.removeChild(_local2);
_local2 = null;
iCountToDell--;
if (iCountToDell == 0){
CheckLevelOver();
};
}
private function OnStartEffect(_arg1:Event):void{
var _local2:OPlatform;
if (iCountEffects == 0){
for each (_local2 in iPlatforms) {
_local2.Effect = true;
};
iCountEffects++;
this.addEventListener(OElementEvents.EndEffect, OnEndEffect);
};
}
private function CheckExistIslands():Boolean{
var _local1:OPlatform;
if (iInvisibleField.numChildren > 0){
return (true);
};
if (iInvisibleFieldDown.numChildren > 0){
return (true);
};
if (iInvisibleFieldUp.numChildren > 0){
return (true);
};
for each (_local1 in iPlatforms) {
if (_local1.isExistIsland()){
return (true);
};
};
for each (_local1 in iPlatforms) {
_local1.GameOver = true;
};
return (false);
}
public function DemoAction(_arg1:String, _arg2:int, _arg3:Point):void{
if (_arg2 >= iPlatforms.length){
trace("ERROR IN PLATFORM");
return;
};
if (_arg1 == null){
trace("ERROR IN TYPE");
return;
};
(iPlatforms[_arg2] as OPlatform).DemoAction(_arg1, _arg3);
}
public function Stop():void{
var _local1:OPlatform;
this.State = stNormal;
for each (_local1 in iPlatforms) {
_local1.Stop();
};
}
private function OnLevelComplete(_arg1:OEvent):void{
var _local2:OPlatform;
if (_arg1.IsFinish()){
return;
};
for each (_local2 in iPlatforms) {
_local2.GameOver = true;
};
iGameOver = true;
}
public function Init():void{
var _local1:OPlatform;
iInvisibleField = new Sprite();
iInvisibleFieldUp = new Sprite();
iInvisibleFieldDown = new Sprite();
this.addChild(iInvisibleFieldDown);
iPlatforms = new Array();
_local1 = new OPlatform(iSizePlatform, iSizeBlock, iStartFill, iLineConfig, iBonusConfig, iDemoMode, ((iHoleMap)==null) ? null : iHoleMap.pl1);
this.addChild(_local1);
this.addChild(iInvisibleField);
_local1.SetPos((5 + (((iSizeBlock * iSizePlatform.y) * Math.sqrt(3)) / 2)), ((5 + 10) + (iSizeBlock * (((iSizePlatform.x + iSizePlatform.y) / 2) + 2))));
_local1.refUP = new OPlatform(iSizePlatform, iSizeBlock, iStartFill, iLineConfig, iBonusConfig, iDemoMode, ((iHoleMap)==null) ? null : iHoleMap.pl0);
this.addChild(_local1.refUP);
_local1.refUP.SetPos((5 + (((iSizeBlock * iSizePlatform.y) * Math.sqrt(3)) / 2)), (5 + iSizeBlock));
_local1.refUP.refDOWN = _local1;
this.addChild(iInvisibleFieldUp);
iPlatforms = new Array();
iPlatforms.push(_local1);
iPlatforms.push(_local1.refUP);
ORecordGame.SetPlatforms(iPlatforms);
this.addEventListener(OElementEvents.UNREGISTER, OnUnRegister);
this.addEventListener(OElementEvents.REGISTER, OnRegister);
this.addEventListener(OElementEvents.DELETE, OnDelete);
this.addEventListener(OElementEvents.LOCK, OnLock);
this.addEventListener(OElementEvents.UNLOCK, OnUnLock);
this.addEventListener(OElementEvents.StartEffect, OnStartEffect);
this.addEventListener(OField.EVENT_GAME_OVER, OnGameOver);
this.addEventListener(OField.EVENT_LEVEL_COMPLETE, OnLevelComplete);
this.addEventListener(OLine.EVENT_NEW_LINE, OnNewLine);
this.addEventListener(OField.EVENT_INSIDE_LEVEL_COMPLETE, OnInsideLevelComplete);
}
private function OnUnLock(_arg1:OEvent):void{
var _local2:OEvent;
_local2 = (_arg1 as OEvent);
if (_local2 == null){
(_arg1.target as OPlatform).UnLock();
} else {
(_arg1.target as OPlatform).UnLock(_local2.EventObject);
};
}
public function Start():void{
var _local1:OPlatform;
OLine.StartAll();
this.State = stNormal;
for each (_local1 in iPlatforms) {
_local1.Start();
};
}
private function AddLock(_arg1:Object):void{
if (_arg1 == null){
return;
};
if (iLockArray == null){
iLockArray = new Array();
};
iLockArray.push(_arg1);
}
public function GetArrayElementsToMove():Array{
var _local1:Array;
var _local2:OPlatform;
_local1 = new Array();
for each (_local2 in iPlatforms) {
_local1.push(_local2.GetArrayElementsToMove());
};
return (_local1);
}
private function AddToInvisibleField(_arg1:OElement, _arg2:Sprite):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:OElement;
var _local7:int;
_local3 = _arg2.numChildren;
_local4 = ((_arg1.iCordInPlatform.y * iSizePlatform.x) + _arg1.iCordInPlatform.x);
if (_local3 == 0){
_arg2.addChild(_arg1);
return;
};
_local5 = (_local3 - 1);
while (_local5 >= 0) {
_local6 = (_arg2.getChildAt(_local5) as OElement);
_local7 = ((_local6.iCordInPlatform.y * iSizePlatform.x) + _local6.iCordInPlatform.x);
if (_local4 > _local7){
_arg2.addChildAt(_arg1, (_local5 + 1));
return;
};
_local5--;
};
_arg2.addChildAt(_arg1, 0);
}
public function CheckLevelOver():void{
var _local1:OPlatform;
var _local2:Boolean;
if (iGameOver){
return;
};
if (iInvisibleField.numChildren > 0){
return;
};
if (iInvisibleFieldDown.numChildren > 0){
return;
};
if (iInvisibleFieldUp.numChildren > 0){
return;
};
for each (_local1 in iPlatforms) {
if (_local1.isExistIsland()){
return;
};
};
if (OLine.LinesLeft > 0){
OLine.StrongAddLine();
return;
};
_local2 = false;
for each (_local1 in iPlatforms) {
_local1.GameOver = true;
if (_local1.isLevelComplete() == true){
_local2 = true;
};
};
if (_local2){
this.dispatchEvent(new OEvent(OField.EVENT_INSIDE_LEVEL_COMPLETE));
} else {
this.dispatchEvent(new OEvent(OField.EVENT_GAME_OVER));
};
}
public function get State():int{
return (iState);
}
public function UnLock(_arg1:Object=null):void{
var _local2:OElement;
var _local3:int;
if (iLockArray == null){
return;
};
if (_arg1 == null){
for each (_local2 in iLockArray) {
_local2.UnLock();
};
CUtils.ClearArray(iLockArray);
} else {
_local3 = iLockArray.indexOf(_arg1);
if (_local3 != -1){
iLockArray[_local3] = null;
iLockArray.splice(_local3, 1);
};
};
}
private function OnDelete(_arg1:OEvent):void{
var _local2:OElement;
var _local3:OPlatform;
if (_arg1.IsFinish()){
return;
};
_local2 = (_arg1.target as OElement);
_local3 = (_arg1.EventObject as OPlatform);
if (_local3.IsDown()){
AddToInvisibleField(_local2, iInvisibleFieldDown);
} else {
AddToInvisibleField(_local2, iInvisibleFieldUp);
};
_local2.addEventListener(OElementEvents.FREE, OnFree);
_local2.MoveAndDell(_local2.Direction, _local2.Speed, 2000);
iCountToDell++;
}
public function Free():void{
var _local1:DisplayObject;
while (this.numChildren) {
_local1 = this.removeChildAt(0);
if ((_local1 is OPlatform)){
(_local1 as OPlatform).Free();
};
_local1 = null;
};
this.removeEventListener(OElementEvents.UNREGISTER, OnUnRegister);
this.removeEventListener(OElementEvents.REGISTER, OnRegister);
this.removeEventListener(OElementEvents.DELETE, OnDelete);
this.removeEventListener(OElementEvents.LOCK, OnLock);
this.removeEventListener(OElementEvents.UNLOCK, OnUnLock);
this.removeEventListener(OElementEvents.StartEffect, OnStartEffect);
this.removeEventListener(OField.EVENT_GAME_OVER, OnGameOver);
this.removeEventListener(OField.EVENT_LEVEL_COMPLETE, OnLevelComplete);
this.removeEventListener(OLine.EVENT_NEW_LINE, OnNewLine);
this.removeEventListener(OField.EVENT_INSIDE_LEVEL_COMPLETE, OnInsideLevelComplete);
}
private function OnNewLine(_arg1:OEvent):void{
}
private function OnInsideLevelComplete(_arg1:OEvent):void{
var _local2:OPlatform;
if (_arg1.IsFinish()){
return;
};
OSound.PlaySoundInd(OMusic.OSEeeInd);
for each (_local2 in iPlatforms) {
_local2.GameOver = true;
_local2.StartEndLevelAnimation();
};
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
}
private function onMouseDown(_arg1:Event):void{
if ((_arg1.target is OElement)){
};
}
private function OnRegister(_arg1:OEvent):void{
var el:OElement;
var tPlatform:OPlatform;
var aEvent = _arg1;
if (aEvent.IsFinish()){
return;
};
el = (aEvent.target as OElement);
tPlatform = el.refNewPlatform;
try {
iInvisibleField.removeChild(el);
tPlatform.Register(el);
} catch(aError:Error) {
trace(("ERROR_111 " + aError.message));
};
}
private function OnUnRegister(_arg1:OEvent):void{
var _local2:OElement;
var _local3:OPlatform;
var _local4:Point;
if (_arg1.IsFinish()){
return;
};
_local2 = (_arg1.target as OElement);
_local3 = (_arg1.EventObject as OPlatform);
AddToInvisibleField(_local2, iInvisibleField);
_local3 = _local3.GetNextPlatform();
_local2.refNewPlatform = _local3;
if (_local3 == null){
return;
};
_local4 = _local3.GetCordPoint(_local2.iCordInPlatform);
_local2.MoveAndCall(_local4.x, _local4.y, _local2.Speed, false, OElementEvents.REGISTER);
}
private function OnLock(_arg1:OEvent):void{
var _local2:OEvent;
_local2 = (_arg1 as OEvent);
if (_local2 == null){
return;
};
(_local2.target as OPlatform).AddLock(_local2.EventObject);
}
public function OnEnterFrame(_arg1:Event):void{
var _local2:OPlatform;
var _local3:Boolean;
var _local4:OPlatform;
for each (_local2 in iPlatforms) {
_local2.OnEnterFrame();
};
_local3 = true;
for each (_local4 in iPlatforms) {
if (_local4.iState != OPlatform.stEnd){
_local3 = false;
};
};
if (_local3){
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
this.dispatchEvent(new OEvent(OField.EVENT_LEVEL_COMPLETE));
};
}
public function set State(_arg1:int):void{
iState = _arg1;
}
public function GetArrayPlatformToMove():Array{
var _local1:Array;
var _local2:OPlatform;
_local1 = new Array();
for each (_local2 in iPlatforms) {
_local1.push(_local2.GetArrayPlatformToMove());
};
return (_local1);
}
public static function GetNumChildrens():int{
if (instance == null){
return (0);
};
return (instance.iInvisibleField.numChildren);
}
public static function Pause(_arg1:Boolean):void{
OPlatform.Pause(_arg1);
OLine.Pause(_arg1);
}
}
}//package RES.GAME
Section 61
//OGameMode (RES.GAME.OGameMode)
package RES.GAME {
public class OGameMode {
public static const ARCADE:String = "Arcade";
public static const STRATEGY:String = "Strategy";
public static const PUZZLE:String = "Puzzle";
public static const ADVENTURE:String = "Adventure";
}
}//package RES.GAME
Section 62
//OGlobalRandom (RES.GAME.OGlobalRandom)
package RES.GAME {
import ENGINE.CORE.*;
public class OGlobalRandom {
private static var customLastValue:int = 2147483647;
private static var instance:ORandomInt = null;
private static var customP:int = 2147483647;
public static function SetSeed(_arg1:int=0):void{
instance = new ORandomInt();
instance.SeedRand(_arg1);
}
public static function NextValue(_arg1:int=0, _arg2:int=1, _arg3:Boolean=false):int{
var _local4:int;
var _local5:int;
if (instance == null){
instance = new ORandomInt();
};
if (((((_arg3) && (!((customP == int.MAX_VALUE))))) && (!((customLastValue == int.MAX_VALUE))))){
_local5 = instance.RandOnInterval(0, 100);
if (_local5 <= customP){
return (customLastValue);
};
};
_local4 = instance.RandOnInterval(_arg1, _arg2);
if (_arg3){
customLastValue = _local4;
};
return (_local4);
}
public static function SetCustomP(_arg1:Number):void{
if (_arg1 < 0){
customP = int.MAX_VALUE;
} else {
customP = int((_arg1 * 100));
};
}
}
}//package RES.GAME
Section 63
//OLoader (RES.GAME.OLoader)
package RES.GAME {
import flash.events.*;
import RES.GAME.OElements.*;
import mx.core.*;
import RES.GAME.OLine.*;
import flash.net.*;
public class OLoader extends EventDispatcher {
private var iLoader:URLLoader;
public var data:Object;
private static var Default_XML:Class = OLoader_Default_XML;
public function OLoader(){
iLoader = new URLLoader();
iLoader.addEventListener(Event.COMPLETE, onComplete);
iLoader.addEventListener(IOErrorEvent.IO_ERROR, onError);
}
private function onError(_arg1:Event):void{
iLoader = null;
ConvertData();
}
public function LoadData():void{
var request:URLRequest;
request = new URLRequest("settings.xml");
try {
iLoader.load(request);
} catch(error:Error) {
onError(null);
};
}
private function ConvertData():void{
var _local1:XML;
var _local2:String;
var _local3:XMLList;
var _local4:XML;
var _local5:int;
var _local6:ByteArrayAsset;
var _local7:XMLList;
var _local8:Object;
var _local9:XML;
var _local10:Object;
var _local11:XML;
var _local12:XML;
var _local13:XML;
var _local14:Array;
var _local15:XML;
var _local16:String;
var _local17:Array;
var _local18:int;
if (iLoader != null){
_local1 = new XML(iLoader.data);
} else {
_local6 = ByteArrayAsset(new OLoader.Default_XML());
_local1 = new XML(_local6.readUTFBytes(_local6.length));
};
data = new Object();
_local2 = TwinzL.cGameMode;
data.Mode = _local2;
_local3 = _local1.child(_local2);
_local4 = _local3[0].Window[0];
if (_local4 != null){
data.Field = new Object();
data.Field.sizeY = int(_local4.@sizeY.toString());
data.Field.posX = int(_local4.@posX.toString());
data.Field.posY = int(_local4.@posY.toString());
};
_local4 = _local3[0].StartLevel[0];
data.StartLevel = ((_local4)!=null) ? int(_local4.@id.toString()) : 1;
_local5 = 1;
data.Levels = new Array();
while (true) {
_local7 = _local3[0].child(("Level" + _local5.toString()));
if (_local7.length() == 0){
break;
};
_local5++;
_local8 = new Object();
_local8.gameMode = OGameMode.PUZZLE;
_local8.amplyLock = true;
for each (_local9 in _local7.children()) {
switch (_local9.name().toString()){
case "Field":
_local8.Platform = new Object();
_local8.Platform.sizeX = int(_local9.@sizeX.toString());
_local8.Platform.sizeY = int(_local9.@sizeY.toString());
_local8.Platform.startX = ((_local9.@startX.length())!=0) ? int(_local9.@startX.toString()) : null;
break;
case "IsCanLock":
if (_local9.@id.toString() != "1"){
_local8.amplyLock = false;
};
break;
case "TimeLine":
_local8.Line = new Object();
_local8.Line.min = int(_local9.@min.toString());
_local8.Line.max = int(_local9.@max.toString());
_local8.Line.count = int(_local9.@count.toString());
_local8.Line.cls = OTimeLine;
_local8.gameMode = OGameMode.ARCADE;
_local8.Line.Colors = new Array();
for each (_local11 in _local9.children()) {
(_local8.Line.Colors as Array).push({name:_local11.@name.toString(), count:int(_local11.@count.toString())});
};
break;
case "DiscreteLine":
_local8.Line = new Object();
_local8.Line.click = int(_local9.@click.toString());
_local8.Line.block = ((_local9.@block.toString() == "")) ? int.MAX_VALUE : int(_local9.@block.toString());
_local8.Line.blockMin = ((_local9.@blockMin.toString() == "")) ? int.MAX_VALUE : int(_local9.@blockMin.toString());
_local8.Line.blockMax = ((_local9.@blockMax.toString() == "")) ? int.MAX_VALUE : int(_local9.@blockMax.toString());
_local8.Line.count = int(_local9.@count.toString());
_local8.Line.cls = ODiscreteLine;
_local8.gameMode = OGameMode.STRATEGY;
break;
case "Colors":
if (_local9.attribute("customP").length() != 0){
_local8.CustomP = Number(_local9.attribute("customP")[0].toString());
};
_local8.Colors = new Array();
for each (_local12 in _local9.children()) {
(_local8.Colors as Array).push(_local12.@name.toString());
};
break;
case "Bonus":
_local8.Bonus = new Object();
_local8.Bonus.maxPR = int(_local9.@max_probability.toString());
_local8.Bonus.array = new Array();
_local10 = new Object();
for each (_local12 in _local9.children()) {
switch (_local12.name().toString()){
case "Bomb":
_local10.Function = OBombBonus;
break;
case "ColorBomb":
_local10.Function = OColorBombBonus;
break;
case "RowDel":
_local10.Function = ORowDelBonus;
break;
case "ColumnDel":
_local10.Function = OColumnDelBonus;
break;
case "UpDiagonalDel":
_local10.Function = OUpDiagonalDelBonus;
break;
case "DownDiagonalDel":
_local10.Function = ODownDiagonalDelBonus;
break;
case "Delay":
_local10.Function = ODelayBonus;
break;
default:
_local10 = null;
break;
};
if (_local10 != null){
_local10.pStart = int(_local12.@pStart.toString());
_local10.pGame = int(_local12.@pGame.toString());
_local8.Bonus.array.push(_local10);
};
_local10 = new Object();
};
break;
case "Hole_map":
_local8.HoleMap = new Object();
for each (_local13 in _local9.Platform) {
_local14 = new Array();
for each (_local15 in _local13.row) {
_local16 = _local15.toString();
_local17 = new Array();
_local18 = 0;
while (_local18 < _local16.length) {
_local17.push(int(_local16.charAt(_local18)));
_local18++;
};
_local14.push(_local17);
};
_local8.HoleMap[("pl" + _local13.@id.toString())] = _local14;
};
break;
default:
break;
};
};
data.Levels.push(_local8);
};
data.LevelsCount = (_local5 - 1);
if (data.StartLevel > data.LevelsCount){
data.StartLevel = 1;
};
this.dispatchEvent(new OEvent(Event.COMPLETE));
}
private function onComplete(_arg1:Event):void{
ConvertData();
}
}
}//package RES.GAME
Section 64
//OLoader_Default_XML (RES.GAME.OLoader_Default_XML)
package RES.GAME {
import mx.core.*;
public class OLoader_Default_XML extends ByteArrayAsset {
}
}//package RES.GAME
Section 65
//OPlatform (RES.GAME.OPlatform)
package RES.GAME {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
import RES.*;
import RES.GAME.OLine.*;
public class OPlatform extends Sprite {
private var iBonusConfig:Object;
private var iSelected:Array;
private var iAnimationFree:int;// = 0
private var countToDelete:int;// = 0
private var isMoveOnY:Boolean;// = false
private var cVecY:Point;
private var iTimer:int;
private var cVecX:Point;
public var refUP:OPlatform;// = null
private var curIsland:Array;
private var iSizePlatform:Point;
private var iAnimationX:int;// = 0
private var iAnimationY:int;// = 0
private var countToMove:int;// = 0
private var flagExistIsland:Boolean;// = false
private var iAnimationColor:int;// = 0
private var iNewLine:Boolean;// = false
private var countToRemove:int;// = 0
private var cashIsland:Array;
public var iPos:Point;
public var iGrid:Array;
private var flagCheckExistIsland:Boolean;// = false
private var isStart:Boolean;// = false
private var HoleArray:Array;
private var iEffect:Boolean;// = false
private var iOverElement:Object;// = null
private var iGameOver:Boolean;// = false
private var iLockArray:Array;
private var iSizeElement:Number;
private var sortState:String;// = "SortX"
private var cVecMove:Point;// = null
public var iState:int;// = 0
private var iDemoMode:Boolean;
public var refDOWN:OPlatform;// = null
private var iHoleMap:Array;
private var iLine:OLine;
public static const stEnd:int = 4;
public static const sortY:String = "SortY";
public static const sortX:String = "SortX";
public static const EVENT_CHECK_LEVEL_COMPLETE:String = "CHECK_LEVEL_COMPLETE";
public static const stPostAnimation:int = 3;
public static const stNormal:int = 0;
public static const stPreAnimation:int = 1;
public static const EVENT_ADD_SCORE:String = "ADD_SCORE";
public static const stEndLevelAnimation:int = 2;
public static var IsPause:Boolean = false;
public static var amplyLock:Boolean = true;
public function OPlatform(_arg1:Point, _arg2:Number, _arg3:int=-1, _arg4:Object=null, _arg5:Object=null, _arg6:Boolean=false, _arg7:Array=null){
sortState = OPlatform.sortX;
refUP = null;
refDOWN = null;
cVecMove = null;
countToRemove = 0;
countToMove = 0;
countToDelete = 0;
isMoveOnY = false;
iSelected = new Array();
iEffect = false;
iOverElement = null;
iNewLine = false;
iGameOver = false;
flagExistIsland = false;
flagCheckExistIsland = false;
isStart = false;
curIsland = new Array();
HoleArray = new Array();
iState = 0;
iAnimationX = 0;
iAnimationY = 0;
iAnimationColor = 0;
iAnimationFree = 0;
super();
iSizePlatform = _arg1;
iSizeElement = _arg2;
iDemoMode = _arg6;
iPos = new Point();
cVecX = new Point(((iSizeElement * Math.sqrt(3)) / 2), (iSizeElement / 2));
cVecY = new Point(((-(iSizeElement) * Math.sqrt(3)) / 2), (iSizeElement / 2));
iBonusConfig = _arg5;
iHoleMap = _arg7;
Create(_arg3);
if (_arg4 != null){
iLine = new _arg4.cls(cVecX, cVecY, iSizeElement, iSizePlatform, _arg4, 0.25, iBonusConfig, iDemoMode);
iLine.SetPos((cVecX.x * (iSizePlatform.x + 0)), (cVecX.y * (iSizePlatform.x + 0)));
this.addChild(iLine);
};
DrawGrid();
this.mouseEnabled = !(iDemoMode);
}
private function MoveElements(_arg1:Boolean=true, _arg2:Boolean=false):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:OElement;
var _local8:int;
var _local9:int;
var _local10:Boolean;
_local3 = (Math.round((iSizePlatform.x / 2)) - 1);
_local4 = (Math.round((iSizePlatform.y / 2)) - 1);
_local6 = 0;
if (_arg1){
Sort(OPlatform.sortX);
_local8 = 0;
while (_local8 < iSizePlatform.y) {
_local5 = 0;
_local7 = null;
_local9 = (iSizePlatform.x - 1);
while (_local9 >= 0) {
if (((!((iGrid[_local8][_local9][2] == null))) && ((iGrid[_local8][_local9][2].isInvisible == true)))){
iGrid[_local8][_local9][2].isInvisible = false;
iGrid[_local8][_local9][2] = null;
};
if (((!((iGrid[_local8][_local9][2] == null))) && ((iGrid[_local8][_local9][2].IsTransit == false)))){
_local7 = iGrid[_local8][_local9][2];
};
if ((((((_local5 == 0)) && (!((iGrid[_local8][_local9][2] == null))))) && ((iGrid[_local8][_local9][2].IsTransit == false)))){
} else {
if ((((iGrid[_local8][_local9][2] == null)) || (iGrid[_local8][_local9][2].IsTransit))){
_local5++;
} else {
if ((iGrid[_local8][_local9][2] is OHole)){
_local5 = 0;
} else {
_local7.addEventListener(OElementEvents.ENDMOVE, onEndMove);
_local7.MoveAndCall(iGrid[_local8][(_local9 + _local5)][0], iGrid[_local8][(_local9 + _local5)][1], -1, true, OElementEvents.ENDMOVE);
_local6++;
iGrid[_local8][(_local9 + _local5)][2] = _local7;
iGrid[_local8][_local9][2] = null;
_local7.iCordInPlatform.x = (_local9 + _local5);
};
};
};
_local9--;
};
_local8++;
};
if (_local6 > 0){
countToMove = (countToMove + _local6);
};
};
if (_arg2){
_local6 = 0;
Sort(OPlatform.sortY);
_local5 = 0;
_local7 = null;
_local8 = _local4;
while (_local8 >= 0) {
_local10 = true;
_local9 = 0;
while (_local9 < iSizePlatform.x) {
if (((!((iGrid[_local8][_local9][2] == null))) && ((iGrid[_local8][_local9][2].isInvisible == true)))){
iGrid[_local8][_local9][2].isInvisible = false;
iGrid[_local8][_local9][2] = null;
};
if (((!((iGrid[_local8][_local9][2] == null))) && ((iGrid[_local8][_local9][2].IsTransit == false)))){
if ((iGrid[_local8][_local9][2] is OHole)){
} else {
if (_local5 > 0){
_local7 = iGrid[_local8][_local9][2];
_local7.addEventListener(OElementEvents.ENDMOVE, onEndMove);
_local7.MoveAndCall(iGrid[(_local8 + _local5)][_local9][0], iGrid[(_local8 + _local5)][_local9][1], -1, true, OElementEvents.ENDMOVE);
_local6++;
if (((!((iGrid[(_local8 + _local5)][_local9][2] == null))) && ((iGrid[(_local8 + _local5)][_local9][2] is OHole)))){
HoleArray.push(_local7);
} else {
iGrid[(_local8 + _local5)][_local9][2] = _local7;
};
iGrid[_local8][_local9][2] = null;
_local7.iCordInPlatform.y = (_local8 + _local5);
};
_local10 = false;
};
};
_local9++;
};
if (_local10){
_local5++;
};
_local8--;
};
_local5 = 0;
_local7 = null;
_local8 = (_local4 + 1);
while (_local8 < iSizePlatform.y) {
_local10 = true;
_local9 = 0;
while (_local9 < iSizePlatform.x) {
if (((!((iGrid[_local8][_local9][2] == null))) && ((iGrid[_local8][_local9][2].IsTransit == false)))){
if ((iGrid[_local8][_local9][2] is OHole)){
} else {
if (_local5 > 0){
_local7 = iGrid[_local8][_local9][2];
_local7.addEventListener(OElementEvents.ENDMOVE, onEndMove);
_local7.MoveAndCall(iGrid[(_local8 - _local5)][_local9][0], iGrid[(_local8 - _local5)][_local9][1], -1, true, OElementEvents.ENDMOVE);
_local6++;
if (((!((iGrid[(_local8 - _local5)][_local9][2] == null))) && ((iGrid[(_local8 - _local5)][_local9][2] is OHole)))){
HoleArray.push(_local7);
} else {
iGrid[(_local8 - _local5)][_local9][2] = _local7;
};
iGrid[_local8][_local9][2] = null;
_local7.iCordInPlatform.y = (_local8 - _local5);
};
_local10 = false;
};
};
_local9++;
};
if (_local10){
_local5++;
};
_local8++;
};
if (_local6 > 0){
countToMove = (countToMove + _local6);
isMoveOnY = true;
};
};
if ((((((countToMove == 0)) && ((countToRemove == 0)))) && ((countToDelete == 0)))){
if (iOverElement != null){
iOverElement.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
};
};
}
public function set GameOver(_arg1:Boolean):void{
iGameOver = _arg1;
if (iGameOver){
this.mouseEnabled = false;
this.mouseChildren = false;
if (this.iLine != null){
this.iLine.Stop();
};
};
}
public function DemoAction(_arg1:String, _arg2:Point):void{
var _local3:OElement;
if (_arg2 == null){
trace("ERROR IN CORD");
return;
};
_local3 = (iGrid[_arg2.y][_arg2.x][2] as OElement);
if (_local3 == null){
trace("ERROR IN GRID");
return;
};
_local3.dispatchEvent(new MouseEvent(_arg1));
}
public function Stop():void{
isStart = false;
if (iLine != null){
iLine.Stop();
};
}
public function Start():void{
isStart = true;
if (iOverElement != null){
iOverElement.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
};
}
public function isExistIsland(_arg1:Boolean=true):Boolean{
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:Array;
if ((countToRemove > 0)){
return (true);
};
flagExistIsland = false;
if ((((iLine is OTimeLine)) && ((OLine.LinesLeft > 0)))){
return (true);
};
_local2 = (iSizePlatform.x - 1);
while (_local2 >= 0) {
_local4 = 0;
while (_local4 < iSizePlatform.y) {
if (iGrid[_local4][_local2][3] == true){
} else {
if (iGrid[_local4][_local2][2] == null){
} else {
if (iGrid[_local4][_local2][2].IsLock()){
} else {
if (OPlatform.findIsland(iGrid, _local2, _local4, iGrid[_local4][_local2][2].Color).length < 3){
} else {
flagExistIsland = true;
break;
};
};
};
};
_local4++;
};
if (flagExistIsland){
break;
};
_local2--;
};
for each (_local3 in iGrid) {
for each (_local5 in _local3) {
_local5[3] = false;
};
};
return (flagExistIsland);
}
public function GetArrayElementsToMove():Array{
var _local1:Array;
var _local2:int;
var _local3:int;
var _local4:Rectangle;
_local1 = new Array();
if (cVecMove == null){
if (refDOWN != null){
cVecMove = new Point(0, 1);
} else {
cVecMove = new Point(0, -1);
};
};
_local2 = 0;
while (_local2 < iSizePlatform.y) {
_local3 = 0;
while (_local3 < iSizePlatform.x) {
if ((((iGrid[_local2][_local3][2] == null)) || ((iGrid[_local2][_local3][2] is OHole)))){
} else {
_local4 = (iGrid[_local2][_local3][2] as OElement).getBounds(OGlobal.prStage);
_local1.push([iGrid[_local2][_local3][2], iGrid[_local2][_local3][2].prX, iGrid[_local2][_local3][2].prY, _local4, cVecMove]);
};
_local3++;
};
_local2++;
};
return (_local1);
}
private function onDelete(_arg1:OEvent):void{
var el:OElement;
var aEvent = _arg1;
el = (aEvent.target as OElement);
if (el.parent != this){
trace("ERROR_PARENT");
aEvent.Finish();
return;
};
aEvent.EventObject = this;
el.removeEventListener(OElementEvents.DELETE, onDelete);
if ((((iGrid[el.iCordInPlatform.y][el.iCordInPlatform.x][2] == el)) && ((el.isInvisible == false)))){
iGrid[el.iCordInPlatform.y][el.iCordInPlatform.x][2] = null;
};
try {
el.parent.removeChild(el);
} catch(error:Error) {
trace("ERROR");
};
if (el.IsLock()){
this.dispatchEvent(new OEvent(OElementEvents.UNLOCK, el));
};
el.SetPos((el.prX + iPos.x), (el.prY + iPos.y));
countToDelete--;
if (countToDelete == 0){
if (countToRemove == 0){
MoveElements();
if (countToMove == 0){
MoveElements(false, true);
if (countToMove == 0){
};
};
};
DrawGrid();
};
}
private function onEndMove(_arg1:OEvent):void{
var _local2:OElement;
var _local3:int;
if (_arg1.IsFinish()){
return;
};
_arg1.Finish();
_local2 = (_arg1.target as OElement);
_local2.removeEventListener(OElementEvents.ENDMOVE, onEndMove);
if (countToMove > 0){
countToMove--;
if (countToMove == 0){
if (isMoveOnY){
isMoveOnY = false;
MoveElements();
if (countToMove == 0){
flagCheckExistIsland = false;
if (iOverElement != null){
iOverElement.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
};
};
} else {
MoveElements(false, true);
};
};
};
_local3 = HoleArray.indexOf(_local2);
if (_local3 != -1){
HoleArray[_local3] = null;
HoleArray.splice(_local3, 1);
_local2.addEventListener(OElementEvents.DELETE, onDelete);
_local2.MoveAndCall(iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][0], (iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][1] - (cVecMove.y * iSizeElement)), -1, true, OElementEvents.DELETE);
countToDelete++;
};
}
public function Free():void{
var _local1:int;
var _local2:DisplayObject;
var _local3:int;
if (iLine != null){
iLine.Free();
};
this.removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
this.removeEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
this.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseClick);
this.removeEventListener(OField.EVENT_GAME_OVER, onGameOver);
this.removeEventListener(OLine.EVENT_ADD_LINE, onAddLine);
while (this.numChildren > 0) {
_local2 = this.removeChildAt(0);
if ((_local2 is OElement)){
(_local2 as OElement).Free();
};
};
_local1 = 0;
while (_local1 < iSizePlatform.y) {
_local3 = 0;
while (_local3 < iSizePlatform.x) {
iGrid[_local1][_local3][2] = null;
_local3++;
};
_local1++;
};
this.refDOWN = null;
this.refUP = null;
}
public function IsCanAddNewLine():Boolean{
if (iNewLine == false){
return (false);
};
if ((((((countToMove > 0)) || ((countToRemove > 0)))) || ((countToDelete > 0)))){
return (false);
};
return (true);
}
public function SetPos(_arg1:Number, _arg2:Number):void{
iPos.x = _arg1;
iPos.y = _arg2;
this.x = OGlobal.ToGlobal(_arg1);
this.y = OGlobal.ToGlobal(_arg2);
}
public function Register(_arg1:OElement):void{
var _local2:OElement;
var _local3:int;
var _local4:OElement;
var _local5:Number;
_local2 = _arg1;
_local2.isInvisible = false;
_local2.SetPos((_local2.prX - iPos.x), (_local2.prY - iPos.y));
_local3 = GetIndex(_local2.iCordInPlatform);
_local4 = iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2];
if (((!((_local4 == null))) && (((_local4 is OHole) == false)))){
flagCheckExistIsland = false;
if (_local4.isInvisible == false){
_local3 = (this.getChildIndex(_local4) + (IsDown()) ? 1 : 0);
if (_local4.IsMove){
countToMove--;
};
_local4.addEventListener(OElementEvents.DELETE, onDelete);
_local4.MoveAndCall((iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][0] + (_local2.Direction.x * iSizeElement)), (iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][1] + (_local2.Direction.y * iSizeElement)), _local2.Speed, true, OElementEvents.DELETE);
countToDelete++;
} else {
_local4.isInvisible = false;
_local3 = (_local3 + (IsDown()) ? 1 : 0);
};
countToMove++;
isMoveOnY = true;
_local5 = (IsSelect(_local2.iCordInPlatform.x, _local2.iCordInPlatform.y)) ? _local2.MaxDeltaSelect : 0;
_local2.addEventListener(OElementEvents.ENDMOVE, onEndMove);
_local2.MoveAndCall(iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][0], iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][1], _local2.Speed, false, OElementEvents.ENDMOVE);
_local2.IsSelect = IsSelect(_local2.iCordInPlatform.x, _local2.iCordInPlatform.y);
iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2] = _local2;
if (amplyLock){
this.dispatchEvent(new OEvent(OElementEvents.LOCK, _local2));
};
} else {
_local2.IsTransit = true;
_local2.addEventListener(OElementEvents.DELETE, onDelete);
_local2.MoveAndCall((iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][0] + (_local2.Direction.x * iSizeElement)), (iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][1] + (_local2.Direction.y * iSizeElement)), _local2.Speed, false, OElementEvents.DELETE);
if (_local4 == null){
iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2] = _local2;
};
countToDelete++;
};
this.addChildAt(_local2, _local3);
}
public function DelSelect(_arg1:int, _arg2:int):void{
var _local3:int;
var _local4:int;
var _local5:Point;
_local3 = -1;
_local4 = 0;
while (_local4 < iSelected.length) {
_local5 = (iSelected[_local4] as Point);
if ((((_local5.x == _arg1)) && ((_local5.y == _arg2)))){
_local3 = _local4;
break;
};
_local4++;
};
if (_local3 != -1){
iSelected[_local3] = null;
iSelected.splice(_local3, 1);
};
}
private function DrawGrid():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:uint;
this.graphics.clear();
this.graphics.lineStyle(1, 15658992);
this.graphics.beginFill(15658992, 0.2);
_local3 = this.GetFreeLine();
if (refUP != null){
_local3 = Math.min(_local3, refUP.GetFreeLine());
};
if (refDOWN != null){
_local3 = Math.min(_local3, refDOWN.GetFreeLine());
};
_local1 = 0;
while (_local1 < iSizePlatform.x) {
if ((((_local3 == 0)) && ((_local1 == 0)))){
_local4 = ODisplay.HSBToRGB(0, 1, 1);
} else {
_local4 = ODisplay.HSBToRGB((20 + ((120 * Math.max(_local1, _local3)) / (iSizePlatform.x - 1))), 1, 1);
};
this.graphics.lineStyle(1, _local4);
this.graphics.beginFill(_local4, 0.2);
_local2 = 0;
while (_local2 < iSizePlatform.y) {
if (((!((iGrid[_local2][_local1][2] == null))) && ((iGrid[_local2][_local1][2] is OHole)))){
} else {
this.graphics.moveTo(OGlobal.ToGlobal(((cVecX.x * _local1) + (cVecY.x * _local2))), OGlobal.ToGlobal(((cVecX.y * _local1) + (cVecY.y * _local2))));
this.graphics.lineTo(OGlobal.ToGlobal(((cVecX.x * (_local1 + 1)) + (cVecY.x * _local2))), OGlobal.ToGlobal(((cVecX.y * (_local1 + 1)) + (cVecY.y * _local2))));
this.graphics.lineTo(OGlobal.ToGlobal(((cVecX.x * (_local1 + 1)) + (cVecY.x * (_local2 + 1)))), OGlobal.ToGlobal(((cVecX.y * (_local1 + 1)) + (cVecY.y * (_local2 + 1)))));
this.graphics.lineTo(OGlobal.ToGlobal(((cVecX.x * _local1) + (cVecY.x * (_local2 + 1)))), OGlobal.ToGlobal(((cVecX.y * _local1) + (cVecY.y * (_local2 + 1)))));
this.graphics.lineTo(OGlobal.ToGlobal(((cVecX.x * _local1) + (cVecY.x * _local2))), OGlobal.ToGlobal(((cVecX.y * _local1) + (cVecY.y * _local2))));
};
_local2++;
};
_local1++;
};
}
public function OnEnterFrame():void{
var _local1:int;
switch (iState){
case stNormal:
break;
case stPreAnimation:
if ((getTimer() - iTimer) > 1000){
iState = stEndLevelAnimation;
iTimer = getTimer();
};
break;
case stEndLevelAnimation:
if ((getTimer() - iTimer) > 30){
_local1 = 0;
while (_local1 < ((getTimer() - iTimer) / 30)) {
while (iGrid[iAnimationY][iAnimationX][2] != null) {
iAnimationY--;
if (iAnimationY < 0){
iAnimationY = (iSizePlatform.y - 1);
iAnimationX++;
if (iAnimationX >= iSizePlatform.x){
iState = stPostAnimation;
iTimer = getTimer();
return;
};
};
};
this.dispatchEvent(new OEvent(OPlatform.EVENT_ADD_SCORE, {s:10, b:0}));
this.graphics.lineStyle(1, iAnimationColor);
this.graphics.moveTo(OGlobal.ToGlobal(((cVecX.x * (iAnimationX + 1)) + (cVecY.x * iAnimationY))), OGlobal.ToGlobal(((cVecX.y * (iAnimationX + 1)) + (cVecY.y * iAnimationY))));
this.graphics.lineTo(OGlobal.ToGlobal(((cVecX.x * iAnimationX) + (cVecY.x * (iAnimationY + 1)))), OGlobal.ToGlobal(((cVecX.y * iAnimationX) + (cVecY.y * (iAnimationY + 1)))));
this.graphics.moveTo(OGlobal.ToGlobal(((cVecX.x * (iAnimationX + 1)) + (cVecY.x * (iAnimationY + 1)))), OGlobal.ToGlobal(((cVecX.y * (iAnimationX + 1)) + (cVecY.y * (iAnimationY + 1)))));
this.graphics.lineTo(OGlobal.ToGlobal(((cVecX.x * iAnimationX) + (cVecY.x * iAnimationY))), OGlobal.ToGlobal(((cVecX.y * iAnimationX) + (cVecY.y * iAnimationY))));
iAnimationY--;
if (iAnimationY < 0){
iAnimationY = (iSizePlatform.y - 1);
iAnimationX++;
iAnimationColor = ODisplay.HSBToRGB((20 + ((120 * Math.max(iAnimationX, iAnimationFree)) / (iSizePlatform.x - 1))), 1, 1);
if (iAnimationX >= iSizePlatform.x){
iState = stPostAnimation;
iTimer = getTimer();
return;
};
};
_local1++;
};
iTimer = getTimer();
};
break;
case stPostAnimation:
if ((getTimer() - iTimer) > 500){
iState = stEnd;
};
break;
case stEnd:
break;
default:
break;
};
}
private function onGameOver(_arg1:Event):void{
}
public function IsSelect(_arg1:int, _arg2:int):Boolean{
var _local3:int;
var _local4:Point;
_local3 = 0;
while (_local3 < iSelected.length) {
_local4 = (iSelected[_local3] as Point);
if ((((_local4.x == _arg1)) && ((_local4.y == _arg2)))){
return (true);
};
_local3++;
};
return (false);
}
public function GetArrayPlatformToMove():Array{
var _local1:Rectangle;
if (cVecMove == null){
if (refDOWN != null){
cVecMove = new Point(0, 1);
} else {
cVecMove = new Point(0, -1);
};
};
_local1 = this.getBounds(OGlobal.prStage);
trace(("CORD = " + _local1.y));
return ([this, this.x, this.y, _local1, cVecMove]);
}
private function GetIsland(_arg1:OElement):Array{
var _local2:Array;
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:int;
var _local7:OElement;
var _local8:Array;
_local2 = _arg1.Action(iGrid);
if (_local2 == null){
return (null);
};
_local3 = new Array();
_local4 = new Array();
_local5 = _local2.concat();
_local6 = 0;
while (_local2.length > 0) {
_local7 = _local2.pop();
if (_local7.IsBonusElement()){
if (_local3.indexOf(_local7) == -1){
if (_local5.indexOf(_local7) == -1){
_local4.push(_local7);
};
_local3.push(_local7);
_local8 = _local7.Action(iGrid, false, false);
if (_local8 != null){
_local2 = _local2.concat(_local8);
};
};
} else {
if ((((_local4.indexOf(_local7) == -1)) && ((_local5.indexOf(_local7) == -1)))){
_local4.push(_local7);
};
};
};
return ([_local5, _local4]);
}
public function GetNextPlatform():OPlatform{
if (cVecMove == null){
if (refDOWN != null){
cVecMove = new Point(0, 1);
} else {
cVecMove = new Point(0, -1);
};
};
if (cVecMove.y < 0){
return (refUP);
};
return (refDOWN);
}
public function IsDown():Boolean{
if (cVecMove.y < 0){
return (true);
};
return (false);
}
private function Create(_arg1:int=-1):void{
var _local2:OElement;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
iGrid = new Array(iSizePlatform.y);
_local3 = 0;
while (_local3 < iSizePlatform.y) {
iGrid[_local3] = new Array(iSizePlatform.x);
_local3++;
};
_local4 = 0;
while (_local4 < iSizePlatform.x) {
_local3 = 0;
while (_local3 < iSizePlatform.y) {
if ((((_arg1 == -1)) || ((_local4 > ((iSizePlatform.x - _arg1) - 1))))){
_local5 = OGlobalRandom.NextValue(0, (OElementColor.COLORS.length - 1), true);
if (((((((!((iHoleMap == null))) && ((_local4 < iHoleMap.length)))) && ((((iSizePlatform.y - _local3) - 1) < iHoleMap[_local4].length)))) && ((iHoleMap[_local4][((iSizePlatform.y - _local3) - 1)] == 1)))){
_local2 = new OHole(OElementColor.COLORS[_local5], 0, 0, (iSizeElement - 1));
} else {
if (iBonusConfig != null){
_local6 = iBonusConfig.maxPR;
_local7 = OGlobalRandom.NextValue(1, _local6);
_local8 = -1;
_local9 = 0;
while (_local9 < iBonusConfig.array.length) {
if (iBonusConfig.array[_local9].pStart >= _local7){
_local8 = _local9;
break;
};
_local7 = (_local7 - iBonusConfig.array[_local9].pStart);
_local9++;
};
if (_local8 != -1){
_local2 = new iBonusConfig.array[_local8].Function(OElementColor.COLORS[_local5], 0, 0, (iSizeElement - 1));
} else {
_local2 = new OElement(OElementColor.COLORS[_local5], 0, 0, (iSizeElement - 1));
};
} else {
_local2 = new OElement(OElementColor.COLORS[_local5], 0, 0, (iSizeElement - 1));
};
};
_local2.SetPos(((cVecX.x * _local4) + (cVecY.x * _local3)), ((cVecX.y * _local4) + (cVecY.y * _local3)));
iGrid[_local3][_local4] = [_local2.prX, _local2.prY, _local2, false];
this.addChild(_local2);
_local2.iCordInPlatform = new Point(_local4, _local3);
_local2.mouseEnabled = !(iDemoMode);
} else {
if (((((((!((iHoleMap == null))) && ((_local4 < iHoleMap.length)))) && ((((iSizePlatform.y - _local3) - 1) < iHoleMap[_local4].length)))) && ((iHoleMap[_local4][((iSizePlatform.y - _local3) - 1)] == 1)))){
_local2 = new OHole(OElementColor.COLORS[_local5], 0, 0, (iSizeElement - 1));
_local2.SetPos(((cVecX.x * _local4) + (cVecY.x * _local3)), ((cVecX.y * _local4) + (cVecY.y * _local3)));
_local2.iCordInPlatform = new Point(_local4, _local3);
iGrid[_local3][_local4] = [_local2.prX, _local2.prY, _local2, false];
this.addChild(_local2);
} else {
_local2 = new OElement();
_local2.SetPos(((cVecX.x * _local4) + (cVecY.x * _local3)), ((cVecX.y * _local4) + (cVecY.y * _local3)));
iGrid[_local3][_local4] = [_local2.prX, _local2.prY, null, false];
_local2.Free();
_local2 = null;
};
};
_local3++;
};
_local4++;
};
this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseClick);
this.addEventListener(OField.EVENT_GAME_OVER, onGameOver);
this.addEventListener(OLine.EVENT_ADD_LINE, onAddLine);
}
private function onMouseClick(_arg1:Event):void{
var _local2:OElement;
var _local3:Array;
if (IsPause){
return;
};
if (!isStart){
return;
};
if (iGameOver){
return;
};
if (countToMove > 0){
return;
};
if (countToRemove > 0){
return;
};
if (countToDelete > 0){
return;
};
if (iNewLine){
return;
};
_local2 = (_arg1.target as OElement);
if (_local2 == null){
return;
};
if (_local2.IsLock() == true){
return;
};
ORecordGame.AddAction(_arg1.type, _local2);
_local3 = curIsland;
if ((((_local3 == null)) || ((_local3.length == 0)))){
return;
};
OSound.PlaySoundInd(OMusic.OSArrow5Ind);
flagCheckExistIsland = false;
if (cVecMove == null){
if (refDOWN != null){
cVecMove = new Point(0, 1);
} else {
cVecMove = new Point(0, -1);
};
};
if (amplyLock){
this.dispatchEvent(new OEvent(OElementEvents.UNLOCK));
};
this.dispatchEvent(new OEvent(OPlatform.EVENT_ADD_SCORE, {s:_local3[0].length, b:_local3[1].length}));
ClearSelect();
for each (_local2 in _local3[0]) {
if (this.iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2] != _local2){
CUtils.ClearArray(curIsland[0]);
CUtils.ClearArray(curIsland[1]);
curIsland = null;
return;
};
};
for each (_local2 in _local3[1]) {
if (this.iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2] != _local2){
CUtils.ClearArray(curIsland[0]);
CUtils.ClearArray(curIsland[1]);
curIsland = null;
return;
};
};
for each (_local2 in _local3[0]) {
_local2.Action(iGrid, true, false);
_local2.isInvisible = true;
_local2.addEventListener(OElementEvents.UNREGISTER, onUnRegister);
_local2.MoveAndCall(iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][0], (iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][1] + (cVecMove.y * iSizeElement)), -1, true, OElementEvents.UNREGISTER);
countToRemove++;
if (amplyLock){
_local2.Lock();
};
};
for each (_local2 in _local3[1]) {
_local2.Action(iGrid, true, false);
_local2.isInvisible = true;
_local2.addEventListener(OElementEvents.DELETE, onDelete);
_local2.MoveAndCall(iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][0], (iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][1] - (cVecMove.y * iSizeElement)), -1, true, OElementEvents.DELETE);
countToDelete++;
};
CUtils.ClearArray(curIsland[0]);
CUtils.ClearArray(curIsland[1]);
curIsland = null;
OLine.CustomAction();
}
private function onLevelComplete(_arg1:Event):void{
}
private function GetIndex(_arg1:Point, _arg2:Boolean=false):int{
var _local3:int;
var _local4:int;
var _local5:DisplayObject;
if (!_arg2){
_local3 = _arg1.y;
while (_local3 >= 0) {
_local4 = (iSizePlatform.x - 1);
while (_local4 >= 0) {
if ((((_local3 == _arg1.y)) && ((_local4 > _arg1.x)))){
} else {
_local5 = this.iGrid[_local3][_local4][2];
if (_local5 == null){
} else {
return ((this.getChildIndex(_local5) + 1));
};
};
_local4--;
};
_local3--;
};
return (0);
};
_local3 = _arg1.y;
while (_local3 < iSizePlatform.y) {
_local4 = 0;
while (_local4 < iSizePlatform.x) {
if ((((_local3 == _arg1.y)) && ((_local4 < _arg1.x)))){
} else {
_local5 = this.iGrid[_local3][_local4][2];
if (_local5 == null){
} else {
return ((this.getChildIndex(_local5) - 1));
};
};
_local4++;
};
_local3++;
};
return ((this.numChildren - 1));
}
public function AddLock(_arg1:Object):void{
if ((_arg1 as OElement) == null){
return;
};
if (iLockArray == null){
iLockArray = new Array();
};
iLockArray.push(_arg1);
}
private function onAddLine(_arg1:OEvent):void{
iNewLine = true;
}
public function set Effect(_arg1:Boolean):void{
iEffect = _arg1;
}
private function onMouseOut(_arg1:Event):void{
var _local2:OElement;
iOverElement = null;
if (IsPause){
return;
};
if (!isStart){
return;
};
if (iGameOver){
return;
};
_local2 = (_arg1.target as OElement);
if (_local2 == null){
return;
};
ORecordGame.AddAction(_arg1.type, _local2);
if (this.iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2] != _local2){
trace("MOUSE OUT ERROR");
};
ClearSelect();
if (curIsland != null){
CUtils.ClearArray(curIsland[0]);
CUtils.ClearArray(curIsland[1]);
curIsland = null;
};
}
public function UnLock(_arg1:Object=null):void{
var _local2:OElement;
var _local3:int;
if (iLockArray == null){
return;
};
if (_arg1 == null){
for each (_local2 in iLockArray) {
_local2.UnLock();
};
CUtils.ClearArray(iLockArray);
} else {
_local3 = iLockArray.indexOf(_arg1);
if (_local3 != -1){
iLockArray[_local3] = null;
iLockArray.splice(_local3, 1);
};
};
}
public function ClearSelect(_arg1:Boolean=true):void{
var _local2:Point;
var _local3:OElement;
while (iSelected.length > 0) {
_local2 = (iSelected.pop() as Point);
_local3 = iGrid[_local2.y][_local2.x][2];
if (_local3 != null){
_local3.IsSelect = false;
};
};
if (_arg1){
this.GetNextPlatform().ClearSelect(false);
};
}
private function onUnRegister(_arg1:OEvent):void{
var _local2:OElement;
_local2 = (_arg1.target as OElement);
_arg1.EventObject = this;
this.removeChild(_local2);
_local2.removeEventListener(OElementEvents.UNREGISTER, onUnRegister);
_local2.SetPos((_local2.prX + iPos.x), (_local2.prY + iPos.y));
if ((((this.iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2] == _local2)) && ((_local2.isInvisible == false)))){
this.iGrid[_local2.iCordInPlatform.y][_local2.iCordInPlatform.x][2] = null;
};
countToRemove--;
if (countToRemove == 0){
if (countToDelete == 0){
MoveElements();
if (countToMove == 0){
MoveElements(false, true);
if (countToMove == 0){
};
};
OLine.ReCalculateTime();
};
DrawGrid();
};
}
public function get Effect():Boolean{
return (iEffect);
}
private function Sort(_arg1:String):void{
var _local2:int;
var _local3:int;
if (((!((_arg1 == OPlatform.sortX))) && (!((_arg1 == OPlatform.sortY))))){
return;
};
if (this.sortState == _arg1){
return;
};
this.sortState = _arg1;
switch (this.sortState){
case sortX:
_local3 = 0;
while (_local3 < iSizePlatform.y) {
_local2 = 0;
while (_local2 < iSizePlatform.x) {
if (((!((iGrid[_local3][_local2][2] == null))) && ((iGrid[_local3][_local2][2].isInvisible == false)))){
this.addChild(iGrid[_local3][_local2][2]);
};
_local2++;
};
_local3++;
};
break;
case sortY:
_local2 = 0;
while (_local2 < iSizePlatform.x) {
_local3 = 0;
while (_local3 < iSizePlatform.y) {
if (((!((iGrid[_local3][_local2][2] == null))) && ((iGrid[_local3][_local2][2].isInvisible == false)))){
this.addChild(iGrid[_local3][_local2][2]);
};
_local3++;
};
_local2++;
};
break;
};
if (iLine != null){
this.addChild(iLine);
};
}
public function Secect(_arg1:int, _arg2:int, _arg3:Boolean=true):void{
var _local4:Point;
var _local5:OElement;
_local4 = new Point(_arg1, _arg2);
_local5 = iGrid[_local4.y][_local4.x][2];
if ((_local5 is OHole)){
return;
};
iSelected.push(_local4);
if (_local5 != null){
_local5.IsSelect = true;
};
if (_arg3){
this.GetNextPlatform().Secect(_arg1, _arg2, false);
};
}
private function onMouseDown(_arg1:Event):void{
var _local2:OElement;
if (iEffect){
return;
};
_local2 = (_arg1.target as OElement);
}
public function GetFreeLine(_arg1:Boolean=true):int{
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = -1;
_local3 = 0;
while (_local3 < iSizePlatform.x) {
_local4 = 0;
while (_local4 < iSizePlatform.y) {
if (((!((iGrid[_local4][_local3][2] == null))) && (((iGrid[_local4][_local3][2] is OHole) == false)))){
_local2 = _local3;
break;
};
_local4++;
};
if (_local2 != -1){
break;
};
_local3++;
};
return (((_local2)==-1) ? iSizePlatform.x : _local2);
}
public function isLevelComplete():Boolean{
var _local1:int;
var _local2:OHole;
if (iLine == null){
_local1 = 0;
while (_local1 < this.numChildren) {
_local2 = (this.getChildAt(_local1) as OHole);
if (_local2 == null){
return (false);
};
_local1++;
};
if (this.numChildren == 0){
return (true);
};
return (false);
};
if (((!((iLine == null))) && (!((OLine.LinesLeft == 0))))){
return (false);
};
return (true);
}
public function AddNewLine(_arg1:Boolean=true):Boolean{
var _local2:int;
var _local3:int;
var _local4:OElement;
var _local5:OElement;
ClearSelect(false);
_local2 = 0;
while (_local2 < iSizePlatform.y) {
if (((!((iGrid[_local2][0][2] == null))) && (((iGrid[_local2][0][2] is OHole) == false)))){
this.dispatchEvent(new OEvent(OField.EVENT_GAME_OVER, ((iLine is OTimeLine)) ? true : false));
return (false);
};
_local2++;
};
this.UnLock();
_local2 = 0;
while (_local2 < iSizePlatform.y) {
_local4 = null;
_local5 = iLine.GetElement(_local2);
if (_local5 == null){
} else {
_local3 = 1;
while (_local3 < iSizePlatform.x) {
if ((((((iGrid[_local2][_local3][2] == null)) || (iGrid[_local2][_local3][2].IsTransit))) || ((iGrid[_local2][_local3][2] is OHole)))){
} else {
_local4 = iGrid[_local2][_local3][2];
if (_local4.IsLock()){
_local4.UnLock();
};
if (_local4.State != OElement.stMove){
_local4.addEventListener(OElementEvents.ENDMOVE, onEndMove);
countToMove++;
};
_local4.MoveAndCall(iGrid[_local2][(_local3 - 1)][0], iGrid[_local2][(_local3 - 1)][1], -1, true, OElementEvents.ENDMOVE);
if (((!((iGrid[_local2][(_local3 - 1)][2] == null))) && ((iGrid[_local2][(_local3 - 1)][2] is OHole)))){
HoleArray.push(_local4);
} else {
iGrid[_local2][(_local3 - 1)][2] = _local4;
};
iGrid[_local2][_local3][2] = null;
_local4.iCordInPlatform.x = (_local3 - 1);
};
_local3++;
};
_local5.SetPos(((cVecX.x * iSizePlatform.x) + (cVecY.x * _local2)), ((cVecX.y * iSizePlatform.x) + (cVecY.y * _local2)));
this.addChildAt(_local5, this.GetIndex(new Point((iSizePlatform.x - 1), _local2), false));
if (((!((iGrid[_local2][(iSizePlatform.x - 1)][2] == null))) && ((iGrid[_local2][(iSizePlatform.x - 1)][2] is OHole)))){
HoleArray.push(_local5);
} else {
iGrid[_local2][(iSizePlatform.x - 1)][2] = _local5;
};
_local5.iCordInPlatform = new Point((iSizePlatform.x - 1), _local2);
_local5.addEventListener(OElementEvents.ENDMOVE, onEndMove);
countToMove++;
_local5.MoveAndCall(iGrid[_local2][(iSizePlatform.x - 1)][0], iGrid[_local2][(iSizePlatform.x - 1)][1], -1, true, OElementEvents.ENDMOVE);
};
_local2++;
};
flagCheckExistIsland = false;
DrawGrid();
iNewLine = false;
return (true);
}
public function StartEndLevelAnimation():void{
iAnimationX = 0;
iAnimationY = (iSizePlatform.y - 1);
iAnimationFree = GetFreeLine();
if (refUP != null){
iAnimationFree = Math.min(iAnimationFree, refUP.GetFreeLine());
};
if (refDOWN != null){
iAnimationFree = Math.min(iAnimationFree, refDOWN.GetFreeLine());
};
if ((((iAnimationFree == 0)) && ((iAnimationFree == 0)))){
iAnimationColor = ODisplay.HSBToRGB(0, 1, 1);
} else {
iAnimationColor = ODisplay.HSBToRGB((20 + ((120 * Math.max(iAnimationX, iAnimationFree)) / (iSizePlatform.x - 1))), 1, 1);
};
iState = stPreAnimation;
iTimer = getTimer();
}
private function onMouseOver(_arg1:MouseEvent):void{
var _local2:OElement;
var _local3:Array;
iOverElement = _arg1.target;
if (IsPause){
return;
};
if (!isStart){
return;
};
if (iGameOver){
return;
};
if (countToMove > 0){
return;
};
if (countToRemove > 0){
return;
};
if (countToDelete > 0){
return;
};
if (iNewLine){
return;
};
_local2 = (_arg1.target as OElement);
if (_local2 == null){
return;
};
if (_local2.IsLock() == true){
return;
};
ORecordGame.AddAction(_arg1.type, _local2);
if (((!((cashIsland == null))) && (!(((cashIsland[1] as Array).indexOf(_local2) == -1))))){
_local3 = cashIsland;
} else {
_local3 = GetIsland(_local2);
cashIsland = null;
};
if (_local3 == null){
return;
};
if (curIsland != null){
CUtils.ClearArray(curIsland[0]);
CUtils.ClearArray(curIsland[1]);
};
curIsland = _local3;
for each (_local2 in _local3[0]) {
Secect(_local2.iCordInPlatform.x, _local2.iCordInPlatform.y);
};
for each (_local2 in _local3[1]) {
Secect(_local2.iCordInPlatform.x, _local2.iCordInPlatform.y, false);
};
}
public function GetCordPoint(_arg1:Point):Point{
var _local2:Point;
if (cVecMove == null){
if (refDOWN != null){
cVecMove = new Point(0, 1);
} else {
cVecMove = new Point(0, -1);
};
};
_local2 = iPos.clone();
_local2.x = (_local2.x + iGrid[_arg1.y][_arg1.x][0]);
_local2.y = (_local2.y + (iGrid[_arg1.y][_arg1.x][1] + (cVecMove.y * iSizeElement)));
return (_local2);
}
public static function getIsland(_arg1:Array, _arg2:Point):Array{
var _local3:int;
var _local4:Array;
var _local5:Array;
var _local6:Array;
_local3 = _arg1[_arg2.y][_arg2.x][2].Color;
_local4 = findIsland(_arg1, _arg2.x, _arg2.y, _local3);
for each (_local5 in _arg1) {
for each (_local6 in _local5) {
_local6[3] = false;
};
};
return (_local4);
}
public static function Pause(_arg1:Boolean):void{
IsPause = _arg1;
}
public static function findIsland(_arg1:Array, _arg2:int, _arg3:int, _arg4:int):Array{
var _local5:Array;
_local5 = new Array();
_arg1[_arg3][_arg2][3] = true;
_local5.push(_arg1[_arg3][_arg2][2]);
if ((((((((((_arg2 > 0)) && ((_arg1[_arg3][(_arg2 - 1)][3] == false)))) && (!((_arg1[_arg3][(_arg2 - 1)][2] == null))))) && (!((_arg1[_arg3][(_arg2 - 1)][2].IsLock() == true))))) && ((_arg1[_arg3][(_arg2 - 1)][2].Color == _arg4)))){
_local5 = _local5.concat(findIsland(_arg1, (_arg2 - 1), _arg3, _arg4));
};
if ((((((((((_arg2 < (_arg1[0].length - 1))) && ((_arg1[_arg3][(_arg2 + 1)][3] == false)))) && (!((_arg1[_arg3][(_arg2 + 1)][2] == null))))) && (!((_arg1[_arg3][(_arg2 + 1)][2].IsLock() == true))))) && ((_arg1[_arg3][(_arg2 + 1)][2].Color == _arg4)))){
_local5 = _local5.concat(findIsland(_arg1, (_arg2 + 1), _arg3, _arg4));
};
if ((((((((((_arg3 > 0)) && ((_arg1[(_arg3 - 1)][_arg2][3] == false)))) && (!((_arg1[(_arg3 - 1)][_arg2][2] == null))))) && (!((_arg1[(_arg3 - 1)][_arg2][2].IsLock() == true))))) && ((_arg1[(_arg3 - 1)][_arg2][2].Color == _arg4)))){
_local5 = _local5.concat(findIsland(_arg1, _arg2, (_arg3 - 1), _arg4));
};
if ((((((((((_arg3 < (_arg1.length - 1))) && ((_arg1[(_arg3 + 1)][_arg2][3] == false)))) && (!((_arg1[(_arg3 + 1)][_arg2][2] == null))))) && (!((_arg1[(_arg3 + 1)][_arg2][2].IsLock() == true))))) && ((_arg1[(_arg3 + 1)][_arg2][2].Color == _arg4)))){
_local5 = _local5.concat(findIsland(_arg1, _arg2, (_arg3 + 1), _arg4));
};
return (_local5);
}
}
}//package RES.GAME
Section 66
//ORecordGame (RES.GAME.ORecordGame)
package RES.GAME {
import flash.events.*;
import RES.GAME.OElements.*;
import flash.utils.*;
public class ORecordGame {
private var iPos:int;// = 0
private var iField:OField;
private var iActions:Array;
private var iPlatforms:Array;
private var iRecord:String;// = ""
private var iTimer:int;// = -1
private static var iMin:int = -3200;
private static var iEString:String = "6coN7@)tkE!.sB;LX1hS:CfJzPHr4K-aw^M3T52Vm*{e+&Yld#WA$8GyRZnuj9_(U}OQ0pDIFgxqv=bi";
private static var instance:ORecordGame;
private static var iNaN:String = "~";
public function ORecordGame(){
iTimer = -1;
iRecord = "";
iPos = 0;
super();
iActions = new Array();
}
private function ConvertStrToArray():Array{
var _local1:Object;
if (iRecord == null){
return (null);
};
this.iActions = new Array();
this.iPos = 0;
while (this.iPos < this.iRecord.length) {
_local1 = new Object();
switch (RecordGetInt_1()){
case 1:
_local1.aType = MouseEvent.MOUSE_OVER;
break;
case 2:
_local1.aType = MouseEvent.MOUSE_OUT;
break;
case 3:
_local1.aType = MouseEvent.MOUSE_DOWN;
break;
default:
trace("Error in READ RECORD!!!");
_local1.aType = null;
break;
};
_local1.aPlatform = RecordGetInt_1();
_local1.aMouseX = RecordGetInt_2();
_local1.aMouseY = RecordGetInt_2();
_local1.aCordX = RecordGetInt_1();
_local1.aCordY = RecordGetInt_1();
_local1.aTime = ((RecordGetInt_2() - ORecordGame.iMin) * 10);
iActions.push(_local1);
};
return (this.iActions);
}
private function RecordGetInt_1():int{
var _local1:String;
if (this.iPos >= this.iRecord.length){
return (int.MIN_VALUE);
};
_local1 = this.iRecord.substr(this.iPos, 1);
this.iPos++;
if (_local1 == ORecordGame.iNaN){
return (int.MAX_VALUE);
};
return (ORecordGame.iEString.indexOf(_local1));
}
private function RecordAddInt_1(_arg1:int):void{
if (_arg1 > 80){
_arg1 = 80;
};
this.iRecord = (this.iRecord + ((_arg1)!=int.MAX_VALUE) ? ORecordGame.iEString.charAt(_arg1) : ORecordGame.iNaN);
this.iPos++;
}
private function ConvertArrayToStr():String{
var _local1:Object;
if (iActions == null){
return (null);
};
this.iRecord = "";
this.iPos = 0;
for each (_local1 in iActions) {
switch (_local1.aType){
case MouseEvent.MOUSE_OVER:
RecordAddInt_1(1);
break;
case MouseEvent.MOUSE_OUT:
RecordAddInt_1(2);
break;
case MouseEvent.MOUSE_DOWN:
RecordAddInt_1(3);
break;
default:
trace("ERROR IN RECORD!!!");
RecordAddInt_1(0);
break;
};
RecordAddInt_1(_local1.aPlatform);
RecordAddInt_2(_local1.aMouseX);
RecordAddInt_2(_local1.aMouseY);
RecordAddInt_1(_local1.aCordX);
RecordAddInt_1(_local1.aCordY);
RecordAddInt_2((int((_local1.aTime / 10)) + ORecordGame.iMin));
};
return (this.iRecord);
}
private function RecordAddInt_2(_arg1:int):void{
var _local2:int;
var _local3:int;
if (_arg1 == int.MAX_VALUE){
this.iRecord = (this.iRecord + ORecordGame.iNaN);
this.iPos++;
return;
};
if (_arg1 < -3200){
_arg1 = -3200;
} else {
if (_arg1 > 3199){
_arg1 = 3199;
};
};
_arg1 = (_arg1 - ORecordGame.iMin);
_local2 = (_arg1 / 80);
_local3 = (_arg1 % 80);
this.iRecord = (this.iRecord + ORecordGame.iEString.charAt(_local2));
this.iRecord = (this.iRecord + ORecordGame.iEString.charAt(_local3));
this.iPos = (this.iPos + 2);
}
private function RecordGetInt_2():int{
var _local1:String;
var _local2:String;
if (this.iPos >= this.iRecord.length){
return (int.MIN_VALUE);
};
_local1 = this.iRecord.substr(this.iPos, 1);
this.iPos++;
if (_local1 == ORecordGame.iNaN){
return (int.MAX_VALUE);
};
_local2 = this.iRecord.substr(this.iPos, 1);
this.iPos++;
return ((((ORecordGame.iEString.indexOf(_local1) * 80) + ORecordGame.iEString.indexOf(_local2)) + ORecordGame.iMin));
}
private function AddAction(_arg1:String, _arg2:OElement):void{
var _local3:Object;
var _local4:OPlatform;
_local3 = new Object();
_local3.aType = _arg1;
_local4 = (_arg2.parent as OPlatform);
_local3.aPlatform = iPlatforms.indexOf(_local4);
_local3.aMouseX = iField.mouseX;
_local3.aMouseY = iField.mouseY;
_local3.aCordX = _arg2.iCordInPlatform.x;
_local3.aCordY = _arg2.iCordInPlatform.y;
_local3.aTime = (getTimer() - iTimer);
iTimer = getTimer();
iActions.push(_local3);
if (_local4.iGrid[_arg2.iCordInPlatform.y][_arg2.iCordInPlatform.x][2] == null){
trace("ADD ACTION ERROR");
};
}
public static function GetOriginalArray():Array{
if (instance == null){
return (null);
};
return (instance.iActions);
}
public static function Stop():void{
instance.iTimer = -1;
}
public static function Init():void{
instance = new (ORecordGame);
}
public static function Start():void{
instance.iTimer = getTimer();
}
public static function SetString(_arg1:String):void{
if (instance == null){
return;
};
if (_arg1 == null){
return;
};
instance.iRecord = _arg1;
}
public static function ConvertArrayToString():String{
if (instance == null){
return (null);
};
return (instance.ConvertArrayToStr());
}
public static function AddAction(_arg1:String, _arg2:OElement):void{
if (instance.iTimer != -1){
instance.AddAction(_arg1, _arg2);
};
}
public static function SetField(_arg1:OField):void{
instance.iField = _arg1;
}
public static function ConvertStringToArray():Array{
if (instance == null){
return (null);
};
return (instance.ConvertStrToArray());
}
public static function SetPlatforms(_arg1:Array):void{
instance.iPlatforms = _arg1;
}
}
}//package RES.GAME
Section 67
//OAlignConfig (RES.INTERFACE.OAlignConfig)
package RES.INTERFACE {
public class OAlignConfig {
public static const CENTER:String = "ALIGN_CENTER";
public static const LEFT:String = "ALIGN_LEFT";
public static const RIGHT:String = "ALIGN_RIGHT";
}
}//package RES.INTERFACE
Section 68
//OCCounter (RES.INTERFACE.OCCounter)
package RES.INTERFACE {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import RES.GAME.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
public dynamic class OCCounter extends Array {
private var stack:Array;
private var countToMoveOrDel:int;// = 0
private var curAction:Array;
private var startIndex:int;
private var iValue:int;
private var iWave:Boolean;// = false
private var isOver:Boolean;// = false
private var iState:int;
private var iDigits:Array;
private var iAnimElements:Array;
private var indexF:int;
private var iSauseged:int;// = 0
private var indexB:int;
private var indexS:int;
public var flagIsFree:Boolean;// = true
public var flagIsStop:Boolean;// = false
public var revers:Boolean;// = true
private var iTimer:int;
private var maxValue:int;// = 0
private var iSausage:int;// = 2
public var iAnimationEnable:Boolean;// = true
private static const stAnimation:int = 1;
public static const EVENT_MOVE_TO_FREE:String = "CounterMoveToFree";
private static const stNormal:int = 0;
private static const COMMAND_ADD:String = "ADD";
public static const EVENT_MOVE_TO_DEL:String = "CounterMoveToDel";
public static const EVENT_FREE:String = "CounterFree";
public static const EVENT_DELETE:String = "CounterDelete";
public static const EVENT_END_MOVE:String = "CounterEndMove";
public function OCCounter(){
maxValue = 0;
curAction = new Array();
stack = new Array();
iAnimationEnable = true;
flagIsStop = false;
flagIsFree = true;
countToMoveOrDel = 0;
revers = true;
isOver = false;
iWave = false;
iSausage = 2;
iSauseged = 0;
super(0);
iDigits = new Array();
iValue = 0;
}
private function get State():int{
return (iState);
}
private function CheckValue(_arg1:int):int{
while (_arg1 > maxValue) {
_arg1 = (_arg1 - maxValue);
};
return (_arg1);
}
public function OnMouseOut():void{
isOver = false;
(this.iAnimElements[0] as EventDispatcher).removeEventListener(Event.ENTER_FRAME, this.OnEnterFrame);
this.iSauseged++;
if (this.iSausage <= this.iSauseged){
this.iSauseged = 0;
} else {
this.OnMouseOver();
};
}
public function AddRegister(_arg1:Array):void{
iDigits.push({aValue:0, aSource:_arg1});
maxValue = (maxValue + (9 * Math.pow(10, (iDigits.length - 1))));
this.push(_arg1[0]);
_arg1[0].iDebugArray.push(this);
}
public function StartValue(_arg1:int, _arg2:Boolean=false):void{
var _local3:String;
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:OElement;
var _local8:OElement;
var _local9:DisplayObjectContainer;
var _local10:int;
var _local11:int;
var _local12:Boolean;
_arg1 = CheckValue(_arg1);
iValue = _arg1;
if (!iWave){
iWave = _arg2;
};
if ((((_arg1 < 10)) && (this.iWave))){
_local3 = ("0" + _arg1.toString());
} else {
_local3 = _arg1.toString();
};
_local4 = false;
while (_local3.length < iDigits.length) {
if ((_local3.length % 2) == 0){
_local3 = ("*" + _local3);
} else {
_local3 = (_local3 + "*");
};
};
_local5 = 0;
while (_local5 < iDigits.length) {
_local6 = _local5;
if (_local3.charAt(_local6) != "*"){
iDigits[_local6.toString()].aValue = int(_local3.charAt(_local6));
_local7 = iDigits[_local6].aSource[iDigits[_local6].aValue];
_local8 = this[_local6];
_local9 = _local7.parent;
_local10 = _local9.getChildIndex(_local7);
_local11 = _local9.getChildIndex(_local8);
if (_local10 < _local11){
_local9.swapChildrenAt(_local10, _local11);
};
_local12 = _local8.visible;
_local8.visible = _local7.visible;
_local7.visible = _local12;
this[_local6] = _local7;
};
this[_local6].visible = !((_local3.charAt(_local6) == "*"));
_local5++;
};
}
public function SetValue(_arg1:int, _arg2:Boolean=false):void{
var _local3:String;
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:OElement;
var _local8:OElement;
var _local9:DisplayObjectContainer;
var _local10:int;
var _local11:int;
var _local12:Rectangle;
var _local13:Array;
flagIsFree = false;
_arg1 = CheckValue(_arg1);
iValue = _arg1;
if (!iWave){
iWave = _arg2;
};
if ((((_arg1 < 10)) && (this.iWave))){
_local3 = ("0" + _arg1.toString());
} else {
_local3 = _arg1.toString();
};
_local4 = false;
while (_local3.length < iDigits.length) {
if ((_local3.length % 2) == 0){
_local3 = ("*" + _local3);
} else {
_local3 = (_local3 + "*");
};
};
_local5 = 0;
while (_local5 < iDigits.length) {
_local6 = _local5;
if (_local3.charAt(_local6) != "*"){
iDigits[_local6.toString()].aValue = int(_local3.charAt(_local6));
_local7 = iDigits[_local6].aSource[iDigits[_local6].aValue];
_local8 = this[_local6];
_local9 = _local7.parent;
_local10 = _local9.getChildIndex(_local7);
_local11 = _local9.getChildIndex(_local8);
if (_local10 < _local11){
_local9.swapChildrenAt(_local10, _local11);
};
if (iAnimationEnable){
_local12 = _local7.getBounds(OGlobal.prStage);
_local7.SetPos(_local7.prX, ((_local7.prY - _local12.y) - _local12.height));
_local13 = OInterfacePlatform.CordXY(_local7.iCordInPlatform, _local7);
_local7.MoveAndCall(_local13[0], (_local13[1] - (_local8.height / 2)), -1, true, OCCounter.EVENT_END_MOVE);
countToMoveOrDel++;
_local7.visible = true;
curAction.push({aObject:_local7, aIndex:_local6});
} else {
this[_local6] = _local7;
_local8.visible = false;
_local7.visible = true;
if (countToMoveOrDel == 0){
PerformTask();
};
};
};
this[_local6].visible = !((_local3.charAt(_local6) == "*"));
_local5++;
};
}
public function GetValue():int{
return (iValue);
}
public function OnMouseOver():void{
var _local1:int;
isOver = true;
this.iAnimElements = [];
_local1 = 0;
while (_local1 < this.length) {
if ((((this[_local1] is OElement)) && (this[_local1].visible))){
this.iAnimElements.push(this[_local1]);
OElement(this[_local1]).iAnimationEnable = true;
};
_local1++;
};
startIndex = 0;
if (this.State != stAnimation){
this.State = stAnimation;
};
(this.iAnimElements[0] as EventDispatcher).addEventListener(Event.ENTER_FRAME, this.OnEnterFrame);
}
public function FreeRegister(_arg1:OElement):void{
var _local2:int;
var _local3:OElement;
_local2 = this.indexOf(_arg1);
while (iDigits[_local2].aSource.length > 0) {
_local3 = iDigits[_local2].aSource.shift();
if (_local3.visible == false){
_local3.Stop();
_local3.parent.removeChild(_local3);
_local3.Free();
_local3 = null;
} else {
OInterfacePlatform.MOVE(_local3, _local3.prX, (_local3.prY + 200), _local3.Speed, !(_local3.IsMove), OElementEvents.DELETE);
};
};
iDigits[_local2] = null;
}
public function AddValue(_arg1:int, _arg2:Boolean=false):void{
if (flagIsStop){
return;
};
this.iWave = _arg2;
stack.push({aCommand:COMMAND_ADD, aValue:_arg1});
if (countToMoveOrDel == 0){
PerformTask();
};
}
public function OnEvent(_arg1:OEvent):void{
var _local2:OTextBlock;
var _local3:OTextBlock;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:Rectangle;
_local2 = (_arg1.target as OTextBlock);
_local5 = -1;
switch (_arg1.type){
case OCCounter.EVENT_END_MOVE:
_local6 = 0;
while (_local6 < curAction.length) {
if (_local2 == curAction[_local6].aObject){
_local5 = curAction[_local6].aIndex;
break;
};
_local6++;
};
_local3 = this[_local5];
this[_local5] = _local2;
_local7 = _local3.getBounds(OGlobal.prStage);
_local3.MoveAndCall(_local3.prX, ((_local3.prY + OGlobal.StageRect.height) - _local7.y), _local2.Speed, true, OCCounter.EVENT_DELETE);
_local4 = OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2);
_local2.MoveAndCall(_local4[0], _local4[1], _local2.Speed, false, null);
curAction[_local6].aObject = null;
curAction[_local6] = null;
curAction.splice(_local6, 1);
break;
case OCCounter.EVENT_DELETE:
_local2.Stop();
_local2.visible = false;
_local4 = OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2);
_local2.SetPos(_local4[0], _local4[1]);
countToMoveOrDel--;
if (countToMoveOrDel == 0){
PerformTask();
};
break;
default:
break;
};
}
private function PerformTask():void{
var _local1:Object;
if (stack.length == 0){
flagIsFree = true;
return;
};
_local1 = stack.shift();
switch (_local1.aCommand){
case COMMAND_ADD:
SetValue((GetValue() + _local1.aValue));
break;
default:
break;
};
}
public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
switch (iState){
case stAnimation:
_local2 = 3;
if ((getTimer() - iTimer) > 30){
if (indexF < (this.iAnimElements.length + _local2)){
if (indexF < this.iAnimElements.length){
_local3 = (this.iAnimElements[indexF] as OElement);
_local3.IsSelect = true;
};
if (((((indexF - indexS) >= _local2)) && ((indexF < (this.iAnimElements.length + _local2))))){
_local3 = (this.iAnimElements[(indexF - _local2)] as OElement);
_local3.IsSelect = false;
};
indexF++;
iTimer = getTimer();
};
if (((!((indexB == (indexF - 1)))) && ((indexB >= -(_local2))))){
if (indexB >= 0){
_local3 = (this.iAnimElements[indexB] as OElement);
_local3.IsSelect = true;
};
if (((((indexS - indexB) >= _local2)) && ((indexB >= -(_local2))))){
_local3 = (this.iAnimElements[(indexB + _local2)] as OElement);
_local3.IsSelect = false;
};
indexB--;
iTimer = getTimer();
};
if (indexB == (indexF - 1)){
indexB--;
};
};
if ((((((isOver == false)) && ((indexF >= (this.iAnimElements.length + _local2))))) && ((indexB < -(_local2))))){
this.State = stNormal;
};
if ((((((indexF >= (this.iAnimElements.length + _local2))) && ((indexB < -(_local2))))) && (((getTimer() - iTimer) > 100)))){
this.State = stNormal;
OnMouseOut();
};
break;
default:
break;
};
}
private function set State(_arg1:int):void{
iState = _arg1;
switch (iState){
case stAnimation:
indexS = startIndex;
indexF = indexS;
indexB = indexS;
iTimer = getTimer();
break;
default:
break;
};
}
}
}//package RES.INTERFACE
Section 69
//OInterfacePlatform (RES.INTERFACE.OInterfacePlatform)
package RES.INTERFACE {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.GAME.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
import flash.text.*;
import RES.*;
public class OInterfacePlatform extends OIObject {
private var curEvent:Event;
private var cShiftD:Point;
private var cVecY:Point;
private var iTimer:int;// = 0
private var cVecX:Point;
private var cVecDY:Point;
private var iSizeCell:Number;
private var cVecDX:Point;
private var iSizePlatform:Point;
private var isActive:Boolean;// = true
private var iWordArray:Array;
public var iGrid:Array;
private var countMove:int;// = 0
private static var instance:OInterfacePlatform;
private static var parent:Object;
public function OInterfacePlatform():void{
isActive = true;
countMove = 0;
iTimer = 0;
iWordArray = new Array();
iSizePlatform = TwinzL.cSizePlatformMenu.clone();
iSizeCell = TwinzL.cSizeCellMenu;
cVecX = new Point(((iSizeCell * Math.sqrt(3)) / 2), (iSizeCell / 2));
cVecY = new Point(((-(iSizeCell) * Math.sqrt(3)) / 2), (iSizeCell / 2));
cVecDX = new Point(iSizeCell, 0);
cVecDY = new Point(0, iSizeCell);
cShiftD = new Point(((cVecX.x * iSizePlatform.x) + (cVecY.x * iSizePlatform.y)), ((cVecX.y * iSizePlatform.x) + (cVecY.y * iSizePlatform.y)));
cShiftD.x = (cShiftD.x / 2);
cShiftD.y = (cShiftD.y / 2);
cShiftD.x = (cShiftD.x - (((cVecDX.x * iSizePlatform.x) / 2) + ((cVecDY.x * iSizePlatform.y) / 2)));
cShiftD.y = (cShiftD.y - (((cVecDX.y * iSizePlatform.x) / 2) + ((cVecDY.y * iSizePlatform.y) / 2)));
super(null);
}
private function onDelete(_arg1:OEvent):void{
var _local2:OElement;
_arg1.Finish();
_local2 = (_arg1.target as OElement);
if (_local2 == null){
return;
};
countMove--;
_local2.MoveAndDell(_local2.Direction, _local2.Speed, 2000);
}
private function onEndMove(_arg1:OEvent):void{
var _local2:OElement;
if (isActive){
return;
};
if ((getTimer() - iTimer) > 0){
iTimer = getTimer();
};
_local2 = (_arg1.target as OElement);
if ((((((((_local2.iRemoveEvent == true)) && ((_local2.iMouseEnable == false)))) && (!(((_local2 as OTextBlock) == null))))) && ((((_local2 as OTextBlock).object is OCCounter) == false)))){
_local2.removeEventListener(Event.ENTER_FRAME, _local2.onEnterFrame);
};
countMove--;
if (countMove == 0){
isActive = true;
if (curEvent != null){
onMouseOver(curEvent);
};
};
}
override public function Free():void{
super.Free();
this.removeEventListener(OElementEvents.FREE, onFree);
this.removeEventListener(OElementEvents.DELETE, onDelete);
this.removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
this.removeEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
this.removeEventListener(MouseEvent.CLICK, onClick);
this.removeEventListener(OElementEvents.ENDMOVE, onEndMove);
this.removeEventListener(OCCounter.EVENT_DELETE, onCounterEvent);
this.removeEventListener(OCCounter.EVENT_END_MOVE, onCounterEvent);
this.removeEventListener(OCCounter.EVENT_FREE, onCounterEvent);
this.removeEventListener(OCCounter.EVENT_MOVE_TO_DEL, onCounterEvent);
this.removeEventListener(OCCounter.EVENT_MOVE_TO_FREE, onCounterEvent);
}
override public function get prY():Number{
return (super.prY);
}
override public function get prX():Number{
return ((super.prY - (Math.abs(cVecY.x) * iSizePlatform.y)));
}
private function DrawGrid(_arg1:Boolean=false):void{
var _local2:int;
this.graphics.clear();
this.graphics.lineStyle(1, 15658992);
_local2 = 0;
while (_local2 <= iSizePlatform.x) {
if (_arg1){
this.graphics.moveTo(((cVecDX.x * _local2) + cShiftD.x), ((cVecDX.y * _local2) + cShiftD.y));
this.graphics.lineTo((((cVecDX.x * _local2) + cShiftD.x) + (cVecDY.x * iSizePlatform.y)), (((cVecDX.y * _local2) + cShiftD.y) + (cVecDY.y * iSizePlatform.y)));
} else {
this.graphics.moveTo((cVecX.x * _local2), (cVecX.y * _local2));
this.graphics.lineTo(((cVecX.x * _local2) + (cVecY.x * iSizePlatform.y)), ((cVecX.y * _local2) + (cVecY.y * iSizePlatform.y)));
};
_local2++;
};
_local2 = 0;
while (_local2 <= iSizePlatform.y) {
if (_arg1){
this.graphics.moveTo(((cVecDY.x * _local2) + cShiftD.x), ((cVecDY.y * _local2) + cShiftD.y));
this.graphics.lineTo((((cVecDY.x * _local2) + cShiftD.x) + (cVecDX.x * iSizePlatform.x)), (((cVecDY.y * _local2) + cShiftD.y) + (cVecDX.y * iSizePlatform.x)));
} else {
this.graphics.moveTo((cVecY.x * _local2), (cVecY.y * _local2));
this.graphics.lineTo(((cVecY.x * _local2) + (cVecX.x * iSizePlatform.x)), ((cVecY.y * _local2) + (cVecX.y * iSizePlatform.x)));
};
_local2++;
};
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:OWord;
for each (_local2 in iWordArray) {
if (_local2 == null){
} else {
_local2.OnEnterFrame(_arg1);
};
};
}
override public function get prWidth():Number{
return (((Math.abs(cVecX.x) * iSizePlatform.x) + (Math.abs(cVecY.x) * iSizePlatform.y)));
}
private function onFree(_arg1:OEvent):void{
var _local2:OElement;
_arg1.Finish();
_local2 = (_arg1.target as OElement);
if (_local2 == null){
return;
};
this.removeChild(_local2);
_local2.removeEventListener(Event.ENTER_FRAME, _local2.onEnterFrame);
_local2.Free();
}
private function onClick(_arg1:Event):void{
var _local2:OTextBlock;
var _local3:OElement;
if (!isActive){
return;
};
_local2 = (_arg1.target as OTextBlock);
if (_local2 == null){
return;
};
if (_local2.iMouseEnable == false){
return;
};
if ((_local2.object is OCCounter)){
return;
};
if (_local2.iAnimationEnable == true){
if ((_local2.object is OWord)){
_local2.object.OnClick(_arg1);
};
for each (_local3 in (_local2.object as Array)) {
_local3.MoveAndCall(_local3.prX, _local3.prY, -400, true, null);
_local3.Direction = new Point(0, 1);
};
};
if (OInterfacePlatform.parent != null){
(OInterfacePlatform.parent as OWindow).OnPress(null, _local2.object);
};
}
public function AddWord(_arg1:Array):void{
if ((_arg1 as OWord) == null){
return;
};
if (iWordArray.indexOf(_arg1) == -1){
iWordArray.push(_arg1);
};
}
override public function set prX(_arg1:Number):void{
super.prX = (_arg1 + (Math.abs(cVecY.x) * iSizePlatform.y));
}
override public function set prY(_arg1:Number):void{
super.prY = _arg1;
}
override public function Init():void{
super.Init();
this.addEventListener(OElementEvents.FREE, onFree);
this.addEventListener(OElementEvents.DELETE, onDelete);
this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
this.addEventListener(MouseEvent.CLICK, onClick);
this.addEventListener(OElementEvents.ENDMOVE, onEndMove);
this.addEventListener(OCCounter.EVENT_DELETE, onCounterEvent);
this.addEventListener(OCCounter.EVENT_END_MOVE, onCounterEvent);
this.addEventListener(OCCounter.EVENT_FREE, onCounterEvent);
this.addEventListener(OCCounter.EVENT_MOVE_TO_DEL, onCounterEvent);
this.addEventListener(OCCounter.EVENT_MOVE_TO_FREE, onCounterEvent);
}
private function onMouseOut(_arg1:Event):void{
var _local2:OTextBlock;
var _local3:OElement;
_local2 = (_arg1.target as OTextBlock);
if (_local2 == null){
return;
};
if (_local2.iMouseEnable == false){
return;
};
if ((_local2.object is OCCounter)){
return;
};
curEvent = null;
if (!isActive){
return;
};
if ((_local2.object is OWord)){
_local2.object.OnMouseOut(_arg1);
return;
};
for each (_local3 in (_local2.object as Array)) {
_local3.IsSelect = false;
};
}
private function onCounterEvent(_arg1:OEvent):void{
_arg1.target.object.OnEvent(_arg1);
}
public function DelWord(_arg1:Array):void{
var _local2:int;
_local2 = iWordArray.indexOf(_arg1);
if (_local2 == -1){
return;
};
iWordArray[_local2] = null;
iWordArray.splice(_local2, 1);
}
override public function get prHeight():Number{
return (((Math.abs(cVecX.y) * iSizePlatform.x) + (Math.abs(cVecY.y) * iSizePlatform.y)));
}
private function onMouseOver(_arg1:Event):void{
var _local2:OTextBlock;
var _local3:OElement;
_local2 = (_arg1.target as OTextBlock);
if (_local2 == null){
return;
};
if (_local2.iMouseEnable == false){
return;
};
if ((_local2.object is OCCounter)){
return;
};
curEvent = _arg1;
if (!isActive){
return;
};
if ((_local2.object is OWord)){
_local2.object.OnMouseOver(_arg1);
return;
};
for each (_local3 in (_local2.object as Array)) {
_local3.IsSelect = true;
};
}
public static function get ACTIVE():Boolean{
return (instance.isActive);
}
public static function set ACTIVE(_arg1:Boolean):void{
instance.isActive = _arg1;
}
public static function AddBorder(_arg1:Object):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:OTextBlock;
if (_arg1.aAlign == null){
_arg1.aAlign = OAlignConfig.LEFT;
};
_local2 = new Array();
_local3 = _arg1.aSize;
_local4 = _arg1.aShift;
if (_arg1.aAlign == OAlignConfig.CENTER){
_local4 = (_local4 - int(((_local3 * _arg1.aWidth) / 2)));
};
if (_arg1.aAlign == OAlignConfig.RIGHT){
_local4 = (_local4 - (_local3 * _arg1.aWidth));
};
_local5 = 0;
while (_local5 < _arg1.aWidth) {
_local6 = 0;
while (_local6 < _arg1.aHeight) {
_local7 = AddWord({aStr:" ", aShift:(_local4 + (_local3 * ((_arg1.aWidth - _local5) - 1))), aRow:(_arg1.aRow + (_local6 * _local3)), aSize:_local3, aVisible:true, aButton:false, aOrientation:_arg1.aOrientation, aColors:_arg1.aColors, aAlign:_arg1.aAlign})[0];
_local7.object = _local2;
_local2.push(_local7);
_local6++;
};
_local5++;
};
return (_local2);
}
public static function NumCHILDRENS():int{
var _local1:int;
var _local2:OElement;
_local1 = 0;
while (_local1 < instance.numChildren) {
_local2 = (instance.getChildAt(_local1) as OElement);
_local1++;
};
return (instance.numChildren);
}
public static function MOVE(_arg1:OElement, _arg2:Number, _arg3:Number, _arg4:Number=-1, _arg5:Boolean=true, _arg6:String=null):void{
if (_arg1.hasEventListener(Event.ENTER_FRAME) == false){
_arg1.addEventListener(Event.ENTER_FRAME, _arg1.onEnterFrame);
};
_arg1.MoveAndCall(_arg2, _arg3, _arg4, _arg5, _arg6);
if (isNaN(_arg4)){
trace("NAN");
};
instance.countMove++;
ACTIVE = false;
}
public static function VISIBLE_OBJECT(_arg1:Array, _arg2:Boolean):void{
var _local3:OElement;
for each (_local3 in _arg1) {
_local3.visible = _arg2;
};
}
public static function AmplyClick(_arg1:OElement):void{
var _local2:OTextBlock;
var _local3:Array;
var _local4:OElement;
_local2 = (_arg1 as OTextBlock);
if (_local2 == null){
return;
};
_local3 = new Array();
for each (_local4 in (_local2.object as Array)) {
if ((((_local4.IsMove == false)) && (_local4.iAnimationEnable))){
_local4.MoveAndCall(_local4.prX, (_local4.prY - _local4.DeltaSelect), -400, true, null);
_local4.Direction = new Point(0, 1);
};
MOVE(_local4, _local4.prX, (_local4.prY + 300), -1, false, OElementEvents.DELETE);
};
instance.DelWord((_local2.object as Array));
CUtils.ClearArray(_local2.object);
}
public static function get X():Number{
return (instance.prX);
}
public static function get Y():Number{
return (instance.prY);
}
public static function set PARENT(_arg1:Object):void{
parent = _arg1;
}
public static function get INSTANCE():OInterfacePlatform{
return (instance);
}
public static function AddSimpleBorder(_arg1:Object):Array{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:Array;
var _local6:int;
var _local7:int;
var _local8:OTextBlock;
if (instance == null){
return (null);
};
_local2 = int(_arg1.aSize);
if ((_arg1.aSize - _local2) > 0){
_local2 = (_local2 + 1);
};
_local3 = int(_arg1.aRow);
_local4 = int(_arg1.aShift);
_local5 = new Array();
if (_arg1.aColors == null){
_arg1.aColors = ["RED"];
};
_local6 = int(_arg1.aWidth);
_local7 = int(_arg1.aHeigth);
_local5 = _local5.concat(AddCustomSimpleText({aStr:"", aRow:(_local3 + ((_local7 - 1) * _local2)), aShift:_local4, aWidth:_local6, aHeight:1, aSize:_local2, aColors:_arg1.aColors, aBackground:_arg1.aBackground}));
_local5 = _local5.concat(AddCustomSimpleText({aStr:"", aRow:(_local3 + _local2), aShift:(_local4 + ((_local6 - 1) * _local2)), aWidth:1, aHeight:(_local7 - 2), aSize:_local2, aColors:_arg1.aColors, aBackground:_arg1.aBackground}));
_local5 = _local5.concat(AddCustomSimpleText({aStr:"", aRow:(_local3 + _local2), aShift:_local4, aWidth:1, aHeight:(_local7 - 2), aSize:_local2, aColors:_arg1.aColors, aBackground:_arg1.aBackground}));
_local5 = _local5.concat(AddCustomSimpleText({aStr:"", aRow:_local3, aShift:_local4, aWidth:_local6, aHeight:1, aSize:_local2, aColors:_arg1.aColors, aBackground:_arg1.aBackground}));
for each (_local8 in _local5) {
CUtils.ClearArray(_local8.object);
_local8.object = _local5;
};
return (_local5);
}
public static function AddSimpleText(_arg1:Object):Array{
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:String;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:OTextBlock;
var _local11:int;
var _local12:String;
var _local13:Array;
var _local14:int;
var _local15:int;
if (instance == null){
return (null);
};
_local2 = int(_arg1.aSize);
if ((_arg1.aSize - _local2) > 0){
_local2 = (_local2 + 1);
};
_local3 = int(_arg1.aRow);
_local4 = new OWord();
instance.AddWord(_local4);
if (_arg1.aColors == null){
_arg1.aColors = ["RED"];
};
_local5 = _arg1.aStr.substr();
_local6 = _local5.split("\n");
_local8 = 0;
_local9 = -(((_local2 + ((_arg1.aRowSpace)==null) ? 0 : int(_arg1.aRowSpace)) - 1));
if (_arg1.aWidth != null){
_local7 = 0;
_local11 = _arg1.aWidth;
_local13 = new Array();
_local14 = -1;
_local15 = -1;
while (true) {
_local12 = _local6[_local7];
if (_local12.length > _local11){
while (true) {
_local14 = _local12.indexOf(" ", (_local15 + 1));
if ((((_local14 >= _local11)) || ((_local14 == -1)))){
break;
};
_local15 = _local14;
};
if (_local15 != -1){
_local13.push(_local12.substring(0, _local15));
_local6[_local7] = _local12.substr((_local15 + 1));
} else {
if (_local14 != -1){
_local13.push(_local12.substring(0, _local14));
_local6[_local7] = _local12.substr((_local14 + 1));
} else {
_local13.push(_local12);
_local13.push("");
_local8 = (_local8 + _local9);
_local7++;
};
};
_local14 = -1;
_local15 = -1;
} else {
_local13.push(_local12);
_local13.push("");
_local8 = (_local8 + _local9);
_local7++;
};
if (_local7 >= _local6.length){
break;
};
};
_local6 = _local13;
};
_local7 = (_local6.length - 1);
while (_local7 >= 0) {
_arg1.aStr = _local6[_local7];
if (_arg1.aStr == ""){
_local8 = (_local8 - _local9);
} else {
_arg1.aRow = ((_local3 + ((_local2 + ((_arg1.aRowSpace)==null) ? 0 : int(_arg1.aRowSpace)) * _local7)) + _local8);
_local4 = _local4.concat(AddSimpleWord(_arg1));
};
_local7--;
};
_arg1.aStr = _local5;
_arg1.aRow = _local3;
for each (_local10 in _local4) {
instance.DelWord((_local10.object as Array));
CUtils.ClearArray(_local10.object);
_local10.object = _local4;
};
return (_local4);
}
public static function set VISIBLE(_arg1:Boolean):void{
instance.prVisible = _arg1;
}
public static function get WIDTH():Number{
return (instance.prWidth);
}
public static function get HEIGHT():Number{
return (instance.prHeight);
}
public static function AddSimpleCounter(_arg1:Object):Array{
var _local2:String;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:OCCounter;
var _local8:int;
var _local9:int;
var _local10:OTextBlock;
_local2 = "0123456789";
_local3 = 0;
_local4 = new Array();
_local5 = ((_arg1.aCountRegister)==null) ? 3 : _arg1.aCountRegister;
_local6 = ((_arg1.aSize)==null) ? 10 : _arg1.aSize;
_local7 = new OCCounter();
if (_arg1.aRevers == null){
_local7.revers = false;
} else {
_local7.revers = _arg1.aRevers;
};
if (_arg1.aAlign == null){
_arg1.aAlign = OAlignConfig.CENTER;
};
_local9 = 0;
while (_local9 < _local5) {
_local3 = 0;
if (_arg1.aAlign == OAlignConfig.LEFT){
_local8 = (_arg1.aShift + (_local9 * _local6));
};
if (_arg1.aAlign == OAlignConfig.RIGHT){
_local8 = ((_arg1.aShift - ((_local5 - 1) * _local6)) + (_local9 * _local6));
};
if (_arg1.aAlign == OAlignConfig.CENTER){
_local8 = ((_arg1.aShift - (int(((_local5 - 1) / 2)) * _local6)) + (_local9 * _local6));
};
while (_local3 < _local2.length) {
_local10 = AddSimpleWord({aStr:_local2.charAt(_local3), aShift:_local8, aVisible:false, aSize:_local6, aRow:_arg1.aRow, aButton:_arg1.aButton, aOrientation:_arg1.aOrientation, aColors:_arg1.aColors, aAlign:_arg1.aAlign, aAnimation:_arg1.aAnimation})[0];
CUtils.ClearArray(_local10.object);
instance.DelWord((_local10.object as Array));
_local10.object = _local7;
_local4.push(_local10);
_local3++;
};
_local7.AddRegister(_local4);
_local4 = new Array();
_local9++;
};
if (_arg1.aAnimation != null){
_local7.iAnimationEnable = _arg1.aAnimation;
};
VISIBLE_OBJECT(_local7, ((_arg1.aVisible)==null) ? true : _arg1.aVisible);
return (_local7);
}
public static function AddWord(_arg1:Object):Array{
var size:int;
var array:Array;
var iStr:String;
var l:int;
var iY:int;
var iX:int;
var dX:int;
var dY:int;
var cl:Function;
var alpha:int;
var indexColor:int;
var c:String;
var cord:Array;
var el:OElement;
var aObject = _arg1;
if (instance == null){
return (null);
};
size = int(aObject.aSize);
if ((aObject.aSize - size) > 0){
size = (size + 1);
};
array = new Array();
if (aObject.aColors == null){
aObject.aColors = ["RED"];
};
iStr = aObject.aStr.substr();
l = iStr.length;
dX = 0;
dY = 0;
cl = function (_arg1:int, _arg2:int=1):int{
return (((_arg2)==1) ? (_arg1 - 1) : (iStr.length - _arg1));
};
alpha = 0;
if (aObject.aAlign == null){
aObject.aAlign = OAlignConfig.CENTER;
};
switch (aObject.aOrientation){
case OOrientationConfig.LEFT:
iX = (Math.round(((instance.iSizePlatform.x / 2) - ((l / 2) * size))) + (aObject.aShift) ? int(aObject.aShift) : 0);
iY = aObject.aRow;
dX = size;
alpha = -90;
break;
case OOrientationConfig.RIGHT:
iX = (aObject.aShift) ? int(aObject.aShift) : 0;
if (aObject.aAlign == OAlignConfig.LEFT){
iX = (iX + 0);
};
if (aObject.aAlign == OAlignConfig.RIGHT){
iX = (iX + (instance.iSizePlatform.x - (size * l)));
};
if (aObject.aAlign == OAlignConfig.CENTER){
iX = (iX + Math.round(((instance.iSizePlatform.x / 2) - ((l / 2) * size))));
};
iY = aObject.aRow;
dX = size;
alpha = 90;
break;
case OOrientationConfig.REVERSE:
iY = (Math.round(((instance.iSizePlatform.y / 2) - ((l / 2) * size))) + (aObject.aShift) ? int(aObject.aShift) : 0);
iX = aObject.aRow;
dY = size;
alpha = 180;
default:
iY = (aObject.aShift) ? int(-(aObject.aShift)) : 0;
if (aObject.aAlign == OAlignConfig.LEFT){
iY = (iY + (instance.iSizePlatform.y - (size * l)));
};
if (aObject.aAlign == OAlignConfig.RIGHT){
iY = (iY + 0);
};
if (aObject.aAlign == OAlignConfig.CENTER){
iY = (iY + Math.round(((instance.iSizePlatform.y / 2) - ((l / 2) * size))));
};
iX = aObject.aRow;
dY = size;
break;
};
indexColor = (Math.random() * aObject.aColors.length);
while (l > 0) {
c = iStr.charAt(cl(l, ((((alpha == 90)) || ((alpha == 180)))) ? -1 : 1));
cord = OInterfacePlatform.CordXY(new Point(iX, iY));
el = new OTextBlock(aObject.aColors[indexColor], c, ((instance.iSizeCell * aObject.aSize) - 1), alpha);
el.SetPos(cord[0], cord[1]);
el.iCordInPlatform = new Point(iX, iY);
el.buttonMode = aObject.aButton;
el.iMouseEnable = aObject.aButton;
el.visible = ((aObject.aVisible)==null) ? true : aObject.aVisible;
(el as OTextBlock).object = array;
instance.addChild(el);
array.push(el);
indexColor = ((indexColor)==(aObject.aColors.length - 1)) ? 0 : (indexColor + 1);
l = (l - 1);
iX = (iX + dX);
iY = (iY + dY);
};
return (array);
}
public static function AddControlButton(_arg1:Object):Array{
var _local2:int;
var _local3:Array;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:String;
var _local9:OElement;
var _local10:Array;
if (instance == null){
return (null);
};
_local2 = int(_arg1.aSize);
if ((_arg1.aSize - _local2) > 0){
_local2 = (_local2 + 1);
};
_local3 = new OWord();
if (_arg1.aColors == null){
_arg1.aColors = ["RED"];
};
_local4 = _arg1.aStr.substr();
if (_arg1.aAlign == null){
_arg1.aAlign = OAlignConfig.CENTER;
};
_local6 = (_arg1.aShift) ? int(_arg1.aShift) : 0;
if (_arg1.aAlign == OAlignConfig.LEFT){
_local6 = (_local6 + 0);
};
if (_arg1.aAlign == OAlignConfig.RIGHT){
_local6 = (_local6 + (instance.iSizePlatform.x - (_local2 * _local4.length)));
};
if (_arg1.aAlign == OAlignConfig.CENTER){
_local6 = (_local6 + Math.round(((instance.iSizePlatform.x / 2) - ((_local4.length / 2) * _local2))));
};
_local5 = _arg1.aRow;
_local7 = (instance.iSizeCell * _arg1.aSize);
_local8 = _local4.charAt(0);
switch (_local8){
case "M":
_local9 = new OMusicControl(_arg1.aColors[0], _local8, (_local7 - 1), 0);
break;
case "S":
_local9 = new OSoundControl(_arg1.aColors[0], _local8, (_local7 - 1), 0);
break;
case "P":
_local9 = new OPauseControl(_arg1.aColors[0], _local8, (_local7 - 1), 0);
break;
default:
_local9 = new OSimpleTextBlock(_arg1.aColors[0], _local8, (_local7 - 1), 0);
break;
};
_local10 = OInterfacePlatform.CordXY(new Point(_local6, _local5), _local9);
_local9.SetPos(_local10[0], _local10[1]);
_local9.iCordInPlatform = new Point(_local6, _local5);
_local9.buttonMode = _arg1.aButton;
_local9.iMouseEnable = _arg1.aButton;
if (_arg1.aAnimation != null){
_local9.iAnimationEnable = _arg1.aAnimation;
};
_local9.visible = ((_arg1.aVisible)==null) ? true : _arg1.aVisible;
(_local9 as OTextBlock).object = _local3;
instance.addChild(_local9);
_local3.push(_local9);
return (_local3);
}
public static function Init(_arg1:Sprite):void{
instance = new (OInterfacePlatform);
instance.prX = (400 - (instance.prWidth / 2));
instance.prY = (300 - (instance.prHeight / 2));
_arg1.addChild(instance);
}
public static function get PARENT():Object{
return (parent);
}
public static function set Y(_arg1:Number):void{
instance.prY = _arg1;
}
public static function set X(_arg1:Number):void{
instance.prX = _arg1;
}
public static function AddCustomSimpleText(_arg1:Object):Array{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:String;
var _local9:Array;
var _local10:Number;
var _local11:OTextBlock;
var _local12:Array;
var _local13:Sprite;
var _local14:TextField;
var _local15:TextFormat;
var _local16:Number;
var _local17:Rectangle;
if (instance == null){
return (null);
};
_local2 = int(_arg1.aSize);
if ((_arg1.aSize - _local2) > 0){
_local2 = (_local2 + 1);
};
_local3 = int(_arg1.aRow);
_local4 = int(_arg1.aShift);
_local5 = int(_arg1.aWidth);
_local6 = int(_arg1.aHeight);
_local7 = int(_arg1.aTextWidth);
_local8 = _arg1.aStr.substr();
if (_local5 == -1){
_local13 = (new TwinzL.OFont() as Sprite);
_local14 = (_local13.getChildAt(0) as TextField);
_local14.autoSize = TextFieldAutoSize.LEFT;
_local14.multiline = false;
_local14.text = _local8;
_local15 = _local14.getTextFormat();
_local16 = ((instance.iSizeCell * _local2) * ((_arg1.aTextSetings.aSize)==null) ? 1 : _arg1.aTextSetings.aSize);
_local15.size = _local16;
_local15.color = ((_arg1.aColorText)==null) ? 0xFFFFFF : _arg1.aColorText;
_local15.size = _local16;
_local15.align = ((_arg1.aTextSetings.aAlign)==null) ? TextFormatAlign.LEFT : _arg1.aTextSetings.aAlign;
_local15.indent = (_local16 * ((_arg1.aTextSetings.aIndent)==null) ? 1 : _arg1.aTextSetings.aIndent);
_local15.leading = (_local16 * ((_arg1.aTextSetings.aLeading)==null) ? 0 : _arg1.aTextSetings.aLeading);
_local15.letterSpacing = (_local16 * ((_arg1.aTextSetings.aLetterSpacing)==null) ? 0 : _arg1.aTextSetings.aLetterSpacing);
_local14.setTextFormat(_local15);
_local17 = _local14.getRect(OGlobal.prStage);
_local5 = ((Math.round((((_local17.width / instance.iSizeCell) / _local2) / 2)) * 2) + 2);
};
_local9 = new Array();
if (_arg1.aColors == null){
_arg1.aColors = ["RED"];
};
if (_arg1.aAlign == OAlignConfig.CENTER){
_local4 = (_local4 + ((instance.iSizePlatform.x / 2) - ((_local5 * _local2) / 2)));
};
_local10 = (instance.iSizeCell * _local2);
_local11 = new OCustomTextBlock(_arg1.aColors[0], _local8, (_local10 * _local5), (_local10 * _local6), _local10, _arg1.aTextSetings, 0, _arg1.aBorders, ((_arg1.aBackground)==null) ? false : _arg1.aBackground, ((_arg1.aColorText)==null) ? 0xFFFFFF : _arg1.aColorText);
_local12 = OInterfacePlatform.CordXY(new Point(_local4, _local3), _local11);
_local11.SetPos(_local12[0], _local12[1]);
_local11.iCordInPlatform = new Point(_local4, _local3);
_local11.buttonMode = ((_arg1.aButton)==null) ? false : _arg1.aButton;
_local11.iMouseEnable = ((_arg1.aButton)==null) ? false : _arg1.aButton;
if (_arg1.aAnimation != null){
_local11.iAnimationEnable = _arg1.aAnimation;
};
_local11.visible = ((_arg1.aVisible)==null) ? true : _arg1.aVisible;
(_local11 as OTextBlock).object = _local9;
instance.addChild(_local11);
_local9.push(_local11);
return (_local9);
}
public static function AddCounter(_arg1:Object):Array{
var _local2:String;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:OCCounter;
var _local8:int;
var _local9:int;
var _local10:OTextBlock;
_local2 = "0123456789";
_local3 = 0;
_local4 = new Array();
_local5 = ((_arg1.aCountRegister)==null) ? 3 : _arg1.aCountRegister;
_local6 = ((_arg1.aSize)==null) ? 10 : _arg1.aSize;
_local7 = new OCCounter();
if (_arg1.aAlign == null){
_arg1.aAlign = OAlignConfig.CENTER;
};
_local9 = 0;
while (_local9 < _local5) {
_local3 = 0;
if (_arg1.aAlign == OAlignConfig.LEFT){
_local8 = (_arg1.aShift + (_local9 * _local6));
};
if (_arg1.aAlign == OAlignConfig.RIGHT){
_local8 = ((_arg1.aShift - (_local5 * _local6)) + (_local9 * _local6));
};
if (_arg1.aAlign == OAlignConfig.CENTER){
_local8 = ((_arg1.aShift - (int((_local5 / 2)) * _local6)) + (_local9 * _local6));
};
while (_local3 < _local2.length) {
_local10 = AddWord({aStr:_local2.charAt(_local3), aShift:_local8, aVisible:false, aSize:_local6, aRow:_arg1.aRow, aButton:_arg1.aButton, aOrientation:_arg1.aOrientation, aColors:_arg1.aColors, aAlign:_arg1.aAlign})[0];
CUtils.ClearArray(_local10.object);
_local10.object = _local7;
_local4.push(_local10);
_local3++;
};
_local7.AddRegister(_local4);
_local4 = new Array();
_local9++;
};
VISIBLE_OBJECT(_local7, ((_arg1.aVisible)==null) ? true : _arg1.aVisible);
return (_local7);
}
public static function AddSimpleWord(_arg1:Object):Array{
var size:int;
var array:Array;
var iStr:String;
var l:int;
var iY:int;
var iX:int;
var dX:int;
var dY:int;
var cl:Function;
var alpha:int;
var indexColor:int;
var ss:int;
var c:String;
var el:OElement;
var cord:Array;
var aObject = _arg1;
if (instance == null){
return (null);
};
size = int(aObject.aSize);
if ((aObject.aSize - size) > 0){
size = (size + 1);
};
array = new OWord();
instance.AddWord(array);
if (aObject.aColors == null){
aObject.aColors = ["RED"];
};
iStr = aObject.aStr.substr();
l = 0;
dX = 0;
dY = 0;
cl = function (_arg1:int, _arg2:int=1):int{
return (((_arg2)==1) ? (_arg1 - 1) : (iStr.length - _arg1));
};
alpha = 0;
if (aObject.aAlign == null){
aObject.aAlign = OAlignConfig.CENTER;
};
switch (aObject.aOrientation){
case OOrientationConfig.LEFT:
iY = (aObject.aShift) ? int(aObject.aShift) : 0;
iX = aObject.aRow;
if (aObject.aAlign == OAlignConfig.LEFT){
iY = (iY + instance.iSizePlatform.y);
};
if (aObject.aAlign == OAlignConfig.RIGHT){
iY = (iY + ((iStr.length - 1) * size));
};
if (aObject.aAlign == OAlignConfig.CENTER){
iY = (iY + (Math.round(((instance.iSizePlatform.y / 2) + ((iStr.length / 2) * size))) - size));
};
dY = -(size);
alpha = -90;
break;
case OOrientationConfig.RIGHT:
break;
case OOrientationConfig.REVERSE:
default:
iX = (aObject.aShift) ? int(aObject.aShift) : 0;
if (aObject.aAlign == OAlignConfig.LEFT){
iX = (iX + 0);
};
if (aObject.aAlign == OAlignConfig.RIGHT){
iX = (iX + (instance.iSizePlatform.x - (size * iStr.length)));
};
if (aObject.aAlign == OAlignConfig.CENTER){
iX = (iX + Math.round(((instance.iSizePlatform.x / 2) - ((iStr.length / 2) * size))));
};
iY = aObject.aRow;
dX = size;
break;
};
indexColor = (Math.random() * aObject.aColors.length);
ss = (instance.iSizeCell * aObject.aSize);
while (l < iStr.length) {
c = iStr.charAt(l);
el = new OSimpleTextBlock(aObject.aColors[indexColor], c, (ss - 1), alpha);
cord = OInterfacePlatform.CordXY(new Point(iX, iY), el);
el.SetPos(cord[0], cord[1]);
el.iCordInPlatform = new Point(iX, iY);
el.buttonMode = aObject.aButton;
el.iMouseEnable = aObject.aButton;
if (aObject.aAnimation != null){
el.iAnimationEnable = aObject.aAnimation;
};
el.visible = ((aObject.aVisible)==null) ? true : aObject.aVisible;
(el as OTextBlock).object = array;
instance.addChild(el);
array.push(el);
indexColor = ((indexColor)==(aObject.aColors.length - 1)) ? 0 : (indexColor + 1);
l = (l + 1);
iX = (iX + dX);
iY = (iY + dY);
};
return (array);
}
public static function CordXY(_arg1:Point, _arg2:OElement=null):Array{
var _local3:Array;
_local3 = new Array();
if ((((_arg2 is OSimpleTextBlock)) || ((_arg2 is OCustomTextBlock)))){
_local3.push((((instance.cVecDX.x * _arg1.x) + (instance.cVecDY.x * _arg1.y)) + instance.cShiftD.x));
_local3.push((((instance.cVecDX.y * _arg1.x) + (instance.cVecDY.y * _arg1.y)) + instance.cShiftD.y));
} else {
_local3.push(((instance.cVecX.x * _arg1.x) + (instance.cVecY.x * _arg1.y)));
_local3.push(((instance.cVecX.y * _arg1.x) + (instance.cVecY.y * _arg1.y)));
};
return (_local3);
}
}
}//package RES.INTERFACE
Section 70
//OOrientationConfig (RES.INTERFACE.OOrientationConfig)
package RES.INTERFACE {
public class OOrientationConfig {
public static const NORMAL:String = "NORMAL";
public static const LEFT:String = "LEFT";
public static const REVERSE:String = "REVERSE";
public static const RIGHT:String = "RIGHT";
}
}//package RES.INTERFACE
Section 71
//OWord (RES.INTERFACE.OWord)
package RES.INTERFACE {
import flash.events.*;
import RES.GAME.OElements.*;
import flash.utils.*;
public dynamic class OWord extends Array {
private var indexS:int;
private var startIndex:int;
private var iTimer:int;
private var isOver:Boolean;// = false
private var iState:int;
private var indexB:int;
private var indexF:int;
private static const stNormal:int = 0;
private static const stAnimation:int = 1;
public function OWord(_arg1:int=0){
isOver = false;
super(_arg1);
this.State = stNormal;
}
private function get State():int{
return (iState);
}
public function OnClick(_arg1:Event):void{
isOver = false;
}
public function OnMouseOver(_arg1:Event):void{
isOver = true;
startIndex = this.indexOf(_arg1.target);
if (this.State != stAnimation){
this.State = stAnimation;
};
}
private function set State(_arg1:int):void{
iState = _arg1;
switch (iState){
case stAnimation:
indexS = startIndex;
indexF = indexS;
indexB = indexS;
iTimer = getTimer();
break;
default:
break;
};
}
public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
switch (iState){
case stAnimation:
_local2 = 3;
if ((getTimer() - iTimer) > 60){
if (indexF < (this.length + _local2)){
if (indexF < this.length){
_local3 = (this[indexF] as OElement);
_local3.IsSelect = true;
};
if (((((indexF - indexS) >= _local2)) && ((indexF < (this.length + _local2))))){
_local3 = (this[(indexF - _local2)] as OElement);
_local3.IsSelect = false;
};
indexF++;
iTimer = getTimer();
};
if (((!((indexB == (indexF - 1)))) && ((indexB >= -(_local2))))){
if (indexB >= 0){
_local3 = (this[indexB] as OElement);
_local3.IsSelect = true;
};
if (((((indexS - indexB) >= _local2)) && ((indexB >= -(_local2))))){
_local3 = (this[(indexB + _local2)] as OElement);
_local3.IsSelect = false;
};
indexB--;
iTimer = getTimer();
};
if (indexB == (indexF - 1)){
indexB--;
};
};
if ((((((isOver == false)) && ((indexF >= (this.length + _local2))))) && ((indexB < -(_local2))))){
this.State = stNormal;
};
if ((((((indexF >= (this.length + _local2))) && ((indexB < -(_local2))))) && (((getTimer() - iTimer) > 100)))){
this.State = stNormal;
};
break;
default:
break;
};
}
public function OnMouseOut(_arg1:Event):void{
isOver = false;
}
}
}//package RES.INTERFACE
Section 72
//OWClearScoreConfirm (RES.WINDOWS.OWClearScoreConfirm)
package RES.WINDOWS {
import flash.events.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
public class OWClearScoreConfirm extends OWindow {
private var iCancel:Array;
private var iWithoutName:Array;
private var iTimer:int;
private var iOk:Array;
private var iAll:Array;
private var index:int;// = 0
public static const stWaitForClear:int = 5;
public static const stShow:int = 2;
public static const stNormal:int = 0;
public static const stClear:int = 6;
public static const stEnd:int = 7;
public static const stPreShow:int = 1;
public function OWClearScoreConfirm(){
index = 0;
OInterfacePlatform.PARENT = this;
iAll = new Array();
iWithoutName = new Array();
iOk = new Array();
iCancel = new Array();
super(null);
this.State = stPreShow;
}
override public function Init():void{
var _local1:Object;
var _local2:Array;
super.Init();
for each (_local1 in TwinzL.OWClearScoreConfirm) {
if (_local1.aAdd == false){
} else {
if (_local1.aVariable == null){
_local2 = _local1.aFunction(_local1);
iWithoutName = iWithoutName.concat(_local2);
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
};
};
};
iWithoutName.reverse();
iAll = GetAllArray();
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iOk){
OInterfacePlatform.AmplyClick(iOk[0]);
if (OWHighScores.isLocal){
TwinzL.iGAME.ClearLocalScores(0);
} else {
TwinzL.iGAME.ClearPersonalScores(0);
};
this.State = stWaitForClear;
return;
};
if (_arg2 == iCancel){
OInterfacePlatform.AmplyClick(iCancel[0]);
this.State = stWaitForClear;
return;
};
}
private function GetAllArray():Array{
var _local1:Array;
_local1 = new Array();
_local1 = _local1.concat(iWithoutName).concat(iOk).concat(iCancel);
return (_local1);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:OElement;
var _local3:int;
var _local4:Array;
var _local5:int;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShow;
break;
case stShow:
_local3 = 0;
while (_local3 < 3) {
if (index >= 0){
index = (iAll.length - 1);
_local2 = (iAll.splice(index, 1)[0] as OElement);
_local4 = OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2);
OInterfacePlatform.MOVE(_local2, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
index--;
};
_local3++;
};
if ((((((index < 0)) && (OInterfacePlatform.ACTIVE))) && (((getTimer() - iTimer) > 1000)))){
this.State = stNormal;
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 500){
this.State = stClear;
};
break;
case stClear:
_local5 = 0;
while (_local5 < 3) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local2 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local2, _local2.prX, (_local2.prY + 200), _local2.Speed, !(_local2.IsMove), OElementEvents.DELETE);
};
_local5++;
};
if ((((iAll.length <= 0)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Rectangle;
iState = _arg1;
switch (iState){
case stPreShow:
for each (_local2 in iAll) {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
break;
case stShow:
index = (iAll.length - 1);
iTimer = getTimer();
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iTimer = getTimer();
iAll = GetAllArray();
break;
case stEnd:
this.prVisible = false;
break;
};
}
}
}//package RES.WINDOWS
Section 73
//OWConnection (RES.WINDOWS.OWConnection)
package RES.WINDOWS {
import flash.events.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.GAME.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
import ENGINE.AD.*;
public class OWConnection extends OWindow {
private var iLoader:OLoader;
private var iGlobalTimer:int;
private var iTimer:int;
private var iAll:Array;
private var index:int;// = 0
public static const stEnd:int = 7;
public static const stAnimation:int = 3;
public static const stShow:int = 2;
public static const stNormal:int = 0;
public static const stClear:int = 6;
public static const stWaitForClear:int = 5;
public static const stShowGameName:int = 4;
public static const stPreShow:int = 1;
public function OWConnection(){
index = 0;
OInterfacePlatform.PARENT = this;
iAll = new Array();
super(null);
this.State = stPreShow;
}
private function AddBanner(_arg1:Boolean, _arg2:int=0, _arg3:int=0):void{
if (TwinzL.sDebug == true){
return;
};
if (((OAdBanners.iBBanner) && (OAdBanners.iTBanner))){
if (_arg1){
OAdBanners.AddTBanner(OGlobal.prStage, 0, 0, _arg2, _arg3);
OAdBanners.AddBBanner(OGlobal.prStage, 0, (600 - _arg3), _arg2, _arg3);
} else {
OAdBanners.RemoveTBanner(OGlobal.prStage);
OAdBanners.RemoveBBanner(OGlobal.prStage);
};
};
}
override public function Init():void{
var _local1:Object;
super.Init();
for each (_local1 in TwinzL.OWConnectionPlatform) {
if (_local1.aVariable == null){
iAll = iAll.concat(_local1.aFunction(_local1));
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
iAll = iAll.concat(this[_local1.aVariable]);
};
};
TwinzL.cLevelsConfig = null;
iLoader = new OLoader();
iLoader.addEventListener(Event.COMPLETE, onLoadComplete);
iLoader.addEventListener(ErrorEvent.ERROR, onError);
iLoader.LoadData();
}
private function onError(_arg1:Event):void{
TwinzL.cLevelsConfig = null;
}
override public function OnPress(_arg1:Event, _arg2):void{
}
override public function Free():void{
this.AddBanner(false);
super.Free();
}
private function onLoadComplete(_arg1:OEvent):void{
_arg1.Finish();
TwinzL.cLevelsConfig = iLoader.data;
if (TwinzL.cLastGame.aLevel >= 0){
} else {
TwinzL.iGAME.NewGame();
while ((TwinzL.iGAME.prLevel + 1) < TwinzL.cLevelsConfig.StartLevel) {
TwinzL.iGAME.NextLevel();
};
};
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:OElement;
var _local3:int;
var _local4:OElement;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShow;
break;
case stShow:
if ((getTimer() - iTimer) > 0){
if (index >= 0){
_local2 = (iAll[((iAll.length - index) - 1)] as OElement);
OInterfacePlatform.MOVE(_local2, OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[0], OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[1], -1, true, OElementEvents.ENDMOVE);
index--;
iTimer = getTimer();
} else {
if (((OInterfacePlatform.ACTIVE) && (((getTimer() - iTimer) > 0)))){
this.State = stAnimation;
};
};
};
break;
case stAnimation:
_local3 = 3;
if (((((getTimer() - iTimer) > 30)) && ((index < (iAll.length + _local3))))){
if (index < iAll.length){
_local2 = (iAll[index] as OElement);
_local2.IsSelect = true;
};
if ((((index >= _local3)) && ((index < (iAll.length + _local3))))){
_local2 = (iAll[(index - _local3)] as OElement);
_local2.IsSelect = false;
};
index++;
iTimer = getTimer();
} else {
if (((((((getTimer() - iGlobalTimer) > 5000)) || (!((TwinzL.cLevelsConfig == null))))) && ((index >= (iAll.length + _local3))))){
this.State = stWaitForClear;
};
if ((getTimer() - iTimer) > 500){
index = 0;
iTimer = getTimer();
};
};
break;
case stWaitForClear:
if ((getTimer() - iGlobalTimer) < 5500){
break;
};
if ((getTimer() - iTimer) > 0){
this.State = stClear;
};
break;
case stClear:
if ((getTimer() - iTimer) > 0){
if (iAll.length > 0){
index = (Math.random() * iAll.length);
_local4 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local4, _local4.prX, (_local4.prY + 200), _local4.Speed, !(_local4.IsMove), OElementEvents.DELETE);
} else {
if (OInterfacePlatform.NumCHILDRENS() == 0){
this.State = stEnd;
};
};
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Rectangle;
iState = _arg1;
switch (iState){
case stPreShow:
for each (_local2 in iAll) {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
TwinzL.cFirstGame = true;
this.AddBanner(true, 800, 260);
break;
case stShow:
index = (iAll.length - 1);
iTimer = getTimer();
break;
case stAnimation:
index = 0;
iTimer = getTimer();
iGlobalTimer = getTimer();
for each (_local2 in iAll) {
_local2.addEventListener(Event.ENTER_FRAME, _local2.onEnterFrame);
};
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iTimer = getTimer();
break;
case stEnd:
this.prVisible = false;
break;
};
}
}
}//package RES.WINDOWS
Section 74
//OWEnterName (RES.WINDOWS.OWEnterName)
package RES.WINDOWS {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
import flash.ui.*;
public class OWEnterName extends OWindow {
private var iStartObject:Object;
private var iCancel:Array;
private var iSpriteName:Sprite;
private var iTimer:int;
private var iOldStr:String;
private var iAll:Array;
private var iName:String;
private var isActive:Boolean;// = true
private var iAccept:Array;
private var iTimerCursor:int;// = -1
private var index:int;// = 0
private var iInput:Array;
private var iAnimation:Boolean;// = false
private var iCursor:OElement;
private var iHasCancel:Boolean;
private var iInputS:Array;
private var iClearFirst:Boolean;// = false
private var iWindowName:Array;
public static const stWaitForClear:int = 3;
public static const stShow:int = 2;
public static const stNormal:int = 0;
public static const stClear:int = 4;
public static const stEnd:int = 5;
public static const stPreShow:int = 1;
public function OWEnterName(_arg1:Boolean=true){
iAnimation = false;
iOldStr = new String();
iTimerCursor = -1;
index = 0;
isActive = true;
iClearFirst = false;
this.iHasCancel = _arg1;
OInterfacePlatform.PARENT = this;
super(null);
this.State = stPreShow;
}
private function InputAction(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:Array;
var _local4:OElement;
var _local5:Rectangle;
var _local6:int;
var _local7:int;
var _local8:String;
var _local9:int;
var _local10:Array;
var _local11:int;
if (!OInterfacePlatform.ACTIVE){
return;
};
switch (_arg1.keyCode){
case Keyboard.BACKSPACE:
if (iClearFirst){
iClearFirst = false;
iCursor.iCordInPlatform.x = (iCursor.iCordInPlatform.x - (iStartObject.aSize * (iInput.length - 1)));
while (iInput.length > 1) {
_local4 = iInput.shift();
_local4.MoveAndDell(new Point(0, 1), 0);
};
_local3 = OInterfacePlatform.CordXY(iCursor.iCordInPlatform, iCursor);
if (iAnimation){
iCursor.MoveAndCall(_local3[0], _local3[1], -1);
} else {
iCursor.SetPos(_local3[0], _local3[1]);
};
(iCursor as OTextBlock).iTextSprite.alpha = 1;
iName = "";
};
_local2 = iInput.indexOf(iCursor);
if (_local2 == 0){
break;
};
iCursor.iCordInPlatform.x = (iCursor.iCordInPlatform.x - iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(iCursor.iCordInPlatform, iCursor);
if (iAnimation){
iCursor.MoveAndCall(_local3[0], _local3[1], -1);
} else {
iCursor.SetPos(_local3[0], _local3[1]);
};
_local4 = iInput[(_local2 - 1)];
_local4.MoveAndDell(new Point(0, 1), 0);
iInput[(_local2 - 1)] = null;
iInput.splice((_local2 - 1), 1);
_local7 = _local4.parent.getChildIndex(iInputS[0]);
_local4.parent.addChildAt(_local4, _local7);
iName = (iName.substr(0, (_local2 - 1)) + iName.substr(_local2, ((iName.length - _local2) - 1)));
_local6 = (_local2 + 1);
while (_local6 < iInput.length) {
_local4 = iInput[_local6];
_local4.iCordInPlatform.x = (_local4.iCordInPlatform.x - iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4);
if (iAnimation){
_local4.MoveAndCall(_local3[0], _local3[1], -1);
} else {
_local4.SetPos(_local3[0], _local3[1]);
};
_local6++;
};
break;
case Keyboard.DELETE:
if (iClearFirst){
iClearFirst = false;
iCursor.iCordInPlatform.x = (iCursor.iCordInPlatform.x - (iStartObject.aSize * (iInput.length - 1)));
while (iInput.length > 1) {
_local4 = iInput.shift();
_local4.MoveAndDell(new Point(0, 1), 0);
};
_local3 = OInterfacePlatform.CordXY(iCursor.iCordInPlatform, iCursor);
if (iAnimation){
iCursor.MoveAndCall(_local3[0], _local3[1], -1);
} else {
iCursor.SetPos(_local3[0], _local3[1]);
};
(iCursor as OTextBlock).iTextSprite.alpha = 1;
iName = "";
};
_local2 = iInput.indexOf(iCursor);
if (_local2 == (iInput.length - 1)){
break;
};
_local4 = iInput[(_local2 + 1)];
_local4.MoveAndDell(new Point(0, 1), 0);
iInput[(_local2 + 1)] = null;
iInput.splice((_local2 + 1), 1);
_local7 = _local4.parent.getChildIndex(iInputS[0]);
_local4.parent.addChildAt(_local4, _local7);
iName = (iName.substr(0, _local2) + iName.substr((_local2 + 1), ((iName.length - _local2) - 1)));
_local6 = (_local2 + 1);
while (_local6 < iInput.length) {
_local4 = iInput[_local6];
_local4.iCordInPlatform.x = (_local4.iCordInPlatform.x - iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4);
if (iAnimation){
_local4.MoveAndCall(_local3[0], _local3[1], -1);
} else {
_local4.SetPos(_local3[0], _local3[1]);
};
_local6++;
};
break;
case Keyboard.ENTER:
case Keyboard.NUMPAD_ENTER:
this.OnPress(null, this.iAccept);
break;
case Keyboard.ESCAPE:
if (this.iCancel != null){
this.OnPress(null, this.iCancel);
};
break;
case Keyboard.CAPS_LOCK:
case Keyboard.CONTROL:
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.SHIFT:
case Keyboard.INSERT:
break;
case Keyboard.HOME:
case Keyboard.END:
break;
case Keyboard.LEFT:
if (iClearFirst){
iClearFirst = false;
_local6 = 0;
while (_local6 < iInput.length) {
_local4 = iInput[_local6];
(_local4 as OTextBlock).iTextSprite.alpha = 1;
_local6++;
};
};
_local2 = iInput.indexOf(iCursor);
if (_local2 == 0){
break;
};
iCursor.iCordInPlatform.x = (iCursor.iCordInPlatform.x - iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(iCursor.iCordInPlatform, iCursor);
if (iAnimation){
iCursor.MoveAndCall(_local3[0], _local3[1], -1);
} else {
iCursor.SetPos(_local3[0], _local3[1]);
};
_local4 = iInput[(_local2 - 1)];
_local4.iCordInPlatform.x = (_local4.iCordInPlatform.x + iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4);
if (iAnimation){
_local4.MoveAndCall(_local3[0], _local3[1], -1);
} else {
_local4.SetPos(_local3[0], _local3[1]);
};
iInput[(_local2 - 1)] = iCursor;
iInput[_local2] = _local4;
iCursor.parent.swapChildren(iCursor, _local4);
break;
case Keyboard.RIGHT:
if (iClearFirst){
iClearFirst = false;
_local6 = 0;
while (_local6 < iInput.length) {
_local4 = iInput[_local6];
(_local4 as OTextBlock).iTextSprite.alpha = 1;
_local6++;
};
};
_local2 = iInput.indexOf(iCursor);
if (_local2 == (iInput.length - 1)){
break;
};
iCursor.iCordInPlatform.x = (iCursor.iCordInPlatform.x + iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(iCursor.iCordInPlatform, iCursor);
if (iAnimation){
iCursor.MoveAndCall(_local3[0], _local3[1], -1);
} else {
iCursor.SetPos(_local3[0], _local3[1]);
};
_local4 = iInput[(_local2 + 1)];
_local4.iCordInPlatform.x = (_local4.iCordInPlatform.x - iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4);
if (iAnimation){
_local4.MoveAndCall(_local3[0], _local3[1], -1);
} else {
_local4.SetPos(_local3[0], _local3[1]);
};
iInput[(_local2 + 1)] = iCursor;
iInput[_local2] = _local4;
iCursor.parent.swapChildren(iCursor, _local4);
break;
default:
if (iClearFirst){
iClearFirst = false;
iCursor.iCordInPlatform.x = (iCursor.iCordInPlatform.x - (iStartObject.aSize * (iInput.length - 1)));
while (iInput.length > 1) {
_local4 = iInput.shift();
_local4.MoveAndDell(new Point(0, 1), 0);
};
_local3 = OInterfacePlatform.CordXY(iCursor.iCordInPlatform, iCursor);
if (iAnimation){
iCursor.MoveAndCall(_local3[0], _local3[1], -1);
} else {
iCursor.SetPos(_local3[0], _local3[1]);
};
(iCursor as OTextBlock).iTextSprite.alpha = 1;
iName = "";
};
_local8 = String.fromCharCode(_arg1.charCode).toUpperCase();
if ((((((((((((((((((_local8 >= "A")) && ((_local8 <= "Z")))) || ((((_local8 >= "0")) && ((_local8 <= "9")))))) || ((_local8 == " ")))) || ((_local8 == "@")))) || ((_local8 == ".")))) || ((_local8 == "_")))) || ((_local8 == "\\")))) || ((_local8 == "-")))){
if (iInput.length == iInputS.length){
break;
};
_local2 = iInput.indexOf(iCursor);
_local9 = iStartObject.aShift;
iStartObject.aShift = (iStartObject.aShift + (iStartObject.aSize * _local2));
iStartObject.aStr = _local8;
_local10 = iStartObject.aFunction(iStartObject);
iStartObject.aShift = _local9;
iCursor.iCordInPlatform.x = (iCursor.iCordInPlatform.x + iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(iCursor.iCordInPlatform, iCursor);
if (iAnimation){
iCursor.MoveAndCall(_local3[0], _local3[1], -1);
} else {
iCursor.SetPos(_local3[0], _local3[1]);
};
_local11 = iCursor.parent.getChildIndex(iCursor);
iCursor.parent.addChildAt(_local10[0], (_local11 + 1));
iInput.splice(_local2, 0, _local10[0]);
_local4 = _local10[0];
_local5 = _local4.getBounds(OGlobal.prStage);
_local4.SetPos(_local4.prX, ((_local4.prY - _local5.y) - _local5.height));
_local3 = OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4);
_local4.MoveAndCall(_local3[0], _local3[1], -1);
iName = ((iName.substr(0, _local2) + _local8) + iName.substr(_local2, (iName.length - _local2)));
_local6 = (_local2 + 2);
while (_local6 < iInput.length) {
_local4 = iInput[_local6];
_local4.iCordInPlatform.x = (_local4.iCordInPlatform.x + iStartObject.aSize);
_local3 = OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4);
if (iAnimation){
_local4.MoveAndCall(_local3[0], _local3[1], -1);
} else {
_local4.SetPos(_local3[0], _local3[1]);
};
_local6++;
};
};
break;
};
Sort();
}
override public function Free():void{
super.Free();
OGlobal.prStage.removeEventListener(KeyboardEvent.KEY_DOWN, InputAction);
OGlobal.prStage.addEventListener(Event.ACTIVATE, OnActive);
OGlobal.prStage.addEventListener(Event.DEACTIVATE, OnDeactive);
}
private function GetAllArray():Array{
var _local1:Array;
_local1 = new Array();
if (iWindowName != null){
_local1 = _local1.concat(iWindowName);
};
if (iInputS != null){
_local1 = _local1.concat(iInputS);
};
if (iCancel != null){
_local1 = _local1.concat(iCancel);
};
if (iAccept != null){
_local1 = _local1.concat(iAccept);
};
return (_local1);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
var _local4:Array;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShow;
break;
case stShow:
_local2 = 0;
while (_local2 < 2) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
_local4 = OInterfacePlatform.CordXY(_local3.iCordInPlatform, _local3);
OInterfacePlatform.MOVE(_local3, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
index = iInputS.indexOf(_local3);
if (((!((index == -1))) && ((index < iInput.length)))){
_local3 = iInput[index];
_local4 = OInterfacePlatform.CordXY(_local3.iCordInPlatform, _local3);
OInterfacePlatform.MOVE(_local3, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
};
} else {
break;
};
_local2++;
};
if (OInterfacePlatform.ACTIVE){
this.State = stNormal;
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 500){
this.State = stClear;
};
break;
case stClear:
_local2 = 0;
while (_local2 < 2) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local3, _local3.prX, (_local3.prY + 200), _local3.Speed, !(_local3.IsMove), OElementEvents.DELETE);
index = iInputS.indexOf(_local3);
if (((!((index == -1))) && ((index < iInput.length)))){
_local3 = iInput[index];
OInterfacePlatform.MOVE(_local3, _local3.prX, (_local3.prY + 200), _local3.Speed, !(_local3.IsMove), OElementEvents.DELETE);
};
};
_local2++;
};
if ((((iAll.length <= 0)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
};
if (iTimerCursor == -1){
iTimerCursor = getTimer();
};
if (iCursor.IsMove){
iCursor.visible = true;
iTimerCursor = getTimer();
};
if (isActive == false){
iTimerCursor = getTimer();
};
if ((getTimer() - iTimerCursor) > 500){
iCursor.visible = !(iCursor.visible);
iTimerCursor = getTimer();
};
this.stage.focus = this;
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Rectangle;
iState = _arg1;
switch (iState){
case stPreShow:
iAll = GetAllArray();
for each (_local2 in iAll.concat(iInput)) {
if (_local2 == null){
} else {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
};
break;
case stShow:
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iAll = GetAllArray();
break;
case stEnd:
this.prVisible = false;
break;
};
}
override public function Init():void{
var _local1:Object;
var _local2:OElement;
var _local3:Array;
var _local4:OTextBlock;
super.Init();
if (!this.iHasCancel){
TwinzL.OWEnterNamePlatform[3].aShift = 0;
TwinzL.OWEnterNamePlatform[4].aAdd = false;
} else {
TwinzL.OWEnterNamePlatform[3].aShift = -35;
TwinzL.OWEnterNamePlatform[4].aAdd = true;
};
iName = (TwinzL.iGAME.prPlayerName) ? TwinzL.iGAME.prPlayerName : "";
TwinzL.OWEnterNamePlatform[1].aStr = (iName + "_");
iStartObject = TwinzL.OWEnterNamePlatform[1];
for each (_local1 in TwinzL.OWEnterNamePlatform) {
if (_local1.aAdd == false){
} else {
if (_local1.aVariable == null){
_local3 = _local1.aFunction(_local1);
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
};
};
};
if (iName != ""){
iClearFirst = true;
for each (_local4 in iInput) {
_local4.iTextSprite.alpha = 0.6;
};
};
for each (_local2 in iInputS.concat(iInput)) {
_local2.iRemoveEvent = false;
};
iCursor = iInput[(iInput.length - 1)];
OGlobal.prStage.addEventListener(KeyboardEvent.KEY_DOWN, InputAction);
OGlobal.prStage.focus = this;
Sort();
OGlobal.prStage.addEventListener(Event.ACTIVATE, OnActive);
OGlobal.prStage.addEventListener(Event.DEACTIVATE, OnDeactive);
}
public function set prName(_arg1:String):void{
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iAccept){
if (this.iName.length > 0){
OInterfacePlatform.AmplyClick(iAccept[0]);
if (iClearFirst == false){
TwinzL.iGAME.prPlayerName = this.iName;
TwinzL.cLastGame.aLevel = TwinzL.iGAME.prLevel;
};
this.State = stWaitForClear;
};
};
if (_arg2 == iCancel){
OInterfacePlatform.AmplyClick(iCancel[0]);
this.State = stWaitForClear;
};
}
public function get prName():String{
return ("");
}
private function Sort():void{
var _local1:int;
var _local2:int;
var _local3:DisplayObjectContainer;
var _local4:int;
_local1 = 0;
_local2 = 0;
_local3 = (iInputS[0] as OElement).parent;
_local4 = _local3.getChildIndex(iInputS[_local2]);
while (_local2 < iInputS.length) {
_local3.addChildAt(iInputS[_local2], _local4);
_local4++;
if (_local1 < iInput.length){
_local3.addChildAt(iInput[_local1], _local4);
_local4++;
};
_local2++;
_local1++;
};
}
private function OnActive(_arg1:Event):void{
isActive = true;
}
private function OnDeactive(_arg1:Event):void{
isActive = false;
iCursor.visible = false;
}
}
}//package RES.WINDOWS
Section 75
//OWGame (RES.WINDOWS.OWGame)
package RES.WINDOWS {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.GAME.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.GAME.*;
import ENGINE.CORE.*;
import flash.utils.*;
import ENGINE.AD.*;
import RES.*;
import RES.GAME.OLine.*;
import flash.net.*;
public class OWGame extends OWindow {
private var arrayPlatform:Array;
private var iField:OField;
private var iSound:Array;
private var iGameMode:Array;
private var iTimer:int;
private var arrayElements:Array;
private var iAll:Array;
private var iLevel:Array;
private var index:int;// = 0
private var countToMove:int;
private var levelsCount:int;
private var iPause:Array;
private var iGameModeStr:Array;
private var curLevel:int;
private var iGameName:Array;
private var iLinesLeft:OCCounter;
private var iMusic:Array;
private var indexField:int;// = 0
private var iCounter:OCCounter;
private var iPressToContinue:Array;
private var iWithoutName:Array;
private var countInFrame:int;
private var iSite:Array;
private var endNumClildrens:int;
private var iMenu:Array;
private var iLinesLeftStr:Array;
private var levelsData:Object;
private var iHitSprite:Sprite;
private var iCounterStr:Array;
private var iLinesLeftBtn:Array;
public static const stEnd:int = 17;
public static const stWaitForClearLevel:int = 5;
public static const stEndClearLevel:int = 7;
public static const stStartGame:int = 11;
public static const stShowElements:int = 10;
public static const stShowPlatform:int = 9;
public static const stPause:int = 18;
public static const stPreShowLevel:int = 1;
public static const stShowLevel:int = 2;
public static const stGameOver:int = 13;
public static const stNormal:int = 0;
public static const stWaitForClearGame:int = 14;
public static const stPreShowGame:int = 8;
public static const stHideField:int = 16;
public static const stClearLevel:int = 6;
public static const stPreLevelComplete:int = 19;
public static const stLevelComplete:int = 12;
public static const stClearGame:int = 15;
public function OWGame(){
indexField = 0;
index = 0;
OInterfacePlatform.PARENT = this;
iAll = new Array();
iWithoutName = new Array();
super(null);
this.State = stPreShowLevel;
}
private function InitPosition():void{
var _local1:Array;
var _local2:Array;
var _local3:OPlatform;
var _local4:Number;
var _local5:OElement;
_local2 = new Array();
for each (_local1 in arrayElements) {
_local2 = _local2.concat(_local1);
};
for each (_local1 in arrayPlatform) {
_local3 = _local1[0];
_local4 = ((_local1[4].y)>0) ? _local1[3].bottom : _local1[3].top;
_local4 = (_local4 + ((OGlobal.StageRect.height - OGlobal.ViewporRect.height) / 2));
_local3.y = (_local3.y - (_local1[4].y * _local4));
trace(_local3.y);
_local1.push(_local3.y);
};
countToMove = _local2.length;
for each (_local1 in _local2) {
_local5 = _local1[0];
_local4 = ((_local1[4].y)>0) ? _local1[3].bottom : _local1[3].top;
_local4 = (_local4 + (((OGlobal.StageRect.height - OGlobal.ViewporRect.height) / 2) + 50));
_local5.SetPos(_local5.prX, (_local5.prY - OGlobal.ToLocal((_local1[4].y * _local4))));
};
}
override public function Free():void{
if (iField != null){
iField.Free();
iField.removeEventListener(OField.EVENT_GAME_OVER, OnGameOver);
iField.removeEventListener(OField.EVENT_LEVEL_COMPLETE, OnLevelComplete);
this.removeChild(iField);
};
iHitSprite.removeEventListener(MouseEvent.CLICK, onMouseClick);
this.AddBanner(false);
super.Free();
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
}
private function GetAllArray():Array{
var _local1:Array;
_local1 = new Array();
if (iGameName != null){
_local1 = _local1.concat(iGameName);
};
if (iSite != null){
_local1 = _local1.concat(iSite);
};
if (iGameModeStr != null){
_local1 = _local1.concat(iGameModeStr);
};
if (iGameMode != null){
_local1 = _local1.concat(iGameMode);
};
if (iCounterStr != null){
_local1 = _local1.concat(iCounterStr);
};
if (iCounter != null){
_local1 = _local1.concat(iCounter);
};
if (iLinesLeftStr != null){
_local1 = _local1.concat(iLinesLeftStr);
};
if (iLinesLeft != null){
_local1 = _local1.concat(iLinesLeft);
};
if (iMusic != null){
_local1 = _local1.concat(iMusic);
};
if (iSound != null){
_local1 = _local1.concat(iSound);
};
if (iPause != null){
_local1 = _local1.concat(iPause);
};
if (iMenu != null){
_local1 = _local1.concat(iMenu);
};
if (iLinesLeftBtn != null){
_local1 = _local1.concat(iLinesLeftBtn);
};
return (_local1);
}
private function OnKeyDown(_arg1:KeyboardEvent):void{
}
private function OnNewLine(_arg1:OEvent):void{
var _local2:int;
_local2 = (OLine.LinesLeft - iLinesLeft.GetValue());
if (iLinesLeft != null){
if (_local2 != 0){
iLinesLeft.AddValue(_local2, true);
};
iLinesLeft.OnMouseOver();
if (State == stPause){
OInterfacePlatform.VISIBLE_OBJECT(iLinesLeft, false);
};
};
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:OElement;
var _local3:OPlatform;
var _local4:Number;
var _local5:OElement;
var _local6:int;
var _local7:Array;
var _local8:Array;
var _local9:OElement;
var _local10:int;
var _local11:Array;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShowLevel:
this.State = stShowLevel;
break;
case stShowLevel:
if ((getTimer() - iTimer) > 20){
if (index >= 0){
_local2 = (iAll[((iAll.length - index) - 1)] as OElement);
OInterfacePlatform.MOVE(_local2, OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[0], OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[1], -1, true, OElementEvents.ENDMOVE);
index--;
iTimer = getTimer();
} else {
if (OInterfacePlatform.ACTIVE){
this.State = stWaitForClearLevel;
};
};
};
break;
case stWaitForClearLevel:
if (TwinzL.cFirstGame){
if ((getTimer() - iTimer) > 500){
TwinzL.cFirstGame = false;
this.State = stClearLevel;
};
} else {
if ((getTimer() - iTimer) > 7000){
this.State = stClearLevel;
};
};
break;
case stClearLevel:
if ((getTimer() - iTimer) > 30){
if (iAll.length > 0){
index = (Math.random() * iAll.length);
_local5 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local5, _local5.prX, (_local5.prY + 200), _local5.Speed, !(_local5.IsMove), OElementEvents.DELETE);
} else {
if (OInterfacePlatform.NumCHILDRENS() == endNumClildrens){
this.State = stEndClearLevel;
};
};
};
break;
case stPreShowGame:
this.State = stShowPlatform;
break;
case stShowPlatform:
_local3 = arrayPlatform[indexField][0];
_local4 = ((getTimer() - iTimer) / 1000);
_local3.y = (_local3.y + ((arrayPlatform[indexField][4].y * 1000) * _local4));
iTimer = getTimer();
if (((arrayPlatform[indexField][2] - _local3.y) * arrayPlatform[indexField][4].y) < 0){
_local3.y = arrayPlatform[indexField][2];
indexField++;
if (indexField >= arrayPlatform.length){
this.State = stShowElements;
};
};
break;
case stShowElements:
if (indexField != -1){
_local6 = 0;
while (_local6 < countInFrame) {
indexField = 0;
for each (_local7 in arrayElements) {
if (_local7.length == 0){
if (indexField == 0){
indexField = -1;
};
} else {
indexField = 1;
_local8 = _local7.splice(0, 1)[0];
_local9 = _local8[0];
_local9.MoveAndCall(_local8[1], _local8[2], 1000, true, OElementEvents.ONPOS);
};
};
if (indexField == -1){
break;
};
_local6++;
};
iTimer = getTimer();
};
_local10 = 0;
while (_local10 < 3) {
if (index >= 0){
_local2 = (iAll[index] as OElement);
_local11 = OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2);
OInterfacePlatform.MOVE(_local2, _local11[0], _local11[1], -1, true, OElementEvents.ENDMOVE);
index--;
iTimer = getTimer();
};
_local10++;
};
if ((((((((((indexField == -1)) && ((index < 0)))) && ((countToMove == 0)))) && (OInterfacePlatform.ACTIVE))) && (((getTimer() - iTimer) > 1000)))){
this.State = stStartGame;
};
break;
case stWaitForClearGame:
if ((getTimer() - iTimer) > 500){
this.State = stClearGame;
};
break;
case stClearGame:
if (indexField < arrayPlatform.length){
_local3 = arrayPlatform[indexField][0];
_local4 = ((getTimer() - iTimer) / 1000);
_local3.alpha = (_local3.alpha - (3 * _local4));
iTimer = getTimer();
if (_local3.alpha <= 0){
_local3.alpha = 0;
indexField++;
};
};
_local10 = 0;
while (_local10 < 3) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local5 = (iAll.splice(index, 1)[0] as OElement);
if ((((_local5 is OTextBlock)) && (((_local5 as OTextBlock).object is OCCounter)))){
((_local5 as OTextBlock).object as OCCounter).FreeRegister(_local5);
} else {
OInterfacePlatform.MOVE(_local5, _local5.prX, (_local5.prY + 200), _local5.Speed, !(_local5.IsMove), OElementEvents.DELETE);
};
};
_local10++;
};
if ((((indexField >= arrayPlatform.length)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:int;
var _local4:Rectangle;
iState = _arg1;
switch (iState){
case stPreShowLevel:
for each (_local2 in iAll) {
_local4 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local4.y + _local4.height))));
};
break;
case stShowLevel:
index = (iAll.length - 1);
iTimer = getTimer();
break;
case stWaitForClearLevel:
iTimer = getTimer();
break;
case stClearLevel:
if (TwinzL.cLevelsConfig){
};
endNumClildrens = (OInterfacePlatform.NumCHILDRENS() - iAll.length);
iTimer = getTimer();
break;
case stEndClearLevel:
this.AddBanner(false);
if (TwinzL.cLevelsConfig == null){
(this.parent as Twinz).OnPress(null, TwinzL.miMenu);
this.prVisible = false;
} else {
this.State = stPreShowGame;
};
break;
case stPreShowGame:
InitPosition();
iAll = GetAllArray();
for each (_local2 in iAll) {
_local4 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local4.y + _local4.height))));
};
OInterfacePlatform.VISIBLE_OBJECT(iAll, true);
if (iCounter != null){
iCounter.StartValue(iCounter.GetValue());
};
if (iLinesLeft != null){
iLinesLeft.StartValue(iLinesLeft.GetValue(), true);
};
break;
case stShowPlatform:
if (iField != null){
iField.visible = true;
iTimer = getTimer();
indexField = 0;
};
break;
case stShowElements:
countInFrame = int((countToMove / 25));
if (countInFrame == 0){
countInFrame = 1;
};
iTimer = getTimer();
this.addEventListener(OElementEvents.ONPOS, OnONPOS);
index = (iAll.length - 1);
indexField = 0;
break;
case stStartGame:
this.removeEventListener(OElementEvents.ONPOS, OnONPOS);
iField.Start();
ORecordGame.Start();
OSound.PlaySoundInd(OMusic.OSGameStartInd);
this.State = stNormal;
break;
case stGameOver:
case stLevelComplete:
_local3 = iCounter.GetValue();
TwinzL.iGAME.Write(OGame.catTmp, "GameOver", ((iState)==stGameOver) ? "1" : "0");
TwinzL.iGAME.Write(OGame.catTmp, "Score", _local3);
TwinzL.iGAME.Write(OGame.catTmp, "Result", ((iState)==stGameOver) ? 0 : _local3);
(this.parent as Twinz).OnPress(null, TwinzL.miResults);
this.State = stWaitForClearGame;
break;
case stWaitForClearGame:
iTimer = getTimer();
break;
case stClearGame:
iAll = GetAllArray();
iAll = iPressToContinue.concat(iAll);
indexField = 0;
index = 0;
iTimer = getTimer();
break;
case stHideField:
index = 0;
iTimer = getTimer();
break;
case stEnd:
this.prVisible = false;
break;
};
}
private function CreateNewLevel(_arg1:Object, _arg2:Object):void{
if ((((((_arg1 == null)) || ((_arg2.Platform == null)))) || ((_arg2.Colors == null)))){
return;
};
OElementColor.COLORS = _arg2.Colors;
iField = new OField(_arg1.sizeY, _arg2.Platform.sizeX, _arg2.Platform.sizeY, _arg2.Line, _arg2.Platform.startX, _arg2.Bonus);
iField.x = _arg1.posX;
iField.y = _arg1.posY;
iField.addEventListener(OField.EVENT_GAME_OVER, OnGameOver);
iField.addEventListener(OField.EVENT_LEVEL_COMPLETE, OnLevelComplete);
this.addChild(iField);
}
private function OnGameOver(_arg1:OEvent):void{
if (_arg1.IsFinish()){
return;
};
this.State = stGameOver;
OSound.PlaySoundInd(OMusic.OSOopsInd);
}
private function AddBanner(_arg1:Boolean, _arg2:int=0, _arg3:int=0):void{
if (TwinzL.sDebug == true){
return;
};
if (((OAdBanners.iBBanner) && (OAdBanners.iTBanner))){
if (_arg1){
OAdBanners.AddTBanner(OGlobal.prStage, 0, 0, _arg2, _arg3);
OAdBanners.AddBBanner(OGlobal.prStage, 0, (600 - _arg3), _arg2, _arg3);
} else {
OAdBanners.RemoveTBanner(OGlobal.prStage);
OAdBanners.RemoveBBanner(OGlobal.prStage);
};
};
}
private function OnPreLevelComplete(_arg1:OEvent):void{
this.State = stPreLevelComplete;
OInterfacePlatform.ACTIVE = false;
}
private function onMouseClick(_arg1:Event):void{
State = stNormal;
OField.Pause(false);
iField.visible = true;
OInterfacePlatform.VISIBLE_OBJECT(iPressToContinue, false);
iCounter.SetValue(iCounter.GetValue());
iLinesLeft.SetValue(iLinesLeft.GetValue());
iHitSprite.visible = false;
}
private function OnLevelComplete(_arg1:OEvent):void{
if (_arg1.IsFinish()){
return;
};
this.State = stLevelComplete;
}
override public function Init():void{
super.Init();
if (TwinzL.cFirstGame){
this.realInit();
} else {
this.realInit();
this.AddBanner(true, 800, 260);
};
}
private function OnONPOS(_arg1:OEvent):void{
_arg1.Finish();
countToMove--;
}
override public function OnPress(_arg1:Event, _arg2):void{
var aEvent = _arg1;
var aObject = _arg2;
if (aObject == iMenu){
iField.Stop();
OInterfacePlatform.AmplyClick(iMenu[0]);
(this.parent as Twinz).OnPress(null, TwinzL.miMenu);
this.State = stWaitForClearGame;
};
if (aObject == iPause){
if (State == stNormal){
State = stPause;
OField.Pause(true);
iField.visible = false;
OInterfacePlatform.VISIBLE_OBJECT(iCounter, false);
OInterfacePlatform.VISIBLE_OBJECT(iLinesLeft, false);
OInterfacePlatform.VISIBLE_OBJECT(iPressToContinue, true);
iHitSprite.visible = true;
};
};
if (aObject == iSite){
try {
navigateToURL(new URLRequest(TwinzL.sURLSite));
} catch(error:Error) {
};
return;
};
}
private function OnAddScore(_arg1:OEvent):void{
if (_arg1.IsFinish()){
return;
};
_arg1.Finish();
if (iCounter != null){
iCounter.AddValue(((10 * _arg1.EventObject.s) + (5 * _arg1.EventObject.b)));
if (State == stPause){
OInterfacePlatform.VISIBLE_OBJECT(iCounter, false);
};
};
}
private function realInit():void{
var _local1:Object;
var _local2:Object;
var _local3:Object;
var _local4:Array;
TwinzL.OWLevelPlatform[0].aStr = ((TwinzL.strLevel + " ") + int((TwinzL.iGAME.prLevel + 1)));
for each (_local1 in ((TwinzL.cLevelsConfig)==null) ? TwinzL.OWErrorLoadPlatform : TwinzL.OWLevelPlatform) {
if (_local1.aVariable == null){
iAll = iAll.concat(_local1.aFunction(_local1));
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
iAll = iAll.concat(this[_local1.aVariable]);
};
};
if (TwinzL.cLevelsConfig != null){
_local2 = TwinzL.cLevelsConfig.Field;
_local3 = TwinzL.cLevelsConfig.Levels[TwinzL.iGAME.prLevel];
OPlatform.amplyLock = (_local3.amplyLock as Boolean);
for each (_local1 in TwinzL.OWGamePlatform) {
if (_local1.aAdd == false){
} else {
if (_local1.aVariable == null){
_local4 = _local1.aFunction(_local1);
iWithoutName = iWithoutName.concat(_local4);
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
};
};
};
if (iCounter != null){
iCounter.StartValue(0);
OInterfacePlatform.VISIBLE_OBJECT(iCounter, false);
};
OGlobalRandom.SetSeed(0);
ORecordGame.Init();
if (_local3.CustomP != null){
OGlobalRandom.SetCustomP(_local3.CustomP);
};
OElementColor.COLORS = _local3.Colors;
iField = new OField(_local2.sizeY, _local3.Platform.sizeX, _local3.Platform.sizeY, _local3.Line, _local3.Platform.startX, _local3.Bonus, false, _local3.HoleMap);
iField.y = OGlobal.ToGlobal(_local2.posY);
iField.x = OGlobal.ToGlobal(((800 / 2) - OGlobal.ToLocal((iField.width / 2))));
iField.addEventListener(OField.EVENT_GAME_OVER, OnGameOver);
iField.addEventListener(OField.EVENT_LEVEL_COMPLETE, OnLevelComplete);
iField.addEventListener(OField.EVENT_INSIDE_LEVEL_COMPLETE, OnPreLevelComplete);
iField.visible = false;
this.addChild(iField);
ORecordGame.SetField(iField);
arrayPlatform = iField.GetArrayPlatformToMove();
arrayElements = iField.GetArrayElementsToMove();
if (iLinesLeft != null){
iLinesLeft.StartValue(OLine.LinesLeft, true);
OInterfacePlatform.VISIBLE_OBJECT(iLinesLeft, false);
};
this.addEventListener(OLine.EVENT_NEW_LINE, OnNewLine);
this.addEventListener(OPlatform.EVENT_ADD_SCORE, OnAddScore);
iHitSprite = new Sprite();
iHitSprite.graphics.beginFill(0);
iHitSprite.graphics.drawRect(0, 0, (800 * OGlobal.Scale), (600 * OGlobal.Scale));
iHitSprite.alpha = 0;
iHitSprite.visible = false;
iHitSprite.buttonMode = true;
iHitSprite.addEventListener(MouseEvent.CLICK, onMouseClick);
this.addChild(iHitSprite);
};
}
}
}//package RES.WINDOWS
Section 76
//OWGameModeWindow (RES.WINDOWS.OWGameModeWindow)
package RES.WINDOWS {
import flash.events.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.GAME.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
public class OWGameModeWindow extends OWindow {
private var iWindowName:Array;
private var iPuzzle:Array;
private var iStrategy:Array;
private var iTimer:int;
private var iAll:Array;
private var index2:int;// = 0
private var index:int;// = 0
private var iArcade:Array;
private var iAdventure:Array;
private var iBack:Array;
public static const stShow:int = 2;
public static const stNormal:int = 0;
public static const stEnd:int = 7;
public static const stClear:int = 6;
public static const stWaitForClear:int = 5;
public static const stShowGameName:int = 4;
public static const stShowPresent:int = 3;
public static const stPreShow:int = 1;
public function OWGameModeWindow(){
index = 0;
index2 = 0;
OInterfacePlatform.PARENT = this;
iAll = new Array();
super(null);
this.State = stPreShow;
}
override public function Init():void{
var _local1:Object;
super.Init();
for each (_local1 in TwinzL.OWGameModeWindowPlatform) {
if (_local1.aVariable == null){
iAll = iAll.concat(_local1.aFunction(_local1));
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
iAll = iAll.concat(this[_local1.aVariable]);
};
};
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iAdventure){
TwinzL.cGameMode = OGameMode.ADVENTURE;
};
if (_arg2 == iArcade){
TwinzL.cGameMode = OGameMode.ARCADE;
};
if (_arg2 == iPuzzle){
TwinzL.cGameMode = OGameMode.PUZZLE;
};
if (_arg2 == iStrategy){
TwinzL.cGameMode = OGameMode.STRATEGY;
};
if (_arg2 == iBack){
(this.parent as Twinz).OnPress(null, TwinzL.miMenu);
};
if ((((((((_arg2 == iAdventure)) || ((_arg2 == iArcade)))) || ((_arg2 == iPuzzle)))) || ((_arg2 == iStrategy)))){
TwinzL.cLastGame.aGameMode = TwinzL.cGameMode;
TwinzL.cLastGame.aLevel = -1;
};
TwinzL.cLastGame.aGameMode = TwinzL.cGameMode;
OInterfacePlatform.AmplyClick(_arg2[0]);
this.State = stWaitForClear;
}
private function GetAllArray():Array{
var _local1:Array;
_local1 = new Array();
if (iWindowName != null){
_local1 = _local1.concat(iWindowName);
};
if (iAdventure != null){
_local1 = _local1.concat(iAdventure);
};
if (iArcade != null){
_local1 = _local1.concat(iArcade);
};
if (iStrategy != null){
_local1 = _local1.concat(iStrategy);
};
if (iPuzzle != null){
_local1 = _local1.concat(iPuzzle);
};
if (iBack != null){
_local1 = _local1.concat(iBack);
};
return (_local1);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
var _local4:Array;
var _local5:OElement;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShow;
break;
case stShow:
_local2 = 0;
while (_local2 < 1) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
_local4 = OInterfacePlatform.CordXY(_local3.iCordInPlatform, _local3);
OInterfacePlatform.MOVE(_local3, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
} else {
break;
};
_local2++;
};
if (OInterfacePlatform.ACTIVE){
this.State = stNormal;
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 500){
this.State = stClear;
};
break;
case stClear:
_local2 = 0;
while (_local2 < 1) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local5 = (iAll.splice(index, 1)[0] as OElement);
if ((_local5 as OTextBlock).object.length > 0){
OInterfacePlatform.MOVE(_local5, _local5.prX, (_local5.prY + 200), _local5.Speed, !(_local5.IsMove), OElementEvents.DELETE);
};
};
_local2++;
};
if ((((iAll.length <= 0)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Rectangle;
iState = _arg1;
switch (iState){
case stPreShow:
iAll = GetAllArray();
for each (_local2 in iAll) {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
break;
case stShow:
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iAll = GetAllArray();
break;
case stEnd:
this.prVisible = false;
break;
};
}
}
}//package RES.WINDOWS
Section 77
//OWHighScores (RES.WINDOWS.OWHighScores)
package RES.WINDOWS {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.GAME.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.GAME.*;
import ENGINE.CORE.*;
import flash.utils.*;
import RES.*;
public class OWHighScores extends ODialog {
private var iLocalName:Array;
private var iPersonalArray:Array;
private var iPersonalScore:Array;
private var iTimer:int;
private var iLocalStr:Array;
private var iAll:Array;
private var flagNext:Boolean;
private var index:int;// = 0
private var iBtnLPersonal:Array;
private var iBtnRPersonal:Array;
private var iLocalArray:Array;
private var iShow:Array;
private var iLocalScore:Array;
private var iDirection:int;// = 1
private var iBtnRLocal:Array;
private var iHide:Array;
private var iClear:Array;
private var iMenu:Array;
private var iBtnLLocal:Array;
private var iPersonalStr:Array;
private var iWindowName:Array;
private var iPersonalName:Array;
public static const stWaitForClear:int = 3;
public static const stShow:int = 2;
public static const stNormal:int = 0;
public static const stHidePersonalShowLocal:int = 7;
public static const stClear:int = 4;
public static const stEnd:int = 5;
public static const stHideLocalShowPersonal:int = 6;
public static const stPreShow:int = 1;
public static var isLocal:Boolean = true;
public function OWHighScores(){
iDirection = 1;
index = 0;
OInterfacePlatform.PARENT = this;
iLocalArray = new Array();
iPersonalArray = new Array();
iLocalName = null;
iLocalScore = null;
iPersonalName = null;
iPersonalScore = null;
super(null);
this.State = stPreShow;
}
private function GetAllArray():Array{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local1 = _local1.concat(iWindowName);
if (isLocal){
for each (_local2 in iLocalArray) {
_local1 = _local1.concat(_local2);
};
} else {
for each (_local2 in iPersonalArray) {
_local1 = _local1.concat(_local2);
};
};
_local1 = _local1.concat(iMenu).concat(iClear);
return (_local1);
}
private function GetArrayToAnimation(_arg1:Array):Array{
var _local2:Array;
var _local3:Array;
var _local4:Array;
_local2 = new Array();
for each (_local3 in _arg1) {
_local4 = new Array();
_local4 = _local4.concat(_local3);
_local2.push(_local4);
};
return (_local2);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
var _local4:Array;
var _local5:Array;
var _local6:OElement;
var _local7:Rectangle;
var _local8:Array;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShow;
break;
case stShow:
_local2 = 0;
while (_local2 < 4) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
_local4 = OInterfacePlatform.CordXY(_local3.iCordInPlatform, _local3);
OInterfacePlatform.MOVE(_local3, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
} else {
break;
};
_local2++;
};
if (OInterfacePlatform.ACTIVE){
this.State = stNormal;
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 500){
this.State = stClear;
};
break;
case stClear:
_local2 = 0;
while (_local2 < 4) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local3, _local3.prX, (_local3.prY + 200), (_local3.IsMove) ? _local3.Speed : 500, !(_local3.IsMove), OElementEvents.DELETE);
};
_local2++;
};
if ((((iAll.length <= 0)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
case stHideLocalShowPersonal:
case stHidePersonalShowLocal:
index = -1;
if (flagNext == false){
for each (_local5 in iHide) {
if (_local5.length == 0){
} else {
index = ((iDirection)>0) ? (_local5.length - 1) : 0;
_local6 = (_local5.splice(index, 1)[0] as OElement);
_local7 = _local6.getBounds(OGlobal.prStage);
if (iDirection > 0){
OInterfacePlatform.MOVE(_local6, (_local6.prX + OGlobal.ToLocal((OGlobal.prStage.stageWidth - _local7.x))), _local6.prY, -1, true, OElementEvents.ENDMOVE);
} else {
OInterfacePlatform.MOVE(_local6, (_local6.prX - OGlobal.ToLocal((_local7.x + _local7.width))), _local6.prY, -1, true, OElementEvents.ENDMOVE);
};
};
};
if (index == -1){
flagNext = true;
CUtils.ClearArray(iHide);
};
} else {
_local5 = null;
for each (_local5 in iShow) {
if (_local5.length == 0){
} else {
index = ((iDirection)>0) ? (_local5.length - 1) : 0;
_local6 = (_local5.splice(index, 1)[0] as OElement);
_local8 = OInterfacePlatform.CordXY(_local6.iCordInPlatform, _local6);
OInterfacePlatform.MOVE(_local6, _local8[0], _local8[1], -1, true, OElementEvents.ENDMOVE);
};
};
if (index == -1){
CUtils.ClearArray(iShow);
};
};
if ((((((iHide.length <= 0)) && ((iShow.length <= 0)))) && (OInterfacePlatform.ACTIVE))){
this.State = stNormal;
Sprite(this.iBtnLLocal[0]).mouseEnabled = true;
Sprite(this.iBtnRLocal[0]).mouseEnabled = true;
Sprite(this.iBtnLPersonal[0]).mouseEnabled = true;
Sprite(this.iBtnRPersonal[0]).mouseEnabled = true;
isLocal = !(isLocal);
iHide = null;
iShow = null;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Array;
var _local4:Rectangle;
var _local5:Array;
iState = _arg1;
switch (iState){
case stPreShow:
iAll = GetAllArray();
for each (_local2 in iAll) {
_local4 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local4.y + _local4.height))));
};
break;
case stShow:
iTimer = getTimer();
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iAll = GetAllArray();
_local3 = (isLocal) ? iPersonalArray : iLocalArray;
for each (_local5 in _local3) {
for each (_local2 in _local5) {
_local2.dispatchEvent(new OEvent(OElementEvents.FREE));
};
};
break;
case stEnd:
this.prVisible = false;
break;
case stHideLocalShowPersonal:
iHide = GetArrayToAnimation(iLocalArray);
iShow = GetArrayToAnimation(iPersonalArray);
InitPreAnimation(iShow);
flagNext = false;
break;
case stHidePersonalShowLocal:
iHide = GetArrayToAnimation(iPersonalArray);
iShow = GetArrayToAnimation(iLocalArray);
InitPreAnimation(iShow);
flagNext = false;
break;
};
}
override public function Init():void{
var _local1:OScoreParams;
var _local2:int;
var _local3:Array;
var _local4:Object;
var _local5:Array;
super.Init();
_local2 = 0;
while (_local2 < 5) {
_local1 = TwinzL.iGAME.GetLocalScores(0, _local2);
if (_local1 != null){
TwinzL.OWHighScores[(7 + (2 * _local2))].aAdd = true;
TwinzL.OWHighScores[(7 + (2 * _local2))].aStr = _local1.iName;
TwinzL.OWHighScores[((7 + (2 * _local2)) + 1)].aAdd = true;
TwinzL.OWHighScores[((7 + (2 * _local2)) + 1)].aStr = _local1.iScore.toString();
} else {
TwinzL.OWHighScores[(7 + (2 * _local2))].aAdd = false;
TwinzL.OWHighScores[((7 + (2 * _local2)) + 1)].aAdd = false;
};
_local1 = TwinzL.iGAME.GetPersonalScores(0, _local2);
if (_local1 != null){
TwinzL.OWHighScores[(17 + (2 * _local2))].aAdd = true;
TwinzL.OWHighScores[(17 + (2 * _local2))].aStr = _local1.iName;
TwinzL.OWHighScores[((17 + (2 * _local2)) + 1)].aAdd = true;
TwinzL.OWHighScores[((17 + (2 * _local2)) + 1)].aStr = _local1.iScore.toString();
} else {
TwinzL.OWHighScores[(17 + (2 * _local2))].aAdd = false;
TwinzL.OWHighScores[((17 + (2 * _local2)) + 1)].aAdd = false;
};
_local2++;
};
for each (_local4 in TwinzL.OWHighScores) {
if (_local4.aAdd == false){
} else {
if (_local4.aVariable == null){
_local5 = _local4.aFunction(_local4);
} else {
this[_local4.aVariable] = _local4.aFunction(_local4);
};
if (iLocalName != null){
_local3 = new Array();
_local3 = _local3.concat(iLocalName);
iLocalArray.push(_local3);
iLocalName = null;
};
if (iLocalScore != null){
if (iLocalArray.length == 0){
_local3 = new Array();
} else {
_local3 = iLocalArray.pop();
};
_local3 = _local3.concat(iLocalScore);
iLocalArray.push(_local3);
iLocalScore = null;
};
if (iPersonalName != null){
_local3 = new Array();
_local3 = _local3.concat(iPersonalName);
iPersonalArray.push(_local3);
iPersonalName = null;
};
if (iPersonalScore != null){
if (iPersonalArray.length == 0){
_local3 = new Array();
} else {
_local3 = iPersonalArray.pop();
};
_local3 = _local3.concat(iPersonalScore);
iPersonalArray.push(_local3);
iPersonalScore = null;
};
};
};
iLocalArray.unshift(iBtnLLocal.concat(iLocalStr).concat(iBtnRLocal));
iPersonalArray.unshift(iBtnLPersonal.concat(iPersonalStr).concat(iBtnRPersonal));
if (isLocal){
InitPreAnimation(iPersonalArray);
} else {
InitPreAnimation(iLocalArray);
};
}
private function InitPreAnimation(_arg1:Array):void{
var _local2:Array;
var _local3:OElement;
var _local4:Rectangle;
for each (_local2 in _arg1) {
for each (_local3 in _local2) {
_local4 = _local3.getBounds(OGlobal.prStage);
if (iDirection > 0){
_local3.SetPos((_local3.prX - OGlobal.ToLocal((_local4.x + _local4.width))), _local3.prY);
} else {
_local3.SetPos((_local3.prX + OGlobal.ToLocal((OGlobal.prStage.stageWidth - _local4.x))), _local3.prY);
};
};
};
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iMenu){
OInterfacePlatform.AmplyClick(iMenu[0]);
(this.parent as Twinz).OnPress(null, TwinzL.miMenu);
this.State = stWaitForClear;
};
if ((((_arg2 == iBtnLLocal)) || ((_arg2 == iBtnLPersonal)))){
Sprite(this.iBtnLLocal[0]).mouseEnabled = false;
Sprite(this.iBtnRLocal[0]).mouseEnabled = false;
Sprite(this.iBtnLPersonal[0]).mouseEnabled = false;
Sprite(this.iBtnRPersonal[0]).mouseEnabled = false;
iDirection = -1;
if (isLocal){
this.State = stHideLocalShowPersonal;
} else {
this.State = stHidePersonalShowLocal;
};
};
if ((((_arg2 == iBtnRLocal)) || ((_arg2 == iBtnRPersonal)))){
Sprite(this.iBtnLLocal[0]).mouseEnabled = false;
Sprite(this.iBtnRLocal[0]).mouseEnabled = false;
Sprite(this.iBtnLPersonal[0]).mouseEnabled = false;
Sprite(this.iBtnRPersonal[0]).mouseEnabled = false;
iDirection = 1;
if (isLocal){
this.State = stHideLocalShowPersonal;
} else {
this.State = stHidePersonalShowLocal;
};
};
if (_arg2 == iClear){
OInterfacePlatform.AmplyClick(iClear[0]);
(this.parent as Twinz).OnPress(null, TwinzL.miDeleteScoresConfirm);
this.State = stWaitForClear;
};
}
}
}//package RES.WINDOWS
Section 78
//OWInstruction (RES.WINDOWS.OWInstruction)
package RES.WINDOWS {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.GAME.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
import RES.GAME.OLine.*;
public class OWInstruction extends OWindow {
private var iField:OField;
private var iRecord:Boolean;
private var iCurAction:Object;
private var iActions:Array;
private var iTimer:int;
private var iAll:Array;
private var iName:Array;
private var index:int;
private var iTimerCursor:int;
private var iBack:Array;
private var iBonusText1:Array;
private var iBonusText3:Array;
private var iBonusText4:Array;
private var iCursor:Sprite;
private var iPos:int;
private var iBonusText2:Array;
private var iBonus:Array;
private var iText:Array;
private var iVecMoveCursor:Point;
private var iWithoutName:Array;
private var iBonusText:Array;
private var iAllText:Array;
private var iBorder:Array;
public static const stWaitForClear:int = 3;
public static const stShow:int = 2;
public static const stAction:int = 7;
public static const stNormal:int = 0;
public static const stClear:int = 4;
public static const stEndAction:int = 8;
public static const stStartAction:int = 6;
public static const stEnd:int = 5;
public static const stPreShow:int = 1;
public function OWInstruction(){
iVecMoveCursor = new Point();
OInterfacePlatform.PARENT = this;
iAll = new Array();
iWithoutName = new Array();
iBonus = new Array();
super(null);
this.State = stPreShow;
}
override public function Free():void{
super.Free();
if (iField != null){
iField.removeChild(iCursor);
iField.Free();
iField = null;
};
}
private function GetAllArray():Array{
var _local1:Array;
_local1 = new Array();
if (iName){
_local1 = _local1.concat(iName);
};
if (iBorder){
_local1 = _local1.concat(iBorder);
};
if (iText){
_local1 = _local1.concat(iText);
};
_local1.push(iBonus[0]);
_local1.push(iBonus[1]);
_local1.push(iBonus[2]);
_local1.push(iBonus[3]);
if (iBonusText1){
_local1 = _local1.concat(iBonusText1);
};
if (iBonusText4){
_local1 = _local1.concat(iBonusText4);
};
_local1.push(iBonus[6]);
_local1.push(iBonus[4]);
_local1.push(iBonus[5]);
if (iBonusText2){
_local1 = _local1.concat(iBonusText2);
};
if (iBonusText3){
_local1 = _local1.concat(iBonusText3);
};
if (iBonusText){
_local1 = _local1.concat(iBonusText);
};
if (iBack){
_local1 = _local1.concat(iBack);
};
return (_local1);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
var _local4:Array;
switch (iState){
case stNormal:
break;
case stStartAction:
if (iRecord){
this.State = stNormal;
} else {
this.State = stAction;
};
break;
case stAction:
iCursor.x = (iCursor.x + (iVecMoveCursor.x * (getTimer() - iTimerCursor)));
iCursor.y = (iCursor.y + (iVecMoveCursor.y * (getTimer() - iTimerCursor)));
iTimerCursor = getTimer();
if ((getTimer() - iTimer) >= iCurAction.aTime){
iCursor.x = OGlobal.ToGlobal(iCurAction.aMouseX);
iCursor.y = OGlobal.ToGlobal(iCurAction.aMouseY);
iField.DemoAction(iCurAction.aType, iCurAction.aPlatform, new Point(iCurAction.aCordX, iCurAction.aCordY));
if (iPos >= iActions.length){
this.State = stEndAction;
} else {
iCurAction = iActions[iPos++];
iVecMoveCursor.x = ((OGlobal.ToGlobal(iCurAction.aMouseX) - iCursor.x) / iCurAction.aTime);
iVecMoveCursor.y = ((OGlobal.ToGlobal(iCurAction.aMouseY) - iCursor.y) / iCurAction.aTime);
iTimer = getTimer();
};
};
break;
case stEndAction:
if ((getTimer() - iTimer) > 5000){
iField.removeChild(iCursor);
iField.Free();
this.removeChild(iField);
iField = null;
this.State = stStartAction;
};
break;
case stPreShow:
this.State = stShow;
break;
case stShow:
_local2 = 0;
while (_local2 < 1) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
_local4 = OInterfacePlatform.CordXY(_local3.iCordInPlatform, _local3);
OInterfacePlatform.MOVE(_local3, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
} else {
break;
};
_local2++;
};
if (OInterfacePlatform.ACTIVE){
this.State = stStartAction;
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 300){
this.State = stClear;
};
break;
case stClear:
_local2 = 0;
while (_local2 < 1) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local3, _local3.prX, (_local3.prY + 200), _local3.Speed, !(_local3.IsMove), OElementEvents.DELETE);
};
_local2++;
};
if (OInterfacePlatform.NumCHILDRENS() == 0){
this.State = stEnd;
};
break;
default:
break;
};
}
private function GetAllTextArray():Array{
var _local1:Array;
_local1 = new Array();
if (iText != null){
_local1 = _local1.concat(iText);
};
if (iBonusText != null){
_local1 = _local1.concat(iBonusText);
};
if (iBonusText1 != null){
_local1 = _local1.concat(iBonusText1);
};
if (iBonusText2 != null){
_local1 = _local1.concat(iBonusText2);
};
if (iBonusText3 != null){
_local1 = _local1.concat(iBonusText3);
};
if (iBonusText4 != null){
_local1 = _local1.concat(iBonusText4);
};
return (_local1);
}
private function onGameOver(_arg1:Event):void{
var _local2:String;
this.removeEventListener(OField.EVENT_GAME_OVER, onGameOver);
this.removeEventListener(OField.EVENT_LEVEL_COMPLETE, onGameOver);
_local2 = ORecordGame.ConvertArrayToString();
this.prVisible = false;
}
override public function set State(_arg1:int):void{
var _local2:Object;
var _local3:Rectangle;
var _local4:OElement;
iState = _arg1;
switch (iState){
case stNormal:
break;
case stStartAction:
iPos = 0;
iCursor.x = 0;
iCursor.y = 0;
iVecMoveCursor.x = 0;
iVecMoveCursor.y = 0;
OGlobalRandom.SetSeed(1);
_local2 = new Object();
_local2.click = 1;
_local2.block = 2;
_local2.blockMin = int.MAX_VALUE;
_local2.blockMax = int.MAX_VALUE;
_local2.count = 6;
_local2.cls = ODiscreteLine;
_local2.gameMode = OGameMode.STRATEGY;
iField = new OField(300, 8, 6, _local2, 3, null, !(iRecord));
iField.x = OGlobal.ToGlobal(80);
iField.y = OGlobal.ToGlobal(125);
this.addChild(iField);
_local3 = iField.getRect(OGlobal.prStage);
OElement.StageRect = _local3;
iField.Start();
if (iRecord){
ORecordGame.Start();
};
iField.addChild(iCursor);
break;
case stAction:
iCurAction = iActions[iPos++];
iVecMoveCursor.x = ((OGlobal.ToGlobal(iCurAction.aMouseX) - iCursor.x) / iCurAction.aTime);
iVecMoveCursor.y = ((OGlobal.ToGlobal(iCurAction.aMouseY) - iCursor.y) / iCurAction.aTime);
iTimer = getTimer();
iTimerCursor = getTimer();
break;
case stEndAction:
trace("stEndAction");
iTimer = getTimer();
break;
case stPreShow:
iAll = GetAllArray();
for each (_local4 in iAll) {
_local3 = _local4.getBounds(OGlobal.prStage);
_local4.SetPos(_local4.prX, (_local4.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
break;
case stShow:
index = (iAll.length - 1);
iTimer = getTimer();
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iAll = GetAllArray();
iTimer = getTimer();
OElement.StageRect = OGlobal.StageRect;
iField.Free();
this.removeChild(iField);
iField = null;
ORecordGame.Stop();
break;
case stEnd:
this.prVisible = false;
break;
default:
break;
};
}
override public function Init():void{
var _local1:Object;
var _local2:int;
var _local3:int;
var _local4:OBonus;
var _local5:Array;
super.Init();
for each (_local1 in TwinzL.OWInstruction) {
if (_local1.aAdd == false){
} else {
if (_local1.aVariable == null){
_local5 = _local1.aFunction(_local1);
iWithoutName = iWithoutName.concat(_local5);
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
};
};
};
_local2 = 95;
_local3 = 177;
_local4 = new OColumnDelBonus("RED_VIOLET", 0, 0, 20);
_local4.iCordInPlatform = new Point((_local2 + 1), (_local3 - 3));
_local4.SetPos(OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[0], OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[1]);
OInterfacePlatform.INSTANCE.addChild(_local4);
iBonus.push(_local4);
_local4 = new ORowDelBonus("RED_VIOLET", 0, 0, 20);
_local4.iCordInPlatform = new Point(((_local2 - 3.5) + 4.5), ((_local3 - 3) + 4.5));
_local4.SetPos(OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[0], OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[1]);
OInterfacePlatform.INSTANCE.addChild(_local4);
iBonus.push(_local4);
_local4 = new OUpDiagonalDelBonus("RED_VIOLET", 0, 0, 20);
_local4.iCordInPlatform = new Point(((_local2 - 1) + 31.5), ((_local3 - 1) - 31.5));
_local4.SetPos(OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[0], OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[1]);
OInterfacePlatform.INSTANCE.addChild(_local4);
iBonus.push(_local4);
_local4 = new ODownDiagonalDelBonus("RED_VIOLET", 0, 0, 20);
_local4.iCordInPlatform = new Point((((_local2 - 1) + 31.5) + 4.5), ((((_local3 - 5) - 31.5) - 0.5) + 4.5));
_local4.SetPos(OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[0], OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[1]);
OInterfacePlatform.INSTANCE.addChild(_local4);
iBonus.push(_local4);
_local4 = new OColorBombBonus("RED_VIOLET", 0, 0, 20);
_local4.iCordInPlatform = new Point(((_local2 + 1) + 40), ((_local3 - 3) - 40));
_local4.SetPos(OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[0], OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[1]);
OInterfacePlatform.INSTANCE.addChild(_local4);
iBonus.push(_local4);
_local4 = new OBombBonus("RED_VIOLET", 0, 0, 20);
_local4.iCordInPlatform = new Point(((_local2 + 18) + 36), ((_local3 - 2) - 36));
_local4.SetPos(OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[0], OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[1]);
OInterfacePlatform.INSTANCE.addChild(_local4);
iBonus.push(_local4);
_local4 = new ODelayBonus("RED_VIOLET", 0, 0, 20);
_local4.iCordInPlatform = new Point((_local2 + 18), (_local3 - 2));
_local4.SetPos(OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[0], OInterfacePlatform.CordXY(_local4.iCordInPlatform, _local4)[1]);
OInterfacePlatform.INSTANCE.addChild(_local4);
iBonus.push(_local4);
iRecord = false;
OGlobalRandom.SetSeed(1);
ORecordGame.Init();
if (!iRecord){
ORecordGame.SetString("cc{N*ztoc!oc*v*Xto6scc*v*XtN66oc*p*ktNc1cc*p*kto66oc*p*oto6)cc*p*o)o66oc*0m0)o64cc*0m0)c66Nc*0m0)c6:oc*0m0)c6kcc*0m0)c6Koc*UmI)c6$cc*UmI)o66oc*$*6)o6tcc*$*6)N66Nc*Y*7)N6Aoc*Y*7)N6Ecc*Y*B)76$oc*Y*1)76occ*Y*1t766oc*Y*{t76!c6*M{#@N6do6*M{U@N6to6*M{}@76co6*l{p)76Bo6*j{9)N6)o6*x{8)o6.o6{s{l)c6!c6{s{l)666o6{;{l)66cc6{;{lt666o6{J{Vt66Lc6{J{V)666o6{J{5)666cc{t*Sto6HNc*=*)to6Voc*=*)to6!oc*=*)to6Bcc*=*))o6zoc*=*))o66cc*=*)to66oc*I*!to6#cc*I*!tN66oc*A*BtN6!cc*A*B)N66oc***S)N6scc***St766oc*V*Pt76ccc*V*Pt@66oc*2*$t@6!c6*y{f766!o6*Z{4766oc6*Z{47c66o6*j{M7c6cc6*j{M@c66o6*0{l@c6@c6*0{l)c66o6*I{#)c6Ec6*I{#)o66o6*F{#)o6@c6*F{#)c66N6*F{#)c6;o6*F{#)c6ko6*F{#tc6Sc6*F{#)c6@o6*i{$)c6$c6*i{$tc66N6*i{$tc6Bo6*i{$tc6oo6*i{$)c6)c6*0{9to6no6*Q{9to66c6*({UtN67o6*9{UtN6cc6*9{U)N66o6*W{F)N6zc6*W{Ft766o6*8{Ft76oc6*8{FtN66N6*}{FtN6-o6*}{F)N6&c6*}{FtN6co6*8{ptN63c6*8{p)N66o6*2{})N6@c6*2{})766o6*^{U)76cc6*^{U@766o6*:{R@76Bc6*:{R7766o6*f{y776kcc*x*rtN6*oc*j*NtN6Bcc*j*N)N66Nc*ymb)N6-oc*ymb)N6ooc*ymb)o6tcc*ymb)o6Soc*ymb)o6Ecc*ymb)N66Nc*Ami)N6{oc*Ami)N6)oc*Ami)o6coc*8mitN6Lcc*}mq)c6!oc{cmj)c6fcc{cmj)666Nc{NmZ)66-oc{NmZ)66)cc*0mg)o6eoc*Rmb)o6Xcc*Rmb)N66Nc*G*6)N6Toc*G*6)N6koc*G*6)o6ccc*G*stN63oc*G*1tN6ccc*G*1t766oc*W*et76tc6*z{y@N6do6*J{R@N6cc6*J{R@766o6*L{}@76Xc6*L{}@@66N6*B{O@@6sc6*4{I)76-o6*+{v)76Lc6*+{vt766N6*Z{vt76#o6*Z{vtN6zo6*G{=)76:o6*G{=)N6oc6*G{=t76co6**{gt76Xc6**{g)766N6*w{I)76Vo6*w{I)76.o6*w{I)N6.c6*{{I)N6so6*#{I)N67c6*#{It766o6*${It76oc6*${ItN66o6*G{ItN67c6*G{It766o6*y{It76Nc6*y{ItN66N6*p{ItN6$c6*p{Ito6{c6*p{Ito66o6*p{Ito6co6*D{OtN6!c6*D{9)o6;o6*D{j)o6cc6*D{jto66o6*D{nto6cc6*D{n)o66o6*I{l)o6)c6*I{l)c66o6*I{e)c6oc6*I{e@c66o6*I{^@c6Ncc*g*KtN6JNc*O*.tN63oc*O*!tN6koc*O*!to6Ncc*O*!to6-cc*O*!to66oc*O*!to66cc*O*!tN66oc*Q*7tN6scc*Q*7to66oc*Q*6to6@cc*Q*6)c66oc*Fmb)c6Jcc*Fmbto66Nc*qmito61oc*qmito6toc*qmitc6fcc*qmi)c6;cc*qmi)c66oc*qmi)c66cc*qmito66Nc*q*otocNoc*q*oto6koc*q*oto6:cc*q*o)o6Poc*q*o)o66cc*q*oto66oc*I*.to6Jcc*I*.tN66oc*_*TtN6Ecc*_*Tt766oc*_*2t76cc6*R{47c6:o6*R{57c67c6*R{5@c66o6*u{Y@c6kc6*u{Y@o66o6*9{l@o6cc6*9{l)o66N6*O{8)o6So6*O{8to64c6*O{8)c6co6*Q{j)c6tc6*Q{jto66N6*v{(to6Zo6*v{(to6-c6*0{}to6sc6*0{}to66o6*O{Oto6cc6*O{OtN66o6*W{ptN6hc6*W{p)N66o6*l{p)N6tc6*l{p)766N6*Y{p)76Jo6*Y{p)76!c6*y{ptN6-N6*q{DtNc7");
iActions = ORecordGame.ConvertStringToArray();
};
OPlatform.amplyLock = true;
OElementColor.COLORS = ["RED", "ORANGE", "GREEN"];
iCursor = (new TwinzL.OCursor() as Sprite);
iCursor.width = (iCursor.width * (0.5 * OGlobal.Scale));
iCursor.height = (iCursor.height * (0.5 * OGlobal.Scale));
iTimer = getTimer();
if (iRecord){
this.addEventListener(OField.EVENT_GAME_OVER, onGameOver);
this.addEventListener(OField.EVENT_LEVEL_COMPLETE, onGameOver);
};
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iBack){
OInterfacePlatform.AmplyClick(iBack[0]);
this.State = stWaitForClear;
};
}
}
}//package RES.WINDOWS
Section 79
//OWIntro (RES.WINDOWS.OWIntro)
package RES.WINDOWS {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
public class OWIntro extends OWindow {
private var iPresent:Array;
private var iSiteName:Array;
private var iGameName:Array;
private var iTimer:int;
private var iAll:Array;
private var index:int;// = 0
public static const stWaitForClear:int = 5;
public static const stShowSite:int = 2;
public static const stNormal:int = 0;
public static const stEnd:int = 7;
public static const stClear:int = 6;
public static const stShowGameName:int = 4;
public static const stShowPresent:int = 3;
public static const stPreShow:int = 1;
public function OWIntro(){
index = 0;
OInterfacePlatform.PARENT = this;
super(null);
this.State = stPreShow;
}
override public function Init():void{
var _local1:Object;
var _local2:Sprite;
super.Init();
for each (_local1 in TwinzL.OWIntroPlatform) {
this[_local1.aVariable] = _local1.aFunction(_local1);
};
_local2 = new Sprite();
_local2.graphics.beginFill(0, 0);
_local2.graphics.drawRect(0, 0, OGlobal.ViewporRect.width, OGlobal.ViewporRect.height);
_local2.graphics.endFill();
this.addChild(_local2);
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iGameName){
trace("GAMENAME");
};
}
override public function OnMouseDown(_arg1:MouseEvent):void{
if (this.State >= stClear){
return;
};
if (this.State < stWaitForClear){
return;
};
this.State = stClear;
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:OElement;
var _local3:int;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShowSite;
break;
case stShowSite:
if ((getTimer() - iTimer) > 30){
if (index >= 0){
_local2 = (iSiteName[((iSiteName.length - index) - 1)] as OElement);
OInterfacePlatform.MOVE(_local2, OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[0], OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[1], -1, true, OElementEvents.ENDMOVE);
index--;
iTimer = getTimer();
} else {
if ((getTimer() - iTimer) > 300){
this.State = stShowPresent;
};
};
};
break;
case stShowPresent:
if ((getTimer() - iTimer) > 30){
if (index >= 0){
_local2 = (iPresent[((iPresent.length - index) - 1)] as OElement);
OInterfacePlatform.MOVE(_local2, OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[0], OInterfacePlatform.CordXY(_local2.iCordInPlatform, _local2)[1], -1, true, OElementEvents.ENDMOVE);
index--;
iTimer = getTimer();
} else {
if ((getTimer() - iTimer) > 500){
this.State = stWaitForClear;
};
};
};
break;
case stShowGameName:
if ((getTimer() - iTimer) > 50){
if (index >= 0){
_local2 = (iGameName[index] as OElement);
OInterfacePlatform.MOVE(_local2, OInterfacePlatform.CordXY(_local2.iCordInPlatform)[0], OInterfacePlatform.CordXY(_local2.iCordInPlatform)[1], -1, true, OElementEvents.ENDMOVE);
index--;
iTimer = getTimer();
} else {
if (OInterfacePlatform.ACTIVE){
this.State = stWaitForClear;
};
};
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 2000){
this.State = stClear;
};
break;
case stClear:
_local3 = 0;
while (_local3 < 2) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local2 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local2, _local2.prX, (_local2.prY + 200), _local2.Speed, !(_local2.IsMove), OElementEvents.DELETE);
};
_local3++;
};
if ((((iAll.length <= 0)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Rectangle;
iState = _arg1;
switch (iState){
case stPreShow:
for each (_local2 in iSiteName) {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
for each (_local2 in iPresent) {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY + OGlobal.ToLocal(_local3.top)));
};
break;
case stShowSite:
index = (iSiteName.length - 1);
iTimer = getTimer();
break;
case stShowPresent:
index = (iPresent.length - 1);
iTimer = getTimer();
break;
case stShowGameName:
index = (iGameName.length - 1);
iTimer = getTimer();
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iAll = iSiteName.concat(iPresent);
iTimer = getTimer();
break;
case stEnd:
this.prVisible = false;
break;
};
}
}
}//package RES.WINDOWS
Section 80
//OWMenu (RES.WINDOWS.OWMenu)
package RES.WINDOWS {
import flash.events.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.GAME.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.CORE.*;
import flash.utils.*;
import flash.net.*;
public class OWMenu extends OWindow {
private var iMoreGames:Array;
private var iPuzzle:Array;
private var iSound:Array;
private var iContinueGame:Array;
private var iTimer:int;
private var iInstruction:Array;
private var iAll:Array;
private var iName:Array;
private var iWelcome:Array;
private var index:int;// = 0
private var iArcade:Array;
private var iNewGame:Array;
private var iGameName:Array;
private var iMusic:Array;
private var index2:int;// = 0
private var iHighScores:Array;
private var iChangeName:Array;
public static const stShow:int = 2;
public static const stNormal:int = 0;
public static const stEnd:int = 7;
public static const stClear:int = 6;
public static const stWaitForClear:int = 5;
public static const stShowGameName:int = 4;
public static const stShowPresent:int = 3;
public static const stPreShow:int = 1;
public function OWMenu(){
index = 0;
index2 = 0;
OInterfacePlatform.PARENT = this;
super(null);
this.State = stPreShow;
}
private function GetAllArray():Array{
var _local1:Array;
_local1 = new Array();
if (iSound != null){
_local1 = _local1.concat(iSound);
};
if (iMusic != null){
_local1 = _local1.concat(iMusic);
};
if (iWelcome != null){
_local1 = _local1.concat(iWelcome);
};
if (iName != null){
_local1 = _local1.concat(iName);
};
if (iChangeName != null){
_local1 = _local1.concat(iChangeName);
};
if (iGameName != null){
_local1 = _local1.concat(iGameName);
};
if (iContinueGame != null){
_local1 = _local1.concat(iContinueGame);
};
if (iPuzzle != null){
_local1 = _local1.concat(iPuzzle);
};
if (iArcade != null){
_local1 = _local1.concat(iArcade);
};
if (iNewGame != null){
_local1 = _local1.concat(iNewGame);
};
if (iHighScores != null){
_local1 = _local1.concat(iHighScores);
};
if (iInstruction != null){
_local1 = _local1.concat(iInstruction);
};
if (iMoreGames != null){
_local1 = _local1.concat(iMoreGames);
};
return (_local1);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
var _local4:Array;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShow;
break;
case stShow:
_local2 = 0;
while (_local2 < 2) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
_local4 = OInterfacePlatform.CordXY(_local3.iCordInPlatform, _local3);
OInterfacePlatform.MOVE(_local3, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
} else {
break;
};
_local2++;
};
if (OInterfacePlatform.ACTIVE){
this.State = stNormal;
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 500){
this.State = stClear;
};
break;
case stClear:
_local2 = 0;
while (_local2 < 2) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local3, _local3.prX, (_local3.prY + 200), _local3.Speed, !(_local3.IsMove), OElementEvents.DELETE);
};
_local2++;
};
if ((((iAll.length <= 0)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Rectangle;
iState = _arg1;
switch (iState){
case stPreShow:
iAll = GetAllArray();
for each (_local2 in iAll) {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
break;
case stShow:
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iAll = GetAllArray();
break;
case stEnd:
this.prVisible = false;
break;
};
}
override public function Init():void{
var _local1:Object;
super.Init();
TwinzL.OWMenuPlatform[1].aStr = TwinzL.iGAME.prPlayerName;
for each (_local1 in TwinzL.OWMenuPlatform) {
if (_local1.aAdd == false){
} else {
if (_local1.aVariable == null){
} else {
this[_local1.aVariable] = _local1.aFunction(_local1);
};
};
};
}
override public function OnPress(_arg1:Event, _arg2):void{
var aEvent = _arg1;
var aObject = _arg2;
if (aObject == iNewGame){
TwinzL.iGAME.prMode = 0;
OInterfacePlatform.AmplyClick(iNewGame[0]);
TwinzL.cGameMode = OGameMode.ADVENTURE;
(this.parent as Twinz).OnPress(null, TwinzL.miConnection);
this.State = stWaitForClear;
return;
};
if (aObject == iPuzzle){
TwinzL.iGAME.prMode = 1;
OInterfacePlatform.AmplyClick(iPuzzle[0]);
TwinzL.cGameMode = OGameMode.PUZZLE;
(this.parent as Twinz).OnPress(null, TwinzL.miConnection);
this.State = stWaitForClear;
return;
};
if (aObject == iArcade){
TwinzL.iGAME.prMode = 2;
OInterfacePlatform.AmplyClick(iArcade[0]);
TwinzL.cGameMode = OGameMode.ARCADE;
(this.parent as Twinz).OnPress(null, TwinzL.miConnection);
this.State = stWaitForClear;
return;
};
if ((((((aObject == iChangeName)) || ((aObject == iWelcome)))) || ((aObject == iName)))){
(this.parent as Twinz).OnPress(null, TwinzL.miEnterNewName);
this.State = stClear;
return;
};
if (aObject == iContinueGame){
OInterfacePlatform.AmplyClick(iContinueGame[0]);
TwinzL.cGameMode = TwinzL.cLastGame.aGameMode;
(this.parent as Twinz).OnPress(null, TwinzL.miConnection);
this.State = stWaitForClear;
return;
};
if (aObject == iInstruction){
OInterfacePlatform.AmplyClick(iInstruction[0]);
TwinzL.cGameMode = TwinzL.cLastGame.aGameMode;
(this.parent as Twinz).OnPress(null, TwinzL.miInstructions);
this.State = stWaitForClear;
return;
};
if (aObject == iHighScores){
OInterfacePlatform.AmplyClick(iHighScores[0]);
(this.parent as Twinz).OnPress(null, TwinzL.miHighScores);
this.State = stWaitForClear;
return;
};
if (aObject == iMoreGames){
try {
navigateToURL(new URLRequest(TwinzL.sURLSite));
} catch(error:Error) {
};
return;
};
}
}
}//package RES.WINDOWS
Section 81
//OWOptions (RES.WINDOWS.OWOptions)
package RES.WINDOWS {
import ENGINE.INTERFACE.*;
public class OWOptions extends ODialog {
public function OWOptions(){
super(null);
}
}
}//package RES.WINDOWS
Section 82
//OWResults (RES.WINDOWS.OWResults)
package RES.WINDOWS {
import flash.events.*;
import flash.geom.*;
import ENGINE.INTERFACE.*;
import RES.INTERFACE.*;
import RES.GAME.OElements.*;
import ENGINE.GAME.*;
import ENGINE.CORE.*;
import flash.utils.*;
public class OWResults extends OWindow {
private var iBScoreStr:Array;
private var iTimer:int;
private var iReitingStr:Array;
private var iTScoreStr:Array;
private var iReitingValue:Array;
private var iAll:Array;
private var index:int;// = 0
private var iNext:Array;
private var iBonus:int;// = 0
private var iScoreValue:Array;
private var iTScoreValue:Array;
private var iMenu:Array;
private var flagGameOver:String;
private var index2:int;// = 0
private var iScore:int;// = 0
private var iScoreStr:Array;
private var iWindowName:Array;
private var iResult:int;// = 0
private var iBScoreValue:Array;
public static const stShow:int = 2;
public static const stNormal:int = 0;
public static const stEnd:int = 7;
public static const stClear:int = 6;
public static const stWaitForClear:int = 5;
public static const stShowGameName:int = 4;
public static const stShowPresent:int = 3;
public static const stPreShow:int = 1;
public function OWResults(){
index = 0;
index2 = 0;
iScore = 0;
iBonus = 0;
iResult = 0;
TwinzL.iGAME.prMode = 0;
OInterfacePlatform.PARENT = this;
iAll = new Array();
iMenu = new Array();
iNext = new Array();
super(null);
this.State = stPreShow;
}
private function GetAllArray():Array{
var _local1:Array;
_local1 = new Array();
if (iWindowName != null){
_local1 = _local1.concat(iWindowName);
};
if (iScoreStr != null){
_local1 = _local1.concat(iScoreStr);
};
if (iScoreValue != null){
_local1 = _local1.concat(iScoreValue);
};
if (iBScoreStr != null){
_local1 = _local1.concat(iBScoreStr);
};
if (iBScoreValue != null){
_local1 = _local1.concat(iBScoreValue);
};
if (iTScoreStr != null){
_local1 = _local1.concat(iTScoreStr);
};
if (iTScoreValue != null){
_local1 = _local1.concat(iTScoreValue);
};
if (iReitingStr != null){
_local1 = _local1.concat(iReitingStr);
};
if (iReitingValue != null){
_local1 = _local1.concat(iReitingValue);
};
if (iNext != null){
_local1 = _local1.concat(iNext);
};
if (iMenu != null){
_local1 = _local1.concat(iMenu);
};
return (_local1);
}
override public function OnEnterFrame(_arg1:Event):void{
var _local2:int;
var _local3:OElement;
var _local4:Array;
var _local5:OElement;
super.OnEnterFrame(_arg1);
switch (iState){
case stPreShow:
this.State = stShow;
break;
case stShow:
_local2 = 0;
while (_local2 < 2) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local3 = (iAll.splice(index, 1)[0] as OElement);
_local4 = OInterfacePlatform.CordXY(_local3.iCordInPlatform, _local3);
OInterfacePlatform.MOVE(_local3, _local4[0], _local4[1], -1, true, OElementEvents.ENDMOVE);
} else {
break;
};
_local2++;
};
if (OInterfacePlatform.ACTIVE){
this.State = stNormal;
};
break;
case stWaitForClear:
if ((getTimer() - iTimer) > 500){
this.State = stClear;
};
break;
case stClear:
_local2 = 0;
while (_local2 < 2) {
if (iAll.length > 0){
index = (iAll.length - 1);
_local5 = (iAll.splice(index, 1)[0] as OElement);
OInterfacePlatform.MOVE(_local5, _local5.prX, (_local5.prY + 200), _local5.Speed, !(_local5.IsMove), OElementEvents.DELETE);
};
_local2++;
};
if ((((iAll.length <= 0)) && ((OInterfacePlatform.NumCHILDRENS() == 0)))){
this.State = stEnd;
};
break;
};
}
override public function set State(_arg1:int):void{
var _local2:OElement;
var _local3:Rectangle;
iState = _arg1;
switch (iState){
case stPreShow:
iAll = GetAllArray();
for each (_local2 in iAll) {
_local3 = _local2.getBounds(OGlobal.prStage);
_local2.SetPos(_local2.prX, (_local2.prY - OGlobal.ToLocal((_local3.y + _local3.height))));
};
break;
case stShow:
break;
case stWaitForClear:
iTimer = getTimer();
break;
case stClear:
iAll = GetAllArray();
break;
case stEnd:
this.prVisible = false;
break;
};
}
override public function Init():void{
var _local1:int;
var _local2:int;
var _local3:Object;
super.Init();
_local1 = TwinzL.iGAME.prScore;
iScore = TwinzL.iGAME.Read(OGame.catTmp, "Score");
TwinzL.OWResultsPlatform[4].aStr = String(iScore);
iScore = TwinzL.iGAME.Read(OGame.catTmp, "Bonus");
TwinzL.OWResultsPlatform[6].aStr = String(iScore);
iScore = TwinzL.iGAME.Read(OGame.catTmp, "Result");
TwinzL.OWResultsPlatform[8].aStr = String(iScore);
TwinzL.iGAME.AddScore(iScore);
TwinzL.iGAME.AddScoreInTable(iScore);
_local2 = TwinzL.iGAME.prScore;
TwinzL.OWResultsPlatform[10].aStr = String(TwinzL.iGAME.prScore);
flagGameOver = TwinzL.iGAME.Read(OGame.catTmp, "GameOver");
if (flagGameOver == "1"){
TwinzL.OWResultsPlatform[0].aAdd = false;
TwinzL.OWResultsPlatform[1].aAdd = true;
TwinzL.OWResultsPlatform[2].aAdd = false;
TwinzL.OWResultsPlatform[11].aAdd = false;
TwinzL.OWResultsPlatform[12].aAdd = true;
} else {
if (TwinzL.iGAME.prLevel == (TwinzL.cLevelsConfig.LevelsCount - 1)){
TwinzL.OWResultsPlatform[0].aAdd = false;
TwinzL.OWResultsPlatform[1].aAdd = false;
TwinzL.OWResultsPlatform[2].aAdd = true;
TwinzL.OWResultsPlatform[11].aAdd = false;
TwinzL.OWResultsPlatform[12].aAdd = false;
TwinzL.cLastGame.aLevel = -1;
TwinzL.cLastGame.aGameMode = null;
} else {
TwinzL.iGAME.NextLevel();
TwinzL.OWResultsPlatform[0].aAdd = true;
TwinzL.OWResultsPlatform[1].aAdd = false;
TwinzL.OWResultsPlatform[2].aAdd = false;
TwinzL.OWResultsPlatform[11].aAdd = true;
TwinzL.OWResultsPlatform[12].aAdd = false;
};
};
for each (_local3 in TwinzL.OWResultsPlatform) {
if (_local3.aAdd == false){
} else {
if (_local3.aVariable == null){
iAll = iAll.concat(_local3.aFunction(_local3));
} else {
this[_local3.aVariable] = _local3.aFunction(_local3);
iAll = iAll.concat(this[_local3.aVariable]);
if (_local3.aVisible != null){
OInterfacePlatform.VISIBLE_OBJECT(this[_local3.aVariable], _local3.aVisible);
};
};
};
};
TwinzL.cLastGame.aLevel = TwinzL.iGAME.prLevel;
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg2 == iMenu){
OInterfacePlatform.AmplyClick(iMenu[0]);
(this.parent as Twinz).OnPress(null, TwinzL.miMenu);
this.State = stWaitForClear;
};
if (_arg2 == iNext){
OInterfacePlatform.AmplyClick(iNext[0]);
(this.parent as Twinz).OnPress(null, TwinzL.miGame);
this.State = stWaitForClear;
};
}
}
}//package RES.WINDOWS
Section 83
//CSprite (RES.CSprite)
package RES {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class CSprite extends Sprite {
private var iListeners:Dictionary;
public function CSprite(){
iListeners = new Dictionary();
if (this.stage == null){
this.addEventListener(Event.ADDED_TO_STAGE, OnAddToStage);
} else {
Init();
};
}
public function Init():void{
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
var _local4:int;
if (iListeners[_arg1] != null){
_local4 = iListeners[_arg1].indexOf(_arg2);
if (_local4 != -1){
iListeners[_arg1][_local4] = null;
iListeners[_arg1].splice(_local4, 1);
};
};
super.removeEventListener(_arg1, _arg2, false);
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (iListeners[_arg1] == null){
iListeners[_arg1] = [];
};
if (iListeners[_arg1].indexOf(_arg2) != -1){
return;
};
iListeners[_arg1].push(_arg2);
super.addEventListener(_arg1, _arg2, false, 0, true);
}
public function Free():void{
var _local1:String;
var _local2:Function;
for (_local1 in iListeners) {
for each (_local2 in iListeners[_local1]) {
super.removeEventListener(_local1, _local2, false);
};
delete iListeners[_local1];
};
}
private function OnAddToStage(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, OnAddToStage);
Init();
}
}
}//package RES
Section 84
//CUtils (RES.CUtils)
package RES {
public class CUtils {
public static function ClearArray(_arg1:Object):void{
var _local2:Object;
if (_arg1 == null){
return;
};
if ((_arg1 is Array) == false){
return;
};
while ((_arg1 as Array).length > 0) {
_local2 = _arg1.shift();
_local2 = null;
};
}
}
}//package RES
Section 85
//OMusic (RES.OMusic)
package RES {
import ENGINE.CORE.*;
public class OMusic {
public static const OSS01Ind:int = 3;
public static const OSCubeFallInd:int = 0;
public static const OSEeeInd:int = 6;
public static const OSArrow5Ind:int = 2;
public static const OSGameStartInd:int = 1;
private static const OSoundParams:Array = [OMusic.OSCubeFall, OMusic.OSGameStart, OMusic.OSArrow5, OMusic.OSS01, OMusic.OSOops, OMusic.OSSound1, OMusic.OSEee];
public static const OSOopsInd:int = 4;
public static const OSSound1Ind:int = 5;
public static var OSEee:Class = OMusic_OSEee;
public static var OSSound1:Class = OMusic_OSSound1;
private static var iSoundRegistered:Boolean = OSound.RegisterEmbedSounds(OSoundParams);
public static var OSGameStart:Class = OMusic_OSGameStart;
public static var OSArrow5:Class = OMusic_OSArrow5;
public static var OSCubeFall:Class = OMusic_OSCubeFall;
public static var OSOops:Class = OMusic_OSOops;
public static var OSS01:Class = OMusic_OSS01;
}
}//package RES
Section 86
//OMusic_OSArrow5 (RES.OMusic_OSArrow5)
package RES {
import mx.core.*;
public class OMusic_OSArrow5 extends SoundAsset {
}
}//package RES
Section 87
//OMusic_OSCubeFall (RES.OMusic_OSCubeFall)
package RES {
import mx.core.*;
public class OMusic_OSCubeFall extends SoundAsset {
}
}//package RES
Section 88
//OMusic_OSEee (RES.OMusic_OSEee)
package RES {
import mx.core.*;
public class OMusic_OSEee extends SoundAsset {
}
}//package RES
Section 89
//OMusic_OSGameStart (RES.OMusic_OSGameStart)
package RES {
import mx.core.*;
public class OMusic_OSGameStart extends SoundAsset {
}
}//package RES
Section 90
//OMusic_OSOops (RES.OMusic_OSOops)
package RES {
import mx.core.*;
public class OMusic_OSOops extends SoundAsset {
}
}//package RES
Section 91
//OMusic_OSS01 (RES.OMusic_OSS01)
package RES {
import mx.core.*;
public class OMusic_OSS01 extends SoundAsset {
}
}//package RES
Section 92
//OMusic_OSSound1 (RES.OMusic_OSSound1)
package RES {
import mx.core.*;
public class OMusic_OSSound1 extends SoundAsset {
}
}//package RES
Section 93
//OCGame (OCGame)
package {
import ENGINE.GAME.*;
public class OCGame extends OGame {
public function OCGame(){
super(3, 5);
}
override public function DefaultInitLocalScores():void{
trace("INIT");
this.iScores.Clear(0);
this.iScores.AddScore("Emily", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Michael", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Jacob", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Isabella", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.AddScore("Madison", (int(((Math.random() * 543) + 200)) * 10), 0, int(((Math.random() * 5) + 3)));
this.iScores.SortOn(0);
}
}
}//package
Section 94
//Twinz (Twinz)
package {
import ENGINE.DISPLAY.*;
import flash.events.*;
import flash.display.*;
import ENGINE.INTERFACE.*;
import RES.INTERFACE.*;
import ENGINE.CORE.*;
import RES.WINDOWS.*;
import ENGINE.AD.*;
public class Twinz extends OApplication {
private var iShow:Boolean;
private var iSystem:OSystem;
public var iField:OSprite;
private var isDeactive:Boolean;// = false
private var iWindow:OWindow;
private var iDepth:int;
public function Twinz(){
isDeactive = false;
super("Twinz");
try {
OSound.PlayListAdd("music.mp3");
OSound.PlayMusic();
iShow = false;
this.addEventListener(Event.ACTIVATE, OnActive);
try {
OAdBanners.InitTBanner(TwinzL.sTBannerPrefix, TwinzL.sBannerID);
OAdBanners.InitBBanner(TwinzL.sBBannerPrefix, TwinzL.sBannerID);
} catch(error:Error) {
};
} catch(e:Error) {
trace(e.message);
};
}
public function MakeBackground():void{
var _local1:Number;
var _local2:Number;
var _local3:Sprite;
var _local4:Sprite;
var _local5:BitmapData;
var _local6:Bitmap;
_local1 = OGlobal.ViewporRect.width;
_local2 = OGlobal.ViewporRect.height;
_local3 = (new TwinzL.OBgr() as Sprite);
_local3.scaleX = OGlobal.Scale;
_local3.scaleY = OGlobal.Scale;
_local4 = new Sprite();
_local4.addChild(_local3);
_local5 = new BitmapData(_local1, _local2);
_local5.draw(_local4);
_local6 = new Bitmap(_local5);
this.addChild(_local6);
}
override protected function OnMenuItem():void{
var _local1:int;
var _local2:*;
_local1 = this.prMenuItem;
switch (_local1){
case TwinzL.miNullWindow:
return;
case TwinzL.miLastWindow:
_local2 = this.getChildAt((this.numChildren - 1));
this.iWindow = ((_local2 is OWindow)) ? (_local2 as OWindow) : null;
if (this.iWindow){
this.iWindow.prActive = true;
return;
};
this.iWindow = new OWMenu();
this.prMenuItem = TwinzL.miNullWindow;
break;
case TwinzL.miIntro:
this.iWindow = new OWIntro();
if (TwinzL.iGAME.prPlayerName == ""){
this.prMenuItem = TwinzL.miEnterNameFirst;
} else {
TwinzL.cLastGame.aLevel = TwinzL.iGAME.prLevel;
this.prMenuItem = TwinzL.miMenu;
};
break;
case TwinzL.miEnterNameFirst:
this.iWindow = new OWEnterName(false);
TwinzL.cLastGame.aGameMode = null;
TwinzL.cLastGame.aLevel = -1;
this.prMenuItem = TwinzL.miMenu;
break;
case TwinzL.miEnterNewName:
this.iWindow = new OWEnterName(true);
TwinzL.cLastGame.aGameMode = null;
TwinzL.cLastGame.aLevel = -1;
this.prMenuItem = TwinzL.miMenu;
break;
case TwinzL.miMenu:
this.iWindow = new OWMenu();
this.prMenuItem = TwinzL.miNullWindow;
break;
case TwinzL.miChoosePlayer:
break;
case TwinzL.miDeletePlayerConfirm:
break;
case TwinzL.miDeletePlayer:
break;
case TwinzL.miOptions:
this.iWindow = new OWOptions();
this.prMenuItem = TwinzL.miLastWindow;
break;
case TwinzL.miHighScores:
this.iWindow = new OWHighScores();
this.prMenuItem = TwinzL.miLastWindow;
break;
case TwinzL.miDeleteScoresConfirm:
this.iWindow = new OWClearScoreConfirm();
this.prMenuItem = TwinzL.miHighScores;
break;
case TwinzL.miDeleteScores:
return;
case TwinzL.miGameMode:
this.iWindow = new OWGameModeWindow();
this.prMenuItem = TwinzL.miConnection;
break;
case TwinzL.miConnection:
this.iWindow = new OWConnection();
this.prMenuItem = TwinzL.miGame;
break;
case TwinzL.miGame:
this.iWindow = new OWGame();
this.prMenuItem = TwinzL.miMenu;
break;
case TwinzL.miResults:
this.iWindow = new OWResults();
this.prMenuItem = TwinzL.miGame;
break;
case TwinzL.miResultsMP:
break;
case TwinzL.miInstructions:
this.iWindow = new OWInstruction();
this.prMenuItem = TwinzL.miLastWindow;
break;
};
this.addChild(this.iWindow);
}
override public function Init():void{
if (((((!(this.stage)) || ((this.stage.stageHeight == 0)))) || ((this.stage.stageWidth == 0)))){
return;
};
OGlobal.prStage;
MakeBackground();
if (TwinzL.sDebug){
this.iSystem = new OSystem();
this.addChild(this.iSystem);
iSystem.x = 10;
iSystem.y = 570;
};
super.Init();
OInterfacePlatform.Init(this);
this.prMenuItem = TwinzL.miIntro;
OnMenuItem();
}
override public function OnPress(_arg1:Event, _arg2):void{
if (_arg1 == null){
this.prMenuItem = _arg2;
};
}
override protected function OnDeactivate(_arg1:Event):void{
TwinzL.iGAME.SaveCache();
isDeactive = true;
}
override public function OnEnterFrame(_arg1:Event):void{
super.OnEnterFrame(_arg1);
if (this.iWindow){
if (this.iWindow.prAnimation){
return;
};
if (!this.iWindow.prVisible){
this.removeChild(this.iWindow);
this.iWindow.Free();
this.iWindow = null;
this.OnMenuItem();
} else {
if (!this.iWindow.prActive){
this.OnMenuItem();
};
};
};
}
protected function OnActive(_arg1:Event):void{
isDeactive = false;
}
}
}//package
Section 95
//TwinzL (TwinzL)
package {
import flash.geom.*;
import RES.INTERFACE.*;
import ENGINE.GAME.*;
import flash.text.*;
public class TwinzL {
public static const strGameMode:String = "Game Mode:";
public static const strCancel:String = "Cancel";
public static const sURLGame:String = "http://www.wellgames.com/free_online/twinz/?g=Twinz";
public static const miEnterNewName:int = 4;
public static const strContinueGame:String = "Continue Game";
public static const strEnterName1:String = "Enter Name:";
public static const strGameComplete:String = "Game Complete";
public static const miDeletePlayer:int = 9;
public static const strLevelComplete:String = "Level Complete";
public static const miIntro:int = 2;
public static const miDeleteScoresConfirm:int = 18;
public static const strDefPlayerName:String = "WELL";
public static const strNewGame:String = "New Game";
public static const strPause:String = "Pause";
public static const strEnterName:String = "please enter your name:";
public static const strPresents:String = "presents";
public static const miGameMode:int = 27;
public static const strLinesLeft:String = "Lines:";
public static const strInstructions:String = "Instruction";
public static const miCommingSoon:int = 6;
public static const miResultsSP:int = 15;
public static const strAccept:String = "Accept";
public static const strClear:String = "Clear";
public static const miSSaver:int = 25;
public static const strArcade:String = "Arcade";
public static const sBBannerPrefix:String = "bottom/";
public static const strBack:String = "Back";
public static const miResults:int = 11;
public static const sZone:String = "";
public static const strInstructionsText:String = (((("Here are two interacting playing fields.\n" + "Click on a group of at least three cubes of one color and it moves to another field.\n") + "If the corresponding cells are empty it just flies through. Otherwise the group replaces the cubes there and remains blocked until any action happens on the field.\n") + "You are to prevent the cubes from reaching the opposite edge of the field. The level is over with all the rows added and no possible combinations left on the field.\n") + "Be accurate as more cubes are added for a click with every other level.");
public static const strBonusScore:String = "Bonus score :";
public static const strStrategy:String = "Strategy";
public static const strTotalScore:String = "Level score :";
public static const miLevelEditor:int = 26;
public static const sBannerID:String = "twinz";
public static const strScore:String = "Score:";
public static const miLastWindow:int = 1;
public static const strGameName:String = "Twinz!";
public static const strPlay:String = "Play";
public static const strDeleteScoresConfirm1:String = "Are you sure you want to";
public static const strDeleteScoresConfirm2:String = "delete score table?";
public static const strReiting:String = "Rating:";
public static const cSizeCellMenu:Number = 5;
public static const sDomain:String = "wellgames.com";
public static const strSite:String = "WELLGAMES.COM";
public static const miNullWindow:int = 0;
public static const miMenu:int = 5;
public static const miHighScores:int = 17;
public static const strNextLevel:String = "Next Level";
public static const strMenu:String = "Menu";
public static const strMoreGames:String = "More Games";
public static const strInstructionBonusText1:String = "removes a line,
a column, a diagonal";
public static const strInstructionBonusText2:String = "ordinary bomb, removes the surrounding area";
public static const strInstructionBonusText3:String = "color bomb, removes all cubes of the color";
public static const strInstructionBonusText4:String = "Click delay";
public static const strLines:String = "Lines";
public static const strPlayAgain:String = "Play Again";
public static const miInstructions:int = 24;
public static const miOptions:int = 10;
public static const sURLSite:String = "http://www.wellgames.com/?g=Twinz";
public static const miDeleteScores:int = 19;
public static const strChangeName:String = "click to change name";
public static const miDeletePlayerConfirm:int = 8;
public static const strClickToContinue:String = "Click to Continue...";
public static const strHighScores:String = "High Scores";
public static const strChangePlayer:String = "click to change
player";
public static const strDeleteScoresConfirm:String = "Are you sure you
want to delete
score table?";
public static const strPersonal:String = "Personal";
public static const miChoosePlayer:int = 7;
public static const sServer:String = "www.wellgames.com";
public static const miConnection:int = 28;
public static const sDebug:Boolean = false;
public static const cSizePlatformMenu:Point = new Point(200, 200);
public static const miEnterNameFirst:int = 3;
public static const miGame:int = 21;
public static const sTBannerPrefix:String = "top/";
public static const strLocal:String = "Local";
public static const strLoading:String = "Loading...";
public static const strPuzzle:String = "Puzzle";
public static const strLevel:String = "Level";
public static const strLeft:String = "Left:";
public static const sXTName:String = "";
public static const strErrorLoad:String = "Error load!";
public static const strAdventure:String = "Adventure";
public static const miResultsMP:int = 22;
public static const strExtraLines:String = "Extra lines:";
public static const strLevelFailed:String = "Level Failed";
public static const strWelcome:String = "Welcome";
public static const strInstructionBonusTextDop:String = "Bonus effects its group only, these cubes don't move to another field.";
public static var OWEnterNamePlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:" ", aRow:100, aSize:7, aShift:30, aColors:["BLUE"], aButton:false, aVariable:"iInputS", aOrientation:OOrientationConfig.NORMAL, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"ABC", aRow:100, aSize:7, aShift:30, aColors:["BLUE"], aButton:false, aVariable:"iInput", aOrientation:OOrientationConfig.NORMAL, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strEnterName1, aRow:60, aSize:7, aShift:0, aColors:OWColors, aButton:false, aVariable:"iWindowName", aOrientation:OOrientationConfig.NORMAL}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strAccept, aRow:130, aSize:6, aShift:-35, aColors:["GREEN"], aButton:true, aVariable:"iAccept", aOrientation:OOrientationConfig.NORMAL}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strCancel, aRow:130, aSize:6, aShift:35, aColors:["RED"], aButton:true, aVariable:"iCancel", aOrientation:OOrientationConfig.NORMAL}];
public static var OMusicSymbol:Class = TwinzL_OMusicSymbol;
public static var cGameMode:String = null;
public static var OWHighScores:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strHighScores, aRow:47, aSize:10, aShift:0, aColors:OWColors, aButton:false, aVariable:"iWindowName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"<", aRow:65, aSize:6, aShift:-30, aColors:["SILVER"], aButton:true, aVariable:"iBtnLLocal", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:">", aRow:65, aSize:6, aShift:30, aColors:["SILVER"], aButton:true, aVariable:"iBtnRLocal", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"<", aRow:65, aSize:6, aShift:-30, aColors:["SILVER"], aButton:true, aVariable:"iBtnLPersonal", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:">", aRow:65, aSize:6, aShift:30, aColors:["SILVER"], aButton:true, aVariable:"iBtnRPersonal", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strLocal, aRow:65, aSize:6, aShift:0, aColors:OWColors, aButton:false, aVariable:"iLocalStr", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strPersonal, aRow:65, aSize:6, aShift:0, aColors:OWColors, aButton:false, aVariable:"iPersonalStr", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:85, aSize:5, aShift:35, aColors:["BLUE"], aButton:false, aVariable:"iLocalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:85, aSize:5, aShift:-35, aColors:["BLUE"], aButton:false, aVariable:"iLocalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:97, aSize:5, aShift:35, aColors:["MAGENTA"], aButton:false, aVariable:"iLocalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:97, aSize:5, aShift:-35, aColors:["MAGENTA"], aButton:false, aVariable:"iLocalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:109, aSize:5, aShift:35, aColors:["GREEN"], aButton:false, aVariable:"iLocalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:109, aSize:5, aShift:-35, aColors:["GREEN"], aButton:false, aVariable:"iLocalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:121, aSize:5, aShift:35, aColors:["VIOLET"], aButton:false, aVariable:"iLocalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:121, aSize:5, aShift:-35, aColors:["VIOLET"], aButton:false, aVariable:"iLocalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:133, aSize:5, aShift:35, aColors:["AQUA"], aButton:false, aVariable:"iLocalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:133, aSize:5, aShift:-35, aColors:["AQUA"], aButton:false, aVariable:"iLocalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:85, aSize:5, aShift:35, aColors:["BLUE"], aButton:false, aVariable:"iPersonalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:85, aSize:5, aShift:-35, aColors:["BLUE"], aButton:false, aVariable:"iPersonalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:97, aSize:5, aShift:35, aColors:["MAGENTA"], aButton:false, aVariable:"iPersonalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:97, aSize:5, aShift:-35, aColors:["MAGENTA"], aButton:false, aVariable:"iPersonalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:109, aSize:5, aShift:35, aColors:["GREEN"], aButton:false, aVariable:"iPersonalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:109, aSize:5, aShift:-35, aColors:["GREEN"], aButton:false, aVariable:"iPersonalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:121, aSize:5, aShift:35, aColors:["VIOLET"], aButton:false, aVariable:"iPersonalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:121, aSize:5, aShift:-35, aColors:["VIOLET"], aButton:false, aVariable:"iPersonalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"Name", aRow:133, aSize:5, aShift:35, aColors:["AQUA"], aButton:false, aVariable:"iPersonalName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"000000", aRow:133, aSize:5, aShift:-35, aColors:["AQUA"], aButton:false, aVariable:"iPersonalScore", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strMenu, aRow:150, aSize:6, aShift:30, aColors:["AQUA"], aButton:true, aVariable:"iMenu", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strClear, aRow:150, aSize:6, aShift:-30, aColors:["GREEN_LIGHT"], aButton:true, aVariable:"iClear", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}];
public static var OCursor:Class = TwinzL_OCursor;
public static var DelayBonus:Class = TwinzL_DelayBonus;
public static var OWGamePlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strSite, aRow:43, aSize:4, aShift:-23, aColors:["VIOLET"], aButton:true, aVariable:"iSite", aOrientation:OOrientationConfig.NORMAL, aVisible:false, aAdd:true, aAlign:OAlignConfig.RIGHT, aAnimation:true}, {aFunction:OInterfacePlatform.AddSimpleCounter, aCountRegister:9, aRow:96, aSize:6, aShift:(23 + 15), aColors:["ORANGE"], aButton:false, aVariable:"iCounter", aOrientation:OOrientationConfig.NORMAL, aVisible:false, aAlign:OAlignConfig.LEFT, aAdd:true, aAnimation:false, aRevers:true}, {aFunction:OInterfacePlatform.AddSimpleCounter, aCountRegister:9, aRow:96, aSize:6, aShift:(-23 - 15), aColors:["TURQUOISE"], aButton:false, aVariable:"iLinesLeft", aOrientation:OOrientationConfig.NORMAL, aVisible:false, aAlign:OAlignConfig.RIGHT, aAdd:true, aAnimation:false}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strMenu, aRow:152, aSize:5, aShift:-23, aColors:["AQUA"], aButton:true, aVariable:"iMenu", aOrientation:OOrientationConfig.NORMAL, aVisible:false, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strPause, aRow:43, aSize:4, aShift:23, aColors:["GREEN"], aButton:true, aVariable:"iPause", aOrientation:OOrientationConfig.NORMAL, aVisible:false, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddControlButton, aStr:"M", aSize:5, aRow:152, aShift:23, aColors:["BLUE"], aButton:true, aVariable:"iMusic", aAlign:OAlignConfig.LEFT, aAnimation:false, aVisible:false}, {aFunction:OInterfacePlatform.AddControlButton, aStr:"S", aSize:5, aRow:152, aShift:28, aColors:["BLUE"], aButton:true, aVariable:"iSound", aAlign:OAlignConfig.LEFT, aAnimation:false, aVisible:false}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strClickToContinue, aRow:117, aSize:5, aShift:0, aColors:OWColors, aButton:false, aVariable:"iPressToContinue", aOrientation:OOrientationConfig.NORMAL, aVisible:false, aAdd:true, aAlign:OAlignConfig.CENTER}];
public static var OWGameModeWindowPlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strGameMode, aRow:50, aSize:8, aShift:0, aColors:OWColors, aButton:false, aVariable:"iWindowName"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strAdventure, aRow:(70 + 5), aSize:6, aShift:0, aColors:["GREEN"], aButton:true, aVariable:"iAdventure"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strArcade, aRow:(85 + 5), aSize:6, aShift:0, aColors:["ORANGE"], aButton:true, aVariable:"iArcade"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strStrategy, aRow:(100 + 5), aSize:6, aShift:0, aColors:["BLUE"], aButton:true, aVariable:"iStrategy"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strPuzzle, aRow:(115 + 5), aSize:6, aShift:0, aColors:["VIOLET"], aButton:true, aVariable:"iPuzzle"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strBack, aRow:140, aSize:6, aShift:0, aColors:["AQUA"], aButton:true, aVariable:"iBack"}];
public static var OWErrorLoadPlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strErrorLoad, aRow:100, aSize:7, aColors:OWColors, aButton:false, aVariable:null}];
public static var IsPause:Boolean = false;
public static var OWMenuPlatform:Array = [{aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strChangeName, aRow:(53 + 4), aShift:2, aWidth:-1, aHeight:2, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0, aLetterSpacing:0.1, aSize:1.2, aAlign:TextFormatAlign.CENTER}, aSize:2, aColors:["BLUE"], aVariable:"iChangeName", aAlign:OAlignConfig.CENTER, aButton:true, aAnimation:false, aBorders:"ulr"}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:"", aRow:(47 + 4), aShift:2, aWidth:-1, aHeight:3, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0, aLetterSpacing:0.3, aSize:2.5, aAlign:TextFormatAlign.CENTER}, aSize:2, aColors:["ORANGE"], aVariable:"iName", aAlign:OAlignConfig.CENTER, aButton:true, aAnimation:false, aBorders:"ud"}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strWelcome, aRow:(41 + 4), aShift:2, aWidth:-1, aHeight:3, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0, aLetterSpacing:0.1, aSize:2, aAlign:TextFormatAlign.CENTER}, aSize:2, aColors:["AZURE"], aVariable:"iWelcome", aAlign:OAlignConfig.CENTER, aButton:true, aAnimation:false, aBorders:"rld"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strPlay, aRow:72, aSize:11, aShift:0, aColors:["ORANGE"], aButton:true, aVariable:"iNewGame"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strHighScores, aRow:115, aSize:7, aShift:0, aColors:["VIOLET"], aButton:true, aVariable:"iHighScores"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strInstructions, aRow:130, aSize:7, aShift:0, aColors:["BLUE"], aButton:true, aVariable:"iInstruction"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strMoreGames, aRow:145, aSize:7, aShift:0, aColors:["AZURE"], aButton:true, aVariable:"iMoreGames"}];
public static var OWLevelPlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strLevel, aRow:100, aSize:7, aColors:OWColors, aButton:false, aVariable:null}];
public static var cLastGame:Object = {aGameMode:null, aLevel:-1};
public static var OFont:Class = TwinzL_OFont;
public static var OWShablon:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strHighScores, aRow:98, aSize:5, aShift:-3, aColors:["ORANGE"], aButton:true, aVariable:null}];
public static var OPauseSymbol:Class = TwinzL_OPauseSymbol;
public static var OKrestSymbol:Class = TwinzL_OKrestSymbol;
public static var OWColors:Array = ["RED", "ORANGE", "GREEN_LIGHT", "GREEN", "TURQUOISE", "AQUA", "AZURE", "BLUE", "VIOLET", "MAGENTA", "RED_VIOLET"];
public static var OWConnectionPlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strLoading, aRow:100, aSize:7, aColors:OWColors, aButton:false, aVariable:null}];
public static var OWResultsPlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strLevelComplete, aRow:55, aSize:8, aShift:0, aColors:OWColors, aButton:false, aVariable:"iWindowName", aAdd:false}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strLevelFailed, aRow:55, aSize:8, aShift:0, aColors:OWColors, aButton:false, aVariable:"iWindowName", aAdd:false}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strGameComplete, aRow:55, aSize:8, aShift:0, aColors:OWColors, aButton:false, aVariable:"iWindowName", aAdd:true}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strScore, aRow:85, aSize:6, aShift:30, aColors:["RED"], aButton:false, aVariable:"iScoreStr", aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"", aRow:85, aSize:6, aShift:-30, aColors:["RED"], aButton:false, aVariable:"iScoreValue", aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strBonusScore, aRow:95, aSize:6, aShift:30, aColors:["BLUE"], aButton:false, aVariable:"iBScoreStr", aAdd:false, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"", aRow:95, aSize:6, aShift:-30, aColors:["BLUE"], aButton:false, aVariable:"iBscoreValue", aAdd:false, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strTotalScore, aRow:95, aSize:6, aShift:30, aColors:["ORANGE"], aButton:false, aVariable:"iTScoreStr", aAdd:false, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"", aRow:95, aSize:6, aShift:-30, aColors:["ORANGE"], aButton:false, aVariable:"iTScoreValue", aAdd:false, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strReiting, aRow:105, aSize:7, aShift:30, aColors:["GREEN"], aButton:false, aVariable:"iReitingStr", aAdd:true, aAlign:OAlignConfig.LEFT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:"", aRow:105, aSize:7, aShift:-30, aColors:["GREEN"], aButton:false, aVariable:"iReitingValue", aAdd:true, aAlign:OAlignConfig.RIGHT}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strNextLevel, aRow:130, aSize:6, aShift:0, aColors:["VIOLET"], aButton:true, aVariable:"iNext", aAdd:false}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strPlayAgain, aRow:130, aSize:6, aShift:0, aColors:["VIOLET"], aButton:true, aVariable:"iNext", aAdd:true}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strMenu, aRow:145, aSize:6, aShift:0, aColors:["AQUA"], aButton:true, aVariable:"iMenu"}];
public static var OWInstruction:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strInstructions, aRow:47, aSize:10, aShift:0, aRowSpace:2, aWidth:10, aColors:OWColors, aButton:false, aVariable:"iName", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleBorder, aRow:63, aShift:30, aSize:2, aWidth:28, aHeigth:33, aColors:["RED"], aVariable:"iBorder", aBackground:true}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strInstructionsText, aRow:63, aShift:90, aWidth:42, aHeight:33, aTextSetings:{aTextWidth:0.95, aIndent:1, aLeading:0.3, aLetterSpacing:0.1, aSize:(((3 / 2) * 7) / 9), aAlign:TextFormatAlign.JUSTIFY}, aSize:2, aColors:["BLUE"], aVariable:"iText"}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strInstructionBonusText1, aRow:132, aShift:36, aWidth:22, aHeight:3, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0.3, aLetterSpacing:0.1, aSize:1.1, aAlign:TextFormatAlign.CENTER}, aSize:2, aColors:["VIOLET"], aVariable:"iBonusText1"}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strInstructionBonusText3, aRow:132, aShift:106, aWidth:25, aHeight:3, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0.3, aLetterSpacing:0.1, aSize:1.1, aAlign:TextFormatAlign.LEFT}, aSize:2, aColors:["VIOLET"], aVariable:"iBonusText2"}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strInstructionBonusText2, aRow:141, aShift:113, aWidth:25, aHeight:3, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0.3, aLetterSpacing:0.1, aSize:1.1, aAlign:TextFormatAlign.LEFT}, aSize:2, aColors:["VIOLET"], aVariable:"iBonusText3"}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strInstructionBonusText4, aRow:142, aShift:50, aWidth:13, aHeight:2, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0, aLetterSpacing:0.1, aSize:1.1, aAlign:TextFormatAlign.LEFT}, aSize:2, aColors:["VIOLET"], aVariable:"iBonusText4"}, {aFunction:OInterfacePlatform.AddCustomSimpleText, aStr:strInstructionBonusTextDop, aRow:148, aShift:25, aWidth:60, aHeight:6, aTextSetings:{aTextWidth:1, aIndent:0, aLeading:0.6, aLetterSpacing:0.1, aSize:((1.5 * 8) / 9), aAlign:TextFormatAlign.CENTER}, aSize:2, aColors:["RED"], aVariable:"iBonusText"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strBack, aRow:152, aSize:5, aShift:-27, aColors:["AQUA"], aButton:true, aVariable:"iBack", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.RIGHT}];
public static var OBomb:Class = TwinzL_OBomb;
public static var cLevelsConfig:Object = null;
public static var OWClearScoreConfirm:Array = [{aFunction:OInterfacePlatform.AddSimpleText, aStr:strDeleteScoresConfirm, aRow:70, aSize:7, aShift:0, aRowSpace:2, aColors:["VIOLET"], aButton:false, aVariable:null, aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strAccept, aRow:130, aSize:6, aShift:-30, aColors:["GREEN"], aButton:true, aVariable:"iOk", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strCancel, aRow:130, aSize:6, aShift:30, aColors:["RED"], aButton:true, aVariable:"iCancel", aOrientation:OOrientationConfig.NORMAL, aVisible:true, aAdd:true, aAlign:OAlignConfig.CENTER}];
public static var cFirstGame:Boolean = true;
public static var OSoundSymbol:Class = TwinzL_OSoundSymbol;
public static var iGAME:OGame = new OCGame();
public static var OWIntroPlatform:Array = [{aFunction:OInterfacePlatform.AddSimpleWord, aStr:strSite, aRow:65, aSize:7, aShift:0, aColors:OWColors, aButton:false, aVariable:"iSiteName"}, {aFunction:OInterfacePlatform.AddSimpleWord, aStr:strPresents, aRow:130, aSize:7, aShift:0, aColors:OWColors, aButton:false, aVariable:"iPresent"}];
public static var OBgr:Class = TwinzL_OBgr;
}
}//package
Section 96
//TwinzL_DelayBonus (TwinzL_DelayBonus)
package {
import mx.core.*;
public class TwinzL_DelayBonus extends SpriteAsset {
}
}//package
Section 97
//TwinzL_OBgr (TwinzL_OBgr)
package {
import mx.core.*;
public class TwinzL_OBgr extends SpriteAsset {
}
}//package
Section 98
//TwinzL_OBomb (TwinzL_OBomb)
package {
import mx.core.*;
public class TwinzL_OBomb extends SpriteAsset {
}
}//package
Section 99
//TwinzL_OCursor (TwinzL_OCursor)
package {
import mx.core.*;
public class TwinzL_OCursor extends SpriteAsset {
}
}//package
Section 100
//TwinzL_OFont (TwinzL_OFont)
package {
import mx.core.*;
public class TwinzL_OFont extends SpriteAsset {
}
}//package
Section 101
//TwinzL_OKrestSymbol (TwinzL_OKrestSymbol)
package {
import mx.core.*;
public class TwinzL_OKrestSymbol extends SpriteAsset {
}
}//package
Section 102
//TwinzL_OMusicSymbol (TwinzL_OMusicSymbol)
package {
import mx.core.*;
public class TwinzL_OMusicSymbol extends SpriteAsset {
}
}//package
Section 103
//TwinzL_OPauseSymbol (TwinzL_OPauseSymbol)
package {
import mx.core.*;
public class TwinzL_OPauseSymbol extends SpriteAsset {
}
}//package
Section 104
//TwinzL_OSoundSymbol (TwinzL_OSoundSymbol)
package {
import mx.core.*;
public class TwinzL_OSoundSymbol extends SpriteAsset {
}
}//package