Section 1
//Main (com.midasplayer.particle.Main)
package com.midasplayer.particle {
import flash.events.*;
import flash.display.*;
public class Main extends Sprite {
private var minAlpha:Number;// = 0.01
private var maxAlpha:Number;// = 0.02
private var emitter;
private var minXVel:Number;// = -1
private var minSize:Number;// = 12
private var maxXVel:Number;// = 1
private var maxSize:Number;// = 29
private var particles:Array;
private var numParticles:int;// = 20
private var minYVel:Number;// = -1
private var maxYVel:Number;// = 1
public function Main(){
numParticles = 20;
minXVel = -1;
maxXVel = 1;
minYVel = -1;
maxYVel = 1;
minSize = 12;
maxSize = 29;
minAlpha = 0.01;
maxAlpha = 0.02;
particles = new Array();
super();
addEventListener(Event.ENTER_FRAME, _nn244);
}
public function _od195(_arg1):void{
emitter = _arg1;
}
private function _ct145(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function _nn244(_arg1:Event){
_un122();
}
public function _cq156():void{
var _local1:Number;
removeEventListener(Event.ENTER_FRAME, _nn244);
_local1 = 0;
while (_local1 < particles.length) {
particles[_local1]._po433();
_local1++;
};
}
private function _un122():void{
var _local1:*;
var _local2:Number;
_local1 = new Particle(spark, emitter, -10, -7, stage.stageWidth, stage.stageHeight);
_local1._sd74(_ct145(minXVel, maxXVel), _ct145(minYVel, maxYVel));
_local1.setSize(_ct145(minSize, maxSize));
particles.push(_local1);
while (particles.length > numParticles) {
_local1 = particles.shift();
_local1._po433();
};
_local2 = 0;
while (_local2 < particles.length) {
particles[_local2].update();
_local2++;
};
}
}
}//package com.midasplayer.particle
Section 2
//Particle (com.midasplayer.particle.Particle)
package com.midasplayer.particle {
import flash.display.*;
import flash.geom.*;
public class Particle {
private var _yVel:Number;
private var _xVel:Number;
private var _stageHeight:Number;
private var _alphaDecr:Number;// = 0
private var clip:DisplayObject;
private var _stageWidth:Number;
public function Particle(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
_alphaDecr = 0;
super();
_stageWidth = _arg5;
_stageHeight = _arg6;
clip = new (_arg1);
_arg2.addChild(clip);
clip.x = _arg3;
clip.y = _arg4;
}
public function update(){
clip.x = (clip.x + _xVel);
clip.y = (clip.y + _yVel);
clip.alpha = (clip.alpha - _alphaDecr);
}
public function setSize(_arg1:Number){
clip.width = _arg1;
clip.height = _arg1;
}
public function _nw109(_arg1:Number){
var _local2:ColorTransform;
_local2 = new ColorTransform();
_local2.color = _arg1;
clip.transform.colorTransform = _local2;
}
public function _rh388(_arg1:Number):void{
_alphaDecr = _arg1;
}
public function _po433():void{
clip.parent.removeChild(clip);
clip = null;
}
public function _sd74(_arg1:Number, _arg2:Number){
_xVel = _arg1;
_yVel = _arg2;
}
}
}//package com.midasplayer.particle
Section 3
//DragonLoader (com.midasplayer.DragonLoader)
package com.midasplayer {
import flash.events.*;
import flash.display.*;
import fl.transitions.*;
import flash.media.*;
import flash.utils.*;
import fl.transitions.easing.*;
public class DragonLoader extends MovieClip {
public var fireLogoHolder:MovieClip;
public var mcPlayBtn:MovieClip;
private var m_dragonClip:MovieClip;
public var m_bannedSign:MovieClip;
private var m_glimmerTween:Tween;
private var m_bg:Sprite;
private var m_playBtnTween:Tween;
public var bannedSign:MovieClip;
public var m_fireLogoClip:MovieClip;
private var oldFrameRate:int;
private var m_fireLogoTween:Tween;
private var m_sndBell:Sound;
private var m_glimmer:MovieClip;
public var m_playBtn:MovieClip;
public static var LAUNCH_GAME:String = "_ot223";
public function DragonLoader(){
this.x = (this.y = 0);
m_bannedSign = bannedSign;
m_bannedSign.bg.width = stage.stageWidth;
m_bannedSign.bg.height = stage.stageHeight;
m_bannedSign.alpha = 0;
m_bannedSign.addEventListener(MouseEvent.CLICK, _ja462);
m_bannedSign.buttonMode = true;
m_fireLogoClip = fireLogoHolder;
m_fireLogoClip.x = ((m_bannedSign.bg.width - m_fireLogoClip.width) - 90);
m_fireLogoClip.y = (((m_bannedSign.bg.height / 2) - (m_fireLogoClip.height / 2)) - 60);
m_fireLogoClip.visible = false;
m_fireLogoClip.stop();
m_dragonClip = new mcDragon();
m_dragonClip.x = (m_bannedSign.bg.width - m_dragonClip.width);
m_dragonClip.y = ((m_bannedSign.bg.height / 2) - (m_dragonClip.height / 2));
m_dragonClip.stop();
m_playBtn = mcPlayBtn;
m_playBtn.buttonMode = true;
m_playBtn.alpha = 0;
m_sndBell = new sfxBell();
}
public function _po433():void{
var _local1:Sprite;
m_playBtn.removeEventListener(MouseEvent.ROLL_OVER, _on264);
m_playBtn.removeEventListener(MouseEvent.ROLL_OUT, _rm36);
m_playBtn.removeEventListener(MouseEvent.MOUSE_DOWN, _vy337);
m_playBtn.removeEventListener(MouseEvent.MOUSE_UP, _ot223);
if (m_fireLogoTween != null){
m_fireLogoTween.removeEventListener(TweenEvent.MOTION_FINISH, _fm254);
m_fireLogoTween = null;
};
_local1 = (this.parent.getChildByName("clickBg") as Sprite);
this.parent.removeChild(_local1);
this.parent.removeChild(this);
}
public function _ja462(_arg1:MouseEvent):void{
KingAPI.openLoaderMovieLink();
}
public function _mp301():void{
this.addChild(m_dragonClip);
this.setChildIndex(m_dragonClip, 0);
m_dragonClip.addEventListener(Event.ENTER_FRAME, _dl203);
m_dragonClip.play();
}
public function init(_arg1:String, _arg2:String=""):void{
if (_arg2 != ""){
MochiBot.track(this, _arg2);
};
oldFrameRate = root.stage.frameRate;
root.stage.frameRate = 30;
if (KingAPI.banned){
_cu250();
} else {
if (KingAPI.isHome){
_ot223(null);
} else {
_mp301();
};
};
}
private function _vy337(_arg1:MouseEvent):void{
m_playBtn.gotoAndStop("down");
}
public function _dl203(_arg1:Event):void{
if (m_dragonClip.currentFrame == 80){
m_fireLogoClip.visible = true;
m_fireLogoClip.play();
m_fireLogoTween = new Tween(m_fireLogoClip, "x", Regular.easeOut, m_fireLogoClip.x, (((stage.width / 2) - (m_dragonClip.width / 2)) - 51), 1, true);
m_fireLogoTween.addEventListener(TweenEvent.MOTION_FINISH, _fm254);
};
if (m_dragonClip.currentFrame == m_dragonClip.totalFrames){
m_dragonClip.removeEventListener(Event.ENTER_FRAME, _dl203);
m_dragonClip.stop();
m_playBtn.x = ((stage.width / 2) - (m_playBtn.width / 2));
m_playBtn.y = (m_fireLogoClip.y + 210);
m_playBtn.addEventListener(MouseEvent.ROLL_OVER, _on264);
m_playBtn.addEventListener(MouseEvent.ROLL_OUT, _rm36);
m_playBtn.addEventListener(MouseEvent.MOUSE_DOWN, _vy337);
m_playBtn.addEventListener(MouseEvent.MOUSE_UP, _ot223);
};
}
private function _fq209(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
_local2 = (m_fireLogoClip.x - m_glimmer.width);
_local3 = ((m_fireLogoClip.x + m_fireLogoClip.width) - 80);
m_glimmerTween = new Tween(m_glimmer, "x", None.easeNone, _local2, _local3, 0.5, true);
m_glimmerTween.addEventListener(TweenEvent.MOTION_FINISH, _cd335);
m_sndBell.play();
}
public function _ot223(_arg1:Event):void{
root.stage.frameRate = oldFrameRate;
trace(LAUNCH_GAME);
this.dispatchEvent(new Event(LAUNCH_GAME));
}
private function _on264(_arg1:MouseEvent):void{
m_playBtn.gotoAndStop("over");
}
private function _ub224(_arg1:Event):void{
if (m_fireLogoClip.currentFrame == m_fireLogoClip.totalFrames){
m_fireLogoClip.removeEventListener(Event.ENTER_FRAME, _ub224);
m_playBtnTween = new Tween(m_playBtn, "alpha", None.easeNone, 0, 1, 0.5, true);
m_glimmer = new mcGlimmer();
m_glimmer.x = (m_fireLogoClip.x - m_glimmer.width);
m_glimmer.y = (m_fireLogoClip.y + 112);
this.addChild(m_glimmer);
setTimeout(_fq209, 1000, null);
};
}
private function _rm36(_arg1:MouseEvent):void{
m_playBtn.gotoAndStop("idle");
}
private function _cd335(_arg1:Event):void{
m_glimmerTween.removeEventListener(TweenEvent.MOTION_FINISH, _cd335);
this.removeChild(m_glimmer);
}
private function _fm254(_arg1:Event):void{
m_fireLogoClip.addEventListener(Event.ENTER_FRAME, _ub224);
}
public function _cu250():void{
m_bannedSign.alpha = 1;
}
}
}//package com.midasplayer
Section 4
//KingAPI (com.midasplayer.KingAPI)
package com.midasplayer {
import flash.events.*;
import flash.external.*;
import flash.net.*;
public class KingAPI {
public static const LINK_TYPE_RIGHT_CLICK:String = "rightclick";
public static const USER_TYPE_SUBSCRIPTION:int = 3;
public static const LINK_TYPE_HIGHSCORES:String = "highscores";
public static const LINK_TYPE_SIGN:String = "sign";
public static const INITIALIZED_EVENT:String = "initialized";
public static const LINK_TYPE_OTHER_GAMES:String = "other_games";
public static const USER_TYPE_REGISTERED:int = 1;
private static const SAK:String = "ggfd7sday923mdsfd8csfds34";
private static const loadHomeParametersURL:String = "http://www.king.com/servlet/FreeGameServlet?action=load";
public static const LINK_TYPE_LOADER_MOVIE:String = "loader_movie";
private static const bounceURL:String = "http://www.mygame.com/king/bounce.jsp";
public static const LINK_TYPE_PROTECT:String = "protect";
public static const LINK_TYPE_ADD_GAME:String = "add_game";
public static const USER_TYPE_GOLD:int = 2;
public static const USER_TYPE_UNREGISTERED:int = 0;
public static const HOST_BANNED_EVENT:String = "hostBanned";
private static const SK:String = "vf78hxcsjak77cxzhjkwad87s";
private static const loadCountURL:String = "http://www.mygame.com/king/loadcount.jsp";
public static const LINK_TYPE_LOADER_PROGRESS:String = "loader_progress";
private static var check:String = null;
public static var gameName:String;
public static var banned:Boolean = false;
protected static var dispatcher:EventDispatcher;
public static var isHome:Boolean = false;
private static var sessionID:String;
private static var iscore:int = 123;
public static var fromURL:String;
private static var SSK:String = "ng43ui54hy35tdsnd6f54rews";
private static function loadUrlErrorHandler(_arg1:Event):void{
trace(("Unable to load url: " + _arg1));
}
public static function resetScore():void{
iscore = 123;
check = null;
}
public static function openOfflineProtectionLink():void{
_iv146(LINK_TYPE_PROTECT);
}
public static function init(_arg1:String, _arg2:String):void{
var loadCounter:URLLoader;
var reqvars:URLVariables;
var request:URLRequest;
var so:SharedObject;
var rnd1:Number;
var rnd2:Number;
var name = _arg1;
var from = _arg2;
gameName = name;
fromURL = from;
loadCounter = new URLLoader();
reqvars = new URLVariables();
reqvars.game = gameName;
reqvars.from = fromURL;
try {
so = SharedObject.getLocal("sessionId");
if (so.data.sessionID == null){
rnd1 = Math.abs(Math.floor((Math.random() * 4294967295)));
rnd2 = Math.abs(Math.floor((Math.random() * 4294967295)));
so.data.sessionID = (rnd1.toString(16) + rnd2.toString(16));
so.flush();
};
sessionID = so.data.sessionID;
} catch(e:Error) {
sessionID = "error";
};
reqvars.session = sessionID;
request = new URLRequest(((loadCountURL + "?") + reqvars.toString()));
loadCounter.addEventListener(Event.COMPLETE, loadCountHandler);
loadCounter.addEventListener(IOErrorEvent.IO_ERROR, loadUrlErrorHandler);
loadCounter.addEventListener(SecurityErrorEvent.SECURITY_ERROR, loadUrlErrorHandler);
try {
loadCounter.load(request);
} catch(error:Error) {
trace(("Unable to load loadcount url: " + loadCountURL));
trace(error.message);
};
}
private static function loadHomeParametersHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
trace(("loadCounter.data" + _local2.data));
}
public static function submitInternalScore():void{
var _local1:int;
checkScore();
_local1 = ((iscore - 123) / 2);
submitScore(_local1);
}
public static function openOtherGamesLink():void{
_iv146(LINK_TYPE_OTHER_GAMES);
}
public static function _iv146(_arg1:String, _arg2:String=null):void{
var _local3:URLVariables;
var _local4:String;
_local3 = new URLVariables();
_local3.game = gameName;
_local3.from = fromURL;
_local3.type = _arg1;
_local3.session = sessionID;
if (_arg2 != null){
_local3.redirect = _arg2;
};
_local4 = "_blank";
if (isHome){
_local4 = "_top";
};
navigateToURL(new URLRequest(((bounceURL + "?") + _local3.toString())), _local4);
}
private static function loadCountHandler(_arg1:Event):void{
var loadCounter:URLLoader;
var vars:URLVariables;
var event = _arg1;
loadCounter = URLLoader(event.target);
trace(("loadCounter.data :" + loadCounter.data));
try {
vars = new URLVariables(loadCounter.data);
if (vars.h == "true"){
isHome = true;
};
if (vars.b == "true"){
banned = true;
dispatcher.dispatchEvent(new Event(HOST_BANNED_EVENT));
} else {
dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT));
};
trace((("::" + vars.h) + "::"));
trace((("::" + vars.b) + "::"));
} catch(e:Error) {
trace(("Error reading data from loadcount url: " + e));
};
}
public static function addEventListener(_arg1:String, _arg2:Function):void{
if (dispatcher == null){
dispatcher = new EventDispatcher();
};
dispatcher.addEventListener(_arg1, _arg2);
}
public static function openLoaderMovieLink():void{
_iv146(LINK_TYPE_LOADER_MOVIE);
}
public static function removeEventListener(_arg1:String, _arg2:Function):void{
if (dispatcher == null){
return;
};
dispatcher.removeEventListener(_arg1, _arg2);
}
public static function submitScore(_arg1:int):void{
var hash:String;
var score = _arg1;
hash = md5.encrypt(((((score + ":") + gameName) + ":") + SSK));
try {
if (isHome){
ExternalInterface.call("submitScore", score, hash);
} else {
_iv146(LINK_TYPE_HIGHSCORES, ((((("game/" + gameName) + "/submit/") + score) + ":") + hash));
};
} catch(e:Error) {
trace(e);
};
}
public static function submitLevel(_arg1:int):void{
var hash:String;
var level = _arg1;
hash = md5.encrypt(((((level + ":") + gameName) + ":") + SSK));
try {
if (isHome){
ExternalInterface.call("submitLevel", level, hash);
};
} catch(e:Error) {
trace(e);
};
}
public static function openHighscoresLink():void{
_iv146(LINK_TYPE_HIGHSCORES, (("game/" + gameName) + "/highscores"));
}
public static function openSignLink():void{
if (!isHome){
_iv146(LINK_TYPE_SIGN);
};
}
public static function openRightClickLink():void{
_iv146(LINK_TYPE_RIGHT_CLICK);
}
private static function checkScore():void{
if (check != null){
if (check != md5.encrypt(((((iscore + ":") + gameName) + ":") + SK))){
SSK = "ng41ui54hy35tdsnd6f54rews";
};
};
}
public static function addScore(_arg1:int):int{
var _local2:int;
checkScore();
_local2 = ((iscore - 123) / 2);
_local2 = (_local2 + _arg1);
iscore = ((_local2 * 2) + 123);
check = md5.encrypt(((((iscore + ":") + gameName) + ":") + SK));
return (_local2);
}
public static function openLoaderProgressLink():void{
_iv146(LINK_TYPE_LOADER_PROGRESS);
}
public static function openAddToWebsiteLink():void{
_iv146(LINK_TYPE_ADD_GAME, "website_content.jsp");
}
public static function submitAchievement(_arg1:String):void{
var hash:String;
var achievement = _arg1;
hash = md5.encrypt(((((achievement + ":") + gameName) + ":") + SAK));
try {
if (isHome){
ExternalInterface.call("submitAchievement", achievement, hash);
};
} catch(e:Error) {
trace(e);
};
}
}
}//package com.midasplayer
Section 5
//md5 (com.midasplayer.md5)
package com.midasplayer {
public class md5 {
public static const HEX_FORMAT_LOWERCASE:uint = 0;
public static const HEX_FORMAT_UPPERCASE:uint = 1;
public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = "";
public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "=";
public static var hexcase:uint = 0;
public static var b64pad:String = "";
public static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{
return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3));
}
public static function binl_md5(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32)));
_arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2;
_local3 = 1732584193;
_local4 = -271733879;
_local5 = -1732584194;
_local6 = 271733878;
_local7 = 0;
while (_local7 < _arg1.length) {
_local8 = _local3;
_local9 = _local4;
_local10 = _local5;
_local11 = _local6;
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551);
_local3 = safe_add(_local3, _local8);
_local4 = safe_add(_local4, _local9);
_local5 = safe_add(_local5, _local10);
_local6 = safe_add(_local6, _local11);
_local7 = (_local7 + 16);
};
return ([_local3, _local4, _local5, _local6]);
}
public static function str2rstr_utf16le(_arg1:String):String{
var _local2:String;
var _local3:Number;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function hex_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function binl2rstr(_arg1:Array):String{
var _local2:String;
var _local3:Number;
_local2 = "";
_local3 = 0;
while (_local3 < (_arg1.length * 32)) {
_local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF)));
_local3 = (_local3 + 8);
};
return (_local2);
}
public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2binl(_arg1:String):Array{
var _local2:Number;
var _local3:Array;
_local2 = 0;
_local3 = new Array((_arg1.length >> 2));
_local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = 0;
_local2++;
};
_local2 = 0;
while (_local2 < (_arg1.length * 8)) {
_local3[(_local2 >> 5)] = (_local3[(_local2 >> 5)] | ((_arg1.charCodeAt((_local2 / 8)) & 0xFF) << (_local2 % 32)));
_local2 = (_local2 + 8);
};
return (_local3);
}
public static function md5_vm_test():Boolean{
return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"));
}
public static function b64_md5(_arg1:String):String{
return (rstr2b64(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function any_hmac_md5(_arg1:String, _arg2:String, _arg3:String):String{
return (rstr2any(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)), _arg3));
}
public static function hex_md5(_arg1:String):String{
return (rstr2hex(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function bit_rol(_arg1:Number, _arg2:Number):Number{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public static function encrypt(_arg1:String):String{
return (hex_md5(_arg1));
}
public static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2hex(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
_local2 = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
_local3 = "";
_local5 = 0;
while (_local5 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local5);
_local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15))));
_local5++;
};
return (_local3);
}
public static function any_md5(_arg1:String, _arg2:String):String{
return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2));
}
public static function b64_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function rstr2b64(_arg1:String):String{
var _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
_local3 = "";
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0);
_local7 = 0;
while (_local7 < 4) {
if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){
_local3 = (_local3 + b64pad);
} else {
_local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63)));
};
_local7++;
};
_local5 = (_local5 + 3);
};
return (_local3);
}
public static function safe_add(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
var _local4:Number;
_local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
_local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function str2rstr_utf8(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = "";
_local3 = -1;
while (++_local3 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local3);
_local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0;
if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){
_local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023));
_local3++;
};
if (_local4 <= 127){
_local2 = (_local2 + String.fromCharCode(_local4));
} else {
if (_local4 <= 2047){
_local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 0xFFFF){
_local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 2097151){
_local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
};
};
};
};
};
return (_local2);
}
public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = rstr2binl(_arg1);
if (_local3.length > 16){
_local3 = binl_md5(_local3, (_arg1.length * 8));
};
_local4 = new Array(16);
_local5 = new Array(16);
_local6 = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
_local7 = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8)));
return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128))));
}
public static function str2rstr_utf16be(_arg1:String):String{
var _local2:String;
var _local3:Number;
_local2 = "";
_local3 = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function rstr2any(_arg1:String, _arg2:String):String{
var _local3:Number;
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local9:Array;
var _local10:String;
_local3 = _arg2.length;
_local4 = [];
_local9 = ((_arg1.length / 2) as Array);
_local5 = 0;
while (_local5 < _local9.length) {
_local9[_local5] = ((_arg1.charCodeAt((_local5 * 2)) << 8) | _arg1.charCodeAt(((_local5 * 2) + 1)));
_local5++;
};
while (_local9.length > 0) {
_local8 = [];
_local7 = 0;
_local5 = 0;
while (_local5 < _local9.length) {
_local7 = ((_local7 << 16) + _local9[_local5]);
_local6 = Math.floor((_local7 / _local3));
_local7 = (_local7 - (_local6 * _local3));
if ((((_local8.length > 0)) || ((_local6 > 0)))){
_local8[_local8.length] = _local6;
};
_local5++;
};
_local4[_local4.length] = _local7;
_local9 = _local8;
};
_local10 = "";
_local5 = (_local4.length - 1);
while (_local5 >= 0) {
_local10 = (_local10 + _arg2.charAt(_local4[_local5]));
_local5--;
};
return (_local10);
}
public static function rstr_md5(_arg1:String):String{
return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8))));
}
}
}//package com.midasplayer
Section 6
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 7
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 8
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 9
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 10
//mcBannedSign_6 (king_mc_fla.mcBannedSign_6)
package king_mc_fla {
import flash.display.*;
public dynamic class mcBannedSign_6 extends MovieClip {
public var bg:MovieClip;
}
}//package king_mc_fla
Section 11
//mcFireLogo_5 (king_mc_fla.mcFireLogo_5)
package king_mc_fla {
import flash.display.*;
public dynamic class mcFireLogo_5 extends MovieClip {
public function mcFireLogo_5(){
addFrameScript(72, _wc194);
}
function _wc194(){
stop();
}
}
}//package king_mc_fla
Section 12
//mcLoadLogo_2 (king_mc_fla.mcLoadLogo_2)
package king_mc_fla {
import flash.display.*;
public dynamic class mcLoadLogo_2 extends MovieClip {
public var bar:MovieClip;
}
}//package king_mc_fla
Section 13
//mcPlayBtn_8 (king_mc_fla.mcPlayBtn_8)
package king_mc_fla {
import flash.display.*;
public dynamic class mcPlayBtn_8 extends MovieClip {
public function mcPlayBtn_8(){
addFrameScript(0, _bn83);
}
function _bn83(){
stop();
}
}
}//package king_mc_fla
Section 14
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Fragment:Number;
private var Sibling:MochiDigits;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function get value():Number{
return (Number(this.toString()));
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function _oc1225(_arg1:Number):void{
value = (value + _arg1);
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
_vc149();
}
public function _vc149():void{
var _local1:uint = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
}
}//package mochi.as3
Section 15
//MochiScores (mochi.as3.MochiScores)
package mochi.as3 {
import flash.display.*;
import flash.text.*;
public class MochiScores {
public static var onCloseHandler:Object;
public static var onErrorHandler:Object;
private static var boardID:String;
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiServices.warnID(_arg1, true);
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
public static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
var _local2:Object = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
}
}//package mochi.as3
Section 16
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _id:String;
private static var _container:Object;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _timer:Timer;
private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _swfVersion:String;
private static var _listenChannel:LocalConnection;
private static var _listenChannelName:String = "__ms_";
private static var _sendChannel:LocalConnection;
private static var _sendChannelName:String;
private static var _connecting:Boolean = false;
private static var _connected:Boolean = false;
public static var netup:Boolean = true;
public static var netupAttempted:Boolean = false;
public static var onError:Object;
public static var widget:Boolean = false;
public static function get id():String{
return (_id);
}
public static function get clip():Object{
return (_container);
}
public static function get childClip():Object{
return (_clip);
}
public static function getVersion():String{
return ("3.02 as3");
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
public static function get connected():Boolean{
return (_connected);
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
warnID(id, false);
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
var mc:MovieClip = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var id = _arg1;
var clip = _arg2;
var clipname:String = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(clip).servicesURL != undefined){
_servicesURL = urlOptions(clip).servicesURL;
};
MochiServices.allowDomains(_servicesURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
var f:Function = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999))));
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
var req:URLRequest = new URLRequest(_servicesURL);
var vars:URLVariables = new URLVariables();
vars.listenLC = _listenChannelName;
vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options;
if (widget){
vars.widget = true;
};
req.data = vars;
listen();
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var methodName:String;
var pkg = _arg1;
var cb:String = pkg.callbackID;
var cblst:Object = this.client._callbacks[cb];
if (!cblst){
return;
};
var method:* = cblst.callbackMethod;
methodName = "";
var obj:Object = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
trace("connected!");
_connecting = false;
_connected = true;
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function warnID(_arg1:String, _arg2:Boolean):void{
_arg1 = _arg1.toLowerCase();
if (_arg1.length != 16){
trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length"));
return;
} else {
if (_arg1 == "1e113c7239048b3f"){
if (_arg2){
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
};
return;
} else {
if (_arg1 == "84993a1de4031cd8"){
if (_arg2){
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
};
return;
};
};
};
var _local3:Number = 0;
while (_local3 < _arg1.length) {
switch (_arg1.charAt(_local3)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
trace(("WARNING: Board ID contains illegal characters: " + _arg1));
return;
};
_local3++;
};
}
private static function urlOptions(_arg1:Object):Object{
var _local4:Array;
var _local5:Number;
var _local6:Array;
var _local2:Object = {};
var _local3:String = _arg1.loaderInfo.parameters.mochiad_options;
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var avm1Click:DisplayObject;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var _ep382 = _arg4;
var vars:Object = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
var s = "?";
var i:Number = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, _ep382);
var _local2:Rectangle = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local4:int;
var _local14:Loader;
var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
var _local6:Array = [0, 64, 0, 0, 0];
var _local7:MovieClip = new MovieClip();
var _local8:LocalConnection = new LocalConnection();
var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
var _local10:ByteArray = new ByteArray();
var _local11:ByteArray = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
var _local12:uint = ((_local3.length + _local11.length) + 4);
var _local13:uint = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
}
}//package mochi.as3
Section 17
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "4.0.0.7219";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
}
}//package mx.core
Section 18
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "4.0.0.7219";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 19
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "4.0.0.7219";
}
}//package mx.core
Section 20
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 21
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get root():DisplayObject;
function get stage():Stage;
function get name():String;
function set name(_arg1:String):void;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set mask(_arg1:DisplayObject):void;
function get visible():Boolean;
function set visible(_arg1:Boolean):void;
function get x():Number;
function set x(_arg1:Number):void;
function get y():Number;
function set y(_arg1:Number):void;
function get scaleX():Number;
function set scaleX(_arg1:Number):void;
function get scaleY():Number;
function set scaleY(_arg1:Number):void;
function get mouseX():Number;
function get mouseY():Number;
function get rotation():Number;
function set rotation(_arg1:Number):void;
function get alpha():Number;
function set alpha(_arg1:Number):void;
function get width():Number;
function set width(_arg1:Number):void;
function get height():Number;
function set height(_arg1:Number):void;
function get cacheAsBitmap():Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get opaqueBackground():Object;
function set opaqueBackground(_arg1:Object):void;
function get scrollRect():Rectangle;
function set scrollRect(_arg1:Rectangle):void;
function get filters():Array;
function set filters(_arg1:Array):void;
function get blendMode():String;
function set blendMode(_arg1:String):void;
function get transform():Transform;
function set transform(_arg1:Transform):void;
function get scale9Grid():Rectangle;
function set scale9Grid(_arg1:Rectangle):void;
function globalToLocal(_arg1:Point):Point;
function localToGlobal(_arg1:Point):Point;
function getBounds(_arg1:DisplayObject):Rectangle;
function getRect(_arg1:DisplayObject):Rectangle;
function get loaderInfo():LoaderInfo;
function hitTestObject(_arg1:DisplayObject):Boolean;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function get accessibilityProperties():AccessibilityProperties;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get measuredHeight():Number;
function get measuredWidth():Number;
function move(_arg1:Number, _arg2:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
}
}//package mx.core
Section 22
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaterIndices():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaters():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
}
}//package mx.core
Section 23
//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 24
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "4.0.0.7219";
}
}//package mx.core
Section 25
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "4.0.0.7219";
private static var counter:int = 0;
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function getUnqualifiedClassName(_arg1:Object):String{
var _local2:String;
if ((_arg1 is String)){
_local2 = (_arg1 as String);
} else {
_local2 = getQualifiedClassName(_arg1);
};
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
return (_local2);
}
}
}//package mx.utils
Section 26
//TDeleteUnqCellAnimation (pgn.animation.deleteUnique.TDeleteUnqCellAnimation)
package pgn.animation.deleteUnique {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
public class TDeleteUnqCellAnimation extends TBaseTotemEffectAnimation {
public function TDeleteUnqCellAnimation(_arg1:int){
ParticleId = _arg1;
}
override public function _qr2007():void{
var _local1:int;
var _local2:Number;
var _local3:Point;
var _local4:int;
var _local5:int;
var _local6:TDeleteUnqCellParticle;
var _local7:Number;
if ((Position + Delta) < MaxPosition){
_local1 = Math.floor(Position);
_local2 = (Position - _local1);
_local3 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local4 = 2;
_local5 = 0;
while (_local5 < _local4) {
_local6 = new TDeleteUnqCellParticle();
_local6.MaxAge = 32;
_local6.Age = 32;
_local6.Crd = _local3.clone();
_local6.Crd.x = (_local6.Crd.x + (Math.random() * 16));
_local6.Crd.y = (_local6.Crd.y + (Math.random() * 16));
_local7 = ((Math.random() * Math.PI) * 2);
_local6.Speed.x = Math.cos(_local7);
_local6.Speed.y = Math.sin(_local7);
_local6.Rotation = ((Math.random() * Math.PI) * 2);
_local6.RotationSpeed = ((Math.random() - 0.5) * 0.3);
_local6.Scale = (Math.random() * 0.3);
_local6.ScaleDelta = 0.02;
Particles.push(_local6);
TGlobalVars.ParticlesCnt++;
_local5++;
};
Position = (Position + Delta);
};
}
}
}//package pgn.animation.deleteUnique
Section 27
//TDeleteUnqCellParticle (pgn.animation.deleteUnique.TDeleteUnqCellParticle)
package pgn.animation.deleteUnique {
import pgn.animation.totemsEffects.particles.*;
public class TDeleteUnqCellParticle extends TTotemEffectParticle {
public function TDeleteUnqCellParticle(){
ColorTrans.redMultiplier = ((Math.random() * 0.6) + 0.2);
ColorTrans.greenMultiplier = ((Math.random() * 0.6) + 0.2);
ColorTrans.blueMultiplier = ((Math.random() * 0.6) + 0.2);
}
}
}//package pgn.animation.deleteUnique
Section 28
//TDeletedPiece (pgn.animation.deleting.TDeletedPiece)
package pgn.animation.deleting {
import flash.geom.*;
public class TDeletedPiece {
public var Speed:Point;// = null
public var Position:Point;// = null
public var Age:int;// = 0
public var ColorCode:int;// = -1
public var PieceIndex:int;// = -1
}
}//package pgn.animation.deleting
Section 29
//TDeletedPiecesList (pgn.animation.deleting.TDeletedPiecesList)
package pgn.animation.deleting {
import flash.geom.*;
import pgn.*;
import pgn.global.*;
public class TDeletedPiecesList {
public var MaxPieces:int;// = 0
public var MaxWoodPieces:int;// = 0
public var pieces:Array;
private var tmpArr:Array;
public function TDeletedPiecesList(){
pieces = new Array();
tmpArr = new Array();
super();
}
public function _lu173(_arg1:TCell):void{
var _local5:Number;
var _local2:TDeletedPiece;
var _local3:int;
var _local4:int = Funcs.CalcMaxPieces(MaxPieces);
_local3 = 0;
while (_local3 < _local4) {
_local2 = new TDeletedPiece();
_local2.Speed = _ox1743(4);
_local2.ColorCode = _arg1.ColorCode;
_local2.PieceIndex = _local3;
_local2.Position = _arg1.StageCrd.clone();
pieces.push(_local2);
TGlobalVars.ParticlesCnt++;
_local3++;
};
_local4 = Funcs.CalcMaxPieces(8);
_local3 = 0;
while (_local3 < _local4) {
_local2 = new TDeletedPiece();
_local2.ColorCode = _arg1.ColorCode;
_local2.PieceIndex = (-(Math.random()) * 16);
_local2.Speed = _ox1743(1);
_local5 = ((Math.random() * 2) * Math.PI);
_local2.Position = _arg1.StageCrd.clone();
_local2.Position.x = (_local2.Position.x + (Math.cos(_local5) * 12));
_local2.Position.y = (_local2.Position.y + (Math.sin(_local5) * 12));
pieces.push(_local2);
TGlobalVars.ParticlesCnt++;
_local3++;
};
}
public function _ij828(_arg1:int, _arg2:int):void{
var _local5:Number;
var _local3:TDeletedPiece;
var _local4:int;
_local4 = 0;
while (_local4 < 2) {
_local3 = new TDeletedPiece();
_local3.Speed = _ox1743(4);
_local3.ColorCode = 666;
_local3.PieceIndex = (Math.random() * MaxWoodPieces);
_local3.Position = new Point(_arg1, _arg2);
pieces.push(_local3);
TGlobalVars.ParticlesCnt++;
_local4++;
};
_local4 = 0;
while (_local4 < 4) {
_local3 = new TDeletedPiece();
_local3.ColorCode = 1;
_local3.PieceIndex = (-(Math.random()) * 16);
_local3.Speed = _ox1743(0.5);
_local3.Speed.y = (_local3.Speed.y * 2);
_local5 = ((Math.random() * 2) * Math.PI);
_local3.Position = new Point(_arg1, _arg2);
_local3.Position.x = (_local3.Position.x + (Math.cos(_local5) * 12));
_local3.Position.y = (_local3.Position.y + (Math.sin(_local5) * 12));
pieces.push(_local3);
TGlobalVars.ParticlesCnt++;
_local4++;
};
}
public function _qr2007():void{
var _local3:TDeletedPiece;
tmpArr.length = 0;
var _local1:int = pieces.length;
var _local2:int;
_local2 = 0;
while (_local2 < _local1) {
_local3 = pieces[_local2];
_local3.Age++;
_local3.Position.x = (_local3.Position.x + _local3.Speed.x);
if (_local3.PieceIndex < 0){
_local3.Position.y = (_local3.Position.y + (_local3.Speed.y + (_local3.Age / 3)));
} else {
_local3.Position.y = (_local3.Position.y + (_local3.Speed.y + (_local3.Age / 2)));
};
if ((((_local3.Position.y > 0)) && ((_local3.Position.y < 600)))){
tmpArr.push(_local3);
} else {
TGlobalVars.ParticlesCnt--;
};
_local2++;
};
_local1 = tmpArr.length;
pieces.length = _local1;
_local2 = 0;
while (_local2 < _local1) {
pieces[_local2] = tmpArr[_local2];
_local2++;
};
}
private function _ox1743(_arg1:Number):Point{
var _local2:Number = ((Math.random() * 2) * Math.PI);
var _local3:Number = (Math.cos(_local2) * _arg1);
var _local4:Number = (Math.sin(_local2) * _arg1);
return (new Point(_local3, _local4));
}
}
}//package pgn.animation.deleting
Section 30
//TPreDeleteCell (pgn.animation.deleting.TPreDeleteCell)
package pgn.animation.deleting {
import flash.geom.*;
public class TPreDeleteCell {
public var BeginPoint:Point;
public var EndPoint:Point;
public var ColorCode:int;// = 0
public var DeleteCounter:int;// = 0
public function TPreDeleteCell(){
BeginPoint = new Point();
EndPoint = new Point();
super();
}
}
}//package pgn.animation.deleting
Section 31
//TExplosion (pgn.animation.explosion.TExplosion)
package pgn.animation.explosion {
import flash.geom.*;
import pgn.*;
import flash.display.*;
import pgn.global.*;
public class TExplosion {
public var Center:Point;
public var Age:int;// = 0
public var LifeTime:int;// = 48
public var Fires:Array;
public var IsBigExpl:Boolean;// = false
public function TExplosion(_arg1:int, _arg2:int){
Center = new Point();
Fires = new Array();
super();
Center.x = (_arg1 + 16);
Center.y = (_arg2 + 16);
}
public function _pt1212():void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:Number;
var _local8:Number;
var _local9:TExplosionFire;
var _local1 = -1;
while (_local1 < 2) {
_local2 = -1;
while (_local2 < 2) {
if ((Math.abs(_local2) + Math.abs(_local1)) < 2){
_local3 = (((_local2 * 40) + Center.x) - 0);
_local4 = (((_local1 * 40) + Center.y) - 0);
_local5 = Funcs.CalcMaxPieces(8);
_local6 = 0;
while (_local6 < _local5) {
_local7 = ((Math.random() * 32) - 16);
_local8 = ((Math.random() * 32) - 16);
_local9 = new TExplosionFire((_local3 + _local7), (_local4 + _local8));
Fires.push(_local9);
TGlobalVars.ParticlesCnt++;
_local6++;
};
};
_local2++;
};
_local1++;
};
}
public function _de2055(_arg1:BitmapData):void{
var _local4:int;
var _local5:uint;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:TExplosionFire;
IsBigExpl = true;
LifeTime = 32;
var _local2:int = ((_arg1.width - 1) / 2);
var _local3:int;
while (_local3 < _arg1.height) {
_local4 = 0;
while (_local4 < _arg1.width) {
_local5 = _arg1.getPixel(_local4, _local3);
if (_local5 == 0xFF0000){
_local6 = (_local4 - _local2);
_local7 = (_local3 - _local2);
_local8 = ((_local6 * 40) + Center.x);
_local9 = ((_local7 * 40) + Center.y);
_local10 = 0;
while (_local10 < 4) {
_local11 = ((Math.random() * 40) - 20);
_local12 = ((Math.random() * 40) - 20);
_local13 = new TExplosionFire((_local8 + _local11), (_local9 + _local12));
Fires.push(_local13);
_local10++;
};
};
_local4++;
};
_local3++;
};
}
public function _qr2007():void{
var _local3:TExplosionFire;
Age++;
var _local1:int = Fires.length;
var _local2:int;
while (_local2 < _local1) {
_local3 = Fires[_local2];
_local3._qr2007();
_local2++;
};
}
}
}//package pgn.animation.explosion
Section 32
//TExplosionFire (pgn.animation.explosion.TExplosionFire)
package pgn.animation.explosion {
import flash.geom.*;
public class TExplosionFire {
public var pos:Point;// = null
public var frame:int;
public var delta:Point;
public var rotation:Number;
public var rotSpeed:Number;
public function TExplosionFire(_arg1:int, _arg2:int){
frame = (Math.random() * 16);
delta = new Point();
rotation = ((Math.random() * Math.PI) * 2);
rotSpeed = (((Math.random() - 0.5) * Math.PI) / 32);
super();
pos = new Point(_arg1, _arg2);
}
public function _qr2007():void{
rotation = (rotation + rotSpeed);
frame++;
frame = ((frame)<16) ? frame : 0;
}
}
}//package pgn.animation.explosion
Section 33
//TExplosionList (pgn.animation.explosion.TExplosionList)
package pgn.animation.explosion {
import pgn.global.*;
public class TExplosionList {
public var Explosions:Array;
public function TExplosionList(){
Explosions = new Array();
super();
}
public function _ma1405(_arg1:TExplosion):void{
Explosions.push(_arg1);
}
public function _qr2007():void{
var _local2:TExplosion;
var _local1:int;
while (_local1 < Explosions.length) {
_local2 = Explosions[_local1];
_local2._qr2007();
if (_local2.Age >= _local2.LifeTime){
TGlobalVars.ParticlesCnt = (TGlobalVars.ParticlesCnt - _local2.Fires.length);
};
_local1++;
};
Explosions = Explosions.filter(_vb78);
}
private function _vb78(_arg1, _arg2:int, _arg3:Array):Boolean{
var _local4:TExplosion = _arg1;
return (((_local4.Age)<_local4.LifeTime) ? true : false);
}
}
}//package pgn.animation.explosion
Section 34
//TLighting (pgn.animation.lighting.TLighting)
package pgn.animation.lighting {
import flash.geom.*;
import pgn.*;
public class TLighting {
public var points:Array;
public var Age:int;// = 0
public var LifeTime:int;// = 32
public function TLighting(){
points = new Array();
super();
}
public function _rh1849(_arg1:TCell):void{
var _local2:Point = _arg1._hm1968();
var _local3:Point = _arg1.LevelLink._cj1974(_local2.x, _local2.y);
_local3.x = (_local3.x + 16);
_local3.y = (_local3.y + 16);
points.push(_local3);
}
public function _qr2007():void{
Age++;
}
}
}//package pgn.animation.lighting
Section 35
//TLightingList (pgn.animation.lighting.TLightingList)
package pgn.animation.lighting {
public class TLightingList {
public var Lightings:Array;
public function TLightingList(){
Lightings = new Array();
super();
}
public function _uo1115(_arg1:TLighting):void{
Lightings.push(_arg1);
}
public function _qr2007():void{
var _local2:TLighting;
var _local1:int;
while (_local1 < Lightings.length) {
_local2 = Lightings[_local1];
_local2._qr2007();
_local1++;
};
Lightings = Lightings.filter(_vb78);
}
private function _vb78(_arg1, _arg2:int, _arg3:Array):Boolean{
var _local4:TLighting = _arg1;
return (((_local4.Age)<_local4.LifeTime) ? true : false);
}
}
}//package pgn.animation.lighting
Section 36
//TBaseTotemEffectAnimation (pgn.animation.totemsEffects.animation.TBaseTotemEffectAnimation)
package pgn.animation.totemsEffects.animation {
import flash.geom.*;
import pgn.*;
import pgn.global.*;
import pgn.animation.totemsEffects.particles.*;
public class TBaseTotemEffectAnimation {
public var Points:Array;
public var Position:Number;// = 0
public var MaxPosition:Number;// = 0
public var Delta:Number;// = 0
public var ParticleId:int;// = 0
public var Particles:Array;
public function TBaseTotemEffectAnimation(){
Points = new Array();
Particles = new Array();
super();
}
public function _wn796(_arg1:int):void{
var _local2:Point = Points.shift();
Points.unshift(_local2);
Points.unshift(_local2);
_local2 = Points.pop();
Points.push(_local2);
Points.push(_local2);
MaxPosition = (Points.length - 3);
Delta = (MaxPosition / _arg1);
}
public function _nv1624():Boolean{
return (((Particles.length)>0) ? true : false);
}
public function _qr2007():void{
var _local1:int;
var _local2:Number;
var _local3:Point;
var _local4:Point;
var _local5:int;
var _local6:int;
var _local7:TTotemEffectParticle;
if ((Position + Delta) < MaxPosition){
_local1 = Math.floor(Position);
_local2 = (Position - _local1);
_local3 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local1 = Math.floor((Position + Delta));
_local2 = ((Position + Delta) - _local1);
_local4 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2).x = (_local4.x - _local3.x);
_local4.y = (_local4.y - _local3.y);
_local5 = (_local4.length / 16);
_local5 = ((_local5)<1) ? 1 : _local5;
_local4.x = (_local4.x / _local5);
_local4.y = (_local4.y / _local5);
_local6 = 0;
while (_local6 < _local5) {
_local7 = new TTotemEffectParticle();
_local7.Crd = _local3.clone();
_local7.Crd.x = (_local7.Crd.x + (_local4.x * _local6));
_local7.Crd.y = (_local7.Crd.y + (_local4.y * _local6));
Particles.push(_local7);
TGlobalVars.ParticlesCnt++;
_local6++;
};
Position = (Position + Delta);
};
}
public function _ac1312():void{
var _local2:TTotemEffectParticle;
var _local1:int;
while (_local1 < Particles.length) {
_local2 = Particles[_local1];
_local2._qr2007();
if (_local2.Age <= 0){
TGlobalVars.ParticlesCnt--;
};
_local1++;
};
Particles = Particles.filter(_vb78);
}
private function _vb78(_arg1, _arg2:int, _arg3:Array):Boolean{
var _local4:TTotemEffectParticle = _arg1;
return (((_local4.Age)>0) ? true : false);
}
public function _uy905():Point{
var _local1:int;
var _local2:Number;
var _local3:Point;
if ((Position + Delta) < MaxPosition){
_local1 = Math.floor(Position);
_local2 = (Position - _local1);
_local3 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
return (_local3);
};
return (null);
}
}
}//package pgn.animation.totemsEffects.animation
Section 37
//TBonusEffectAnimation (pgn.animation.totemsEffects.animation.TBonusEffectAnimation)
package pgn.animation.totemsEffects.animation {
import flash.geom.*;
import pgn.*;
import pgn.global.*;
import pgn.animation.totemsEffects.particles.*;
public class TBonusEffectAnimation extends TBaseTotemEffectAnimation {
public var BonusCode:int;// = -1
public function TBonusEffectAnimation(){
ParticleId = 3;
}
override public function _qr2007():void{
var _local1:int;
var _local2:Number;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:int;
var _local7:int;
var _local8:TBonusEffectParticle;
var _local9:Number;
if ((Position + Delta) < MaxPosition){
_local1 = Math.floor(Position);
_local2 = (Position - _local1);
_local3 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local1 = Math.floor((Position + Delta));
_local2 = ((Position + Delta) - _local1);
_local4 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local5 = _local4.subtract(_local3);
_local4.subtract(_local3).x = (_local5.x / 4);
_local5.y = (_local5.y / 4);
_local6 = Funcs.CalcMaxPieces(2);
_local7 = 0;
while (_local7 < _local6) {
_local8 = new TBonusEffectParticle();
_local8.MaxAge = 48;
_local8.Age = 48;
_local8.Crd = _local3.clone();
_local8.Crd.x = (_local8.Crd.x + (_local5.x * _local7));
_local8.Crd.y = (_local8.Crd.y + (_local5.y * _local7));
_local9 = ((Math.random() * Math.PI) * 2);
_local8.Speed.x = Math.cos(_local9);
_local8.Speed.y = Math.sin(_local9);
_local8.Rotation = ((Math.random() * Math.PI) * 2);
_local8.RotationSpeed = ((Math.random() - 0.5) * 0.1);
_local8.Scale = (Math.random() * 0.5);
_local8.ScaleDelta = 0.005;
Particles.push(_local8);
TGlobalVars.ParticlesCnt++;
_local7++;
};
Position = (Position + Delta);
};
}
}
}//package pgn.animation.totemsEffects.animation
Section 38
//TFireEffectAnimation (pgn.animation.totemsEffects.animation.TFireEffectAnimation)
package pgn.animation.totemsEffects.animation {
import flash.geom.*;
import pgn.*;
import pgn.global.*;
import pgn.animation.totemsEffects.particles.*;
public class TFireEffectAnimation extends TBaseTotemEffectAnimation {
public function TFireEffectAnimation(){
ParticleId = 6;
}
override public function _qr2007():void{
var _local1:int;
var _local2:Number;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:int;
var _local7:int;
var _local8:TTotemEffectParticle;
var _local9:Number;
if ((Position + Delta) < MaxPosition){
_local1 = Math.floor(Position);
_local2 = (Position - _local1);
_local3 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local1 = Math.floor((Position + Delta));
_local2 = ((Position + Delta) - _local1);
_local4 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local5 = _local4.subtract(_local3);
_local4.subtract(_local3).x = (_local5.x / 8);
_local5.y = (_local5.y / 8);
_local6 = Funcs.CalcMaxPieces(8);
_local7 = 0;
while (_local7 < _local6) {
_local8 = new TTotemEffectParticle();
_local8.MaxAge = 32;
_local8.Age = (16 + (Math.random() * 16));
_local8.Crd = _local3.clone();
_local8.Crd.x = (_local8.Crd.x + (_local5.x * _local7));
_local8.Crd.y = (_local8.Crd.y + (_local5.y * _local7));
_local9 = ((Math.random() * Math.PI) * 2);
_local8.Speed.x = Math.cos(_local9);
_local8.Speed.y = Math.sin(_local9);
_local8.Rotation = ((Math.random() * Math.PI) * 2);
_local8.RotationSpeed = ((Math.random() - 0.5) * 0.5);
_local8.Scale = ((Math.random() * 1.3) + 0.3);
_local8.ScaleDelta = 0.01;
Particles.push(_local8);
TGlobalVars.ParticlesCnt++;
_local7++;
};
Position = (Position + Delta);
};
}
}
}//package pgn.animation.totemsEffects.animation
Section 39
//TTimeEffectAnimation (pgn.animation.totemsEffects.animation.TTimeEffectAnimation)
package pgn.animation.totemsEffects.animation {
import flash.geom.*;
import pgn.*;
import pgn.global.*;
import pgn.animation.totemsEffects.particles.*;
public class TTimeEffectAnimation extends TBaseTotemEffectAnimation {
private var RotDir:Number;// = 1
private var ParticlesAge:int;// = 48
private var MaxMultiplier:Number;// = 1
public function TTimeEffectAnimation(_arg1:Number, _arg2:Number){
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
super();
MaxMultiplier = _arg2;
ParticlesAge = _arg1;
ParticleId = 2;
RotDir = -1;
var _local3:Number = 192;
var _local4:Number = 128;
var _local5:Number = (Math.PI / 4);
var _local6:Number = 0;
while (_local6 <= (Math.PI * 2)) {
_local7 = _local6;
_local8 = (_local6 + ((_local5 / 4) * 1));
_local9 = (_local6 + ((_local5 / 4) * 2));
_local10 = (_local6 + ((_local5 / 4) * 3));
_local11 = (_local6 + ((_local5 / 4) * 4));
_va686(_local7, _local8, _local3, _local3);
_va686(_local8, _local9, _local3, _local4);
_va686(_local9, _local10, _local4, _local4);
_va686(_local10, _local11, _local4, _local3);
_local6 = (_local6 + _local5);
};
RotDir = 1;
_local3 = (32 + 16);
_local4 = (64 + 16);
_local5 = (Math.PI / 3);
_local6 = 0;
while (_local6 <= (Math.PI * 2)) {
_local7 = _local6;
_local8 = (_local6 + ((_local5 / 4) * 1));
_local9 = (_local6 + ((_local5 / 4) * 2));
_local10 = (_local6 + ((_local5 / 4) * 3));
_local11 = (_local6 + ((_local5 / 4) * 4));
_va686(_local7, _local8, _local3, _local3);
_va686(_local8, _local9, _local3, _local4);
_va686(_local9, _local10, _local4, _local4);
_va686(_local10, _local11, _local4, _local3);
_local6 = (_local6 + _local5);
};
}
private function _va686(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Point;
var _local7:Point;
var _local9:TTimeEffectParticle;
var _local10:int;
_local5 = new Point((Math.cos(_arg1) * _arg3), (Math.sin(_arg1) * _arg3));
var _local6:Point = new Point((Math.cos(_arg2) * _arg4), (Math.sin(_arg2) * _arg4));
_local7 = new Point((_local6.x - _local5.x), (_local6.y - _local5.y));
var _local8:int = (_local7.length / 12);
_local8 = ((_local8)<1) ? 1 : _local8;
_local7.x = (_local7.x / _local8);
_local7.y = (_local7.y / _local8);
_local9 = null;
_local10 = 0;
while (_local10 < _local8) {
_local9 = new TTimeEffectParticle();
_local9.RotDir = RotDir;
_local9.MaxAge = ParticlesAge;
_local9.Age = _local9.MaxAge;
_local9.Speed.x = 0;
_local9.Speed.y = 0;
_local9.Rotation = ((Math.random() * Math.PI) * 2);
_local9.RotationSpeed = ((Math.random() - 0.5) * 0.1);
_local9.Scale = (((Math.random() * 0.6) + 1) * MaxMultiplier);
_local9.ScaleDelta = 0;
_local9.RealCrd = _local5.clone();
_local9.RealCrd.x = (_local9.RealCrd.x + (_local7.x * _local10));
_local9.RealCrd.y = (_local9.RealCrd.y + (_local7.y * _local10));
Particles.push(_local9);
TGlobalVars.ParticlesCnt++;
_local10++;
};
}
override public function _qr2007():void{
var _local1:int;
var _local2:Number;
var _local3:Point;
var _local4:Number;
var _local5:int;
var _local6:int;
var _local7:TTimeEffectParticle;
if ((Position + Delta) < MaxPosition){
_local1 = Math.floor(Position);
_local2 = (Position - _local1);
_local3 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local4 = (Math.sin(((Position / MaxPosition) * Math.PI)) * MaxMultiplier);
_local5 = Particles.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = Particles[_local6];
_local7.CenterCrd.x = _local3.x;
_local7.CenterCrd.y = _local3.y;
_local7.Multiplier = _local4;
_local6++;
};
Position = (Position + Delta);
};
}
}
}//package pgn.animation.totemsEffects.animation
Section 40
//TTornadoEffectAnimation (pgn.animation.totemsEffects.animation.TTornadoEffectAnimation)
package pgn.animation.totemsEffects.animation {
import flash.geom.*;
import pgn.*;
import pgn.global.*;
import pgn.animation.totemsEffects.particles.*;
public class TTornadoEffectAnimation extends TBaseTotemEffectAnimation {
public function TTornadoEffectAnimation(){
ParticleId = 1;
}
override public function _qr2007():void{
var _local1:int;
var _local2:Number;
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
var _local10:TTornadoEffectParticle;
if ((Position + Delta) < MaxPosition){
_local1 = Math.floor(Position);
_local2 = (Position - _local1);
_local3 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local1 = Math.floor((Position + Delta));
_local2 = ((Position + Delta) - _local1);
_local4 = Funcs.CatmullRomPoint(Points[(_local1 + 0)], Points[(_local1 + 1)], Points[(_local1 + 2)], Points[(_local1 + 3)], _local2);
_local5 = (_local4.x - _local3.x);
_local6 = (_local4.y - _local3.y);
_local7 = (Math.atan2(-(_local6), _local5) - (Math.PI / 2));
_local4.x = ((_local4.x - _local3.x) / 8);
_local4.y = ((_local4.y - _local3.y) / 8);
_local8 = Funcs.CalcMaxPieces(8);
_local9 = 0;
while (_local9 < _local8) {
_local10 = new TTornadoEffectParticle();
_local10.MaxAge = 20;
_local10.Age = 20;
_local10.RealCrd = _local3.clone();
_local10.RealCrd.x = (_local10.RealCrd.x + (_local4.x * _local9));
_local10.RealCrd.y = (_local10.RealCrd.y + (_local4.y * _local9));
_local10.Scale = Math.random();
_local10.WorldAng = _local7;
Particles.push(_local10);
TGlobalVars.ParticlesCnt++;
_local9++;
};
Position = (Position + Delta);
};
}
}
}//package pgn.animation.totemsEffects.animation
Section 41
//TBonusEffectParticle (pgn.animation.totemsEffects.particles.TBonusEffectParticle)
package pgn.animation.totemsEffects.particles {
public class TBonusEffectParticle extends TTotemEffectParticle {
override public function _qr2007():void{
Age--;
Crd.x = (Crd.x + Speed.x);
Crd.y = (Crd.y + Speed.y);
Rotation = (Rotation + RotationSpeed);
Scale = (Scale + ScaleDelta);
}
}
}//package pgn.animation.totemsEffects.particles
Section 42
//TTimeEffectParticle (pgn.animation.totemsEffects.particles.TTimeEffectParticle)
package pgn.animation.totemsEffects.particles {
import flash.geom.*;
public class TTimeEffectParticle extends TTotemEffectParticle {
public var RealCrd:Point;
public var Multiplier:Number;// = 0
public var CenterCrd:Point;
public var RotDir:Number;// = 1
public function TTimeEffectParticle(){
RealCrd = new Point();
CenterCrd = new Point();
super();
}
override public function _qr2007():void{
Age--;
var _local1:Number = ((Age * Math.PI) / 64);
var _local2:Number = Math.cos((_local1 * RotDir));
var _local3:Number = Math.sin((_local1 * RotDir));
Crd.x = ((((RealCrd.x * _local2) + (RealCrd.y * _local3)) * Multiplier) + CenterCrd.x);
Crd.y = ((((-(RealCrd.x) * _local3) + (RealCrd.y * _local2)) * Multiplier) + CenterCrd.y);
}
}
}//package pgn.animation.totemsEffects.particles
Section 43
//TTornadoEffectParticle (pgn.animation.totemsEffects.particles.TTornadoEffectParticle)
package pgn.animation.totemsEffects.particles {
import flash.geom.*;
public class TTornadoEffectParticle extends TTotemEffectParticle {
public var Radius:Number;// = 0
public var Angle:Number;
public var RealCrd:Point;
public var AngSpeed:Number;// = 0.392699081698724
public var WorldAng:Number;// = 0
public function TTornadoEffectParticle(){
Angle = ((Math.random() * Math.PI) * 2);
RealCrd = new Point();
super();
}
override public function _qr2007():void{
Age--;
Angle = (Angle + AngSpeed);
Radius = Math.min((Radius + 2), 32);
var _local1:Number = (Math.cos(Angle) * Radius);
var _local2:Number = (_local1 * Math.cos(WorldAng));
var _local3:Number = (-(_local1) * Math.sin(WorldAng));
Crd.x = (RealCrd.x + _local2);
Crd.y = (RealCrd.y + _local3);
}
}
}//package pgn.animation.totemsEffects.particles
Section 44
//TTotemEffectParticle (pgn.animation.totemsEffects.particles.TTotemEffectParticle)
package pgn.animation.totemsEffects.particles {
import flash.geom.*;
public class TTotemEffectParticle {
public var Crd:Point;
public var Speed:Point;
public var Scale:Number;// = 1
public var Rotation:Number;
public var RotationSpeed:Number;
public var ScaleDelta:Number;// = 0
public var MaxAge:int;// = 32
public var Age:int;// = 32
public var ColorTrans:ColorTransform;
public function TTotemEffectParticle(){
Crd = new Point();
Speed = new Point();
Rotation = ((Math.random() * Math.PI) * 2);
RotationSpeed = ((Math.PI / 16) * (Math.random() - 0.5));
ColorTrans = new ColorTransform();
super();
}
public function _qr2007():void{
Age--;
Crd.x = (Crd.x + Speed.x);
Crd.y = (Crd.y + Speed.y);
Rotation = (Rotation + RotationSpeed);
Scale = (Scale + ScaleDelta);
}
}
}//package pgn.animation.totemsEffects.particles
Section 45
//TTotemsEffectAnimList (pgn.animation.totemsEffects.TTotemsEffectAnimList)
package pgn.animation.totemsEffects {
import pgn.animation.totemsEffects.animation.*;
public class TTotemsEffectAnimList {
public var Effects:Array;
private var tmpEffArray:Array;
public function TTotemsEffectAnimList(){
Effects = new Array();
tmpEffArray = new Array();
super();
}
public function _ug33(_arg1:TBaseTotemEffectAnimation):void{
Effects.push(_arg1);
}
public function _qr2007():void{
var _local3:TBaseTotemEffectAnimation;
tmpEffArray.length = 0;
var _local1:int;
while (_local1 < Effects.length) {
_local3 = Effects[_local1];
_local3._qr2007();
if (_local3._nv1624()){
tmpEffArray.push(_local3);
};
_local1++;
};
Effects.length = 0;
var _local2:int;
while (_local2 < tmpEffArray.length) {
Effects.push(tmpEffArray[_local2]);
_local2++;
};
}
public function _ac1312():void{
var _local2:TBaseTotemEffectAnimation;
var _local1:int;
while (_local1 < Effects.length) {
_local2 = Effects[_local1];
_local2._ac1312();
_local1++;
};
}
}
}//package pgn.animation.totemsEffects
Section 46
//TAnimatedCell (pgn.animation.TAnimatedCell)
package pgn.animation {
import flash.geom.*;
import pgn.*;
public class TAnimatedCell {
public var Cell:TCell;// = null
public var DeltaAlpha:Number;// = 0
public var DeltaColor:Number;// = 1
public var DeltaCrd:Point;
public var MoveCnt:int;// = 0
public var NeedQuake:Boolean;// = true
public var DeleteCounter:int;// = 0
public function TAnimatedCell(){
DeltaCrd = new Point();
super();
}
}
}//package pgn.animation
Section 47
//TAnimatedPair (pgn.animation.TAnimatedPair)
package pgn.animation {
public class TAnimatedPair {
public var cell0:TAnimatedCell;// = null
public var cell1:TAnimatedCell;// = null
public var counter:int;// = 0
public var maxCounter:int;// = 0
}
}//package pgn.animation
Section 48
//TLevelAnimation (pgn.animation.TLevelAnimation)
package pgn.animation {
import flash.geom.*;
import pgn.*;
import pgn.animation.lighting.*;
import pgn.animation.explosion.*;
import pgn.global.*;
import pgn.animation.deleting.*;
import pgn.animation.totemsEffects.*;
public class TLevelAnimation {
private const lenFakeSwap:int = 16;
private const lenSwap:int = 8;
private const lenDelete:int = 32;
private const lenMoveDown:int = 16;
public var LevelLink:TLevel;// = null
public var DeletedPieces:TDeletedPiecesList;
public var ExplosionList:TExplosionList;
public var LightingList:TLightingList;
public var TotemEffects:TTotemsEffectAnimList;
private var FakeSwappedPairs:Array;
private var SwappedPairs:Array;
private var DeletedCells:Array;
private var MovedDownCells:Array;
public var PreDeleteCells:Array;
private var tmp_array:Array;
public function TLevelAnimation(){
DeletedPieces = new TDeletedPiecesList();
ExplosionList = new TExplosionList();
LightingList = new TLightingList();
TotemEffects = new TTotemsEffectAnimList();
FakeSwappedPairs = new Array();
SwappedPairs = new Array();
DeletedCells = new Array();
MovedDownCells = new Array();
PreDeleteCells = new Array();
tmp_array = new Array();
super();
}
private function _ot757(_arg1:TCell):Boolean{
if (((_arg1.IsAnimating) || (_arg1.IsDeleting))){
return (false);
};
return (true);
}
public function _iu1870():void{
LevelLink._ql1725();
var _local1:Boolean = _nq121();
var _local2:Boolean = _hs873();
var _local3:Boolean = _us385();
var _local4:Boolean = _mi1029();
LevelLink._av832();
if (((_local2) || (_local4))){
LevelLink._eh1994();
};
}
public function _dp806():void{
DeletedPieces._qr2007();
ExplosionList._qr2007();
LightingList._qr2007();
LevelLink.TotemsSite._qr2007();
TotemEffects._qr2007();
TotemEffects._ac1312();
LevelLink.unqManager._qr2007();
LevelLink.unqSite._qr2007();
}
private function _nq121():Boolean{
var _local3:TAnimatedPair;
var _local4:TAnimatedCell;
var _local5:TAnimatedCell;
tmp_array.length = 0;
var _local1:Boolean;
var _local2:int;
while (_local2 < FakeSwappedPairs.length) {
_local3 = FakeSwappedPairs[_local2];
_local3.counter--;
if (_local3.counter >= 0){
_local1 = true;
_local4 = _local3.cell0;
_local5 = _local3.cell1;
if (_local3.counter >= (_local3.maxCounter / 2)){
_local4.Cell.StageCrd = _local4.Cell.StageCrd.add(_local4.DeltaCrd);
_local5.Cell.StageCrd = _local5.Cell.StageCrd.add(_local5.DeltaCrd);
} else {
_local4.Cell.StageCrd = _local4.Cell.StageCrd.subtract(_local4.DeltaCrd);
_local5.Cell.StageCrd = _local5.Cell.StageCrd.subtract(_local5.DeltaCrd);
};
tmp_array.push(_local3);
} else {
_local3.cell0.Cell.IsAnimating = false;
_local3.cell1.Cell.IsAnimating = false;
};
_local2++;
};
FakeSwappedPairs.length = 0;
_local2 = 0;
while (_local2 < tmp_array.length) {
_local3 = tmp_array[_local2];
FakeSwappedPairs.push(_local3);
_local2++;
};
return (_local1);
}
public function _yo1861(_arg1:TCell, _arg2:TCell):void{
var _local3:Point;
var _local4:TAnimatedPair = new TAnimatedPair();
_local3 = _arg2.StageCrd.subtract(_arg1.StageCrd);
_local3.x = (_local3.x / (lenFakeSwap / 2));
_local3.y = (_local3.y / (lenFakeSwap / 2));
_local4.cell0 = new TAnimatedCell();
_local4.cell0.Cell = _arg1;
_local4.cell0.DeltaCrd = _local3.clone();
_local3 = _arg1.StageCrd.subtract(_arg2.StageCrd);
_local3.x = (_local3.x / (lenFakeSwap / 2));
_local3.y = (_local3.y / (lenFakeSwap / 2));
_local4.cell1 = new TAnimatedCell();
_local4.cell1.Cell = _arg2;
_local4.cell1.DeltaCrd = _local3.clone();
_local4.counter = lenFakeSwap;
_local4.maxCounter = lenFakeSwap;
_local4.cell0.Cell.IsAnimating = true;
_local4.cell1.Cell.IsAnimating = true;
FakeSwappedPairs.push(_local4);
}
private function _hs873():Boolean{
var _local3:TAnimatedPair;
var _local4:TAnimatedCell;
var _local5:TAnimatedCell;
tmp_array.length = 0;
var _local1:Boolean;
var _local2:int;
while (_local2 < SwappedPairs.length) {
_local3 = SwappedPairs[_local2];
_local3.counter--;
if (_local3.counter >= 0){
_local4 = _local3.cell0;
_local5 = _local3.cell1;
_local4.Cell.StageCrd = _local4.Cell.StageCrd.add(_local4.DeltaCrd);
_local5.Cell.StageCrd = _local5.Cell.StageCrd.add(_local5.DeltaCrd);
tmp_array.push(_local3);
} else {
_local1 = true;
_local3.cell0.Cell.IsAnimating = false;
_local3.cell1.Cell.IsAnimating = false;
};
_local2++;
};
SwappedPairs.length = 0;
_local2 = 0;
while (_local2 < tmp_array.length) {
_local3 = tmp_array[_local2];
SwappedPairs.push(_local3);
_local2++;
};
return (_local1);
}
public function _qy443(_arg1:TCell, _arg2:TCell):void{
var _local3:Point;
var _local4:TAnimatedPair = new TAnimatedPair();
_local3 = _arg2.StageCrd.subtract(_arg1.StageCrd);
_local3.x = (_local3.x / lenSwap);
_local3.y = (_local3.y / lenSwap);
_local4.cell0 = new TAnimatedCell();
_local4.cell0.Cell = _arg1;
_local4.cell0.DeltaCrd = _local3.clone();
_local3 = _arg1.StageCrd.subtract(_arg2.StageCrd);
_local3.x = (_local3.x / lenSwap);
_local3.y = (_local3.y / lenSwap);
_local4.cell1 = new TAnimatedCell();
_local4.cell1.Cell = _arg2;
_local4.cell1.DeltaCrd = _local3.clone();
_local4.counter = lenSwap;
_local4.cell0.Cell.IsAnimating = true;
_local4.cell1.Cell.IsAnimating = true;
SwappedPairs.push(_local4);
}
public function _us385():Boolean{
var _local4:TAnimatedCell;
var _local5:int;
var _local1:int;
tmp_array.length = 0;
var _local2:Boolean;
var _local3:int;
for each (_local4 in DeletedCells) {
_local4.DeleteCounter--;
if (_local4.DeleteCounter <= 0){
_local2 = true;
if (_local4.Cell.CellType == 1){
DeletedPieces._lu173(_local4.Cell);
_local3++;
};
_local4.Cell.IsAnimating = false;
_local4.Cell._ad1117(false, 0);
} else {
_local4.Cell._ww2071();
if (_local4.NeedQuake){
_local4.Cell.StageCrd.x = (_local4.Cell.StageCrd.x + ((Math.random() * 4) - 2));
_local4.Cell.StageCrd.y = (_local4.Cell.StageCrd.y + ((Math.random() * 4) - 2));
};
var _temp1 = _local1;
_local1 = (_local1 + 1);
var _local8 = _temp1;
tmp_array[_local8] = _local4;
};
};
DeletedCells.length = 0;
_local5 = 0;
while (_local5 < _local1) {
DeletedCells[_local5] = tmp_array[_local5];
_local5++;
};
if (_local3 > 0){
TGlobalVars.SoundPlayer._gy756();
TGlobalVars.SoundPlayer._yo879();
};
return (_local2);
}
public function _nd1512(_arg1:TStripList):void{
var _local4:TStrip;
var _local5:TCell;
var _local6:TAnimatedCell;
var _local7:int;
var _local8:TCell;
var _local9:TCell;
var _local10:Point;
var _local11:Point;
var _local12:TPreDeleteCell;
var _local2:int;
var _local3:int;
while (_local3 < _arg1.Strips.length) {
TGlobalVars.SoundPlayer._yi1197();
_local4 = _arg1.Strips[_local3];
_local2 = 0;
while (_local2 < _local4.Cells.length) {
_local5 = _local4._jp74(_local2);
if (_ot757(_local5)){
_local6 = new TAnimatedCell();
_local6.DeleteCounter = lenDelete;
_local6.Cell = _local5;
_local6.Cell.IsAnimating = true;
_local6.Cell._ad1117(true, 0);
_local6.DeltaColor = (0xFF / lenDelete);
DeletedCells.push(_local6);
};
_local2++;
};
_local2 = 0;
while (_local2 < _local4.Cells.length) {
_local7 = (_local2 + 1);
while (_local7 < _local4.Cells.length) {
_local8 = _local4._jp74(_local2);
_local9 = _local4._jp74(_local7);
_local10 = LevelLink._fl1540(_local8);
_local11 = LevelLink._fl1540(_local9);
if ((Math.abs((_local10.x - _local11.x)) + Math.abs((_local10.y - _local11.y))) == 1){
_local12 = new TPreDeleteCell();
_local12.BeginPoint = _local8.StageCrd.clone();
_local12.EndPoint = _local9.StageCrd.clone();
_local12.ColorCode = _local4.ColorCode;
_local12.DeleteCounter = lenDelete;
PreDeleteCells.push(_local12);
};
_local7++;
};
_local2++;
};
_local3++;
};
}
public function _he1177(_arg1:TCell, _arg2:Boolean):void{
var _local3:TAnimatedCell;
if (_ot757(_arg1)){
_local3 = new TAnimatedCell();
if (_arg2){
_local3.DeleteCounter = 0;
} else {
_local3.DeleteCounter = lenDelete;
};
_local3.Cell = _arg1;
_local3.DeltaColor = (0xFF / lenDelete);
_local3.NeedQuake = false;
_local3.Cell.IsAnimating = true;
_local3.Cell._ad1117(true, 0);
DeletedCells.push(_local3);
};
}
public function _mi1029():Boolean{
var _local2:TAnimatedCell;
var _local3:int;
tmp_array.length = 0;
var _local1:Boolean;
for each (_local2 in MovedDownCells) {
if (_local2.MoveCnt == 0){
_local1 = true;
_local2.Cell.IsAnimating = false;
} else {
_local2.MoveCnt--;
_local2.Cell.StageCrd = _local2.Cell.StageCrd.add(_local2.DeltaCrd);
_local2.Cell.Alpha = (_local2.Cell.Alpha + _local2.DeltaAlpha);
tmp_array.push(_local2);
};
};
MovedDownCells.length = 0;
_local3 = 0;
while (_local3 < tmp_array.length) {
_local2 = tmp_array[_local3];
MovedDownCells.push(_local2);
_local3++;
};
return (_local1);
}
public function _no1682(_arg1:TCell):void{
var _local2:TAnimatedCell = new TAnimatedCell();
_local2.Cell = _arg1;
_local2.Cell.IsAnimating = true;
var _local3:Point = _arg1._hm1968();
var _local4:Point = LevelLink._cj1974(_local3.x, _local3.y);
var _local5:Point = _local4.subtract(_arg1.StageCrd);
_local2.MoveCnt = lenMoveDown;
_local5.x = 0;
_local5.y = (_local5.y / lenMoveDown);
_local2.DeltaCrd = _local5.clone();
MovedDownCells.push(_local2);
}
public function _sr1404(_arg1:TCell):void{
var _local2:TAnimatedCell = new TAnimatedCell();
_local2.Cell = _arg1;
_local2.Cell.IsAnimating = true;
_arg1.Alpha = 0;
var _local3:Point = _arg1._hm1968();
var _local4:Point = LevelLink._cj1974(_local3.x, _local3.y);
var _local5:Point = _local4.subtract(_arg1.StageCrd);
_local2.MoveCnt = lenMoveDown;
_local5.x = 0;
_local5.y = (_local5.y / lenMoveDown);
_local2.DeltaCrd = _local5.clone();
_local2.DeltaAlpha = (1 / _local2.MoveCnt);
MovedDownCells.push(_local2);
}
}
}//package pgn.animation
Section 49
//TBaseBonus (pgn.bonuses.TBaseBonus)
package pgn.bonuses {
import flash.geom.*;
import pgn.*;
public class TBaseBonus {
public var BonusCode:int;// = -1
protected function _li1648(_arg1:TCell, _arg2:int, _arg3:int):void{
var _local5:TCell;
var _local4:Point = _arg1._hm1968();
if (_arg1.LevelLink._lh680((_local4.x + _arg2), (_local4.y + _arg3))){
_local5 = _arg1.LevelLink._jp74((_local4.x + _arg2), (_local4.y + _arg3));
if (_local5.CellType == 1){
_local5._py469();
_arg1.LevelLink.Animation._he1177(_local5, true);
};
};
}
public function _rq285(_arg1:TCell):void{
_arg1.LevelLink.Stats._xn631(this);
}
}
}//package pgn.bonuses
Section 50
//TBigBombBonus (pgn.bonuses.TBigBombBonus)
package pgn.bonuses {
import flash.geom.*;
import pgn.*;
import flash.display.*;
import pgn.animation.explosion.*;
public class TBigBombBonus extends TBaseBonus {
private var k_expl_tpl:Class;
private var b_expl_tpl:Bitmap;
public function TBigBombBonus(){
k_expl_tpl = TBigBombBonus_k_expl_tpl;
b_expl_tpl = new k_expl_tpl();
super();
BonusCode = 0;
}
override public function _rq285(_arg1:TCell):void{
var _local8:int;
var _local9:uint;
super._rq285(_arg1);
var _local2:BitmapData = b_expl_tpl.bitmapData;
var _local3:int = ((_local2.width - 1) / 2);
var _local4:Point = _arg1._hm1968();
var _local5:Point = _arg1.LevelLink._cj1974(_local4.x, _local4.y);
var _local6:TExplosion = new TExplosion(_local5.x, _local5.y);
_local6._de2055(_local2);
_arg1.LevelLink.Animation.ExplosionList._ma1405(_local6);
var _local7:int;
while (_local7 < _local2.height) {
_local8 = 0;
while (_local8 < _local2.width) {
_local9 = _local2.getPixel(_local8, _local7);
if (_local9 == 0xFF0000){
_li1648(_arg1, (_local8 - _local3), (_local7 - _local3));
};
_local8++;
};
_local7++;
};
}
}
}//package pgn.bonuses
Section 51
//TBigBombBonus_k_expl_tpl (pgn.bonuses.TBigBombBonus_k_expl_tpl)
package pgn.bonuses {
import mx.core.*;
public class TBigBombBonus_k_expl_tpl extends BitmapAsset {
}
}//package pgn.bonuses
Section 52
//TBonusFactory (pgn.bonuses.TBonusFactory)
package pgn.bonuses {
public class TBonusFactory {
public static function CreateBonus(_arg1:int):TBaseBonus{
var _local2:TBaseBonus;
switch (_arg1){
case 0:
_local2 = new TFireBonus();
break;
case 1:
_local2 = new TLightingBonus();
break;
case 2:
_local2 = new TTimeBonus();
break;
case 3:
_local2 = new TTornadoBonus();
break;
case 4:
_local2 = new TBigBombBonus();
break;
case 5:
_local2 = new TDelUnqBonus();
break;
};
return (_local2);
}
}
}//package pgn.bonuses
Section 53
//TDelUnqBonus (pgn.bonuses.TDelUnqBonus)
package pgn.bonuses {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
import pgn.MarkMethods.*;
public class TDelUnqBonus extends TBaseBonus {
public function TDelUnqBonus(){
BonusCode = 5;
}
override public function _rq285(_arg1:TCell):void{
var _local2:TLevel;
var _local8:TLevelColumn;
var _local9:int;
var _local10:int;
var _local11:Point;
var _local12:Point;
var _local13:Point;
var _local14:Point;
var _local15:TBaseTotemEffectAnimation;
super._rq285(_arg1);
_local2 = _arg1.LevelLink;
TGlobalVars.SoundPlayer._hs239();
var _local3:Point = _arg1._hm1968();
var _local4:Point = _local2._cj1974(_local3.x, _local3.y);
_local2._cj1974(_local3.x, _local3.y).x = (_local4.x + 16);
_local4.y = (_local4.y + 16);
var _local5:Array = new Array();
var _local6:TCell;
var _local7:int;
while (_local7 < _local2.Columns.length) {
_local8 = _local2.Columns[_local7];
_local9 = _local8.TopRow;
while (_local9 <= _local8.BottomRow) {
_local6 = _local2._jp74(_local8.Column, _local9);
if (_local6 != null){
if (_local6.CellType == 2){
_local5.push(_local6);
};
};
_local9++;
};
_local7++;
};
if (_local5.length > 0){
_local10 = (Math.random() * _local5.length);
_local6 = _local5[_local10];
_local6.OnApplyMethod = new TMarkDeleteMethod();
_local6.OnApplyMethod.Counter = 32;
_local11 = _local6._hm1968();
_local12 = _local2._cj1974(_local11.x, _local11.y);
_local2._cj1974(_local11.x, _local11.y).x = (_local12.x + 16);
_local12.y = (_local12.y + 16);
_local13 = Funcs.MidPoint(_local4, _local12);
_local14 = Funcs.GetPointAtCircle(128);
_local13.x = (_local13.x + _local14.x);
_local13.y = (_local13.y + _local14.y);
_local15 = new TBaseTotemEffectAnimation();
_local15.ParticleId = 7;
_local15.Points.push(_local4);
_local15.Points.push(_local13);
_local15.Points.push(_local12);
_local15._wn796(32);
_local2.Animation.TotemEffects._ug33(_local15);
};
}
}
}//package pgn.bonuses
Section 54
//TFireBonus (pgn.bonuses.TFireBonus)
package pgn.bonuses {
import flash.geom.*;
import pgn.*;
import pgn.animation.explosion.*;
import pgn.global.*;
public class TFireBonus extends TBaseBonus {
public function TFireBonus(){
BonusCode = 4;
}
override public function _rq285(_arg1:TCell):void{
super._rq285(_arg1);
var _local2:Point = _arg1._hm1968();
var _local3:Point = _arg1.LevelLink._cj1974(_local2.x, _local2.y);
var _local4:TExplosion = new TExplosion(_local3.x, _local3.y);
_local4._pt1212();
_arg1.LevelLink.Animation.ExplosionList._ma1405(_local4);
_li1648(_arg1, 0, -1);
_li1648(_arg1, 0, 1);
_li1648(_arg1, -1, 0);
_li1648(_arg1, 1, 0);
TGlobalVars.SoundPlayer._sv1920();
TGlobalVars.SoundPlayer._wx1317();
}
}
}//package pgn.bonuses
Section 55
//TLightingBonus (pgn.bonuses.TLightingBonus)
package pgn.bonuses {
import pgn.*;
import pgn.animation.lighting.*;
import pgn.global.*;
public class TLightingBonus extends TBaseBonus {
private var wasCells:Array;
public function TLightingBonus(){
wasCells = new Array();
super();
BonusCode = 3;
}
private function _nh2048(_arg1:int, _arg2:int):Boolean{
var _local5:TCell;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local3:Boolean;
var _local4:int;
while (_local4 < wasCells.length) {
_local5 = wasCells[_local4];
_local6 = (_local5._hm1968().x - _arg1);
_local7 = (_local5._hm1968().y - _arg2);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
if (_local8 < 3){
_local3 = false;
};
_local4++;
};
return (_local3);
}
override public function _rq285(_arg1:TCell):void{
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:TCell;
super._rq285(_arg1);
wasCells.length = 0;
var _local2:TLighting = new TLighting();
_local2._rh1849(_arg1);
var _local3:int;
while (_local3 < 4) {
_local4 = true;
while (_local4) {
_local5 = (_arg1.LevelLink.Size.width * Math.random());
_local6 = (_arg1.LevelLink.Size.height * Math.random());
if (_arg1.LevelLink._lh680(_local5, _local6)){
_local7 = _arg1.LevelLink._jp74(_local5, _local6);
if ((((wasCells.indexOf(_local7) < 0)) && (_nh2048(_local5, _local6)))){
if ((((((((((((_local7.CellType == 1)) && ((_local7.Bonus == null)))) && ((_local7.OnApplyMethod == null)))) && (!(_local7.IsAnimating)))) && (!(_local7.IsDeleting)))) && (!(_local7.IsDeleting)))){
wasCells.push(_local7);
_local7._py469();
_local2._rh1849(_local7);
_arg1.LevelLink.Animation._he1177(_local7, false);
_local4 = false;
};
};
};
};
_local3++;
};
_arg1.LevelLink.Animation.LightingList._uo1115(_local2);
TGlobalVars.SoundPlayer._ly1306();
}
}
}//package pgn.bonuses
Section 56
//TTimeBonus (pgn.bonuses.TTimeBonus)
package pgn.bonuses {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
public class TTimeBonus extends TBaseBonus {
public function TTimeBonus(){
BonusCode = 2;
}
override public function _rq285(_arg1:TCell):void{
super._rq285(_arg1);
var _local2:TLevel = _arg1.LevelLink;
var _local3:TTimeEffectAnimation = new TTimeEffectAnimation(48, 0.5);
var _local4:Point = _arg1.StageCrd.clone();
_arg1.StageCrd.clone().x = (_local4.x + 20);
_local4.y = (_local4.y + 20);
var _local5:Point = new Point(75, 75);
var _local6:Point = Funcs.MidPoint(_local4, _local5);
var _local7:Point = Funcs.Perp(_local4, _local6);
_local7.normalize(-64);
_local6 = _local6.add(_local7);
_local3.Points.push(_local4);
_local3.Points.push(_local6);
_local3.Points.push(_local6);
_local3.Points.push(_local5);
_local3._wn796(48);
_local2.Animation.TotemEffects._ug33(_local3);
_local2.Stats._jo1524(15, 48);
TGlobalVars.SoundPlayer._ek2027();
}
}
}//package pgn.bonuses
Section 57
//TTornadoBonus (pgn.bonuses.TTornadoBonus)
package pgn.bonuses {
import flash.geom.*;
import pgn.*;
import pgn.totems.*;
import pgn.global.*;
public class TTornadoBonus extends TBaseBonus {
public function TTornadoBonus(){
BonusCode = 1;
}
override public function _rq285(_arg1:TCell):void{
super._rq285(_arg1);
var _local2:Point = new Point((_arg1.StageCrd.x + 20), (_arg1.StageCrd.y + 20));
var _local3:TTotemTornadoEffect = new TTotemTornadoEffect(0);
_local3._bi167(_arg1.LevelLink, _local2);
TGlobalVars.SoundPlayer._fh312();
}
}
}//package pgn.bonuses
Section 58
//TBirdAsset (pgn.gfxAssets.TBirdAsset)
package pgn.gfxAssets {
public class TBirdAsset {
public var IsInvert:Boolean;// = false
public var Count:int;// = 0
public var Frames:Array;
public var IsButterFly:Boolean;// = false
public function TBirdAsset(){
Frames = new Array();
super();
}
}
}//package pgn.gfxAssets
Section 59
//TBirdsAsset (pgn.gfxAssets.TBirdsAsset)
package pgn.gfxAssets {
import flash.geom.*;
import flash.display.*;
public class TBirdsAsset {
private var kBirds:Class;
private var bBirds:Bitmap;
private var birds:Array;
public function TBirdsAsset(){
kBirds = TBirdsAsset_kBirds;
bBirds = new kBirds();
birds = new Array();
super();
_yf135(new Point(16, 35), new Point(44, 0), new Point(40, 52), 7, false);
_yf135(new Point(16, 115), new Point(29, 0), new Point(24, 42), 10, false);
_yf135(new Point(16, 187), new Point(34, 0), new Point(25, 29), 5, false);
_yf135(new Point(16, 455), new Point(25, 0), new Point(20, 20), 2, true);
_yf135(new Point(16, 494), new Point(25, 0), new Point(20, 20), 2, true);
_yf135(new Point(79, 455), new Point(25, 0), new Point(20, 20), 2, true);
_yf135(new Point(79, 494), new Point(25, 0), new Point(20, 20), 2, true);
_yf135(new Point(154, 455), new Point(25, 0), new Point(20, 20), 2, true);
_yf135(new Point(154, 494), new Point(25, 0), new Point(20, 20), 2, true);
_yf135(new Point(229, 455), new Point(25, 0), new Point(20, 20), 2, true);
_yf135(new Point(229, 494), new Point(25, 0), new Point(20, 20), 2, true);
}
private function _yf135(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:int, _arg5:Boolean):void{
var _local11:BitmapData;
var _local12:BitmapData;
var _local6:TBirdAsset = new TBirdAsset();
_local6.Count = _arg4;
_local6.IsButterFly = _arg5;
var _local7:TBirdAsset = new TBirdAsset();
_local7.Count = _arg4;
_local7.IsInvert = true;
_local7.IsButterFly = _arg5;
var _local8:Rectangle = new Rectangle();
var _local9:Matrix = new Matrix();
_local9.scale(-1, 1);
_local9.translate(_arg3.x, 0);
var _local10:int;
while (_local10 < _arg4) {
_local8.x = (_arg1.x + (_arg2.x * _local10));
_local8.y = (_arg1.y + (_arg2.y * _local10));
_local8.width = _arg3.x;
_local8.height = _arg3.y;
_local11 = new BitmapData(_arg3.x, _arg3.y, true, 0);
_local11.copyPixels(bBirds.bitmapData, _local8, _local11.rect.topLeft, null, null, true);
_local12 = new BitmapData(_arg3.x, _arg3.y, true, 0);
_local12.draw(_local11, _local9, null, null, null, true);
_local6.Frames.push(_local11);
_local7.Frames.push(_local12);
_local10++;
};
birds.push(_local6);
birds.push(_local7);
}
public function _ip934(_arg1:int):TBirdAsset{
return (birds[_arg1]);
}
}
}//package pgn.gfxAssets
Section 60
//TBirdsAsset_kBirds (pgn.gfxAssets.TBirdsAsset_kBirds)
package pgn.gfxAssets {
import mx.core.*;
public class TBirdsAsset_kBirds extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 61
//TCausticAsset (pgn.gfxAssets.TCausticAsset)
package pgn.gfxAssets {
import flash.geom.*;
import pgn.*;
import flash.display.*;
public class TCausticAsset {
private var kCaust:Class;
private var bCaust:Bitmap;
private var sprites:Array;
public function TCausticAsset(){
kCaust = TCausticAsset_kCaust;
bCaust = new kCaust();
sprites = new Array();
super();
}
public function _st471():void{
var _local3:int;
var _local4:BitmapData;
var _local1:Rectangle = new Rectangle();
var _local2:int;
while (_local2 < 8) {
_local3 = 0;
while (_local3 < 8) {
_local4 = new BitmapData(200, 200);
_local1.x = (_local3 * 200);
_local1.y = (_local2 * 200);
_local1.width = 200;
_local1.height = 200;
_local4.copyPixels(bCaust.bitmapData, _local1, _local4.rect.topLeft);
sprites.push(_local4);
_local3++;
};
_local2++;
};
}
public function _jc1658(_arg1:int):BitmapData{
return (sprites[_arg1]);
}
public function _pw978(_arg1:BitmapData, _arg2:TLevelProto, _arg3:int):void{
var _local11:uint;
var _local4:BitmapData = this._jc1658(_arg3);
var _local5:int;
var _local6:int;
var _local7:Point = new Point();
var _local8:Rectangle = new Rectangle();
_local5 = 0;
while (_local5 < 3) {
_local6 = 0;
while (_local6 < 3) {
_local7.x = (_local6 * 200);
_local7.y = (_local5 * 200);
_arg1.copyPixels(_local4, _local4.rect, _local7);
_local6++;
};
_local5++;
};
var _local9:int = _arg2.bmpProto.width;
var _local10:int = _arg2.bmpProto.height;
_local5 = 0;
while (_local5 < _local10) {
_local6 = 0;
while (_local6 < _local9) {
_local11 = _arg2.bmpProto.getPixel((_local6 * 3), (_local5 * 3));
if (_local11 != 0x808080){
_local8.x = (_local6 * 40);
_local8.y = (_local5 * 40);
_local8.width = 40;
_local8.height = 40;
_arg1.fillRect(_local8, 0);
};
_local6++;
};
_local5++;
};
}
}
}//package pgn.gfxAssets
Section 62
//TCausticAsset_kCaust (pgn.gfxAssets.TCausticAsset_kCaust)
package pgn.gfxAssets {
import mx.core.*;
public class TCausticAsset_kCaust extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 63
//TLevelProtoAsset (pgn.gfxAssets.TLevelProtoAsset)
package pgn.gfxAssets {
import flash.geom.*;
import pgn.*;
import flash.display.*;
public class TLevelProtoAsset {
private var kLevels:Class;
private var bLevels:Bitmap;
private var kClrGold01:Class;
private var bClrGold01:Bitmap;
private var kClrGold02:Class;
private var bClrGold02:Bitmap;
private var kClrGold03:Class;
private var bClrGold03:Bitmap;
private var protoSize:int;// = 45
private var bColors:Array;
private var bGolds:Array;
public function TLevelProtoAsset():void{
kLevels = TLevelProtoAsset_kLevels;
bLevels = new kLevels();
kClrGold01 = TLevelProtoAsset_kClrGold01;
bClrGold01 = new kClrGold01();
kClrGold02 = TLevelProtoAsset_kClrGold02;
bClrGold02 = new kClrGold02();
kClrGold03 = TLevelProtoAsset_kClrGold03;
bClrGold03 = new kClrGold03();
bColors = new Array();
bGolds = new Array();
super();
_mp36(11, bClrGold01);
_mp36(6, bClrGold02);
_mp36(5, bClrGold03);
}
private function _mp36(_arg1:int, _arg2:Bitmap):void{
var _local3:int;
var _local4:Rectangle = new Rectangle();
var _local5:BitmapData;
var _local6:BitmapData;
_local3 = 0;
while (_local3 < _arg1) {
_local5 = new BitmapData(160, 192, true, 0);
_local4.x = (_local3 * 160);
_local4.y = 0;
_local4.width = 160;
_local4.height = 192;
_local5.copyPixels(_arg2.bitmapData, _local4, _local5.rect.topLeft);
_local6 = new BitmapData(160, 192, true, 0);
_local4.x = (_local3 * 160);
_local4.y = 192;
_local4.width = 160;
_local4.height = 192;
_local6.copyPixels(_arg2.bitmapData, _local4, _local6.rect.topLeft);
bColors.push(_local5);
bGolds.push(_local6);
_local3++;
};
}
private function _ij866(_arg1:int):BitmapData{
var _local2:BitmapData = new BitmapData(protoSize, protoSize, true, 0);
var _local3:Rectangle = new Rectangle();
_local3.x = ((_arg1 % 5) * protoSize);
_local3.y = (int((_arg1 / 5)) * protoSize);
_local3.width = protoSize;
_local3.height = protoSize;
_local2.copyPixels(bLevels.bitmapData, _local3, _local2.rect.topLeft);
return (_local2);
}
private function _if497(_arg1:int, _arg2:TLevelProto):void{
_arg2.gridColor = bColors[_arg1];
_arg2.gridGold = bGolds[_arg1];
}
private function _my109(_arg1:int, _arg2:TLevelProto):void{
_arg2.MaxUniquesInLevel = 4;
_arg2.MaxTime = (100 * 1000);
if ((((((((((((((_arg1 == 0)) || ((_arg1 == 1)))) || ((_arg1 == 2)))) || ((_arg1 == 4)))) || ((_arg1 == 7)))) || ((_arg1 == 10)))) || ((_arg1 == 13)))){
_arg2.MaxUniquesInLevel = 2;
_arg2.MaxTime = (160 * 1000);
};
if ((((((((((((((((_arg1 == 3)) || ((_arg1 == 5)))) || ((_arg1 == 6)))) || ((_arg1 == 8)))) || ((_arg1 == 9)))) || ((_arg1 == 11)))) || ((_arg1 == 12)))) || ((_arg1 == 14)))){
_arg2.MaxUniquesInLevel = 3;
_arg2.MaxTime = (130 * 1000);
};
if ((((((_arg1 == 0)) || ((_arg1 == 1)))) || ((_arg1 == 2)))){
_arg2.MaxTime = (240 * 1000);
};
}
private function _qx958(_arg1:int, _arg2:TLevelProto):void{
if (_arg1 < 4){
_arg2._hn1197(3);
return;
};
if (_arg1 < 8){
_arg2._hn1197(4);
return;
};
_arg2._hn1197(5);
}
private function _gt1747(_arg1:int, _arg2:TLevelProto):void{
_my109(_arg1, _arg2);
_qx958(_arg1, _arg2);
if (_arg1 == 0){
_if497(12, _arg2);
_arg2._hi1971(false, false, false, false, false);
_arg2._ma1051(-1, -1, -1, -1, -1);
_arg2._dj894(true, "tree", 0);
};
if (_arg1 == 1){
_if497(18, _arg2);
_arg2._hi1971(false, false, false, false, false);
_arg2._ma1051(-1, -1, -1, -1, -1);
_arg2._dj894(true, "tree", 1);
};
if (_arg1 == 2){
_if497(6, _arg2);
_arg2._hi1971(true, false, false, false, false);
_arg2._ma1051(-1, 0, -1, -1, -1);
_arg2._dj894(true, "time", 0);
};
if (_arg1 == 3){
_if497(13, _arg2);
_arg2._hi1971(true, false, false, false, false);
_arg2._ma1051(-1, 0, -1, -1, 0);
_arg2._dj894(true, "tree", 2);
};
if (_arg1 == 4){
_if497(19, _arg2);
_arg2._hi1971(true, false, false, false, false);
_arg2._ma1051(-1, 0, -1, -1, 0);
_arg2._dj894(true, "tree", 3);
};
if (_arg1 == 5){
_if497(9, _arg2);
_arg2._hi1971(true, true, false, false, false);
_arg2._ma1051(-1, 1, -1, -1, 0);
_arg2._dj894(true, "tornado", 0);
};
if (_arg1 == 6){
_if497(14, _arg2);
_arg2._hi1971(true, true, false, false, false);
_arg2._ma1051(-1, 1, 0, -1, 0);
_arg2._dj894(true, "tree", 4);
};
if (_arg1 == 7){
_if497(20, _arg2);
_arg2._hi1971(true, true, false, false, false);
_arg2._ma1051(-1, 2, 0, -1, 0);
_arg2._dj894(true, "tree", 5);
};
if (_arg1 == 8){
_if497(3, _arg2);
_arg2._hi1971(true, true, true, false, false);
_arg2._ma1051(-1, 2, 0, -1, 0);
_arg2._dj894(true, "water", 0);
};
if (_arg1 == 9){
_if497(15, _arg2);
_arg2._hi1971(true, true, true, false, false);
_arg2._ma1051(-1, 2, 0, 0, 0);
_arg2._dj894(true, "tree", 6);
};
if (_arg1 == 10){
_if497(21, _arg2);
_arg2._hi1971(true, true, true, false, false);
_arg2._ma1051(-1, 3, 0, 0, 0);
_arg2._dj894(true, "tree", 7);
};
if (_arg1 == 11){
_if497(0, _arg2);
_arg2._hi1971(true, true, true, true, false);
_arg2._ma1051(-1, 3, 0, 0, 0);
_arg2._dj894(true, "fire", 0);
};
if (_arg1 == 12){
_if497(16, _arg2);
_arg2._hi1971(true, true, true, true, false);
_arg2._ma1051(0, 3, 0, 0, 0);
_arg2._dj894(true, "tree", 8);
};
if (_arg1 == 13){
_if497(17, _arg2);
_arg2._hi1971(true, true, true, true, false);
_arg2._ma1051(0, 4, 0, 0, 0);
_arg2._dj894(true, "tree", 9);
};
if (_arg1 == 14){
_if497(10, _arg2);
_arg2._hi1971(true, true, true, true, true);
_arg2._ma1051(0, 4, 0, 0, 0);
_arg2._dj894(true, "tornado", 1);
};
if (_arg1 == 15){
_if497(4, _arg2);
_arg2._hi1971(true, true, true, true, true);
_arg2._ma1051(0, 4, 1, 0, 0);
_arg2._dj894(true, "water", 1);
};
if (_arg1 == 16){
_if497(1, _arg2);
_arg2._hi1971(true, true, true, true, true);
_arg2._ma1051(0, 4, 1, 1, 0);
_arg2._dj894(true, "fire", 1);
};
if (_arg1 == 17){
_if497(7, _arg2);
_arg2._hi1971(true, true, true, true, true);
_arg2._ma1051(1, 4, 1, 1, 0);
_arg2._dj894(true, "time", 1);
};
if (_arg1 == 18){
_if497(5, _arg2);
_arg2._hi1971(true, true, true, true, true);
_arg2._ma1051(1, 4, 1, 1, 1);
_arg2._dj894(true, "water", 2);
};
if (_arg1 == 19){
_if497(8, _arg2);
_arg2._hi1971(true, true, true, true, true);
_arg2._ma1051(1, 4, 1, 2, 1);
_arg2._dj894(true, "time", 2);
};
if (_arg1 == 20){
_if497(11, _arg2);
_arg2._hi1971(true, true, true, true, false);
_arg2._ma1051(1, 4, 1, 2, 2);
_arg2._dj894(true, "tornado", 2);
};
if (_arg1 == 21){
_if497(2, _arg2);
_arg2._hi1971(true, true, true, true, true);
_arg2._ma1051(1, 4, 2, 2, 2);
_arg2._dj894(true, "fire", 2);
};
}
public function _oq1295(_arg1:int):TLevelProto{
var _local2:TLevelProto = new TLevelProto();
_local2.LevelId = _arg1;
_local2.LevelNum = (((_arg1 + 1))>=10) ? (_arg1 + 1).toString() : ("0" + (_arg1 + 1).toString());
_local2.bmpProto = _ij866(_arg1);
_gt1747(_arg1, _local2);
return (_local2);
}
}
}//package pgn.gfxAssets
Section 64
//TLevelProtoAsset_kClrGold01 (pgn.gfxAssets.TLevelProtoAsset_kClrGold01)
package pgn.gfxAssets {
import mx.core.*;
public class TLevelProtoAsset_kClrGold01 extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 65
//TLevelProtoAsset_kClrGold02 (pgn.gfxAssets.TLevelProtoAsset_kClrGold02)
package pgn.gfxAssets {
import mx.core.*;
public class TLevelProtoAsset_kClrGold02 extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 66
//TLevelProtoAsset_kClrGold03 (pgn.gfxAssets.TLevelProtoAsset_kClrGold03)
package pgn.gfxAssets {
import mx.core.*;
public class TLevelProtoAsset_kClrGold03 extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 67
//TLevelProtoAsset_kLevels (pgn.gfxAssets.TLevelProtoAsset_kLevels)
package pgn.gfxAssets {
import mx.core.*;
public class TLevelProtoAsset_kLevels extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 68
//TMenuAsset (pgn.gfxAssets.TMenuAsset)
package pgn.gfxAssets {
import flash.geom.*;
import flash.display.*;
import pgn.render.*;
public class TMenuAsset {
private var k_menu:Class;
private var b_menu:Bitmap;
private var k_name:Class;
private var b_name:Bitmap;
private var k_small_boards:Class;
private var b_small_boards:Bitmap;
private var k_wood_board:Class;
private var b_wood_board:Bitmap;
private var k_bt_next_lvl:Class;
private var b_bt_next_lvl:Bitmap;
private var k_bt_lvl_select:Class;
private var b_bt_lvl_select:Bitmap;
private var k_bt_back_menu:Class;
private var b_bt_back_menu:Bitmap;
private var k_bt_lvl_menu:Class;
private var b_bt_lvl_menu:Bitmap;
private var k_bts_game_menu:Class;
private var b_bts_game_menu:Bitmap;
private var k_bts_options:Class;
private var b_bts_options:Bitmap;
private var k_intro_board:Class;
private var b_intro_board:Bitmap;
private var k_credits_board:Class;
private var b_credits_board:Bitmap;
private var k_submit_board:Class;
private var b_submit_board:Bitmap;
private var k_arr_left:Class;
private var b_arr_left:Bitmap;
private var k_arr_rgt:Class;
private var b_arr_rgt:Bitmap;
private var sizeX:int;// = 119
private var sizeY:int;// = 30
public var MainMenuNamePt:Point;
public function TMenuAsset(){
k_menu = TMenuAsset_k_menu;
b_menu = new k_menu();
k_name = TMenuAsset_k_name;
b_name = new k_name();
k_small_boards = TMenuAsset_k_small_boards;
b_small_boards = new k_small_boards();
k_wood_board = TMenuAsset_k_wood_board;
b_wood_board = new k_wood_board();
k_bt_next_lvl = TMenuAsset_k_bt_next_lvl;
b_bt_next_lvl = new k_bt_next_lvl();
k_bt_lvl_select = TMenuAsset_k_bt_lvl_select;
b_bt_lvl_select = new k_bt_lvl_select();
k_bt_back_menu = TMenuAsset_k_bt_back_menu;
b_bt_back_menu = new k_bt_back_menu();
k_bt_lvl_menu = TMenuAsset_k_bt_lvl_menu;
b_bt_lvl_menu = new k_bt_lvl_menu();
k_bts_game_menu = TMenuAsset_k_bts_game_menu;
b_bts_game_menu = new k_bts_game_menu();
k_bts_options = TMenuAsset_k_bts_options;
b_bts_options = new k_bts_options();
k_intro_board = TMenuAsset_k_intro_board;
b_intro_board = new k_intro_board();
k_credits_board = TMenuAsset_k_credits_board;
b_credits_board = new k_credits_board();
k_submit_board = TMenuAsset_k_submit_board;
b_submit_board = new k_submit_board();
k_arr_left = TMenuAsset_k_arr_left;
b_arr_left = new k_arr_left();
k_arr_rgt = TMenuAsset_k_arr_rgt;
b_arr_rgt = new k_arr_rgt();
MainMenuNamePt = new Point(240, 36);
super();
}
public function _st471(_arg1:TTextPrinter, _arg2:TButtonRenderer):void{
var _local8:BitmapData;
var _local9:Rectangle;
var _local3:Point = new Point(0, 0);
var _local4:TMenuButton;
var _local5:BitmapData;
var _local6:BitmapData;
var _local7:int;
while (_local7 < 4) {
_local8 = new BitmapData(sizeX, sizeY, true, 0);
_local9 = new Rectangle(0, (_local7 * 34), sizeX, sizeY);
_local8.copyPixels(b_menu.bitmapData, _local9, _local3, null, null, true);
_arg2._kv877(428, (108 + (_local7 * (sizeY + 4))), "mMenu", _local7, _local8, null);
_local7++;
};
_local5 = _lf732(0);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMMenu2, 30, 3, "MORE...");
_local4 = _arg2._kv877(428, (108 + (4 * (sizeY + 4))), "mMenu", 4, _local5, _local6);
_local5 = _lf732(1);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMMenu2, 13, 3, "HOST GAME");
_local4 = _arg2._kv877(428, (108 + (5 * (sizeY + 4))), "mMenu", 5, _local5, _local6);
_local5 = _lf732(0);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMMenu2, 30, 3, "MORE...");
_local4 = _arg2._kv877(280, 468, "afterLvl", 2, _local5, _local6);
_local4.IsBlue = false;
_local4 = _arg2._kv877(((280 + 119) + 6), 468, "afterLvl", 0, _gk1345(), null);
_local4.IsBlue = false;
_local5 = _th453(2);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMainMenu, (4 + 12), 3, "SUBMIT SCORE");
_local4 = _arg2._kv877(((((280 + 119) + 6) + 144) + 5), 468, "afterLvl", 1, _local5, _local6);
_local4.IsBlue = false;
_arg2._kv877(722, 3, "inLvlButton", 0, b_bt_lvl_menu.bitmapData, null, true);
_local5 = _th453(0);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_local4 = _arg2._kv877(416, (436 - 40), "InGameMenu", 20, _local5, _local6);
_local4.IsBlue = false;
_local5 = _th453(1);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_local4 = _arg2._kv877(416, 436, "InGameMenu", 40, _local5, _local6);
_local4.IsBlue = false;
_local5 = _lf732(0);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMainMenu, 4, 3, " CONTINUE");
_local4 = _arg2._kv877(423, 483, "MessageBt", 0, _local5, _local6);
_local4.IsBlue = false;
_local5 = _lf732(0);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMainMenu, 4, 3, " CONTINUE");
_local4 = _arg2._kv877((142 + 300), 406, "MessageBt", 1, _local5, _local6);
_local4.IsBlue = false;
_local4.Visible = false;
_local5 = _th453(1);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_local4 = _arg2._kv877(423, 483, "help", 0, _local5, _local6);
_local4.IsBlue = false;
_local5 = _th453(1);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_local4 = _arg2._kv877(420, 414, "credits", 0, _local5, _local6);
_local4.IsBlue = false;
_local5 = _th453(1);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_local4 = _arg2._kv877(423, 483, "scores", 0, _local5, _local6);
_local4.IsBlue = false;
_local5 = b_arr_left.bitmapData;
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_local4 = _arg2._kv877(462, 453, "scores", 1, _local5, _local6);
_local4.IsBlue = false;
_local5 = b_arr_rgt.bitmapData;
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_local4 = _arg2._kv877(502, 453, "scores", 2, _local5, _local6);
_local4.IsBlue = false;
_local5 = _lf732(0);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMainMenu, 28, 3, "SUBMIT");
_local4 = _arg2._kv877(369, 423, "scoresSubmit", 0, _local5, _local6);
_local4.IsBlue = false;
_local5 = _lf732(0);
_local6 = TRenderFuncs.CloneBmpAndClear(_local5);
_arg1._qq1762(_local6, _arg1.tfMainMenu, 28, 3, "CANCEL");
_local4 = _arg2._kv877(499, 423, "scoresSubmit", 1, _local5, _local6);
_local4.IsBlue = false;
}
public function _ln766():BitmapData{
return (b_name.bitmapData);
}
public function _st1811(_arg1:int):BitmapData{
var _local2:BitmapData = new BitmapData(131, 24, true, 0);
var _local3:Rectangle = new Rectangle(0, (_arg1 * 26), 131, 24);
_local2.copyPixels(b_small_boards.bitmapData, _local3, _local2.rect.topLeft, null, null, true);
return (_local2);
}
public function _lf732(_arg1:int):BitmapData{
var _local2:BitmapData = new BitmapData(119, 30, true, 0);
var _local3:Rectangle = new Rectangle(0, (_arg1 * 34), 119, 30);
_local2.copyPixels(b_bts_game_menu.bitmapData, _local3, _local2.rect.topLeft, null, null, true);
return (_local2);
}
public function _th453(_arg1:int):BitmapData{
var _local2:BitmapData = new BitmapData(144, 30, true, 0);
var _local3:Rectangle = new Rectangle(0, (_arg1 * 30), 144, 30);
_local2.copyPixels(b_bts_options.bitmapData, _local3, _local2.rect.topLeft, null, null, true);
return (_local2);
}
public function _qu258():BitmapData{
return (b_wood_board.bitmapData);
}
public function _gk1345():BitmapData{
return (b_bt_next_lvl.bitmapData);
}
public function _og574():BitmapData{
return (b_bt_lvl_select.bitmapData);
}
public function _jg29():BitmapData{
return (b_bt_back_menu.bitmapData);
}
public function _rk490():BitmapData{
return (b_intro_board.bitmapData);
}
public function _lu1813():BitmapData{
return (b_credits_board.bitmapData);
}
public function _eu187():BitmapData{
return (b_submit_board.bitmapData);
}
}
}//package pgn.gfxAssets
Section 69
//TMenuAsset_k_arr_left (pgn.gfxAssets.TMenuAsset_k_arr_left)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_arr_left extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 70
//TMenuAsset_k_arr_rgt (pgn.gfxAssets.TMenuAsset_k_arr_rgt)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_arr_rgt extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 71
//TMenuAsset_k_bt_back_menu (pgn.gfxAssets.TMenuAsset_k_bt_back_menu)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_bt_back_menu extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 72
//TMenuAsset_k_bt_lvl_menu (pgn.gfxAssets.TMenuAsset_k_bt_lvl_menu)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_bt_lvl_menu extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 73
//TMenuAsset_k_bt_lvl_select (pgn.gfxAssets.TMenuAsset_k_bt_lvl_select)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_bt_lvl_select extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 74
//TMenuAsset_k_bt_next_lvl (pgn.gfxAssets.TMenuAsset_k_bt_next_lvl)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_bt_next_lvl extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 75
//TMenuAsset_k_bts_game_menu (pgn.gfxAssets.TMenuAsset_k_bts_game_menu)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_bts_game_menu extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 76
//TMenuAsset_k_bts_options (pgn.gfxAssets.TMenuAsset_k_bts_options)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_bts_options extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 77
//TMenuAsset_k_credits_board (pgn.gfxAssets.TMenuAsset_k_credits_board)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_credits_board extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 78
//TMenuAsset_k_intro_board (pgn.gfxAssets.TMenuAsset_k_intro_board)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_intro_board extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 79
//TMenuAsset_k_menu (pgn.gfxAssets.TMenuAsset_k_menu)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_menu extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 80
//TMenuAsset_k_name (pgn.gfxAssets.TMenuAsset_k_name)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_name extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 81
//TMenuAsset_k_small_boards (pgn.gfxAssets.TMenuAsset_k_small_boards)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_small_boards extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 82
//TMenuAsset_k_submit_board (pgn.gfxAssets.TMenuAsset_k_submit_board)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_submit_board extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 83
//TMenuAsset_k_wood_board (pgn.gfxAssets.TMenuAsset_k_wood_board)
package pgn.gfxAssets {
import mx.core.*;
public class TMenuAsset_k_wood_board extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 84
//TSelectLevelFrames (pgn.gfxAssets.TSelectLevelFrames)
package pgn.gfxAssets {
import flash.geom.*;
import flash.display.*;
import pgn.render.*;
public class TSelectLevelFrames {
private var k_frames:Class;
private var b_frames:Bitmap;
private var k_tpl:Class;
private var b_tpl:Bitmap;
private var bdSize:Rectangle;
private var topLeft:Point;
private var delta:Point;
public function TSelectLevelFrames(){
k_frames = TSelectLevelFrames_k_frames;
b_frames = new k_frames();
k_tpl = TSelectLevelFrames_k_tpl;
b_tpl = new k_tpl();
bdSize = new Rectangle(0, 0, 40, 29);
topLeft = new Point(32, 26);
delta = new Point(52, 34);
super();
}
public function _st471(_arg1:TTextPrinter, _arg2:TButtonRenderer, _arg3:TMenuAsset):void{
var _local9:int;
var _local10:Rectangle;
var _local11:BitmapData;
var _local12:BitmapData;
var _local13:String;
var _local4 = 1;
var _local5:BitmapData = b_tpl.bitmapData;
var _local6:int;
while (_local6 < _local5.height) {
_local9 = 0;
while (_local9 < _local5.width) {
if (_local5.getPixel32(_local9, _local6) == 4278190080){
_local10 = new Rectangle(((_local9 * delta.x) + topLeft.x), ((_local6 * delta.y) + topLeft.y), bdSize.width, bdSize.height);
_local11 = new BitmapData(bdSize.width, bdSize.height, true, 0);
_local11.copyPixels(b_frames.bitmapData, _local10, _local11.rect.topLeft, null, null, true);
_local12 = new BitmapData(bdSize.width, bdSize.height, true, 0);
_local13 = _local4.toString();
if (_local4 < 10){
_local13 = ("0" + _local13);
};
_arg1._qq1762(_local12, _arg1.tfSelectLevel, 7, 0, _local13);
_arg2._kv877(((_local9 * delta.x) + 0x0101), ((_local6 * delta.y) + 120), "selLvl", (_local4 - 1), _local11, _local12);
_local4++;
};
_local9++;
};
_local6++;
};
var _local7:BitmapData = _arg3._st1811(0);
var _local8:BitmapData = new BitmapData(_local7.width, _local7.height, true, 0);
_arg1._qq1762(_local8, _arg1.tfMainMenu, 23, 0, "MAIN MENU");
_arg2._kv877(419, 213, "selLvl", 99, _local7, _local8);
}
}
}//package pgn.gfxAssets
Section 85
//TSelectLevelFrames_k_frames (pgn.gfxAssets.TSelectLevelFrames_k_frames)
package pgn.gfxAssets {
import mx.core.*;
public class TSelectLevelFrames_k_frames extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 86
//TSelectLevelFrames_k_tpl (pgn.gfxAssets.TSelectLevelFrames_k_tpl)
package pgn.gfxAssets {
import mx.core.*;
public class TSelectLevelFrames_k_tpl extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 87
//TTotemsAsset (pgn.gfxAssets.TTotemsAsset)
package pgn.gfxAssets {
import flash.geom.*;
import flash.display.*;
import flash.filters.*;
public class TTotemsAsset {
private var k_totems:Class;
private var b_totems:Bitmap;
private var k_time_1:Class;
private var b_time_1:Bitmap;
private var k_time_2:Class;
private var b_time_2:Bitmap;
private var k_back_tree:Class;
private var b_back_tree:Bitmap;
private var helpers:Array;
private var totems:Array;
private var time_1:Array;// = null
private var time_2:Array;// = null
private var back_tree:Array;// = null
private var flt:GlowFilter;
public function TTotemsAsset(){
k_totems = TTotemsAsset_k_totems;
b_totems = new k_totems();
k_time_1 = TTotemsAsset_k_time_1;
b_time_1 = new k_time_1();
k_time_2 = TTotemsAsset_k_time_2;
b_time_2 = new k_time_2();
k_back_tree = TTotemsAsset_k_back_tree;
b_back_tree = new k_back_tree();
helpers = new Array();
totems = new Array();
flt = new GlowFilter(721937, 1, 2, 2, 8, BitmapFilterQuality.HIGH);
super();
}
private function _yf135(_arg1:Bitmap, _arg2:int, _arg3:Point, _arg4:int, _arg5:Boolean=false):Array{
var _local8:BitmapData;
var _local9:Rectangle;
var _local6:Array = new Array();
var _local7:int;
while (_local7 < _arg2) {
_local8 = new BitmapData(100, 150, true, 0);
_local9 = new Rectangle((_arg3.x + (_arg4 * _local7)), _arg3.y, 100, 150);
_local8.copyPixels(_arg1.bitmapData, _local9, _local8.rect.topLeft, null, null, true);
if (_arg5){
_local8.applyFilter(_local8, _local8.rect, _local8.rect.topLeft, flt);
};
_local6.push(_local8);
_local7++;
};
return (_local6);
}
private function _of1032():void{
var _local1:int;
var _local2:int;
var _local3:Array;
var _local4:Array;
_local1 = 0;
while (_local1 < 4) {
_local2 = ((_local1 * 154) + 6);
_local3 = _yf135(b_totems, 3, new Point(6, _local2), 104, true);
helpers.push(_local3);
_local4 = _yf135(b_totems, 3, new Point(6, _local2), 104, false);
totems.push(_local4);
_local1++;
};
_local2 = ((4 * 154) + 6);
_local3 = _yf135(b_totems, 5, new Point(6, _local2), 104, true);
helpers.push(_local3);
_local4 = _yf135(b_totems, 5, new Point(6, _local2), 104, false);
totems.push(_local4);
}
private function _wm1148():void{
time_1 = _yf135(b_time_1, 10, new Point(), 100, false);
time_2 = _yf135(b_time_2, 10, new Point(), 100, false);
back_tree = _yf135(b_back_tree, 10, new Point(9, 14), 104, false);
}
public function _st471():void{
_of1032();
_wm1148();
}
public function _bw1164(_arg1:int, _arg2:int):BitmapData{
return (helpers[_arg1][_arg2]);
}
public function _wn600(_arg1:int, _arg2:int, _arg3:int=0):BitmapData{
var _local4:BitmapData;
var _local5:Boolean;
if (_arg1 == 2){
_local5 = true;
switch (_arg2){
case 0:
_local4 = totems[_arg1][_arg2];
break;
case 1:
_local4 = time_1[_arg3];
break;
case 2:
_local4 = time_2[_arg3];
break;
};
};
if (_arg1 == 4){
_local5 = true;
_local4 = back_tree[_arg2];
};
if (!_local5){
_local4 = totems[_arg1][_arg2];
};
return (_local4);
}
public function _mr1106(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int=0):void{
var _local5:BitmapData = _wn600(_arg2, _arg3, _arg4);
_arg1.copyPixels(_local5, _local5.rect, _arg1.rect.topLeft);
}
}
}//package pgn.gfxAssets
Section 88
//TTotemsAsset_k_back_tree (pgn.gfxAssets.TTotemsAsset_k_back_tree)
package pgn.gfxAssets {
import mx.core.*;
public class TTotemsAsset_k_back_tree extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 89
//TTotemsAsset_k_time_1 (pgn.gfxAssets.TTotemsAsset_k_time_1)
package pgn.gfxAssets {
import mx.core.*;
public class TTotemsAsset_k_time_1 extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 90
//TTotemsAsset_k_time_2 (pgn.gfxAssets.TTotemsAsset_k_time_2)
package pgn.gfxAssets {
import mx.core.*;
public class TTotemsAsset_k_time_2 extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 91
//TTotemsAsset_k_totems (pgn.gfxAssets.TTotemsAsset_k_totems)
package pgn.gfxAssets {
import mx.core.*;
public class TTotemsAsset_k_totems extends BitmapAsset {
}
}//package pgn.gfxAssets
Section 92
//TGlobalVars (pgn.global.TGlobalVars)
package pgn.global {
import pgn.*;
public class TGlobalVars {
public static var CurrentMaxLevel:int = 0;
public static var TotalScore:int = 0;
public static var RealTotalScore:int = 0;
public static var IsSoundOn:Boolean = true;
public static var IsMusicOn:Boolean = true;
public static var SoundPlayer:TSoundPlayer = null;
public static var FrameCounter:int = 666;
public static var ParticlesCnt:int = 0;
}
}//package pgn.global
Section 93
//TLevelStats (pgn.LevelStats.TLevelStats)
package pgn.LevelStats {
import pgn.*;
import pgn.bonuses.*;
import flash.utils.*;
public class TLevelStats {
public var MaxUniques:int;// = 0
public var WasInLevel:int;// = 0
public var MaxInLevel:int;// = 0
public var NowInLevel:int;// = 0
public var CurrentMaxUniq:int;// = -1
public var IsTimeOver:Boolean;// = false
public var MaxTime:int;// = 140000
public var LeftTime:int;// = -1
private var LastTime:int;// = -1
private var AddTimes:Array;
private var tmpTimes:Array;
private var AddScore:int;// = 0
public var Score:int;// = 0
public var YourTime:int;// = 0
public var Tiles:int;// = 0
public var Bonuses:int;// = 0
public var Totems:int;// = 0
public var Chains:int;// = 0
public var MaxChain:int;// = 0
public var MaxWaitTimeBeforeEndLvl:int;// = 5000
public var WaitTimeBeforeEndLvl:int;// = 0
public var WasShowMessage:Boolean;// = false
public function TLevelStats(){
AddTimes = new Array();
tmpTimes = new Array();
super();
}
public function _pg697(_arg1:int):String{
var _local2:int = (_arg1 / 1000);
var _local3:int = (_local2 / 60);
var _local4:int = (_local2 % 60);
var _local5 = "";
if (_local4 < 10){
_local5 = ("0" + _local4);
} else {
_local5 = _local4.toString();
};
return (((_local3 + " : ") + _local5));
}
public function _co990(_arg1:TCell):void{
AddScore = (AddScore + 10);
Tiles++;
}
public function _nv1243():Boolean{
if ((((WasInLevel < MaxUniques)) && ((NowInLevel < MaxInLevel)))){
return (true);
};
return (false);
}
public function _sr1438():void{
NowInLevel--;
if ((((WasInLevel == MaxUniques)) && ((NowInLevel == 0)))){
WaitTimeBeforeEndLvl = 0;
};
}
public function _mo801():int{
NowInLevel++;
WasInLevel++;
CurrentMaxUniq++;
return (CurrentMaxUniq);
}
public function _qr2007():void{
var _local4:int;
var _local5:TTimerAdd;
if (AddScore > 0){
_local4 = (AddScore * 0.05);
_local4 = Math.max(_local4, 1);
Score = (Score + _local4);
AddScore = (AddScore - _local4);
};
var _local1:int;
tmpTimes.length = 0;
_local1 = 0;
while (_local1 < AddTimes.length) {
_local5 = AddTimes[_local1];
_local5.WaitSteps--;
if (_local5.WaitSteps < 0){
LeftTime = (LeftTime + 1000);
_local5.AddSecs--;
};
if (_local5.AddSecs > 0){
tmpTimes.push(_local5);
};
_local1++;
};
AddTimes.length = 0;
_local1 = 0;
while (_local1 < tmpTimes.length) {
AddTimes.push(tmpTimes[_local1]);
_local1++;
};
LeftTime = Math.min(LeftTime, (MaxTime - 1));
var _local2:int = getTimer();
var _local3:int;
if (LastTime < 0){
LastTime = _local2;
LeftTime = (MaxTime - 1);
} else {
_local3 = (_local2 - LastTime);
if (_local3 > 100){
_local3 = 100;
};
LeftTime = (LeftTime - _local3);
LastTime = _local2;
if (LeftTime < 0){
IsTimeOver = true;
LeftTime = 0;
if ((((WasInLevel == MaxUniques)) && ((NowInLevel == 0)))){
IsTimeOver = false;
};
};
};
YourTime = (YourTime + _local3);
if ((((WasInLevel == MaxUniques)) && ((NowInLevel == 0)))){
WaitTimeBeforeEndLvl = (WaitTimeBeforeEndLvl + _local3);
};
}
public function _jo1524(_arg1:int, _arg2:int):void{
AddTimes.push(new TTimerAdd(_arg2, _arg1));
}
public function _xn631(_arg1:TBaseBonus):void{
Bonuses++;
}
public function _um159():void{
Totems++;
}
public function _vc1878(_arg1:TStrip):void{
Chains++;
MaxChain = Math.max(MaxChain, _arg1.Cells.length);
}
public function _jl1716():Boolean{
if ((((((WasInLevel == MaxUniques)) && ((NowInLevel == 0)))) && ((WaitTimeBeforeEndLvl > MaxWaitTimeBeforeEndLvl)))){
return (true);
};
return (false);
}
}
}//package pgn.LevelStats
Section 94
//TTimerAdd (pgn.LevelStats.TTimerAdd)
package pgn.LevelStats {
public class TTimerAdd {
public var WaitSteps:int;// = -1
public var AddSecs:int;// = -1
public function TTimerAdd(_arg1:int, _arg2:int){
WaitSteps = _arg1;
AddSecs = _arg2;
}
}
}//package pgn.LevelStats
Section 95
//TBaseMarkMethod (pgn.MarkMethods.TBaseMarkMethod)
package pgn.MarkMethods {
import pgn.*;
public class TBaseMarkMethod {
public var Counter:int;// = 48
public function _hc1024(_arg1:TCell):void{
}
}
}//package pgn.MarkMethods
Section 96
//TMarkBonusMethod (pgn.MarkMethods.TMarkBonusMethod)
package pgn.MarkMethods {
import pgn.*;
import pgn.bonuses.*;
public class TMarkBonusMethod extends TBaseMarkMethod {
public var Bonus:TBaseBonus;// = null
public function TMarkBonusMethod(_arg1:TLevel){
Bonus = TLevelFiller.GenerateBonus(_arg1.LevelProto);
}
override public function _hc1024(_arg1:TCell):void{
_arg1.Bonus = Bonus;
}
}
}//package pgn.MarkMethods
Section 97
//TMarkDeleteMethod (pgn.MarkMethods.TMarkDeleteMethod)
package pgn.MarkMethods {
import pgn.*;
import pgn.Uniques.*;
public class TMarkDeleteMethod extends TBaseMarkMethod {
override public function _hc1024(_arg1:TCell):void{
var _local2:TUniquePiece;
if (_arg1.CellType == 2){
_arg1._py469();
_arg1.LevelLink.Animation._he1177(_arg1, false);
_local2 = _arg1.LevelLink.unqManager.Pieces[_arg1.UnqIndex];
_local2.IsDeleting = true;
_arg1.LevelLink._rf1909(_arg1, _local2);
} else {
_arg1._py469();
_arg1.LevelLink.Animation._he1177(_arg1, true);
};
}
}
}//package pgn.MarkMethods
Section 98
//TMarkFireMethod (pgn.MarkMethods.TMarkFireMethod)
package pgn.MarkMethods {
import pgn.*;
import pgn.bonuses.*;
public class TMarkFireMethod extends TBaseMarkMethod {
override public function _hc1024(_arg1:TCell):void{
_arg1._py469();
_arg1.LevelLink.Animation._he1177(_arg1, false);
var _local2:TFireBonus = new TFireBonus();
_local2._rq285(_arg1);
}
}
}//package pgn.MarkMethods
Section 99
//TRenderLvlOutRainbow (pgn.render.rainbow.TRenderLvlOutRainbow)
package pgn.render.rainbow {
import flash.geom.*;
import pgn.*;
import flash.display.*;
import pgn.render.*;
import flash.utils.*;
public class TRenderLvlOutRainbow {
private var k_part:Class;
private var b_part:Bitmap;
private var spr:BitmapData;// = null
private var particles:Array;
private var initTime:int;// = 0
private var maxTime:int;// = 0
private var srcPt:Point;// = null
private var dstPt:Point;// = null
private var height:Number;// = 0
private var curPt:Point;
private var lastTime:int;// = 0
public function TRenderLvlOutRainbow():void{
k_part = TRenderLvlOutRainbow_k_part;
b_part = new k_part();
particles = new Array();
curPt = new Point();
super();
spr = new BitmapData(b_part.width, b_part.height, false, 0);
spr.copyPixels(b_part.bitmapData, b_part.bitmapData.rect, spr.rect.topLeft, null, null, true);
}
public function _oo879(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Number):void{
particles.length = 0;
initTime = getTimer();
maxTime = (_arg4 * 1000);
srcPt = _arg1.clone();
dstPt = _arg2.clone();
height = _arg3;
}
public function _qr2007():void{
var _local6:int;
var _local7:TRenderLvlOutRainbowParticle;
var _local1:int = getTimer();
var _local2:Number = ((_local1 - initTime) / maxTime);
var _local3:Number = ((_local1 - lastTime) / 1000);
if (_local2 <= 1){
Funcs.MidPointFill(curPt, srcPt, dstPt, _local2);
curPt.y = (curPt.y - (Math.sin((_local2 * Math.PI)) * height));
_local6 = 0;
while (_local6 < 1) {
_local7 = new TRenderLvlOutRainbowParticle();
_local7.pos = curPt.clone();
_local7.pos.y = (_local7.pos.y + (_local6 * 32));
_local7.age = 3;
_local7.ct.redMultiplier = ((Math.random() * 0.7) + 0.1);
_local7.ct.greenMultiplier = ((Math.random() * 0.7) + 0.1);
_local7.ct.blueMultiplier = ((Math.random() * 0.7) + 0.1);
particles.push(_local7);
_local6++;
};
};
if ((((_local2 > 1)) && ((_local2 <= 1.5)))){
_local6 = 0;
while (_local6 < 8) {
_local7 = new TRenderLvlOutRainbowParticle();
_local7.pos = dstPt.clone();
_local7.pos.x = (_local7.pos.x + ((Math.random() - 0.5) * 75));
_local7.pos.y = (_local7.pos.y + ((Math.random() - 0.5) * 100));
_local7.age = 1.5;
_local7.ct.redMultiplier = ((Math.random() * 0.7) + 0.1);
_local7.ct.greenMultiplier = ((Math.random() * 0.7) + 0.1);
_local7.ct.blueMultiplier = ((Math.random() * 0.7) + 0.1);
particles.push(_local7);
_local6++;
};
};
var _local4:int = particles.length;
var _local5:int;
while (_local5 < _local4) {
_local7 = particles[_local5];
particles[_local5].age = (_local7.age - _local3);
_local7.rot = (_local7.rot + _local7.rotSpeed);
if (_local7.age < 1){
_local7.ct.alphaMultiplier = _local7.age;
};
_local5++;
};
lastTime = _local1;
}
public function _dt2001(_arg1:BitmapData):void{
var _local4:TRenderLvlOutRainbowParticle;
var _local2:int = particles.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = particles[_local3];
if (_local4.age >= 0){
TRenderFuncs.Draw(_arg1, spr, _local4.pos, _local4.rot, 3, "add", _local4.ct, false);
};
_local3++;
};
}
public function _ke1991():Boolean{
var _local1:Number = ((lastTime - initTime) / maxTime);
if (_local1 > 1.25){
return (true);
};
return (false);
}
}
}//package pgn.render.rainbow
Section 100
//TRenderLvlOutRainbow_k_part (pgn.render.rainbow.TRenderLvlOutRainbow_k_part)
package pgn.render.rainbow {
import mx.core.*;
public class TRenderLvlOutRainbow_k_part extends BitmapAsset {
}
}//package pgn.render.rainbow
Section 101
//TRenderLvlOutRainbowParticle (pgn.render.rainbow.TRenderLvlOutRainbowParticle)
package pgn.render.rainbow {
import flash.geom.*;
public class TRenderLvlOutRainbowParticle {
public var pos:Point;// = null
public var age:Number;// = 1
public var ct:ColorTransform;
public var rot:Number;
public var rotSpeed:Number;
public function TRenderLvlOutRainbowParticle(){
ct = new ColorTransform();
rot = ((Math.random() * Math.PI) * 2);
rotSpeed = ((Math.random() - 0.5) * 0.1);
super();
}
}
}//package pgn.render.rainbow
Section 102
//TAfterLevelRender (pgn.render.TAfterLevelRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.LevelStats.*;
import flash.utils.*;
import pgn.global.*;
public class TAfterLevelRender {
private var k_wheel:Class;
private var b_wheel:Bitmap;
private var tmpCanv:BitmapData;// = null
private var boardTopLeft:Point;
private var bigTextTL:Point;
public var State:int;// = 0
public var FadeCounter:Number;// = 0
private var MaxFadeCounterIn:Number;// = 4
private var MaxFadeCounterOut:Number;// = 1
private var StartTime:int;// = 0
private var LastTime:int;// = 0
private var CurTime:int;// = 0
private var lastDt:Number;// = 0
private var LvlScoreDig:BitmapData;
private var LvlTimeDig:BitmapData;
private var TTLScoreDig:BitmapData;
private var TilesDig:BitmapData;
private var ChainsDig:BitmapData;
private var MaxChainDig:BitmapData;
private var BonusesDig:BitmapData;
private var TotemsDig:BitmapData;
private var digs:Array;
private var colorTrans:ColorTransform;
private var wheelRotation:Number;// = 0
private var lastRePrintDt:Number;// = 0
private var tmpPt:Point;
private var tmpRc:Rectangle;
private var bigTxtCanv:BitmapData;
private var kBoard:Class;
private var bBoard:Bitmap;
public function TAfterLevelRender(){
k_wheel = TAfterLevelRender_k_wheel;
b_wheel = new k_wheel();
boardTopLeft = new Point(222, 109);
bigTextTL = new Point(453, 171);
LvlScoreDig = new BitmapData(100, 32, true, 0);
LvlTimeDig = new BitmapData(100, 32, true, 0);
TTLScoreDig = new BitmapData(100, 32, true, 0);
TilesDig = new BitmapData(100, 32, true, 0);
ChainsDig = new BitmapData(100, 32, true, 0);
MaxChainDig = new BitmapData(100, 32, true, 0);
BonusesDig = new BitmapData(100, 32, true, 0);
TotemsDig = new BitmapData(100, 32, true, 0);
digs = new Array();
colorTrans = new ColorTransform();
tmpPt = new Point();
tmpRc = new Rectangle();
bigTxtCanv = new BitmapData(600, 100, true, 0);
kBoard = TAfterLevelRender_kBoard;
bBoard = new kBoard();
super();
}
public function _go267(_arg1:TRenderer):void{
tmpCanv = bBoard.bitmapData;
_arg1.buttonRenderer._ix671("afterLvl");
var _local2:int = _arg1.textPrinter.tfAfterLevelSmall;
digs.length = 0;
digs.push(TilesDig);
digs.push(ChainsDig);
digs.push(MaxChainDig);
digs.push(BonusesDig);
digs.push(TotemsDig);
digs.push(LvlTimeDig);
digs.push(LvlScoreDig);
digs.push(TTLScoreDig);
}
private function _tv1068(_arg1:TRenderer, _arg2:Number):void{
var _local4:BitmapData;
var _local3:int;
while (_local3 < digs.length) {
_local4 = digs[_local3];
_arg1.bdCanvas.copyPixels(_local4, _local4.rect, new Point((414 + 130), ((216 + (_local3 * 30)) + _arg2)), null, null, true);
_local3++;
};
tmpPt.x = 340;
tmpPt.y = (380 + _arg2);
TRenderFuncs.Draw(_arg1.bdCanvas, b_wheel.bitmapData, tmpPt, wheelRotation, 0.5, "normal", null, true);
}
private function _dp748(_arg1:TRenderer):void{
_arg1.bdCanvas.copyPixels(tmpCanv, tmpCanv.rect, boardTopLeft, null, null, true);
_arg1.bdCanvas.copyPixels(bigTxtCanv, bigTxtCanv.rect, bigTextTL, null, null, true);
_arg1.buttonRenderer._dt2001(_arg1.bdCanvas, "afterLvl", _arg1.CursorPos, -1);
_tv1068(_arg1, 0);
}
private function _je1866(_arg1:TRenderer, _arg2:BitmapData, _arg3:String):void{
TRenderFuncs.ClearBmp(_arg2);
_arg1.textPrinter._qq1762(_arg2, _arg1.textPrinter.tfAfterLevelSmall, 0, 0, _arg3);
}
private function _pj1388(_arg1:TRenderer, _arg2:BitmapData, _arg3:int):void{
var _local4:String = _arg3.toString();
_je1866(_arg1, _arg2, _local4);
}
private function _tk759(_arg1:TRenderer, _arg2:Number):void{
if (_arg1.LevelLink == null){
return;
};
lastRePrintDt = _arg2;
var _local3:int;
var _local4 = "";
var _local5:TLevelStats = _arg1.LevelLink.Stats;
_local3 = (_local5.YourTime * _arg2);
_local4 = _local5._pg697(_local3);
_je1866(_arg1, LvlTimeDig, _local4);
_pj1388(_arg1, LvlScoreDig, (_local5.Score * _arg2));
_pj1388(_arg1, TilesDig, (_local5.Tiles * _arg2));
_pj1388(_arg1, ChainsDig, (_local5.Chains * _arg2));
_pj1388(_arg1, MaxChainDig, (_local5.MaxChain * _arg2));
_pj1388(_arg1, BonusesDig, (_local5.Bonuses * _arg2));
_pj1388(_arg1, TotemsDig, (_local5.Totems * _arg2));
_pj1388(_arg1, TTLScoreDig, (TGlobalVars.TotalScore + (_local5.Score * _arg2)));
}
private function _lu287(_arg1:TRenderer):void{
var _local6:int;
var _local2:Number = (FadeCounter / MaxFadeCounterIn);
var _local3:Number = 0;
var _local4:Number = 0.25;
var _local5:Number = (1 / (_local4 - _local3));
if ((((_local2 > _local3)) && ((_local2 < _local4)))){
_local2 = (_local2 * _local5);
_local2 = (1 - _local2);
_local6 = ((_local2 * _local2) * 600);
tmpPt.x = boardTopLeft.x;
tmpPt.y = (boardTopLeft.y + _local6);
_arg1.bdCanvas.copyPixels(tmpCanv, tmpCanv.rect, tmpPt, null, null, true);
tmpPt.x = bigTextTL.x;
tmpPt.y = (bigTextTL.y + _local6);
_arg1.bdCanvas.copyPixels(bigTxtCanv, bigTxtCanv.rect, tmpPt, null, null, true);
tmpPt.x = 0;
tmpPt.y = _local6;
_arg1.buttonRenderer._ur148(_arg1.bdCanvas, "afterLvl", 0, _local6);
_tv1068(_arg1, _local6);
lastDt = 0;
return;
};
_local3 = 0.25;
_local4 = 1;
_local5 = (1 / (_local4 - _local3));
if ((((_local2 > _local3)) && ((_local2 <= _local4)))){
_local2 = ((_local2 - _local3) * _local5);
wheelRotation = ((_local2 * Math.PI) * 2);
_tk759(_arg1, _local2);
lastDt = _local2;
TGlobalVars.SoundPlayer._su1424();
};
_dp748(_arg1);
}
private function _mi222(_arg1:TRenderer):void{
var _local6:int;
var _local7:Point;
var _local8:Array;
var _local9:int;
var _local10:int;
var _local11:TMenuButton;
var _local2:Number = (FadeCounter / MaxFadeCounterOut);
var _local3:Number = 0;
var _local4:Number = 1;
var _local5:Number = (1 / (_local4 - _local3));
if ((((_local2 > _local3)) && ((_local2 < _local4)))){
_local2 = (_local2 * _local5);
_local6 = ((_local2 * _local2) * 600);
_local7 = boardTopLeft.clone();
boardTopLeft.clone().y = (_local7.y + _local6);
_arg1.bdCanvas.copyPixels(tmpCanv, tmpCanv.rect, _local7, null, null, true);
_local7.x = bigTextTL.x;
_local7.y = (bigTextTL.y + _local6);
_arg1.bdCanvas.copyPixels(bigTxtCanv, bigTxtCanv.rect, _local7, null, null, true);
_local7.x = 0;
_local7.y = _local6;
_local8 = _arg1.buttonRenderer._lr95("afterLvl");
_local9 = _local8.length;
_local10 = 0;
while (_local10 < _local9) {
_local11 = _local8[_local10];
_arg1.buttonRenderer._mt1059(_arg1.bdCanvas, _local11.cat, _local11.id, _local7, -1);
_local10++;
};
_tv1068(_arg1, _local6);
};
}
public function _dt2001(_arg1:TRenderer):void{
var _local2:int = getTimer();
if (State > 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_mi222(_arg1);
LastTime = _local2;
};
if (State < 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_lu287(_arg1);
LastTime = _local2;
};
if (State == 0){
if (lastRePrintDt < 1){
_tk759(_arg1, 1);
};
_dp748(_arg1);
};
}
public function _mr1693():Boolean{
if (State > 0){
return ((FadeCounter > MaxFadeCounterOut));
};
return ((FadeCounter > MaxFadeCounterIn));
}
public function _ob1762(_arg1:TRenderer):void{
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("afterLvl");
}
public function _re1638(_arg1:TRenderer):void{
var _local3:BitmapData;
TGlobalVars.TotalScore = TGlobalVars.RealTotalScore;
TGlobalVars.RealTotalScore = (TGlobalVars.RealTotalScore + _arg1.LevelLink.Stats.Score);
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("afterLvl");
TRenderFuncs.ClearBmp(bigTxtCanv);
_arg1.textPrinter._qq1762(bigTxtCanv, _arg1.textPrinter.tfRedAfterLvl, 0, 0, _arg1.LevelLink.LevelProto.LevelNum);
var _local2:int;
while (_local2 < digs.length) {
_local3 = digs[_local2];
TRenderFuncs.ClearBmp(_local3);
_local2++;
};
}
public function _ml173(_arg1:TButtonRenderer):void{
State = 0;
FadeCounter = 0;
_arg1._ix671("afterLvl");
}
}
}//package pgn.render
Section 103
//TAfterLevelRender_k_wheel (pgn.render.TAfterLevelRender_k_wheel)
package pgn.render {
import mx.core.*;
public class TAfterLevelRender_k_wheel extends BitmapAsset {
}
}//package pgn.render
Section 104
//TAfterLevelRender_kBoard (pgn.render.TAfterLevelRender_kBoard)
package pgn.render {
import mx.core.*;
public class TAfterLevelRender_kBoard extends BitmapAsset {
}
}//package pgn.render
Section 105
//TBackgroundRenderer (pgn.render.TBackgroundRenderer)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.gfxAssets.*;
public class TBackgroundRenderer {
private var k_back:Class;
private var b_back:Bitmap;
private var k_med:Class;
private var b_med:Bitmap;
private var k_forw_bot:Class;
private var b_forw_bot:Bitmap;
private var k_forw_top:Class;
private var b_forw_top:Bitmap;
private var k_02_02_tree:Class;
private var b_02_02_tree:Bitmap;
private var do_02_02_tree:DisplayObject;// = null
private var do_02_02_identMatrix:Matrix;// = null
private var k_02_03_tree:Class;
private var b_02_03_tree:Bitmap;
private var do_02_03_tree:DisplayObject;// = null
private var do_02_03_identMatrix:Matrix;// = null
private var k_lial:Class;
private var b_lial:Bitmap;
private var do_lial:DisplayObject;// = null
private var do_lial_identMatrix:Matrix;// = null
public var TotemsAssets:TTotemsAsset;// = null
public var fire_bd:BitmapData;
public var fire_bmp:Bitmap;
public var water_bd:BitmapData;
public var water_bmp:Bitmap;
public var tornado_bd:BitmapData;
public var tornado_bmp:Bitmap;
public var time_bd:BitmapData;
public var time_bmp:Bitmap;
public var time_fx_bd:BitmapData;
public var time_fx_bmp:Bitmap;
public var tree_bd:BitmapData;
public var tree_bmp:Bitmap;
private var k_wheel:Class;
private var b_wheel:Bitmap;
private var k_wheel_mask:Class;
private var b_wheel_mask:Bitmap;
private var k_wheel_add:Class;
private var b_wheel_add:Bitmap;
private var k_top00:Class;
private var b_top00:Bitmap;
private var k_top01:Class;
private var b_top01:Bitmap;
private var k_top02:Class;
private var b_top02:Bitmap;
private var k_king:Class;
private var b_king:Bitmap;
private var m:Matrix;
private var cntRender:Number;// = 0
private var skewM:Matrix;
private var birdsAsset:TBirdsAsset;
private var birds:Array;
public var fire_lvl:int;// = -1
public var water_lvl:int;// = -1
public var torn_lvl:int;// = -1
public var time_lvl:int;// = -1
public var tree_lvl:int;// = -1
public function TBackgroundRenderer(){
k_back = TBackgroundRenderer_k_back;
b_back = new k_back();
k_med = TBackgroundRenderer_k_med;
b_med = new k_med();
k_forw_bot = TBackgroundRenderer_k_forw_bot;
b_forw_bot = new k_forw_bot();
k_forw_top = TBackgroundRenderer_k_forw_top;
b_forw_top = new k_forw_top();
k_02_02_tree = TBackgroundRenderer_k_02_02_tree;
b_02_02_tree = new k_02_02_tree();
k_02_03_tree = TBackgroundRenderer_k_02_03_tree;
b_02_03_tree = new k_02_03_tree();
k_lial = TBackgroundRenderer_k_lial;
b_lial = new k_lial();
fire_bd = new BitmapData(100, 150, true, 0);
fire_bmp = new Bitmap(fire_bd);
water_bd = new BitmapData(100, 150, true, 0);
water_bmp = new Bitmap(water_bd);
tornado_bd = new BitmapData(100, 150, true, 0);
tornado_bmp = new Bitmap(tornado_bd);
time_bd = new BitmapData(100, 150, true, 0);
time_bmp = new Bitmap(time_bd);
time_fx_bd = new BitmapData(120, 120, true, 0);
time_fx_bmp = new Bitmap(time_fx_bd, "auto", true);
tree_bd = new BitmapData(100, 150, true, 0);
tree_bmp = new Bitmap(tree_bd);
k_wheel = TBackgroundRenderer_k_wheel;
b_wheel = new k_wheel();
k_wheel_mask = TBackgroundRenderer_k_wheel_mask;
b_wheel_mask = new k_wheel_mask();
k_wheel_add = TBackgroundRenderer_k_wheel_add;
b_wheel_add = new k_wheel_add();
k_top00 = TBackgroundRenderer_k_top00;
b_top00 = new k_top00();
k_top01 = TBackgroundRenderer_k_top01;
b_top01 = new k_top01();
k_top02 = TBackgroundRenderer_k_top02;
b_top02 = new k_top02();
k_king = TBackgroundRenderer_k_king;
b_king = new k_king();
m = new Matrix();
skewM = new Matrix();
birdsAsset = new TBirdsAsset();
birds = new Array();
super();
}
private function _sq273(_arg1:Stage, _arg2:Bitmap, _arg3:int=0, _arg4:int=0, _arg5:int=0, _arg6:int=0):DisplayObject{
var _local7:Sprite = new Sprite();
var _local8:DisplayObject = _local7.addChild(_arg2);
_local8.x = _arg3;
_local8.y = _arg4;
_local8 = _arg1.addChild(_local7);
_local8.x = _arg5;
_local8.y = _arg6;
return (_local8);
}
private function _ua1320(_arg1:Stage):void{
_arg1.addChild(fire_bmp);
fire_bmp.x = 437;
fire_bmp.y = 234;
_arg1.addChild(water_bmp);
water_bmp.x = 660;
water_bmp.y = 252;
_arg1.addChild(tornado_bmp);
tornado_bmp.x = 238;
tornado_bmp.y = 258;
_arg1.addChild(time_bmp);
time_bmp.x = 336;
time_bmp.y = 322;
time_fx_bmp.smoothing = true;
_arg1.addChild(time_fx_bmp);
time_fx_bmp.x = (336 - 10);
time_fx_bmp.y = (322 - 12);
_arg1.addChild(tree_bmp);
tree_bmp.x = 545;
tree_bmp.y = 345;
}
private function _to641():void{
fire_bd.fillRect(fire_bd.rect, 0);
water_bd.fillRect(water_bd.rect, 0);
tornado_bd.fillRect(tornado_bd.rect, 0);
time_bd.fillRect(time_bd.rect, 0);
tree_bd.fillRect(tree_bd.rect, 0);
}
private function _uo1278():void{
_to641();
if (fire_lvl >= 0){
TotemsAssets._mr1106(fire_bd, 0, fire_lvl);
};
if (water_lvl >= 0){
if (water_lvl == 0){
water_bmp.x = (660 - 8);
} else {
water_bmp.x = 660;
};
TotemsAssets._mr1106(water_bd, 1, water_lvl);
};
if (torn_lvl >= 0){
TotemsAssets._mr1106(tornado_bd, 3, torn_lvl);
};
if (time_lvl >= 0){
TotemsAssets._mr1106(time_bd, 2, time_lvl);
};
if (tree_lvl >= 0){
TotemsAssets._mr1106(tree_bd, 4, tree_lvl);
};
}
public function _ma1051(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
fire_lvl = _arg1;
water_lvl = _arg2;
torn_lvl = _arg3;
time_lvl = _arg4;
tree_lvl = _arg5;
_uo1278();
}
public function _va1224(_arg1:Stage):void{
var _local2:BitmapData = new BitmapData(b_back.width, b_back.height, false, 0);
_local2.copyPixels(b_back.bitmapData, b_back.bitmapData.rect, _local2.rect.topLeft);
var _local3:Bitmap = new Bitmap(_local2);
_arg1.addChild(_local3);
_local3.x = 135;
b_02_02_tree.smoothing = true;
do_02_02_tree = _sq273(_arg1, b_02_02_tree, 0, 0, 201, 2);
do_02_02_identMatrix = do_02_02_tree.transform.matrix;
b_02_03_tree.smoothing = true;
do_02_03_tree = _sq273(_arg1, b_02_03_tree, 0, 0, 184, 86);
do_02_03_identMatrix = do_02_03_tree.transform.matrix;
b_lial.smoothing = true;
do_lial = _sq273(_arg1, b_lial, 8, 0, 723, 0);
do_lial_identMatrix = do_lial.transform.matrix;
_cs1956(_arg1);
var _local4:Bitmap = TRenderFuncs.CloneBmpToBitmap(b_med.bitmapData, true);
_arg1.addChild(_local4);
_local4.x = 158;
_local4.y = 185;
_ld522(_arg1);
var _local5:Bitmap = TRenderFuncs.CloneBmpToBitmap(b_forw_top.bitmapData, true);
_arg1.addChild(_local5);
_local5.x = 0;
_local5.y = 0;
var _local6:Bitmap = TRenderFuncs.CloneBmpToBitmap(b_forw_bot.bitmapData, false);
_arg1.addChild(_local6);
_local6.x = 0;
_local6.y = 295;
_ua1320(_arg1);
_uo1278();
}
private function _ld522(_arg1:Stage):void{
var _local3:TBirdSprite;
var _local2:int;
while (_local2 < 16) {
_local3 = new TBirdSprite();
_local3.idBird = (6 + (_local2 % 8));
_local3.IsInvert = birdsAsset._ip934(_local3.idBird).IsInvert;
_local3.IsBFly = birdsAsset._ip934(_local3.idBird).IsButterFly;
if (birdsAsset._ip934(_local3.idBird).Count < 6){
_local3.addFrame = 0.2;
};
_local3._fn1910();
_local3.dt = (_local2 * 0.2);
_arg1.addChild(_local3.bmp);
birds.push(_local3);
_local2++;
};
}
private function _cs1956(_arg1:Stage):void{
var _local3:TBirdSprite;
var _local2:int;
while (_local2 < 12) {
_local3 = new TBirdSprite();
_local3.idBird = (_local2 % 6);
_local3.IsInvert = birdsAsset._ip934(_local3.idBird).IsInvert;
_local3.IsBFly = birdsAsset._ip934(_local3.idBird).IsButterFly;
if (birdsAsset._ip934(_local3.idBird).Count < 6){
_local3.addFrame = 0.2;
};
if (_local3.idBird < 2){
_local3.addFrame = 0.3;
};
_local3._fn1910();
_local3.dt = (_local2 * 0.2);
_arg1.addChild(_local3.bmp);
birds.push(_local3);
_local2++;
};
}
private function _tf507():void{
var _local2:TBirdSprite;
var _local3:TBirdAsset;
var _local4:BitmapData;
var _local1:int;
while (_local1 < birds.length) {
_local2 = birds[_local1];
_local3 = birdsAsset._ip934(_local2.idBird);
_local2._qr2007(_local3.Count);
_local4 = _local3.Frames[_local2.frame];
TRenderFuncs.ClearBmp(_local2.bmp.bitmapData);
TRenderFuncs.CopyPix(_local2.bmp.bitmapData, _local4, _local2.bmp.bitmapData.rect.topLeft);
_local2.bmp.x = _local2.CurrPos.x;
_local2.bmp.y = _local2.CurrPos.y;
_local1++;
};
}
private function _vu1863():void{
var _local1:int = ((cntRender / 5) % 10);
if (time_lvl > 0){
TotemsAssets._mr1106(time_bd, 2, time_lvl, _local1);
if (time_lvl > 1){
time_fx_bd.lock();
time_fx_bd.fillRect(time_fx_bd.rect, 0);
m.identity();
m.translate(-60, -58);
m.rotate((cntRender / 48));
m.translate(60, 58);
time_fx_bd.copyPixels(b_wheel_add.bitmapData, b_wheel_add.bitmapData.rect, time_fx_bd.rect.topLeft);
time_fx_bd.draw(b_wheel_mask, m, null, "erase", null, true);
time_fx_bd.draw(b_wheel, m, null, "add", null, true);
time_fx_bd.unlock();
};
};
}
public function _dt2001():void{
cntRender++;
var _local1:Number = 0;
var _local2:Matrix;
skewM.identity();
_local1 = (Math.cos((((cntRender / 370) * Math.PI) * 2)) * (Math.PI / 95));
skewM.c = Math.tan(_local1);
_local2 = do_02_02_identMatrix.clone();
_local2.translate(0, -(b_02_02_tree.height));
_local2.concat(skewM);
_local2.translate(0, b_02_02_tree.height);
do_02_02_tree.transform.matrix = _local2;
skewM.identity();
_local1 = (Math.cos((((cntRender / 320) * Math.PI) * 2)) * (-(Math.PI) / 80));
skewM.c = Math.tan(_local1);
_local2 = do_02_03_identMatrix.clone();
_local2.translate(0, -(b_02_03_tree.height));
_local2.concat(skewM);
_local2.translate(0, b_02_03_tree.height);
do_02_03_tree.transform.matrix = _local2;
do_lial.rotation = (Math.cos((cntRender / 64)) * 5);
_vu1863();
_tf507();
}
public function _fp1931(_arg1:String):Point{
var _local2:Bitmap;
switch (_arg1){
case "fire":
_local2 = fire_bmp;
break;
case "tree":
_local2 = tree_bmp;
break;
case "tornado":
_local2 = tornado_bmp;
break;
case "water":
_local2 = water_bmp;
break;
case "time":
_local2 = time_bmp;
break;
};
return (new Point(_local2.x, _local2.y));
}
public function _kw600(_arg1:String, _arg2:int):void{
switch (_arg1){
case "fire":
fire_lvl = Math.max(fire_lvl, _arg2);
break;
case "tree":
tree_lvl = Math.max(tree_lvl, _arg2);
break;
case "tornado":
torn_lvl = Math.max(torn_lvl, _arg2);
break;
case "water":
water_lvl = Math.max(water_lvl, _arg2);
break;
case "time":
time_lvl = Math.max(time_lvl, _arg2);
break;
};
_uo1278();
}
public function _aq162(_arg1:Stage):void{
_arg1.addChild(b_top01);
b_top01.x = 429;
b_top01.y = 520;
_arg1.addChild(b_top02);
b_top02.x = 639;
b_top02.y = 485;
_arg1.addChild(b_king);
b_king.x = (800 - 109);
b_king.y = (600 - 51);
}
}
}//package pgn.render
Section 106
//TBackgroundRenderer_k_02_02_tree (pgn.render.TBackgroundRenderer_k_02_02_tree)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_02_02_tree extends BitmapAsset {
}
}//package pgn.render
Section 107
//TBackgroundRenderer_k_02_03_tree (pgn.render.TBackgroundRenderer_k_02_03_tree)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_02_03_tree extends BitmapAsset {
}
}//package pgn.render
Section 108
//TBackgroundRenderer_k_back (pgn.render.TBackgroundRenderer_k_back)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_back extends BitmapAsset {
}
}//package pgn.render
Section 109
//TBackgroundRenderer_k_forw_bot (pgn.render.TBackgroundRenderer_k_forw_bot)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_forw_bot extends BitmapAsset {
}
}//package pgn.render
Section 110
//TBackgroundRenderer_k_forw_top (pgn.render.TBackgroundRenderer_k_forw_top)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_forw_top extends BitmapAsset {
}
}//package pgn.render
Section 111
//TBackgroundRenderer_k_king (pgn.render.TBackgroundRenderer_k_king)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_king extends BitmapAsset {
}
}//package pgn.render
Section 112
//TBackgroundRenderer_k_lial (pgn.render.TBackgroundRenderer_k_lial)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_lial extends BitmapAsset {
}
}//package pgn.render
Section 113
//TBackgroundRenderer_k_med (pgn.render.TBackgroundRenderer_k_med)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_med extends BitmapAsset {
}
}//package pgn.render
Section 114
//TBackgroundRenderer_k_top00 (pgn.render.TBackgroundRenderer_k_top00)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_top00 extends BitmapAsset {
}
}//package pgn.render
Section 115
//TBackgroundRenderer_k_top01 (pgn.render.TBackgroundRenderer_k_top01)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_top01 extends BitmapAsset {
}
}//package pgn.render
Section 116
//TBackgroundRenderer_k_top02 (pgn.render.TBackgroundRenderer_k_top02)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_top02 extends BitmapAsset {
}
}//package pgn.render
Section 117
//TBackgroundRenderer_k_wheel (pgn.render.TBackgroundRenderer_k_wheel)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_wheel extends BitmapAsset {
}
}//package pgn.render
Section 118
//TBackgroundRenderer_k_wheel_add (pgn.render.TBackgroundRenderer_k_wheel_add)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_wheel_add extends BitmapAsset {
}
}//package pgn.render
Section 119
//TBackgroundRenderer_k_wheel_mask (pgn.render.TBackgroundRenderer_k_wheel_mask)
package pgn.render {
import mx.core.*;
public class TBackgroundRenderer_k_wheel_mask extends BitmapAsset {
}
}//package pgn.render
Section 120
//TBirdSprite (pgn.render.TBirdSprite)
package pgn.render {
import flash.geom.*;
import pgn.*;
import flash.display.*;
public class TBirdSprite {
public var bmp:Bitmap;
public var idBird:int;// = 0
public var frame:int;// = 0
public var IsInvert:Boolean;// = false
public var IsBFly:Boolean;// = false
public var CurrPos:Point;
public var dt:Number;// = 0
public var deltaDt:Number;// = 0.01
public var addFrame:Number;// = 0.5
private var Points:Array;
private var realFrame:Number;// = 0
public function TBirdSprite(){
bmp = new Bitmap(new BitmapData(50, 50, true, 0));
CurrPos = new Point();
Points = new Array();
super();
}
private function _sg1085():void{
Points.push(new Point(-100, ((Math.random() * 300) - 100)));
Points.push(new Point((0 + (Math.random() * 100)), ((Math.random() * 300) - 100)));
Points.push(new Point((350 + (Math.random() * 100)), ((Math.random() * 300) - 100)));
Points.push(new Point((800 + (Math.random() * 100)), ((Math.random() * 300) - 100)));
Points.push(new Point(1000, ((Math.random() * 300) - 100)));
}
private function _vx880():void{
var _local1:int = ((Math.random() * 600) + 100);
var _local2 = 300;
var _local3:Point;
var _local4:int;
while (_local4 < 5) {
_local3 = new Point();
_local3.x = (((_local4 * 40) + (Math.random() * 7)) + _local1);
_local3.y = ((((_local4 == 0)) || ((_local4 == 4)))) ? _local2 : (((-(Math.random()) * 50) - 75) + _local2);
Points.push(_local3);
_local4++;
};
_local3 = Points.shift();
Points.unshift(_local3);
Points.unshift(_local3);
_local3 = Points.pop();
Points.push(_local3);
Points.push(_local3);
}
public function _fn1910():void{
Points.length = 0;
if (IsBFly){
_vx880();
} else {
_sg1085();
};
if (IsInvert){
Points = Points.reverse();
};
bmp.visible = (Math.random() < 0.1);
}
public function _qr2007(_arg1:int):void{
dt = (dt + deltaDt);
if (dt > ((Points.length - 3) - 0.01)){
_fn1910();
dt = 0;
};
Funcs.FillCatmullRomPointFromArray(Points, dt, CurrPos);
realFrame = (realFrame + addFrame);
frame = (realFrame % _arg1);
}
}
}//package pgn.render
Section 121
//TButtonGlowFilters (pgn.render.TButtonGlowFilters)
package pgn.render {
import flash.filters.*;
public class TButtonGlowFilters {
private var filtersBlue:Array;
private var filtersBrown:Array;
public function TButtonGlowFilters(){
filtersBlue = new Array();
filtersBrown = new Array();
super();
var _local1:GlowFilter;
var _local2:int;
_local2 = 0;
while (_local2 < 16) {
_local1 = new GlowFilter(11205614, 1, _local2, _local2, 2, 1);
filtersBlue.push(_local1);
_local1 = new GlowFilter(16776638, 1, (_local2 * 1.5), (_local2 * 1.5), 2, 1);
filtersBrown.push(_local1);
_local2++;
};
}
public function _sb1328(_arg1:int):GlowFilter{
return (filtersBlue[_arg1]);
}
public function _kb1117(_arg1:int):GlowFilter{
return (filtersBrown[_arg1]);
}
}
}//package pgn.render
Section 122
//TButtonRenderer (pgn.render.TButtonRenderer)
package pgn.render {
import flash.geom.*;
import flash.display.*;
public class TButtonRenderer {
private var buttons:Array;
private var filters:TButtonGlowFilters;
private var tmpPt:Point;
private var tmpMat:Matrix;
private var tmpCt:ColorTransform;
public function TButtonRenderer(){
buttons = new Array();
filters = new TButtonGlowFilters();
tmpPt = new Point();
tmpMat = new Matrix();
tmpCt = new ColorTransform();
super();
}
public function _kv877(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:BitmapData, _arg6:BitmapData, _arg7:Boolean=false):TMenuButton{
var _local8:TMenuButton;
_local8 = new TMenuButton();
_local8.cat = _arg3;
_local8.id = _arg4;
_local8.NeedStrGlow = _arg7;
_local8.bdBack = _arg5;
_local8.str = _arg6;
_local8.rect = new Rectangle(_arg1, _arg2, _arg5.width, _arg5.height);
_local8._hi2021();
buttons.push(_local8);
return (_local8);
}
public function _ix671(_arg1:String):void{
var _local3:TMenuButton;
var _local2:int;
while (_local2 < buttons.length) {
_local3 = buttons[_local2];
if (_local3.cat == _arg1){
_local3.level = 0;
};
_local2++;
};
}
public function _qx471(_arg1:String, _arg2:Point, _arg3:int):void{
var _local5:TMenuButton;
var _local4:int;
while (_local4 < buttons.length) {
_local5 = buttons[_local4];
if (_local5.cat == _arg1){
if (_arg3 >= 0){
if ((((_local5.id <= _arg3)) || ((_local5.id == 99)))){
_local5._fw1608(_arg2);
};
} else {
_local5._fw1608(_arg2);
};
};
_local4++;
};
}
private function _ck79(_arg1:BitmapData, _arg2:String, _arg3:int):void{
var _local5:TMenuButton;
var _local4:int;
while (_local4 < buttons.length) {
_local5 = buttons[_local4];
if (_local5.Visible){
if (_local5.cat == _arg2){
if (_local5.IsGlowed){
_local5._it588(filters, _arg3);
_arg1.copyPixels(_local5.realBmp, _local5.realBmp.rect, _local5.realTopLeft, null, null, true);
} else {
_arg1.copyPixels(_local5.bdBack, _local5.bdBack.rect, _local5.rect.topLeft, null, null, true);
};
};
};
_local4++;
};
}
public function _dt2001(_arg1:BitmapData, _arg2:String, _arg3:Point, _arg4:int):void{
_qx471(_arg2, _arg3, _arg4);
_ck79(_arg1, _arg2, _arg4);
}
public function _ri1870(_arg1:BitmapData, _arg2:String, _arg3:Number):void{
var _local5:TMenuButton;
var _local4:int;
while (_local4 < buttons.length) {
_local5 = buttons[_local4];
if (_local5.cat == _arg2){
tmpMat.identity();
tmpMat.translate(_local5.rect.x, _local5.rect.y);
tmpCt.alphaMultiplier = _arg3;
_arg1.draw(_local5.bdBack, tmpMat, tmpCt, "normal", null, true);
};
_local4++;
};
}
public function _ew1824(_arg1:BitmapData, _arg2:String, _arg3:Number):void{
var _local5:TMenuButton;
var _local4:int;
while (_local4 < buttons.length) {
_local5 = buttons[_local4];
if ((((_local5.cat == _arg2)) && (_local5.Visible))){
_local5._it588(filters, -1);
tmpMat.identity();
tmpMat.translate(_local5.realTopLeft.x, _local5.realTopLeft.y);
tmpCt.alphaMultiplier = _arg3;
_arg1.draw(_local5.realBmp, tmpMat, tmpCt, "normal", null, true);
};
_local4++;
};
}
public function _ur148(_arg1:BitmapData, _arg2:String, _arg3:int, _arg4:int):void{
var _local6:TMenuButton;
var _local5:int;
while (_local5 < buttons.length) {
_local6 = buttons[_local5];
if (_local6.cat == _arg2){
if (_local6.Visible){
_local6._it588(filters, -1);
tmpMat.identity();
tmpMat.translate((_local6.realTopLeft.x + _arg3), (_local6.realTopLeft.y + _arg4));
_arg1.draw(_local6.realBmp, tmpMat, null, "normal", null, true);
};
};
_local5++;
};
}
public function _mt1059(_arg1:BitmapData, _arg2:String, _arg3:int, _arg4:Point, _arg5:int):void{
var _local6:Boolean;
var _local7:TMenuButton;
var _local8:int = buttons.length;
var _local9:int;
while (_local9 < _local8) {
_local7 = buttons[_local9];
if ((((_local7.cat == _arg2)) && ((_local7.id == _arg3)))){
_local6 = true;
break;
};
_local9++;
};
if (_local6){
tmpPt.x = (_local7.realTopLeft.x + _arg4.x);
tmpPt.y = (_local7.realTopLeft.y + _arg4.y);
_local7._it588(filters, _arg5);
_arg1.copyPixels(_local7.realBmp, _local7.realBmp.rect, tmpPt, null, null, true);
};
}
public function _dm1611(_arg1:Point, _arg2:String, _arg3:int):int{
var _local6:TMenuButton;
var _local4 = -1;
var _local5:int;
while (_local5 < buttons.length) {
_local6 = buttons[_local5];
if ((((((_local6.cat == _arg2)) && (_local6.IsGlowed))) && (_local6.Visible))){
if (_arg3 >= 0){
if ((((_local6.id <= _arg3)) || ((_local6.id == 99)))){
if (_local6.rect.containsPoint(_arg1)){
_local4 = _local6.id;
break;
};
};
} else {
if (_local6.rect.containsPoint(_arg1)){
_local4 = _local6.id;
break;
};
};
};
_local5++;
};
return (_local4);
}
public function _lr95(_arg1:String):Array{
var _local4:TMenuButton;
var _local2:Array = new Array();
var _local3:int;
while (_local3 < buttons.length) {
_local4 = buttons[_local3];
if (_local4.cat == _arg1){
_local2.push(_local4);
};
_local3++;
};
return (_local2);
}
public function _qw996(_arg1:String, _arg2:int):TMenuButton{
var _local4:TMenuButton;
var _local3:int;
while (_local3 < buttons.length) {
_local4 = buttons[_local3];
if ((((_local4.cat == _arg1)) && ((_local4.id == _arg2)))){
return (_local4);
};
_local3++;
};
return (null);
}
}
}//package pgn.render
Section 123
//TCreditsRender (pgn.render.TCreditsRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
public class TCreditsRender {
public var State:int;// = 0
public var FadeCounter:Number;// = 0
private var MaxFadeCounterIn:Number;// = 1
private var MaxFadeCounterOut:Number;// = 1
private var StartTime:int;// = 0
private var LastTime:int;// = 0
private var CurTime:int;// = 0
private var lastDt:Number;// = 0
private var bigTxtCanv:BitmapData;
private var tmpCanv:BitmapData;// = null
private var boardTopLeft:Point;
private var tmpPt:Point;
private var rendLink:TRenderer;// = null
public function TCreditsRender(){
bigTxtCanv = new BitmapData(600, 100, true, 0);
boardTopLeft = new Point(291, 161);
tmpPt = new Point();
super();
}
private function _tx1348(_arg1:TRenderer):void{
var _local2:BitmapData = _arg1.mainMenuAsset._ln766();
var _local3:Point = _arg1.mainMenuAsset.MainMenuNamePt;
_arg1.bdCanvas.copyPixels(_local2, _local2.rect, _local3, null, null, true);
}
public function _go267(_arg1:TRenderer):void{
rendLink = _arg1;
tmpCanv = _arg1.mainMenuAsset._lu1813().clone();
_arg1.buttonRenderer._ix671("credits");
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfAfterLevel, 0, 0, "CREDITS");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point((147 + 10), (70 - 16)));
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfHelp, 0, 0, "PROGRAMMING");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point((96 - 25), (112 - 16)));
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfRedCredits, 0, 0, "Ryz");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(192, ((112 + 20) - 16)));
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfHelp, 0, 0, "ARTWORK");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point((96 - 25), ((112 + 48) - 16)));
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfRedCredits, 0, 0, "Eloku");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(192, (((112 + 48) + 20) - 16)));
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfHelp, 0, 0, "MUSIC and SOUND");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point((96 - 25), ((112 + 96) - 16)));
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfRedCredits, 0, 0, "Massage/TheSandS");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(192, (((112 + 96) + 20) - 16)));
bigTxtCanv.dispose();
}
private function _su762(_arg1:int, _arg2:int):void{
tmpPt.x = (boardTopLeft.x + _arg1);
tmpPt.y = (boardTopLeft.y + _arg2);
rendLink.bdCanvas.copyPixels(tmpCanv, tmpCanv.rect, tmpPt, null, null, true);
rendLink.buttonRenderer._ur148(rendLink.bdCanvas, "credits", _arg1, _arg2);
}
private function _lu287(_arg1:TRenderer):void{
var _local2:Number = (1 - (FadeCounter / MaxFadeCounterIn));
_su762(((_local2 * _local2) * 600), 0);
}
private function _mi222(_arg1:TRenderer):void{
var _local2:Number = (FadeCounter / MaxFadeCounterOut);
_su762(((_local2 * _local2) * 600), 0);
}
private function _dp748(_arg1:TRenderer):void{
_su762(0, 0);
_arg1.buttonRenderer._dt2001(_arg1.bdCanvas, "credits", _arg1.CursorPos, -1);
}
public function _dt2001(_arg1:TRenderer):void{
rendLink = _arg1;
var _local2:int = getTimer();
_tx1348(_arg1);
if (State > 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_mi222(_arg1);
LastTime = _local2;
};
if (State < 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_lu287(_arg1);
LastTime = _local2;
};
if (State == 0){
_dp748(_arg1);
};
}
public function _mr1693():Boolean{
if (State > 0){
return ((FadeCounter > MaxFadeCounterOut));
};
return ((FadeCounter > MaxFadeCounterIn));
}
public function _ob1762(_arg1:TRenderer):void{
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("credits");
}
public function _re1638(_arg1:TRenderer):void{
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("credits");
}
public function _ml173(_arg1:TRenderer):void{
State = 0;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("credits");
}
}
}//package pgn.render
Section 124
//TExplosionRender (pgn.render.TExplosionRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.animation.explosion.*;
public class TExplosionRender {
private var cBR:Class;
private var pic_BR:Bitmap;
private var cfb:Class;
private var pic_fb:Bitmap;
private var FireSprites:Array;
private var p:Point;
private var m:Matrix;
private var ct:ColorTransform;
private var fire_size:int;// = 60
public function TExplosionRender(){
var _local2:int;
var _local3:int;
var _local4:BitmapData;
cBR = TExplosionRender_cBR;
pic_BR = new cBR();
cfb = TExplosionRender_cfb;
pic_fb = new cfb();
FireSprites = new Array();
p = new Point();
m = new Matrix();
ct = new ColorTransform();
super();
var _local1:int;
while (_local1 < 16) {
_local2 = (_local1 % 4);
_local3 = (_local1 / 4);
_local4 = new BitmapData(fire_size, fire_size, false, 0);
_local4.copyPixels(pic_fb.bitmapData, new Rectangle((_local2 * fire_size), (_local3 * fire_size), fire_size, fire_size), _local4.rect.topLeft);
FireSprites.push(_local4);
_local1++;
};
}
public function _dt2001(_arg1:TExplosion, _arg2:BitmapData):void{
var _local6:TExplosionFire;
var _local3:Number = (_arg1.Age / _arg1.LifeTime);
p.x = (-(fire_size) * _local3);
p.y = (-(fire_size) * _local3);
m.identity();
m.scale(_local3, _local3);
m.translate((_arg1.Center.x + p.x), (_arg1.Center.y + p.y));
ct.redMultiplier = (1 - _local3);
ct.greenMultiplier = (1 - _local3);
ct.blueMultiplier = (1 - _local3);
_arg2.draw(pic_BR.bitmapData, m, ct, "add", null, false);
if (_arg1.IsBigExpl){
ct.redMultiplier = (1 - (_local3 * 0.75));
ct.greenMultiplier = (1 - (_local3 * 0.75));
ct.blueMultiplier = (1 - (_local3 * 0.75));
};
var _local4:int = _arg1.Fires.length;
var _local5:int;
while (_local5 < _local4) {
_local6 = _arg1.Fires[_local5];
m.identity();
m.scale(1.4, 1.4);
m.translate((-(fire_size) / 2), (-(fire_size) / 2));
m.rotate(_local6.rotation);
m.translate(_local6.pos.x, _local6.pos.y);
_arg2.draw(FireSprites[_local6.frame], m, ct, "add", null, false);
_local5++;
};
}
}
}//package pgn.render
Section 125
//TExplosionRender_cBR (pgn.render.TExplosionRender_cBR)
package pgn.render {
import mx.core.*;
public class TExplosionRender_cBR extends BitmapAsset {
}
}//package pgn.render
Section 126
//TExplosionRender_cfb (pgn.render.TExplosionRender_cfb)
package pgn.render {
import mx.core.*;
public class TExplosionRender_cfb extends BitmapAsset {
}
}//package pgn.render
Section 127
//TGameMenuRender (pgn.render.TGameMenuRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import pgn.global.*;
public class TGameMenuRender {
public var State:int;// = 0
public var FadeCounter:Number;// = 0
private var MaxFadeCounter:Number;// = 1
private var StartTime:int;// = 0
private var LastTime:int;// = 0
private var CurTime:int;// = 0
private var lastDt:Number;// = 0
private var isMenuLevel:Boolean;// = false
private var k_board:Class;
private var b_board:Bitmap;
private var k_chBox_en:Class;
private var b_chBox_en:Bitmap;
private var k_chBox_dis:Class;
private var b_chBox_dis:Bitmap;
private var k_radioGr_en:Class;
private var b_radioGr_en:Bitmap;
private var k_radioGr_dis:Class;
private var b_radioGr_dis:Bitmap;
private var bigTxtCanv:BitmapData;
private var tmpPt:Point;
private var rendLink:TRenderer;// = null
public function TGameMenuRender(){
k_board = TGameMenuRender_k_board;
b_board = new k_board();
k_chBox_en = TGameMenuRender_k_chBox_en;
b_chBox_en = new k_chBox_en();
k_chBox_dis = TGameMenuRender_k_chBox_dis;
b_chBox_dis = new k_chBox_dis();
k_radioGr_en = TGameMenuRender_k_radioGr_en;
b_radioGr_en = new k_radioGr_en();
k_radioGr_dis = TGameMenuRender_k_radioGr_dis;
b_radioGr_dis = new k_radioGr_dis();
bigTxtCanv = new BitmapData(600, 100, true, 0);
tmpPt = new Point();
super();
}
private function _jo561(_arg1:String, _arg2:int, _arg3:int):void{
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfHelp, 0, 0, _arg1);
TRenderFuncs.CopyPix(b_board.bitmapData, bigTxtCanv, new Point(_arg2, _arg3));
}
public function _yu1413(_arg1:TRenderer):void{
rendLink = _arg1;
_jo561("SOUND", 160, 99);
_jo561("MUSIC", 160, 125);
_jo561("HIGH", 160, 170);
_jo561("MEDIUM", 160, 190);
_jo561("LOW", 160, 210);
}
private function _su762(_arg1:TRenderer, _arg2:Point):void{
_arg1.bdUpper.copyPixels(b_board.bitmapData, b_board.bitmapData.rect, _arg2, null, null, true);
}
private function _ti382(_arg1:TRenderer, _arg2:Point):void{
var _local3:TButtonRenderer = _arg1.buttonRenderer;
var _local4:Bitmap;
_local4 = (TGlobalVars.IsSoundOn) ? b_chBox_en : b_chBox_dis;
TRenderFuncs.CopyPix(_arg1.bdUpper, _local4.bitmapData, new Point(((140 + 302) + _arg2.x), ((104 + 131) + _arg2.y)));
_local4 = (TGlobalVars.IsMusicOn) ? b_chBox_en : b_chBox_dis;
TRenderFuncs.CopyPix(_arg1.bdUpper, _local4.bitmapData, new Point(((140 + 302) + _arg2.x), ((130 + 131) + _arg2.y)));
var _local5:String = _arg1.stageLink.stage.quality;
var _local6:String = StageQuality.BEST;
var _local7:String = StageQuality.HIGH;
_local4 = ((((_local5.toLowerCase() === _local6.toLowerCase())) || ((_local5.toLowerCase() === _local7.toLowerCase())))) ? b_radioGr_en : b_radioGr_dis;
TRenderFuncs.CopyPix(_arg1.bdUpper, _local4.bitmapData, new Point(((140 + 302) + _arg2.x), ((175 + 131) + _arg2.y)));
_local6 = StageQuality.MEDIUM;
_local4 = ((_local5.toLowerCase())===_local6.toLowerCase()) ? b_radioGr_en : b_radioGr_dis;
TRenderFuncs.CopyPix(_arg1.bdUpper, _local4.bitmapData, new Point(((140 + 302) + _arg2.x), ((195 + 131) + _arg2.y)));
_local6 = StageQuality.LOW;
_local4 = ((_local5.toLowerCase())===_local6.toLowerCase()) ? b_radioGr_en : b_radioGr_dis;
TRenderFuncs.CopyPix(_arg1.bdUpper, _local4.bitmapData, new Point(((140 + 302) + _arg2.x), ((215 + 131) + _arg2.y)));
var _local8:TMenuButton = _local3._qw996("InGameMenu", 20);
_local8.Visible = isMenuLevel;
_local3._qx471("InGameMenu", _arg1.CursorPos, -1);
_local3._ur148(_arg1.bdUpper, "InGameMenu", _arg2.x, _arg2.y);
}
private function _cx169(_arg1:TRenderer, _arg2:Boolean):void{
var _local3:Number = FadeCounter;
if (_arg2){
_local3 = (MaxFadeCounter - _local3);
};
var _local4:Point = new Point();
_local4.x = (((_local3 * _local3) * 500) + 302);
_local4.y = 131;
_su762(_arg1, _local4);
_local4.x = ((_local3 * _local3) * 500);
_local4.y = 0;
_ti382(_arg1, _local4);
}
private function _dp748(_arg1:TRenderer):void{
var _local2:Point = new Point(302, 131);
_su762(_arg1, _local2);
_local2.x = 0;
_local2.y = 0;
_ti382(_arg1, _local2);
}
public function _dt2001(_arg1:TRenderer):void{
var _local2:int = getTimer();
if (State > 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_cx169(_arg1, false);
LastTime = _local2;
};
if (State < 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_cx169(_arg1, true);
LastTime = _local2;
};
if (State == 0){
_dp748(_arg1);
};
}
public function _mr1693():Boolean{
return ((FadeCounter > MaxFadeCounter));
}
public function _ob1762():void{
LastTime = getTimer();
State = 1;
FadeCounter = 0;
}
public function _re1638(_arg1:TRenderer, _arg2:Boolean):void{
isMenuLevel = _arg2;
LastTime = getTimer();
State = -1;
FadeCounter = 0;
}
public function _ml173():void{
State = 0;
FadeCounter = 0;
}
}
}//package pgn.render
Section 128
//TGameMenuRender_k_board (pgn.render.TGameMenuRender_k_board)
package pgn.render {
import mx.core.*;
public class TGameMenuRender_k_board extends BitmapAsset {
}
}//package pgn.render
Section 129
//TGameMenuRender_k_chBox_dis (pgn.render.TGameMenuRender_k_chBox_dis)
package pgn.render {
import mx.core.*;
public class TGameMenuRender_k_chBox_dis extends BitmapAsset {
}
}//package pgn.render
Section 130
//TGameMenuRender_k_chBox_en (pgn.render.TGameMenuRender_k_chBox_en)
package pgn.render {
import mx.core.*;
public class TGameMenuRender_k_chBox_en extends BitmapAsset {
}
}//package pgn.render
Section 131
//TGameMenuRender_k_radioGr_dis (pgn.render.TGameMenuRender_k_radioGr_dis)
package pgn.render {
import mx.core.*;
public class TGameMenuRender_k_radioGr_dis extends BitmapAsset {
}
}//package pgn.render
Section 132
//TGameMenuRender_k_radioGr_en (pgn.render.TGameMenuRender_k_radioGr_en)
package pgn.render {
import mx.core.*;
public class TGameMenuRender_k_radioGr_en extends BitmapAsset {
}
}//package pgn.render
Section 133
//THelpRender (pgn.render.THelpRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
public class THelpRender {
private var k_board:Class;
private var b_board:Bitmap;
public var State:int;// = 0
public var FadeCounter:Number;// = 0
private var MaxFadeCounterIn:Number;// = 1
private var MaxFadeCounterOut:Number;// = 1
private var StartTime:int;// = 0
private var LastTime:int;// = 0
private var CurTime:int;// = 0
private var lastDt:Number;// = 0
private var bigTxtCanv:BitmapData;
private var tmpCanv:BitmapData;// = null
private var boardTopLeft:Point;
private var tmpPt:Point;
private var rendLink:TRenderer;// = null
public function THelpRender(){
k_board = THelpRender_k_board;
b_board = new k_board();
bigTxtCanv = new BitmapData(600, 100, true, 0);
boardTopLeft = new Point(198, 100);
tmpPt = new Point();
super();
}
private function _jo561(_arg1:String, _arg2:int, _arg3:int):void{
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfHelp, 0, 0, _arg1);
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(_arg2, _arg3));
}
private function _tx1348(_arg1:TRenderer):void{
var _local2:BitmapData = _arg1.mainMenuAsset._ln766();
var _local3:Point = _arg1.mainMenuAsset.MainMenuNamePt.clone();
_arg1.bdCanvas.copyPixels(_local2, _local2.rect, _local3, null, null, true);
}
public function _go267(_arg1:TRenderer):void{
rendLink = _arg1;
tmpCanv = b_board.bitmapData;
_arg1.buttonRenderer._ix671("help");
_jo561("Swap adjacent tiles to make", 60, 280);
_jo561("matches of three or more.", 60, 300);
_jo561("Drive all the pieces to the", 330, 280);
_jo561("bottom of the game field.", 330, 300);
}
private function _su762(_arg1:int, _arg2:int):void{
tmpPt.x = (boardTopLeft.x + _arg1);
tmpPt.y = (boardTopLeft.y + _arg2);
rendLink.bdCanvas.copyPixels(tmpCanv, tmpCanv.rect, tmpPt, null, null, true);
rendLink.buttonRenderer._ur148(rendLink.bdCanvas, "help", _arg1, _arg2);
}
private function _lu287(_arg1:TRenderer):void{
var _local2:Number = (1 - (FadeCounter / MaxFadeCounterIn));
_su762(((_local2 * _local2) * 600), 0);
}
private function _mi222(_arg1:TRenderer):void{
var _local2:Number = (FadeCounter / MaxFadeCounterOut);
_su762(((_local2 * _local2) * 600), 0);
}
private function _dp748(_arg1:TRenderer):void{
_su762(0, 0);
_arg1.buttonRenderer._dt2001(_arg1.bdCanvas, "help", _arg1.CursorPos, -1);
}
public function _dt2001(_arg1:TRenderer):void{
rendLink = _arg1;
var _local2:int = getTimer();
_tx1348(_arg1);
if (State > 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_mi222(_arg1);
LastTime = _local2;
};
if (State < 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_lu287(_arg1);
LastTime = _local2;
};
if (State == 0){
_dp748(_arg1);
};
}
public function _mr1693():Boolean{
if (State > 0){
return ((FadeCounter > MaxFadeCounterOut));
};
return ((FadeCounter > MaxFadeCounterIn));
}
public function _ob1762(_arg1:TRenderer):void{
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("help");
}
public function _re1638(_arg1:TRenderer):void{
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("help");
}
public function _ml173(_arg1:TRenderer):void{
State = 0;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("help");
}
}
}//package pgn.render
Section 134
//THelpRender_k_board (pgn.render.THelpRender_k_board)
package pgn.render {
import mx.core.*;
public class THelpRender_k_board extends BitmapAsset {
}
}//package pgn.render
Section 135
//TLevelRenderFade (pgn.render.TLevelRenderFade)
package pgn.render {
import flash.geom.*;
import pgn.*;
import flash.display.*;
import flash.utils.*;
import pgn.global.*;
import pgn.render.rainbow.*;
public class TLevelRenderFade {
private var k_fill_tpl:Class;
private var b_fill_tpl:Bitmap;
private var k_boards:Class;
private var b_boards:Bitmap;
public var State:int;// = 0
public var isFadeOutWin:Boolean;// = false
public var isExitToMainMenu:Boolean;// = false
public var FadeCounter:Number;// = 0
private var MaxFadeCounter:Number;// = 6
private var MaxFade:Number;// = 6
private var MaxFadeOut:Number;// = 8
private var MaxFadeLose:Number;// = 4
private var MaxFadeExit:Number;// = 2
private var LastTime:int;// = 0
private var tmpCanv:BitmapData;
private var tmpPt:Point;
private var cellsRc:Rectangle;
private var caustBd:BitmapData;
private var boardsBd:BitmapData;
private var tmpRc:Rectangle;
private var realCanvas:BitmapData;// = null
private var m:Matrix;
private var ct:ColorTransform;
private var path:Array;
private var maxPathLen:int;// = 0
private var sprites:Array;
private var lastDarkSprite:int;// = 0
private var lastLgtSprite:int;// = 0
private var cells:Array;
private var lastArrInd:int;// = 0
private var rainbow:TRenderLvlOutRainbow;
private var WasChangeTotem:Boolean;// = false
private var BigText:BitmapData;
private var isFirstRainbow:Boolean;// = false
private var isBeginOfWoodHeat:Boolean;// = true
public function TLevelRenderFade(){
k_fill_tpl = TLevelRenderFade_k_fill_tpl;
b_fill_tpl = new k_fill_tpl();
k_boards = TLevelRenderFade_k_boards;
b_boards = new k_boards();
tmpCanv = new BitmapData(600, 600, true, 0);
tmpPt = new Point();
cellsRc = new Rectangle(200, 0, 600, 600);
caustBd = new BitmapData(600, 600, true, 0);
boardsBd = new BitmapData(600, 600, true, 0);
tmpRc = new Rectangle();
m = new Matrix();
ct = new ColorTransform();
path = new Array();
sprites = new Array();
cells = new Array();
rainbow = new TRenderLvlOutRainbow();
BigText = new BitmapData(600, 100, true, 0);
super();
}
private function _dw1355(_arg1:int, _arg2:int):void{
var _local9:Point;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:uint;
var _local3:BitmapData = b_fill_tpl.bitmapData.clone();
var _local4:Array = new Array();
var _local5:uint = _local3.getPixel32(_arg1, _arg2);
var _local6:int = _arg1;
var _local7:int = _arg2;
var _local8:Boolean;
while (_local8) {
_local8 = false;
_local9 = new Point((_local6 + 1), (_local7 + 1));
_local4.push(_local9);
_local3.setPixel32(_local6, _local7, 0);
_local10 = 0;
_local11 = 0;
_local12 = -1;
while (_local12 < 2) {
_local13 = -1;
while (_local13 < 2) {
if ((Math.abs(_local13) + Math.abs(_local12)) == 1){
_local14 = _local3.getPixel32((_local6 + _local13), (_local7 + _local12));
if (_local14 == _local5){
_local8 = true;
_local10 = (_local6 + _local13);
_local11 = (_local7 + _local12);
break;
};
};
_local13++;
};
_local12++;
};
if (_local8){
_local6 = _local10;
_local7 = _local11;
};
};
path.push(_local4);
maxPathLen = Math.max(_local4.length, maxPathLen);
}
public function _iu723():void{
_dw1355(0, 0);
_dw1355(12, 0);
_dw1355(12, 12);
_dw1355(0, 12);
}
private function _uo1865(_arg1:TRenderer):void{
var _local8:int;
var _local9:TCell;
cells.length = 0;
lastArrInd = 0;
boardsBd.fillRect(boardsBd.rect, 0);
lastDarkSprite = 0;
lastLgtSprite = 0;
var _local2:TLevel = _arg1.LevelLink;
var _local3:Array = new Array();
var _local4:int;
while (_local4 < 6) {
_local3.push(new Array());
_local4++;
};
var _local5:Array;
var _local6:Point;
var _local7:int;
while (_local7 < _local2.Size.height) {
_local8 = 0;
while (_local8 < _local2.Size.width) {
_local9 = _local2._jp74(_local8, _local7);
if (_local9.CellType == 1){
_local5 = _local3[_local9.ColorCode];
_local6 = new Point(_local8, _local7);
_local5.push(_local6);
};
if (_local9.CellType == 2){
_local5 = _local3[5];
_local6 = new Point(_local8, _local7);
_local5.push(_local6);
};
_local8++;
};
_local7++;
};
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4];
if (_local5.length > 0){
cells.push(_local5);
};
_local4++;
};
realCanvas = _arg1.bdCanvas.clone();
realCanvas.fillRect(realCanvas.rect, 0);
realCanvas.copyPixels(_arg1.bdBorder, _arg1.bdBorder.rect, new Point(200, 0), null, null, true);
_arg1._vj416(realCanvas);
TRenderFuncs.ClearBmp(BigText);
_arg1.textPrinter._qq1762(BigText, _arg1.textPrinter.tfLevelNumber, 0, 0, ("LEVEL " + _local2.LevelProto.LevelNum));
}
public function _st471():void{
var _local3:int;
var _local4:Rectangle;
var _local5:BitmapData;
var _local1:BitmapData = b_boards.bitmapData;
var _local2:int;
while (_local2 < 2) {
_local3 = 0;
while (_local3 < 16) {
_local4 = new Rectangle((_local3 * 40), (_local2 * 40), 40, 40);
_local5 = new BitmapData(40, 40, true, 0);
_local5.copyPixels(_local1, _local4, _local5.rect.topLeft, null, null, true);
sprites.push(_local5);
_local3++;
};
_local2++;
};
}
private function _uf2032(_arg1:Number, _arg2:TLevelProto, _arg3:Boolean):void{
var _local7:Array;
var _local8:int;
var _local9:int;
var _local10:Point;
var _local11:int;
var _local12:int;
var _local13:BitmapData;
var _local14:uint;
var _local4:int = (_arg1 * maxPathLen);
var _local5:int = (_arg3) ? lastDarkSprite : lastLgtSprite;
var _local6:int;
while (_local6 < path.length) {
_local7 = path[_local6];
_local8 = Funcs.Interval(0, (_local7.length - 1), _local4);
_local9 = _local5;
while (_local9 <= _local8) {
_local10 = _local7[_local9];
_local11 = _local10.x;
_local12 = _local10.y;
_local13 = null;
if (_arg3){
_local13 = sprites[((_local11 + _local12) % 16)];
} else {
_local13 = sprites[(((_local11 + _local12) % 16) + 16)];
};
_local14 = _arg2.bmpProto.getPixel((_local11 * 3), (_local12 * 3));
if (_local14 == 0x808080){
tmpPt.x = (_local11 * 40);
tmpPt.y = (_local12 * 40);
boardsBd.copyPixels(_local13, _local13.rect, tmpPt, null, null, true);
};
_local9++;
};
_local6++;
};
if (_arg3){
lastDarkSprite = _local4;
} else {
lastLgtSprite = _local4;
};
}
private function _lu287(_arg1:BitmapData, _arg2:TRenderer):void{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:Point;
var _local19:Array;
var _local20:BitmapData;
ct.alphaMultiplier = 1;
ct.redMultiplier = 1;
ct.greenMultiplier = 1;
ct.blueMultiplier = 1;
var _local3:Number = (FadeCounter / MaxFadeCounter);
_arg2.LevelFadeAlpha = _local3;
var _local4:int = ((_local3 * 0x0100) % 64);
tmpCanv.copyPixels(_arg2.bdBorder, _arg2.bdBorder.rect, tmpCanv.rect.topLeft);
_arg2.causticAsset._pw978(caustBd, _arg2.LevelLink.LevelProto, _local4);
tmpPt.x = -4;
tmpPt.y = -4;
tmpCanv.copyPixels(caustBd, caustBd.rect, tmpPt, null, null, true);
if (_local3 < 0.5){
_local8 = (_local3 * 2);
tmpPt.x = (286 + 65);
tmpPt.y = (((800 * _local8) - 200) + (Math.sin(((_local8 * 2) * Math.PI)) * 160));
TRenderFuncs.CopyPix(_arg2.bdUpper, BigText, tmpPt);
};
var _local5:Number = 0;
var _local6:Number = 0.2;
var _local7:Number = (1 / (_local6 - _local5));
if (_local3 < _local6){
_local3 = (_local3 * _local7);
ct.alphaMultiplier = (0.4 + (_local3 / 2));
_local9 = ((MaxFadeCounter - (FadeCounter * _local7)) / MaxFadeCounter);
_local10 = ((_local9 * Math.PI) / 4);
_local11 = ((Math.cos(((_local3 * Math.PI) / 2)) * 0x0200) * ((_local9 * _local9) * _local9));
_local12 = (100 / (100 + _local11));
tmpPt.x = 500;
tmpPt.y = 300;
TRenderFuncs.Draw(_arg1, tmpCanv, tmpPt, _local10, _local12, "normal", ct);
return;
};
_local5 = 0.2;
_local6 = 0.5;
_local7 = (1 / (_local6 - _local5));
if ((((_local3 > _local5)) && ((_local3 < _local6)))){
_local3 = (((_local3 - _local5) * _local7) * 1.2);
_local13 = _local3;
_uf2032(_local13, _arg2.LevelLink.LevelProto, true);
if ((_local3 - 0.2) >= 0){
_local13 = Funcs.Interval(0, 1, (_local3 - 0.2));
_uf2032(_local13, _arg2.LevelLink.LevelProto, false);
};
ct.alphaMultiplier = 0.9;
tmpPt.x = 500;
tmpPt.y = 300;
TRenderFuncs.Draw(_arg1, tmpCanv, tmpPt, 0, 1, "normal", ct);
tmpPt.x = (200 - 4);
tmpPt.y = -4;
_arg1.copyPixels(boardsBd, boardsBd.rect, tmpPt, null, null, true);
return;
};
_local5 = 0.5;
_local6 = 1;
_local7 = (1 / (_local6 - _local5));
if (_local3 > _local5){
if (isBeginOfWoodHeat){
isBeginOfWoodHeat = false;
TGlobalVars.SoundPlayer._ig2005();
};
_local3 = (((_local3 - _local5) * _local7) * cells.length);
tmpPt.x = 200;
tmpPt.y = 0;
_arg1.copyPixels(realCanvas, cellsRc, tmpPt, null, null, true);
tmpPt.x = (200 - 4);
tmpPt.y = -4;
_arg1.copyPixels(boardsBd, boardsBd.rect, tmpPt, null, null, true);
_local14 = Math.floor(_local3);
_local14 = Funcs.Interval(0, (cells.length - 1), _local14);
_local15 = 0;
_local16 = 0;
_local17 = 0;
_local18 = null;
_local19 = null;
if (((!((lastArrInd == _local14))) && ((lastArrInd >= 0)))){
TGlobalVars.SoundPlayer._sa528();
TGlobalVars.SoundPlayer._iu875();
_local19 = cells[lastArrInd];
_local15 = 0;
while (_local15 < _local19.length) {
_local18 = _local19[_local15];
_local16 = _local18.x;
_local17 = _local18.y;
tmpRc.x = (_local16 * 40);
tmpRc.y = (_local17 * 40);
tmpRc.width = 40;
tmpRc.height = 40;
boardsBd.fillRect(tmpRc, 0);
_arg2.LevelLink.Animation.DeletedPieces._ij828((tmpRc.x + 200), tmpRc.y);
_local15++;
};
lastArrInd = _local14;
isBeginOfWoodHeat = true;
};
_local19 = cells[_local14];
_local3 = Funcs.GetDecimalPart(_local3);
ct.alphaMultiplier = 1;
ct.redMultiplier = (1 + (_local3 * 3));
ct.greenMultiplier = (1 + (_local3 * 3));
ct.blueMultiplier = (1 + (_local3 * 3));
_local15 = 0;
while (_local15 < _local19.length) {
_local18 = _local19[_local15];
_local16 = _local18.x;
_local17 = _local18.y;
_local20 = sprites[(((_local16 + _local17) % 16) + 16)];
tmpPt.x = (((_local16 * 40) + 200) + 16);
tmpPt.y = ((_local17 * 40) + 16);
TRenderFuncs.Draw(_arg1, _local20, tmpPt, 0, 1, "normal", ct);
_local15++;
};
};
}
private function _gy1614(_arg1:TRenderer, _arg2:Boolean):void{
var _local4:String;
var _local5:Point;
isFirstRainbow = true;
isFadeOutWin = _arg2;
WasChangeTotem = false;
var _local3:BitmapData = _arg1.bdCanvas.clone();
_local3.fillRect(_local3.rect, 0);
_local3.copyPixels(_arg1.bdBorder, _arg1.bdBorder.rect, new Point(200, 0), null, null, true);
_arg1._vj416(_local3);
tmpCanv.fillRect(tmpCanv.rect, 0);
tmpCanv.copyPixels(_local3, cellsRc, tmpCanv.rect.topLeft, null, null, true);
if (isFadeOutWin){
if (_arg1.LevelLink.LevelProto.TargetIsTotem){
_local4 = _arg1.LevelLink.LevelProto.Target;
_local5 = _arg1.backRenderer._fp1931(_local4);
_arg1.backRenderer._fp1931(_local4).x = (_local5.x + 50);
_local5.y = (_local5.y + 75);
rainbow._oo879(new Point(80, 260), _local5, 128, 3);
} else {
rainbow._oo879(new Point(80, 260), new Point(108, 530), 0, 3);
};
} else {
TRenderFuncs.ClearBmp(BigText);
_arg1.textPrinter._qq1762(BigText, _arg1.textPrinter.tfLevelNumber, 0, 0, "TRY AGAIN!!!");
};
}
private function _mi222(_arg1:BitmapData, _arg2:TRenderer):void{
var _local7:int;
var _local8:String;
var _local9:int;
var _local3:Number = (FadeCounter / MaxFadeCounter);
_arg2.LevelFadeAlpha = (1 - (_local3 * 2));
var _local4:Number = 0;
var _local5:Number = (isFadeOutWin) ? 0.2 : 0.5;
var _local6:Number = (1 / (_local5 - _local4));
if ((((_local3 > _local4)) && ((_local3 < _local5)))){
_local3 = ((_local3 - _local4) * _local6);
_local7 = ((_local3 * _local3) * 600);
_arg1.copyPixels(tmpCanv, tmpCanv.rect, new Point(200, _local7), null, null, true);
};
if (isFadeOutWin){
rainbow._qr2007();
rainbow._dt2001(_arg2.bdFX);
if (isFirstRainbow){
isFirstRainbow = false;
TGlobalVars.SoundPlayer._qw117();
};
if (_arg2.LevelLink.LevelProto.TargetIsTotem){
if (!WasChangeTotem){
if (rainbow._ke1991()){
WasChangeTotem = true;
_local8 = _arg2.LevelLink.LevelProto.Target;
_local9 = _arg2.LevelLink.LevelProto.TargetLevel;
_arg2.backRenderer._kw600(_local8, _local9);
};
};
};
} else {
if (!isExitToMainMenu){
_local3 = (1 - (FadeCounter / MaxFadeCounter));
tmpPt.x = ((224 + 65) + 23);
tmpPt.y = (((800 * _local3) - 200) + (Math.sin(((_local3 * 2) * Math.PI)) * 160));
TRenderFuncs.CopyPix(_arg2.bdUpper, BigText, tmpPt);
};
};
}
public function _dt2001(_arg1:BitmapData, _arg2:TRenderer):void{
var _local3:int = getTimer();
if (State == -1){
FadeCounter = (FadeCounter + ((_local3 - LastTime) / 1000));
_lu287(_arg1, _arg2);
LastTime = _local3;
};
if (State == 1){
FadeCounter = (FadeCounter + ((_local3 - LastTime) / 1000));
_mi222(_arg1, _arg2);
LastTime = _local3;
};
}
public function _mr1693():Boolean{
return ((FadeCounter > MaxFadeCounter));
}
public function _ob1762(_arg1:TRenderer, _arg2:Boolean, _arg3:Boolean):void{
isExitToMainMenu = _arg3;
MaxFadeCounter = MaxFadeOut;
if (!_arg2){
MaxFadeCounter = MaxFadeLose;
};
if (_arg3){
MaxFadeCounter = MaxFadeExit;
};
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_gy1614(_arg1, _arg2);
}
public function _re1638(_arg1:TRenderer):void{
isBeginOfWoodHeat = true;
MaxFadeCounter = MaxFade;
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_uo1865(_arg1);
}
}
}//package pgn.render
Section 136
//TLevelRenderFade_k_boards (pgn.render.TLevelRenderFade_k_boards)
package pgn.render {
import mx.core.*;
public class TLevelRenderFade_k_boards extends BitmapAsset {
}
}//package pgn.render
Section 137
//TLevelRenderFade_k_fill_tpl (pgn.render.TLevelRenderFade_k_fill_tpl)
package pgn.render {
import mx.core.*;
public class TLevelRenderFade_k_fill_tpl extends BitmapAsset {
}
}//package pgn.render
Section 138
//TLightingRender (pgn.render.TLightingRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.animation.lighting.*;
public class TLightingRender {
private var cLgtParticle:Class;
private var pic_LgtParticle:Bitmap;
private var lgtBD:BitmapData;
public function TLightingRender(){
var _local2:Point;
cLgtParticle = TLightingRender_cLgtParticle;
pic_LgtParticle = new cLgtParticle();
lgtBD = new BitmapData(0x0800, 64);
super();
var _local1:int;
while (_local1 < 8) {
_local2 = new Point((_local1 * 0x0100), 0);
lgtBD.copyPixels(pic_LgtParticle.bitmapData, pic_LgtParticle.bitmapData.rect, _local2);
_local1++;
};
}
private function _al997(_arg1:Point, _arg2:Point, _arg3:BitmapData, _arg4:Number):void{
var _local5:Point = _arg2.subtract(_arg1);
var _local6:Number = (_local5.length * _arg4);
_local6 = Math.max(_local6, 1);
var _local7:Rectangle = new Rectangle((Math.random() * 0x0100), 0, _local6, 64);
var _local8:BitmapData = new BitmapData(_local6, 64);
_local8.copyPixels(lgtBD, _local7, new Point());
var _local9:Matrix = new Matrix();
var _local10:Number = Math.atan2(_local5.y, _local5.x);
_local9.translate(0, -32);
_local9.rotate(_local10);
_local9.translate(_arg1.x, _arg1.y);
_arg3.draw(_local8, _local9, null, "add", null, true);
}
public function _dt2001(_arg1:TLighting, _arg2:BitmapData):void{
var _local3:Number = ((_arg1.Age / _arg1.LifeTime) * (_arg1.points.length - 1));
var _local4:int = Math.floor(_local3);
var _local5:Number = (_local3 - _local4);
var _local6:Point;
var _local7:Point;
var _local8:int;
while (_local8 < _local4) {
_local6 = _arg1.points[_local8];
_local7 = _arg1.points[(_local8 + 1)];
_al997(_local6, _local7, _arg2, 1);
_local8++;
};
_local6 = _arg1.points[_local4];
_local7 = _arg1.points[(_local4 + 1)];
_al997(_local6, _local7, _arg2, _local5);
}
}
}//package pgn.render
Section 139
//TLightingRender_cLgtParticle (pgn.render.TLightingRender_cLgtParticle)
package pgn.render {
import mx.core.*;
public class TLightingRender_cLgtParticle extends BitmapAsset {
}
}//package pgn.render
Section 140
//TMainMenuRender (pgn.render.TMainMenuRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.gfxAssets.*;
import flash.utils.*;
public class TMainMenuRender {
public var State:int;// = 0
public var FadeCounter:Number;// = 0
private var LastTime:int;// = 0
private var MaxFadeCounter:Number;// = 1
public var NeedMoveName:Boolean;// = false
private function _tx1348(_arg1:BitmapData, _arg2:TMenuAsset, _arg3:Boolean):void{
var _local6:Number;
var _local7:Number;
var _local4:BitmapData = _arg2._ln766();
var _local5:Point = _arg2.MainMenuNamePt.clone();
if (NeedMoveName){
_local6 = FadeCounter;
if (_arg3){
_local6 = (MaxFadeCounter - _local6);
};
_local7 = (_local6 / MaxFadeCounter);
_local5.y = (_local5.y - ((_local7 * _local7) * 200));
};
_arg1.copyPixels(_local4, _local4.rect, _local5, null, null, true);
}
private function _nh424(_arg1:BitmapData, _arg2:TButtonRenderer, _arg3:Point, _arg4:TMenuAsset):void{
NeedMoveName = false;
_arg2._dt2001(_arg1, "mMenu", _arg3, -1);
_tx1348(_arg1, _arg4, false);
}
private function _cx169(_arg1:BitmapData, _arg2:TButtonRenderer, _arg3:Boolean):void{
var _local10:Number;
var _local11:TMenuButton;
var _local4:Number = FadeCounter;
if (_arg3){
_local4 = (MaxFadeCounter - _local4);
};
var _local5:Number = 0;
var _local6:Point = new Point();
var _local7:Array = _arg2._lr95("mMenu");
var _local8:int = _local7.length;
var _local9:int;
while (_local9 < _local8) {
if (_arg3){
_local5 = ((_local8 - _local9) * 0.05);
} else {
_local5 = (_local9 * 0.05);
};
_local10 = Math.max(0, (_local4 - _local5));
_local6.x = ((_local10 * _local10) * 700);
_local11 = _local7[_local9];
_arg2._mt1059(_arg1, _local11.cat, _local11.id, _local6, -1);
_local9++;
};
}
public function _dt2001(_arg1:BitmapData, _arg2:TButtonRenderer, _arg3:Point, _arg4:TMenuAsset):void{
var _local5:int = getTimer();
if (State == 0){
_nh424(_arg1, _arg2, _arg3, _arg4);
};
if (State == -1){
_tx1348(_arg1, _arg4, true);
_cx169(_arg1, _arg2, true);
FadeCounter = (FadeCounter + ((_local5 - LastTime) / 1000));
LastTime = _local5;
};
if (State == 1){
_tx1348(_arg1, _arg4, false);
_cx169(_arg1, _arg2, false);
FadeCounter = (FadeCounter + ((_local5 - LastTime) / 1000));
LastTime = _local5;
};
}
public function _mr1693():Boolean{
return ((FadeCounter > MaxFadeCounter));
}
public function _ob1762(_arg1:TButtonRenderer):void{
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_arg1._ix671("mMenu");
}
public function _re1638(_arg1:TButtonRenderer):void{
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_arg1._ix671("mMenu");
}
public function _ml173(_arg1:TButtonRenderer):void{
State = 0;
FadeCounter = 0;
_arg1._ix671("mMenu");
}
}
}//package pgn.render
Section 141
//TMenuButton (pgn.render.TMenuButton)
package pgn.render {
import flash.geom.*;
import pgn.*;
import flash.display.*;
public class TMenuButton {
public var IsBlue:Boolean;// = true
public var Visible:Boolean;// = true
public var cat:String;// = ""
public var id:int;// = 0
public var rect:Rectangle;// = null
public var bdBack:BitmapData;// = null
public var str:BitmapData;// = null
public var level:int;// = 0
public var IsGlowed:Boolean;// = true
public var NeedStrGlow:Boolean;// = false
public var realBmp:BitmapData;// = null
public var realTopLeft:Point;// = null
private var tmpBmp:BitmapData;// = null
private static const pt88:Point = new Point(8, 8);
public function _hi2021():void{
realBmp = new BitmapData((bdBack.width + 16), (bdBack.height + 16), true, 0);
realTopLeft = new Point((rect.x - 8), (rect.y - 8));
tmpBmp = realBmp.clone();
}
public function _do1979(_arg1:int, _arg2:Number):void{
rect.x = _arg1;
rect.y = _arg2;
realTopLeft.x = (rect.x - 8);
realTopLeft.y = (rect.y - 8);
}
public function _it588(_arg1:TButtonGlowFilters, _arg2:int):void{
realBmp.fillRect(realBmp.rect, 0);
realBmp.copyPixels(bdBack, bdBack.rect, pt88, null, null, true);
if (level > 0){
if (IsBlue){
realBmp.applyFilter(realBmp, realBmp.rect, realBmp.rect.topLeft, _arg1._sb1328(level));
} else {
realBmp.applyFilter(realBmp, realBmp.rect, realBmp.rect.topLeft, _arg1._kb1117(level));
};
};
if ((((((_arg2 >= 0)) && (!((id == 99))))) && ((id > _arg2)))){
return;
};
if (str != null){
realBmp.copyPixels(str, str.rect, pt88, null, null, true);
};
}
public function _fw1608(_arg1:Point):void{
if (IsGlowed){
if (rect.containsPoint(_arg1)){
level = (level + 2);
} else {
level--;
};
level = Funcs.Interval(0, 8, level);
};
}
}
}//package pgn.render
Section 142
//TMessageRender (pgn.render.TMessageRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class TMessageRender {
public var State:int;// = 0
public var FadeCounter:Number;// = 0
public var IsIntroMsg:Boolean;// = true
private var MaxFadeCounterIn:Number;// = 0.5
private var MaxFadeCounterOut:Number;// = 0.5
private var StartTime:int;// = 0
private var LastTime:int;// = 0
private var CurTime:int;// = 0
private var lastDt:Number;// = 0
private var bigTxtCanv:BitmapData;
private var tmpCanv:BitmapData;// = null
private var introTopLeft:Point;
private var otherTopLeft:Point;
private var rendLink:TRenderer;// = null
private var tmpCt:ColorTransform;
private var msgTF:TextField;// = null
private var nowMsg:int;// = 0
public function TMessageRender(){
bigTxtCanv = new BitmapData(600, 100, true, 0);
introTopLeft = new Point(198, 100);
otherTopLeft = new Point(300, 150);
tmpCt = new ColorTransform();
super();
}
private function _jo561(_arg1:String, _arg2:int, _arg3:int):void{
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfHelp, 0, 0, _arg1);
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(_arg2, _arg3));
}
public function _go267(_arg1:TRenderer):void{
rendLink = _arg1;
tmpCanv = _arg1.mainMenuAsset._rk490().clone();
_arg1.buttonRenderer._ix671("MessageBt");
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfAfterLevel, 0, 0, "INTRODUCTION");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(208, 52));
var _local2 = 120;
_jo561("Far far from here in forgotten jungle mysterious magic", 80, _local2);
_jo561("force is hidden. For long time the former power was", 80, (_local2 + 20));
_jo561("scattered in ashes. You can become its owner, having", 80, (_local2 + 40));
_jo561("passed through all levels.", 80, (_local2 + 60));
_jo561("With each new level your force will repeatedly increase.", 80, (_local2 + 120));
_jo561("On a way of finding of a magic power you will not feel", 80, (_local2 + 140));
_jo561("lonely. Restore ancient totems and they will help to", 80, (_local2 + 160));
_jo561("open to you all secrets of the lost knowledge.", 80, (_local2 + 180));
msgTF = _arg1.textPrinter._jb1855();
}
private function _su762(_arg1:Number):void{
if (nowMsg == 0){
TRenderFuncs.AlphaDraw(rendLink.bdCanvas, tmpCanv, introTopLeft, _arg1);
} else {
TRenderFuncs.AlphaDraw(rendLink.bdCanvas, rendLink.mainMenuAsset._lu1813(), otherTopLeft, _arg1);
msgTF.alpha = _arg1;
};
}
private function _lu287(_arg1:TRenderer):void{
var _local2:Number = (FadeCounter / MaxFadeCounterIn);
_su762(_local2);
rendLink.buttonRenderer._ew1824(rendLink.bdCanvas, "MessageBt", _local2);
}
private function _mi222(_arg1:TRenderer):void{
var _local2:Number = (1 - (FadeCounter / MaxFadeCounterIn));
_su762(_local2);
rendLink.buttonRenderer._ew1824(rendLink.bdCanvas, "MessageBt", _local2);
}
private function _dp748(_arg1:TRenderer):void{
_su762(1);
_arg1.buttonRenderer._dt2001(_arg1.bdCanvas, "MessageBt", _arg1.CursorPos, -1);
}
public function _dt2001(_arg1:TRenderer):void{
rendLink = _arg1;
var _local2:int = getTimer();
if (State > 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_mi222(_arg1);
LastTime = _local2;
};
if (State < 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_lu287(_arg1);
LastTime = _local2;
};
if (State == 0){
_dp748(_arg1);
};
}
public function _mr1693():Boolean{
if (State > 0){
return ((FadeCounter > MaxFadeCounterOut));
};
return ((FadeCounter > MaxFadeCounterIn));
}
public function _ob1762(_arg1:TRenderer):void{
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("MessageBt");
}
public function _re1638(_arg1:TRenderer, _arg2:int):void{
nowMsg = _arg2;
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("MessageBt");
if (_arg2 == 0){
_arg1.buttonRenderer._qw996("MessageBt", 0).Visible = true;
_arg1.buttonRenderer._qw996("MessageBt", 1).Visible = false;
IsIntroMsg = true;
} else {
_arg1.buttonRenderer._qw996("MessageBt", 0).Visible = false;
_arg1.buttonRenderer._qw996("MessageBt", 1).Visible = true;
IsIntroMsg = false;
rendLink.stageLink.addChild(msgTF);
msgTF.alpha = 0;
msgTF.x = 375;
msgTF.y = 221;
if (_arg2 == 1){
msgTF.text = (("Swap adjacent tiles to make matches of three or more. \n\n" + "Drive all the pieces to the bottom of the game field. \n\n") + "No wait! You can make swaps while other pieces are still clearing.");
};
if (_arg2 == 2){
msgTF.text = (("Using bonuses you can pass levels faster.\n\n" + "Make consecutive matches of the same color pieces to activate totems.\n\n") + "At this level it is green colour.");
};
};
}
public function _ml173(_arg1:TRenderer):void{
State = 0;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("MessageBt");
}
public function _ps74(_arg1:TRenderer):void{
if (rendLink.stageLink.contains(msgTF)){
rendLink.stageLink.removeChild(msgTF);
};
}
}
}//package pgn.render
Section 143
//TRenderer (pgn.render.TRenderer)
package pgn.render {
import flash.geom.*;
import pgn.*;
import pgn.Uniques.*;
import flash.display.*;
import pgn.totems.*;
import pgn.animation.lighting.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.gfxAssets.*;
import pgn.animation.explosion.*;
import flash.filters.*;
import pgn.animation.deleting.*;
public class TRenderer {
public var LevelLink:TLevel;// = null
public var bdCanvas:BitmapData;// = null
public var bdFX:BitmapData;// = null
public var bdUpper:BitmapData;// = null
public var stageLink:Stage;// = null
public var bdBorder:BitmapData;
public var explosionRenderer:TExplosionRender;
public var lightingRenderer:TLightingRender;
public var totemsRenderer:TTotemsRender;
public var totemEffectsRenderer:TTotemEffectsRender;
public var backRenderer:TBackgroundRenderer;
public var timerRenderer:TTimerRender;
public var renderUniques:TRenderUniques;
public var renderUnqSite:TRenderUniquesSite;
public var renderScore:TScoreRenderer;
public var totemsAsset:TTotemsAsset;
public var mainMenuRender:TMainMenuRender;
public var mainMenuAsset:TMenuAsset;
public var selectLevelRender:TSelectLevelRender;
public var afterLevelRender:TAfterLevelRender;
public var selectLevelAsset:TSelectLevelFrames;
public var causticAsset:TCausticAsset;
public var buttonRenderer:TButtonRenderer;
public var textPrinter:TTextPrinter;
public var LevelFadeRender:TLevelRenderFade;
public var InGameMenuRender:TGameMenuRender;
public var MessageRender:TMessageRender;
public var HelpRender:THelpRender;
public var ScoresRender:TScoresRender;
public var CreditsRender:TCreditsRender;
public var CursorPos:Point;
public var MaxPieces:int;// = 0
public var MaxWoodPieces:int;// = 0
public var ModeRender_Level:String;// = "ModeRender_Level"
public var ModeRender_MainMenu:String;// = "ModeRender_MainMenu"
public var ModeRender_SelectLvl:String;// = "ModeRender_SelectLvl"
public var ModeRender_AfterLvl:String;// = "ModeRender_AfterLvl"
public var ModeRender_LevelFade:String;// = "ModeRender_LevelFade"
public var ModeRender_InGameMenu:String;// = "ModeRender_InGameMenu"
public var ModeRender_Message:String;// = "ModeRender_Message"
public var ModeRender_Help:String;// = "ModeRender_Help"
public var ModeRender_Scores:String;// = "ModeRender_Scores"
public var ModeRender_Credits:String;// = "ModeRender_Credits"
public var ModeRender:String;
private var kCaps:Class;
private var bCaps:Bitmap;
private var kSel:Class;
private var bSel:Bitmap;
private var kCloud:Class;
private var bCloud:Bitmap;
private var kPieces:Class;
private var bPieces:Bitmap;
private var kPiecesWood:Class;
private var bPiecesWood:Bitmap;
private var kWoodCaps:Class;
private var bWoodCaps:Bitmap;
private var kBonus:Class;
private var bBonus:Bitmap;
private var kBorder:Class;
private var bBorder:Bitmap;
private var kBorder_dsc:Class;
private var bBorder_dsc:Bitmap;
private var kAdd_Border:Class;
private var bAdd_Border:Bitmap;
private var kAdd_Border_dsc:Class;
private var bAdd_Border_dsc:Bitmap;
private var srcRect:Rectangle;
private var tmpShape:Shape;
private var tmpMatrix:Matrix;
private var tmpPoint:Point;
private var clrTransform:ColorTransform;
private var clouds:Array;
private var pieces:Array;
private var woodPieces:Array;
private var rcc_ct:ColorTransform;
private var rcc_bd:BitmapData;
private var rcc_r:Rectangle;
public var LevelFadeAlpha:Number;// = 0
public function TRenderer(){
bdBorder = new BitmapData(600, 600, true, 0);
explosionRenderer = new TExplosionRender();
lightingRenderer = new TLightingRender();
totemsRenderer = new TTotemsRender();
totemEffectsRenderer = new TTotemEffectsRender();
backRenderer = new TBackgroundRenderer();
timerRenderer = new TTimerRender();
renderUniques = new TRenderUniques();
renderUnqSite = new TRenderUniquesSite();
renderScore = new TScoreRenderer();
totemsAsset = new TTotemsAsset();
mainMenuRender = new TMainMenuRender();
mainMenuAsset = new TMenuAsset();
selectLevelRender = new TSelectLevelRender();
afterLevelRender = new TAfterLevelRender();
selectLevelAsset = new TSelectLevelFrames();
causticAsset = new TCausticAsset();
buttonRenderer = new TButtonRenderer();
textPrinter = new TTextPrinter();
LevelFadeRender = new TLevelRenderFade();
InGameMenuRender = new TGameMenuRender();
MessageRender = new TMessageRender();
HelpRender = new THelpRender();
ScoresRender = new TScoresRender();
CreditsRender = new TCreditsRender();
CursorPos = new Point();
ModeRender = ModeRender_MainMenu;
kCaps = TRenderer_kCaps;
bCaps = new kCaps();
kSel = TRenderer_kSel;
bSel = new kSel();
kCloud = TRenderer_kCloud;
bCloud = new kCloud();
kPieces = TRenderer_kPieces;
bPieces = new kPieces();
kPiecesWood = TRenderer_kPiecesWood;
bPiecesWood = new kPiecesWood();
kWoodCaps = TRenderer_kWoodCaps;
bWoodCaps = new kWoodCaps();
kBonus = TRenderer_kBonus;
bBonus = new kBonus();
kBorder = TRenderer_kBorder;
bBorder = new kBorder();
kBorder_dsc = TRenderer_kBorder_dsc;
bBorder_dsc = new kBorder_dsc();
kAdd_Border = TRenderer_kAdd_Border;
bAdd_Border = new kAdd_Border();
kAdd_Border_dsc = TRenderer_kAdd_Border_dsc;
bAdd_Border_dsc = new kAdd_Border_dsc();
srcRect = new Rectangle(0, 0, 40, 40);
tmpShape = new Shape();
tmpMatrix = new Matrix();
tmpPoint = new Point();
clrTransform = new ColorTransform();
clouds = new Array();
pieces = new Array();
woodPieces = new Array();
rcc_ct = new ColorTransform();
rcc_bd = new BitmapData(40, 40, true, 0);
rcc_r = new Rectangle(0, 0, 40, 40);
super();
}
public function _bk1200():void{
var _local1:Array = new Array();
var _local2:int;
var _local3:int;
var _local4:uint;
_local2 = 0;
while (_local2 < 32) {
_local3 = 0;
while (_local3 < 32) {
_local4 = bPieces.bitmapData.getPixel32(_local3, _local2);
if (_local1.indexOf(_local4) < 0){
_local1.push(_local4);
};
_local3++;
};
_local2++;
};
MaxPieces = _local1.length;
var _local5:int;
var _local6:int;
var _local7:Array;
var _local8:BitmapData;
_local5 = 0;
while (_local5 < 5) {
_local7 = new Array();
_local6 = 0;
while (_local6 < MaxPieces) {
_local8 = new BitmapData(32, 32, true, 0);
_local7.push(_local8);
_local6++;
};
pieces.push(_local7);
_local5++;
};
_local5 = 0;
while (_local5 < 5) {
_local7 = pieces[_local5];
_local2 = 0;
while (_local2 < 32) {
_local3 = 0;
while (_local3 < 32) {
_local4 = bPieces.bitmapData.getPixel32(_local3, _local2);
_local8 = _local7[_local1.indexOf(_local4)];
_local4 = bCaps.bitmapData.getPixel32((_local3 + (_local5 * 40)), _local2);
_local8.setPixel32(_local3, _local2, _local4);
_local3++;
};
_local2++;
};
_local5++;
};
}
public function _qb1524():void{
var _local1:Array = new Array();
var _local2:int;
var _local3:int;
var _local4:uint;
_local2 = 0;
while (_local2 < 40) {
_local3 = 0;
while (_local3 < 40) {
_local4 = bPiecesWood.bitmapData.getPixel32(_local3, _local2);
if (_local1.indexOf(_local4) < 0){
_local1.push(_local4);
};
_local3++;
};
_local2++;
};
MaxWoodPieces = _local1.length;
var _local5:int;
var _local6:int;
var _local7:BitmapData;
_local6 = 0;
while (_local6 < MaxWoodPieces) {
_local7 = new BitmapData(40, 40, true, 0);
woodPieces.push(_local7);
_local6++;
};
_local2 = 0;
while (_local2 < 40) {
_local3 = 0;
while (_local3 < 40) {
_local4 = bPiecesWood.bitmapData.getPixel32(_local3, _local2);
_local7 = woodPieces[_local1.indexOf(_local4)];
_local4 = bWoodCaps.bitmapData.getPixel32(_local3, _local2);
_local7.setPixel32(_local3, _local2, _local4);
_local3++;
};
_local2++;
};
var _local8:GlowFilter = new GlowFilter(0x9E6000, 1, 2, 2, 3, 2, true);
_local6 = 0;
while (_local6 < MaxWoodPieces) {
_local7 = woodPieces[_local6];
woodPieces[_local6].applyFilter(woodPieces[_local6], _local7.rect, _local7.rect.topLeft, _local8);
_local6++;
};
}
public function _re700():void{
var _local2:int;
var _local3:BitmapData;
var _local1:int;
while (_local1 < 4) {
_local2 = 0;
while (_local2 < 4) {
_local3 = new BitmapData(32, 32, false, 0);
_local3.copyPixels(bCloud.bitmapData, new Rectangle((_local2 * 32), (_local1 * 32), 32, 32), _local3.rect.topLeft);
clouds.push(_local3);
_local2++;
};
_local1++;
};
}
private function _je1445(_arg1:Array, _arg2:Boolean):Rectangle{
var _local8:int;
var _local9:Boolean;
var _local3:int;
var _local4:int;
var _local5:uint;
var _local6:Rectangle;
var _local7:int;
while (_local7 < 5) {
_local8 = 0;
while (_local8 < 9) {
_local9 = true;
_local3 = 0;
while (_local3 < 3) {
_local4 = 0;
while (_local4 < 3) {
_local5 = bAdd_Border_dsc.bitmapData.getPixel32(((_local8 * 3) + _local4), ((_local7 * 3) + _local3));
if (_local5 != _arg1[((_local3 * 3) + _local4)]){
_local9 = false;
};
_local4++;
};
_local3++;
};
if (_local9){
_local6 = new Rectangle((_local8 * 40), (_local7 * 40), 40, 40);
break;
};
_local8++;
};
_local7++;
};
return (_local6);
}
private function _vi1432(_arg1:Array, _arg2:Boolean):Rectangle{
var _local9:Boolean;
var _local3:int;
var _local4:int;
var _local5:uint;
var _local6:Rectangle;
var _local7:int = (bBorder_dsc.width / 3);
var _local8:int;
while (_local8 < _local7) {
_local9 = true;
_local3 = 0;
while (_local3 < 3) {
_local4 = 0;
while (_local4 < 3) {
_local5 = bBorder_dsc.bitmapData.getPixel32(((_local8 * 3) + _local4), _local3);
if (_local5 != _arg1[((_local3 * 3) + _local4)]){
_local9 = false;
};
_local4++;
};
_local3++;
};
if (_local9){
_local6 = new Rectangle((_local8 * 40), 0, 40, 40);
break;
};
_local8++;
};
return (_local6);
}
public function _kt1646(_arg1:BitmapData, _arg2:Boolean):BitmapData{
var _local13:Boolean;
var _local14:int;
var _local3:Array = new Array(9);
var _local4:Rectangle;
var _local5:BitmapData = new BitmapData(600, 600, true, 0);
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Point = new Point();
_local6 = 0;
while (_local6 < (_arg1.rect.height / 3)) {
_local7 = 0;
while (_local7 < (_arg1.rect.width / 3)) {
_local13 = true;
_local8 = 0;
while (_local8 < 3) {
_local9 = 0;
while (_local9 < 3) {
_local3[((_local8 * 3) + _local9)] = _arg1.getPixel32(((_local7 * 3) + _local9), ((_local6 * 3) + _local8));
if (_local3[((_local8 * 3) + _local9)] != 4286611584){
_local13 = false;
};
_local9++;
};
_local8++;
};
_local10.x = (((_local7 * 40) + 240) - (4 + 266));
_local10.y = (((_local6 * 40) + 0) - (4 + 28));
_local4 = _vi1432(_local3, _arg2);
if (_local4 != null){
_local5.copyPixels(bBorder.bitmapData, _local4, _local10, null, null, true);
} else {
_local4 = _je1445(_local3, _arg2);
if (_local4 != null){
_local5.copyPixels(bAdd_Border.bitmapData, _local4, _local10, null, null, true);
};
};
if (_local13){
_local10.x = (_local10.x + 4);
_local10.y = (_local10.y + 4);
_local14 = (Math.random() * 5);
srcRect.x = (_local14 * srcRect.width);
_local5.copyPixels(bCaps.bitmapData, srcRect, _local10, null, null, true);
};
_local7++;
};
_local6++;
};
var _local11:BitmapData = new BitmapData(96, 96, true, 0);
var _local12:Matrix = new Matrix();
_local12.scale((_local11.width / _local5.width), (_local11.height / _local5.height));
_local11.draw(_local5, _local12, null, null, null, true);
return (_local11);
}
public function _fn1058(_arg1:int, _arg2:int):BitmapData{
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:Rectangle;
var _local12:Point;
var _local3:int = (_arg1 + 2);
var _local4:int = (_arg2 + 2);
var _local5:BitmapData = new BitmapData((_local3 * 40), (_local4 * 40), true, 0);
var _local6:Array = [[0, 1, 2], [6, 4, 10], [11, 16, 15]];
var _local7:int;
while (_local7 < _local4) {
_local8 = 0;
while (_local8 < _local3) {
_local9 = 1;
if (_local8 == 0){
_local9 = 0;
};
if (_local8 == (_local3 - 1)){
_local9 = 2;
};
_local10 = 1;
if (_local7 == 0){
_local10 = 0;
};
if (_local7 == (_local4 - 1)){
_local10 = 2;
};
_local11 = new Rectangle((_local6[_local10][_local9] * 40), 0, 40, 40);
_local12 = new Point((_local8 * 40), (_local7 * 40));
_local5.copyPixels(bBorder.bitmapData, _local11, _local12, null, null, true);
_local8++;
};
_local7++;
};
return (_local5);
}
public function _fp1966():void{
var _local4:int;
var _local5:int;
var _local6:Boolean;
var _local7:Point;
var _local8:int;
var _local1:Array = new Array(4);
var _local2:Rectangle;
bdBorder.fillRect(bdBorder.rect, 0);
var _local3:int;
while (_local3 < LevelLink.Size.height) {
_local4 = 0;
while (_local4 < LevelLink.Size.width) {
_local5 = 0;
while (_local5 < 3) {
_local8 = 0;
while (_local8 < 3) {
_local1[((_local5 * 3) + _local8)] = LevelLink.LevelProto.bmpProto.getPixel32(((_local4 * 3) + _local8), ((_local3 * 3) + _local5));
_local8++;
};
_local5++;
};
_local6 = false;
_local7 = LevelLink._cj1974(_local4, _local3);
LevelLink._cj1974(_local4, _local3).x = (_local7.x - (200 + 4));
_local7.y = (_local7.y - (0 + 4));
_local2 = _vi1432(_local1, false);
if (_local2 != null){
bdBorder.copyPixels(bBorder.bitmapData, _local2, _local7, null, null, true);
_local6 = true;
} else {
_local2 = _je1445(_local1, false);
if (_local2 != null){
bdBorder.copyPixels(bAdd_Border.bitmapData, _local2, _local7, null, null, true);
_local6 = true;
};
};
_local4++;
};
_local3++;
};
}
private function _iw1186():void{
bdCanvas.lock();
bdCanvas.fillRect(bdCanvas.rect, 0);
bdFX.lock();
bdFX.fillRect(bdFX.rect, 0);
}
private function _hf968():void{
bdUpper.lock();
bdUpper.fillRect(bdUpper.rect, 0);
}
public function _dt2001():void{
backRenderer._dt2001();
var _local1:Boolean;
if (ModeRender === ModeRender_Level){
LevelFadeAlpha = 1;
_iw1186();
_hf968();
renderScore._dt2001(this, LevelLink.Stats);
timerRenderer._dt2001(this, LevelLink.Stats);
_vj416(bdCanvas);
renderUnqSite._dt2001(LevelLink.unqSite, bdCanvas, bdFX, 1);
_hh46();
_uf1091();
_ap1764();
_bb1841();
_vw1161();
_rj1521();
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
if (ModeRender === ModeRender_InGameMenu){
_hf968();
InGameMenuRender._dt2001(this);
};
if (ModeRender === ModeRender_Message){
_iw1186();
_hf968();
if (!MessageRender.IsIntroMsg){
renderScore._dt2001(this, LevelLink.Stats);
timerRenderer._dt2001(this, LevelLink.Stats);
_vj416(bdCanvas);
renderUnqSite._dt2001(LevelLink.unqSite, bdCanvas, bdFX, 1);
_hh46();
_uf1091();
_ap1764();
_bb1841();
_vw1161();
_rj1521();
};
MessageRender._dt2001(this);
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
if (ModeRender === ModeRender_Help){
_iw1186();
_hf968();
HelpRender._dt2001(this);
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
if (ModeRender === ModeRender_Scores){
_iw1186();
_hf968();
if (ScoresRender.isWasSubmit){
afterLevelRender._dt2001(this);
};
ScoresRender._dt2001(this);
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
if (ModeRender === ModeRender_Credits){
_iw1186();
_hf968();
CreditsRender._dt2001(this);
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
_local1 = (ModeRender === ModeRender_MainMenu);
if (_local1){
_iw1186();
mainMenuRender._dt2001(bdCanvas, buttonRenderer, CursorPos, mainMenuAsset);
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
_local1 = (ModeRender === ModeRender_SelectLvl);
if (_local1){
_iw1186();
selectLevelRender._dt2001(bdCanvas, buttonRenderer, CursorPos, mainMenuAsset);
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
_local1 = (ModeRender === ModeRender_AfterLvl);
if (_local1){
_iw1186();
afterLevelRender._dt2001(this);
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
_local1 = (ModeRender === ModeRender_LevelFade);
if (_local1){
_iw1186();
_hf968();
_vw1161();
renderScore._dt2001(this, LevelLink.Stats);
timerRenderer._dt2001(this, LevelLink.Stats);
renderUnqSite._dt2001(LevelLink.unqSite, bdCanvas, bdFX, LevelFadeAlpha);
LevelFadeRender._dt2001(bdCanvas, this);
_uf1091();
buttonRenderer._dt2001(bdCanvas, "inLvlButton", CursorPos, -1);
};
bdFX.unlock();
bdCanvas.unlock();
bdUpper.unlock();
}
public function _vj416(_arg1:BitmapData):void{
var _local2:int;
var _local3:int;
var _local4:int = LevelLink.Size.height;
var _local5:int = LevelLink.Size.width;
var _local6:TCell;
_local2 = 0;
while (_local2 < _local4) {
_local3 = 0;
while (_local3 < _local5) {
_local6 = LevelLink._jp74(_local3, _local2);
if (_local6.CellType == 1){
_nr85(_local6, _arg1);
if (_local6 == LevelLink.LastSelectedCell){
_kt1468(_local6, _arg1);
};
};
_local3++;
};
_local2++;
};
_local2 = 0;
while (_local2 < _local4) {
_local3 = 0;
while (_local3 < _local5) {
_local6 = LevelLink._jp74(_local3, _local2);
if (_local6.CellType == 2){
_pv2074(_local6, _arg1);
if (_local6 == LevelLink.LastSelectedCell){
_kt1468(_local6, _arg1);
};
};
_local3++;
};
_local2++;
};
}
private function _nr85(_arg1:TCell, _arg2:BitmapData):void{
if (((((_arg1._ba2091()) && (!(_arg1._hq1342())))) && (!(_arg1.IsAnimating)))){
return;
};
var _local3:Boolean = _arg1._vr716(CursorPos);
srcRect.x = (_arg1.ColorCode * srcRect.width);
if (_arg1.Alpha == 1){
if (_local3){
rcc_bd.fillRect(rcc_bd.rect, 0);
rcc_bd.copyPixels(bCaps.bitmapData, srcRect, rcc_bd.rect.topLeft, null, null, true);
tmpPoint.x = (_arg1.StageCrd.x + 20);
tmpPoint.y = (_arg1.StageCrd.y + 20);
TRenderFuncs.Draw(_arg2, rcc_bd, tmpPoint, _arg1.UnderCursorScale, 1, "normal", null, true);
} else {
_arg2.copyPixels(bCaps.bitmapData, srcRect, _arg1.StageCrd, null, null, true);
};
} else {
rcc_bd.fillRect(rcc_bd.rect, 0);
rcc_bd.copyPixels(bCaps.bitmapData, srcRect, rcc_bd.rect.topLeft, null, null, true);
rcc_ct.alphaMultiplier = _arg1.Alpha;
rcc_ct.redOffset = _arg1.ColorAdd;
rcc_ct.greenOffset = _arg1.ColorAdd;
rcc_ct.blueOffset = _arg1.ColorAdd;
rcc_bd.colorTransform(rcc_r, rcc_ct);
_arg2.copyPixels(rcc_bd, rcc_bd.rect, _arg1.StageCrd, null, null, true);
};
if (_arg1.Bonus != null){
srcRect.x = (_arg1.Bonus.BonusCode * srcRect.width);
if (_arg1.Alpha == 1){
if (_local3){
rcc_bd.fillRect(rcc_bd.rect, 0);
rcc_bd.copyPixels(bBonus.bitmapData, srcRect, rcc_bd.rect.topLeft, null, null, true);
tmpPoint.x = (_arg1.StageCrd.x + 20);
tmpPoint.y = (_arg1.StageCrd.y + 20);
TRenderFuncs.Draw(_arg2, rcc_bd, tmpPoint, _arg1.UnderCursorScale, 1, "normal", null, true);
} else {
_arg2.copyPixels(bBonus.bitmapData, srcRect, _arg1.StageCrd, null, null, true);
};
} else {
rcc_bd.fillRect(rcc_bd.rect, 0);
rcc_bd.copyPixels(bBonus.bitmapData, srcRect, rcc_bd.rect.topLeft, null, null, true);
rcc_ct.alphaMultiplier = _arg1.Alpha;
rcc_ct.redOffset = _arg1.ColorAdd;
rcc_ct.greenOffset = _arg1.ColorAdd;
rcc_ct.blueOffset = _arg1.ColorAdd;
rcc_bd.colorTransform(rcc_r, rcc_ct);
_arg2.copyPixels(rcc_bd, rcc_bd.rect, _arg1.StageCrd, null, null, true);
};
};
}
private function _pv2074(_arg1:TCell, _arg2:BitmapData):void{
if (((((_arg1._ba2091()) && (!(_arg1._hq1342())))) && (!(_arg1.IsAnimating)))){
return;
};
var _local3:TUniquePiece = LevelLink.unqManager.Pieces[_arg1.UnqIndex];
if (((!(_local3.IsDeleting)) && (!(_local3.IsOnSite)))){
renderUniques._ph1856(_arg1, _local3, _arg2, bdFX);
};
}
private function _kt1468(_arg1:TCell, _arg2:BitmapData):void{
srcRect.x = 0;
var _local3:Point = new Point((_arg1.StageCrd.x - 4), (_arg1.StageCrd.y - 4));
_arg2.copyPixels(bSel.bitmapData, srcRect, _local3, null, null, true);
}
private function _ae1836(_arg1:int):void{
clrTransform.redMultiplier = 0.1;
clrTransform.greenMultiplier = 0.1;
clrTransform.blueMultiplier = 0.1;
switch (_arg1){
case 0:
clrTransform.redMultiplier = 0.25;
break;
case 1:
clrTransform.redMultiplier = 0.2;
clrTransform.greenMultiplier = 0.2;
break;
case 2:
clrTransform.greenMultiplier = 0.25;
break;
case 3:
clrTransform.blueMultiplier = 0.3;
break;
case 4:
clrTransform.redMultiplier = 0.2;
clrTransform.greenMultiplier = 0.2;
clrTransform.blueMultiplier = 0.2;
break;
};
}
private function _hh46():void{
var _local6:TPreDeleteCell;
var _local7:Point;
var _local8:Point;
var _local9:Number;
var _local10:int;
var _local11:int;
var _local12:BitmapData;
var _local13:Number;
var _local1:Array = new Array();
var _local2:Graphics = tmpShape.graphics;
_local2.clear();
_local2.lineStyle(3, 4286019583);
var _local3:Point = new Point();
var _local4:Point = new Point();
var _local5:int;
while (_local5 < LevelLink.Animation.PreDeleteCells.length) {
_local6 = LevelLink.Animation.PreDeleteCells[_local5];
_local6.DeleteCounter--;
if (_local6.DeleteCounter > 0){
_local1.push(_local6);
_local7 = _local6.BeginPoint;
_local8 = _local6.EndPoint;
_local9 = 0;
_local10 = 0;
_local10 = 0;
while (_local10 < 3) {
_local9 = ((Math.random() * 2) * Math.PI);
_local3.x = (Math.cos(_local9) * 10);
_local3.y = (Math.sin(_local9) * 10);
_local9 = ((Math.random() * 2) * Math.PI);
_local4.x = (Math.cos(_local9) * 10);
_local4.y = (Math.sin(_local9) * 10);
_local2.moveTo(((_local7.x + 16) + _local3.x), ((_local7.y + 16) + _local3.y));
_local2.lineTo(((_local8.x + 16) + _local4.x), ((_local8.y + 16) + _local4.y));
_local10++;
};
_ae1836(_local6.ColorCode);
_local11 = 0;
_local12 = null;
_local13 = 0;
_local10 = 0;
while (_local10 < 4) {
_local11 = (Math.random() * 16);
_local12 = clouds[_local11];
_local13 = ((Math.random() * 2) * Math.PI);
_local3.x = (_local8.x + (Math.cos(_local13) * 12));
_local3.y = (_local8.y + (Math.sin(_local13) * 12));
tmpMatrix.identity();
tmpMatrix.translate(_local3.x, _local3.y);
bdFX.draw(_local12, tmpMatrix, clrTransform, "add");
_local10++;
};
_local10 = 0;
while (_local10 < 2) {
_local11 = (Math.random() * 16);
_local12 = clouds[_local11];
_local13 = ((Math.random() * 2) * Math.PI);
_local3.x = (_local7.x + (Math.cos(_local13) * 12));
_local3.y = (_local7.y + (Math.sin(_local13) * 12));
tmpMatrix.identity();
tmpMatrix.translate(_local3.x, _local3.y);
bdFX.draw(_local12, tmpMatrix, clrTransform, "add");
_local10++;
};
};
_local5++;
};
bdFX.draw(tmpShape, null, null, "add", null, false);
LevelLink.Animation.PreDeleteCells.length = 0;
_local5 = 0;
while (_local5 < _local1.length) {
_local6 = _local1[_local5];
LevelLink.Animation.PreDeleteCells.push(_local6);
_local5++;
};
}
private function _uf1091():void{
var _local7:TDeletedPiece;
var _local8:Number;
var _local9:Array;
var _local1:BitmapData;
var _local2:Array = LevelLink.Animation.DeletedPieces.pieces;
var _local3:int = _local2.length;
var _local4 = -1;
var _local5 = -1;
var _local6:int;
while (_local6 < _local3) {
_local7 = _local2[_local6];
if (_local7.PieceIndex < 0){
_local1 = clouds[-(_local7.PieceIndex)];
tmpMatrix.identity();
tmpMatrix.translate(_local7.Position.x, _local7.Position.y);
if (((!((_local4 == _local7.Age))) || (!((_local5 == _local7.ColorCode))))){
_local4 = _local7.Age;
_local5 = _local7.ColorCode;
_local8 = (_local7.Age / 8);
clrTransform.redMultiplier = (0.2 / _local8);
clrTransform.greenMultiplier = (0.2 / _local8);
clrTransform.blueMultiplier = (0.2 / _local8);
switch (_local7.ColorCode){
case 0:
clrTransform.redMultiplier = (0.5 / _local8);
break;
case 1:
clrTransform.redMultiplier = (0.4 / _local8);
clrTransform.greenMultiplier = (0.4 / _local8);
break;
case 2:
clrTransform.greenMultiplier = (0.5 / _local8);
break;
case 3:
clrTransform.blueMultiplier = (0.6 / _local8);
break;
case 4:
clrTransform.redMultiplier = (0.4 / _local8);
clrTransform.greenMultiplier = (0.4 / _local8);
clrTransform.blueMultiplier = (0.4 / _local8);
break;
};
};
bdFX.draw(_local1, tmpMatrix, clrTransform, "add");
} else {
if (_local7.ColorCode != 666){
_local9 = pieces[_local7.ColorCode];
_local1 = _local9[_local7.PieceIndex];
bdCanvas.copyPixels(_local1, _local1.rect, _local7.Position, null, null, true);
} else {
_local1 = woodPieces[_local7.PieceIndex];
bdCanvas.copyPixels(_local1, _local1.rect, _local7.Position, null, null, true);
};
};
_local6++;
};
}
private function _ap1764():void{
var _local2:TExplosion;
var _local1:int;
while (_local1 < LevelLink.Animation.ExplosionList.Explosions.length) {
_local2 = LevelLink.Animation.ExplosionList.Explosions[_local1];
explosionRenderer._dt2001(_local2, bdFX);
_local1++;
};
}
private function _bb1841():void{
var _local2:TLighting;
var _local1:int;
while (_local1 < LevelLink.Animation.LightingList.Lightings.length) {
_local2 = LevelLink.Animation.LightingList.Lightings[_local1];
lightingRenderer._dt2001(_local2, bdFX);
_local1++;
};
}
private function _vw1161():void{
var _local3:TBaseTotem;
var _local1:int = LevelLink.TotemsSite.totems.length;
LevelLink.TotemsSite._jw922();
var _local2:int;
while (_local2 < _local1) {
_local3 = LevelLink.TotemsSite.totems[_local2];
totemsRenderer._dt2001(_local3, bdCanvas, LevelFadeAlpha);
_local2++;
};
}
private function _rj1521():void{
var _local2:TBaseTotemEffectAnimation;
var _local3:Point;
var _local1:int;
while (_local1 < LevelLink.Animation.TotemEffects.Effects.length) {
_local2 = LevelLink.Animation.TotemEffects.Effects[_local1];
totemEffectsRenderer._dt2001(_local2, bdFX);
if (_local2.ParticleId == 3){
srcRect.x = (TBonusEffectAnimation(_local2).BonusCode * srcRect.width);
_local3 = _local2._uy905();
if (_local3 != null){
_local3.x = (_local3.x - 16);
_local3.y = (_local3.y - 16);
bdCanvas.copyPixels(bBonus.bitmapData, srcRect, _local3, null, null, true);
};
};
_local1++;
};
}
public function _ot944():void{
_re700();
_bk1200();
_qb1524();
LevelFadeRender._iu723();
LevelFadeRender._st471();
causticAsset._st471();
totemsAsset._st471();
mainMenuAsset._st471(textPrinter, buttonRenderer);
selectLevelAsset._st471(textPrinter, buttonRenderer, mainMenuAsset);
afterLevelRender._go267(this);
totemsRenderer.TotemsAssets = totemsAsset;
backRenderer.TotemsAssets = totemsAsset;
renderUnqSite.rendUnq = renderUniques;
InGameMenuRender._yu1413(this);
HelpRender._go267(this);
MessageRender._go267(this);
ScoresRender._go267(this);
CreditsRender._go267(this);
}
}
}//package pgn.render
Section 144
//TRenderer_kAdd_Border (pgn.render.TRenderer_kAdd_Border)
package pgn.render {
import mx.core.*;
public class TRenderer_kAdd_Border extends BitmapAsset {
}
}//package pgn.render
Section 145
//TRenderer_kAdd_Border_dsc (pgn.render.TRenderer_kAdd_Border_dsc)
package pgn.render {
import mx.core.*;
public class TRenderer_kAdd_Border_dsc extends BitmapAsset {
}
}//package pgn.render
Section 146
//TRenderer_kBonus (pgn.render.TRenderer_kBonus)
package pgn.render {
import mx.core.*;
public class TRenderer_kBonus extends BitmapAsset {
}
}//package pgn.render
Section 147
//TRenderer_kBorder (pgn.render.TRenderer_kBorder)
package pgn.render {
import mx.core.*;
public class TRenderer_kBorder extends BitmapAsset {
}
}//package pgn.render
Section 148
//TRenderer_kBorder_dsc (pgn.render.TRenderer_kBorder_dsc)
package pgn.render {
import mx.core.*;
public class TRenderer_kBorder_dsc extends BitmapAsset {
}
}//package pgn.render
Section 149
//TRenderer_kCaps (pgn.render.TRenderer_kCaps)
package pgn.render {
import mx.core.*;
public class TRenderer_kCaps extends BitmapAsset {
}
}//package pgn.render
Section 150
//TRenderer_kCloud (pgn.render.TRenderer_kCloud)
package pgn.render {
import mx.core.*;
public class TRenderer_kCloud extends BitmapAsset {
}
}//package pgn.render
Section 151
//TRenderer_kPieces (pgn.render.TRenderer_kPieces)
package pgn.render {
import mx.core.*;
public class TRenderer_kPieces extends BitmapAsset {
}
}//package pgn.render
Section 152
//TRenderer_kPiecesWood (pgn.render.TRenderer_kPiecesWood)
package pgn.render {
import mx.core.*;
public class TRenderer_kPiecesWood extends BitmapAsset {
}
}//package pgn.render
Section 153
//TRenderer_kSel (pgn.render.TRenderer_kSel)
package pgn.render {
import mx.core.*;
public class TRenderer_kSel extends BitmapAsset {
}
}//package pgn.render
Section 154
//TRenderer_kWoodCaps (pgn.render.TRenderer_kWoodCaps)
package pgn.render {
import mx.core.*;
public class TRenderer_kWoodCaps extends BitmapAsset {
}
}//package pgn.render
Section 155
//TRenderFuncs (pgn.render.TRenderFuncs)
package pgn.render {
import flash.geom.*;
import flash.display.*;
public class TRenderFuncs {
private static var m:Matrix = new Matrix();
private static var tmpCt:ColorTransform = new ColorTransform();
private static var dx:Number = 0;
private static var dy:Number = 0;
public static function Draw(_arg1:BitmapData, _arg2:BitmapData, _arg3:Point, _arg4:Number=0, _arg5:Number=1, _arg6:String="add", _arg7:ColorTransform=null, _arg8:Boolean=true):void{
dx = ((_arg2.rect.width / 2) * _arg5);
m.identity();
m.scale(_arg5, _arg5);
m.translate(-(dx), -(dx));
m.rotate(_arg4);
m.translate(_arg3.x, _arg3.y);
_arg1.draw(_arg2, m, _arg7, _arg6, null, _arg8);
}
public static function DrawCenter(_arg1:BitmapData, _arg2:BitmapData, _arg3:Point, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:String="add", _arg8:ColorTransform=null, _arg9:Boolean=true):void{
m.identity();
m.translate(-(_arg5), -(_arg6));
m.rotate(_arg4);
m.translate(_arg3.x, _arg3.y);
_arg1.draw(_arg2, m, _arg8, _arg7, null, _arg9);
}
public static function ScaledDraw(_arg1:BitmapData, _arg2:BitmapData, _arg3:Point, _arg4:Number):void{
m.identity();
m.scale(_arg4, _arg4);
m.translate(_arg3.x, _arg3.y);
_arg1.draw(_arg2, m, null, "normal", null, true);
}
public static function AlphaDraw(_arg1:BitmapData, _arg2:BitmapData, _arg3:Point, _arg4:Number):void{
m.identity();
m.translate(_arg3.x, _arg3.y);
tmpCt.alphaMultiplier = _arg4;
_arg1.draw(_arg2, m, tmpCt, "normal", null, false);
}
public static function ClearBmp(_arg1:BitmapData, _arg2:uint=0):void{
_arg1.fillRect(_arg1.rect, _arg2);
}
public static function CloneBmpAndClear(_arg1:BitmapData, _arg2:uint=0):BitmapData{
var _local3:BitmapData = _arg1.clone();
ClearBmp(_local3, _arg2);
return (_local3);
}
public static function CopyPix(_arg1:BitmapData, _arg2:BitmapData, _arg3:Point):void{
_arg1.copyPixels(_arg2, _arg2.rect, _arg3, null, null, true);
}
public static function CloneBmp(_arg1:BitmapData, _arg2:Boolean):BitmapData{
var _local3:BitmapData = new BitmapData(_arg1.width, _arg1.height, _arg2, 0);
_local3.copyPixels(_arg1, _arg1.rect, _local3.rect.topLeft, null, null, _arg2);
return (_local3);
}
public static function CloneBmpToBitmap(_arg1:BitmapData, _arg2:Boolean):Bitmap{
return (new Bitmap(CloneBmp(_arg1, _arg2)));
}
}
}//package pgn.render
Section 156
//TRenderUniques (pgn.render.TRenderUniques)
package pgn.render {
import flash.geom.*;
import pgn.*;
import pgn.Uniques.*;
import flash.display.*;
public class TRenderUniques {
private var kSpark:Class;
private var bSpark:Bitmap;
private var spark:BitmapData;// = null
private var tmp_pos:Point;
private var ideal_pos:Point;
private var tmp_pt:Point;
private var m:Matrix;
public function TRenderUniques():void{
kSpark = TRenderUniques_kSpark;
bSpark = new kSpark();
tmp_pos = new Point();
ideal_pos = new Point();
tmp_pt = new Point();
m = new Matrix();
super();
spark = new BitmapData(bSpark.bitmapData.width, bSpark.bitmapData.height, false, 0);
spark.copyPixels(bSpark.bitmapData, bSpark.bitmapData.rect, spark.rect.topLeft, null, null, true);
}
public function _ph1856(_arg1:TCell, _arg2:TUniquePiece, _arg3:BitmapData, _arg4:BitmapData):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:int;
var _local13:int;
var _local14:TUniquePieceSparkle;
if (!_arg2.IsOnSite){
_local5 = 0;
_local6 = 0;
if (_arg2.IsDeleting){
_local5 = _arg2.DeletingPos.x;
_local6 = _arg2.DeletingPos.y;
} else {
_local5 = (_arg1.StageCrd.x + 16);
_local6 = (_arg1.StageCrd.y + 16);
};
m.identity();
m.translate(-(_arg2.CenterPoint.x), -(_arg2.CenterPoint.y));
m.rotate(_arg2.Rotation);
m.translate(_local5, _local6);
_arg3.draw(_arg2.Bmp, m, null, "normal", null, true);
_local7 = -(_arg2.Rotation);
_local8 = Math.sin(_local7);
_local9 = Math.cos(_local7);
_local10 = 0;
_local11 = 0;
_local12 = _arg2.Sparkles.length;
_local13 = 0;
while (_local13 < _local12) {
_local14 = _arg2.Sparkles[_local13];
_local10 = ((_local14.OffsetAtCenter.x * _local9) + (_local14.OffsetAtCenter.y * _local8));
_local11 = ((-(_local14.OffsetAtCenter.x) * _local8) + (_local14.OffsetAtCenter.y * _local9));
m.identity();
m.translate(-16, -16);
m.rotate(_local14.Rotation);
m.translate((_local5 + _local10), (_local6 + _local11));
_arg4.draw(spark, m, null, "add", null, false);
_local13++;
};
};
}
}
}//package pgn.render
Section 157
//TRenderUniques_kSpark (pgn.render.TRenderUniques_kSpark)
package pgn.render {
import mx.core.*;
public class TRenderUniques_kSpark extends BitmapAsset {
}
}//package pgn.render
Section 158
//TRenderUniquesSite (pgn.render.TRenderUniquesSite)
package pgn.render {
import flash.geom.*;
import pgn.Uniques.*;
import flash.display.*;
import pgn.uniquesSite.*;
public class TRenderUniquesSite {
public var rendUnq:TRenderUniques;// = null
private var kSpark:Class;
private var bSpark:Bitmap;
private var spark:BitmapData;// = null
private var k_chain:Class;
private var b_chain:Bitmap;
private var UnqSiteBDFX:BitmapData;
private var UnqSiteBD:BitmapData;
private var UnqSiteBack:BitmapData;
private var mainMatrix:Matrix;
private var mainCt:ColorTransform;
private var tmp_pt:Point;
private var piecePos:Point;
private var sparklePos:Point;
private var chainPt:Point;
public static var AddHgt:int = 100;
public static var CenterPoint:Point = new Point(80, 68);
public function TRenderUniquesSite():void{
kSpark = TRenderUniquesSite_kSpark;
bSpark = new kSpark();
k_chain = TRenderUniquesSite_k_chain;
b_chain = new k_chain();
UnqSiteBDFX = new BitmapData(TUniquesManager.SiteSize.width, (TUniquesManager.SiteSize.height + AddHgt), false, 0);
UnqSiteBD = new BitmapData(TUniquesManager.SiteSize.width, (TUniquesManager.SiteSize.height + AddHgt), true, 0);
UnqSiteBack = new BitmapData(TUniquesManager.SiteSize.width, TUniquesManager.SiteSize.height, true, 0);
mainMatrix = new Matrix();
mainCt = new ColorTransform();
tmp_pt = new Point();
piecePos = new Point();
sparklePos = new Point();
chainPt = new Point((CenterPoint.x - 5), (CenterPoint.y - 4));
super();
spark = new BitmapData(bSpark.bitmapData.width, bSpark.bitmapData.height, false, 0);
spark.copyPixels(bSpark.bitmapData, bSpark.bitmapData.rect, spark.rect.topLeft, null, null, true);
}
private function _to435(_arg1:TUniquesSite):void{
var _local6:TUniquePiece;
var _local7:int;
var _local8:TUniquePieceSparkle;
var _local2:TUniquesManager = _arg1.LevelLink.unqManager;
var _local3:int;
var _local4:int = _local2.Pieces.length;
var _local5:int;
while (_local5 < _local4) {
_local6 = _local2.Pieces[_local5];
if (_local6.IsOnSite){
piecePos.x = _local6.Rect.left;
piecePos.y = (_local6.Rect.top + AddHgt);
UnqSiteBD.copyPixels(_local6.Bmp, _local6.Bmp.rect, piecePos, null, null, true);
_local3 = _local6.Sparkles.length;
_local7 = 0;
while (_local7 < _local3) {
_local8 = _local6.Sparkles[_local7];
mainMatrix.identity();
mainMatrix.translate(-16, -16);
mainMatrix.rotate(_local8.Rotation);
mainMatrix.translate(_local8.CoordAtSite.x, (_local8.CoordAtSite.y + AddHgt));
UnqSiteBDFX.draw(spark, mainMatrix, null, "add", null, false);
_local7++;
};
};
_local5++;
};
}
private function _aq1049(_arg1:TUniquesSite, _arg2:BitmapData, _arg3:BitmapData):void{
var _local8:TUniquePiece;
var _local4:TUniquesManager = _arg1.LevelLink.unqManager;
var _local5:int;
var _local6:int = _local4.Pieces.length;
var _local7:int;
while (_local7 < _local6) {
_local8 = _local4.Pieces[_local7];
if (_local8.IsDeleting){
rendUnq._ph1856(null, _local8, _arg2, _arg3);
};
_local7++;
};
}
private function _oi1709(_arg1:TUniquesSite):void{
UnqSiteBD.copyPixels(b_chain.bitmapData, b_chain.bitmapData.rect, chainPt, null, null, true);
}
public function _dt2001(_arg1:TUniquesSite, _arg2:BitmapData, _arg3:BitmapData, _arg4:Number):void{
UnqSiteBack.lock();
UnqSiteBD.lock();
UnqSiteBDFX.lock();
UnqSiteBDFX.fillRect(UnqSiteBD.rect, 4278190080);
tmp_pt.x = UnqSiteBD.rect.topLeft.x;
tmp_pt.y = (UnqSiteBD.rect.topLeft.y + AddHgt);
UnqSiteBD.copyPixels(_arg1.SiteFrame, _arg1.SiteFrame.rect, tmp_pt);
var _local5:BitmapData = _arg1.causticAsset._jc1658(_arg1.CausticCounter);
UnqSiteBack.copyPixels(_local5, _local5.rect, UnqSiteBack.rect.topLeft, _arg1.CaustMask, _arg1.CaustMask.rect.topLeft);
mainMatrix.identity();
mainMatrix.translate(0, AddHgt);
mainCt.alphaMultiplier = 0.75;
UnqSiteBD.draw(UnqSiteBack, mainMatrix, mainCt, null, null, false);
_to435(_arg1);
_oi1709(_arg1);
UnqSiteBack.unlock();
UnqSiteBD.unlock();
UnqSiteBDFX.unlock();
var _local6:Number = (((_arg1.SiteRotationPhase / 64) * 2) * Math.PI);
mainMatrix.identity();
mainMatrix.translate(-(CenterPoint.x), -(CenterPoint.y));
mainMatrix.rotate((Math.sin(_local6) * _arg1.SiteRotationRadius));
mainMatrix.translate(CenterPoint.x, CenterPoint.y);
mainMatrix.translate(_arg1.ScreenOffset.x, _arg1.ScreenOffset.y);
mainCt.alphaMultiplier = _arg4;
_arg2.draw(UnqSiteBD, mainMatrix, mainCt, null, null, true);
_arg3.draw(UnqSiteBDFX, mainMatrix, mainCt, null, null, false);
_aq1049(_arg1, _arg2, _arg3);
}
}
}//package pgn.render
Section 159
//TRenderUniquesSite_k_chain (pgn.render.TRenderUniquesSite_k_chain)
package pgn.render {
import mx.core.*;
public class TRenderUniquesSite_k_chain extends BitmapAsset {
}
}//package pgn.render
Section 160
//TRenderUniquesSite_kSpark (pgn.render.TRenderUniquesSite_kSpark)
package pgn.render {
import mx.core.*;
public class TRenderUniquesSite_kSpark extends BitmapAsset {
}
}//package pgn.render
Section 161
//TScoreRenderer (pgn.render.TScoreRenderer)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.LevelStats.*;
public class TScoreRenderer {
private var tf_topLeftPt:Point;
private var tf_matrix:Matrix;
private var tf_ct:ColorTransform;
private var textBmp:BitmapData;
public function TScoreRenderer(){
tf_topLeftPt = new Point(85, 126);
tf_matrix = new Matrix();
tf_ct = new ColorTransform();
textBmp = new BitmapData(75, 20, true, 0);
super();
tf_matrix.rotate(((-6 * Math.PI) / 180));
tf_matrix.translate(tf_topLeftPt.x, tf_topLeftPt.y);
}
public function _dt2001(_arg1:TRenderer, _arg2:TLevelStats):void{
TRenderFuncs.ClearBmp(textBmp);
_arg1.textPrinter._qq1762(textBmp, _arg1.textPrinter.tfScores, 0, 0, _arg2.Score.toString());
tf_ct.alphaMultiplier = _arg1.LevelFadeAlpha;
_arg1.bdCanvas.draw(textBmp, tf_matrix, tf_ct, null, null, true);
}
}
}//package pgn.render
Section 162
//TScoresRender (pgn.render.TScoresRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import pgn.global.*;
import mochi.as3.*;
public class TScoresRender {
public var State:int;// = 0
public var FadeCounter:Number;// = 0
private var MaxFadeCounterIn:Number;// = 1
private var MaxFadeCounterOut:Number;// = 1
private var StartTime:int;// = 0
private var LastTime:int;// = 0
private var CurTime:int;// = 0
private var lastDt:Number;// = 0
private var bigTxtCanv:BitmapData;
private var tmpCanv:BitmapData;// = null
private var boardTopLeft:Point;
private var submitTopLeft:Point;
private var nameTFTopLeft:Point;
private var tmpPt:Point;
private var rendLink:TRenderer;// = null
private var nums:Array;
private var names:Array;
private var digs:Array;
private var currStart:int;// = 1
private var scObj:Object;// = null
public var isWasSubmit:Boolean;// = false
public var isSubmit:Boolean;// = false
private var submitBoard:BitmapData;// = null
private var submitTF:TextField;// = null
private var nowScore:BitmapData;
public function TScoresRender(){
bigTxtCanv = new BitmapData(600, 100, true, 0);
boardTopLeft = new Point(198, 100);
submitTopLeft = new Point(246, 128);
nameTFTopLeft = new Point(((376 - 5) - 7), ((417 - 40) - 5));
tmpPt = new Point();
nums = new Array();
names = new Array();
digs = new Array();
nowScore = new BitmapData(200, 50, true, 0);
super();
}
private function _jo561(_arg1:String, _arg2:int, _arg3:int):void{
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfHelp, 0, 0, _arg1);
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(_arg2, _arg3));
}
private function _tx1348(_arg1:TRenderer):void{
var _local2:BitmapData = _arg1.mainMenuAsset._ln766();
var _local3:Point = _arg1.mainMenuAsset.MainMenuNamePt;
_arg1.bdCanvas.copyPixels(_local2, _local2.rect, _local3, null, null, true);
}
public function _cc1745():Boolean{
if (submitTF.text != ""){
return (true);
};
return (false);
}
public function _go267(_arg1:TRenderer):void{
rendLink = _arg1;
tmpCanv = _arg1.mainMenuAsset._rk490().clone();
_arg1.buttonRenderer._ix671("scores");
_arg1.buttonRenderer._ix671("scoresSubmit");
TRenderFuncs.ClearBmp(bigTxtCanv);
rendLink.textPrinter._qq1762(bigTxtCanv, rendLink.textPrinter.tfAfterLevel, 0, 0, "S C O R E S");
TRenderFuncs.CopyPix(tmpCanv, bigTxtCanv, new Point(238, 52));
var _local2:int;
while (_local2 < 10) {
nums.push(new BitmapData(100, 32, true, 0));
names.push(new BitmapData(250, 32, true, 0));
digs.push(new BitmapData(200, 32, true, 0));
_local2++;
};
submitBoard = _arg1.mainMenuAsset._eu187();
submitTF = _arg1.textPrinter._pq1543();
submitTF.text = "";
}
private function _sh220(_arg1:int, _arg2:int):void{
var _local4:BitmapData;
var _local5:BitmapData;
var _local6:BitmapData;
var _local3:int;
while (_local3 < nums.length) {
_local4 = nums[_local3];
_local5 = names[_local3];
_local6 = digs[_local3];
tmpPt.y = (((boardTopLeft.y + _arg2) + 102) + (_local3 * 24));
tmpPt.x = ((boardTopLeft.x + _arg1) + 100);
TRenderFuncs.CopyPix(rendLink.bdCanvas, _local4, tmpPt);
tmpPt.x = ((boardTopLeft.x + _arg1) + 150);
TRenderFuncs.CopyPix(rendLink.bdCanvas, _local5, tmpPt);
tmpPt.x = ((boardTopLeft.x + _arg1) + 400);
TRenderFuncs.CopyPix(rendLink.bdCanvas, _local6, tmpPt);
_local3++;
};
}
private function _aj633():void{
var _local2:BitmapData;
var _local3:BitmapData;
var _local4:BitmapData;
var _local1:int;
while (_local1 < nums.length) {
_local2 = nums[_local1];
TRenderFuncs.ClearBmp(_local2);
_local3 = names[_local1];
TRenderFuncs.ClearBmp(_local3);
_local4 = digs[_local1];
TRenderFuncs.ClearBmp(_local4);
_local1++;
};
}
private function _su762(_arg1:int, _arg2:int):void{
tmpPt.x = (boardTopLeft.x + _arg1);
tmpPt.y = (boardTopLeft.y + _arg2);
rendLink.bdCanvas.copyPixels(tmpCanv, tmpCanv.rect, tmpPt, null, null, true);
rendLink.buttonRenderer._ur148(rendLink.bdCanvas, "scores", _arg1, _arg2);
}
private function _lu287(_arg1:TRenderer):void{
var _local2:Number = (1 - (FadeCounter / MaxFadeCounterIn));
_su762(((_local2 * _local2) * 600), 0);
_sh220(((_local2 * _local2) * 600), 0);
if (isSubmit){
tmpPt.x = (((_local2 * _local2) * 600) + submitTopLeft.x);
tmpPt.y = submitTopLeft.y;
TRenderFuncs.CopyPix(_arg1.bdCanvas, submitBoard, tmpPt);
tmpPt.x = (((((_local2 * _local2) * 600) + submitTopLeft.x) + 266) + 10);
tmpPt.y = (((submitTopLeft.y + 106) + 50) - 13);
TRenderFuncs.CopyPix(_arg1.bdCanvas, nowScore, tmpPt);
rendLink.buttonRenderer._ur148(rendLink.bdCanvas, "scoresSubmit", ((_local2 * _local2) * 600), 0);
submitTF.x = (nameTFTopLeft.x + ((_local2 * _local2) * 600));
submitTF.y = nameTFTopLeft.y;
};
}
private function _mi222(_arg1:TRenderer):void{
var _local2:Number = (FadeCounter / MaxFadeCounterOut);
_su762(((_local2 * _local2) * 600), 0);
_sh220(((_local2 * _local2) * 600), 0);
}
private function _dp748(_arg1:TRenderer):void{
_su762(0, 0);
_sh220(0, 0);
_arg1.buttonRenderer._dt2001(_arg1.bdCanvas, "scores", _arg1.CursorPos, -1);
if (isSubmit){
tmpPt.x = submitTopLeft.x;
tmpPt.y = submitTopLeft.y;
TRenderFuncs.CopyPix(_arg1.bdCanvas, submitBoard, tmpPt);
tmpPt.x = ((submitTopLeft.x + 266) + 10);
tmpPt.y = (((submitTopLeft.y + 106) + 50) - 13);
TRenderFuncs.CopyPix(_arg1.bdCanvas, nowScore, tmpPt);
_arg1.buttonRenderer._dt2001(_arg1.bdCanvas, "scoresSubmit", _arg1.CursorPos, -1);
};
}
public function _dt2001(_arg1:TRenderer):void{
rendLink = _arg1;
var _local2:int = getTimer();
if (!isWasSubmit){
_tx1348(_arg1);
};
if (State > 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_mi222(_arg1);
LastTime = _local2;
};
if (State < 0){
FadeCounter = (FadeCounter + ((_local2 - LastTime) / 1000));
_lu287(_arg1);
LastTime = _local2;
};
if (State == 0){
_dp748(_arg1);
};
}
private function _ah1540(_arg1:Object):void{
if (_arg1.scores != null){
scObj = MochiScores.scoresArrayToObjects(_arg1.scores);
_cb350();
};
}
public function _cb350():void{
var _local5:BitmapData;
var _local6:BitmapData;
var _local7:BitmapData;
var _local8:String;
var _local9:Object;
var _local10:int;
_aj633();
var _local1:Array = scObj["alltime"];
var _local2:int = currStart;
var _local3:int = Math.min(10, (_local1.length - currStart));
var _local4:int;
while (_local4 < _local3) {
_local5 = nums[_local4];
_local6 = names[_local4];
_local7 = digs[_local4];
_local8 = (((_local2 + _local4) + 1).toString() + ".");
rendLink.textPrinter._qq1762(_local5, rendLink.textPrinter.tfHelp, 0, 0, _local8);
_local9 = _local1[(_local4 + _local2)];
_local8 = _local9["name"];
rendLink.textPrinter._qq1762(_local6, rendLink.textPrinter.tfHelp, 0, 0, _local8);
_local10 = _local9["score"];
rendLink.textPrinter._qq1762(_local7, rendLink.textPrinter.tfHelp, 0, 0, _local10.toString());
_local4++;
};
}
public function _mr1693():Boolean{
if (State > 0){
return ((FadeCounter > MaxFadeCounterOut));
};
return ((FadeCounter > MaxFadeCounterIn));
}
public function _ob1762(_arg1:TRenderer):void{
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("scores");
}
public function _re1638(_arg1:TRenderer, _arg2:Boolean):void{
isWasSubmit = _arg2;
isSubmit = _arg2;
currStart = 0;
MochiScores.requestList(this, _ah1540);
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("scores");
MochiScores.getPlayerInfo(this, _lh1467);
if (_arg2){
TRenderFuncs.ClearBmp(nowScore);
rendLink.textPrinter._qq1762(nowScore, rendLink.textPrinter.tfRedAfterLvl, 0, 0, TGlobalVars.RealTotalScore.toString());
_arg1.stageLink.addChild(submitTF);
submitTF.x = 800;
submitTF.y = 0;
};
}
private function _lh1467(_arg1:Object):void{
if (_arg1 != null){
if (submitTF.text == ""){
submitTF.text = _arg1["name"];
};
};
}
public function _ml173(_arg1:TRenderer):void{
State = 0;
FadeCounter = 0;
_arg1.buttonRenderer._ix671("scores");
if (isSubmit){
submitTF.x = nameTFTopLeft.x;
submitTF.y = nameTFTopLeft.y;
};
}
public function _an1404():void{
var _local1:Array;
var _local2:int;
if (scObj != null){
_local1 = scObj["alltime"];
_local2 = _local1.length;
if ((currStart + 10) < _local2){
currStart = (currStart + 10);
};
_cb350();
};
}
public function _qr755():void{
if (scObj != null){
if ((currStart - 10) >= 0){
currStart = (currStart - 10);
};
_cb350();
};
}
public function _yj1643():void{
var _local1:int = TGlobalVars.RealTotalScore;
MochiScores.submit(_local1, submitTF.text);
currStart = 0;
MochiScores.requestList(this, _ah1540);
isSubmit = false;
rendLink.stageLink.removeChild(submitTF);
}
public function _jk1000():void{
isSubmit = false;
rendLink.stageLink.removeChild(submitTF);
}
}
}//package pgn.render
Section 163
//TSelectLevelRender (pgn.render.TSelectLevelRender)
package pgn.render {
import flash.geom.*;
import pgn.*;
import flash.display.*;
import pgn.gfxAssets.*;
import flash.utils.*;
import pgn.global.*;
public class TSelectLevelRender {
public var State:int;// = 0
public var FadeCounter:Number;// = 0
private var LastTime:int;// = 0
private var MaxFadeCounter:Number;// = 2
private var NeedMoveName:Boolean;// = false
private var paths:Array;
public function TSelectLevelRender(){
paths = new Array();
super();
}
private function _ok569(_arg1:TButtonRenderer, _arg2:Boolean):void{
var _local7:Array;
var _local8:Point;
var _local9:Point;
var _local10:Point;
var _local11:Point;
paths.length = 0;
var _local3:Point;
var _local4:Array = _arg1._lr95("selLvl");
var _local5:int = _local4.length;
var _local6:int;
while (_local6 < _local5) {
_local7 = new Array();
_local8 = new Point();
_local9 = Funcs.GetPointAtCircle(0x0600);
_local10 = Funcs.MidPoint(_local8, _local9, 0.33);
_local3 = Funcs.GetPointAtCircle(128);
_local10.x = (_local10.x + _local3.x);
_local10.y = (_local10.y + _local3.y);
_local11 = Funcs.MidPoint(_local8, _local9, 0.66);
_local3 = Funcs.GetPointAtCircle(0x0100);
_local11.x = (_local11.x + _local3.x);
_local11.y = (_local11.y + _local3.y);
_local7.push(_local8);
_local7.push(_local8);
_local7.push(_local10);
_local7.push(_local11);
_local7.push(_local9);
_local7.push(_local9);
paths.push(_local7);
_local6++;
};
}
private function _tx1348(_arg1:BitmapData, _arg2:TMenuAsset, _arg3:Boolean):void{
var _local6:Number;
var _local7:Number;
var _local4:BitmapData = _arg2._ln766();
var _local5:Point = _arg2.MainMenuNamePt.clone();
if (NeedMoveName){
_local6 = FadeCounter;
if (_arg3){
_local6 = (MaxFadeCounter - _local6);
};
_local7 = (_local6 / MaxFadeCounter);
_local5.y = (_local5.y - ((_local7 * _local7) * 200));
};
_arg1.copyPixels(_local4, _local4.rect, _local5, null, null, true);
}
public function _nh424(_arg1:BitmapData, _arg2:TButtonRenderer, _arg3:Point, _arg4:TMenuAsset):void{
_arg2._dt2001(_arg1, "selLvl", _arg3, TGlobalVars.CurrentMaxLevel);
_tx1348(_arg1, _arg4, false);
}
private function _cx169(_arg1:BitmapData, _arg2:TButtonRenderer, _arg3:Boolean):void{
var _local11:Array;
var _local12:Point;
var _local13:TMenuButton;
var _local4:Number = FadeCounter;
if (_arg3){
_local4 = (MaxFadeCounter - _local4);
};
var _local5:Number = (_local4 / MaxFadeCounter);
_local5 = (((_local4 / MaxFadeCounter) * _local5) * 1.999);
var _local6:int = Math.floor(_local5);
var _local7:Number = Funcs.GetDecimalPart(_local5);
var _local8:Array = _arg2._lr95("selLvl");
var _local9:int = _local8.length;
var _local10:int;
while (_local10 < _local9) {
_local11 = paths[_local10];
_local12 = Funcs.CatmullRomPoint(_local11[(_local6 + 0)], _local11[(_local6 + 1)], _local11[(_local6 + 2)], _local11[(_local6 + 3)], _local7);
_local13 = _local8[_local10];
_arg2._mt1059(_arg1, _local13.cat, _local13.id, _local12, TGlobalVars.CurrentMaxLevel);
_local10++;
};
}
public function _dt2001(_arg1:BitmapData, _arg2:TButtonRenderer, _arg3:Point, _arg4:TMenuAsset):void{
var _local5:int = getTimer();
if (State == 0){
_nh424(_arg1, _arg2, _arg3, _arg4);
};
if (State == -1){
_tx1348(_arg1, _arg4, true);
_cx169(_arg1, _arg2, true);
FadeCounter = (FadeCounter + ((_local5 - LastTime) / 1000));
LastTime = _local5;
};
if (State == 1){
_tx1348(_arg1, _arg4, false);
_cx169(_arg1, _arg2, false);
FadeCounter = (FadeCounter + ((_local5 - LastTime) / 1000));
LastTime = _local5;
};
}
public function _mr1693():Boolean{
return ((FadeCounter > MaxFadeCounter));
}
public function _ob1762(_arg1:TButtonRenderer, _arg2:Boolean):void{
NeedMoveName = _arg2;
LastTime = getTimer();
State = 1;
FadeCounter = 0;
_arg1._ix671("selLvl");
_ok569(_arg1, false);
}
public function _re1638(_arg1:TButtonRenderer, _arg2:Boolean):void{
NeedMoveName = _arg2;
LastTime = getTimer();
State = -1;
FadeCounter = 0;
_arg1._ix671("selLvl");
_ok569(_arg1, true);
}
public function _ml173(_arg1:TButtonRenderer):void{
NeedMoveName = false;
State = 0;
FadeCounter = 0;
_arg1._ix671("selLvl");
}
}
}//package pgn.render
Section 164
//TTextPrinter (pgn.render.TTextPrinter)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import flash.text.*;
import flash.filters.*;
public class TTextPrinter {
public const tfMainMenu:int = 0;
public const tfSelectLevel:int = 1;
public const tfAfterLevel:int = 2;
public const tfAfterLevelSmall:int = 3;
public const tfLevelNumber:int = 4;
public const tfScores:int = 5;
public const tfHelp:int = 6;
public const tfRedAfterLvl:int = 7;
public const tfRedCredits:int = 8;
public const tfMMenu2:int = 9;
private var MyriadBoldFont:Class;
private var textFields:Array;
private var filters:Array;
private var tfMatrix:Matrix;
public function TTextPrinter(){
MyriadBoldFont = TTextPrinter_MyriadBoldFont;
textFields = new Array();
filters = new Array();
tfMatrix = new Matrix();
super();
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 16);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 18);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 24);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 18);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 64, 4294438045);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 16, 4280291331);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 18);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 24, 4287037440);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 16, 4287037440);
_lf1079("MyriadPro-Bold", TextFieldAutoSize.LEFT, 15, 4280291331);
filters.push(new GlowFilter(15651670, 1, 6, 6, 4, 1, false, false));
filters.push(new GlowFilter(15651670, 1, 6, 6, 4, 1, false, false));
filters.push(new GlowFilter(16247965, 1, 8, 8, 4, 1, false, false));
filters.push(new GlowFilter(16247965, 1, 8, 8, 4, 1, false, false));
filters.push(new GlowFilter(10114068, 1, 8, 8, 4, 1, false, false));
filters.push(new GlowFilter(15651670, 1, 8, 8, 4, 1, false, false));
filters.push(new GlowFilter(16247965, 1, 6, 6, 4, 1, false, false));
filters.push(new GlowFilter(16247965, 1, 8, 8, 4, 1, false, false));
filters.push(new GlowFilter(16247965, 1, 8, 8, 4, 1, false, false));
filters.push(new GlowFilter(16175164, 1, 6, 6, 4, 1, false, false));
}
private function _lf1079(_arg1:String, _arg2:String, _arg3:int, _arg4:uint=4281532416, _arg5:int=0):void{
var _local6:TextField = new TextField();
_local6.autoSize = _arg2;
_local6.embedFonts = true;
_local6.antiAliasType = AntiAliasType.NORMAL;
var _local7:TextFormat = new TextFormat();
_local7.font = _arg1;
_local7.letterSpacing = _arg5;
if (_arg5 > 0){
_local7.bold = true;
};
_local7.size = _arg3;
_local7.color = _arg4;
_local6.defaultTextFormat = _local7;
textFields.push(_local6);
}
public function _pq1543():TextField{
var _local1:TextField = new TextField();
_local1.type = TextFieldType.INPUT;
_local1.autoSize = TextFieldAutoSize.NONE;
_local1.embedFonts = true;
_local1.antiAliasType = AntiAliasType.NORMAL;
_local1.width = 0x0100;
_local1.height = 34;
var _local2:TextFormat = new TextFormat();
_local2.font = "MyriadPro-Bold";
_local2.size = 24;
_local2.color = 4280291331;
_local1.defaultTextFormat = _local2;
_local1.filters = new Array(new GlowFilter(16247965, 1, 8, 8, 4, 1, false, false));
return (_local1);
}
public function _jb1855():TextField{
var _local1:TextField = new TextField();
_local1.selectable = false;
_local1.autoSize = TextFieldAutoSize.NONE;
_local1.embedFonts = true;
_local1.antiAliasType = AntiAliasType.NORMAL;
_local1.wordWrap = true;
_local1.width = 0x0100;
_local1.height = 170;
var _local2:TextFormat = new TextFormat();
_local2.font = "MyriadPro-Bold";
_local2.size = 16;
_local2.color = 4280291331;
_local1.defaultTextFormat = _local2;
_local1.filters = new Array(new GlowFilter(16247965, 1, 6, 6, 4, 1, false, false));
return (_local1);
}
public function _qq1762(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:String):void{
var _local6:TextField = textFields[_arg2];
_local6.text = _arg5;
tfMatrix.identity();
tfMatrix.translate(_arg3, _arg4);
_arg1.draw(_local6, tfMatrix, null, null, null, true);
var _local7:GlowFilter = filters[_arg2];
_arg1.applyFilter(_arg1, _arg1.rect, _arg1.rect.topLeft, _local7);
}
}
}//package pgn.render
Section 165
//TTextPrinter_MyriadBoldFont (pgn.render.TTextPrinter_MyriadBoldFont)
package pgn.render {
import mx.core.*;
public class TTextPrinter_MyriadBoldFont extends FontAsset {
}
}//package pgn.render
Section 166
//TTimerRender (pgn.render.TTimerRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.LevelStats.*;
public class TTimerRender {
private var tf_topLeftPt:Point;
private var tf_matrix:Matrix;
private var tf_ct:ColorTransform;
private var textBmp:BitmapData;
public function TTimerRender(){
tf_topLeftPt = new Point(80, 53);
tf_matrix = new Matrix();
tf_ct = new ColorTransform();
textBmp = new BitmapData(75, 20, true, 0);
super();
tf_matrix.translate(tf_topLeftPt.x, tf_topLeftPt.y);
}
public function _dt2001(_arg1:TRenderer, _arg2:TLevelStats):void{
TRenderFuncs.ClearBmp(textBmp);
_arg1.textPrinter._qq1762(textBmp, _arg1.textPrinter.tfScores, 0, 0, _arg2._pg697(_arg2.LeftTime));
tf_ct.alphaMultiplier = _arg1.LevelFadeAlpha;
_arg1.bdCanvas.draw(textBmp, tf_matrix, tf_ct, null, null, true);
}
}
}//package pgn.render
Section 167
//TTotemEffectsRender (pgn.render.TTotemEffectsRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.animation.totemsEffects.particles.*;
public class TTotemEffectsRender {
private var cWaterParticle:Class;
private var pic_WaterParticle:Bitmap;
private var bdWaterParticle:BitmapData;// = null
private var cTornadoParticle:Class;
private var pic_TornadoParticle:Bitmap;
private var bdTornadoParticle:BitmapData;// = null
private var cTimeParticle:Class;
private var pic_TimeParticle:Bitmap;
private var bdTimeParticle:BitmapData;// = null
private var cBonusParticle:Class;
private var pic_BonusParticle:Bitmap;
private var bdBonusParticle:BitmapData;// = null
private var cStarParticle0:Class;
private var pic_StarParticle0:Bitmap;
private var bdStarParticle0:BitmapData;// = null
private var cStarParticle1:Class;
private var pic_StarParticle1:Bitmap;
private var bdStarParticle1:BitmapData;// = null
private var cfb:Class;
private var pic_fb:Bitmap;
private var k_mstar:Class;
private var b_mstar:Bitmap;
private var bdMStarParticle:BitmapData;// = null
private var FireSprites:Array;
private var ct:ColorTransform;
private var m:Matrix;
public function TTotemEffectsRender(){
var _local2:int;
var _local3:int;
var _local4:BitmapData;
cWaterParticle = TTotemEffectsRender_cWaterParticle;
pic_WaterParticle = new cWaterParticle();
cTornadoParticle = TTotemEffectsRender_cTornadoParticle;
pic_TornadoParticle = new cTornadoParticle();
cTimeParticle = TTotemEffectsRender_cTimeParticle;
pic_TimeParticle = new cTimeParticle();
cBonusParticle = TTotemEffectsRender_cBonusParticle;
pic_BonusParticle = new cBonusParticle();
cStarParticle0 = TTotemEffectsRender_cStarParticle0;
pic_StarParticle0 = new cStarParticle0();
cStarParticle1 = TTotemEffectsRender_cStarParticle1;
pic_StarParticle1 = new cStarParticle1();
cfb = TTotemEffectsRender_cfb;
pic_fb = new cfb();
k_mstar = TTotemEffectsRender_k_mstar;
b_mstar = new k_mstar();
FireSprites = new Array();
ct = new ColorTransform();
m = new Matrix();
super();
bdWaterParticle = new BitmapData(pic_WaterParticle.width, pic_WaterParticle.height, false, 0);
bdWaterParticle.copyPixels(pic_WaterParticle.bitmapData, pic_WaterParticle.bitmapData.rect, bdWaterParticle.rect.topLeft);
bdTornadoParticle = new BitmapData(pic_TornadoParticle.width, pic_TornadoParticle.height, false, 0);
bdTornadoParticle.copyPixels(pic_TornadoParticle.bitmapData, pic_TornadoParticle.bitmapData.rect, bdTornadoParticle.rect.topLeft);
bdTimeParticle = new BitmapData(pic_TimeParticle.width, pic_TimeParticle.height, false, 0);
bdTimeParticle.copyPixels(pic_TimeParticle.bitmapData, pic_TimeParticle.bitmapData.rect, bdTimeParticle.rect.topLeft);
bdBonusParticle = new BitmapData(pic_BonusParticle.width, pic_BonusParticle.height, false, 0);
bdBonusParticle.copyPixels(pic_BonusParticle.bitmapData, pic_BonusParticle.bitmapData.rect, bdBonusParticle.rect.topLeft);
bdStarParticle0 = new BitmapData(pic_StarParticle0.width, pic_StarParticle0.height, false, 0);
bdStarParticle0.copyPixels(pic_StarParticle0.bitmapData, pic_StarParticle0.bitmapData.rect, bdStarParticle0.rect.topLeft);
bdStarParticle1 = new BitmapData(pic_StarParticle1.width, pic_StarParticle1.height, false, 0);
bdStarParticle1.copyPixels(pic_StarParticle1.bitmapData, pic_StarParticle1.bitmapData.rect, bdStarParticle1.rect.topLeft);
bdMStarParticle = new BitmapData(b_mstar.width, b_mstar.height, false, 0);
bdMStarParticle.copyPixels(b_mstar.bitmapData, b_mstar.bitmapData.rect, bdMStarParticle.rect.topLeft);
var _local1:int;
while (_local1 < 16) {
_local2 = (_local1 % 4);
_local3 = (_local1 / 4);
_local4 = new BitmapData(60, 60, false, 0);
_local4.copyPixels(pic_fb.bitmapData, new Rectangle((_local2 * 60), (_local3 * 60), 60, 60), _local4.rect.topLeft);
FireSprites.push(_local4);
_local1++;
};
}
public function _dt2001(_arg1:TBaseTotemEffectAnimation, _arg2:BitmapData):void{
var _local9:TTotemEffectParticle;
var _local10:int;
var _local3:BitmapData;
var _local4 = "add";
switch (_arg1.ParticleId){
case 0:
_local3 = bdWaterParticle;
break;
case 1:
_local3 = bdTornadoParticle;
break;
case 2:
_local3 = bdTimeParticle;
break;
case 3:
_local3 = bdBonusParticle;
break;
case 7:
_local3 = bdMStarParticle;
break;
};
var _local5:int;
if (_local3 != null){
_local5 = (_local3.rect.width / 2);
};
var _local6 = -1;
var _local7:int = _arg1.Particles.length;
var _local8:int;
while (_local8 < _local7) {
_local9 = _arg1.Particles[_local8];
if (_local9.Age > 0){
ct = _local9.ColorTrans;
ct.alphaMultiplier = (_local9.Age / _local9.MaxAge);
if (_arg1.ParticleId == 6){
_local6 = (_local9.Age % 16);
_local3 = FireSprites[_local6];
_local5 = (_local3.rect.width / 2);
};
if (_arg1.ParticleId == 4){
_local3 = (((_local8 & 1))==0) ? bdStarParticle0 : bdStarParticle1;
_local5 = (_local3.rect.width / 2);
};
_local10 = (_local5 * _local9.Scale);
m.identity();
m.scale(_local9.Scale, _local9.Scale);
m.translate(-(_local10), -(_local10));
m.rotate(_local9.Rotation);
m.translate(_local9.Crd.x, _local9.Crd.y);
_arg2.draw(_local3, m, ct, _local4, null, false);
};
_local8++;
};
}
}
}//package pgn.render
Section 168
//TTotemEffectsRender_cBonusParticle (pgn.render.TTotemEffectsRender_cBonusParticle)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_cBonusParticle extends BitmapAsset {
}
}//package pgn.render
Section 169
//TTotemEffectsRender_cfb (pgn.render.TTotemEffectsRender_cfb)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_cfb extends BitmapAsset {
}
}//package pgn.render
Section 170
//TTotemEffectsRender_cStarParticle0 (pgn.render.TTotemEffectsRender_cStarParticle0)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_cStarParticle0 extends BitmapAsset {
}
}//package pgn.render
Section 171
//TTotemEffectsRender_cStarParticle1 (pgn.render.TTotemEffectsRender_cStarParticle1)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_cStarParticle1 extends BitmapAsset {
}
}//package pgn.render
Section 172
//TTotemEffectsRender_cTimeParticle (pgn.render.TTotemEffectsRender_cTimeParticle)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_cTimeParticle extends BitmapAsset {
}
}//package pgn.render
Section 173
//TTotemEffectsRender_cTornadoParticle (pgn.render.TTotemEffectsRender_cTornadoParticle)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_cTornadoParticle extends BitmapAsset {
}
}//package pgn.render
Section 174
//TTotemEffectsRender_cWaterParticle (pgn.render.TTotemEffectsRender_cWaterParticle)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_cWaterParticle extends BitmapAsset {
}
}//package pgn.render
Section 175
//TTotemEffectsRender_k_mstar (pgn.render.TTotemEffectsRender_k_mstar)
package pgn.render {
import mx.core.*;
public class TTotemEffectsRender_k_mstar extends BitmapAsset {
}
}//package pgn.render
Section 176
//TTotemsRender (pgn.render.TTotemsRender)
package pgn.render {
import flash.geom.*;
import flash.display.*;
import pgn.totems.*;
import pgn.gfxAssets.*;
public class TTotemsRender {
public var TotemsAssets:TTotemsAsset;// = null
private var draw_m:Matrix;
private var draw_ct:ColorTransform;
public function TTotemsRender(){
draw_m = new Matrix();
draw_ct = new ColorTransform();
super();
}
public function _dt2001(_arg1:TBaseTotem, _arg2:BitmapData, _arg3:Number):void{
var _local4:Number = (((_arg1.MaxRect.width - _arg1.MinRect.width) * _arg1.Position) + _arg1.MinRect.width);
var _local5:Number = (((_arg1.MaxRect.height - _arg1.MinRect.height) * _arg1.Position) + _arg1.MinRect.height);
var _local6:Number = (_local4 / _arg1.MaxRect.width);
var _local7:Number = (_local5 / _arg1.MaxRect.height);
var _local8:Number = (((_arg1.MaxRect.x - _arg1.MinRect.x) * _arg1.Position) + _arg1.MinRect.x);
var _local9:Number = (((_arg1.MaxRect.y - _arg1.MinRect.y) * _arg1.Position) + _arg1.MinRect.y);
draw_m.identity();
draw_m.scale(_local6, _local7);
draw_m.translate(_local8, _local9);
draw_ct.alphaMultiplier = _arg3;
var _local10:BitmapData = TotemsAssets._bw1164(_arg1.TotemId, _arg1.TotemLvl);
_arg2.draw(_local10, draw_m, draw_ct, "normal", null, true);
}
}
}//package pgn.render
Section 177
//TBaseTotem (pgn.totems.TBaseTotem)
package pgn.totems {
import flash.geom.*;
import pgn.*;
import pgn.global.*;
public class TBaseTotem {
public var LevelLink:TLevel;// = null
public var ColorCode:int;// = -1
public var Effect:TBaseTotemEffect;// = null
public var TotemId:int;// = -1
public var TotemLvl:int;// = 2
public var MinRect:Rectangle;
public var MaxRect:Rectangle;
public var IsMoving:Boolean;// = false
public var Position:Number;// = 0
public var Delta:Number;// = 0
public function TBaseTotem(){
MinRect = new Rectangle();
MaxRect = new Rectangle(0, 0, 100, 150);
super();
}
public function _qr2007():void{
if (IsMoving){
Position = (Position + Delta);
};
if (Position < 0){
Position = 0;
IsMoving = false;
};
if (Position > 1){
Position = 1;
IsMoving = false;
};
}
public function _km518():void{
if (Effect != null){
Effect._km518(LevelLink);
LevelLink.Stats._um159();
};
}
public function _cy1033():void{
IsMoving = true;
Delta = (1 / 32);
TGlobalVars.SoundPlayer._ry845();
}
public function _kw1282():void{
if (Position > 0){
IsMoving = true;
Delta = (-1 / 16);
TGlobalVars.SoundPlayer._mv1121();
};
}
}
}//package pgn.totems
Section 178
//TBaseTotemEffect (pgn.totems.TBaseTotemEffect)
package pgn.totems {
import pgn.*;
public class TBaseTotemEffect {
public function _km518(_arg1:TLevel):void{
}
}
}//package pgn.totems
Section 179
//TTotemBonusEffect (pgn.totems.TTotemBonusEffect)
package pgn.totems {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
import pgn.MarkMethods.*;
public class TTotemBonusEffect extends TBaseTotemEffect {
private var num_shots:int;// = -1
private var wasCells:Array;
public function TTotemBonusEffect(_arg1:int){
wasCells = new Array();
super();
num_shots = _arg1;
}
private function _nh2048(_arg1:int, _arg2:int):Boolean{
var _local5:TCell;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local3:Boolean;
var _local4:int;
while (_local4 < wasCells.length) {
_local5 = wasCells[_local4];
_local6 = (_local5._hm1968().x - _arg1);
_local7 = (_local5._hm1968().y - _arg2);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
if ((((_local8 < 3)) || ((Math.abs(_local7) < 2)))){
_local3 = false;
};
_local4++;
};
return (_local3);
}
override public function _km518(_arg1:TLevel):void{
var _local3:TCell;
var _local4:Boolean;
var _local5:int;
var _local6:TBonusEffectAnimation;
var _local7:Point;
var _local8:Point;
var _local9:Point;
var _local10:Point;
var _local11:int;
var _local12:int;
var _local13:Boolean;
TGlobalVars.SoundPlayer.Tree();
wasCells.length = 0;
var _local2:int;
while (_local2 < num_shots) {
_local3 = null;
_local4 = true;
_local5 = 0;
while (_local4) {
_local11 = (_arg1.Size.width * Math.random());
_local12 = (_arg1.Size.height * Math.random());
if (_arg1._lh680(_local11, _local12)){
_local3 = _arg1._jp74(_local11, _local12);
if ((((((((wasCells.indexOf(_local3) < 0)) && ((_local3.CellType == 1)))) && ((_local3.Bonus == null)))) && ((_local3.OnApplyMethod == null)))){
_local13 = _nh2048(_local11, _local12);
if (((_local13) || ((_local5 > 3)))){
wasCells.push(_local3);
_local3.OnApplyMethod = new TMarkBonusMethod(_arg1);
_local3.OnApplyMethod.Counter = 31;
_local4 = false;
} else {
_local5++;
};
};
};
};
_local6 = new TBonusEffectAnimation();
_local6.BonusCode = TMarkBonusMethod(_local3.OnApplyMethod).Bonus.BonusCode;
_arg1 = _local3.LevelLink;
_local7 = new Point(120, 500);
_local8 = _arg1._cj1974(_local11, _local12);
_arg1._cj1974(_local11, _local12).x = (_local8.x + 16);
_local8.y = (_local8.y + 16);
_local9 = Funcs.MidPoint(_local7, _local8);
_local10 = Funcs.Perp(_local7, _local9);
_local10.normalize(-64);
_local9 = _local9.add(_local10);
_local6.Points.push(_local7);
_local6.Points.push(_local9);
_local6.Points.push(_local8);
_local6._wn796(32);
_arg1.Animation.TotemEffects._ug33(_local6);
_local2++;
};
}
}
}//package pgn.totems
Section 180
//TTotemFireEffect (pgn.totems.TTotemFireEffect)
package pgn.totems {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
import pgn.MarkMethods.*;
public class TTotemFireEffect extends TBaseTotemEffect {
private var fires:int;// = -1
private var wasCells:Array;
public function TTotemFireEffect(_arg1:int){
wasCells = new Array();
super();
fires = _arg1;
}
private function _nh2048(_arg1:int, _arg2:int):Boolean{
var _local5:TCell;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local3:Boolean;
var _local4:int;
while (_local4 < wasCells.length) {
_local5 = wasCells[_local4];
_local6 = (_local5._hm1968().x - _arg1);
_local7 = (_local5._hm1968().y - _arg2);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
if ((((_local8 < 3)) || ((Math.abs(_local7) < 2)))){
_local3 = false;
};
_local4++;
};
return (_local3);
}
override public function _km518(_arg1:TLevel):void{
var _local3:TCell;
var _local4:Boolean;
var _local5:TFireEffectAnimation;
var _local6:Point;
var _local7:Point;
var _local8:int;
var _local9:int;
wasCells.length = 0;
var _local2:int;
while (_local2 < fires) {
_local3 = null;
_local4 = true;
while (_local4) {
_local8 = (_arg1.Size.width * Math.random());
_local9 = (_arg1.Size.height * Math.random());
if (_arg1._lh680(_local8, _local9)){
_local3 = _arg1._jp74(_local8, _local9);
if ((((wasCells.indexOf(_local3) < 0)) && (_nh2048(_local8, _local9)))){
if ((((((_local3.CellType == 1)) && ((_local3.Bonus == null)))) && ((_local3.OnApplyMethod == null)))){
wasCells.push(_local3);
_local3.OnApplyMethod = new TMarkFireMethod();
_local3.OnApplyMethod.Counter = 16;
_local4 = false;
};
};
};
};
_local5 = new TFireEffectAnimation();
_arg1 = _local3.LevelLink;
_local6 = new Point(120, 500);
_local7 = _arg1._cj1974(_local8, _local9);
_arg1._cj1974(_local8, _local9).x = (_local7.x + 16);
_local7.y = (_local7.y + 16);
_local5.Points.push(_local6);
_local5.Points.push(_local7);
_local5._wn796(16);
_arg1.Animation.TotemEffects._ug33(_local5);
TGlobalVars.SoundPlayer._be268();
_local2++;
};
}
}
}//package pgn.totems
Section 181
//TTotemsSite (pgn.totems.TTotemsSite)
package pgn.totems {
public class TTotemsSite {
public var totems:Array;
public var last_color:int;// = -1
public function TTotemsSite(){
totems = new Array();
super();
}
public function _un954(_arg1:TBaseTotem):void{
totems.push(_arg1);
}
public function _fd1390(_arg1:int):void{
var _local4:TBaseTotem;
var _local2:Boolean;
var _local3:int;
while (_local3 < totems.length) {
_local4 = totems[_local3];
if (_local4.ColorCode == _arg1){
if (last_color == _arg1){
_local4._km518();
_local4._kw1282();
_local2 = true;
} else {
_local4._cy1033();
};
} else {
_local4._kw1282();
};
_local3++;
};
last_color = (_local2) ? -1 : _arg1;
}
public function _qr2007():void{
var _local2:TBaseTotem;
var _local1:int;
while (_local1 < totems.length) {
_local2 = totems[_local1];
_local2._qr2007();
_local1++;
};
}
public function _jw922():void{
totems.sortOn("Position");
}
}
}//package pgn.totems
Section 182
//TTotemTimeEffect (pgn.totems.TTotemTimeEffect)
package pgn.totems {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
public class TTotemTimeEffect extends TBaseTotemEffect {
public var TimeToAdd:int;// = 30
override public function _km518(_arg1:TLevel):void{
TGlobalVars.SoundPlayer._ek2027();
var _local2:TTimeEffectAnimation = new TTimeEffectAnimation(48, 1);
_local2.Points.push(new Point(120, 500));
_local2.Points.push(new Point(250, 280));
_local2.Points.push(new Point(250, 280));
_local2.Points.push(new Point(250, 280));
_local2.Points.push(new Point(75, 75));
_local2._wn796(48);
_arg1.Animation.TotemEffects._ug33(_local2);
_arg1.Stats._jo1524(TimeToAdd, 48);
}
}
}//package pgn.totems
Section 183
//TTotemTornadoEffect (pgn.totems.TTotemTornadoEffect)
package pgn.totems {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
import pgn.MarkMethods.*;
public class TTotemTornadoEffect extends TBaseTotemEffect {
private var FNum_shots:int;// = -1
private var FNum_down:int;// = 1
public function TTotemTornadoEffect(_arg1:int){
FNum_shots = _arg1;
}
private function _fb1284(_arg1:TLevel, _arg2:Point, _arg3:int, _arg4:int, _arg5:int, _arg6:Boolean):void{
var _local12:int;
var _local13:TCell;
var _local14:Boolean;
var _local15:int;
var _local16:TCell;
var _local17:Point;
var _local18:Point;
var _local19:TCell;
var _local20:TTornadoEffectAnimation;
var _local21:Number;
var _local22:Number;
var _local7:Array = new Array();
var _local8:int;
while (_local8 < _arg1.Size.height) {
_local12 = 0;
while (_local12 < _arg1.Size.width) {
_local13 = _arg1._jp74(_local12, _local8);
if (_local13.CellType == 2){
if (_arg1._lh680(_local12, (_local8 + 1))){
if (_arg1._jp74(_local12, (_local8 + 1)).CellType == 1){
_local7.push(_local13);
};
};
};
_local12++;
};
_local8++;
};
var _local9:int = Math.min(_local7.length, _arg3);
var _local10:Array = new Array();
var _local11:int;
while (_local11 < _local9) {
_local14 = true;
while (_local14) {
_local15 = (Math.random() * _local7.length);
_local13 = _local7[_local15];
if (_local10.indexOf(_local13) < 0){
_local14 = false;
};
};
_local10.push(_local13);
_local11++;
};
_local11 = 0;
while (_local11 < _local10.length) {
_local16 = _local10[_local11];
_local17 = _local16._hm1968();
_local18 = null;
_local8 = (_local17.y + 1);
while (_local8 < ((_local17.y + 1) + _arg4)) {
if (_arg1._lh680(_local17.x, _local8)){
_local19 = _arg1._jp74(_local17.x, _local8);
if (_local19.CellType == 1){
_local19.OnApplyMethod = new TMarkDeleteMethod();
_local19.OnApplyMethod.Counter = _arg5;
_local18 = _arg1._cj1974(_local17.x, _local8);
};
};
_local8++;
};
if (_local18 != null){
_local20 = new TTornadoEffectAnimation();
_local20.Points.push(new Point(_arg2.x, _arg2.y));
_local21 = (((_local18.x + _arg2.x) / 2) + (Math.random() * 128));
_local22 = (10 + (Math.random() * 128));
_local20.Points.push(new Point(_local21, _local22));
_local20.Points.push(new Point((_local18.x + 16), (_local18.y + 16)));
_local20._wn796(_arg5);
_arg1.Animation.TotemEffects._ug33(_local20);
};
_local11++;
};
}
override public function _km518(_arg1:TLevel):void{
TGlobalVars.SoundPlayer._fh312();
_fb1284(_arg1, new Point(120, 500), FNum_shots, FNum_down, 48, false);
}
public function _bi167(_arg1:TLevel, _arg2:Point):void{
_fb1284(_arg1, _arg2, 3, 1, 32, true);
}
}
}//package pgn.totems
Section 184
//TTotemWaterEffect (pgn.totems.TTotemWaterEffect)
package pgn.totems {
import flash.geom.*;
import pgn.*;
import pgn.animation.totemsEffects.animation.*;
import pgn.global.*;
import pgn.MarkMethods.*;
public class TTotemWaterEffect extends TBaseTotemEffect {
private var num_shots:int;// = -1
public function TTotemWaterEffect(_arg1:int){
num_shots = _arg1;
}
override public function _km518(_arg1:TLevel):void{
var _local4:TCell;
var _local5:Boolean;
var _local6:TBaseTotemEffectAnimation;
var _local7:Point;
var _local8:Number;
var _local9:Point;
var _local10:Point;
var _local11:Point;
var _local12:Point;
var _local13:Point;
var _local14:Point;
var _local15:int;
var _local16:int;
TGlobalVars.SoundPlayer._om809();
var _local2:Array = new Array();
var _local3:int;
while (_local3 < num_shots) {
_local4 = null;
_local5 = true;
while (_local5) {
_local15 = (_arg1.Size.width * Math.random());
_local16 = (_arg1.Size.height * Math.random());
if (_arg1._lh680(_local15, _local16)){
_local4 = _arg1._jp74(_local15, _local16);
if (_local2.indexOf(_local4) < 0){
if ((((((_local4.CellType == 1)) && ((_local4.Bonus == null)))) && ((_local4.OnApplyMethod == null)))){
_local2.push(_local4);
_local4.OnApplyMethod = new TMarkDeleteMethod();
_local4.OnApplyMethod.Counter = 48;
_local5 = false;
};
};
};
};
_local6 = new TBaseTotemEffectAnimation();
_arg1 = _local4.LevelLink;
_local7 = new Point(120, 500);
_local8 = ((Math.random() * Math.PI) * 2);
_local9 = new Point(((((_arg1.Size.width * _arg1.CellSize.width) / 2.5) + _arg1.StageOffset.x) + (Math.cos(_local8) * 32)), ((((_arg1.Size.height * _arg1.CellSize.height) / 2) + _arg1.StageOffset.y) + (Math.sin(_local8) * 32)));
_local10 = _local9.subtract(_local7);
_local9.subtract(_local7).normalize((_local10.length / 2));
_local11 = _local10.add(_local7);
_local8 = ((Math.random() * Math.PI) * 2);
_local11.x = (_local11.x + (Math.cos(_local8) * 64));
_local11.y = (_local11.y + (Math.sin(_local8) * 64));
_local12 = _arg1._cj1974(_local15, _local16);
_arg1._cj1974(_local15, _local16).x = (_local12.x + 16);
_local12.y = (_local12.y + 16);
_local13 = _local12.subtract(_local9);
_local12.subtract(_local9).normalize((_local13.length / 2));
_local14 = _local13.add(_local9);
_local8 = ((Math.random() * Math.PI) * 2);
_local14.x = (_local14.x + (Math.cos(_local8) * 64));
_local14.y = (_local14.y + (Math.sin(_local8) * 64));
_local6.Points.push(_local7);
_local6.Points.push(_local11);
_local6.Points.push(_local9);
_local6.Points.push(_local14);
_local6.Points.push(_local12);
_local6._wn796(48);
_arg1.Animation.TotemEffects._ug33(_local6);
_local3++;
};
}
}
}//package pgn.totems
Section 185
//TUniquePiece (pgn.Uniques.TUniquePiece)
package pgn.Uniques {
import flash.geom.*;
import pgn.*;
import flash.display.*;
import pgn.uniquesSite.*;
public class TUniquePiece {
public var ManagerLink:TUniquesManager;// = null
public var SiteLink:TUniquesSite;// = null
public var Bmp:BitmapData;
public var Rect:Rectangle;
public var Rotation:Number;// = 0
public var CenterPoint:Point;
public var Sparkles:Array;
public var IsOnSite:Boolean;// = false
public var IsDeleting:Boolean;// = false
public var StartDel:Point;
public var EndDel:Point;
public var DeletingPos:Point;
public var DeltaRot:Number;// = 0
public var MaxDeleting:int;// = 16
public var RandomValue:int;
private var CurrDeleting:int;// = 0
private var angs:Array;
private var position:Number;// = 0
private var delta_pos:Number;
public function TUniquePiece(){
Bmp = new BitmapData(47, 47, true, 0);
Rect = new Rectangle(1000, 1000, -10000, -10000);
CenterPoint = new Point();
Sparkles = new Array();
StartDel = new Point();
EndDel = new Point();
DeletingPos = new Point();
RandomValue = (Math.random() * 100);
angs = new Array();
delta_pos = ((Math.random() * 0.01) + 0.02);
super();
var _local1:int = (((Math.random() - 0.5))<0) ? -1 : 1;
var _local2:Number = ((_local1 * Math.random()) * Math.PI);
var _local3:Number = ((-(_local1) * Math.random()) * Math.PI);
angs.push(_local2, _local2, _local3, _local3);
}
public function _qr2007():void{
var _local3:Number;
var _local4:int;
var _local5:TUniquePieceSparkle;
if (IsDeleting){
Rotation = (Rotation - DeltaRot);
} else {
Rotation = Funcs.CatmullRom(angs[0], angs[1], angs[2], angs[3], position);
position = (position + delta_pos);
if (position >= 1){
position = 0;
delta_pos = ((Math.random() * 0.01) + 0.02);
_local3 = angs.shift();
_local4 = ((_local3)<0) ? -1 : 1;
_local3 = (_local4 * ((Math.random() * Math.PI) + ((Math.random() * Math.PI) / 6)));
angs.push(_local3);
};
};
var _local1:int = Sparkles.length;
var _local2:int;
while (_local2 < _local1) {
_local5 = Sparkles[_local2];
_local5._qr2007();
_local2++;
};
if (!IsOnSite){
if (IsDeleting){
CurrDeleting++;
if (CurrDeleting >= MaxDeleting){
IsOnSite = true;
SiteLink._sn190();
};
DeletingPos.x = (((EndDel.x - StartDel.x) * (CurrDeleting / MaxDeleting)) + StartDel.x);
DeletingPos.y = (((EndDel.y - StartDel.y) * (CurrDeleting / MaxDeleting)) + StartDel.y);
};
};
}
}
}//package pgn.Uniques
Section 186
//TUniquePieceSparkle (pgn.Uniques.TUniquePieceSparkle)
package pgn.Uniques {
import flash.geom.*;
public class TUniquePieceSparkle {
public var Scale:Number;
public var Rotation:Number;
public var CoordAtSite:Point;
public var OffsetAtCenter:Point;
private var RotSpeed:Number;
public function TUniquePieceSparkle(){
Scale = ((Math.random() * 0.5) + 0.5);
Rotation = ((Math.random() * Math.PI) * 2);
CoordAtSite = new Point();
OffsetAtCenter = new Point();
RotSpeed = ((Math.random() - 0.5) * 0.1);
super();
}
public function _qr2007():void{
Rotation = (Rotation + RotSpeed);
}
}
}//package pgn.Uniques
Section 187
//TUniquesManager (pgn.Uniques.TUniquesManager)
package pgn.Uniques {
import flash.geom.*;
import pgn.*;
import flash.display.*;
import pgn.uniquesSite.*;
import pgn.render.*;
import flash.filters.*;
public class TUniquesManager {
public var LevelLink:TLevel;// = null
public var Pieces:Array;
private var used_colors:Array;
private var bd_color:BitmapData;// = null
private var bd_test:BitmapData;// = null
private var Site:TUniquesSite;// = null
public static var SiteSize:Rectangle = new Rectangle(0, 0, 160, 192);
public function TUniquesManager(){
Pieces = new Array();
used_colors = new Array();
super();
}
private function _ow2035():void{
var _local2:int;
var _local3:uint;
var _local4:uint;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:TSiteFrameChain;
var _local9:Point;
var _local10:TUniquePiece;
var _local11:TUniquePieceSparkle;
var _local1:int;
while (_local1 < bd_test.height) {
_local2 = 0;
while (_local2 < bd_test.width) {
_local3 = bd_test.getPixel32(_local2, _local1);
_local4 = ((_local3 >> 24) & 0xFF);
if (_local4 > 0){
_local3 = bd_color.getPixel32(_local2, _local1);
_local4 = ((_local3 >> 24) & 0xFF);
_local5 = true;
_local6 = false;
_local7 = false;
if (_local3 == 4278255873){
_local6 = true;
_local3 = bd_color.getPixel32(_local2, (_local1 + 1));
_local4 = ((_local3 >> 24) & 0xFF);
};
if (_local3 == 4286513666){
_local7 = true;
_local3 = bd_color.getPixel32(_local2, (_local1 + 1));
_local4 = ((_local3 >> 24) & 0xFF);
};
if (_local3 == 4278419203){
_local5 = false;
_local8 = new TSiteFrameChain();
_local9 = new Point(_local2, (_local1 + TRenderUniquesSite.AddHgt));
_local8._cs1838(TRenderUniquesSite.CenterPoint, _local9);
LevelLink.unqSite.SiteFrameChains.push(_local8);
};
if ((((_local4 > 0)) && (_local5))){
_local10 = null;
if (used_colors.indexOf(_local3) < 0){
used_colors.push(_local3);
_local10 = new TUniquePiece();
_local10.ManagerLink = this;
_local10.SiteLink = Site;
Pieces.push(_local10);
};
if (_local6){
_local10 = Pieces[used_colors.indexOf(_local3)];
_local10.CenterPoint.x = _local2;
_local10.CenterPoint.y = _local1;
};
if (_local7){
_local10 = Pieces[used_colors.indexOf(_local3)];
_local11 = new TUniquePieceSparkle();
_local11.CoordAtSite.x = _local2;
_local11.CoordAtSite.y = _local1;
_local10.Sparkles.push(_local11);
};
};
};
_local2++;
};
_local1++;
};
}
private function _tq239():void{
var _local2:int;
var _local3:uint;
var _local4:int;
var _local5:TUniquePiece;
var _local6:Rectangle;
var _local1:int;
while (_local1 < bd_color.height) {
_local2 = 0;
while (_local2 < bd_color.width) {
_local3 = bd_color.getPixel32(_local2, _local1);
_local4 = used_colors.indexOf(_local3);
if (_local4 >= 0){
_local5 = Pieces[_local4];
_local6 = _local5.Rect;
_local6.left = Math.min(_local6.left, _local2);
_local6.top = Math.min(_local6.top, _local1);
_local6.right = Math.max(_local6.right, _local2);
_local6.bottom = Math.max(_local6.bottom, _local1);
};
_local2++;
};
_local1++;
};
}
private function _wh1272():void{
var _local2:int;
var _local3:uint;
var _local4:int;
var _local5:TUniquePiece;
var _local6:Rectangle;
var _local7:BitmapData;
var _local8:int;
var _local9:int;
var _local1:int;
while (_local1 < bd_color.height) {
_local2 = 0;
while (_local2 < bd_color.width) {
_local3 = bd_color.getPixel32(_local2, _local1);
if ((((_local3 == 4278255873)) || ((_local3 == 4286513666)))){
_local3 = bd_color.getPixel32(_local2, (_local1 + 1));
};
_local4 = used_colors.indexOf(_local3);
if (_local4 >= 0){
_local5 = Pieces[_local4];
_local6 = _local5.Rect;
_local7 = _local5.Bmp;
_local8 = (_local2 - _local6.left);
_local9 = (_local1 - _local6.top);
_local3 = bd_test.getPixel32(_local2, _local1);
_local7.setPixel32(_local8, _local9, _local3);
};
_local2++;
};
_local1++;
};
}
private function _tr1665():void{
var _local2:TUniquePiece;
var _local3:BitmapData;
var _local4:GlowFilter;
var _local1:int;
while (_local1 < Pieces.length) {
_local2 = Pieces[_local1];
_local3 = _local2.Bmp;
_local4 = new GlowFilter(16772752, 1, 2, 2, 2, 3, true);
_local3.applyFilter(_local3, _local3.rect, _local3.rect.topLeft, _local4);
_local4 = new GlowFilter(16772752, 1, 2, 2, 2, 3);
_local3.applyFilter(_local3, _local3.rect, _local3.rect.topLeft, _local4);
_local1++;
};
}
private function _xk1341():void{
var _local2:TUniquePiece;
var _local3:int;
var _local4:TUniquePieceSparkle;
var _local1:int;
while (_local1 < Pieces.length) {
_local2 = Pieces[_local1];
_local3 = 0;
while (_local3 < _local2.Sparkles.length) {
_local4 = _local2.Sparkles[_local3];
_local4.OffsetAtCenter.x = (_local4.CoordAtSite.x - _local2.CenterPoint.x);
_local4.OffsetAtCenter.y = (_local4.CoordAtSite.y - _local2.CenterPoint.y);
_local3++;
};
_local2.CenterPoint.x = (_local2.CenterPoint.x - _local2.Rect.left);
_local2.CenterPoint.y = (_local2.CenterPoint.y - _local2.Rect.top);
_local1++;
};
}
private function _mx1062(_arg1:Boolean, _arg2:int, _arg3:uint):void{
var _local13:int;
var _local14:Number;
var _local15:int;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:uint;
var _local4:Number = (_arg2 * _arg2);
var _local5:BitmapData = new BitmapData((_arg2 * 2), (_arg2 * 2), true, 0);
var _local6:BitmapData = new BitmapData((_arg2 * 2), (_arg2 * 2), true, 0);
var _local7:int = -(_arg2);
while (_local7 < _arg2) {
_local13 = -(_arg2);
while (_local13 < _arg2) {
_local14 = ((_local13 * _local13) + (_local7 * _local7));
if (_local14 < _local4){
_local5.setPixel32((_arg2 + _local13), (_arg2 + _local7), _arg3);
if (_arg1){
_local6.setPixel32((_arg2 + _local13), (_arg2 + _local7), 4294967295);
};
};
_local13++;
};
_local7++;
};
var _local8:BitmapData = bd_color;
var _local9:int = _local8.height;
var _local10:int = _local8.width;
var _local11:Point = new Point();
var _local12:int;
while (_local12 < _local9) {
_local15 = 0;
while (_local15 < _local10) {
_local16 = _local8.getPixel32(_local15, _local12);
_local17 = ((_local16 >> 16) & 0xFF);
_local18 = ((_local16 >> 8) & 0xFF);
_local19 = (_local16 & 0xFF);
if (((!((_local16 == 0))) && (!((_local16 == 4278419203))))){
_local11.x = (_local15 - _arg2);
_local11.y = (_local12 - _arg2);
Site.SiteFrame.copyPixels(_local5, _local5.rect, _local11, null, null, true);
if (_arg1){
Site.CaustMask.copyPixels(_local6, _local6.rect, _local11, null, null, true);
};
};
_local15++;
};
_local12++;
};
}
private function _xb1339(_arg1:BitmapData, _arg2:BitmapData):void{
var _local4:int;
var _local5:uint;
var _local3:int;
while (_local3 < _arg1.height) {
_local4 = 0;
while (_local4 < _arg1.width) {
_local5 = _arg2.getPixel32(_local4, _local3);
if (_local5 == 4294967295){
_arg1.setPixel32(_local4, _local3, 0);
};
_local4++;
};
_local3++;
};
}
public function _go267(_arg1:BitmapData, _arg2:BitmapData):void{
Site = LevelLink.unqSite;
bd_color = _arg1;
bd_test = _arg2;
used_colors.length = 0;
_ow2035();
_tq239();
_wh1272();
_tr1665();
_xk1341();
Pieces.sortOn("RandomValue");
var _local3:BitmapData = Site.SiteFrame;
var _local4:BitmapData = Site.CaustMask;
_local3.lock();
_local4.lock();
_mx1062(false, 9, 4284167684);
_mx1062(false, 8, 4288250139);
_mx1062(false, 7, 4290220316);
_mx1062(false, 6, 4291731997);
_mx1062(false, 5, 4294496033);
_mx1062(false, 4, 4294767644);
_mx1062(true, 3, 4285678597);
_mx1062(true, 2, 4285678597);
_xb1339(_local3, _local4);
_local3.unlock();
_local4.unlock();
}
public function _qr2007():void{
var _local2:TUniquePiece;
var _local1:int;
while (_local1 < Pieces.length) {
_local2 = Pieces[_local1];
_local2._qr2007();
_local1++;
};
}
public function _jp1201():void{
var _local2:TUniquePiece;
var _local1:int;
while (_local1 < Pieces.length) {
_local2 = Pieces[_local1];
_local2.IsOnSite = true;
_local1++;
};
}
}
}//package pgn.Uniques
Section 188
//TSiteFrameChain (pgn.uniquesSite.TSiteFrameChain)
package pgn.uniquesSite {
import flash.geom.*;
public class TSiteFrameChain {
public var TopPoint:Point;// = null
public var CenterTrans:Point;
public var Angle:Number;// = 0
public var DeltaTrans:Point;// = null
private var chain_length:Number;// = 109
public function TSiteFrameChain(){
CenterTrans = new Point(0, -6);
super();
}
public function _cs1838(_arg1:Point, _arg2:Point):void{
TopPoint = _arg1.clone();
DeltaTrans = new Point((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
var _local3:Number = (chain_length - DeltaTrans.length);
DeltaTrans.normalize(_local3);
Angle = Math.atan2(DeltaTrans.y, DeltaTrans.x);
}
}
}//package pgn.uniquesSite
Section 189
//TUniquesSite (pgn.uniquesSite.TUniquesSite)
package pgn.uniquesSite {
import flash.geom.*;
import pgn.*;
import pgn.Uniques.*;
import flash.display.*;
import pgn.gfxAssets.*;
public class TUniquesSite {
public var SitePieces:Array;
public var LevelLink:TLevel;// = null
public var ScreenOffset:Point;
public var causticAsset:TCausticAsset;// = null
public var SiteFrame:BitmapData;
public var CaustMask:BitmapData;
public var SiteFrameChains:Array;
public var CausticCounter:Number;// = 0
public var SiteRotationPhase:Number;// = 0
public var SiteRotRadiusDelta:Number;// = 0.0001
public var SiteRotationRadiusMax:Number;// = 0.09
public var SiteRotationRadius:Number;// = 0
public function TUniquesSite(){
SitePieces = new Array();
ScreenOffset = new Point();
SiteFrame = new BitmapData(TUniquesManager.SiteSize.width, TUniquesManager.SiteSize.height, true, 0);
CaustMask = new BitmapData(TUniquesManager.SiteSize.width, TUniquesManager.SiteSize.height, true, 0);
SiteFrameChains = new Array();
super();
}
public function _qr2007():void{
CausticCounter = ((CausticCounter)>=63) ? 0 : (CausticCounter + 1);
SiteRotationPhase = ((SiteRotationPhase)>=63) ? 0 : (SiteRotationPhase + 1);
SiteRotationRadius = (SiteRotationRadius - SiteRotRadiusDelta);
SiteRotationRadius = Funcs.Interval(0, 100, SiteRotationRadius);
}
public function _sn190():void{
if (SiteRotationRadius < 0.01){
SiteRotationPhase = 0;
SiteRotationRadius = SiteRotationRadiusMax;
};
}
}
}//package pgn.uniquesSite
Section 190
//Funcs (pgn.Funcs)
package pgn {
import flash.geom.*;
import pgn.global.*;
public class Funcs {
private static var tmpMatrix:Matrix = new Matrix();
public static function FillCatmullRomPointFromArray(_arg1:Array, _arg2:Number, _arg3:Point):void{
var _local4:int = Math.floor(_arg2);
var _local5:Number = GetDecimalPart(_arg2);
var _local6:Point = _arg1[(_local4 + 0)];
var _local7:Point = _arg1[(_local4 + 1)];
var _local8:Point = _arg1[(_local4 + 2)];
var _local9:Point = _arg1[(_local4 + 3)];
_arg3.x = CatmullRom(_local6.x, _local7.x, _local8.x, _local9.x, _local5);
_arg3.y = CatmullRom(_local6.y, _local7.y, _local8.y, _local9.y, _local5);
}
public static function CatmullRomPoint(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Point, _arg5:Number):Point{
var _local6:Point = new Point();
_local6.x = (0.5 * ((((2 * _arg2.x) + ((-(_arg1.x) + _arg3.x) * _arg5)) + (((((2 * _arg1.x) - (5 * _arg2.x)) + (4 * _arg3.x)) - _arg4.x) * (_arg5 * _arg5))) + ((((-(_arg1.x) + (3 * _arg2.x)) - (3 * _arg3.x)) + _arg4.x) * ((_arg5 * _arg5) * _arg5))));
_local6.y = (0.5 * ((((2 * _arg2.y) + ((-(_arg1.y) + _arg3.y) * _arg5)) + (((((2 * _arg1.y) - (5 * _arg2.y)) + (4 * _arg3.y)) - _arg4.y) * (_arg5 * _arg5))) + ((((-(_arg1.y) + (3 * _arg2.y)) - (3 * _arg3.y)) + _arg4.y) * ((_arg5 * _arg5) * _arg5))));
return (_local6);
}
public static function CatmullRom(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Number{
var _local6:Number = (0.5 * ((((2 * _arg2) + ((-(_arg1) + _arg3) * _arg5)) + (((((2 * _arg1) - (5 * _arg2)) + (4 * _arg3)) - _arg4) * (_arg5 * _arg5))) + ((((-(_arg1) + (3 * _arg2)) - (3 * _arg3)) + _arg4) * ((_arg5 * _arg5) * _arg5))));
return (_local6);
}
public static function MidPoint(_arg1:Point, _arg2:Point, _arg3:Number=0.5):Point{
var _local4:Number = ((_arg2.x - _arg1.x) * _arg3);
var _local5:Number = ((_arg2.y - _arg1.y) * _arg3);
return (new Point((_arg1.x + _local4), (_arg1.y + _local5)));
}
public static function MidPointFill(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Number=0.5):void{
var _local5:Number = ((_arg3.x - _arg2.x) * _arg4);
var _local6:Number = ((_arg3.y - _arg2.y) * _arg4);
_arg1.x = (_arg2.x + _local5);
_arg1.y = (_arg2.y + _local6);
}
public static function Perp(_arg1:Point, _arg2:Point):Point{
var _local3:Number = (_arg2.x - _arg1.x);
var _local4:Number = (_arg2.y - _arg1.y);
return (new Point(-(_local4), _local3));
}
public static function RotatePoint(_arg1:Point, _arg2:Number):Point{
tmpMatrix.identity();
tmpMatrix.rotate(_arg2);
return (tmpMatrix.transformPoint(_arg1));
}
public static function Interval(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number = _arg3;
if (_local4 < _arg1){
_local4 = _arg1;
};
if (_local4 > _arg2){
_local4 = _arg2;
};
return (_local4);
}
public static function IsTripleEqu(_arg1:int, _arg2:int, _arg3:int):Boolean{
if ((((_arg1 == _arg2)) && ((_arg2 == _arg3)))){
return (true);
};
return (false);
}
public static function InInterval(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
if ((((_arg3 >= _arg1)) && ((_arg3 <= _arg2)))){
return (true);
};
return (false);
}
public static function GetDecimalPart(_arg1:Number):Number{
return ((_arg1 - Math.floor(_arg1)));
}
public static function GetPointAtCircle(_arg1:Number):Point{
var _local2:Number = ((Math.random() * 2) * Math.PI);
var _local3:Point = new Point();
_local3.x = (Math.cos(_local2) * _arg1);
_local3.y = (Math.sin(_local2) * _arg1);
return (_local3);
}
public static function CalcMaxPieces(_arg1:int):int{
var _local2:int = TGlobalVars.ParticlesCnt;
var _local3:Number = Funcs.Interval(0.2, 1, (1 - (_local2 / 1500)));
return ((_arg1 * _local3));
}
}
}//package pgn
Section 191
//SaveManager (pgn.SaveManager)
package pgn {
import flash.net.*;
public class SaveManager {
public static function Save(_arg1:int):void{
var savedlevel:int;
var cookie:SharedObject;
var level = _arg1;
try {
savedlevel = Get();
} catch(e:Error) {
trace(e.message);
return;
};
if (savedlevel >= level){
return;
};
try {
cookie = SharedObject.getLocal("CurrentMaxLevel");
cookie.data["level"] = level.toString();
cookie.flush();
} catch(e2:Error) {
trace(e2.message);
};
}
public static function Get():int{
var _local1:SharedObject = SharedObject.getLocal("CurrentMaxLevel");
if (_local1.data["level"] == undefined){
return (0);
};
return (int(_local1.data["level"]));
}
}
}//package pgn
Section 192
//TCell (pgn.TCell)
package pgn {
import flash.geom.*;
import pgn.bonuses.*;
import pgn.MarkMethods.*;
public class TCell {
public var Uid:int;// = 0
public var LevelLink:TLevel;// = null
public var CellType:int;// = 0
public var UnderCursorTime:int;// = 0
public var UnderCursorScale:Number;// = 1
public var StageCrd:Point;
public var ColorCode:int;// = -1
public var UnqIndex:int;// = -1
public var IsSelected:Boolean;// = false
public var Alpha:Number;// = 1
public var ColorAdd:Number;// = 1
public var Bonus:TBaseBonus;// = null
public var IsDeleted:Boolean;// = false
public var IsAnimating:Boolean;// = false
public var IsDeleting:Boolean;// = false
public var WasCopied:Boolean;// = false
public var OnApplyMethod:TBaseMarkMethod;// = null
private var tmpRect:Rectangle;
public function TCell(){
StageCrd = new Point();
tmpRect = new Rectangle(0, 0, 40, 40);
super();
}
public function _hq1342():Boolean{
return (IsDeleting);
}
public function _ad1117(_arg1:Boolean, _arg2:int):void{
IsDeleting = _arg1;
}
public function _gt16(_arg1:Boolean):void{
IsDeleted = _arg1;
}
public function _ba2091():Boolean{
return (IsDeleted);
}
public function _kj1696():Boolean{
if (((((((!((CellType == 0))) && (!(IsDeleted)))) && (!(IsAnimating)))) && (!(_hq1342())))){
return (true);
};
return (false);
}
public function _hm1968():Point{
return (LevelLink._fl1540(this));
}
public function _vw2020(_arg1:TCell):Boolean{
var _local2:Point = _hm1968();
var _local3:Point = _arg1._hm1968();
var _local4:Boolean;
if ((((((((_local2.x == _local3.x)) && ((_local2.y == _local3.y)))) && ((CellType == _arg1.CellType)))) && ((ColorCode == _arg1.ColorCode)))){
_local4 = true;
};
return (_local4);
}
public function _yb210(_arg1:TCell):void{
Uid = _arg1.Uid;
StageCrd.x = _arg1.StageCrd.x;
StageCrd.y = _arg1.StageCrd.y;
CellType = _arg1.CellType;
ColorCode = _arg1.ColorCode;
IsSelected = _arg1.IsSelected;
_gt16(_arg1._ba2091());
IsAnimating = _arg1.IsAnimating;
_ad1117(_arg1._hq1342(), 1);
UnqIndex = _arg1.UnqIndex;
Alpha = _arg1.Alpha;
ColorAdd = _arg1.ColorAdd;
Bonus = _arg1.Bonus;
OnApplyMethod = _arg1.OnApplyMethod;
_arg1.WasCopied = true;
}
public function _py469():void{
if (!IsDeleted){
LevelLink.Stats._co990(this);
IsDeleted = true;
if (Bonus != null){
Bonus._rq285(this);
};
if (CellType == 2){
LevelLink.Stats._sr1438();
};
};
}
public function _tw1242():void{
var _local1:TBaseMarkMethod;
if (OnApplyMethod != null){
_local1 = OnApplyMethod;
_local1.Counter--;
if (_local1.Counter <= 0){
OnApplyMethod = null;
_local1._hc1024(this);
};
};
}
public function _ww2071():void{
var _local1:Point = _hm1968();
if (_local1 == null){
StageCrd.x = 64;
StageCrd.y = 64;
} else {
StageCrd = LevelLink._cj1974(_local1.x, _local1.y);
};
}
public function _vr716(_arg1:Point):Boolean{
var _local2:Boolean;
tmpRect.x = StageCrd.x;
tmpRect.y = StageCrd.y;
if (tmpRect.containsPoint(_arg1)){
UnderCursorTime++;
_local2 = true;
} else {
UnderCursorTime--;
};
if (UnderCursorTime < 0){
UnderCursorTime = 0;
};
UnderCursorScale = (Math.sin(((UnderCursorTime / 12) * Math.PI)) * (Math.PI / 27));
return (_local2);
}
}
}//package pgn
Section 193
//TLevel (pgn.TLevel)
package pgn {
import flash.geom.*;
import pgn.Uniques.*;
import pgn.totems.*;
import pgn.uniquesSite.*;
import pgn.render.*;
import pgn.LevelStats.*;
import pgn.animation.*;
import pgn.global.*;
import pgn.animation.deleteUnique.*;
public class TLevel {
public var IsPause:Boolean;// = false
public var Cells:Array;
public var Size:Rectangle;
public var StageOffset:Point;
public var CellSize:Rectangle;
public var LastSelectedCell:TCell;// = null
public var StripList:TStripList;
public var Animation:TLevelAnimation;
public var Columns:Array;
public var Stats:TLevelStats;
public var TotemsSite:TTotemsSite;
public var LevelProto:TLevelProto;// = null
public var unqManager:TUniquesManager;
public var unqSite:TUniquesSite;
public var UidCounter:int;// = 100
public function TLevel(){
Cells = new Array();
Size = new Rectangle();
StageOffset = new Point(200, 0);
CellSize = new Rectangle(0, 0, 40, 40);
StripList = new TStripList();
Animation = new TLevelAnimation();
Columns = new Array();
Stats = new TLevelStats();
TotemsSite = new TTotemsSite();
unqManager = new TUniquesManager();
unqSite = new TUniquesSite();
super();
}
private function _ci289(_arg1:int, _arg2:int):int{
if ((((((((_arg1 >= 0)) && ((_arg1 < Size.width)))) && ((_arg2 >= 0)))) && ((_arg2 < Size.height)))){
return (((_arg2 * Size.width) + _arg1));
};
return (-1);
}
public function _fl1540(_arg1:TCell):Point{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:TCell;
var _local6:int;
if (_arg1 == null){
return (null);
};
_local2 = -1;
_local3 = Cells.length;
_local4 = _arg1.Uid;
_local5 = null;
_local6 = 0;
while (_local6 < _local3) {
_local5 = Cells[_local6];
if (_local5.Uid == _local4){
_local2 = _local6;
};
_local6++;
};
return (((_local2)>=0) ? new Point((_local2 % Size.width), Math.floor((_local2 / Size.width))) : null);
}
public function _jp74(_arg1:int, _arg2:int):TCell{
var _local3:int = _ci289(_arg1, _arg2);
if (_local3 >= 0){
return (Cells[_local3]);
};
return (null);
}
public function _pi1638(_arg1:int, _arg2:int):int{
var _local4:TCell;
var _local3 = -1;
if (_lh680(_arg1, _arg2)){
_local4 = _jp74(_arg1, _arg2);
if (!_local4._ba2091()){
_local3 = _local4.ColorCode;
};
};
return (_local3);
}
public function _lh680(_arg1:int, _arg2:int):Boolean{
var _local3:int = _ci289(_arg1, _arg2);
return (((((_local3 >= 0)) && ((_local3 < Cells.length)))) ? true : false);
}
public function _bn1385(_arg1:int, _arg2:int, _arg3:TCell):void{
var _local4:int = _ci289(_arg1, _arg2);
Cells[_local4] = _arg3;
}
public function _cj1974(_arg1:int, _arg2:int):Point{
return (new Point(((_arg1 * CellSize.width) + StageOffset.x), ((_arg2 * CellSize.height) + StageOffset.y)));
}
public function _uk30(_arg1:Point):TCell{
var _local2:int = (_arg1.x - StageOffset.x);
var _local3:int = (_arg1.y - StageOffset.y);
_local2 = Math.floor((_local2 / CellSize.width));
_local3 = Math.floor((_local3 / CellSize.height));
return (_jp74(_local2, _local3));
}
public function _ms877(_arg1:TCell, _arg2:TCell):Boolean{
var _local3:Boolean;
var _local4:Point = _fl1540(_arg1);
var _local5:Point = _fl1540(_arg2);
if (((((((!((_arg1 == null))) && (!((_arg2 == null))))) && (!((_local4 == null))))) && (!((_local5 == null))))){
if (((_arg1._kj1696()) && (_arg2._kj1696()))){
if ((Math.abs((_local4.x - _local5.x)) + Math.abs((_local4.y - _local5.y))) == 1){
_local3 = true;
};
};
};
return (_local3);
}
private function _cf205(_arg1:TCell, _arg2:TCell):void{
var _local3:TCell = new TCell();
_local3._yb210(_arg1);
_arg1._yb210(_arg2);
_arg2._yb210(_local3);
}
public function _eh1994():void{
var _local1:int;
var _local2:TStrip;
if (StripList._ln1184() > 0){
_local1 = 0;
while (_local1 < StripList.Strips.length) {
_local2 = StripList.Strips[_local1];
_local2._do1810();
Stats._vc1878(_local2);
_local1++;
};
Animation._nd1512(StripList);
};
_on831();
}
public function _av832():void{
var _local2:int;
var _local3:TCell;
var _local1:int;
while (_local1 < Size.height) {
_local2 = 0;
while (_local2 < Size.width) {
_local3 = _jp74(_local2, _local1);
if (_local3.OnApplyMethod != null){
_local3._tw1242();
};
_local2++;
};
_local1++;
};
}
public function _rf1909(_arg1:TCell, _arg2:TUniquePiece):void{
_arg2.StartDel = _arg1.StageCrd.clone();
_arg2.StartDel.x = (_arg2.StartDel.x + 16);
_arg2.StartDel.y = (_arg2.StartDel.y + 16);
_arg2.EndDel.x = (((unqSite.ScreenOffset.x + _arg2.Rect.left) + _arg2.CenterPoint.x) + 2);
_arg2.EndDel.y = ((((unqSite.ScreenOffset.y + _arg2.Rect.top) + _arg2.CenterPoint.y) + 2) + TRenderUniquesSite.AddHgt);
_arg2.DeltaRot = (_arg2.Rotation / _arg2.MaxDeleting);
var _local3:Point = _arg2.StartDel.clone();
var _local4:Point = _arg2.EndDel.clone();
var _local5:Point = Funcs.MidPoint(_local3, _local4, 0.25);
var _local6:Point = Funcs.MidPoint(_local3, _local4, 0.5);
var _local7:Point = Funcs.MidPoint(_local3, _local4, 0.75);
var _local8:Point = Funcs.Perp(_local3, _local4);
_local8.normalize(32);
var _local9:Point = Funcs.Perp(_local3, _local4);
_local9.normalize(-32);
var _local10:Point = _local5.add(_local8);
var _local11:Point = _local5.add(_local9);
var _local12:Point = _local7.add(_local8);
var _local13:Point = _local7.add(_local9);
var _local14:TDeleteUnqCellAnimation = new TDeleteUnqCellAnimation(4);
_local14.Points.push(_local3);
_local14.Points.push(_local10);
_local14.Points.push(_local6);
_local14.Points.push(_local13);
_local14.Points.push(_local4);
_local14._wn796(16);
Animation.TotemEffects._ug33(_local14);
var _local15:TDeleteUnqCellAnimation = new TDeleteUnqCellAnimation(4);
_local15.Points.push(_local3);
_local15.Points.push(_local11);
_local15.Points.push(_local6);
_local15.Points.push(_local12);
_local15.Points.push(_local4);
_local15._wn796(16);
Animation.TotemEffects._ug33(_local15);
TGlobalVars.SoundPlayer._ao2018();
}
private function _on831():void{
var _local2:TLevelColumn;
var _local3:TCell;
var _local4:TUniquePiece;
var _local1:int;
while (_local1 < Columns.length) {
_local2 = Columns[_local1];
_local3 = _jp74(_local2.Column, _local2.BottomRow);
if (_local3 != null){
if ((((((_local3.CellType == 2)) && (!(_local3._ba2091())))) && (!(_local3.IsAnimating)))){
_local3._py469();
Animation._he1177(_local3, false);
_local4 = unqManager.Pieces[_local3.UnqIndex];
_local4.IsDeleting = true;
_rf1909(_local3, _local4);
};
};
_local1++;
};
}
public function _nw250():void{
var _local2:TLevelColumn;
var _local3:int;
var _local4:TCell;
var _local5:TUniquePiece;
var _local1:int;
while (_local1 < Columns.length) {
_local2 = Columns[_local1];
_local3 = _local2.TopRow;
while (_local3 <= _local2.BottomRow) {
_local4 = _jp74(_local2.Column, _local3);
if (_local4 != null){
if (_local4.CellType == 2){
_local4._py469();
Animation._he1177(_local4, false);
_local5 = unqManager.Pieces[_local4.UnqIndex];
_local5.IsDeleting = true;
_rf1909(_local4, _local5);
};
};
_local3++;
};
_local1++;
};
}
private function _pu38(_arg1:int, _arg2:int):int{
var _local6:TCell;
var _local3 = -1;
var _local4:TLevelColumn = Columns[_arg1];
var _local5:int = (_arg2 + 1);
while (_local5 <= _local4.BottomRow) {
_local6 = _jp74(_arg1, _local5);
if (((_local6.IsAnimating) || (_local6._hq1342()))){
break;
};
if (((!((_local6.CellType == 0))) && (_local6._ba2091()))){
_local3 = _local5;
};
_local5++;
};
return (_local3);
}
private function _ps149(_arg1:int):void{
var _local8:TCell;
var _local2:TCell;
var _local3:int;
var _local4:TLevelColumn = Columns[_arg1];
_local3 = _local4.BottomRow;
while (_local3 >= _local4.TopRow) {
_local2 = _jp74(_arg1, _local3);
_local8 = _jp74(_arg1, _pu38(_arg1, _local3));
if (((((((!((_local2.CellType == 0))) && (!(_local2._ba2091())))) && (!(_local2.IsAnimating)))) && (!(_local2._hq1342())))){
if (_local8 != null){
if (((((((!((_local8.CellType == 0))) && (_local8._ba2091()))) && (!(_local8._hq1342())))) && (!(_local8.IsAnimating)))){
_local8._yb210(_local2);
_local2._gt16(true);
_local2.Uid = -666;
Animation._no1682(_local8);
};
};
};
_local3--;
};
var _local5 = -1;
var _local6:int;
_local3 = _local4.TopRow;
while (_local3 < _local4.BottomRow) {
_local2 = _jp74(_arg1, _local3);
if (_local2.IsAnimating){
break;
};
if (((!((_local2.CellType == 0))) && (_local2._ba2091()))){
_local5 = _local3;
_local6++;
};
_local3++;
};
var _local7:int = _cj1974(_arg1, (_local4.TopRow - _local6)).y;
_local3 = _local4.TopRow;
while (_local3 <= _local5) {
_local2 = _jp74(_arg1, _local3);
if (((((((!((_local2.CellType == 0))) && (_local2._ba2091()))) && (!(_local2.IsAnimating)))) && (!(_local2._hq1342())))){
_local2 = TLevelFiller.GenerateNewCell(this, _arg1, _local3, false);
_local2.StageCrd.y = _local7;
_bn1385(_arg1, _local3, _local2);
Animation._sr1404(_local2);
_local7 = (_local7 + CellSize.height);
};
_local3++;
};
}
public function _ql1725():void{
var _local1:int;
while (_local1 < Size.width) {
_ps149(_local1);
_local1++;
};
}
private function _gc1350(_arg1:TCell):void{
if (_arg1 != null){
_arg1.IsSelected = false;
};
}
public function _nb941(_arg1:Point):void{
var _local3:TStrip;
var _local4:TStrip;
var _local2:TCell = _uk30(_arg1);
if (((!((_local2 == null))) && (_local2._kj1696()))){
_gc1350(LastSelectedCell);
if (_ms877(_local2, LastSelectedCell)){
_cf205(_local2, LastSelectedCell);
if (StripList._ln1184() > 0){
_local3 = StripList._xm282(_local2);
_local4 = StripList._xm282(LastSelectedCell);
Animation._qy443(_local2, LastSelectedCell);
_gc1350(LastSelectedCell);
LastSelectedCell = null;
if (((!((_local3 == null))) || (!((_local4 == null))))){
if (_local3 != null){
TotemsSite._fd1390(_local3.ColorCode);
} else {
TotemsSite._fd1390(_local4.ColorCode);
};
};
} else {
_cf205(_local2, LastSelectedCell);
Animation._yo1861(_local2, LastSelectedCell);
_gc1350(LastSelectedCell);
LastSelectedCell = null;
};
} else {
_gc1350(LastSelectedCell);
_gc1350(_local2);
if (_local2 != LastSelectedCell){
TGlobalVars.SoundPlayer._qr1441();
};
LastSelectedCell = _local2;
LastSelectedCell.IsSelected = true;
};
};
}
}
}//package pgn
Section 194
//TLevelColumn (pgn.TLevelColumn)
package pgn {
public class TLevelColumn {
public var Column:int;// = -1
public var TopRow:int;// = 666
public var BottomRow:int;// = -1
public var CellsCount:int;// = 0
}
}//package pgn
Section 195
//TLevelFiller (pgn.TLevelFiller)
package pgn {
import flash.display.*;
import pgn.bonuses.*;
import pgn.totems.*;
public class TLevelFiller {
private var kGrid_test:Class;
public var bGrid_test:Bitmap;
private var kGrid_color:Class;
public var bGrid_color:Bitmap;
public function TLevelFiller(){
kGrid_test = TLevelFiller_kGrid_test;
bGrid_test = new kGrid_test();
kGrid_color = TLevelFiller_kGrid_color;
bGrid_color = new kGrid_color();
super();
}
public function _op425(_arg1:TLevelProto):TLevel{
var _local4:int;
var _local5:uint;
var _local6:TCell;
var _local2:TLevel = new TLevel();
_local2.unqSite.ScreenOffset.x = 0;
_local2.unqSite.ScreenOffset.y = (120 - 32);
_local2.unqManager.LevelLink = _local2;
_local2.unqManager._go267(_arg1.gridColor, _arg1.gridGold);
_local2.LevelProto = _arg1;
_local2.unqSite.LevelLink = _local2;
_local2.Stats.MaxUniques = _local2.unqManager.Pieces.length;
_local2.Stats.MaxInLevel = _arg1.MaxUniquesInLevel;
_local2.Stats.MaxTime = _arg1.MaxTime;
_local2.StripList.LevelLink = _local2;
_local2.Animation.LevelLink = _local2;
_local2.Size = _local2.LevelProto.bmpProto.rect.clone();
_local2.Size.width = (_local2.Size.width / 3);
_local2.Size.height = (_local2.Size.height / 3);
var _local3:int;
while (_local3 < _local2.Size.height) {
_local4 = 0;
while (_local4 < _local2.Size.width) {
_local5 = _local2.LevelProto.bmpProto.getPixel((_local4 * 3), (_local3 * 3));
_local6 = null;
if (_local5 == 0x808080){
_local6 = GenerateNewCell(_local2, _local4, _local3, false);
} else {
_local6 = GenerateNewCell(_local2, _local4, _local3, true);
};
_local2._bn1385(_local4, _local3, _local6);
_local4++;
};
_local3++;
};
_gn215(_local2);
_ov815(_local2, _arg1);
return (_local2);
}
private function _gn215(_arg1:TLevel):void{
var _local3:TLevelColumn;
var _local4:int;
var _local5:TCell;
var _local2:int;
while (_local2 < _arg1.Size.width) {
_local3 = new TLevelColumn();
_local3.Column = _local2;
_local4 = 0;
while (_local4 < _arg1.Size.height) {
_local5 = _arg1._jp74(_local2, _local4);
if (_local5.CellType != 0){
_local3.TopRow = Math.min(_local3.TopRow, _local4);
_local3.BottomRow = Math.max(_local3.BottomRow, _local4);
_local3.CellsCount++;
};
_local4++;
};
_arg1.Columns.push(_local3);
_local2++;
};
}
private function _ov815(_arg1:TLevel, _arg2:TLevelProto):void{
var _local3:TBaseTotem;
if (_arg2.FireTotem){
_local3 = new TBaseTotem();
_local3.LevelLink = _arg1;
_local3.TotemId = 0;
_local3.Position = 0;
_local3.ColorCode = 0;
_local3.TotemLvl = _arg2.FireTotemLevel;
_local3.MinRect.x = ((102 - 12) + 1);
_local3.MinRect.y = (389 + 3);
_local3.MinRect.width = 37;
_local3.MinRect.height = 57;
_local3.MaxRect.x = (73 - 14);
_local3.MaxRect.y = 420;
_local3.Effect = new TTotemFireEffect((_arg2.FireTotemLevel + 2));
_arg1.TotemsSite._un954(_local3);
};
if (_arg2.TreeTotem){
_local3 = new TBaseTotem();
_local3.LevelLink = _arg1;
_local3.TotemId = 4;
_local3.Position = 0;
_local3.ColorCode = 2;
_local3.TotemLvl = _arg2.TreeTotemLevel;
if (_local3.TotemLvl == 0){
_local3.MinRect.x = ((160 - 12) + 1);
_local3.MinRect.y = (486 - 15);
} else {
_local3.MinRect.x = (((160 - 12) + 1) - 2);
_local3.MinRect.y = ((486 - 15) + 8);
};
_local3.MinRect.width = 37;
_local3.MinRect.height = 57;
_local3.MaxRect.x = (73 - 14);
_local3.MaxRect.y = 420;
_local3.Effect = new TTotemBonusEffect((_arg2.TreeTotemLevel + 2));
_arg1.TotemsSite._un954(_local3);
};
if (_arg2.TornadoTotem){
_local3 = new TBaseTotem();
_local3.LevelLink = _arg1;
_local3.TotemId = 3;
_local3.Position = 0;
_local3.ColorCode = 4;
_local3.TotemLvl = _arg2.TornadoTotemLevel;
if (_local3.TotemLvl == 0){
_local3.MinRect.x = ((69 - 12) - 5);
_local3.MinRect.y = (419 - 3);
} else {
_local3.MinRect.x = ((69 - 12) - 5);
_local3.MinRect.y = ((419 - 3) + 4);
};
_local3.MinRect.width = 37;
_local3.MinRect.height = 57;
_local3.MaxRect.x = (73 - 14);
_local3.MaxRect.y = 420;
_local3.Effect = new TTotemTornadoEffect((_arg2.TornadoTotemLevel + 1));
_arg1.TotemsSite._un954(_local3);
};
if (_arg2.WaterTotem){
_local3 = new TBaseTotem();
_local3.LevelLink = _arg1;
_local3.TotemId = 1;
_local3.Position = 0;
_local3.ColorCode = 3;
_local3.TotemLvl = _arg2.WaterTotemLevel;
if (_local3.TotemLvl == 0){
_local3.MinRect.x = ((148 - 12) - 3);
_local3.MinRect.y = 419;
} else {
_local3.MinRect.x = (((148 - 12) - 3) - 1);
_local3.MinRect.y = (419 + 3);
};
_local3.MinRect.width = 37;
_local3.MinRect.height = 57;
_local3.MaxRect.x = (73 - 14);
_local3.MaxRect.y = 420;
_local3.Effect = new TTotemWaterEffect(((_arg2.WaterTotemLevel * 2) + 5));
_arg1.TotemsSite._un954(_local3);
};
if (_arg2.TimeTotem){
_local3 = new TBaseTotem();
_local3.LevelLink = _arg1;
_local3.TotemId = 2;
_local3.Position = 0;
_local3.ColorCode = 1;
_local3.TotemLvl = _arg2.TimeTotemLevel;
if (_local3.TotemLvl == 0){
_local3.MinRect.x = ((44 - 12) - 2);
_local3.MinRect.y = (479 - 12);
} else {
_local3.MinRect.x = (((44 - 12) - 2) + 4);
_local3.MinRect.y = ((479 - 12) + 16);
};
_local3.MinRect.width = 37;
_local3.MinRect.height = 57;
_local3.MaxRect.x = (73 - 14);
_local3.MaxRect.y = 420;
_local3.Effect = new TTotemTimeEffect();
TTotemTimeEffect(_local3.Effect).TimeToAdd = ((_arg2.TimeTotemLevel + 1) * 30);
_arg1.TotemsSite._un954(_local3);
};
}
public static function GenerateNewCell(_arg1:TLevel, _arg2:int, _arg3:int, _arg4:Boolean):TCell{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:*;
var _local5:TCell = new TCell();
_local5.Uid = _arg1.UidCounter++;
_local5.LevelLink = _arg1;
_local5.StageCrd = _arg1._cj1974(_arg2, _arg3);
if (_arg4){
_local5.CellType = 0;
} else {
if (((_arg1.Stats._nv1243()) && ((Math.random() < 0.3)))){
_local5.CellType = 2;
_local5.UnqIndex = _arg1.Stats._mo801();
} else {
_local5.CellType = 1;
_local6 = 0;
_local7 = -1;
_local8 = -1;
_local9 = -1;
do {
_local6++;
_local11 = false;
_local7 = _arg1.LevelProto._aa1937();
_local8 = _arg1._pi1638((_arg2 + 0), (_arg3 - 1));
_local9 = _arg1._pi1638((_arg2 + 0), (_arg3 - 2));
_local11 = ((_local11) || (Funcs.IsTripleEqu(_local7, _local8, _local9)));
_local8 = _arg1._pi1638((_arg2 + 0), (_arg3 - 1));
_local9 = _arg1._pi1638((_arg2 + 0), (_arg3 + 1));
_local11 = ((_local11) || (Funcs.IsTripleEqu(_local7, _local8, _local9)));
_local8 = _arg1._pi1638((_arg2 + 0), (_arg3 + 1));
_local9 = _arg1._pi1638((_arg2 + 0), (_arg3 + 2));
_local11 = ((_local11) || (Funcs.IsTripleEqu(_local7, _local8, _local9)));
_local8 = _arg1._pi1638((_arg2 - 1), (_arg3 + 0));
_local9 = _arg1._pi1638((_arg2 - 2), (_arg3 + 0));
_local11 = ((_local11) || (Funcs.IsTripleEqu(_local7, _local8, _local9)));
_local8 = _arg1._pi1638((_arg2 - 1), (_arg3 + 0));
_local9 = _arg1._pi1638((_arg2 + 1), (_arg3 + 0));
_local11 = ((_local11) || (Funcs.IsTripleEqu(_local7, _local8, _local9)));
_local8 = _arg1._pi1638((_arg2 + 1), (_arg3 + 0));
_local9 = _arg1._pi1638((_arg2 + 2), (_arg3 + 0));
_local11 = ((_local11) || (Funcs.IsTripleEqu(_local7, _local8, _local9)));
if (_local6 > 5){
_local11 = false;
};
} while (_local11);
_local5.ColorCode = _local7;
_local10 = (Math.random() * 10000);
if (_local10 == 0){
_local5.Bonus = GenerateBonus(_arg1.LevelProto);
};
};
};
return (_local5);
}
public static function GenerateBonus(_arg1:TLevelProto):TBaseBonus{
var _local3:TBaseBonus;
var _local2:int = _arg1._ea1405();
if (_local2 < 0){
return (null);
};
_local3 = TBonusFactory.CreateBonus(_local2);
return (_local3);
}
}
}//package pgn
Section 196
//TLevelFiller_kGrid_color (pgn.TLevelFiller_kGrid_color)
package pgn {
import mx.core.*;
public class TLevelFiller_kGrid_color extends BitmapAsset {
}
}//package pgn
Section 197
//TLevelFiller_kGrid_test (pgn.TLevelFiller_kGrid_test)
package pgn {
import mx.core.*;
public class TLevelFiller_kGrid_test extends BitmapAsset {
}
}//package pgn
Section 198
//TLevelProto (pgn.TLevelProto)
package pgn {
import flash.display.*;
public class TLevelProto {
private const constFireBonus:int = 0;
private const constLightingBonus:int = 1;
private const constTimeBonus:int = 2;
private const constTornadoBonus:int = 3;
private const constDelUnqBonus:int = 5;
private const constRed:int = 0;
private const constYellow:int = 1;
private const constGreen:int = 2;
private const constBlue:int = 3;
private const constWhite:int = 4;
public var LevelId:int;// = -1
public var LevelNum:String;// = ""
public var bmpProto:BitmapData;// = null
public var gridColor:BitmapData;// = null
public var gridGold:BitmapData;// = null
public var MaxUniquesInLevel:int;// = 4
public var MaxTime:int;// = 120000
public var TargetIsTotem:Boolean;// = true
public var Target:String;// = "water"
public var TargetLevel:int;// = 1
public var FireTotem:Boolean;// = false
public var FireTotemLevel:int;// = -1
public var TreeTotem:Boolean;// = false
public var TreeTotemLevel:int;// = -1
public var TornadoTotem:Boolean;// = false
public var TornadoTotemLevel:int;// = -1
public var WaterTotem:Boolean;// = false
public var WaterTotemLevel:int;// = -1
public var TimeTotem:Boolean;// = false
public var TimeTotemLevel:int;// = -1
public var Bonuses:Array;
public var AllowColorCodes:Array;
private var AllowColorCodesProto:Array;
public function TLevelProto(){
Bonuses = new Array(constFireBonus, constTimeBonus);
AllowColorCodes = new Array(constRed, constYellow, constGreen, constBlue, constWhite);
AllowColorCodesProto = new Array(constRed, constYellow, constGreen, constWhite, constBlue);
super();
}
public function _dj894(_arg1:Boolean, _arg2:String, _arg3:int):void{
TargetIsTotem = _arg1;
Target = _arg2;
TargetLevel = _arg3;
}
public function _ma1051(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
if (_arg1 >= 0){
FireTotem = true;
FireTotemLevel = _arg1;
};
if (_arg2 >= 0){
TreeTotem = true;
TreeTotemLevel = _arg2;
};
if (_arg3 >= 0){
TornadoTotem = true;
TornadoTotemLevel = _arg3;
};
if (_arg4 >= 0){
WaterTotem = true;
WaterTotemLevel = _arg4;
};
if (_arg5 >= 0){
TimeTotem = true;
TimeTotemLevel = _arg5;
};
}
public function _ea1405():int{
var _local2:Number;
var _local3:int;
var _local1 = -1;
if (Bonuses.length > 0){
_local2 = Math.random();
_local3 = (_local2 * Bonuses.length);
_local1 = Bonuses[_local3];
};
return (_local1);
}
public function _hi1971(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean):void{
Bonuses.length = 0;
if (_arg1){
Bonuses.push(constFireBonus);
};
if (_arg2){
Bonuses.push(constLightingBonus);
};
if (_arg3){
Bonuses.push(constTimeBonus);
};
if (_arg4){
Bonuses.push(constTornadoBonus);
};
if (_arg5){
Bonuses.push(constDelUnqBonus);
};
}
public function _hn1197(_arg1:int):void{
var _local3:int;
AllowColorCodes.length = 0;
var _local2:int;
while (_local2 < _arg1) {
_local3 = AllowColorCodesProto[_local2];
AllowColorCodes.push(_local3);
_local2++;
};
}
public function _aa1937():int{
var _local1:int = (Math.random() * AllowColorCodes.length);
return (AllowColorCodes[_local1]);
}
}
}//package pgn
Section 199
//TSoundPlayer (pgn.TSoundPlayer)
package pgn {
import flash.media.*;
import flash.utils.*;
import pgn.global.*;
public class TSoundPlayer {
private var k_ButtonClick:Class;
private var s_ButtonClick:Sound;
private var k_ChainExpl:Class;
private var s_ChainExpl:Sound;
private var k_ChainFall:Class;
private var s_ChainFall:Sound;
private var k_ChainOut:Class;
private var s_ChainOut:Sound;
private var k_DeleteGoldBonus:Class;
private var s_DeleteGoldBonus:Sound;
private var k_DigsAdd:Class;
private var s_DigsAdd:Sound;
private var k_FireExpl:Class;
private var s_FireExpl:Sound;
private var k_FireFire:Class;
private var s_FireFire:Sound;
private var k_FireFly:Class;
private var s_FireFly:Sound;
private var k_GoldToPlace:Class;
private var s_GoldToPlace:Sound;
private var k_LevelIn:Class;
private var s_LevelIn:Sound;
private var k_LevelOut:Class;
private var s_LevelOut:Sound;
private var k_Lighting:Class;
private var s_Lighting:Sound;
private var k_MainMenuIn:Class;
private var s_MainMenuIn:Sound;
private var k_MainMenuOut:Class;
private var s_MainMenuOut:Sound;
private var k_SelectCell:Class;
private var s_SelectCell:Sound;
private var k_SelectLevelsIn:Class;
private var s_SelectLevelsIn:Sound;
private var k_SelectLevelsOut:Class;
private var s_SelectLevelsOut:Sound;
private var k_Time:Class;
private var s_Time:Sound;
private var k_Tornado:Class;
private var s_Tornado:Sound;
private var k_TotemBack:Class;
private var s_TotemBack:Sound;
private var k_TotemForw:Class;
private var s_TotemForw:Sound;
private var k_Tree:Class;
private var s_Tree:Sound;
private var k_Water:Class;
private var s_Water:Sound;
private var k_WhiteArc:Class;
private var s_WhiteArc:Sound;
private var k_WoodBreak:Class;
private var s_WoodBreak:Sound;
private var k_WoodFall:Class;
private var s_WoodFall:Sound;
private var k_WoodHeat:Class;
private var s_WoodHeat:Sound;
private var k_jungle_07:Class;
private var s_jungle_07:Sound;
private var songs:Dictionary;
private var played:Dictionary;
private var musicChan:SoundChannel;
private var MaxVolume:Number;// = 0.5
public function TSoundPlayer(){
k_ButtonClick = TSoundPlayer_k_ButtonClick;
s_ButtonClick = new k_ButtonClick();
k_ChainExpl = TSoundPlayer_k_ChainExpl;
s_ChainExpl = new k_ChainExpl();
k_ChainFall = TSoundPlayer_k_ChainFall;
s_ChainFall = new k_ChainFall();
k_ChainOut = TSoundPlayer_k_ChainOut;
s_ChainOut = new k_ChainOut();
k_DeleteGoldBonus = TSoundPlayer_k_DeleteGoldBonus;
s_DeleteGoldBonus = new k_DeleteGoldBonus();
k_DigsAdd = TSoundPlayer_k_DigsAdd;
s_DigsAdd = new k_DigsAdd();
k_FireExpl = TSoundPlayer_k_FireExpl;
s_FireExpl = new k_FireExpl();
k_FireFire = TSoundPlayer_k_FireFire;
s_FireFire = new k_FireFire();
k_FireFly = TSoundPlayer_k_FireFly;
s_FireFly = new k_FireFly();
k_GoldToPlace = TSoundPlayer_k_GoldToPlace;
s_GoldToPlace = new k_GoldToPlace();
k_LevelIn = TSoundPlayer_k_LevelIn;
s_LevelIn = new k_LevelIn();
k_LevelOut = TSoundPlayer_k_LevelOut;
s_LevelOut = new k_LevelOut();
k_Lighting = TSoundPlayer_k_Lighting;
s_Lighting = new k_Lighting();
k_MainMenuIn = TSoundPlayer_k_MainMenuIn;
s_MainMenuIn = new k_MainMenuIn();
k_MainMenuOut = TSoundPlayer_k_MainMenuOut;
s_MainMenuOut = new k_MainMenuOut();
k_SelectCell = TSoundPlayer_k_SelectCell;
s_SelectCell = new k_SelectCell();
k_SelectLevelsIn = TSoundPlayer_k_SelectLevelsIn;
s_SelectLevelsIn = new k_SelectLevelsIn();
k_SelectLevelsOut = TSoundPlayer_k_SelectLevelsOut;
s_SelectLevelsOut = new k_SelectLevelsOut();
k_Time = TSoundPlayer_k_Time;
s_Time = new k_Time();
k_Tornado = TSoundPlayer_k_Tornado;
s_Tornado = new k_Tornado();
k_TotemBack = TSoundPlayer_k_TotemBack;
s_TotemBack = new k_TotemBack();
k_TotemForw = TSoundPlayer_k_TotemForw;
s_TotemForw = new k_TotemForw();
k_Tree = TSoundPlayer_k_Tree;
s_Tree = new k_Tree();
k_Water = TSoundPlayer_k_Water;
s_Water = new k_Water();
k_WhiteArc = TSoundPlayer_k_WhiteArc;
s_WhiteArc = new k_WhiteArc();
k_WoodBreak = TSoundPlayer_k_WoodBreak;
s_WoodBreak = new k_WoodBreak();
k_WoodFall = TSoundPlayer_k_WoodFall;
s_WoodFall = new k_WoodFall();
k_WoodHeat = TSoundPlayer_k_WoodHeat;
s_WoodHeat = new k_WoodHeat();
k_jungle_07 = TSoundPlayer_k_jungle_07;
s_jungle_07 = new k_jungle_07();
songs = new Dictionary();
played = new Dictionary();
musicChan = new SoundChannel();
super();
songs["_cl1179"] = s_ButtonClick;
songs["_gy756"] = s_ChainExpl;
songs["_yo879"] = s_ChainFall;
songs["_yi1197"] = s_ChainOut;
songs["_hs239"] = s_DeleteGoldBonus;
songs["_su1424"] = s_DigsAdd;
songs["_sv1920"] = s_FireExpl;
songs["_wx1317"] = s_FireFire;
songs["_be268"] = s_FireFly;
songs["_ao2018"] = s_GoldToPlace;
songs["LevelIn"] = s_LevelIn;
songs["LevelOut"] = s_LevelOut;
songs["_ly1306"] = s_Lighting;
songs["_aj113"] = s_MainMenuIn;
songs["_vm45"] = s_MainMenuOut;
songs["_qr1441"] = s_SelectCell;
songs["SelectLevelsIn"] = s_SelectLevelsIn;
songs["SelectLevelsOut"] = s_SelectLevelsOut;
songs["_ek2027"] = s_Time;
songs["_fh312"] = s_Tornado;
songs["_mv1121"] = s_TotemBack;
songs["TotemForw"] = s_TotemForw;
songs["Tree"] = s_Tree;
songs["_om809"] = s_Water;
songs["_qw117"] = s_WhiteArc;
songs["_sa528"] = s_WoodBreak;
songs["_iu875"] = s_WoodFall;
songs["_ig2005"] = s_WoodHeat;
songs["jungle-07"] = s_jungle_07;
}
private function _jg1817(_arg1:String, _arg2:Number=1):void{
var _local3:int;
var _local4:Sound;
if (TGlobalVars.IsSoundOn){
_local3 = played[_arg1];
if (_local3 != TGlobalVars.FrameCounter){
played[_arg1] = TGlobalVars.FrameCounter;
_local4 = songs[_arg1];
_arg2 = Funcs.Interval(0, MaxVolume, _arg2);
_local4.play(0, 0, new SoundTransform(_arg2));
};
};
}
public function _cl1179():void{
_jg1817("_cl1179");
}
public function _pr1850():void{
_jg1817("LevelIn");
}
public function _qr1441():void{
_jg1817("_qr1441");
}
public function _tw669():void{
_jg1817("LevelOut");
}
public function _yi1197():void{
_jg1817("_yi1197");
}
public function _gy756():void{
_jg1817("_gy756");
}
public function _yo879():void{
_jg1817("_yo879");
}
public function _ao2018():void{
_jg1817("_ao2018", (MaxVolume * 0.5));
}
public function _ry845():void{
_jg1817("TotemForw");
}
public function _mv1121():void{
_jg1817("_mv1121");
}
public function _fh312():void{
_jg1817("_fh312");
}
public function _om809():void{
_jg1817("_om809");
}
public function _ek2027():void{
_jg1817("_ek2027");
}
public function Tree():void{
_jg1817("Tree");
}
public function _ly1306():void{
_jg1817("_ly1306");
}
public function _hs239():void{
_jg1817("_hs239");
}
public function _be268():void{
_jg1817("_be268");
}
public function _sv1920():void{
_jg1817("_sv1920");
}
public function _wx1317():void{
_jg1817("_wx1317");
}
public function _su1424():void{
_jg1817("_su1424");
}
public function _qw117():void{
_jg1817("_qw117");
}
public function _ig2005():void{
_jg1817("_ig2005");
}
public function _sa528():void{
_jg1817("_sa528");
}
public function _iu875():void{
_jg1817("_iu875");
}
public function _cf885():void{
var _local1:Sound = songs["jungle-07"];
musicChan = _local1.play(0, 1000000, new SoundTransform());
_au493();
}
private function _go1689(_arg1:Number):void{
_arg1 = Funcs.Interval(0, MaxVolume, _arg1);
var _local2:SoundTransform = musicChan.soundTransform;
_local2.volume = _arg1;
musicChan.soundTransform = _local2;
}
public function _ji1570():void{
_go1689(0);
}
public function _au493():void{
_go1689(1);
}
public function _aj113():void{
_jg1817("_aj113");
}
public function _vm45():void{
_jg1817("_vm45");
}
public function _vl634():void{
_jg1817("SelectLevelsIn");
}
public function _kt1682():void{
_jg1817("SelectLevelsOut");
}
}
}//package pgn
Section 200
//TSoundPlayer_k_ButtonClick (pgn.TSoundPlayer_k_ButtonClick)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_ButtonClick extends SoundAsset {
}
}//package pgn
Section 201
//TSoundPlayer_k_ChainExpl (pgn.TSoundPlayer_k_ChainExpl)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_ChainExpl extends SoundAsset {
}
}//package pgn
Section 202
//TSoundPlayer_k_ChainFall (pgn.TSoundPlayer_k_ChainFall)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_ChainFall extends SoundAsset {
}
}//package pgn
Section 203
//TSoundPlayer_k_ChainOut (pgn.TSoundPlayer_k_ChainOut)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_ChainOut extends SoundAsset {
}
}//package pgn
Section 204
//TSoundPlayer_k_DeleteGoldBonus (pgn.TSoundPlayer_k_DeleteGoldBonus)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_DeleteGoldBonus extends SoundAsset {
}
}//package pgn
Section 205
//TSoundPlayer_k_DigsAdd (pgn.TSoundPlayer_k_DigsAdd)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_DigsAdd extends SoundAsset {
}
}//package pgn
Section 206
//TSoundPlayer_k_FireExpl (pgn.TSoundPlayer_k_FireExpl)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_FireExpl extends SoundAsset {
}
}//package pgn
Section 207
//TSoundPlayer_k_FireFire (pgn.TSoundPlayer_k_FireFire)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_FireFire extends SoundAsset {
}
}//package pgn
Section 208
//TSoundPlayer_k_FireFly (pgn.TSoundPlayer_k_FireFly)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_FireFly extends SoundAsset {
}
}//package pgn
Section 209
//TSoundPlayer_k_GoldToPlace (pgn.TSoundPlayer_k_GoldToPlace)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_GoldToPlace extends SoundAsset {
}
}//package pgn
Section 210
//TSoundPlayer_k_jungle_07 (pgn.TSoundPlayer_k_jungle_07)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_jungle_07 extends SoundAsset {
}
}//package pgn
Section 211
//TSoundPlayer_k_LevelIn (pgn.TSoundPlayer_k_LevelIn)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_LevelIn extends SoundAsset {
}
}//package pgn
Section 212
//TSoundPlayer_k_LevelOut (pgn.TSoundPlayer_k_LevelOut)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_LevelOut extends SoundAsset {
}
}//package pgn
Section 213
//TSoundPlayer_k_Lighting (pgn.TSoundPlayer_k_Lighting)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_Lighting extends SoundAsset {
}
}//package pgn
Section 214
//TSoundPlayer_k_MainMenuIn (pgn.TSoundPlayer_k_MainMenuIn)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_MainMenuIn extends SoundAsset {
}
}//package pgn
Section 215
//TSoundPlayer_k_MainMenuOut (pgn.TSoundPlayer_k_MainMenuOut)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_MainMenuOut extends SoundAsset {
}
}//package pgn
Section 216
//TSoundPlayer_k_SelectCell (pgn.TSoundPlayer_k_SelectCell)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_SelectCell extends SoundAsset {
}
}//package pgn
Section 217
//TSoundPlayer_k_SelectLevelsIn (pgn.TSoundPlayer_k_SelectLevelsIn)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_SelectLevelsIn extends SoundAsset {
}
}//package pgn
Section 218
//TSoundPlayer_k_SelectLevelsOut (pgn.TSoundPlayer_k_SelectLevelsOut)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_SelectLevelsOut extends SoundAsset {
}
}//package pgn
Section 219
//TSoundPlayer_k_Time (pgn.TSoundPlayer_k_Time)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_Time extends SoundAsset {
}
}//package pgn
Section 220
//TSoundPlayer_k_Tornado (pgn.TSoundPlayer_k_Tornado)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_Tornado extends SoundAsset {
}
}//package pgn
Section 221
//TSoundPlayer_k_TotemBack (pgn.TSoundPlayer_k_TotemBack)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_TotemBack extends SoundAsset {
}
}//package pgn
Section 222
//TSoundPlayer_k_TotemForw (pgn.TSoundPlayer_k_TotemForw)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_TotemForw extends SoundAsset {
}
}//package pgn
Section 223
//TSoundPlayer_k_Tree (pgn.TSoundPlayer_k_Tree)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_Tree extends SoundAsset {
}
}//package pgn
Section 224
//TSoundPlayer_k_Water (pgn.TSoundPlayer_k_Water)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_Water extends SoundAsset {
}
}//package pgn
Section 225
//TSoundPlayer_k_WhiteArc (pgn.TSoundPlayer_k_WhiteArc)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_WhiteArc extends SoundAsset {
}
}//package pgn
Section 226
//TSoundPlayer_k_WoodBreak (pgn.TSoundPlayer_k_WoodBreak)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_WoodBreak extends SoundAsset {
}
}//package pgn
Section 227
//TSoundPlayer_k_WoodFall (pgn.TSoundPlayer_k_WoodFall)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_WoodFall extends SoundAsset {
}
}//package pgn
Section 228
//TSoundPlayer_k_WoodHeat (pgn.TSoundPlayer_k_WoodHeat)
package pgn {
import mx.core.*;
public class TSoundPlayer_k_WoodHeat extends SoundAsset {
}
}//package pgn
Section 229
//TStrip (pgn.TStrip)
package pgn {
public class TStrip {
public var Cells:Array;
public var ColorCode:int;// = -1
public var WasJoined:Boolean;// = false
public function TStrip(){
Cells = new Array();
super();
}
public function _rh1849(_arg1:TCell):void{
if (_arg1.ColorCode == ColorCode){
Cells.push(_arg1);
};
}
public function _jp74(_arg1:int):TCell{
return (((_arg1)<Cells.length) ? TCell(Cells[_arg1]) : null);
}
public function _sq602(_arg1:TCell, _arg2:TCell, _arg3:TCell):void{
Cells.length = 0;
ColorCode = _arg1.ColorCode;
_rh1849(_arg1);
_rh1849(_arg2);
_rh1849(_arg3);
}
public function _tt2005(_arg1:TCell):Boolean{
var _local4:TCell;
var _local2:Boolean;
var _local3:int;
while (_local3 < Cells.length) {
_local4 = _jp74(_local3);
if (_local4._vw2020(_arg1)){
_local2 = true;
};
_local3++;
};
return (_local2);
}
public function _we1644(_arg1:TStrip):Boolean{
var _local2:Boolean;
var _local3:int;
while (_local3 < _arg1.Cells.length) {
if (_tt2005(_arg1._jp74(_local3))){
_local2 = true;
};
_local3++;
};
return (_local2);
}
public function _po1008(_arg1:TStrip):void{
var _local3:TCell;
var _local2:int;
while (_local2 < _arg1.Cells.length) {
_local3 = _arg1._jp74(_local2);
if (!_tt2005(_local3)){
_rh1849(_local3);
};
_local2++;
};
}
public function _do1810():void{
var _local2:TCell;
var _local1:int;
while (_local1 < Cells.length) {
_local2 = _jp74(_local1);
_local2._py469();
_local1++;
};
}
}
}//package pgn
Section 230
//TStripList (pgn.TStripList)
package pgn {
public class TStripList {
public var LevelLink:TLevel;// = null
public var Strips:Array;
private var preStrips:Array;
public function TStripList(){
Strips = new Array();
preStrips = new Array();
super();
}
private function _sq602(_arg1:TCell, _arg2:TCell, _arg3:TCell):void{
var _local4:TStrip = new TStrip();
_local4._sq602(_arg1, _arg2, _arg3);
preStrips.push(_local4);
}
private function _ne1666(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{
var _local5:TCell;
var _local6:TCell;
var _local7:TCell;
_local5 = LevelLink._jp74(_arg1, _arg3);
_local6 = LevelLink._jp74((_arg1 - _arg2), (_arg3 - _arg4));
_local7 = LevelLink._jp74((_arg1 + _arg2), (_arg3 + _arg4));
var _local8:Boolean;
if ((((((_local5 == null)) || ((_local6 == null)))) || ((_local7 == null)))){
_local8 = false;
};
if (_local8){
if (((((!((_local5.CellType == 1))) || (!((_local6.CellType == 1))))) || (!((_local7.CellType == 1))))){
_local8 = false;
};
};
if (_local8){
if (((((_local5._ba2091()) || (_local6._ba2091()))) || (_local7._ba2091()))){
_local8 = false;
};
};
if (_local8){
if (((((_local5._hq1342()) || (_local6._hq1342()))) || (_local7._hq1342()))){
_local8 = false;
};
};
if (_local8){
if (((((_local5.IsAnimating) || (_local6.IsAnimating))) || (_local7.IsAnimating))){
_local8 = false;
};
};
if (_local8){
if ((((_local5.ColorCode == _local6.ColorCode)) && ((_local5.ColorCode == _local7.ColorCode)))){
_sq602(_local5, _local6, _local7);
};
};
}
private function _kk800():void{
var _local1:int;
var _local2:TStrip;
var _local3:TStrip;
var _local4:int;
var _local5:TStrip;
if (preStrips.length > 0){
_local1 = 0;
while (_local1 < preStrips.length) {
_local2 = new TStrip();
_local3 = TStrip(preStrips[_local1]);
if (!_local3.WasJoined){
_local3.WasJoined = true;
_local2.ColorCode = _local3.ColorCode;
_local2._po1008(_local3);
_local4 = 0;
while (_local4 < preStrips.length) {
_local5 = TStrip(preStrips[_local4]);
if (((((!(_local5.WasJoined)) && ((_local2.ColorCode == _local5.ColorCode)))) && (_local2._we1644(_local5)))){
_local5.WasJoined = true;
_local2._po1008(_local5);
};
_local4++;
};
};
Strips.push(_local2);
_local1++;
};
};
}
public function _ln1184():int{
var _local2:int;
Strips.length = 0;
preStrips.length = 0;
var _local1:int;
while (_local1 < LevelLink.Size.height) {
_local2 = 0;
while (_local2 < LevelLink.Size.width) {
_ne1666(_local2, 1, _local1, 0);
_ne1666(_local2, 0, _local1, 1);
_local2++;
};
_local1++;
};
_kk800();
return (Strips.length);
}
public function _xm282(_arg1:TCell):TStrip{
var _local4:TStrip;
var _local2:TStrip;
var _local3:int;
while (_local3 < Strips.length) {
_local4 = Strips[_local3];
if (_local4._tt2005(_arg1)){
_local2 = _local4;
};
_local3++;
};
return (_local2);
}
}
}//package pgn
Section 231
//king_mc (king_mc)
package {
import flash.events.*;
import flash.display.*;
import com.midasplayer.particle.*;
import com.midasplayer.*;
import flash.media.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class king_mc extends MovieClip {
public var bar:Sprite;
public var mcLoadLogoBg:MovieClip;
public var bg:Sprite;
public var holder:Sprite;
public var particles:Main;
public var mochi:String;
public var mcKingLoader:DragonLoader;
public var game_name:String;
public function king_mc(){
addFrameScript(0, _bn83, 1, _nk484, 2, _bu453);
}
public function _ki373(_arg1:Event):void{
bg = new Sprite();
bg.buttonMode = true;
bg.name = "clickBg";
bg.graphics.beginFill(0, 0);
bg.graphics.lineTo(stage.stageWidth, 0);
bg.graphics.lineTo(stage.stageWidth, stage.stageHeight);
bg.graphics.lineTo(0, stage.stageHeight);
bg.graphics.lineTo(0, 0);
bg.graphics.endFill();
bg.addEventListener(MouseEvent.CLICK, _iv146);
this.addChildAt(bg, this.getChildIndex(mcLoadLogoBg));
mcLoadLogoBg.x = ((stage.stageWidth / 2) - (mcLoadLogoBg.width / 2));
mcLoadLogoBg.y = ((stage.stageHeight / 2) - (mcLoadLogoBg.height / 2));
bar = new Sprite();
bar.graphics.beginFill(0xFFFFFF, 0);
bar.x = (mcLoadLogoBg.x + 5);
bar.y = (mcLoadLogoBg.y + 34);
bar.graphics.drawRect(0, 0, 96, 5);
bar.graphics.endFill();
this.addChild(bar);
holder = new Sprite();
this.addChild(holder);
holder.x = bar.x;
holder.y = bar.y;
particles = new Main();
particles._od195(holder);
this.addChild(particles);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function _iv146(_arg1:Event):void{
KingAPI.openLoaderProgressLink();
}
public function _ot223(_arg1):void{
mcKingLoader._po433();
gotoAndStop(3);
}
function _bu453(){
}
function _bn83(){
stop();
game_name = "jungle-magic";
mochi = "";
stage.scaleMode = StageScaleMode.NO_SCALE;
KingAPI.addEventListener(KingAPI.INITIALIZED_EVENT, _ki373);
KingAPI.addEventListener(KingAPI.HOST_BANNED_EVENT, _ki373);
KingAPI.init(game_name, root.loaderInfo.url);
}
function _nk484(){
mcKingLoader.addEventListener(DragonLoader.LAUNCH_GAME, _ot223);
mcKingLoader.init(game_name, mochi);
}
public function onEnterFrame(_arg1:Event):void{
holder.x = (bar.x + bar.width);
if (((!((parent == null))) && (((parent as MovieClip).framesLoaded == (parent as MovieClip).totalFrames)))){
particles._cq156();
this.removeChild(particles);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
bg.removeEventListener(MouseEvent.CLICK, _iv146);
this.removeChild(bar);
if (!KingAPI.isHome){
gotoAndStop(2);
} else {
gotoAndStop(3);
};
} else {
bar.scaleX = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal);
mcLoadLogoBg.bar.scaleX = (1 - (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal));
};
}
}
}//package
Section 232
//match3_1 (match3_1)
package {
import flash.events.*;
import flash.geom.*;
import pgn.*;
import flash.display.*;
import pgn.render.*;
import pgn.gfxAssets.*;
import pgn.global.*;
import com.midasplayer.*;
public class match3_1 extends Sprite {
public var bdCanvas:BitmapData;
public var bmpCanvas:Bitmap;
public var bdFX:BitmapData;
public var bmpFX:Bitmap;
public var bdUpper:BitmapData;
public var bmpUpper:Bitmap;
public var borderBmp:Bitmap;// = null
public var levelProtos:TLevelProtoAsset;
public var levelFiller:TLevelFiller;
public var level:TLevel;// = null
public var renderer:TRenderer;
private var ActiveMode_MainMenu:String;// = "ActiveMode_MainMenu"
private var ActiveMode_MainMenu_In:String;// = "ActiveMode_MainMenu_In"
private var ActiveMode_MainMenu_Out:String;// = "ActiveMode_MainMenu_Out"
private var ActiveMode_SelectLvl:String;// = "ActiveMode_SelectLvl"
private var ActiveMode_SelectLvl_In:String;// = "ActiveMode_SelectLvl_In"
private var ActiveMode_SelectLvl_Out:String;// = "ActiveMode_SelectLvl_Out"
private var ActiveMode_Level:String;// = "ActiveMode_Level"
private var ActiveMode_Level_In:String;// = "ActiveMode_Level_In"
private var ActiveMode_Level_Out:String;// = "ActiveMode_Level_Out"
private var ActiveMode_AfterLvl:String;// = "ActiveMode_AfterLvl"
private var ActiveMode_AfterLvl_In:String;// = "ActiveMode_AfterLvl_In"
private var ActiveMode_AfterLvl_Out:String;// = "ActiveMode_AfterLvl_Out"
private var ActiveMode_InGameMenu:String;// = "ActiveMode_InGameMenu"
private var ActiveMode_InGameMenu_In:String;// = "ActiveMode_InGameMenu_In"
private var ActiveMode_InGameMenu_Out:String;// = "ActiveMode_InGameMenu_Out"
private var ActiveMode_Message:String;// = "ActiveMode_Message"
private var ActiveMode_Message_In:String;// = "ActiveMode_Message_In"
private var ActiveMode_Message_Out:String;// = "ActiveMode_Message_Out"
private var ActiveMode_Help:String;// = "ActiveMode_Help"
private var ActiveMode_Help_In:String;// = "ActiveMode_Help_In"
private var ActiveMode_Help_Out:String;// = "ActiveMode_Help_Out"
private var ActiveMode_Scores:String;// = "ActiveMode_Scores"
private var ActiveMode_Scores_In:String;// = "ActiveMode_Scores_In"
private var ActiveMode_Scores_Out:String;// = "ActiveMode_Scores_Out"
private var ActiveMode_Credits:String;// = "ActiveMode_Credits"
private var ActiveMode_Credits_In:String;// = "ActiveMode_Credits_In"
private var ActiveMode_Credits_Out:String;// = "ActiveMode_Credits_Out"
private var ActiveMode:String;
private var SelectedItemBeforeFade:int;// = -1
private var OptionsMenuReturn:String;// = ""
private var NeedExitToMainMenu:Boolean;// = false
private var upperWhite:Number;// = 1
private var king_logo_rc:Rectangle;
private var king_af_logo_rc:Rectangle;
public function match3_1(){
bdCanvas = new BitmapData(800, 600, true, 0);
bmpCanvas = new Bitmap(bdCanvas);
bdFX = new BitmapData(800, 600, false, 0);
bmpFX = new Bitmap(bdFX);
bdUpper = new BitmapData(800, 600, true, 4294967295);
bmpUpper = new Bitmap(bdUpper);
levelProtos = new TLevelProtoAsset();
levelFiller = new TLevelFiller();
renderer = new TRenderer();
ActiveMode = ActiveMode_MainMenu;
king_logo_rc = new Rectangle((800 - 109), (600 - 34), 109, 51);
king_af_logo_rc = new Rectangle(272, 221, 132, 61);
super();
if (stage){
init();
} else {
addEventListener(Event.ADDED_TO_STAGE, _wn796);
};
}
public function _wn796(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, _wn796);
TGlobalVars.SoundPlayer = new TSoundPlayer();
TGlobalVars.SoundPlayer._cf885();
TGlobalVars.CurrentMaxLevel = SaveManager.Get();
stage.quality = StageQuality.BEST;
renderer.stageLink = stage;
renderer.bdCanvas = bdCanvas;
renderer.bdFX = bdFX;
renderer.bdUpper = bdUpper;
renderer._ot944();
renderer.backRenderer._va1224(stage);
this.opaqueBackground = 0;
this.cacheAsBitmap = true;
borderBmp = new Bitmap(renderer.bdBorder);
borderBmp.blendMode = "normal";
stage.addChild(borderBmp);
borderBmp.x = 200;
borderBmp.y = 0;
bmpCanvas.smoothing = false;
bmpCanvas.blendMode = "normal";
stage.addChild(bmpCanvas);
renderer.backRenderer._aq162(stage);
bmpFX.smoothing = false;
bmpFX.blendMode = "add";
stage.addChild(bmpFX);
bmpUpper.smoothing = false;
bmpUpper.blendMode = "normal";
stage.addChild(bmpUpper);
_uv1079(true);
stage.addEventListener(Event.ENTER_FRAME, _jp1882);
stage.addEventListener(MouseEvent.CLICK, _ep382);
stage.addEventListener(MouseEvent.MOUSE_DOWN, _vn1517);
stage.addEventListener(MouseEvent.MOUSE_UP, _ip1657);
stage.addEventListener(MouseEvent.MOUSE_MOVE, _vn32);
stage.addEventListener(KeyboardEvent.KEY_DOWN, _yo309);
}
public function _jp1882(_arg1:Event):void{
var _local2:int;
if (upperWhite > 0){
_local2 = (0xFF * upperWhite);
bdUpper.fillRect(bdUpper.rect, ((((_local2 * 0x0100) * 0x0100) * 0x0100) + 0xFFFFFF));
upperWhite = (upperWhite - (1 / 60));
};
TGlobalVars.FrameCounter++;
if (ActiveMode == ActiveMode_Level){
if (!level.IsPause){
level.Stats._qr2007();
level.Animation._iu1870();
level.Animation._dp806();
if (level.Stats.IsTimeOver){
_lr1600(false, false);
};
if (level.Stats._jl1716()){
TGlobalVars.CurrentMaxLevel = Math.max(TGlobalVars.CurrentMaxLevel, (level.LevelProto.LevelId + 1));
SaveManager.Save(TGlobalVars.CurrentMaxLevel);
_lr1600(true, false);
};
};
if (level.LevelProto.LevelId == 0){
if (!level.Stats.WasShowMessage){
if (level.Stats.YourTime > 3000){
level.IsPause = true;
level.Stats.WasShowMessage = true;
_ca28(1);
};
};
};
if (level.LevelProto.LevelId == 2){
if (!level.Stats.WasShowMessage){
if (level.Stats.YourTime > 3000){
level.IsPause = true;
level.Stats.WasShowMessage = true;
_ca28(2);
};
};
};
};
if (ActiveMode == ActiveMode_MainMenu_Out){
if (renderer.mainMenuRender._mr1693()){
switch (SelectedItemBeforeFade){
case 0:
_wq1851(false);
break;
case 1:
_fk1611();
break;
case 2:
_yi1605(false);
break;
case 3:
_ly838();
break;
};
};
};
if (ActiveMode == ActiveMode_MainMenu_In){
if (renderer.mainMenuRender._mr1693()){
_jc1661();
};
};
if (ActiveMode == ActiveMode_SelectLvl_In){
if (renderer.selectLevelRender._mr1693()){
_bi1689();
};
};
if (ActiveMode == ActiveMode_SelectLvl_Out){
if (renderer.selectLevelRender._mr1693()){
if (SelectedItemBeforeFade == 99){
_uv1079(false);
} else {
level = levelFiller._op425(levelProtos._oq1295(SelectedItemBeforeFade));
renderer.LevelLink = level;
level.unqSite.causticAsset = renderer.causticAsset;
renderer._fp1966();
level.Animation.DeletedPieces.MaxPieces = renderer.MaxPieces;
level.Animation.DeletedPieces.MaxWoodPieces = renderer.MaxWoodPieces;
if (level.LevelProto.LevelId == 0){
_ca28(0);
} else {
_gm1976();
};
};
};
};
if (ActiveMode == ActiveMode_Level_In){
level.Animation._dp806();
if (renderer.LevelFadeRender._mr1693()){
_vh973();
};
};
if (ActiveMode == ActiveMode_Level_Out){
level.Animation._dp806();
if (renderer.LevelFadeRender._mr1693()){
if (renderer.LevelFadeRender.isFadeOutWin){
_ar1049();
} else {
if (NeedExitToMainMenu){
_uv1079(true);
} else {
_wq1851(true);
};
};
};
};
if (ActiveMode == ActiveMode_AfterLvl_In){
if (renderer.afterLevelRender._mr1693()){
_gj1402();
};
};
if (ActiveMode == ActiveMode_AfterLvl_Out){
if (renderer.afterLevelRender._mr1693()){
_wq1851(true);
};
};
if (ActiveMode == ActiveMode_InGameMenu_In){
if (renderer.InGameMenuRender._mr1693()){
_rn1496();
};
};
if (ActiveMode == ActiveMode_InGameMenu_Out){
if (renderer.InGameMenuRender._mr1693()){
if (level != null){
level.IsPause = false;
};
if (OptionsMenuReturn == ActiveMode_MainMenu){
_jc1661();
return;
};
if (OptionsMenuReturn == ActiveMode_SelectLvl){
_bi1689();
return;
};
if (OptionsMenuReturn == ActiveMode_AfterLvl){
_gj1402();
return;
};
if (OptionsMenuReturn == ActiveMode_Help){
_ka633();
return;
};
if (OptionsMenuReturn == ActiveMode_Message){
_ce1575();
return;
};
if (OptionsMenuReturn == ActiveMode_Scores){
_tm81();
return;
};
if (OptionsMenuReturn == ActiveMode_Credits){
_ip1015();
return;
};
if (NeedExitToMainMenu){
_lr1600(false, true);
} else {
_vh973();
};
};
};
if (ActiveMode == ActiveMode_Help_In){
if (renderer.HelpRender._mr1693()){
_ka633();
};
};
if (ActiveMode == ActiveMode_Help_Out){
if (renderer.HelpRender._mr1693()){
_uv1079(false);
};
};
if (ActiveMode == ActiveMode_Message_In){
if (renderer.MessageRender._mr1693()){
_ce1575();
};
};
if (ActiveMode == ActiveMode_Message_Out){
if (renderer.MessageRender._mr1693()){
renderer.MessageRender._ps74(renderer);
if (renderer.MessageRender.IsIntroMsg){
_gm1976();
} else {
level.IsPause = false;
_vh973();
};
};
};
if (ActiveMode == ActiveMode_Scores_In){
if (renderer.ScoresRender._mr1693()){
_tm81();
};
};
if (ActiveMode == ActiveMode_Scores_Out){
if (renderer.ScoresRender._mr1693()){
if (renderer.ScoresRender.isWasSubmit){
_gj1402();
} else {
_uv1079(false);
};
};
};
if (ActiveMode == ActiveMode_Credits_In){
if (renderer.CreditsRender._mr1693()){
_ip1015();
};
};
if (ActiveMode == ActiveMode_Credits_Out){
if (renderer.CreditsRender._mr1693()){
_uv1079(false);
};
};
renderer.CursorPos.x = mouseX;
renderer.CursorPos.y = mouseY;
renderer._dt2001();
}
private function _qi322(_arg1:MouseEvent, _arg2:Boolean):Boolean{
var _local3:Boolean;
var _local4 = -1;
_local4 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "inLvlButton", -1);
if (_local4 == 0){
if (level != null){
level.IsPause = true;
};
TGlobalVars.SoundPlayer._cl1179();
OptionsMenuReturn = ActiveMode;
_su1233(_arg2);
_local3 = true;
};
return (_local3);
}
public function _ep382(_arg1:MouseEvent):void{
var _local3:Rectangle;
var _local2 = -1;
if (king_logo_rc.contains(_arg1.stageX, _arg1.stageY)){
KingAPI.openSignLink();
};
if (ActiveMode == ActiveMode_Level){
if (_qi322(_arg1, true)){
return;
};
};
if (ActiveMode == ActiveMode_Help){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "help", -1);
if (_local2 >= 0){
TGlobalVars.SoundPlayer._cl1179();
_xj501();
return;
};
if (_qi322(_arg1, false)){
return;
};
};
if (ActiveMode == ActiveMode_Credits){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "credits", -1);
if (_local2 >= 0){
TGlobalVars.SoundPlayer._cl1179();
_af960();
return;
};
if (_qi322(_arg1, false)){
return;
};
};
if (ActiveMode == ActiveMode_Scores){
if (renderer.ScoresRender.isSubmit){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "scoresSubmit", -1);
if (_local2 == 0){
if (renderer.ScoresRender._cc1745()){
TGlobalVars.SoundPlayer._cl1179();
renderer.ScoresRender._yj1643();
return;
};
};
if (_local2 == 1){
TGlobalVars.SoundPlayer._cl1179();
renderer.ScoresRender._jk1000();
return;
};
} else {
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "scores", -1);
if (_local2 == 0){
TGlobalVars.SoundPlayer._cl1179();
_tp1212();
return;
};
if (_local2 == 1){
renderer.ScoresRender._qr755();
return;
};
if (_local2 == 2){
renderer.ScoresRender._an1404();
return;
};
if (_qi322(_arg1, false)){
return;
};
};
};
if (ActiveMode == ActiveMode_InGameMenu){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "InGameMenu", -1);
if (_local2 == 20){
TGlobalVars.SoundPlayer._cl1179();
_wn978(true);
};
if ((((_local2 == 30)) || ((_local2 == 40)))){
TGlobalVars.SoundPlayer._cl1179();
_wn978(false);
};
_local3 = new Rectangle();
_local3.x = 442;
_local3.y = 235;
_local3.width = 14;
_local3.height = 14;
if (_local3.contains(_arg1.stageX, _arg1.stageY)){
TGlobalVars.SoundPlayer._cl1179();
_un267();
};
_local3.x = 442;
_local3.y = 261;
_local3.width = 14;
_local3.height = 14;
if (_local3.contains(_arg1.stageX, _arg1.stageY)){
TGlobalVars.SoundPlayer._cl1179();
_ap465();
};
_local3.x = 442;
_local3.y = 306;
_local3.width = 14;
_local3.height = 14;
if (_local3.contains(_arg1.stageX, _arg1.stageY)){
TGlobalVars.SoundPlayer._cl1179();
_lh1923();
};
_local3.x = 442;
_local3.y = 326;
_local3.width = 14;
_local3.height = 14;
if (_local3.contains(_arg1.stageX, _arg1.stageY)){
TGlobalVars.SoundPlayer._cl1179();
_sc1295();
};
_local3.x = 442;
_local3.y = 346;
_local3.width = 14;
_local3.height = 14;
if (_local3.contains(_arg1.stageX, _arg1.stageY)){
TGlobalVars.SoundPlayer._cl1179();
_sx1526();
};
return;
};
if (ActiveMode == ActiveMode_SelectLvl){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "selLvl", TGlobalVars.CurrentMaxLevel);
if (_local2 >= 0){
SelectedItemBeforeFade = _local2;
TGlobalVars.SoundPlayer._cl1179();
_ps75(!((_local2 == 99)));
return;
};
if (_qi322(_arg1, false)){
return;
};
};
if (ActiveMode == ActiveMode_MainMenu){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "mMenu", -1);
if (_local2 == 2){
KingAPI.openHighscoresLink();
return;
};
if (_local2 == 4){
KingAPI.openOtherGamesLink();
return;
};
if (_local2 == 5){
KingAPI.openAddToWebsiteLink();
return;
};
if (_local2 >= 0){
SelectedItemBeforeFade = _local2;
TGlobalVars.SoundPlayer._cl1179();
_qu204();
return;
};
if (_qi322(_arg1, false)){
return;
};
};
if ((((ActiveMode == ActiveMode_AfterLvl)) || ((ActiveMode == ActiveMode_AfterLvl_In)))){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "afterLvl", -1);
if (king_af_logo_rc.contains(_arg1.stageX, _arg1.stageY)){
KingAPI.openSignLink();
};
if (_local2 == 0){
TGlobalVars.SoundPlayer._cl1179();
_qv1986();
return;
};
if (_local2 == 1){
KingAPI.submitScore(TGlobalVars.RealTotalScore);
return;
};
if (_local2 == 2){
KingAPI.openOtherGamesLink();
return;
};
};
if (ActiveMode == ActiveMode_AfterLvl){
if (_qi322(_arg1, false)){
return;
};
};
if (ActiveMode == ActiveMode_Message){
_local2 = renderer.buttonRenderer._dm1611(new Point(_arg1.stageX, _arg1.stageY), "MessageBt", -1);
if (_local2 >= 0){
_cy2028();
};
if (_qi322(_arg1, false)){
return;
};
};
}
private function _vn1517(_arg1:MouseEvent):void{
if (ActiveMode != ActiveMode_Level){
return;
};
if (level.IsPause){
return;
};
level._nb941(new Point(_arg1.stageX, _arg1.stageY));
}
private function _ip1657(_arg1:MouseEvent):void{
if (ActiveMode != ActiveMode_Level){
return;
};
if (level.IsPause){
return;
};
level._nb941(new Point(_arg1.stageX, _arg1.stageY));
}
private function _vn32(_arg1:MouseEvent):void{
if (ActiveMode != ActiveMode_Level){
return;
};
if (level.IsPause){
return;
};
if (_arg1.buttonDown){
level._nb941(new Point(_arg1.stageX, _arg1.stageY));
};
}
private function _vh973():void{
ActiveMode = ActiveMode_Level;
renderer.ModeRender = renderer.ModeRender_Level;
borderBmp.visible = true;
}
private function _jc1661():void{
ActiveMode = ActiveMode_MainMenu;
renderer.ModeRender = renderer.ModeRender_MainMenu;
borderBmp.visible = false;
renderer.mainMenuRender._ml173(renderer.buttonRenderer);
}
private function _bi1689():void{
ActiveMode = ActiveMode_SelectLvl;
renderer.ModeRender = renderer.ModeRender_SelectLvl;
borderBmp.visible = false;
renderer.selectLevelRender._ml173(renderer.buttonRenderer);
}
private function _gj1402():void{
ActiveMode = ActiveMode_AfterLvl;
renderer.ModeRender = renderer.ModeRender_AfterLvl;
borderBmp.visible = false;
renderer.afterLevelRender._ml173(renderer.buttonRenderer);
}
private function _ar1049():void{
ActiveMode = ActiveMode_AfterLvl_In;
renderer.ModeRender = renderer.ModeRender_AfterLvl;
borderBmp.visible = false;
renderer.afterLevelRender._re1638(renderer);
}
private function _qv1986():void{
ActiveMode = ActiveMode_AfterLvl_Out;
renderer.ModeRender = renderer.ModeRender_AfterLvl;
borderBmp.visible = false;
renderer.afterLevelRender._ob1762(renderer);
}
private function _qu204():void{
ActiveMode = ActiveMode_MainMenu_Out;
renderer.ModeRender = renderer.ModeRender_MainMenu;
borderBmp.visible = false;
renderer.mainMenuRender._ob1762(renderer.buttonRenderer);
}
private function _uv1079(_arg1:Boolean):void{
ActiveMode = ActiveMode_MainMenu_In;
renderer.ModeRender = renderer.ModeRender_MainMenu;
borderBmp.visible = false;
renderer.mainMenuRender._re1638(renderer.buttonRenderer);
renderer.mainMenuRender.NeedMoveName = _arg1;
}
private function _ps75(_arg1:Boolean):void{
TGlobalVars.SoundPlayer._kt1682();
ActiveMode = ActiveMode_SelectLvl_Out;
renderer.ModeRender = renderer.ModeRender_SelectLvl;
borderBmp.visible = false;
renderer.selectLevelRender._ob1762(renderer.buttonRenderer, _arg1);
}
private function _wq1851(_arg1:Boolean):void{
TGlobalVars.SoundPlayer._vl634();
ActiveMode = ActiveMode_SelectLvl_In;
renderer.ModeRender = renderer.ModeRender_SelectLvl;
borderBmp.visible = false;
renderer.selectLevelRender._re1638(renderer.buttonRenderer, _arg1);
}
private function _gm1976():void{
level.IsPause = false;
ActiveMode = ActiveMode_Level_In;
renderer.ModeRender = renderer.ModeRender_LevelFade;
borderBmp.visible = false;
renderer.LevelFadeRender._re1638(renderer);
TGlobalVars.SoundPlayer._pr1850();
}
private function _lr1600(_arg1:Boolean, _arg2:Boolean):void{
NeedExitToMainMenu = _arg2;
ActiveMode = ActiveMode_Level_Out;
renderer.ModeRender = renderer.ModeRender_LevelFade;
borderBmp.visible = false;
renderer.LevelFadeRender._ob1762(renderer, _arg1, _arg2);
TGlobalVars.SoundPlayer._tw669();
}
private function _rn1496():void{
ActiveMode = ActiveMode_InGameMenu;
renderer.ModeRender = renderer.ModeRender_InGameMenu;
renderer.InGameMenuRender._ml173();
}
private function _su1233(_arg1:Boolean):void{
ActiveMode = ActiveMode_InGameMenu_In;
renderer.ModeRender = renderer.ModeRender_InGameMenu;
renderer.InGameMenuRender._re1638(renderer, _arg1);
}
private function _wn978(_arg1:Boolean):void{
NeedExitToMainMenu = _arg1;
ActiveMode = ActiveMode_InGameMenu_Out;
renderer.ModeRender = renderer.ModeRender_InGameMenu;
renderer.InGameMenuRender._ob1762();
}
private function _ka633():void{
ActiveMode = ActiveMode_Help;
renderer.ModeRender = renderer.ModeRender_Help;
renderer.HelpRender._ml173(renderer);
}
private function _fk1611():void{
ActiveMode = ActiveMode_Help_In;
renderer.ModeRender = renderer.ModeRender_Help;
renderer.HelpRender._re1638(renderer);
}
private function _xj501():void{
ActiveMode = ActiveMode_Help_Out;
renderer.ModeRender = renderer.ModeRender_Help;
renderer.HelpRender._ob1762(renderer);
}
private function _ce1575():void{
ActiveMode = ActiveMode_Message;
renderer.ModeRender = renderer.ModeRender_Message;
renderer.MessageRender._ml173(renderer);
}
private function _ca28(_arg1:int):void{
ActiveMode = ActiveMode_Message_In;
renderer.ModeRender = renderer.ModeRender_Message;
renderer.MessageRender._re1638(renderer, _arg1);
}
private function _cy2028():void{
ActiveMode = ActiveMode_Message_Out;
renderer.ModeRender = renderer.ModeRender_Message;
renderer.MessageRender._ob1762(renderer);
}
private function _tm81():void{
ActiveMode = ActiveMode_Scores;
renderer.ModeRender = renderer.ModeRender_Scores;
renderer.ScoresRender._ml173(renderer);
}
private function _yi1605(_arg1:Boolean):void{
ActiveMode = ActiveMode_Scores_In;
renderer.ModeRender = renderer.ModeRender_Scores;
renderer.ScoresRender._re1638(renderer, _arg1);
}
private function _tp1212():void{
ActiveMode = ActiveMode_Scores_Out;
renderer.ModeRender = renderer.ModeRender_Scores;
renderer.ScoresRender._ob1762(renderer);
}
private function _ip1015():void{
ActiveMode = ActiveMode_Credits;
renderer.ModeRender = renderer.ModeRender_Credits;
renderer.CreditsRender._ml173(renderer);
}
private function _ly838():void{
ActiveMode = ActiveMode_Credits_In;
renderer.ModeRender = renderer.ModeRender_Credits;
renderer.CreditsRender._re1638(renderer);
}
private function _af960():void{
ActiveMode = ActiveMode_Credits_Out;
renderer.ModeRender = renderer.ModeRender_Credits;
renderer.CreditsRender._ob1762(renderer);
}
private function _yo309(_arg1:KeyboardEvent):void{
if (ActiveMode == ActiveMode_Level){
if (_arg1.keyCode == "D".charCodeAt()){
};
};
}
private function _un267():void{
TGlobalVars.IsSoundOn = !(TGlobalVars.IsSoundOn);
}
private function _ap465():void{
TGlobalVars.IsMusicOn = !(TGlobalVars.IsMusicOn);
if (TGlobalVars.IsMusicOn){
TGlobalVars.SoundPlayer._au493();
} else {
TGlobalVars.SoundPlayer._ji1570();
};
}
private function _lh1923():void{
stage.quality = StageQuality.HIGH;
}
private function _sc1295():void{
stage.quality = StageQuality.MEDIUM;
}
private function _sx1526():void{
stage.quality = StageQuality.LOW;
}
}
}//package
Section 233
//mcDragon (mcDragon)
package {
import flash.display.*;
public dynamic class mcDragon extends MovieClip {
}
}//package
Section 234
//mcGlimmer (mcGlimmer)
package {
import flash.display.*;
public dynamic class mcGlimmer extends MovieClip {
}
}//package
Section 235
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 236
//sfxBell (sfxBell)
package {
import flash.media.*;
public dynamic class sfxBell extends Sound {
}
}//package
Section 237
//spark (spark)
package {
import flash.display.*;
public dynamic class spark extends MovieClip {
public function spark(){
addFrameScript(22, _fn360);
}
function _fn360(){
gotoAndStop("loop");
}
}
}//package
Section 238
//TPreloader (TPreloader)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class TPreloader extends MovieClip {
private var king_spr:king_mc;// = null
public function TPreloader(){
this.stage.quality = StageQuality.BEST;
this.stage.scaleMode = StageScaleMode.SHOW_ALL;
king_spr = new king_mc();
addChild(king_spr);
this.addEventListener(Event.ENTER_FRAME, _pw303);
}
private function _pw303(_arg1:Event):void{
if (king_spr.currentFrame == 3){
this.removeChild(king_spr);
this.removeEventListener(Event.ENTER_FRAME, _pw303);
_xw135();
};
}
private function _xw135():void{
var _local2:Object;
var _local1:Class = Class(getDefinitionByName("match3_1"));
if (_local1){
_local2 = new (_local1);
addChild((_local2 as DisplayObject));
this.stage.scaleMode = StageScaleMode.SHOW_ALL;
};
}
}
}//package