Section 1
//Debug (com.hexagonstar.util.debug.Debug)
package com.hexagonstar.util.debug {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public final class Debug {
public static const LEVEL_WARN:int = 2;
public static const LEVEL_DEBUG:int = 0;
public static const LEVEL_INFO:int = 1;
public static const LEVEL_FATAL:int = 4;
public static const LEVEL_ERROR:int = 3;
private static var _stage:Stage;
private static var _filterLevel:int = 0;
private static var _isEnabled:Boolean = true;
private static var _isConnected:Boolean = false;
private static var _isPollingFPS:Boolean = false;
private static var _stopWatch:StopWatch;
private static var _connection:LocalConnection;
private static var _fpsMeter:FPSMeter;
public static function forceGC():void{
try {
} catch(e1:Error) {
try {
new LocalConnection().connect("forceGC");
new LocalConnection().connect("forceGC");
} catch(e2:Error) {
};
};
}
private static function send(_arg1:String, _arg2, _arg3:int=1, _arg4:int=0):void{
var _local5:Number;
var _local6:ByteArray;
if (_isEnabled){
if (!_isConnected){
_isConnected = true;
_connection = new LocalConnection();
_connection.addEventListener(StatusEvent.STATUS, onStatus);
};
_local5 = 0;
if (typeof(_arg2) == "string"){
_local5 = String(_arg2).length;
} else {
if (typeof(_arg2) == "object"){
_local6 = new ByteArray();
_local6.writeObject(_arg2);
_local5 = _local6.length;
_local6 = null;
};
};
if (_local5 > 39000){
storeDataLSO(_arg1, _arg2);
_arg1 = "onLargeData";
_arg2 = null;
};
_connection.send("_alcon_lc", _arg1, _arg2, _arg3, _arg4, "");
};
}
public static function stop():void{
if (_fpsMeter){
_isPollingFPS = false;
_fpsMeter.stop();
_fpsMeter.removeEventListener(FPSMeter.FPS_UPDATE, onFPSUpdate);
_fpsMeter = null;
_stage = null;
};
}
public static function timerReset():void{
if (_stopWatch){
_stopWatch.reset();
};
}
private static function onFPSUpdate(_arg1:Event):void{
send("onFPS", ((((((_fpsMeter.fps + ",") + _stage.frameRate) + ",") + _fpsMeter.frt) + ",") + System.totalMemory));
}
public static function delimiter():void{
Debug.trace("[%DLT%]", 5);
}
public static function set enabled(_arg1:Boolean):void{
_isEnabled = _arg1;
}
public static function inspect(_arg1:Object):void{
send("onInspect", _arg1, 1, -1);
}
public static function timerStart(_arg1:String=""):void{
if (_isEnabled){
if (!_stopWatch){
_stopWatch = new StopWatch();
};
_stopWatch.start(_arg1);
};
}
public static function createCategory(_arg1:int, _arg2:String="", _arg3:uint=0, _arg4:uint=0xFFFF00):void{
send("onCategory", [_arg1, _arg2, _arg3, _arg4], 0, 0);
}
private static function storeDataLSO(_arg1:String, _arg2):void{
var sharedObject:SharedObject;
var flushResult:String;
var m = _arg1;
var d = _arg2;
sharedObject = SharedObject.getLocal("alcon", "/");
sharedObject.data["alconMethod"] = m;
sharedObject.data["alconData"] = d;
try {
flushResult = sharedObject.flush();
if (flushResult == SharedObjectFlushStatus.FLUSHED){
return;
};
} catch(e:Error) {
Security.showSettings(SecurityPanel.LOCAL_STORAGE);
};
}
public static function hexDump(_arg1:Object):void{
send("onHexDump", _arg1, 0, 0);
}
private static function onStatus(_arg1:StatusEvent):void{
}
public static function get enabled():Boolean{
return (_isEnabled);
}
public static function trace(... _args):void{
var _local2:int;
_local2 = ((_args[1] is int)) ? _args[1] : 1;
if ((((_local2 >= _filterLevel)) && ((_local2 < 7)))){
send("onData", _args[0], _local2, 0);
};
}
public static function timerToString():void{
if (_stopWatch){
Debug.trace(_stopWatch.toString());
};
}
public static function mark(_arg1:uint=0xFF00FF):void{
send("onMarker", _arg1, 1, -1);
}
public static function timerInSeconds():void{
if (_stopWatch){
Debug.trace((_stopWatch.timeInSeconds + "s"));
};
}
public static function set filterLevel(_arg1:int):void{
if ((((_arg1 >= 0)) && ((_arg1 < 5)))){
_filterLevel = _arg1;
};
}
public static function monitor(_arg1:Stage, _arg2:int=500):void{
if (_isPollingFPS){
Debug.stop();
};
if (((_isEnabled) && (!(_fpsMeter)))){
_isPollingFPS = true;
_stage = _arg1;
sendCapabilities();
_fpsMeter = new FPSMeter(_stage, _arg2);
_fpsMeter.addEventListener(FPSMeter.FPS_UPDATE, onFPSUpdate);
_fpsMeter.start();
};
}
public static function time():void{
Debug.trace("[%TME%]", 5);
}
private static function sendCapabilities():void{
var _local1:XML;
var _local2:Array;
var _local3:XML;
var _local4:String;
_local1 = describeType(Capabilities);
_local2 = [];
for each (_local3 in _local1.*) {
_local4 = _local3.@name.toString();
if ((((((_local4.length > 0)) && (!((_local4 == "_internal"))))) && (!((_local4 == "prototype"))))){
_local2.push({p:_local4, v:Capabilities[_local4].toString()});
};
};
_local2.sortOn(["p"], Array.CASEINSENSITIVE);
send("onCap", _local2);
}
public static function clear():void{
Debug.trace("[%CLR%]", 5);
}
public static function timerStop():void{
if (_stopWatch){
_stopWatch.stop();
};
}
public static function timerInMilliSeconds():void{
if (_stopWatch){
Debug.trace((_stopWatch.timeInMilliSeconds + "ms"));
};
}
public static function get filterLevel():int{
return (_filterLevel);
}
public static function traceObj(_arg1:Object, _arg2:int=64, _arg3:int=1):void{
if ((((_arg3 >= _filterLevel)) && ((_arg3 < 7)))){
send("onData", _arg1, _arg3, _arg2);
};
}
public static function timerStopToString(_arg1:Boolean=false):void{
if (_stopWatch){
_stopWatch.stop();
Debug.trace(_stopWatch.toString());
if (_arg1){
_stopWatch.reset();
};
};
}
public static function pause():void{
Debug.trace("[%PSE%]", 5);
}
}
}//package com.hexagonstar.util.debug
Section 2
//FPSMeter (com.hexagonstar.util.debug.FPSMeter)
package com.hexagonstar.util.debug {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class FPSMeter extends EventDispatcher {
private var _pollInterval:int;
private var _delay:int;
private var _ms:int;
private var _delayMax:int;// = 10
private var _prev:int;
private var _timer:Timer;
private var _frt:int;
private var _fps:int;
private var _isRunning:Boolean;
private var _stage:Stage;
public static const FPS_UPDATE:String = "fpsUpdate";
public function FPSMeter(_arg1:Stage, _arg2:int=500){
_delayMax = 10;
super();
_stage = _arg1;
_pollInterval = _arg2;
reset();
}
public function stop():void{
if (_isRunning){
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, onTimer);
_stage.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
_timer = null;
reset();
};
}
public function reset():void{
_fps = 0;
_frt = 0;
_ms = 0;
_delay = 0;
_prev = 0;
_isRunning = false;
}
private function onTimer(_arg1:TimerEvent):void{
dispatchEvent(new Event(FPSMeter.FPS_UPDATE));
}
private function onEnterFrame(_arg1:Event):void{
var _local2:Number;
_local2 = getTimer();
_delay++;
if (_delay >= _delayMax){
_delay = 0;
_fps = int(((1000 * _delayMax) / (_local2 - _prev)));
_prev = _local2;
};
_frt = (_local2 - _ms);
_ms = _local2;
}
public function get frt():int{
return (_frt);
}
public function get fps():int{
return (_fps);
}
public function start():void{
if (!_isRunning){
_isRunning = true;
_timer = new Timer(_pollInterval, 0);
_timer.addEventListener(TimerEvent.TIMER, onTimer);
_stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
_timer.start();
};
}
}
}//package com.hexagonstar.util.debug
Section 3
//StopWatch (com.hexagonstar.util.debug.StopWatch)
package com.hexagonstar.util.debug {
import flash.utils.*;
public class StopWatch {
private var _started:Boolean;// = false
private var _stopTimeKeys:Array;
private var _startTimeKeys:Array;
private var _title:String;
public function StopWatch(){
_started = false;
super();
reset();
}
public function get timeInMilliSeconds():int{
var _local1:int;
var _local2:int;
if (_started){
_stopTimeKeys[(_startTimeKeys.length - 1)] = getTimer();
};
_local1 = 0;
_local2 = 0;
while (_local2 < _startTimeKeys.length) {
_local1 = (_local1 + (_stopTimeKeys[_local2] - _startTimeKeys[_local2]));
_local2++;
};
return (_local1);
}
public function toString():String{
var _local1:String;
var _local2:int;
var _local3:int;
var _local4:int;
_local1 = "\n ********************* [STOPWATCH] *********************";
if (_title != ""){
_local1 = (_local1 + ("\n * " + _title));
};
_local2 = 0;
while (_local2 < _startTimeKeys.length) {
_local3 = _startTimeKeys[_local2];
_local4 = _stopTimeKeys[_local2];
_local1 = (_local1 + (((((("\n * started [" + format(_local3)) + "ms] stopped [") + format(_local4)) + "ms] time [") + format((_local4 - _local3))) + "ms]"));
_local2++;
};
if (_local2 == 0){
_local1 = (_local1 + "\n * never started.");
} else {
_local1 = (_local1 + (("\n * total runnning time: " + timeInSeconds) + "s"));
};
_local1 = (_local1 + "\n *******************************************************");
return (_local1);
}
public function get timeInSeconds():Number{
return ((timeInMilliSeconds / 1000));
}
public function get started():Boolean{
return (_started);
}
public function start(_arg1:String=""):void{
if (!_started){
_title = _arg1;
_started = true;
_startTimeKeys.push(getTimer());
};
}
public function reset():void{
_startTimeKeys = [];
_stopTimeKeys = [];
_started = false;
}
private function format(_arg1:int):String{
var _local2:String;
var _local3:int;
var _local4:int;
_local2 = "";
_local3 = _arg1.toString().length;
_local4 = 0;
while (_local4 < (5 - _local3)) {
_local2 = (_local2 + "0");
_local4++;
};
return ((_local2 + _arg1));
}
public function stop():void{
var _local1:int;
if (_started){
_local1 = getTimer();
_stopTimeKeys[(_startTimeKeys.length - 1)] = _local1;
_started = false;
};
}
}
}//package com.hexagonstar.util.debug
Section 4
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("3.0 as3");
}
public static function showClickAwayAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:1, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
var sendHostProgress:Boolean;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:1, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
var _local1:Object = this.parent._mochiad_ctr;
var _local2:Number = (getTimer() - this.started);
var _local3:Boolean;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
var idx:Number = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var clip:Object;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
var DEFAULTS:Object = {server:"http://", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
var depth:Number = options.depth;
delete options.depth;
var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth);
var wh:Array = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
var lv:URLVariables = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local6:Array;
var _local3:Object = _arg2.getBounds(_arg2.root);
var _local4:Number = 0;
var _local5:Number = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array = _arg2.split(".");
var _local4:Number = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array = _arg2.split(".");
var _local5:Number = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var clip:Object;
var mc:MovieClip;
var chk:MovieClip;
var complete:Boolean;
var unloaded:Boolean;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
var DEFAULTS:Object = {ad_timeout:1, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:true, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
var ad_msec:Number = 11000;
var ad_timeout:Number = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time:Number = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
var fn:Function = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
var wh:Array = MochiAd._getRes(options, clip);
var w:Number = wh[0];
var h:Number = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
var bar_color:Number = options.color;
delete options.color;
var bar_background:Number = options.background;
delete options.background;
var bar_outline:Number = options.outline;
delete options.outline;
var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1);
var backing:Object = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2);
var inside:Object = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3);
var outline:Object = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
var f:Function = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
var _local1:Object = this.parent.parent.root;
var _local2:Object = this.parent._mochiad_ctr;
var _local3:Number = (getTimer() - this.started);
var _local4:Boolean;
var _local5:Number = _local1.loaderInfo.bytesTotal;
var _local6:Number = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
var _local7:Number = ((100 * _local6) / _local5);
var _local8:Number = ((100 * _local3) / chk.ad_msec);
var _local9:Object = this._mochiad_bar._inside;
var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var mc = _arg1;
var f:Function = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 5
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 6
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 7
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 8
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.0.0.0";
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 9
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 10
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 11
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 12
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 13
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 14
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 15
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 16
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 17
//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 18
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 19
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 20
//Achievement (Achievement)
package {
public class Achievement {
private var unlocked:Boolean;
private var achievementName:String;
private var achievementId:Number;
private var achievementDescription:String;
private var gimmesEarned:Number;
public function Achievement(_arg1:Number, _arg2:String, _arg3:String, _arg4:Number, _arg5:Boolean){
this.achievementId = _arg1;
this.achievementName = _arg2;
this.achievementDescription = _arg3;
this.gimmesEarned = _arg4;
this.unlocked = _arg5;
}
public function toString():String{
return ((((((((((("[" + getAchievementId()) + ",") + getAchievementName()) + ",") + getAchievementDescription()) + ",") + getGimmesEarned()) + ",") + getUnlocked()) + "]"));
}
public function getAchievementName():String{
return (achievementName);
}
public function setUnlocked(_arg1:Boolean):void{
this.unlocked = _arg1;
}
public function getAchievementId():Number{
return (achievementId);
}
public function getAchievementDescription():String{
return (achievementDescription);
}
public function getUnlocked():Boolean{
return (unlocked);
}
public function getGimmesEarned():Number{
return (gimmesEarned);
}
}
}//package
Section 21
//Achievements (Achievements)
package {
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class Achievements {
public var callback:Function;
private var loggedIn:Boolean;
private var roomsComplete:int;
private var achievements:Dictionary;
private var g5fa:G5FeaturesAchievements;
private var progress:Dictionary;
private var levels:Dictionary;
private var totalTime:int;
public var userName:String;
private static const ROOMS_COMPLETE:int = 3;
private static const ARROW_LEVEL_COMPLETE:int = 2;
private static const SPEED_RUN:int = 4;
private static const TREASURE_COLLECTED:int = 0;
private static const SWITCHES_HIT:int = 1;
private static var switchImage:Class = Achievements_switchImage;
private static var gimmesIcon:Class = Achievements_gimmesIcon;
private static var trophyImage:Class = Achievements_trophyImage;
private static var backgroundImage:Class = Achievements_backgroundImage;
private static var arrowImage:Class = Achievements_arrowImage;
private static var timerImage:Class = Achievements_timerImage;
private static var achievementBox:Class = Achievements_achievementBox;
private static var textImage:Class = Achievements_textImage;
private static var treasureImage:Class = Achievements_treasureImage;
public function Achievements(){
var _local2:Object;
var _local3:*;
super();
levels = new Dictionary();
progress = new Dictionary();
progress[TREASURE_COLLECTED] = 0;
progress[SWITCHES_HIT] = 0;
progress[ROOMS_COMPLETE] = 0;
progress[ARROW_LEVEL_COMPLETE] = false;
progress[SPEED_RUN] = 0;
achievements = new Dictionary();
var _local1:Array = [{id:TREASURE_COLLECTED, name:"Treasure Collector", desc:"Collect 20 pieces of treasure", icon:treasureImage, gimmes:5}, {id:SWITCHES_HIT, name:"Switch Hitter", desc:"Hit 10 switches", icon:switchImage, gimmes:10}, {id:ARROW_LEVEL_COMPLETE, name:"I Can Dodge Arrows", desc:"Complete the level \"Trapped\"", icon:arrowImage, gimmes:10}, {id:ROOMS_COMPLETE, name:"Black Gold", desc:"Complete all twenty rooms", icon:trophyImage, gimmes:10}, {id:SPEED_RUN, name:"Speedster", desc:"Complete all rooms with a combined best time of less than 30 minutes", icon:timerImage, gimmes:15}];
for each (_local2 in _local1) {
_local2.complete = false;
_local2.achieved = false;
achievements[_local2.id] = _local2;
};
roomsComplete = 0;
totalTime = 0;
g5fa = new G5FeaturesAchievements();
g5fa.initAPI(this, 124, false);
loggedIn = g5fa.isUserLoggedIn();
if (loggedIn){
g5fa.getFeaturesAchievements();
_local3 = g5fa.getG5User();
if (((!((_local3 == null))) && ((_local3 is Array)))){
userName = _local3[1];
};
};
}
public function get introMessage():String{
if (loggedIn){
if ((((userName == null)) || ((userName.length == 0)))){
return ("Welcome! You're logged in and ready to go!");
};
return ((("Welcome " + userName) + " - you're logged in and ready to go!"));
};
return ("Don't forget to log into Gimme5games.com where playing and earning achievements can get you Gimmes!");
}
private function calculateTime():void{
var _local1:Object;
totalTime = 0;
for each (_local1 in levels) {
if (_local1){
totalTime = (totalTime + _local1.time);
};
};
}
public function generateBox(_arg1:int):void{
var _local2:Object;
var _local3:Sprite;
var _local4:Bitmap;
var _local5:Bitmap;
var _local6:TextDisplay;
var _local7:TextDisplay;
var _local8:TextDisplay;
var _local9:TextDisplay;
if (callback != null){
_local2 = achievements[_arg1];
_local3 = new Sprite();
_local3.addChild(new achievementBox());
_local4 = new _local2.icon();
_local4.x = 13;
_local4.y = 12;
_local3.addChild(_local4);
_local5 = new gimmesIcon();
_local5.x = 296;
_local5.y = 7;
_local3.addChild(_local5);
_local6 = new TextDisplay("", TextFormatAlign.LEFT, 30, 30, 18, 0xFFFFFF, null, "_Berlin");
_local6.object = int(_local2.gimmes).toString();
_local6.x = 320;
_local6.y = 6;
_local3.addChild(_local6);
_local7 = new TextDisplay("", TextFormatAlign.CENTER, 200, 22, 18, 10449929);
_local7.object = "ACHIEVEMENT UNLOCKED";
_local7.x = 82;
_local7.y = 4;
_local3.addChild(_local7);
_local8 = new TextDisplay("", TextFormatAlign.CENTER, 248, 30, 21, 16108323);
_local8.object = _local2.name;
_local8.x = 82;
_local8.y = 25;
_local3.addChild(_local8);
_local9 = new TextDisplay("", TextFormatAlign.CENTER, 260, 40, 14, 0xBCBCBC);
_local9.object = _local2.desc;
_local9.x = 80;
_local9.y = 50;
_local3.addChild(_local9);
_local3.x = 59;
_local3.y = 332;
callback(_local3);
};
}
public function saveProgress():Array{
var _local2:Object;
var _local3:Object;
var _local1:Array = [];
for (_local2 in progress) {
_local3 = {name:int(_local2), value:progress[_local2]};
_local1.push(_local3);
};
return (_local1);
}
public function levelComplete(_arg1:Level):void{
var _local3:Tile;
progress[TREASURE_COLLECTED] = (int(progress[TREASURE_COLLECTED]) + _arg1.bribe);
var _local2:int;
for each (_local3 in _arg1.objects) {
if (_local3.type == Tile.TRIGGER){
_local2++;
};
};
progress[SWITCHES_HIT] = (int(progress[SWITCHES_HIT]) + _local2);
if (_arg1.name == "Room Ten"){
progress[ARROW_LEVEL_COMPLETE] = true;
};
if (((!(levels.hasOwnProperty(_arg1.name))) || ((levels[_arg1.name] == null)))){
levels[_arg1.name] = {time:_arg1.time};
roomsComplete++;
calculateTime();
} else {
if (levels[_arg1.name].time > _arg1.time){
levels[_arg1.name].time = _arg1.time;
calculateTime();
};
};
informAchievements();
}
public function unlockAchievement_Callback(_arg1:Number, _arg2:Number):void{
switch (_arg1){
case G5FeaturesAchievements.G5FA_SUCCESS:
achievements[int(_arg2)].complete = true;
achievements[int(_arg2)].achieved = true;
generateBox(int(_arg2));
break;
case G5FeaturesAchievements.G5FA_ALREADY_UNLOCKED:
achievements[int(_arg2)].complete = true;
achievements[int(_arg2)].achieved = true;
break;
case G5FeaturesAchievements.G5FA_INVALID_G5_USER:
loggedIn = false;
break;
default:
break;
};
}
public function loadProgress(_arg1:Array, _arg2:Array):void{
var _local3:Object;
totalTime = 0;
if (_arg2 != null){
for each (_local3 in _arg2) {
progress[int(_local3.name)] = _local3.value;
};
};
if (_arg1 != null){
for each (_local3 in _arg1) {
if (((_local3) && (_local3.defeated))){
if (_local3.name == "Room Ten"){
progress[ARROW_LEVEL_COMPLETE] = true;
};
levels[_local3.name] = {time:_local3.bestTime};
roomsComplete++;
} else {
if (_local3){
levels[_local3.name] = null;
};
};
};
calculateTime();
};
informAchievements();
}
public function getFeaturesAchievements_Callback(_arg1:Number, _arg2:Array, _arg3:Array):void{
var _local4:Object;
var _local5:int;
if (_arg1 == G5FeaturesAchievements.G5FA_SUCCESS){
for each (_local4 in _arg3) {
_local5 = int(_local4.getAchievementId());
if (_local4.getUnlocked()){
achievements[_local5].achieved = true;
achievements[_local5].complete = true;
};
};
};
}
public function get achievementScreen():Sprite{
var _local3:int;
var _local4:Object;
var _local5:Bitmap;
var _local6:TextDisplay;
var _local7:TextDisplay;
var _local8:Bitmap;
var _local9:TextDisplay;
var _local10:int;
var _local11:TextDisplay;
var _local1:Sprite = new Sprite();
_local1.addChild(new backgroundImage());
var _local2:TextDisplay = new TextDisplay("", TextFormatAlign.CENTER, 416, 34, 36, 0);
_local2.object = "ACHIEVEMENTS";
_local2.x = 0;
_local2.y = 8;
_local1.addChild(_local2);
if (loggedIn){
_local3 = 0;
for each (_local4 in achievements) {
if (_local4.achieved){
_local8 = new _local4.icon();
_local8.x = 359;
_local8.y = (49 + (_local3 * 57));
_local8.scaleX = (_local8.scaleX / 1.5);
_local8.scaleY = (_local8.scaleY / 1.5);
_local1.addChild(_local8);
} else {
_local9 = new TextDisplay("", TextFormatAlign.RIGHT, 80, 40, 22, 0);
switch (_local4.id){
case TREASURE_COLLECTED:
_local9.object = (progress[TREASURE_COLLECTED].toString() + "/20");
break;
case SWITCHES_HIT:
_local9.object = (progress[SWITCHES_HIT].toString() + "/10");
break;
case ARROW_LEVEL_COMPLETE:
_local9.object = "X";
break;
case ROOMS_COMPLETE:
_local9.object = (roomsComplete.toString() + "/20");
break;
case SPEED_RUN:
if (roomsComplete < 20){
_local9.object = "--:--";
} else {
_local10 = totalTime;
_local9.object = (((((((_local10)>=3600) ? (Math.floor((_local10 / 3600)) + ":") : "" + ((((_local10 % 3600) / 60) < 10)) ? "0" : "") + Math.floor(((_local10 % 3600) / 60))) + ":") + (((_local10 % 60) < 10)) ? "0" : "") + (_local10 % 60));
};
break;
default:
break;
};
_local9.x = 310;
_local9.y = (49 + (_local3 * 57));
_local1.addChild(_local9);
};
_local6 = new TextDisplay("", TextFormatAlign.LEFT, 240, 26, 23, 0);
_local6.object = _local4.name;
_local6.x = 35;
_local6.y = (48 + (_local3 * 57));
_local1.addChild(_local6);
_local7 = new TextDisplay("", TextFormatAlign.LEFT, 300, 60, 19, 0);
_local7.object = _local4.desc;
_local7.x = 35;
_local7.y = (75 + (_local3 * 57));
_local1.addChild(_local7);
_local3++;
};
_local5 = new textImage();
_local5.x = 140;
_local5.y = 355;
_local1.addChild(_local5);
} else {
_local11 = new TextDisplay("", TextFormatAlign.CENTER, 336, 200, 22, 0);
_local11.object = "You need to be playing at www.Gimme5games.com, be registered and be logged in to unlock achievements.";
_local11.x = 40;
_local11.y = 100;
_local1.addChild(_local11);
};
return (_local1);
}
private function informAchievements():void{
var _local2:int;
var _local1:Array = [];
if (progress[TREASURE_COLLECTED] >= 20){
_local1.push(TREASURE_COLLECTED);
};
if (progress[SWITCHES_HIT] >= 10){
_local1.push(SWITCHES_HIT);
};
if (((progress.hasOwnProperty(ARROW_LEVEL_COMPLETE)) && (progress[ARROW_LEVEL_COMPLETE]))){
_local1.push(ARROW_LEVEL_COMPLETE);
};
if (roomsComplete >= 20){
_local1.push(ROOMS_COMPLETE);
if (totalTime <= 1800){
_local1.push(SPEED_RUN);
};
};
for each (_local2 in _local1) {
achievements[_local2].achieved = true;
if (((loggedIn) && (!(achievements[_local2].complete)))){
g5fa.unlockAchievement(_local2);
};
};
}
}
}//package
Section 22
//Achievements_achievementBox (Achievements_achievementBox)
package {
import mx.core.*;
public class Achievements_achievementBox extends BitmapAsset {
}
}//package
Section 23
//Achievements_arrowImage (Achievements_arrowImage)
package {
import mx.core.*;
public class Achievements_arrowImage extends BitmapAsset {
}
}//package
Section 24
//Achievements_backgroundImage (Achievements_backgroundImage)
package {
import mx.core.*;
public class Achievements_backgroundImage extends BitmapAsset {
}
}//package
Section 25
//Achievements_gimmesIcon (Achievements_gimmesIcon)
package {
import mx.core.*;
public class Achievements_gimmesIcon extends BitmapAsset {
}
}//package
Section 26
//Achievements_switchImage (Achievements_switchImage)
package {
import mx.core.*;
public class Achievements_switchImage extends BitmapAsset {
}
}//package
Section 27
//Achievements_textImage (Achievements_textImage)
package {
import mx.core.*;
public class Achievements_textImage extends BitmapAsset {
}
}//package
Section 28
//Achievements_timerImage (Achievements_timerImage)
package {
import mx.core.*;
public class Achievements_timerImage extends BitmapAsset {
}
}//package
Section 29
//Achievements_treasureImage (Achievements_treasureImage)
package {
import mx.core.*;
public class Achievements_treasureImage extends BitmapAsset {
}
}//package
Section 30
//Achievements_trophyImage (Achievements_trophyImage)
package {
import mx.core.*;
public class Achievements_trophyImage extends BitmapAsset {
}
}//package
Section 31
//Base64 (Base64)
package {
import flash.utils.*;
public class Base64 {
public static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
public static function encode(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (encodeByteArray(_local2));
}
public static function decodeToByteArray(_arg1:String):ByteArray{
var _local6:uint;
var _local7:uint;
var _local2:ByteArray = new ByteArray();
var _local3:Array = new Array(4);
var _local4:Array = new Array(3);
var _local5:uint;
while (_local5 < _arg1.length) {
_local6 = 0;
while ((((_local6 < 4)) && (((_local5 + _local6) < _arg1.length)))) {
_local3[_local6] = BASE64_CHARS.indexOf(_arg1.charAt((_local5 + _local6)));
_local6++;
};
_local4[0] = ((_local3[0] << 2) + ((_local3[1] & 48) >> 4));
_local4[1] = (((_local3[1] & 15) << 4) + ((_local3[2] & 60) >> 2));
_local4[2] = (((_local3[2] & 3) << 6) + _local3[3]);
_local7 = 0;
while (_local7 < _local4.length) {
if (_local3[(_local7 + 1)] == 64){
break;
};
_local2.writeByte(_local4[_local7]);
_local7++;
};
_local5 = (_local5 + 4);
};
_local2.position = 0;
return (_local2);
}
public static function encodeByteArray(_arg1:ByteArray):String{
var _local3:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local2 = "";
var _local4:Array = new Array(4);
_arg1.position = 0;
while (_arg1.bytesAvailable > 0) {
_local3 = new Array();
_local5 = 0;
while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) {
_local3[_local5] = _arg1.readUnsignedByte();
_local5++;
};
_local4[0] = ((_local3[0] & 252) >> 2);
_local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4));
_local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6));
_local4[3] = (_local3[2] & 63);
_local6 = _local3.length;
while (_local6 < 3) {
_local4[(_local6 + 1)] = 64;
_local6++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7]));
_local7++;
};
};
return (_local2);
}
public static function decode(_arg1:String):String{
var _local2:ByteArray = decodeToByteArray(_arg1);
return (_local2.readUTFBytes(_local2.length));
}
}
}//package
Section 32
//CallbackButton (CallbackButton)
package {
import flash.events.*;
import flash.display.*;
public class CallbackButton extends SimpleButton {
private var data;
private var callback;
public function CallbackButton(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:DisplayObject, _arg4, _arg5){
super(_arg1, _arg2, _arg3, _arg2);
callback = _arg4;
data = _arg5;
addEventListener(MouseEvent.CLICK, onClick);
}
override public function set enabled(_arg1:Boolean):void{
if (((!(enabled)) && (_arg1))){
addEventListener(MouseEvent.CLICK, onClick);
useHandCursor = false;
} else {
if (((enabled) && (!(_arg1)))){
removeEventListener(MouseEvent.CLICK, onClick);
useHandCursor = true;
};
};
super.enabled = _arg1;
}
private function onClick(_arg1:MouseEvent):void{
callback(data);
}
public function cleanup():void{
removeEventListener(MouseEvent.CLICK, onClick);
}
}
}//package
Section 33
//Creature (Creature)
package {
public class Creature extends ObjectTile {
public var items:Array;
public var pushing:Boolean;
public var idle:Boolean;
public function Creature(_arg1:int, _arg2:RoomTile){
super(_arg1, _arg2);
blocks = true;
room.occupied = true;
pushing = false;
idle = false;
items = [];
switch (_arg1){
case ARROW:
items.push(new Tile(Tile.FLIPPERS, 0, 0));
blocks = false;
room.occupied = false;
break;
default:
break;
};
}
public function canMove(_arg1:int):Boolean{
var _local2:RoomTile = room.neighbor(_arg1);
return (((((((room.exit(_arg1)) && (_local2))) && (_local2.enter(_arg1)))) && (canMoveIntoRoom(_arg1, _local2))));
}
override public function canActivate(_arg1:int, _arg2:Array):Boolean{
var _local3:Boolean;
switch (type){
case Tile.BLOCK:
if ((((room.type == Tile.WATER)) && ((room.getObject(Tile.RAFT) == null)))){
_local3 = false;
} else {
_local3 = canMove(_arg1);
};
break;
};
return (_local3);
}
public function turnLeft():int{
var _local1:int = Level.NONE;
var _local2:int = ((state + 2) % 4);
var _local3:int;
while (_local3 < 4) {
_local2 = ((_local2 + 1) % 4);
if (canMove(_local2)){
_local1 = _local2;
break;
};
_local3++;
};
return (_local1);
}
public function moveForwardOrBounce():int{
var _local1:int = state;
if (!canMove(state)){
_local1 = ((_local1 + 2) % 4);
};
return (_local1);
}
override public function update():ObjectTile{
var _local3:ObjectTile;
var _local1:Boolean;
var _local2:int = Level.NONE;
if (!dead){
if (oldRoom == room){
if ((((((type == Tile.BLOCK)) && ((room.type == Tile.WATER)))) && ((room.getObject(Tile.RAFT) == null)))){
SoundManager.playSound(SoundManager.EFFECT, SoundManager.splashSound, 10);
room.type = Tile.FLOOR;
room.style++;
dead = true;
};
};
_local3 = super.update();
};
if (((dead) || ((moveTimeLeft > 0)))){
return (null);
};
var _local4 = -1;
var _local5:int = state;
if (_local1){
_local4 = 0;
_local2 = nextDirection();
};
if (((!((_local2 == Level.NONE))) && (move(_local2)))){
_local5 = _local2;
_local4 = (pushing) ? 2 : 1;
} else {
if (_local2 != Level.NONE){
_local4 = 2;
_local5 = _local2;
moveTimeLeft = Level.MOVE_DELTA;
if (type == Tile.ARROW){
SoundManager.playSound(SoundManager.EFFECT, SoundManager.hitSound, 3);
dead = true;
};
} else {
if (idle){
_local4 = 3;
};
};
};
pushing = false;
if (_local4 != style){
style = _local4;
};
if (_local5 != state){
state = _local5;
};
return (null);
}
override public function completeMove():void{
var _local1:ObjectTile;
var _local2:Boolean;
if (room == null){
return;
};
switch (room.type){
case Tile.WATER:
if (!useItem(Tile.FLIPPERS, -1, items)){
_local2 = (((room.getObject(Tile.BLOCK) == null)) && ((room.getObject(Tile.RAFT) == null)));
if (_local2){
style = 4;
SoundManager.playSound(SoundManager.EFFECT, SoundManager.delaySplashSound, 10);
};
};
break;
case Tile.FIRE:
if (!useItem(Tile.FIREPROOF, -1, items)){
_local2 = true;
style = 5;
};
break;
default:
break;
};
if (_local2){
dead = true;
};
if (((!(dead)) && ((((type == Tile.BLOCK)) || ((type == Tile.PLAYER)))))){
for each (_local1 in oldRoom.objects) {
if (_local1.type == Tile.TRIGGER){
_local1.deactivate(Level.NONE, []);
};
};
for each (_local1 in room.objects) {
if (_local1.type == Tile.TRIGGER){
_local1.activate(Level.NONE, []);
};
};
};
super.completeMove();
}
public function nextDirection():int{
var _local1:int = Level.NONE;
switch (type){
case Tile.ARROW:
_local1 = state;
break;
default:
break;
};
return (_local1);
}
override public function activate(_arg1:int, _arg2:Array):Boolean{
var _local3:Boolean;
switch (type){
case Tile.ARROW:
_dead = true;
break;
case Tile.BLOCK:
if ((((room.type == Tile.WATER)) && ((room.getObject(Tile.RAFT) == null)))){
_local3 = false;
} else {
super.update();
_local3 = move(_arg1);
if (_local3){
moveTimeLeft = (moveTimeLeft + Level.STEP_DELTA);
SoundManager.playSound(SoundManager.EFFECT, SoundManager.pushBlockSound, 1);
};
};
break;
default:
break;
};
return (_local3);
}
public function moveForward():int{
var _local1:int = state;
if (!canMove(state)){
_local1 = Level.NONE;
};
return (_local1);
}
override public function canMoveIntoRoom(_arg1:int, _arg2:RoomTile):Boolean{
return (!(_arg2.occupied));
}
public function turnRight():int{
var _local1:int = Level.NONE;
var _local2:int = ((state + 2) % 4);
var _local3:int;
while (_local3 < 4) {
_local2 = ((_local2 + 3) % 4);
if (canMove(_local2)){
_local1 = _local2;
break;
};
_local3++;
};
return (_local1);
}
}
}//package
Section 34
//DisplayTile (DisplayTile)
package {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class DisplayTile extends Bitmap {
public var nextX:int;
public var nextY:int;
private var yoffset:int;
private var updatePosition:Boolean;
public var removeListener:Function;
private var frameTime:uint;
public var step:uint;
public var currX:int;
public var currY:int;
public var tile:Tile;
private var currentFrame:int;
private var current;
private static var doorOpen2Image:Class = DisplayTile_doorOpen2Image;
private static var doorOpenOverlayImage:Class = DisplayTile_doorOpenOverlayImage;
private static var doorOpen2OverlayImage:Class = DisplayTile_doorOpen2OverlayImage;
private static var tileImages:Class = DisplayTile_tileImages;
public static var frameRate:int = 83;
public static var TileHeight:int = 32;
private static var objectImages:Class = DisplayTile_objectImages;
public static var TileWidth:int = 32;
private static var shadowImage:Class = DisplayTile_shadowImage;
private static var imageXML:XML = <assetSettings>
<sprite name="arrow_down">
<frame name="481"/>
</sprite>
<sprite name="arrow_left">
<frame name="482"/>
</sprite>
<sprite name="arrow_right">
<frame name="484"/>
</sprite>
<sprite name="arrow_trap_down">
<frame name="461"/>
</sprite>
<sprite name="arrow_trap_left">
<frame name="462"/>
</sprite>
<sprite name="arrow_trap_right">
<frame name="464"/>
</sprite>
<sprite name="arrow_trap_up">
<frame name="463"/>
</sprite>
<sprite name="arrow_up">
<frame name="483"/>
</sprite>
<sprite name="box">
<frame name="469"/>
</sprite>
<sprite name="ceiling_center">
<frame name="436"/>
</sprite>
<sprite name="ceiling_down">
<frame name="455"/>
</sprite>
<sprite name="ceiling_left_bottom">
<frame name="441"/>
</sprite>
<sprite name="ceiling_left_middle">
<frame name="454"/>
</sprite>
<sprite name="ceiling_left_top">
<frame name="457"/>
</sprite>
<sprite name="ceiling_lock_circle">
<frame name="429"/>
</sprite>
<sprite name="ceiling_lock_cross">
<frame name="432"/>
</sprite>
<sprite name="ceiling_lock_square">
<frame name="430"/>
</sprite>
<sprite name="ceiling_lock_triangle">
<frame name="431"/>
</sprite>
<sprite name="ceiling_normal">
<frame name="436"/>
</sprite>
<sprite name="ceiling_right_bottom">
<frame name="442"/>
</sprite>
<sprite name="ceiling_right_middle">
<frame name="456"/>
</sprite>
<sprite name="ceiling_right_top">
<frame name="444"/>
</sprite>
<sprite name="ceiling_up">
<frame name="453"/>
</sprite>
<sprite name="door_closed">
<frame name="426"/>
</sprite>
<sprite name="door_complete">
<frame name="476"/>
</sprite>
<sprite name="door_locked">
<frame name="475"/>
</sprite>
<sprite name="door_open">
<frame name="427"/>
</sprite>
<sprite name="door_unlocked">
<frame name="474"/>
</sprite>
<sprite name="empty">
<frame name="398"/>
</sprite>
<sprite name="floor_crate">
<frame name="394"/>
</sprite>
<sprite name="floor_jar">
<frame name="382"/>
</sprite>
<sprite name="floor_normal">
<frame name="377"/>
</sprite>
<sprite name="floor_rug_circles">
<frame name="395"/>
</sprite>
<sprite name="floor_rug_left">
<frame name="385"/>
</sprite>
<sprite name="floor_rug_right">
<frame name="384"/>
</sprite>
<sprite name="floor_rug_triangles">
<frame name="393"/>
</sprite>
<sprite name="floor_rug_up">
<frame name="383"/>
</sprite>
<sprite name="floor_vase">
<frame name="446"/>
</sprite>
<sprite name="floor_wax">
<frame name="390"/>
</sprite>
<sprite name="floor_weapons">
<frame name="381"/>
</sprite>
<sprite name="floor_window_shadow">
<frame name="439"/>
</sprite>
<sprite name="key_circle">
<frame name="465"/>
</sprite>
<sprite name="key_cross">
<frame name="468"/>
</sprite>
<sprite name="key_square">
<frame name="466"/>
</sprite>
<sprite name="key_triangle">
<frame name="467"/>
</sprite>
<sprite name="obelisk_bottom">
<frame name="411"/>
</sprite>
<sprite name="obelisk_top">
<frame name="428"/>
</sprite>
<sprite name="player_fall" frameRate="12">
<frame name="552"/>
<frame name="553"/>
<frame name="554"/>
<frame name="555"/>
<frame name="556"/>
<frame name="557"/>
<frame name="558"/>
<frame name="559"/>
<frame name="560"/>
<frame name="561"/>
<frame name="562"/>
<frame name="563"/>
<frame name="564"/>
<frame name="565"/>
<frame name="566"/>
<frame name="567"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
<frame name="577"/>
</sprite>
<sprite name="player_idle" frameRate="12">
<frame name="539"/>
<frame name="540"/>
<frame name="541"/>
<frame name="542"/>
<frame name="543"/>
<frame name="544"/>
<frame name="545"/>
<frame name="546"/>
<frame name="547"/>
<frame name="548"/>
<frame name="549"/>
<frame name="550"/>
<frame name="551"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
<frame name="539"/>
</sprite>
<sprite name="player_push_down" frameRate="12">
<frame name="525"/>
<frame name="526"/>
<frame name="527"/>
<frame name="528"/>
<frame name="529"/>
<frame name="530"/>
<frame name="531"/>
</sprite>
<sprite name="player_push_left" frameRate="12">
<frame name="532"/>
<frame name="533"/>
<frame name="534"/>
<frame name="535"/>
<frame name="536"/>
<frame name="537"/>
<frame name="538"/>
</sprite>
<sprite name="player_push_right" frameRate="12">
<frame name="518"/>
<frame name="519"/>
<frame name="520"/>
<frame name="521"/>
<frame name="522"/>
<frame name="523"/>
<frame name="524"/>
</sprite>
<sprite name="player_push_up" frameRate="12">
<frame name="512"/>
<frame name="513"/>
<frame name="514"/>
<frame name="515"/>
<frame name="516"/>
<frame name="517"/>
</sprite>
<sprite name="player_shot" frameRate="12">
<frame name="568"/>
<frame name="569"/>
<frame name="570"/>
<frame name="571"/>
<frame name="572"/>
<frame name="573"/>
<frame name="574"/>
<frame name="575"/>
<frame name="576"/>
<frame name="571"/>
<frame name="572"/>
<frame name="573"/>
<frame name="574"/>
<frame name="575"/>
<frame name="576"/>
<frame name="571"/>
<frame name="573"/>
<frame name="574"/>
<frame name="575"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
<frame name="576"/>
</sprite>
<sprite name="player_stand_down">
<frame name="505"/>
</sprite>
<sprite name="player_stand_left">
<frame name="510"/>
</sprite>
<sprite name="player_stand_right">
<frame name="497"/>
</sprite>
<sprite name="player_stand_up">
<frame name="490"/>
</sprite>
<sprite name="player_walk_down" frameRate="12">
<frame name="499"/>
<frame name="500"/>
<frame name="501"/>
<frame name="502"/>
<frame name="503"/>
<frame name="504"/>
<frame name="505"/>
</sprite>
<sprite name="player_walk_left" frameRate="12">
<frame name="510"/>
<frame name="507"/>
<frame name="506"/>
<frame name="507"/>
<frame name="508"/>
<frame name="509"/>
<frame name="510"/>
<frame name="507"/>
<frame name="506"/>
<frame name="507"/>
<frame name="510"/>
<frame name="509"/>
</sprite>
<sprite name="player_walk_right" frameRate="12">
<frame name="497"/>
<frame name="493"/>
<frame name="492"/>
<frame name="493"/>
<frame name="494"/>
<frame name="495"/>
<frame name="497"/>
<frame name="493"/>
<frame name="492"/>
<frame name="493"/>
<frame name="497"/>
<frame name="495"/>
</sprite>
<sprite name="player_walk_up" frameRate="12">
<frame name="485"/>
<frame name="486"/>
<frame name="487"/>
<frame name="488"/>
<frame name="489"/>
<frame name="490"/>
<frame name="491"/>
</sprite>
<sprite name="raft">
<frame name="473"/>
</sprite>
<sprite name="red_switch_down">
<frame name="480"/>
</sprite>
<sprite name="red_switch_up">
<frame name="479"/>
</sprite>
<sprite name="stairs_up_bottom">
<frame name="408"/>
</sprite>
<sprite name="switch_down">
<frame name="478"/>
</sprite>
<sprite name="switch_up">
<frame name="477"/>
</sprite>
<sprite name="treasure" frameRate="12">
<frame name="470"/>
<frame name="470"/>
<frame name="470"/>
<frame name="470"/>
<frame name="471"/>
<frame name="471"/>
<frame name="471"/>
<frame name="471"/>
<frame name="472"/>
<frame name="472"/>
<frame name="472"/>
<frame name="472"/>
<frame name="471"/>
<frame name="471"/>
<frame name="471"/>
<frame name="471"/>
</sprite>
<sprite name="wall_center">
<frame name="449"/>
</sprite>
<sprite name="wall_frame">
<frame name="437"/>
</sprite>
<sprite name="wall_high_center">
<frame name="452"/>
</sprite>
<sprite name="wall_high_left">
<frame name="450"/>
</sprite>
<sprite name="wall_high_right">
<frame name="451"/>
</sprite>
<sprite name="wall_jar">
<frame name="424"/>
</sprite>
<sprite name="wall_left">
<frame name="447"/>
</sprite>
<sprite name="wall_light">
<frame name="422"/>
</sprite>
<sprite name="wall_normal">
<frame name="414"/>
</sprite>
<sprite name="wall_picture">
<frame name="437"/>
</sprite>
<sprite name="wall_picture_center">
<frame name="434"/>
</sprite>
<sprite name="wall_picture_left">
<frame name="433"/>
</sprite>
<sprite name="wall_picture_right">
<frame name="435"/>
</sprite>
<sprite name="wall_right">
<frame name="448"/>
</sprite>
<sprite name="wall_shadow_all">
<frame name="420"/>
</sprite>
<sprite name="wall_shadow_down">
<frame name="418"/>
</sprite>
<sprite name="wall_shadow_up">
<frame name="419"/>
</sprite>
<sprite name="wall_sign">
<frame name="425"/>
</sprite>
<sprite name="wall_statue_bottom">
<frame name="445"/>
</sprite>
<sprite name="wall_vase">
<frame name="445"/>
</sprite>
<sprite name="wall_wax">
<frame name="391"/>
</sprite>
<sprite name="wall_weapons">
<frame name="423"/>
</sprite>
<sprite name="wall_window">
<frame name="438"/>
</sprite>
<sprite name="wall_window_2">
<frame name="437"/>
</sprite>
<sprite name="water">
<frame name="392"/>
</sprite>
<frame name="512" source="objects" cropX="96" cropY="352" cropWidth="32" cropHeight="32"/>
<frame name="513" source="objects" cropX="0" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="514" source="objects" cropX="32" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="515" source="objects" cropX="64" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="516" source="objects" cropX="96" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="517" source="objects" cropX="0" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="518" source="objects" cropX="32" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="519" source="objects" cropX="64" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="520" source="objects" cropX="96" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="521" source="objects" cropX="0" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="522" source="objects" cropX="32" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="523" source="objects" cropX="64" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="524" source="objects" cropX="96" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="525" source="objects" cropX="0" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="526" source="objects" cropX="32" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="527" source="objects" cropX="64" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="528" source="objects" cropX="96" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="529" source="objects" cropX="0" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="530" source="objects" cropX="32" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="531" source="objects" cropX="64" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="532" source="objects" cropX="96" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="533" source="objects" cropX="0" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="534" source="objects" cropX="32" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="535" source="objects" cropX="64" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="536" source="objects" cropX="96" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="537" source="objects" cropX="0" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="538" source="objects" cropX="32" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="539" source="objects" cropX="64" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="540" source="objects" cropX="96" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="541" source="objects" cropX="0" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="542" source="objects" cropX="32" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="543" source="objects" cropX="64" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="544" source="objects" cropX="96" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="545" source="objects" cropX="0" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="546" source="objects" cropX="32" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="547" source="objects" cropX="64" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="548" source="objects" cropX="96" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="549" source="objects" cropX="0" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="550" source="objects" cropX="32" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="551" source="objects" cropX="64" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="552" source="objects" cropX="96" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="553" source="objects" cropX="0" cropY="704" cropWidth="32" cropHeight="32"/>
<frame name="554" source="objects" cropX="32" cropY="704" cropWidth="32" cropHeight="32"/>
<frame name="555" source="objects" cropX="64" cropY="704" cropWidth="32" cropHeight="32"/>
<frame name="556" source="objects" cropX="96" cropY="704" cropWidth="32" cropHeight="32"/>
<frame name="557" source="objects" cropX="0" cropY="736" cropWidth="32" cropHeight="32"/>
<frame name="558" source="objects" cropX="32" cropY="736" cropWidth="32" cropHeight="32"/>
<frame name="559" source="objects" cropX="64" cropY="736" cropWidth="32" cropHeight="32"/>
<frame name="560" source="objects" cropX="96" cropY="736" cropWidth="32" cropHeight="32"/>
<frame name="561" source="objects" cropX="0" cropY="768" cropWidth="32" cropHeight="32"/>
<frame name="562" source="objects" cropX="32" cropY="768" cropWidth="32" cropHeight="32"/>
<frame name="563" source="objects" cropX="64" cropY="768" cropWidth="32" cropHeight="32"/>
<frame name="564" source="objects" cropX="96" cropY="768" cropWidth="32" cropHeight="32"/>
<frame name="565" source="objects" cropX="0" cropY="800" cropWidth="32" cropHeight="32"/>
<frame name="566" source="objects" cropX="32" cropY="800" cropWidth="32" cropHeight="32"/>
<frame name="567" source="objects" cropX="64" cropY="800" cropWidth="32" cropHeight="32"/>
<frame name="568" source="objects" cropX="96" cropY="800" cropWidth="32" cropHeight="32"/>
<frame name="569" source="objects" cropX="0" cropY="832" cropWidth="32" cropHeight="32"/>
<frame name="570" source="objects" cropX="32" cropY="832" cropWidth="32" cropHeight="32"/>
<frame name="571" source="objects" cropX="64" cropY="832" cropWidth="32" cropHeight="32"/>
<frame name="572" source="objects" cropX="96" cropY="832" cropWidth="32" cropHeight="32"/>
<frame name="573" source="objects" cropX="0" cropY="864" cropWidth="32" cropHeight="32"/>
<frame name="574" source="objects" cropX="32" cropY="864" cropWidth="32" cropHeight="32"/>
<frame name="575" source="objects" cropX="64" cropY="864" cropWidth="32" cropHeight="32"/>
<frame name="576" source="objects" cropX="96" cropY="864" cropWidth="32" cropHeight="32"/>
<frame name="577" source="objects" cropX="0" cropY="896" cropWidth="32" cropHeight="32"/>
<frame name="578" source="objects" cropX="32" cropY="896" cropWidth="32" cropHeight="32"/>
<frame name="579" source="objects" cropX="64" cropY="896" cropWidth="32" cropHeight="32"/>
<frame name="580" source="objects" cropX="96" cropY="896" cropWidth="32" cropHeight="32"/>
<frame name="581" source="objects" cropX="0" cropY="928" cropWidth="32" cropHeight="32"/>
<frame name="582" source="objects" cropX="32" cropY="928" cropWidth="32" cropHeight="32"/>
<frame name="583" source="objects" cropX="64" cropY="928" cropWidth="32" cropHeight="32"/>
<frame name="584" source="objects" cropX="96" cropY="928" cropWidth="32" cropHeight="32"/>
<frame name="585" source="objects" cropX="0" cropY="960" cropWidth="32" cropHeight="32"/>
<frame name="586" source="objects" cropX="32" cropY="960" cropWidth="32" cropHeight="32"/>
<frame name="587" source="objects" cropX="64" cropY="960" cropWidth="32" cropHeight="32"/>
<frame name="588" source="objects" cropX="96" cropY="960" cropWidth="32" cropHeight="32"/>
<frame name="589" source="objects" cropX="0" cropY="992" cropWidth="32" cropHeight="32"/>
<frame name="590" source="objects" cropX="32" cropY="992" cropWidth="32" cropHeight="32"/>
<frame name="591" source="objects" cropX="64" cropY="992" cropWidth="32" cropHeight="32"/>
<frame name="592" source="objects" cropX="96" cropY="992" cropWidth="32" cropHeight="32"/>
<frame name="377" source="tiles" cropX="0" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="378" source="tiles" cropX="32" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="379" source="tiles" cropX="64" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="380" source="tiles" cropX="96" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="381" source="tiles" cropX="0" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="382" source="tiles" cropX="32" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="383" source="tiles" cropX="64" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="384" source="tiles" cropX="96" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="385" source="tiles" cropX="0" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="386" source="tiles" cropX="32" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="387" source="tiles" cropX="64" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="388" source="tiles" cropX="96" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="389" source="tiles" cropX="0" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="390" source="tiles" cropX="32" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="391" source="tiles" cropX="64" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="392" source="tiles" cropX="96" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="393" source="tiles" cropX="0" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="394" source="tiles" cropX="32" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="395" source="tiles" cropX="64" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="396" source="tiles" cropX="96" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="397" source="tiles" cropX="0" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="398" source="tiles" cropX="32" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="399" source="tiles" cropX="64" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="400" source="tiles" cropX="96" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="401" source="tiles" cropX="0" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="402" source="tiles" cropX="32" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="403" source="tiles" cropX="64" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="404" source="tiles" cropX="96" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="405" source="tiles" cropX="0" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="406" source="tiles" cropX="32" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="407" source="tiles" cropX="64" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="408" source="tiles" cropX="96" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="409" source="tiles" cropX="0" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="410" source="tiles" cropX="32" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="411" source="tiles" cropX="64" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="412" source="tiles" cropX="96" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="413" source="tiles" cropX="0" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="414" source="tiles" cropX="32" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="415" source="tiles" cropX="64" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="416" source="tiles" cropX="96" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="417" source="tiles" cropX="0" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="418" source="tiles" cropX="32" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="419" source="tiles" cropX="64" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="420" source="tiles" cropX="96" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="421" source="tiles" cropX="0" cropY="352" cropWidth="32" cropHeight="32"/>
<frame name="422" source="tiles" cropX="32" cropY="352" cropWidth="32" cropHeight="32"/>
<frame name="423" source="tiles" cropX="64" cropY="352" cropWidth="32" cropHeight="32"/>
<frame name="424" source="tiles" cropX="96" cropY="352" cropWidth="32" cropHeight="32"/>
<frame name="425" source="tiles" cropX="0" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="426" source="tiles" cropX="32" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="427" source="tiles" cropX="64" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="428" source="tiles" cropX="96" cropY="384" cropWidth="32" cropHeight="32"/>
<frame name="429" source="tiles" cropX="0" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="430" source="tiles" cropX="32" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="431" source="tiles" cropX="64" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="432" source="tiles" cropX="96" cropY="416" cropWidth="32" cropHeight="32"/>
<frame name="433" source="tiles" cropX="0" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="434" source="tiles" cropX="32" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="435" source="tiles" cropX="64" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="436" source="tiles" cropX="96" cropY="448" cropWidth="32" cropHeight="32"/>
<frame name="437" source="tiles" cropX="0" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="438" source="tiles" cropX="32" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="439" source="tiles" cropX="64" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="440" source="tiles" cropX="96" cropY="480" cropWidth="32" cropHeight="32"/>
<frame name="441" source="tiles" cropX="0" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="442" source="tiles" cropX="32" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="443" source="tiles" cropX="64" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="444" source="tiles" cropX="96" cropY="512" cropWidth="32" cropHeight="32"/>
<frame name="445" source="tiles" cropX="0" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="446" source="tiles" cropX="32" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="447" source="tiles" cropX="64" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="448" source="tiles" cropX="96" cropY="544" cropWidth="32" cropHeight="32"/>
<frame name="449" source="tiles" cropX="0" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="450" source="tiles" cropX="32" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="451" source="tiles" cropX="64" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="452" source="tiles" cropX="96" cropY="576" cropWidth="32" cropHeight="32"/>
<frame name="453" source="tiles" cropX="0" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="454" source="tiles" cropX="32" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="455" source="tiles" cropX="64" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="456" source="tiles" cropX="96" cropY="608" cropWidth="32" cropHeight="32"/>
<frame name="457" source="tiles" cropX="0" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="458" source="tiles" cropX="32" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="459" source="tiles" cropX="64" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="460" source="tiles" cropX="96" cropY="640" cropWidth="32" cropHeight="32"/>
<frame name="461" source="tiles" cropX="0" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="462" source="tiles" cropX="32" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="463" source="tiles" cropX="64" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="464" source="tiles" cropX="96" cropY="672" cropWidth="32" cropHeight="32"/>
<frame name="465" source="objects" cropX="0" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="466" source="objects" cropX="32" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="467" source="objects" cropX="64" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="468" source="objects" cropX="96" cropY="0" cropWidth="32" cropHeight="32"/>
<frame name="469" source="objects" cropX="0" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="470" source="objects" cropX="32" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="471" source="objects" cropX="64" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="472" source="objects" cropX="96" cropY="32" cropWidth="32" cropHeight="32"/>
<frame name="473" source="objects" cropX="0" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="474" source="objects" cropX="32" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="475" source="objects" cropX="64" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="476" source="objects" cropX="96" cropY="64" cropWidth="32" cropHeight="32"/>
<frame name="477" source="objects" cropX="0" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="478" source="objects" cropX="32" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="479" source="objects" cropX="64" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="480" source="objects" cropX="96" cropY="96" cropWidth="32" cropHeight="32"/>
<frame name="481" source="objects" cropX="0" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="482" source="objects" cropX="32" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="483" source="objects" cropX="64" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="484" source="objects" cropX="96" cropY="128" cropWidth="32" cropHeight="32"/>
<frame name="485" source="objects" cropX="0" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="486" source="objects" cropX="32" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="487" source="objects" cropX="64" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="488" source="objects" cropX="96" cropY="160" cropWidth="32" cropHeight="32"/>
<frame name="489" source="objects" cropX="0" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="490" source="objects" cropX="32" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="491" source="objects" cropX="64" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="492" source="objects" cropX="96" cropY="192" cropWidth="32" cropHeight="32"/>
<frame name="493" source="objects" cropX="0" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="494" source="objects" cropX="32" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="495" source="objects" cropX="64" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="496" source="objects" cropX="96" cropY="224" cropWidth="32" cropHeight="32"/>
<frame name="497" source="objects" cropX="0" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="498" source="objects" cropX="32" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="499" source="objects" cropX="64" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="500" source="objects" cropX="96" cropY="256" cropWidth="32" cropHeight="32"/>
<frame name="501" source="objects" cropX="0" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="502" source="objects" cropX="32" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="503" source="objects" cropX="64" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="504" source="objects" cropX="96" cropY="288" cropWidth="32" cropHeight="32"/>
<frame name="505" source="objects" cropX="0" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="506" source="objects" cropX="32" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="507" source="objects" cropX="64" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="508" source="objects" cropX="96" cropY="320" cropWidth="32" cropHeight="32"/>
<frame name="509" source="objects" cropX="0" cropY="352" cropWidth="32" cropHeight="32"/>
<frame name="510" source="objects" cropX="32" cropY="352" cropWidth="32" cropHeight="32"/>
<frame name="511" source="objects" cropX="64" cropY="352" cropWidth="32" cropHeight="32"/>
</assetSettings>
;
public static var images:Array = [["floor_normal", "floor_crate", "floor_normal", "floor_rug_left", "floor_rug_up", "floor_rug_right", "floor_rug_circles", "floor_rug_triangles", "floor_weapons", "floor_vase", "floor_window_shadow", "floor_jar", "floor_wax"], ["wall_normal", "wall_left", "wall_center", "wall_right", "wall_high_left", "wall_high_center", "wall_high_right", "wall_vase", "wall_frame", "wall_light", "wall_picture_left", "wall_picture_center", "wall_picture_right", "wall_sign", "wall_weapons", "wall_window", "obelisk_bottom", "wall_jar", "wall_wax"], ["stairs_up_bottom", "stairs_up_bottom"], ["water"], [], [], [], [], [], ["door_closed", ["ceiling_lock_circle", "ceiling_lock_square", "ceiling_lock_triangle", "ceiling_lock_cross"]], ["door_locked"], ["wall_normal"], ["door_unlocked", "door_complete"], [["arrow_trap_down", "arrow_trap_left", "arrow_trap_up", "arrow_trap_right"]], [], [], [["switch_up", "red_switch_up"], ["switch_down", "red_switch_down"]], ["empty"], ["raft"], ["empty"], [new shadowImage().bitmapData], [], [], [], [["key_circle", "key_square", "key_triangle", "key_cross"]], [["treasure"]], [], [], [], [], [], [], [["player_stand_down", "player_stand_left", "player_stand_up", "player_stand_right"], ["player_walk_down", "player_walk_left", "player_walk_up", "player_walk_right"], ["player_push_down", "player_push_left", "player_push_up", "player_push_right"], ["player_idle"], ["player_fall"], ["player_shot"]], ["box"], [["arrow_down", "arrow_left", "arrow_up", "arrow_right"]], [], [], [], [], [], ["ceiling_normal", "ceiling_down", "ceiling_left_bottom", "ceiling_left_middle", "ceiling_left_top", "ceiling_up", "ceiling_right_top", "ceiling_right_middle", "ceiling_right_bottom", "obelisk_top"], ["ceiling_normal"], ["door_open", new doorOpen2Image().bitmapData, "ceiling_normal", new doorOpenOverlayImage().bitmapData, new doorOpen2OverlayImage().bitmapData, "ceiling_normal", "arrow_trap_left", "arrow_trap_up", "arrow_trap_right", "ceiling_lock_circle", "ceiling_lock_square", "ceiling_lock_triangle", "ceiling_lock_cross"]];
public function DisplayTile(_arg1:Tile, _arg2:Boolean=true){
tile = _arg1;
updatePosition = _arg2;
if (updatePosition){
currX = (nextX = tile.x);
currY = (nextY = tile.y);
yoffset = ((tile.type == Tile.SIGN)) ? 16 : ((tile.type == Tile.ARROW)) ? 0 : ((tile is Creature)) ? 8 : 0;
x = (currX * DisplayTile.TileWidth);
y = ((currY * DisplayTile.TileHeight) - yoffset);
frameTime = 0;
currentFrame = 0;
tileChanged();
tile.addEventListener(tileChanged);
step = 0;
};
}
public function update(_arg1:int):void{
step = (step + _arg1);
var _local2:int;
if (((((!((currX == nextX))) || (!((currY == nextY))))) && (((((tile as ObjectTile) == null)) || (!((tile as ObjectTile).dead)))))){
if (step > Level.MOVE_DELTA){
if (tile.type == Tile.ARROW){
yoffset = 8;
};
currX = nextX;
currY = nextY;
x = (currX * DisplayTile.TileWidth);
y = ((currY * DisplayTile.TileHeight) - yoffset);
frameTime = (frameTime + Level.MOVE_DELTA);
step = (step - Level.MOVE_DELTA);
};
if (step > 0){
if ((((tile.type == Tile.ARROW)) && ((yoffset < 8)))){
yoffset = ((8 * step) / Level.MOVE_DELTA);
};
x = ((currX + ((nextX - currX) * (Number(step) / Level.MOVE_DELTA))) * DisplayTile.TileWidth);
y = (((currY + ((nextY - currY) * (Number(step) / Level.MOVE_DELTA))) * DisplayTile.TileHeight) - yoffset);
};
};
_local2 = Math.floor(((frameTime + step) / frameRate));
if ((current is Array)){
_local2 = (_local2 % current.length);
if (currentFrame != _local2){
currentFrame = _local2;
bitmapData = current[currentFrame];
};
};
}
public function tileChanged():void{
var _local1:*;
if ((((tile.style >= images[tile.type].length)) || ((tile.style < 0)))){
tile.style = 0;
};
if ((images[tile.type][tile.style] is Array)){
if ((((tile.state < 0)) || ((tile.state >= images[tile.type][tile.style].length)))){
tile.state = 0;
};
_local1 = images[tile.type][tile.style][tile.state];
} else {
_local1 = images[tile.type][tile.style];
};
if (((((!((nextX == tile.x))) || (!((nextY == tile.y))))) && (updatePosition))){
if ((((step > 0)) && ((tile.type == Tile.ARROW)))){
yoffset = 8;
};
currX = nextX;
nextX = tile.x;
currY = nextY;
nextY = tile.y;
frameTime = (frameTime + step);
step = 0;
};
if ((((((tile is ObjectTile)) && ((tile as ObjectTile).dead))) && (!((removeListener == null))))){
removeListener(this);
};
if (_local1 != current){
current = _local1;
frameTime = 0;
if ((((currX == nextX)) && ((currY == nextY)))){
step = 0;
};
if ((current is Array)){
bitmapData = current[0];
} else {
bitmapData = current;
};
};
}
public static function init():void{
var _local6:XML;
var _local7:XML;
var _local8:int;
var _local9:BitmapData;
var _local10:BitmapData;
var _local11:Array;
var _local12:XML;
var _local13:int;
var _local14:int;
var _local1:Point = new Point(0, 0);
var _local2:Rectangle = new Rectangle();
var _local3:Dictionary = new Dictionary();
var _local4:Dictionary = new Dictionary();
var _local5:Dictionary = new Dictionary();
_local3["objects"] = new objectImages().bitmapData;
_local3["tiles"] = new tileImages().bitmapData;
for each (_local6 in imageXML.frame) {
_local9 = new BitmapData(int(_local6.@cropWidth), int(_local6.@cropHeight), true, 0);
_local10 = _local3[_local6.@source.toString()];
if (!_local10){
} else {
_local2.x = int(_local6.@cropX);
_local2.y = int(_local6.@cropY);
_local2.width = int(_local6.@cropWidth);
_local2.height = int(_local6.@cropHeight);
_local9.copyPixels(_local10, _local2, _local1);
_local4[_local6.@name.toString()] = _local9;
};
};
for each (_local7 in imageXML.sprite) {
_local11 = [];
for each (_local12 in _local7.frame) {
_local11.push(_local4[_local12.@name.toString()]);
};
if (_local11.length > 1){
_local5[_local7.@name.toString()] = _local11;
} else {
if (_local11.length == 1){
_local5[_local7.@name.toString()] = _local11[0];
};
};
};
_local8 = 0;
while (_local8 < images.length) {
_local13 = 0;
while (_local13 < images[_local8].length) {
if ((images[_local8][_local13] is Array)){
_local14 = 0;
while (_local14 < images[_local8][_local13].length) {
if ((images[_local8][_local13][_local14] is String)){
images[_local8][_local13][_local14] = _local5[images[_local8][_local13][_local14]];
};
_local14++;
};
} else {
if ((images[_local8][_local13] is String)){
images[_local8][_local13] = _local5[images[_local8][_local13]];
};
};
_local13++;
};
_local8++;
};
}
}
}//package
Section 35
//DisplayTile_doorOpen2Image (DisplayTile_doorOpen2Image)
package {
import mx.core.*;
public class DisplayTile_doorOpen2Image extends BitmapAsset {
}
}//package
Section 36
//DisplayTile_doorOpen2OverlayImage (DisplayTile_doorOpen2OverlayImage)
package {
import mx.core.*;
public class DisplayTile_doorOpen2OverlayImage extends BitmapAsset {
}
}//package
Section 37
//DisplayTile_doorOpenOverlayImage (DisplayTile_doorOpenOverlayImage)
package {
import mx.core.*;
public class DisplayTile_doorOpenOverlayImage extends BitmapAsset {
}
}//package
Section 38
//DisplayTile_objectImages (DisplayTile_objectImages)
package {
import mx.core.*;
public class DisplayTile_objectImages extends BitmapAsset {
}
}//package
Section 39
//DisplayTile_shadowImage (DisplayTile_shadowImage)
package {
import mx.core.*;
public class DisplayTile_shadowImage extends BitmapAsset {
}
}//package
Section 40
//DisplayTile_tileImages (DisplayTile_tileImages)
package {
import mx.core.*;
public class DisplayTile_tileImages extends BitmapAsset {
}
}//package
Section 41
//Feature (Feature)
package {
public class Feature {
private var unlocked:Boolean;
private var featureDescription:String;
private var gimmeCost:Number;
private var featureId:Number;
public function Feature(_arg1:Number, _arg2:String, _arg3:Number, _arg4:Boolean){
this.featureId = _arg1;
this.featureDescription = _arg2;
this.gimmeCost = _arg3;
this.unlocked = _arg4;
}
public function toString():String{
return ((((((((("[" + getFeatureId()) + ",") + getFeatureDescription()) + ",") + getGimmeCost()) + ",") + getUnlocked()) + "]"));
}
public function setUnlocked(_arg1:Boolean):void{
this.unlocked = _arg1;
}
public function getUnlocked():Boolean{
return (unlocked);
}
public function getGimmeCost():Number{
return (gimmeCost);
}
public function getFeatureId():Number{
return (featureId);
}
public function getFeatureDescription():String{
return (featureDescription);
}
}
}//package
Section 42
//G5FeaturesAchievements (G5FeaturesAchievements)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.hexagonstar.util.debug.*;
import flash.external.*;
public class G5FeaturesAchievements extends MovieClip {
private var KEY:String;// = "rocket"
private var g5User:Object;
private var caller:Object;
private var gameId:Object;
public static var G5FA_ALREADY_UNLOCKED:Number = -4;
private static var G5FA_UNLOCK_ACHIEVEMENT:String = "UnlockAchievement";
public static var G5FA_FEATURE_COST:Number = 3;
private static var G5FA_UNLOCK_FEATURE:String = "UnlockFeature";
public static var G5FA_NOT_UNLOCKED:Number = 2;
private static var SERVER_URL:String = "http://www.gimme5games.com";
private static var G5FA_LOCK_ALL_FEATURES_ACHIEVEMENTS:String = "LockAllFeaturesAchievements";
private static var VERSION_NUM:String = "1.0.1";
private static var G5FA_GET_FEATURES_ACHIEVEMENTS:String = "GetFeaturesAchievements";
public static var G5FA_SERVER_ERROR:Number = -1;
private static var G5FA_ACTION:String = (SERVER_URL + "/GameFeaturesAchievements.action?");
private static var G5FA_GET_STICKEE_GAMES:String = "GetStickeeGames";
public static var G5FA_SUCCESS:Number = 1;
public static var G5FA_DOES_NOT_EXIST:Number = -3;
public static var G5FA_INSUFFICIENT_GIMMES:Number = -5;
public static var G5FA_INVALID_G5_USER:Number = -2;
public function G5FeaturesAchievements(){
KEY = "rocket";
super();
debug((("[G5FeaturesAchievements VERSION " + VERSION_NUM) + "]"));
this.visible = false;
}
public function initAPI_FlashVars(_arg1:Object, _arg2:Number):void{
var flashVars:Object;
var caller = _arg1;
var gameId = _arg2;
this.caller = caller;
this.gameId = gameId;
try {
flashVars = caller.root.loaderInfo.parameters;
g5User = new Array(2);
g5User[0] = flashVars["userId"];
g5User[1] = flashVars["userName"];
} catch(err:Error) {
};
debug(("[G5FeaturesAchievements::initAPI_FlashVars] G5 User = " + ((g5User == null)) ? "null" : (((g5User[1] + " [") + g5User[0]) + "]")));
}
public function unlockFeature(_arg1:Number):void{
var _local2:String;
if (isUserLoggedIn()){
_local2 = G5FA_UNLOCK_FEATURE;
_local2 = (_local2 + ("|" + this.gameId));
_local2 = (_local2 + ("|" + _arg1));
_local2 = (_local2 + ("|" + this.g5User[0]));
hitServer(_local2, G5FA_UNLOCK_FEATURE);
} else {
caller.unlockFeature_Callback(G5FA_INVALID_G5_USER, _arg1);
};
}
public function unlockAchievement_Handler(_arg1:Boolean, _arg2:URLVariables):void{
if (((_arg1) && (!(isNaN(_arg2.resCode))))){
caller.unlockAchievement_Callback(parseInt(_arg2.resCode), parseInt(_arg2.achievementId));
} else {
caller.unlockAchievement_Callback(G5FA_SERVER_ERROR, null);
};
}
public function initAPI_User(_arg1:Object, _arg2:Number, _arg3:String, _arg4:String):void{
this.caller = _arg1;
this.gameId = _arg2;
g5User = new Array(2);
g5User[0] = _arg3;
g5User[1] = _arg4;
debug(("[G5FeaturesAchievements::initAPI_User] G5 User = " + ((g5User == null)) ? "null" : (((g5User[1] + " [") + g5User[0]) + "]")));
}
private function buildFeaturesArray(_arg1:Number, _arg2:URLVariables):Array{
var _local3:Array;
var _local4:Number;
var _local5:Feature;
debug(("[G5FeaturesAchievements::buildFeaturesArray] numFeatures = " + _arg1));
_local3 = new Array(_arg1);
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = new Feature(parseInt(_arg2[("f_id" + _local4)]), _arg2[("f_desc" + _local4)], _arg2[("f_gimmes" + _local4)], Boolean(parseInt(_arg2[("f_unlocked" + _local4)])));
_local3[_local4] = _local5;
_local4++;
};
return (_local3);
}
public function unlockAchievement(_arg1:Number):void{
var _local2:String;
if (isUserLoggedIn()){
_local2 = G5FA_UNLOCK_ACHIEVEMENT;
_local2 = (_local2 + ("|" + this.gameId));
_local2 = (_local2 + ("|" + _arg1));
_local2 = (_local2 + ("|" + this.g5User[0]));
hitServer(_local2, G5FA_UNLOCK_ACHIEVEMENT);
} else {
caller.unlockAchievement_Callback(G5FA_INVALID_G5_USER, _arg1);
};
}
private function debug(_arg1:String):void{
trace(_arg1);
Debug.trace(_arg1);
}
public function getFeaturesAchievements_Handler(_arg1:Boolean, _arg2:URLVariables):void{
var numFeatures:Number;
var features:Array;
var numAchievements:Number;
var achievements:Array;
var success = _arg1;
var vars = _arg2;
if (success){
numFeatures = 0;
try {
numFeatures = parseInt(vars.f_num);
} catch(error:Error) {
numFeatures = 0;
};
features = buildFeaturesArray(numFeatures, vars);
numAchievements = 0;
try {
numAchievements = parseInt(vars.a_num);
} catch(error:Error) {
numAchievements = 0;
};
achievements = buildAchievementsArray(numAchievements, vars);
caller.getFeaturesAchievements_Callback(parseInt(vars.resCode), features, achievements);
} else {
caller.getFeaturesAchievements_Callback(G5FA_SERVER_ERROR, null, null);
};
}
public function getFeaturesAchievements():void{
var _local1:String;
if (isUserLoggedIn()){
_local1 = G5FA_GET_FEATURES_ACHIEVEMENTS;
_local1 = (_local1 + ("|" + this.gameId));
_local1 = (_local1 + ("|" + this.g5User[0]));
hitServer(_local1, G5FA_GET_FEATURES_ACHIEVEMENTS);
} else {
caller.getFeaturesAchievements_Callback(G5FA_INVALID_G5_USER, null, null);
};
}
public function isUserLoggedIn():Boolean{
return (((this.g5User == null)) ? false : !(isNaN(this.g5User[0])));
}
public function loadHandler(_arg1:String, _arg2:Boolean, _arg3:Event):void{
var _local4:URLLoader;
var _local5:URLVariables;
_local4 = URLLoader(_arg3.target);
_local5 = new URLVariables(_local4.data);
_arg2 = new Boolean(int(_local5.succ));
switch (_arg1){
case G5FA_GET_FEATURES_ACHIEVEMENTS:
getFeaturesAchievements_Handler(_arg2, _local5);
break;
case G5FA_GET_STICKEE_GAMES:
getStickeeGames_Handler(_arg2, _local5);
break;
case G5FA_UNLOCK_FEATURE:
unlockFeature_Handler(_arg2, _local5);
break;
case G5FA_UNLOCK_ACHIEVEMENT:
unlockAchievement_Handler(_arg2, _local5);
break;
case G5FA_LOCK_ALL_FEATURES_ACHIEVEMENTS:
lockAllFeaturesAchievements_Handler(_arg2, _local5);
break;
};
}
private function encrypt(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
_local2 = "";
_local3 = 0;
_local4 = 0;
while (_local3 < _arg1.length) {
if (_local4 >= KEY.length){
_local4 = 0;
};
_local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) ^ KEY.charCodeAt(_local4)) + 1)));
_local3++;
_local4++;
};
return (_local2);
}
public function lockAllFeaturesAchievements_Handler(_arg1:Boolean, _arg2:URLVariables):void{
if (((_arg1) && (!(isNaN(_arg2.resCode))))){
caller.lockAllFeaturesAchievements_Callback(parseInt(_arg2.resCode));
} else {
caller.lockAllFeaturesAchievements_Callback(G5FA_SERVER_ERROR, null);
};
}
public function lockAllFeaturesAchievements():void{
var _local1:String;
if (isUserLoggedIn()){
_local1 = G5FA_LOCK_ALL_FEATURES_ACHIEVEMENTS;
_local1 = (_local1 + ("|" + this.gameId));
_local1 = (_local1 + ("|" + this.g5User[0]));
hitServer(_local1, G5FA_LOCK_ALL_FEATURES_ACHIEVEMENTS);
} else {
caller.lockAllFeaturesAchievements_Callback(G5FA_INVALID_G5_USER);
};
}
private function buildStickeeGamesArray(_arg1:Number, _arg2:URLVariables):Array{
var _local3:Array;
var _local4:Number;
var _local5:StickeeGame;
debug(("[G5FeaturesAchievements::buildStickeeGamesArray] numStickeeGames = " + _arg1));
_local3 = new Array(_arg1);
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = new StickeeGame(parseInt(_arg2[("sg_id" + _local4)]), _arg2[("sg_code" + _local4)], _arg2[("sg_name" + _local4)], parseInt(_arg2[("sg_num_ach" + _local4)]), parseInt(_arg2[("sg_num_unlocked" + _local4)]));
_local3[_local4] = _local5;
_local4++;
};
return (_local3);
}
public function getG5User():Array{
return ((g5User as Array));
}
public function hitServer(_arg1:String, _arg2:String):void{
var vars:URLVariables;
var request:URLRequest;
var loader:URLLoader;
var data = _arg1;
var action = _arg2;
vars = new URLVariables();
vars.data = encrypt(data);
request = new URLRequest(G5FA_ACTION);
loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
request.data = vars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, function (_arg1:Event):void{
loadHandler(action, true, _arg1);
});
loader.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:Event):void{
loadHandler(action, false, _arg1);
});
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (_arg1:Event):void{
loadHandler(action, false, _arg1);
});
loader.load(request);
}
private function buildAchievementsArray(_arg1:Number, _arg2:URLVariables):Array{
var _local3:Array;
var _local4:Number;
var _local5:Achievement;
debug(("[G5FeaturesAchievements::buildAchievementsArray] numAchievements = " + _arg1));
_local3 = new Array(_arg1);
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = new Achievement(parseInt(_arg2[("a_id" + _local4)]), _arg2[("a_name" + _local4)], _arg2[("a_desc" + _local4)], _arg2[("a_gimmes" + _local4)], Boolean(parseInt(_arg2[("a_unlocked" + _local4)])));
_local3[_local4] = _local5;
_local4++;
};
return (_local3);
}
public function getStickeeGames_Handler(_arg1:Boolean, _arg2:URLVariables):void{
var numStickeeGames:Number;
var stickeeGames:Array;
var success = _arg1;
var vars = _arg2;
if (success){
numStickeeGames = 0;
try {
numStickeeGames = parseInt(vars.sg_num);
} catch(error:Error) {
numStickeeGames = 0;
};
stickeeGames = buildStickeeGamesArray(numStickeeGames, vars);
caller.getStickeeGames_Callback(parseInt(vars.resCode), stickeeGames);
} else {
caller.getStickeeGames_Callback(G5FA_SERVER_ERROR, null);
};
}
public function getStickeeGames(_arg1:Boolean):void{
var _local2:String;
if (isUserLoggedIn()){
_local2 = G5FA_GET_STICKEE_GAMES;
_local2 = (_local2 + ("|" + this.g5User[0]));
_local2 = (_local2 + ("|" + _arg1));
hitServer(_local2, G5FA_GET_STICKEE_GAMES);
} else {
caller.getStickeeGames_Callback(G5FA_INVALID_G5_USER, null);
};
}
public function initAPI(_arg1:Object, _arg2:Number, _arg3:Boolean):void{
var caller = _arg1;
var gameId = _arg2;
var testMode = _arg3;
this.caller = caller;
this.gameId = gameId;
if (!testMode){
try {
g5User = ExternalInterface.call("getG5User");
} catch(err:Error) {
};
} else {
g5User = new Array(2);
g5User[0] = "-1";
g5User[1] = "G5FATest";
};
debug(("[G5FeaturesAchievements::initAPI] G5 User = " + ((g5User == null)) ? "null" : (((g5User[1] + " [") + g5User[0]) + "]")));
}
public function unlockFeature_Handler(_arg1:Boolean, _arg2:URLVariables):void{
if (((_arg1) && (!(isNaN(_arg2.resCode))))){
caller.unlockFeature_Callback(parseInt(_arg2.resCode), parseInt(_arg2.featureId));
} else {
caller.unlockFeature_Callback(G5FA_SERVER_ERROR, null);
};
}
}
}//package
Section 43
//KeyHandler (KeyHandler)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.ui.*;
public class KeyHandler extends Sprite {
public static var REPEAT_TIME:int = 150;
private static var keyPressed:Boolean;
private static var keys:Array;
public static var INITIAL_TIME:int = 200;
public function KeyHandler(){
var _local1:int;
super();
if (!keys){
keys = new Array(0xFF);
_local1 = 0;
while (_local1 < keys.length) {
keys[_local1] = new KeyInfo(_local1, false, 0);
_local1++;
};
keyPressed = false;
};
addEventListener(Event.ADDED_TO_STAGE, init);
}
public function init(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, init);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
addEventListener(Event.REMOVED_FROM_STAGE, cleanup);
}
private function handleEvent(_arg1:KeyboardEvent, _arg2:Boolean):void{
var _local3:KeyInfo = (keys[_arg1.keyCode] as _slot2);
if (_local3 == null){
return;
};
if (_arg2){
keyPressed = true;
if (!_local3.pressed){
_local3.startTime = getTimer();
_local3.repeatTime = _local3.startTime;
};
};
_local3.pressed = _arg2;
_local3.shifted = keys[Keyboard.SHIFT].pressed;
}
private function onKeyDown(_arg1:KeyboardEvent):void{
handleEvent(_arg1, true);
}
public function cleanup(_arg1:Event):void{
var _local2:KeyInfo;
removeEventListener(Event.REMOVED_FROM_STAGE, cleanup);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
for each (_local2 in keys) {
_local2.pressed = false;
};
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function onKeyUp(_arg1:KeyboardEvent):void{
handleEvent(_arg1, false);
}
public static function getPressed(_arg1:int, _arg2:Boolean=true):Boolean{
var _local3:KeyInfo = (keys[_arg1] as _slot2);
var _local4:Boolean;
if (_arg2){
_local4 = _local3.pressed;
} else {
if (_local3.pressed){
if (_local3.repeatTime == _local3.startTime){
_local4 = true;
_local3.repeatTime = (_local3.startTime + INITIAL_TIME);
} else {
if (getTimer() > _local3.repeatTime){
_local4 = true;
_local3.repeatTime = (_local3.repeatTime + REPEAT_TIME);
};
};
};
};
keyPressed = false;
return (_local4);
}
public static function getLastPressed(_arg1:Array, _arg2:int=-1):int{
var _local5:int;
var _local3:int;
var _local4:int;
for each (_local5 in _arg1) {
if ((((_arg2 > 0)) && ((keys[_local5].startTime > _arg2)))){
_local3 = _local5;
_arg2 = keys[_local5].startTime;
} else {
if (((keys[_local5].pressed) && ((keys[_local5].startTime > _local4)))){
_local3 = _local5;
_local4 = keys[_local5].startTime;
};
};
};
return (_local3);
}
}
}//package
class KeyInfo {
public var shifted:Boolean;
public var repeatTime:int;
public var pressed:Boolean;
public var code:int;
public var startTime:int;
private function KeyInfo(_arg1:int, _arg2:Boolean, _arg3:int){
code = _arg1;
pressed = _arg2;
startTime = _arg3;
repeatTime = 0;
}
}
Section 44
//Level (Level)
package {
import flash.utils.*;
public class Level {
public var currentDescription:String;
public var tiles:Array;
public var addCallback:Function;
private var activatedObjects:Dictionary;
public var name:String;
public var width:int;
private var delay:int;
public var objects:Array;
public var activateCallback:Function;
public var bribe:int;
public var player:Player;
public var completeCallback:Function;
public var height:int;
private var data:String;
private var _time:int;
public var description:String;
private var listeners:Array;
public static var DOWN:int = 0;
public static var STEP_DELTA:int = 50;
public static var LEFT:int = 1;
public static var MOVE_DELTA:int = 300;
public static var NONE:int = -1;
public static var UP:int = 2;
public static var RIGHT:int = 3;
public function Level(_arg1:String){
load(_arg1);
listeners = [];
_time = 0;
currentDescription = "";
}
public function addEventListener(_arg1:Function):void{
listeners.push(_arg1);
}
public function update():void{
var _local1:ObjectTile;
var _local2:*;
var _local3:int;
var _local4:ObjectTile;
if (((player.dead) || ((player.room.type == Tile.EXIT)))){
if (player.style == 1){
player.style = 0;
};
delay = (delay + STEP_DELTA);
if (((((player.dead) && ((delay > 2000)))) && (!((completeCallback == null))))){
completeCallback(name, false, 0);
} else {
if (((((!(player.dead)) && ((delay > 1000)))) && (!((completeCallback == null))))){
completeCallback(player.room.data, true, time);
};
};
} else {
if (delay > 0){
delay = (delay - STEP_DELTA);
if (delay > 0){
return;
};
};
player.update();
currentDescription = "";
_local3 = 0;
while (_local3 < objects.length) {
_local1 = objects[_local3];
_local2 = _local1.update();
if (_local1.dead){
objects.splice(_local3, 1);
_local3--;
for each (_local4 in _local1.related) {
_local4.dead = true;
};
} else {
if ((((((((_local1.type == Tile.SIGN)) && (!((player.oldRoom == null))))) && ((_local1.x == player.oldRoom.x)))) && ((_local1.y == player.oldRoom.y)))){
currentDescription = _local1.data;
};
};
if (_local2){
objects.push(_local2);
addCallback(_local2);
if ((((_local2.type == Tile.ARROW)) && (!((_local2.state == Level.DOWN))))){
_local1 = new ObjectTile(Tile.LOCKOVERLAY, _local2.room);
_local1.style = (_local2.state + 5);
_local2.related = [_local1];
objects.push(_local1);
addCallback(_local1);
};
};
_local3++;
};
for each (_local1 in objects) {
if (_local1.delayedAction != null){
_local2 = _local1.delayedAction();
_local1.delayedAction = null;
if (_local2 != null){
if ((_local2 is Array)){
if (((!(activatedObjects[_local1])) && (activateCallback(_local2)))){
activatedObjects[_local1] = true;
delay = (MOVE_DELTA * 8);
};
} else {
objects.push(_local2);
addCallback(_local2);
if ((((_local2.type == Tile.ARROW)) && (!((_local2.state == Level.DOWN))))){
_local1 = new ObjectTile(Tile.LOCKOVERLAY, _local2.room);
_local1.style = (_local2.state + 5);
_local2.related = [_local1];
objects.push(_local1);
addCallback(_local1);
};
};
};
};
};
if (((player.dead) || ((player.room.type == Tile.EXIT)))){
delay = 0;
} else {
_time = (_time + STEP_DELTA);
informListeners();
};
};
}
public function removeEventListener(_arg1:Function):void{
var _local2:int;
while (_local2 < listeners.length) {
if (listeners[_local2] == _arg1){
listeners.splice(_local2, 1);
break;
};
_local2++;
};
}
public function cleanup():void{
var _local1:Array;
var _local2:ObjectTile;
var _local3:RoomTile;
for each (_local1 in tiles) {
for each (_local3 in _local1) {
_local3.cleanup();
};
};
tiles = [];
for each (_local2 in objects) {
_local2.cleanup();
};
objects = [];
if (player){
player.cleanup();
player = null;
};
activatedObjects = new Dictionary();
}
protected function informListeners():void{
var _local1:Function;
for each (_local1 in listeners) {
_local1();
};
}
public function get moneyNeeded():int{
if (name == "main"){
return (0);
};
return ((bribe - player.money));
}
public function get currentTime():String{
if (name == "main"){
return (" --:--");
};
return ((((((((time / 60) < 10)) ? "0" : "" + Math.floor((time / 60))) + ":") + (((time % 60) < 10)) ? "0" : "") + (time % 60)));
}
public function get currentName():String{
return (((name == "main")) ? "Main Hall" : name);
}
public function load(_arg1:String):void{
var _local2:int;
var _local3:int;
var _local4:XML;
var _local5:Tile;
var _local11:ObjectTile;
var _local12:ObjectTile;
var _local13:ObjectTile;
var _local6:Dictionary = new Dictionary();
var _local7:Array = [];
var _local8:Array = [];
cleanup();
data = _arg1;
var _local9:ByteArray = Base64.decodeToByteArray(_arg1);
_local9.uncompress();
var _local10:XML = XML(_local9.readUTFBytes(_local9.length));
width = _local10.@width;
height = _local10.@height;
bribe = _local10.@bribe;
name = _local10.@name;
description = _local10.@description.toUpperCase();
_local2 = 0;
while (_local2 < height) {
tiles[_local2] = [];
_local3 = 0;
while (_local3 < width) {
_local4 = _local10.row[_local2].tile[_local3];
_local5 = new RoomTile(_local4.@type, _local3, _local2);
if ((((_local4.@state.toString().length > 0)) && (!((_local4.@state == -1))))){
_local5.state = _local4.@state;
};
if (_local4.@data.toString().length > 0){
_local5.data = _local4.@data;
};
if ((((_local4.@style.toString().length > 0)) && (!((_local4.@style == 0))))){
_local5.style = _local4.@style;
};
tiles[_local2][_local3] = _local5;
_local3++;
};
_local2++;
};
_local2 = 0;
while (_local2 < height) {
_local3 = 0;
while (_local3 < width) {
if (_local2 > 0){
tiles[_local2][_local3].top = tiles[(_local2 - 1)][_local3];
};
if (_local2 < (height - 1)){
tiles[_local2][_local3].bottom = tiles[(_local2 + 1)][_local3];
};
if (_local3 > 0){
tiles[_local2][_local3].left = tiles[_local2][(_local3 - 1)];
};
if (_local3 < (width - 1)){
tiles[_local2][_local3].right = tiles[_local2][(_local3 + 1)];
};
_local3++;
};
_local2++;
};
player = new Player(tiles[_local10.player[0].@y][_local10.player[0].@x]);
for each (_local4 in _local10.objects[0].tile) {
if ((((_local4.@type >= Tile.CREATURE_START)) && ((_local4.@type <= Tile.CREATURE_END)))){
_local12 = new Creature(_local4.@type, tiles[_local4.@y][_local4.@x]);
} else {
_local12 = new ObjectTile(_local4.@type, tiles[_local4.@y][_local4.@x]);
};
if ((((_local4.@state.toString().length > 0)) && (((!((_local4.@state == -1))) || ((_local4.@data.toString().length > 0)))))){
_local12.state = _local4.@state;
};
if (_local4.@data.toString().length > 0){
_local12.data = _local4.@data;
};
if ((((_local4.@style.toString().length > 0)) && (!((_local4.@style == 0))))){
_local12.style = _local4.@style;
};
if ((_local12 is Creature)){
objects.splice(0, 0, _local12);
} else {
objects.push(_local12);
};
if (_local12.type == Tile.LOCK){
_local13 = new ObjectTile(Tile.LOCKOVERLAY, tiles[(int(_local4.@y) - 1)][_local4.@x]);
_local13.style = (int(_local4.@state) + 9);
_local12.related.push(_local13);
_local8.push(_local13);
};
if ((((((_local12.type == Tile.TRIGGER)) && (!((_local12.data == null))))) && ((_local12.data.length > 0)))){
_local7.push(_local12);
} else {
if ((((((((((((_local12.type == Tile.TRAPWALL)) || ((_local12.type == Tile.TRAPCEILING)))) || ((_local12.type == Tile.ARROWTRAP)))) || ((_local12.type == Tile.WATERTRAP)))) && (!((_local12.data == null))))) && ((_local12.data.length > 0)))){
if (_local6[_local12.data] == null){
_local6[_local12.data] = [];
};
_local6[_local12.data].push(_local12);
};
};
};
for each (_local12 in _local7) {
_local12.related = _local6[_local12.data];
};
for each (_local11 in _local8) {
objects.push(_local11);
};
_time = 0;
informListeners();
}
public function get time():int{
var _local1:int = Math.round((_time / 1000));
if (_local1 >= (60 * 60)){
_local1 = ((59 * 60) + 59);
};
return (_local1);
}
}
}//package
Section 45
//LevelDisplay (LevelDisplay)
package {
import flash.display.*;
import flash.geom.*;
public class LevelDisplay extends Sprite {
private var _level:Level;
private var _height:int;
private var _width:int;
private var prev:Point;
private var objects:Array;
private var step:int;
private var playerRoom:RoomTile;
private var player:DisplayTile;
private var current:Point;
private var next:Point;
public function LevelDisplay(){
_height = 13;
_width = 13;
scrollRect = new Rectangle(0, 0, (_width * DisplayTile.TileWidth), (_height * DisplayTile.TileHeight));
current = new Point();
next = new Point();
}
private function tileAdded(_arg1:ObjectTile):void{
var _local2:DisplayTile = new DisplayTile(_arg1);
addChild(_local2);
objects.push(_local2);
_local2.removeListener = tileRemoved;
}
public function set level(_arg1:Level):void{
var _local2:DisplayObject;
var _local5:ObjectTile;
var _local6:DisplayTile;
var _local8:int;
var _local3:Array = [];
var _local4:Array = [];
cleanup();
_level = _arg1;
_level.addCallback = tileAdded;
_level.activateCallback = tilesActivated;
var _local7:int;
while (_local7 < _level.tiles.length) {
_local8 = 0;
while (_local8 < _level.tiles[_local7].length) {
_local6 = new DisplayTile(_level.tiles[_local7][_local8]);
addChild(_local6);
_local8++;
};
_local7++;
};
for each (_local5 in _level.objects) {
if ((((_local5.type >= Tile.OVERLAY_START)) && ((_local5.type <= Tile.OVERLAY_END)))){
_local4.push(_local5);
} else {
if ((((_local5.type >= Tile.CREATURE_START)) && ((_local5.type <= Tile.CREATURE_END)))){
_local3.push(_local5);
} else {
_local6 = new DisplayTile(_local5);
addChild(_local6);
objects.push(_local6);
_local6.removeListener = tileRemoved;
};
};
};
for each (_local5 in _local3) {
_local6 = new DisplayTile(_local5);
addChild(_local6);
objects.push(_local6);
_local6.removeListener = tileRemoved;
};
player = new DisplayTile(_level.player);
addChild(player);
objects.push(player);
playerMove();
update(0);
_level.player.addEventListener(playerMove);
for each (_local5 in _local4) {
_local6 = new DisplayTile(_local5);
addChild(_local6);
objects.push(_local6);
_local6.removeListener = tileRemoved;
};
}
public function update(_arg1:int):void{
var _local3:DisplayTile;
var _local4:Player;
var _local5:DisplayTile;
var _local6:Point;
var _local7:Point;
var _local2:Rectangle = scrollRect;
step = (step + _arg1);
if (prev){
panUpdate(_arg1);
return;
};
for each (_local3 in objects) {
_local3.update(_arg1);
};
if (((((!((current.x == next.x))) || (!((current.y == next.y))))) || ((step == 0)))){
if ((((step > Level.MOVE_DELTA)) || ((step == 0)))){
step = 0;
current.x = next.x;
current.y = next.y;
_local2.x = (current.x * DisplayTile.TileWidth);
_local2.y = (current.y * DisplayTile.TileHeight);
} else {
_local2.x = ((current.x + ((next.x - current.x) * (Number(step) / Level.MOVE_DELTA))) * DisplayTile.TileWidth);
_local2.y = ((current.y + ((next.y - current.y) * (Number(step) / Level.MOVE_DELTA))) * DisplayTile.TileHeight);
};
scrollRect = _local2;
};
if (player){
_local4 = (player.tile as Player);
if (((_local4) && (!(_local4.dead)))){
for each (_local5 in objects) {
if ((((_local5.tile is Creature)) || ((((player.tile.x == _local5.tile.x)) && ((player.tile.y == _local5.tile.y)))))){
if (((!((player == _local5))) && (player.hitTestObject(_local5)))){
_local6 = new Point(player.x, player.y);
_local7 = new Point(_local5.x, _local5.y);
if (((player.bitmapData.hitTest(_local6, 0xFF, _local5, _local7, 0xFF)) && (!(((_local5.tile as ObjectTile) == null))))){
_local4.hitsObject((_local5.tile as ObjectTile));
};
};
};
};
};
};
}
override public function set width(_arg1:Number):void{
_width = _arg1;
var _local2:Rectangle = scrollRect;
_local2.width = (_width * DisplayTile.TileWidth);
scrollRect = _local2;
}
public function panUpdate(_arg1:int):void{
var _local2:Rectangle;
var _local3:DisplayTile;
if (step < (Level.MOVE_DELTA * 2)){
_local2 = scrollRect;
_local2.x = ((current.x + ((next.x - current.x) * (Number(step) / (Level.MOVE_DELTA * 2)))) * DisplayTile.TileWidth);
_local2.y = ((current.y + ((next.y - current.y) * (Number(step) / (Level.MOVE_DELTA * 2)))) * DisplayTile.TileHeight);
scrollRect = _local2;
} else {
if (step < (Level.MOVE_DELTA * 3)){
_local2 = scrollRect;
_local2.x = (next.x * DisplayTile.TileWidth);
_local2.y = (next.y * DisplayTile.TileWidth);
scrollRect = _local2;
} else {
if (step < (Level.MOVE_DELTA * 4)){
for each (_local3 in objects) {
_local3.update(_arg1);
};
} else {
if (step < (Level.MOVE_DELTA * 5)){
} else {
if (step < (Level.MOVE_DELTA * 7)){
_local2 = scrollRect;
_local2.x = ((next.x + ((prev.x - next.x) * (Number((step - (Level.MOVE_DELTA * 5))) / (Level.MOVE_DELTA * 2)))) * DisplayTile.TileWidth);
_local2.y = ((next.y + ((prev.y - next.y) * (Number((step - (Level.MOVE_DELTA * 5))) / (Level.MOVE_DELTA * 2)))) * DisplayTile.TileHeight);
scrollRect = _local2;
} else {
_local2 = scrollRect;
_local2.x = (prev.x * DisplayTile.TileWidth);
_local2.y = (prev.y * DisplayTile.TileWidth);
scrollRect = _local2;
current = prev;
next = new Point(prev.x, prev.y);
prev = null;
step = 0;
};
};
};
};
};
}
private function tileRemoved(_arg1:DisplayTile):void{
removeChild(_arg1);
var _local2:int;
while (_local2 < objects.length) {
if (objects[_local2] == _arg1){
objects.splice(_local2, 1);
break;
};
_local2++;
};
}
public function tilesActivated(_arg1:Array):Boolean{
var _local5:Tile;
var _local2:Boolean;
var _local3:int;
var _local4:int;
for each (_local5 in _arg1) {
if ((((((((((_local5.x < current.x)) || ((_local5.x >= (current.x + _width))))) || ((_local5.y < current.y)))) || ((_local5.y >= (current.y + _height))))) && (!((_local5.type == Tile.ARROWTRAP))))){
_local2 = true;
};
_local3 = (_local3 + _local5.x);
_local4 = (_local4 + _local5.y);
};
if (_local2){
_local3 = (Math.round((_local3 / _arg1.length)) - Math.floor((_width / 2)));
_local4 = (Math.round((_local4 / _arg1.length)) - Math.floor((_height / 2)));
_local3 = ((_local3 < 0)) ? 0 : (((_local3 + _width) > _level.width)) ? (_level.width - _width) : _local3;
_local4 = ((_local4 < 0)) ? 0 : (((_local4 + _height) > _level.height)) ? (_level.height - _height) : _local4;
if (((!((_local3 == next.x))) || (!((_local4 == next.y))))){
current.x = (scrollRect.x / DisplayTile.TileWidth);
current.y = (scrollRect.y / DisplayTile.TileHeight);
prev = new Point(next.x, next.y);
next.x = _local3;
next.y = _local4;
step = 0;
SoundManager.pauseSounds(SoundManager.EFFECT, (Level.MOVE_DELTA * 3));
return (true);
};
};
return (false);
}
override public function set height(_arg1:Number):void{
_height = _arg1;
var _local2:Rectangle = scrollRect;
_local2.height = (_height * DisplayTile.TileHeight);
scrollRect = _local2;
}
public function set colorTransform(_arg1:ColorTransform):void{
var _local2:int;
while (_local2 < numChildren) {
getChildAt(_local2).transform.colorTransform = _arg1;
_local2++;
};
}
public function playerMove():void{
var _local1:int = _level.width;
var _local2:int = _level.height;
var _local3:int = _level.player.x;
var _local4:int = _level.player.y;
var _local5:int = (_local3 - current.x);
var _local6:int = (_local4 - current.y);
var _local7:int = next.x;
var _local8:int = next.y;
if (playerRoom == _level.player.room){
return;
};
playerRoom = _level.player.room;
if (_level.player.oldRoom != null){
if (_local5 > Math.floor(((_width * 2) / 3))){
_local7 = (_local3 - Math.floor(((_width * 2) / 3)));
} else {
if (_local5 < Math.floor((_width / 3))){
_local7 = (_local3 - Math.floor((_width / 3)));
};
};
if (_local6 > Math.floor(((_height * 2) / 3))){
_local8 = (_local4 - Math.floor(((_height * 2) / 3)));
} else {
if (_local6 < Math.floor((_height / 3))){
_local8 = (_local4 - Math.floor((_height / 3)));
};
};
} else {
_local7 = (_local3 - Math.floor((_width / 2)));
_local8 = (_local4 - Math.floor((_height / 2)));
};
_local7 = ((_local7 < 0)) ? 0 : (((_local7 + _width) > _local1)) ? (_local1 - _width) : _local7;
_local8 = ((_local8 < 0)) ? 0 : (((_local8 + _height) > _local2)) ? (_local2 - _height) : _local8;
if (((!((_local7 == next.x))) || (!((_local8 == next.y))))){
current.x = next.x;
current.y = next.y;
next.x = ((_local1 > _width)) ? _local7 : next.x;
next.y = ((_local2 > _height)) ? _local8 : next.y;
step = 0;
};
}
public function cleanup():void{
_level = null;
objects = [];
player = null;
playerRoom = null;
while (numChildren > 0) {
removeChildAt((numChildren - 1));
};
current.x = (next.x = 0);
current.y = (next.y = 0);
step = 0;
}
}
}//package
Section 46
//Menu (Menu)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.ui.*;
public class Menu extends Sprite {
public var items:Array;
protected var clickItem:int;
protected var freeze:Boolean;
protected var changeCallback:Function;
protected var selectedItem:int;
protected var rect:Rectangle;
protected var confirmCallback:Function;
protected var highlightItem:int;
public function Menu(_arg1:Array, _arg2:Rectangle, _arg3:Function=null, _arg4:Function=null, _arg5:DisplayObject=null, _arg6:int=5){
var _local8:MenuItem;
super();
confirmCallback = _arg3;
changeCallback = _arg4;
rect = _arg2;
items = [];
highlightItem = -1;
selectedItem = -1;
clickItem = -1;
freeze = true;
if (_arg5){
addChild(_arg5);
} else {
graphics.beginFill(4288716800, 0.75);
graphics.lineTo(rect.width, 0);
graphics.lineTo(rect.width, rect.height);
graphics.lineTo(0, rect.height);
graphics.lineTo(0, 0);
graphics.endFill();
};
x = rect.x;
y = rect.y;
var _local7:int = _arg6;
for each (_local8 in _arg1) {
_local8.y = _local7;
_local8.x = ((rect.width - _local8.width) / 2);
if (_local8.normal != null){
addChild(_local8);
items.push(_local8);
} else {
_local7 = (_local7 + _arg6);
};
_local7 = (_local7 + (_local8.height + _arg6));
};
addEventListener(Event.ADDED_TO_STAGE, initialize);
}
private function onMouseUp(_arg1:MouseEvent):void{
var _local3:Point;
if (freeze){
return;
};
var _local2:int;
while (_local2 < items.length) {
if (((((!((items[_local2].state == MenuItem.DISABLED))) && (items[_local2].hitObject.hitTestPoint(_arg1.stageX, _arg1.stageY)))) && ((clickItem == _local2)))){
selectedItem = _local2;
_local3 = items[selectedItem].globalToLocal(new Point(_arg1.stageX, _arg1.stageY));
items[selectedItem].processClick(_local3);
if (confirmCallback != null){
confirmCallback(items[selectedItem].value);
};
break;
};
_local2++;
};
if (stage){
stage.focus = stage;
};
_arg1.stopPropagation();
}
private function onKeyDown(_arg1:KeyboardEvent):void{
if (freeze){
return;
};
switch (_arg1.keyCode){
case Keyboard.DOWN:
if ((((highlightItem >= 0)) && ((items[highlightItem].state == MenuItem.HIGHLIGHT)))){
items[highlightItem].state = MenuItem.NORMAL;
};
do {
highlightItem = ((highlightItem + 1) % items.length);
} while (items[highlightItem].state == MenuItem.DISABLED);
if (items[highlightItem].state == MenuItem.NORMAL){
items[highlightItem].state = MenuItem.HIGHLIGHT;
};
if (changeCallback != null){
changeCallback(items[highlightItem].value);
};
break;
case Keyboard.UP:
if ((((highlightItem >= 0)) && ((items[highlightItem].state == MenuItem.HIGHLIGHT)))){
items[highlightItem].state = MenuItem.NORMAL;
};
do {
highlightItem = (((highlightItem + items.length) - 1) % items.length);
} while (items[highlightItem].state == MenuItem.DISABLED);
if (items[highlightItem].state == MenuItem.NORMAL){
items[highlightItem].state = MenuItem.HIGHLIGHT;
};
if (changeCallback != null){
changeCallback(items[highlightItem].value);
};
break;
case Keyboard.SPACE:
case Keyboard.ENTER:
if (highlightItem >= 0){
selectedItem = highlightItem;
};
if (((!((confirmCallback == null))) && ((selectedItem >= 0)))){
confirmCallback(items[selectedItem].value);
};
break;
default:
if (selectedItem >= 0){
items[selectedItem].processKey(_arg1.keyCode);
};
break;
};
_arg1.stopPropagation();
}
private function onMouseDown(_arg1:MouseEvent):void{
if (freeze){
return;
};
var _local2:int;
while (_local2 < items.length) {
if (((!((items[_local2].state == MenuItem.DISABLED))) && (items[_local2].hitObject.hitTestPoint(_arg1.stageX, _arg1.stageY)))){
clickItem = _local2;
break;
};
_local2++;
};
if (stage){
stage.focus = stage;
};
_arg1.stopPropagation();
}
public function initialize(_arg1=null):void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
freeze = false;
addEventListener(Event.REMOVED_FROM_STAGE, cleanup);
}
public function set colorTransform(_arg1:ColorTransform):void{
var _local2:int;
while (_local2 < numChildren) {
getChildAt(_local2).transform.colorTransform = _arg1;
_local2++;
};
}
public function startProcessing():void{
freeze = false;
}
public function cleanup(_arg1=null):void{
var _local2:MenuItem;
for each (_local2 in items) {
removeChild(_local2);
};
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
}
public function stopProcessing():void{
freeze = true;
}
private function onMouseMove(_arg1:MouseEvent):void{
if (freeze){
return;
};
var _local2:int;
while (_local2 < items.length) {
if (((!((items[_local2].state == MenuItem.DISABLED))) && (items[_local2].hitObject.hitTestPoint(_arg1.stageX, _arg1.stageY)))){
if ((((highlightItem >= 0)) && ((highlightItem < items.length)))){
items[highlightItem].state = MenuItem.NORMAL;
};
highlightItem = _local2;
items[highlightItem].state = MenuItem.HIGHLIGHT;
return;
};
_local2++;
};
_arg1.stopPropagation();
}
private function onKeyUp(_arg1:KeyboardEvent):void{
}
}
}//package
Section 47
//MenuItem (MenuItem)
package {
import flash.display.*;
import flash.geom.*;
public class MenuItem extends Sprite {
private var child:DisplayObject;
public var normal:DisplayObject;
public var value;
private var _state:int;
public var highlight:DisplayObject;
public var disabled:DisplayObject;
public static var HIGHLIGHT:int = 1;
public static var NORMAL:int = 0;
public static var SELECTED:int = 2;
public static var DISABLED:int = 3;
public function MenuItem(_arg1, _arg2:int, _arg3:DisplayObject, _arg4:DisplayObject=null, _arg5:DisplayObject=null){
value = _arg1;
normal = _arg3;
highlight = (_arg4) ? _arg4 : normal;
disabled = (_arg5) ? _arg5 : normal;
_state = -1;
state = _arg2;
}
public function get state():int{
return (_state);
}
public function set state(_arg1:int):void{
var _local2:DisplayObject;
if (_state == _arg1){
return;
};
switch (_arg1){
case NORMAL:
buttonMode = true;
_local2 = normal;
break;
case HIGHLIGHT:
buttonMode = true;
_local2 = highlight;
break;
case DISABLED:
buttonMode = false;
_local2 = disabled;
break;
default:
return;
};
_state = _arg1;
if (child){
removeChild(child);
useHandCursor = false;
};
child = _local2;
if (child){
addChild(child);
useHandCursor = buttonMode;
};
}
public function processKey(_arg1:int):void{
}
public function get hitObject():DisplayObject{
return (child);
}
public function processClick(_arg1:Point):void{
}
}
}//package
Section 48
//ObjectTile (ObjectTile)
package {
import flash.utils.*;
public class ObjectTile extends Tile {
protected var _dead:Boolean;
public var blocks:Boolean;
public var delay:int;
public var item:Boolean;
public var room:RoomTile;
public var oldRoom:RoomTile;
public var moveTimeLeft:int;
public var related:Array;
public var delayedAction:Function;
public function ObjectTile(_arg1:int, _arg2:RoomTile){
delay = 0;
super(_arg1, _arg2.x, _arg2.y);
related = [];
moveTimeLeft = 0;
_dead = false;
blocks = false;
item = false;
if ((((type >= Tile.BLOCK_START)) && ((type < Tile.BLOCK_END)))){
blocks = true;
} else {
if ((((type >= Tile.ITEM_START)) && ((type <= Tile.ITEM_END)))){
item = true;
};
};
room = _arg2;
room.addObject(this);
oldRoom = null;
delayedAction = null;
}
protected function useItem(_arg1:int, _arg2:int, _arg3:Array, _arg4:Boolean=false):Boolean{
var _local5:Boolean;
var _local6:int;
while (_local6 < _arg3.length) {
if ((((_arg3[_local6].type == _arg1)) && ((((_arg2 < 0)) || ((_arg2 == _arg3[_local6].state)))))){
_local5 = true;
if (_arg4){
_arg3.splice(_local6, 1);
};
break;
};
_local6++;
};
return (_local5);
}
public function set dead(_arg1:Boolean):void{
_dead = _arg1;
informListeners();
cleanup();
}
public function update():ObjectTile{
if (oldRoom == null){
oldRoom = room;
} else {
if (moveTimeLeft > 0){
moveTimeLeft = (moveTimeLeft - Level.STEP_DELTA);
if ((((moveTimeLeft <= 0)) && (!((oldRoom == room))))){
completeMove();
};
};
};
return (null);
}
public function canMoveIntoRoom(_arg1:int, _arg2:RoomTile):Boolean{
return (true);
}
public function move(_arg1:int, _arg2:Boolean=false):Boolean{
var _local3:RoomTile = room.neighbor(_arg1);
if (((((((room.exit(_arg1)) && (_local3))) && (_local3.enter(_arg1)))) || (_arg2))){
if (((canMoveIntoRoom(_arg1, _local3)) || (_arg2))){
moveTimeLeft = Level.MOVE_DELTA;
room.removeObject(this);
_local3.addObject(this);
room = _local3;
if (state != _arg1){
state = _arg1;
};
informListeners();
return (true);
};
};
return (false);
}
public function openDoor():void{
var newStyle:int;
var o:ObjectTile;
room.removeObject(this);
if (type == Tile.LOCK){
newStyle = ((style)==0) ? 0 : 2;
} else {
newStyle = 1;
};
type = Tile.LOCKOVERLAY;
style = newStyle;
blocks = false;
room.addObject(this);
SoundManager.playSound(SoundManager.EFFECT, SoundManager.openDoorSound, 10);
for each (o in related) {
o.dead = true;
};
delayedAction = function ():ObjectTile{
var _local1:ObjectTile = new ObjectTile(Tile.LOCKOVERLAY, room);
_local1.room = room;
_local1.style = (newStyle + 3);
return (_local1);
};
}
public function canActivate(_arg1:int, _arg2:Array):Boolean{
var _local4:ObjectTile;
var _local3 = !(blocks);
switch (type){
case Tile.LOCK:
_local3 = useItem(Tile.KEY, state, _arg2, false);
break;
case Tile.GOLDDOOR:
for each (_local4 in _arg2) {
if ((((_local4.type == Tile.TREASURE)) && ((_local4.state >= state)))){
_local3 = true;
};
};
break;
case Tile.DOOR:
if (((!((delay == 0))) && ((getTimer() <= delay)))){
_local3 = false;
} else {
for each (_local4 in _arg2) {
if (_local4.type == Tile.TREASURE){
_local3 = true;
openDoor();
};
};
};
break;
};
return (_local3);
}
public function get dead():Boolean{
return (_dead);
}
public function completeMove():void{
oldRoom = room;
}
override public function set y(_arg1:int):void{
}
public function deactivate(_arg1:int, _arg2:Array):void{
var o:ObjectTile;
var direction = _arg1;
var items = _arg2;
var newAction:Function;
switch (type){
case Tile.TRIGGER:
if (state == 0){
if (delayedAction == null){
newAction = function ():Array{
for each (o in related) {
o.deactivate(Level.NONE, null);
};
return (related);
};
} else {
delayedAction = null;
};
style = 0;
};
break;
case Tile.TRAPWALL:
case Tile.TRAPCEILING:
if ((((direction == Level.NONE)) && ((items == null)))){
SoundManager.playSound(SoundManager.EFFECT, SoundManager.slideSound, 10);
move(state, true);
state = ((state + 2) % 4);
};
break;
case Tile.WATERTRAP:
if ((((direction == Level.NONE)) && ((items == null)))){
SoundManager.playSound(SoundManager.EFFECT, SoundManager.waterSound, 10);
if ((((room.type == Tile.FLOOR)) && ((room.style == 0)))){
room.type = Tile.WATER;
} else {
if (room.type == Tile.WATER){
room.type = Tile.FLOOR;
};
};
};
break;
default:
break;
};
if (newAction != null){
if (delayedAction != null){
delayedAction = null;
} else {
delayedAction = newAction;
};
};
}
override public function set x(_arg1:int):void{
}
override public function get y():int{
return (((room)==null) ? -1 : room.y);
}
public function activate(_arg1:int, _arg2:Array):Boolean{
var o:ObjectTile;
var direction = _arg1;
var items = _arg2;
var success = !(blocks);
var newAction:Function;
switch (type){
case Tile.LOCK:
if (useItem(Tile.KEY, state, items, true)){
success = true;
openDoor();
};
break;
case Tile.GOLDDOOR:
for each (o in items) {
if ((((o.type == Tile.TREASURE)) && ((o.state >= state)))){
success = true;
openDoor();
break;
};
};
break;
case Tile.DOOR:
if (((!((delay == 0))) && ((getTimer() <= delay)))){
success = false;
} else {
for each (o in items) {
if (o.type == Tile.TREASURE){
success = true;
openDoor();
};
};
};
break;
case Tile.TRIGGER:
if (delayedAction == null){
newAction = function ():Array{
var _local1:Array = related;
for each (o in related) {
o.activate(Level.NONE, null);
};
if (state == 1){
related = [];
};
return (_local1);
};
} else {
delayedAction = null;
};
style = 1;
success = true;
break;
case Tile.TRAPWALL:
case Tile.TRAPCEILING:
if ((((direction == Level.NONE)) && ((items == null)))){
SoundManager.playSound(SoundManager.EFFECT, SoundManager.slideSound, 3);
move(state, true);
state = ((state + 2) % 4);
};
success = (type == Tile.TRAPCEILING);
break;
case Tile.ARROWTRAP:
if ((((direction == Level.NONE)) && ((items == null)))){
newAction = function ():ObjectTile{
var result:ObjectTile;
result = null;
result = new Creature(Tile.ARROW, room);
if (!result.move(state)){
result.dead = true;
result = null;
} else {
result.dead = true;
result = new Creature(Tile.ARROW, room);
result.state = state;
SoundManager.playSound(SoundManager.EFFECT, SoundManager.arrowFireSound, 3);
result.delayedAction = function ():ObjectTile{
result.move(state);
result.moveTimeLeft = (result.moveTimeLeft - Level.STEP_DELTA);
return (null);
};
};
return (result);
};
};
success = false;
break;
case Tile.WATERTRAP:
if ((((direction == Level.NONE)) && ((items == null)))){
SoundManager.playSound(SoundManager.EFFECT, SoundManager.waterSound, 3);
if ((((room.type == Tile.FLOOR)) && ((room.style == 0)))){
room.type = Tile.WATER;
} else {
if (room.type == Tile.WATER){
room.type = Tile.FLOOR;
};
};
};
success = true;
break;
case Tile.RAFT:
success = false;
if (room.neighbor(direction).type == Tile.WATER){
SoundManager.playSound(SoundManager.EFFECT, SoundManager.waterSound, 3);
success = move(direction);
};
break;
default:
break;
};
if (newAction != null){
if (delayedAction != null){
delayedAction = null;
} else {
delayedAction = newAction;
};
};
return (success);
}
public function cleanup():void{
if (room){
room.removeObject(this);
room = null;
oldRoom = null;
};
listeners = [];
}
override public function get x():int{
return (((room)==null) ? -1 : room.x);
}
}
}//package
Section 49
//Player (Player)
package {
import flash.utils.*;
import flash.ui.*;
public class Player extends Creature {
protected var _money:ObjectTile;
public var lastTime:int;
public var IDLE:int;// = 4000
public var lastActive:int;
public var moveOverride:Function;
public function Player(_arg1:RoomTile){
super(Tile.PLAYER, _arg1);
blocks = false;
room.occupied = false;
lastTime = getTimer();
lastActive = lastTime;
_money = new ObjectTile(Tile.TREASURE, _arg1);
_arg1.removeObject(_money);
_money.state = 0;
items = [_money];
}
public function get money():int{
return (_money.state);
}
public function set money(_arg1:int):void{
_money.state = _arg1;
}
override public function update():ObjectTile{
var _local1:ObjectTile;
var _local2:ObjectTile = super.update();
if (((!((oldRoom == null))) && (!((oldRoom == room))))){
_local1 = oldRoom.getObject(Tile.RAFT);
if (((!((_local1 == null))) && ((room.getObject(Tile.RAFT) == null)))){
if (_local1.activate(state, items)){
style = 0;
};
};
};
return (_local2);
}
override public function canMoveIntoRoom(_arg1:int, _arg2:RoomTile):Boolean{
var _local4:ObjectTile;
var _local5:Array;
var _local3:Boolean;
if (_arg2.occupied){
_local5 = [];
for each (_local4 in _arg2.objects) {
_local5.push(_local4);
};
for each (_local4 in _local5) {
if (((_local4.blocks) && (!(_local4.canActivate(_arg1, items))))){
_local3 = false;
};
};
if (_local3){
for each (_local4 in _local5) {
if (_local4.blocks){
_local4.activate(_arg1, items);
if (_local4.type == Tile.BLOCK){
pushing = true;
};
};
};
};
};
return (_local3);
}
override public function nextDirection():int{
var _local1:int = KeyHandler.getLastPressed([Keyboard.RIGHT, Keyboard.LEFT, Keyboard.UP, Keyboard.DOWN], lastTime);
lastTime = getTimer();
switch (_local1){
case Keyboard.UP:
_local1 = Level.UP;
break;
case Keyboard.RIGHT:
_local1 = Level.RIGHT;
break;
case Keyboard.DOWN:
_local1 = Level.DOWN;
break;
case Keyboard.LEFT:
_local1 = Level.LEFT;
break;
default:
_local1 = Level.NONE;
break;
};
if (moveOverride != null){
_local1 = moveOverride();
};
if (_local1 == Level.NONE){
idle = ((lastTime - lastActive) > IDLE);
} else {
lastActive = lastTime;
};
return (_local1);
}
public function hitsObject(_arg1:ObjectTile):void{
if (_dead){
return;
};
if (_arg1.item){
if (_arg1.type == Tile.TREASURE){
money++;
SoundManager.playSound(SoundManager.EFFECT, SoundManager.treasureSound, 15);
} else {
items.push(_arg1);
SoundManager.playSound(SoundManager.EFFECT, SoundManager.itemSound, 15);
};
_arg1.dead = true;
informListeners();
} else {
if (_arg1.type == Tile.ARROW){
_arg1.activate(Level.NONE, items);
SoundManager.playSound(SoundManager.EFFECT, SoundManager.hitSound, 3);
state = 0;
style = 5;
dead = true;
};
};
}
}
}//package
Section 50
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import mochi.as3.*;
import flash.utils.*;
public dynamic class Preloader extends MovieClip {
private var adDone:Boolean;
private var splash:Splash;
private var loadDone:Boolean;
public static var GAME_OPTIONS:Object = {id:"f283c17ca8b4aa4a", res:"640x450"};
public static var MAIN_CLASS:String = "TempleRaider";
public function Preloader(){
var k:String;
var sprite:Sprite;
super();
adDone = false;
loadDone = false;
var f:Function = function (_arg1:IOErrorEvent):void{
};
loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
var opts:Object = {};
for (k in GAME_OPTIONS) {
opts[k] = GAME_OPTIONS[k];
};
opts.ad_started = function ():void{
};
opts.ad_finished = function ():void{
adDone = true;
};
opts.clip = this;
sprite = new Sprite();
addChild(sprite);
MochiAd.showPreGameAd(opts);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(_arg1:Event):void{
if ((((loaderInfo.bytesLoaded == loaderInfo.bytesTotal)) && (adDone))){
MochiAd.unload(this);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
splash = new Splash();
splash.x = 100;
splash.y = 50;
addChild(splash);
splash.go(this);
};
}
public function splashPlay_Callback():void{
removeChild(splash);
var _local1:Class = Class(getDefinitionByName(MAIN_CLASS));
var _local2:Object = new (_local1);
parent.addChild((_local2 as DisplayObject));
}
}
}//package
Section 51
//RoomTile (RoomTile)
package {
public class RoomTile extends Tile {
private var doors:int;
public var left:RoomTile;
public var bottom:RoomTile;
public var objects:Array;
public var top:RoomTile;
public var right:RoomTile;
public var occupied:Boolean;
public function RoomTile(_arg1:int, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
objects = [];
occupied = false;
switch (type){
case WALL:
doors = 0;
break;
default:
doors = ((((1 << Level.UP) | (1 << Level.RIGHT)) | (1 << Level.DOWN)) | (1 << Level.LEFT));
break;
};
switch (type){
case FORCE:
state = 0;
break;
default:
break;
};
}
public function addObject(_arg1:ObjectTile):void{
objects.push(_arg1);
if (_arg1.blocks){
occupied = true;
};
}
override public function set state(_arg1:int):void{
super.state = _arg1;
if ((((type == Tile.ICE)) || ((type == Tile.FLOOR)))){
switch (state){
case 1:
doors = ((1 << Level.UP) | (1 << Level.RIGHT));
break;
case 2:
doors = ((1 << Level.DOWN) | (1 << Level.RIGHT));
break;
case 3:
doors = ((1 << Level.DOWN) | (1 << Level.LEFT));
break;
case 4:
doors = ((1 << Level.UP) | (1 << Level.LEFT));
break;
default:
doors = ((((1 << Level.UP) | (1 << Level.RIGHT)) | (1 << Level.DOWN)) | (1 << Level.LEFT));
break;
};
};
}
public function getObject(_arg1:int):ObjectTile{
var _local2:ObjectTile;
for each (_local2 in objects) {
if (_local2.type == _arg1){
return (_local2);
};
};
return (null);
}
public function cleanup():void{
right = (left = (top = (bottom = null)));
objects = [];
}
public function exit(_arg1:int):Boolean{
return (!(((doors & (1 << _arg1)) == 0)));
}
public function neighbor(_arg1:int):RoomTile{
var _local2:RoomTile;
switch (_arg1){
case Level.UP:
_local2 = top;
break;
case Level.RIGHT:
_local2 = right;
break;
case Level.DOWN:
_local2 = bottom;
break;
case Level.LEFT:
_local2 = left;
break;
default:
break;
};
return (_local2);
}
public function removeObject(_arg1:ObjectTile):void{
var _local2:Boolean;
var _local3:int;
while (_local3 < objects.length) {
if (objects[_local3] == _arg1){
objects.splice(_local3, 1);
_local3--;
} else {
if (objects[_local3].blocks){
_local2 = true;
};
};
_local3++;
};
occupied = _local2;
}
public function enter(_arg1:int):Boolean{
_arg1 = ((_arg1 + 2) % 4);
return (!(((doors & (1 << _arg1)) == 0)));
}
}
}//package
Section 52
//sndSlap (sndSlap)
package {
import flash.media.*;
public dynamic class sndSlap extends Sound {
}
}//package
Section 53
//SoundManager (SoundManager)
package {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class SoundManager {
public static const MUSIC:int = 0;
private static const NUM_CHANNELS:int = 2;
public static const EFFECT:int = 1;
public static var backgroundSound:Class = SoundManager_backgroundSound;
public static var hitSound:Class = SoundManager_hitSound;
public static var movieSound:Class = SoundManager_movieSound;
public static var pushBlockSound:Class = SoundManager_pushBlockSound;
public static var openDoorSound:Class = SoundManager_openDoorSound;
private static var volumes:Array;
public static var waterSound:Class = SoundManager_waterSound;
private static var initialized:Boolean = false;
public static var slideSound:Class = SoundManager_slideSound;
private static var channels:Array;
public static var delaySplashSound:Class = SoundManager_delaySplashSound;
public static var treasureSound:Class = SoundManager_treasureSound;
public static var splashSound:Class = SoundManager_splashSound;
private static var muted:Boolean;
public static var arrowFireSound:Class = SoundManager_arrowFireSound;
public static var itemSound:Class = SoundManager_itemSound;
public function SoundManager(){
if (!initialized){
initialize();
};
}
public static function playLoop(_arg1:int, _arg2:Class, _arg3:int=-1):void{
var sound:Sound;
var s:SoundChannel;
var f:Function;
var last:int;
var channel = _arg1;
var soundClass = _arg2;
var priority = _arg3;
if ((((((((channel < 0)) || ((channel >= NUM_CHANNELS)))) || (!(soundClass)))) || (!(canPlay(channel, soundClass, priority))))){
return;
};
sound = new (soundClass);
s = sound.play(0, 5000, volumes[channel]);
f = function (_arg1:Event):void{
var _local2:SoundData;
for each (_local2 in channels[channel]) {
if (_local2.soundChannel == s){
s = sound.play(0, 0, volumes[channel]);
s.addEventListener(Event.SOUND_COMPLETE, f);
_local2.soundChannel = s;
};
};
};
s.addEventListener(Event.SOUND_COMPLETE, f);
channels[channel].push(new SoundData(soundClass, s, priority, SoundData.LOOP_NORMAL));
if ((((channel == MUSIC)) && ((channels[MUSIC].length > 1)))){
last = (channels[MUSIC].length - 1);
crossFade(1000, channels[MUSIC][(last - 1)], channels[MUSIC][last]);
};
}
public static function setChannelVolume(_arg1:int, _arg2:Number):void{
var _local3:SoundData;
var _local4:SoundTransform;
if ((((((_arg1 < 0)) || ((_arg1 >= NUM_CHANNELS)))) || ((((_arg2 > 0)) && (muted))))){
return;
};
_arg2 = ((_arg2 < 0)) ? 0 : ((_arg2 > 1)) ? 1 : _arg2;
volumes[_arg1].volume = _arg2;
for each (_local3 in channels[_arg1]) {
_local4 = _local3.soundChannel.soundTransform;
_local4.volume = _arg2;
_local3.soundChannel.soundTransform = _local4;
};
}
private static function crossFade(_arg1:int, _arg2:SoundData, _arg3:SoundData):void{
var timer:Timer;
var fadeOutTransform:SoundTransform;
var fadeInTransform:SoundTransform;
var crossFadeStep:Function;
var crossFadeEnd:Function;
var timeOut = _arg1;
var fadeOut = _arg2;
var fadeIn = _arg3;
var delay:Number = 16.6667;
timer = new Timer(delay, Math.floor((timeOut / delay)));
fadeOutTransform = new SoundTransform(volumes[MUSIC].volume);
fadeInTransform = new SoundTransform(0);
fadeIn.soundChannel.soundTransform = fadeInTransform;
crossFadeStep = function (_arg1:TimerEvent):void{
fadeInTransform.volume = (volumes[MUSIC].volume * (timer.currentCount / timer.repeatCount));
fadeOutTransform.volume = (volumes[MUSIC].volume * (1 - (timer.currentCount / timer.repeatCount)));
fadeOut.soundChannel.soundTransform = fadeOutTransform;
fadeIn.soundChannel.soundTransform = fadeInTransform;
};
crossFadeEnd = function (_arg1:TimerEvent):void{
fadeIn.soundChannel.soundTransform = volumes[MUSIC];
endLoop(MUSIC, fadeOut.soundClass);
timer.removeEventListener(TimerEvent.TIMER, crossFadeStep);
timer.removeEventListener(TimerEvent.TIMER_COMPLETE, crossFadeEnd);
};
timer.addEventListener(TimerEvent.TIMER, crossFadeStep);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, crossFadeEnd);
timer.start();
}
public static function pauseSounds(_arg1:int, _arg2:int):void{
var i:int;
var positions:Array;
var data:Array;
var channel = _arg1;
var delay = _arg2;
if ((((channel < 0)) || ((channel >= NUM_CHANNELS)))){
return;
};
positions = [];
data = [];
i = 0;
while (i < channels[channel].length) {
if (channels[channel][i].loopType == SoundData.PLAY_ONCE){
data.push(channels[channel][i]);
positions.push(channels[channel][i].soundChannel.position);
};
i = (i + 1);
};
var timer:Timer = new Timer(delay, 1);
var timerCallback:Function = function (_arg1:TimerEvent):void{
var _local2:int;
while (_local2 < data.length) {
playSound(channel, data[_local2].soundClass, data[_local2].priority, positions[_local2]);
_local2++;
};
};
i = (channels[channel].length - 1);
while (i >= 0) {
if (channels[channel][i].loopType == SoundData.PLAY_ONCE){
channels[channel][i].soundChannel.stop();
channels[channel].splice(i, 1);
};
i = (i - 1);
};
timer.addEventListener(TimerEvent.TIMER, timerCallback);
timer.start();
}
private static function canPlay(_arg1:int, _arg2:Class, _arg3:int):Boolean{
var _local4:SoundData;
if ((((_arg1 == EFFECT)) && ((volumes[EFFECT].volume < 0.005)))){
return (false);
};
for each (_local4 in channels[_arg1]) {
if ((((_local4.soundClass == _arg2)) || ((_local4.priority > _arg3)))){
return (false);
};
};
return (true);
}
public static function endLoop(_arg1:int, _arg2:Class):void{
if ((((((_arg1 < 0)) || ((_arg1 >= NUM_CHANNELS)))) || (!(_arg2)))){
return;
};
var _local3:int;
while (_local3 < channels[_arg1].length) {
if (channels[_arg1][_local3].soundClass == _arg2){
channels[_arg1][_local3].soundChannel.stop();
channels[_arg1].splice(_local3, 1);
return;
};
_local3++;
};
}
public static function toggleSounds():void{
muted = !(muted);
if (!muted){
setChannelVolume(MUSIC, 0.3);
setChannelVolume(EFFECT, 1);
} else {
setChannelVolume(MUSIC, 0);
setChannelVolume(EFFECT, 0);
};
}
public static function playSound(_arg1:int, _arg2:Class, _arg3:int=-1, _arg4:int=0):void{
var s:SoundChannel;
var channel = _arg1;
var soundClass = _arg2;
var priority = _arg3;
var position = _arg4;
if ((((((((channel < 0)) || ((channel >= NUM_CHANNELS)))) || (!(soundClass)))) || (!(canPlay(channel, soundClass, priority))))){
return;
};
s = new (soundClass).play(position, 0, volumes[channel]);
var f:Function = function (_arg1:Event):void{
var _local2:int;
while (_local2 < channels[channel].length) {
if (channels[channel][_local2].soundChannel == s){
channels[channel].splice(_local2, 1);
};
_local2++;
};
};
s.addEventListener(Event.SOUND_COMPLETE, f);
channels[channel].push(new SoundData(soundClass, s, priority, SoundData.PLAY_ONCE));
}
public static function initialize():void{
channels = [];
volumes = [];
var _local1:int;
while (_local1 < NUM_CHANNELS) {
channels.push(new Array());
volumes.push(new SoundTransform());
_local1++;
};
muted = true;
toggleSounds();
initialized = true;
}
}
}//package
import flash.media.*;
class SoundData {
public var soundChannel:SoundChannel;
public var soundClass:Class;
public var priority:int;
public var loopType:int;
public static var LOOP_NORMAL:int = 1;
public static var LOOP_ADDITIVE:int = 2;
public static var PLAY_ONCE:int = 0;
private function SoundData(_arg1:Class, _arg2:SoundChannel, _arg3:int, _arg4:int){
soundClass = _arg1;
soundChannel = _arg2;
loopType = _arg4;
priority = _arg3;
}
}
Section 54
//SoundManager_arrowFireSound (SoundManager_arrowFireSound)
package {
import mx.core.*;
public class SoundManager_arrowFireSound extends SoundAsset {
}
}//package
Section 55
//SoundManager_backgroundSound (SoundManager_backgroundSound)
package {
import mx.core.*;
public class SoundManager_backgroundSound extends SoundAsset {
}
}//package
Section 56
//SoundManager_delaySplashSound (SoundManager_delaySplashSound)
package {
import mx.core.*;
public class SoundManager_delaySplashSound extends SoundAsset {
}
}//package
Section 57
//SoundManager_hitSound (SoundManager_hitSound)
package {
import mx.core.*;
public class SoundManager_hitSound extends SoundAsset {
}
}//package
Section 58
//SoundManager_itemSound (SoundManager_itemSound)
package {
import mx.core.*;
public class SoundManager_itemSound extends SoundAsset {
}
}//package
Section 59
//SoundManager_movieSound (SoundManager_movieSound)
package {
import mx.core.*;
public class SoundManager_movieSound extends SoundAsset {
}
}//package
Section 60
//SoundManager_openDoorSound (SoundManager_openDoorSound)
package {
import mx.core.*;
public class SoundManager_openDoorSound extends SoundAsset {
}
}//package
Section 61
//SoundManager_pushBlockSound (SoundManager_pushBlockSound)
package {
import mx.core.*;
public class SoundManager_pushBlockSound extends SoundAsset {
}
}//package
Section 62
//SoundManager_slideSound (SoundManager_slideSound)
package {
import mx.core.*;
public class SoundManager_slideSound extends SoundAsset {
}
}//package
Section 63
//SoundManager_splashSound (SoundManager_splashSound)
package {
import mx.core.*;
public class SoundManager_splashSound extends SoundAsset {
}
}//package
Section 64
//SoundManager_treasureSound (SoundManager_treasureSound)
package {
import mx.core.*;
public class SoundManager_treasureSound extends SoundAsset {
}
}//package
Section 65
//SoundManager_waterSound (SoundManager_waterSound)
package {
import mx.core.*;
public class SoundManager_waterSound extends SoundAsset {
}
}//package
Section 66
//Splash (Splash)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Splash extends MovieClip {
public var hand:MovieClip;
public var btnUrl:SimpleButton;
private var caller:Object;
public static var SERVER_URL:String = "http://www.gimme5games.com";
public function splashEnterFrame(_arg1:Event):void{
if (this.currentFrame == this.totalFrames){
this.removeEventListener(Event.ENTER_FRAME, splashEnterFrame);
this.stop();
caller.splashPlay_Callback();
};
}
public function onButtonPress(_arg1:MouseEvent):void{
var _local2:URLRequest;
switch (_arg1.target.name){
case "btnUrl":
_local2 = new URLRequest(SERVER_URL);
navigateToURL(_local2, "_blank");
break;
};
}
public function go(_arg1:Object):void{
this.caller = _arg1;
this.addEventListener(Event.ENTER_FRAME, splashEnterFrame);
this["btnUrl"].addEventListener(MouseEvent.MOUSE_DOWN, onButtonPress);
}
}
}//package
Section 67
//SpriteDisplay (SpriteDisplay)
package {
import flash.display.*;
import flash.utils.*;
public class SpriteDisplay extends Sprite {
protected var items:Dictionary;
protected var itemList:Array;
protected var field:String;
protected var _object;
private static var WIDTH:int = 4;
private static var HEIGHT:int = 1;
public function SpriteDisplay(_arg1:String){
field = _arg1;
items = new Dictionary();
itemList = [];
}
public function set object(_arg1):void{
if (((_object) && (_object.hasOwnProperty("removeEventListener")))){
_object.removeEventListener(objectChanged);
};
_object = _arg1;
if (((_object) && (_object.hasOwnProperty("addEventListener")))){
_object.addEventListener(objectChanged);
};
objectChanged();
}
public function cleanup():void{
if (((_object) && (_object.hasOwnProperty("removeEventListener")))){
_object.removeEventListener(objectChanged);
};
}
private function objectChanged():void{
var _local3:Tile;
var _local4:DisplayTile;
var _local5:int;
var _local1:Array = _object[field];
var _local2:Boolean;
_local5 = 0;
while (_local5 < itemList.length) {
_local4 = itemList[_local5];
if (_local1.indexOf(_local4.tile) == -1){
removeChild(_local4);
delete items[_local4.tile];
itemList.splice(_local5, 1);
_local5--;
_local2 = true;
};
_local5++;
};
for each (_local3 in _local1) {
if ((((_local3.type == Tile.TREASURE)) || (!((items[_local3] == null))))){
continue;
} else {
if (itemList.length < ((WIDTH * HEIGHT) - 1)){
_local4 = new DisplayTile(_local3);
_local2 = true;
addChild(_local4);
items[_local3] = _local4;
itemList.push(_local4);
};
};
};
if (_local2){
_local5 = 0;
while (_local5 < itemList.length) {
itemList[_local5].y = (DisplayTile.TileHeight * Math.floor((_local5 / WIDTH)));
itemList[_local5].x = (DisplayTile.TileWidth * (_local5 % WIDTH));
_local5++;
};
};
}
}
}//package
Section 68
//StickeeGame (StickeeGame)
package {
public class StickeeGame {
private var numUnlocked:Number;
private var numAchievements:Number;
private var gameId:Number;
private var gameName:String;
private var gameCode:String;
public function StickeeGame(_arg1:Number, _arg2:String, _arg3:String, _arg4:Number, _arg5:Number){
this.gameId = _arg1;
this.gameCode = _arg2;
this.gameName = _arg3;
this.numAchievements = _arg4;
this.numUnlocked = _arg5;
}
public function getGameName():String{
return (gameName);
}
public function getGameId():Number{
return (gameId);
}
public function getNumUnlocked():Number{
return (numUnlocked);
}
public function toString():String{
return ((((((((((("[" + getGameId()) + ",") + getGameCode()) + ",") + getGameName()) + ",") + getNumAchievements()) + ",") + getNumUnlocked()) + "]"));
}
public function getGameCode():String{
return (gameCode);
}
public function getNumAchievements():Number{
return (numAchievements);
}
}
}//package
Section 69
//TempleRaider (TempleRaider)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import mx.core.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class TempleRaider extends Sprite {
private var delay:int;
private var level:Level;
private var lastTime:int;
private var moneyNeeded:TextDisplay;
private var levelDisplay:LevelDisplay;
private var setList:Array;
private var achievements:Achievements;
private var setData:Dictionary;
private var background:Bitmap;
private var button:CallbackButton;
private var firstLoad:Boolean;
private var boxes:Array;
private var showing:Boolean;
private var chapter:Bitmap;
private var levelData:Dictionary;
private var bestTime:TextDisplay;
private var numFrames:int;
private var _paused:Boolean;
private var levelDescription:TextDisplay;
private var currentHelp:TextDisplay;
private var playerItems:SpriteDisplay;
private var keyHandler:KeyHandler;
private var currentTime:int;
private var requestedRate:int;
private var levels:Array;
private var levelTime:TextDisplay;
private var currentRate:int;
private static var storyMenuScreen:Class = TempleRaider_storyMenuScreen;
private static var mainMenuImage:Class = TempleRaider_mainMenuImage;
private static var restartLevelDisabledImage:Class = TempleRaider_restartLevelDisabledImage;
private static var soundImage:Class = TempleRaider_soundImage;
private static var moreGamesHighlightImage:Class = TempleRaider_moreGamesHighlightImage;
private static var continueHighlightImage:Class = TempleRaider_continueHighlightImage;
private static var achievementsImage:Class = TempleRaider_achievementsImage;
private static var startGameHighlightImage:Class = TempleRaider_startGameHighlightImage;
private static var homeURL:String = "http://wildcardware.com";
private static var introMovie:Class = TempleRaider_introMovie;
private static var restartLevelHighlightImage:Class = TempleRaider_restartLevelHighlightImage;
private static var restartLevelImage:Class = TempleRaider_restartLevelImage;
private static var chapterImage:Class = TempleRaider_chapterImage;
private static var menuScreen:Class = TempleRaider_menuScreen;
private static var backImage:Class = TempleRaider_backImage;
private static var pmURL:String = "http://www.gimme5games.com/index.jsp?id=pm_hub";
private static var infoScreen:Class = TempleRaider_infoScreen;
private static var storyScreen:Class = TempleRaider_storyScreen;
private static var startGameImage:Class = TempleRaider_startGameImage;
private static var endingMovie:Class = TempleRaider_endingMovie;
private static var quitLevelDisabledImage:Class = TempleRaider_quitLevelDisabledImage;
private static var achievementsHighlightImage:Class = TempleRaider_achievementsHighlightImage;
private static var backgroundImage:Class = TempleRaider_backgroundImage;
private static var backHighlightImage:Class = TempleRaider_backHighlightImage;
private static var moreGamesImage:Class = TempleRaider_moreGamesImage;
private static var saveGameName:String = "PhantomMansion2_Black";
private static var quitGameHighlightImage:Class = TempleRaider_quitGameHighlightImage;
private static var storyHighlightImage:Class = TempleRaider_storyHighlightImage;
private static var quitLevelHighlightImage:Class = TempleRaider_quitLevelHighlightImage;
private static var storyImage:Class = TempleRaider_storyImage;
private static var moreGamesURL:String = "http://www.gimme5games.com";
private static var quitLevelImage:Class = TempleRaider_quitLevelImage;
private static var logoImage:Class = TempleRaider_logoImage;
private static var pmLogoImage:Class = TempleRaider_pmLogoImage;
private static var continueImage:Class = TempleRaider_continueImage;
private static var soundHighlightImage:Class = TempleRaider_soundHighlightImage;
private static var quitGameImage:Class = TempleRaider_quitGameImage;
public function TempleRaider(){
levels = [["main", "eNrtnd1u4zYQhe/7FIJeIBxK1A+Q7E2xe9kC3X0BJ1FrFY4V2Opm/faVEzmI7bXFj5EdycurCODhkJwZcs4MaeR6VnwvZsFTeV9Pb0KtwmBalP9M6+bbhMHtorwtbkIJg/nkofl4mJTzMLgvlneL8rEuq/lN+Pu0qpZFMAkWVfUQfvotCK4X1dP6b/NVl7MiqFePTdcoDJb1pG6+VHjlmzfN8q5mr9S2+fqqdTon55PhOsBJhetmL0/qyU14tyjuy3rZJ1pGq7Sex+5wTTnl+TDeZvWuZq/UZwWtZs1XjN1wp6ez5jdy5Ohp8lfDG4KvDQuZ10Ux59KjrllugLrH+X5ec6TTTPdsOv+jnBcjUvm3p8ZDVudReD/76H2GPqrD0wJHOzPfPCgX9s3eDX8ZOuy+H4fNH5ML599DcchXKpT2JCg6H5X8Uv7NmOQ7ahUv+UL543z021opDkZKLzEJdOCSIj5qDq95Y518qPz0TF7qm33CdN7a2U+bL5QtXgZzPhOdHqhr9kftPq9vpB2YXW5VQpx9L8Zcs/02LRduxNdCPV+q/xanpvF+S/ggPJha1JnqOwOmD95TPsINL9z5RlHe9Hz2csL4GeucLvRRMquCZp/lUTcKPRye+/y+okeFrN86OEw0tmDkH1GFHtM17qsy/eX+SfWbjf1u1xvTN3vn880X7nx93SD73OoXyK16fQnyvh/JfOTvnLYp959OXD6y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NPZTy9UcxEhE4e5A15RfEOL3RbZVb/+7nRmbFUD+nywZAyWnw1WzVp/Ovb0ecO4Pj8R9Fy3roBUOAmpcDLBGgEbxOiCwz6GYkysdsb62FgfYLhTLSX2xwakMxHM7RwODgCsZGWDxGvnVMQ+0XJpNmUnA29qMm1jN0uryh1JFtgpGjSB47oRsPNf13YuHCYR+2wij66bTcwCSx7YIXyIED7kV8ZqWNm8phFCrQYwOTXNsKGU4fruAPHdAeK7A4QbAeK7A6CVxQSHCDhCGowR0jKMkFZPjLfUnBfc2nnQPCxE2msSasZxm6lYD9i/QG9uV5yg9ryE0OoSNFT5IqiMxJ1BBa0lr39d+Xg6coLqnMeEQgLxvOCBbF49+sjREyuykoKIrj6P3+bcpIaHT5GM4o6GijsKQhuoFKSRCryE6ggSqiNIqI4goTqChNKfGABjkiMEjLlcc+6s8+5A6Pjh/T+ZfPsfRkLR4g=="], ["credits", "eNrt2+1qgzAYhuH/O4rwnoDGui/QnkvVMDNcFQ3tPPtlIusYImUftWvvXw15XmOjF5FKmlRmZyq1t4UrU4m0qNLYp9L59q2orLWZSSUUtd28+EbemsK6TlRhury1jbP1NhVZ3yiVtPX+/dO3nK2Mcn3jD1iJ6tzGDWMExOcRn2tnEoyGsISlf23pLzoPp/StvvItfcLCxeILsHRKIsOljKficP5r/jT+/c7DfKIrWFEW8IACFHznNuv5NVvPH7PCw1l74CmBBzxcsYcjfyucsnCxmLcixLwVIcYSlrCEJWIsEWOJ+4klLGEJS8RYIsYSlrCEJSxhiRhLF3TJEYQgBCHoWh85CCJmNTrOUlNtetOq11R0KKpPJRo3FSZ19mxy101sDL6XT/V3U6eJw6HkcaiI5zcfj7XjcPFcif4y3uQU9YNMTSf4mE8SDP+gXL8BkDRQRQ=="]];
setList = [["switch1", ["Room Nineteen", "Room Twenty"]]];
super();
var _local1 = "f283c17ca8b4aa4a";
firstLoad = true;
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function startGame():void{
var numMoves:int;
var moves:Array;
var moveOverride:Function;
showing = true;
setUpPlayScreen();
loadData();
levelCompleteCallback("main", false, 0);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
if (firstLoad){
numMoves = 0;
moves = [Level.LEFT, Level.LEFT, Level.LEFT, Level.UP, Level.NONE];
moveOverride = function ():int{
if (numMoves >= moves.length){
level.player.moveOverride = null;
return (Level.NONE);
};
return (moves[numMoves++]);
};
level.player.moveOverride = moveOverride;
delay = 500;
firstLoad = false;
showInfo();
} else {
showing = false;
SoundManager.playLoop(SoundManager.MUSIC, SoundManager.backgroundSound);
};
}
public function init(_arg1=null):void{
var movie:MovieClipAsset;
var _numFrames:int;
var onMovieAdvance:Function;
var onMovieClick:Function;
var ignored = _arg1;
removeEventListener(Event.ADDED_TO_STAGE, init);
boxes = [];
movie = (new introMovie() as MovieClipAsset);
addChild(movie);
_numFrames = 0;
stage.frameRate = (requestedRate = (currentRate = 30));
onMovieAdvance = function (_arg1:Event):void{
_numFrames++;
if (_numFrames > 1135){
movieDone();
};
};
onMovieClick = function (_arg1:Event):void{
movieDone();
};
var movieDone:Function = function ():void{
movie.stop();
removeChild(movie);
afterMovieInit();
movie.removeEventListener(Event.ENTER_FRAME, onMovieAdvance);
removeEventListener(MouseEvent.CLICK, onMovieClick);
};
movie.addEventListener(Event.ENTER_FRAME, onMovieAdvance);
movie.play();
addEventListener(MouseEvent.CLICK, onMovieClick);
achievements = new Achievements();
achievements.callback = displayAchievement;
SoundManager.initialize();
SoundManager.playLoop(SoundManager.MUSIC, SoundManager.movieSound);
}
public function displayAchievement(_arg1:Sprite=null):void{
var b:Sprite;
var t:Timer;
var step:Function;
var finish:Function;
var box = _arg1;
if (box != null){
boxes.push(box);
};
if ((((((boxes.length > 0)) && (!(paused)))) && (!(showing)))){
b = boxes[0];
b.alpha = 0;
showing = true;
t = new Timer(16.67, 120);
step = function (_arg1:TimerEvent):void{
if (t.currentCount < 15){
b.alpha = (t.currentCount / 15);
} else {
if (t.currentCount == 15){
b.alpha = 1;
} else {
if (t.currentCount > 105){
b.alpha = (1 - ((t.currentCount - 105) / 15));
};
};
};
};
finish = function (_arg1:TimerEvent):void{
removeChild(b);
showing = false;
displayAchievement();
};
boxes.splice(0, 1);
t.addEventListener(TimerEvent.TIMER, step);
t.addEventListener(TimerEvent.TIMER_COMPLETE, finish);
t.start();
addChild(b);
};
}
private function resetData():void{
var sharedObject:SharedObject;
try {
sharedObject = SharedObject.getLocal(saveGameName);
delete sharedObject.data.levelData;
delete sharedObject.data.achievements;
sharedObject.flush();
sharedObject.close();
} catch(ex) {
};
}
private function adjustFrameRate(_arg1:Event):void{
if (numFrames > (requestedRate + 5)){
currentRate--;
stage.frameRate = currentRate;
} else {
if ((((numFrames < requestedRate)) && ((currentRate < (requestedRate * 1.5))))){
currentRate = (currentRate + (requestedRate - numFrames));
stage.frameRate = currentRate;
};
};
numFrames = 0;
}
public function get paused():Boolean{
return (_paused);
}
private function loadData():void{
var sharedObject:SharedObject;
var $levels:Array;
var $achievements:Array;
var o:Object;
var userName:String = achievements.userName;
var cookieName:String = saveGameName;
if (((!((userName == null))) && ((userName.length > 0)))){
cookieName = (cookieName + ("_" + userName));
};
try {
sharedObject = SharedObject.getLocal(cookieName);
$levels = sharedObject.data.levelData;
$achievements = sharedObject.data.achievements;
for each (o in $levels) {
levelData[o.name].defeated = o.defeated;
levelData[o.name].bestTime = o.bestTime;
if (o.defeated){
firstLoad = false;
};
};
achievements.loadProgress($levels, $achievements);
sharedObject.close();
} catch(ex) {
};
}
private function onNewFrame(_arg1:Event):void{
numFrames++;
}
public function setUpPlayScreen():void{
while (numChildren > 0) {
removeChildAt((numChildren - 1));
};
addChild(keyHandler);
background = new backgroundImage();
addChild(background);
levelDisplay = new LevelDisplay();
levelDisplay.x = 17;
levelDisplay.y = 17;
addChild(levelDisplay);
var _local1:Array = [new GlowFilter(0, 0.8, 8, 8, 2), new DropShadowFilter(0, 90)];
levelDescription = new TextDisplay("description", TextFormatAlign.CENTER, 172, 28, 18, 16108585, _local1);
levelDescription.x = 451;
levelDescription.y = 227;
addChild(levelDescription);
chapter = new chapterImage();
chapter.x = 446;
chapter.y = 184;
addChild(chapter);
levelTime = new TextDisplay("currentTime", TextFormatAlign.LEFT, 59, 38, 25);
levelTime.x = 459;
levelTime.y = 400;
addChild(levelTime);
bestTime = new TextDisplay("bestLevelTime", TextFormatAlign.LEFT, 59, 38, 25);
bestTime.x = 560;
bestTime.y = 400;
addChild(bestTime);
moneyNeeded = new TextDisplay("moneyNeeded", TextFormatAlign.LEFT, 33, 38, 25);
moneyNeeded.x = 543;
moneyNeeded.y = 350;
addChild(moneyNeeded);
currentHelp = new TextDisplay("currentDescription", TextFormatAlign.CENTER, 180, 100, 15);
currentHelp.x = 445;
currentHelp.y = 250;
currentHelp.addListener(currentHelpChanged);
addChild(currentHelp);
playerItems = new SpriteDisplay("items");
playerItems.x = 465;
playerItems.y = 318;
addChild(playerItems);
}
private function levelCompleteCallback(_arg1:String, _arg2:Boolean, _arg3:int):void{
var _local5:int;
var _local6:LevelState;
var _local7:ObjectTile;
var _local8:Array;
var _local9:RoomTile;
var _local10:Array;
var _local11:Boolean;
var _local12:String;
var _local13:int;
if (levelData[_arg1] == null){
return;
};
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
if (((((((_arg2) && (!((level == null))))) && (!((level.name == "main"))))) && (!((levelData[level.name] == null))))){
levelData[level.name].defeated = true;
if ((((_arg3 < levelData[level.name].bestTime)) || ((levelData[level.name].bestTime <= 0)))){
levelData[level.name].bestTime = _arg3;
};
achievements.levelComplete(level);
saveData();
};
var _local4:Level = new Level(levelData[_arg1].data);
currentHelp.visible = true;
if (_arg1 == "main"){
currentHelp.visible = false;
_local5 = 0;
for each (_local6 in levelData) {
if (_local6.defeated){
_local5++;
};
};
delay = 250;
for each (_local8 in _local4.tiles) {
for each (_local9 in _local8) {
if ((((_local9.type == Tile.EXIT)) && (!((levelData[_local9.data] == null))))){
if (((!((level == null))) && ((_local9.data == level.name)))){
_local9.removeObject(_local4.player);
_local4.player.room = _local9.neighbor(Level.DOWN);
for each (_local7 in _local9.objects) {
if (_local7.type == Tile.DOOR){
_local7.delay = (getTimer() + 1000);
};
};
};
if (levelData[_local9.data].unlock <= _local5){
for each (_local7 in _local9.objects) {
if (_local7.type == Tile.GOLDDOOR){
_local7.type = Tile.DOOR;
_local7.style = (levelData[_local9.data].defeated) ? 1 : 0;
};
};
};
};
};
};
SoundManager.setChannelVolume(SoundManager.EFFECT, 0);
for each (_local7 in _local4.objects) {
if ((((_local7.type == Tile.TRAPWALL)) || ((_local7.type == Tile.TRAPCEILING)))){
_local10 = setData[_local7.data];
_local11 = (_local10.length > 0);
for each (_local12 in _local10) {
if ((((levelData[_local12] == null)) || (!(levelData[_local12].defeated)))){
_local11 = false;
};
};
if (_local11){
_local7.activate(Level.NONE, null);
};
};
};
SoundManager.setChannelVolume(SoundManager.EFFECT, 1);
} else {
if (_arg1 == "credits"){
_local13 = 0;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
removeChild(background);
background = null;
removeChild(bestTime);
bestTime = null;
removeChild(levelTime);
levelTime = null;
removeChild(levelDescription);
levelDescription = null;
removeChild(moneyNeeded);
moneyNeeded = null;
removeChild(currentHelp);
currentHelp = null;
removeChild(playerItems);
playerItems = null;
removeChild(chapter);
chapter = null;
removeChild(levelDisplay);
levelDisplay.cleanup();
levelDisplay = null;
level.cleanup();
level = null;
playEnding();
};
};
if (_arg1 != "credits"){
levelDisplay.level = _local4;
if (level){
level.cleanup();
};
level = _local4;
lastTime = getTimer();
currentTime = 0;
bestTime.object = levelData[level.name];
levelTime.object = level;
levelDescription.object = level;
moneyNeeded.object = level;
currentHelp.object = level;
playerItems.object = level.player;
level.completeCallback = levelCompleteCallback;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
};
}
private function onEnterFrame(_arg1:Event):void{
var _local2:int = getTimer();
var _local3:int = (_local2 - lastTime);
if (delay > 0){
delay = (delay - _local3);
} else {
if (!paused){
currentTime = (currentTime + _local3);
while ((((currentTime > 0)) && (level))) {
currentTime = (currentTime - Level.STEP_DELTA);
level.update();
};
if (levelDisplay){
levelDisplay.update(_local3);
};
};
};
lastTime = _local2;
}
private function restartLevel():void{
levelCompleteCallback(level.name, false, 0);
}
private function saveData():void{
var o:Object;
var levelName:String;
var a:Array;
var sharedObject:SharedObject;
var $levels:Array = [];
var $achievements:Array = achievements.saveProgress();
var userName:String = achievements.userName;
var cookieName:String = saveGameName;
if (((!((userName == null))) && ((userName.length > 0)))){
cookieName = (cookieName + ("_" + userName));
};
for each (a in levels) {
levelName = a[0];
o = {name:levelName, defeated:levelData[levelName].defeated, bestTime:levelData[levelName].bestTime};
$levels.push(o);
};
try {
sharedObject = SharedObject.getLocal(cookieName);
sharedObject.data.levelData = $levels;
sharedObject.data.achievements = $achievements;
sharedObject.flush();
sharedObject.close();
} catch(ex) {
};
}
private function onKeyDown(_arg1:KeyboardEvent):void{
if (((!(paused)) && ((((_arg1.keyCode == Keyboard.ESCAPE)) || ((_arg1.keyCode == Keyboard.SPACE)))))){
showMenu();
};
}
private function showInfo():void{
var menu:Menu;
var colorTransform:ColorTransform;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
var items:Array = [new MenuItem(0, MenuItem.NORMAL, new continueImage(), new continueHighlightImage())];
var backgroundImage:Bitmap = new infoScreen();
backgroundImage.x = -58;
backgroundImage.y = -353;
colorTransform = new ColorTransform(1, 1, 1, 0);
levelDisplay.colorTransform = colorTransform;
var confirmCallback:Function = function (_arg1:int):void{
var timer:Timer;
var step:Function;
var removeMenu:Function;
var value = _arg1;
timer = new Timer(16.667, (1000 / 16.667));
step = function (_arg1:TimerEvent):void{
colorTransform.alphaMultiplier = (1 - (timer.currentCount / timer.repeatCount));
menu.colorTransform = colorTransform;
colorTransform.alphaMultiplier = (1 - colorTransform.alphaMultiplier);
levelDisplay.colorTransform = colorTransform;
};
removeMenu = function (_arg1:TimerEvent):void{
colorTransform.alphaMultiplier = 1;
levelDisplay.colorTransform = colorTransform;
removeChild(menu);
paused = false;
addChild(keyHandler);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
timer.removeEventListener(TimerEvent.TIMER_COMPLETE, removeMenu);
timer.removeEventListener(TimerEvent.TIMER, step);
showing = false;
};
timer.addEventListener(TimerEvent.TIMER_COMPLETE, removeMenu);
timer.addEventListener(TimerEvent.TIMER, step);
timer.start();
menu.stopProcessing();
SoundManager.playLoop(SoundManager.MUSIC, SoundManager.backgroundSound);
};
menu = new Menu(items, new Rectangle(75, 370, 300, 50), confirmCallback, null, backgroundImage);
removeChild(keyHandler);
addChild(menu);
paused = true;
}
private function showMainMenu():void{
var menu:Menu;
var items:Array = [new MenuItem(0, MenuItem.NORMAL, new startGameImage(), new startGameHighlightImage()), new MenuItem(1, MenuItem.NORMAL, new moreGamesImage(), new moreGamesHighlightImage())];
var confirmCallback:Function = function (_arg1:int):void{
switch (_arg1){
case 0:
startGame();
break;
case 1:
navigateTo(moreGamesURL);
break;
};
};
var menuImage:Bitmap = new mainMenuImage();
menuImage.x = -245;
menuImage.y = -300;
menu = new Menu(items, new Rectangle(245, 300, 150, 100), confirmCallback, null, menuImage);
if (background != null){
removeChild(background);
background = null;
};
addChild(menu);
var text:TextDisplay = new TextDisplay("", TextFormatAlign.CENTER, 440, 50, 18, 16108585);
text.object = achievements.introMessage;
text.x = 100;
text.y = 395;
addChild(text);
}
private function navigateTo(_arg1:String):void{
var url = _arg1;
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request);
} catch(ex) {
};
}
public function afterMovieInit():void{
var _local1:Array;
var _local4:int;
DisplayTile.init();
delay = 0;
numFrames = 0;
stage.frameRate = (requestedRate = (currentRate = 60));
addEventListener(Event.ENTER_FRAME, onNewFrame);
var _local2:Timer = new Timer(1000);
_local2.addEventListener(TimerEvent.TIMER, adjustFrameRate);
_local2.start();
stage.scaleMode = StageScaleMode.NO_SCALE;
keyHandler = new KeyHandler();
levelData = new Dictionary();
var _local3:int;
while (_local3 < levels.length) {
_local1 = levels[_local3];
_local4 = (_local3 - 2);
_local4 = ((_local4 < 0)) ? 0 : _local4;
if (_local1[0] == "credits"){
_local4 = 20;
};
levelData[_local1[0]] = new LevelState(_local1[0], _local1[1], _local4);
_local3++;
};
setData = new Dictionary();
for each (_local1 in setList) {
setData[_local1[0]] = _local1[1];
};
showMainMenu();
}
public function set paused(_arg1:Boolean):void{
_paused = _arg1;
if (!_paused){
displayAchievement();
};
}
private function quitLevel():void{
levelCompleteCallback("main", false, 0);
}
private function showStoryMenu(_arg1:Menu=null):void{
var pmLogoButton:CallbackButton;
var logoButton:CallbackButton;
var menu:Menu;
var oldMenu = _arg1;
var pmLogo:Bitmap = new pmLogoImage();
pmLogo.x = 185;
pmLogo.y = 85;
pmLogoButton = new CallbackButton(pmLogo, pmLogo, pmLogo, navigateTo, pmURL);
var logo:Bitmap = new logoImage();
logo.x = 544;
logo.y = 354;
logoButton = new CallbackButton(logo, logo, logo, navigateTo, homeURL);
var items:Array = [new MenuItem(0, MenuItem.NORMAL, new backImage(), new backHighlightImage())];
var confirmCallback:Function = function (_arg1):void{
removeChild(pmLogoButton);
removeChild(logoButton);
removeChild(menu);
if (oldMenu){
oldMenu.startProcessing();
};
};
var backgroundImage:Bitmap = new storyMenuScreen();
backgroundImage.x = -5;
backgroundImage.y = -400;
menu = new Menu(items, new Rectangle(5, 400, 100, 50), confirmCallback, null, backgroundImage);
addChild(menu);
addChild(pmLogoButton);
addChild(logoButton);
}
private function currentHelpChanged():void{
var items:Array;
var menu:Menu;
var backgroundImage:Bitmap;
var confirmCallback:Function;
if (currentHelp.text == "showStory"){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
items = [new MenuItem(0, MenuItem.NORMAL, new continueImage(), new continueHighlightImage())];
backgroundImage = new storyScreen();
backgroundImage.x = -133;
backgroundImage.y = -368;
confirmCallback = function (_arg1:int):void{
removeChild(menu);
paused = false;
addChild(keyHandler);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
};
menu = new Menu(items, new Rectangle(150, 385, 180, 50), confirmCallback, null, backgroundImage);
removeChild(keyHandler);
addChild(menu);
paused = true;
} else {
if (currentHelp.text.length > 0){
playerItems.visible = false;
} else {
playerItems.visible = true;
};
};
}
public function playEnding():void{
var movie:MovieClipAsset;
var _numFrames:int;
var onMovieAdvance:Function;
stage.frameRate = (requestedRate = (currentRate = 30));
SoundManager.playLoop(SoundManager.MUSIC, SoundManager.movieSound);
movie = (new endingMovie() as MovieClipAsset);
addChild(movie);
onMovieAdvance = function (_arg1:Event):void{
_numFrames++;
if (_numFrames > 915){
movieDone();
};
};
var movieDone:Function = function ():void{
movie.stop();
removeChild(movie);
movie.removeEventListener(Event.ENTER_FRAME, onMovieAdvance);
stage.frameRate = (requestedRate = (currentRate = 60));
showMainMenu();
};
movie.play();
movie.addEventListener(Event.ENTER_FRAME, onMovieAdvance);
}
private function showMenu():void{
var menu:Menu;
var items:Array = [new MenuItem(0, MenuItem.NORMAL, new continueImage(), new continueHighlightImage()), new MenuItem(1, ((level.name == "main")) ? MenuItem.DISABLED : MenuItem.NORMAL, new restartLevelImage(), new restartLevelHighlightImage(), new restartLevelDisabledImage()), new MenuItem(2, ((level.name == "main")) ? MenuItem.DISABLED : MenuItem.NORMAL, new quitLevelImage(), new quitLevelHighlightImage(), new quitLevelDisabledImage()), new MenuItem(-1, MenuItem.NORMAL, null), new MenuItem(3, MenuItem.NORMAL, new achievementsImage(), new achievementsHighlightImage()), new MenuItem(4, MenuItem.NORMAL, new storyImage(), new storyHighlightImage()), new MenuItem(5, MenuItem.NORMAL, new quitGameImage(), new quitGameHighlightImage()), new MenuItem(-1, MenuItem.NORMAL, null), new MenuItem(6, MenuItem.NORMAL, new soundImage(), new soundHighlightImage())];
var confirmCallback:Function = function (_arg1:int):void{
var aMenu:Menu;
var a:Array;
var aCallback:Function;
var screen:Sprite;
var value = _arg1;
var removeMenu:Boolean;
switch (value){
case 1:
restartLevel();
break;
case 2:
quitLevel();
break;
case 3:
a = [new MenuItem(0, MenuItem.NORMAL, new backImage(), new backHighlightImage())];
aCallback = function (_arg1):void{
menu.startProcessing();
removeChild(aMenu);
};
screen = achievements.achievementScreen;
screen.x = -35;
screen.y = -358;
aMenu = new Menu(a, new Rectangle(52, 375, 100, 50), aCallback, null, screen);
addChild(aMenu);
menu.stopProcessing();
removeMenu = false;
break;
case 4:
showStoryMenu(menu);
removeMenu = false;
menu.stopProcessing();
break;
case 5:
navigateTo(pmURL);
removeMenu = false;
break;
case 6:
SoundManager.toggleSounds();
removeMenu = false;
break;
default:
break;
};
if (removeMenu){
removeChild(menu);
paused = false;
addChild(keyHandler);
};
};
var backgroundImage:Bitmap = new menuScreen();
backgroundImage.x = -38;
backgroundImage.y = -43;
menu = new Menu(items, new Rectangle(55, 60, 370, 370), confirmCallback, null, backgroundImage, 7);
removeChild(keyHandler);
addChild(menu);
paused = true;
}
}
}//package
class LevelState {
public var data:String;
public var name:String;
public var bestTime:int;
public var defeated:Boolean;
public var unlock:int;
private function LevelState(_arg1:String, _arg2:String, _arg3:int, _arg4:Boolean=false, _arg5:int=-1){
name = _arg1;
data = _arg2;
defeated = _arg4;
bestTime = _arg5;
unlock = _arg3;
}
public function get bestLevelTime():String{
var _local1:String;
var _local2:int;
if (defeated){
_local2 = bestTime;
_local1 = (((((((_local2 / 60) < 10)) ? "0" : "" + Math.floor((_local2 / 60))) + ":") + (((_local2 % 60) < 10)) ? "0" : "") + (_local2 % 60));
} else {
_local1 = " --:--";
};
return (_local1);
}
}
Section 70
//TempleRaider_achievementsHighlightImage (TempleRaider_achievementsHighlightImage)
package {
import mx.core.*;
public class TempleRaider_achievementsHighlightImage extends BitmapAsset {
}
}//package
Section 71
//TempleRaider_achievementsImage (TempleRaider_achievementsImage)
package {
import mx.core.*;
public class TempleRaider_achievementsImage extends BitmapAsset {
}
}//package
Section 72
//TempleRaider_backgroundImage (TempleRaider_backgroundImage)
package {
import mx.core.*;
public class TempleRaider_backgroundImage extends BitmapAsset {
}
}//package
Section 73
//TempleRaider_backHighlightImage (TempleRaider_backHighlightImage)
package {
import mx.core.*;
public class TempleRaider_backHighlightImage extends BitmapAsset {
}
}//package
Section 74
//TempleRaider_backImage (TempleRaider_backImage)
package {
import mx.core.*;
public class TempleRaider_backImage extends BitmapAsset {
}
}//package
Section 75
//TempleRaider_chapterImage (TempleRaider_chapterImage)
package {
import mx.core.*;
public class TempleRaider_chapterImage extends BitmapAsset {
}
}//package
Section 76
//TempleRaider_continueHighlightImage (TempleRaider_continueHighlightImage)
package {
import mx.core.*;
public class TempleRaider_continueHighlightImage extends BitmapAsset {
}
}//package
Section 77
//TempleRaider_continueImage (TempleRaider_continueImage)
package {
import mx.core.*;
public class TempleRaider_continueImage extends BitmapAsset {
}
}//package
Section 78
//TempleRaider_endingMovie (TempleRaider_endingMovie)
package {
import mx.core.*;
import flash.utils.*;
public class TempleRaider_endingMovie extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function TempleRaider_endingMovie(){
dataClass = TempleRaider_endingMovie_dataClass;
super();
initialWidth = (0x3200 / 20);
initialHeight = (9600 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package
Section 79
//TempleRaider_endingMovie_dataClass (TempleRaider_endingMovie_dataClass)
package {
import mx.core.*;
public class TempleRaider_endingMovie_dataClass extends ByteArrayAsset {
}
}//package
Section 80
//TempleRaider_infoScreen (TempleRaider_infoScreen)
package {
import mx.core.*;
public class TempleRaider_infoScreen extends BitmapAsset {
}
}//package
Section 81
//TempleRaider_introMovie (TempleRaider_introMovie)
package {
import mx.core.*;
import flash.utils.*;
public class TempleRaider_introMovie extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function TempleRaider_introMovie(){
dataClass = TempleRaider_introMovie_dataClass;
super();
initialWidth = (0x3200 / 20);
initialHeight = (9000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package
Section 82
//TempleRaider_introMovie_dataClass (TempleRaider_introMovie_dataClass)
package {
import mx.core.*;
public class TempleRaider_introMovie_dataClass extends ByteArrayAsset {
}
}//package
Section 83
//TempleRaider_logoImage (TempleRaider_logoImage)
package {
import mx.core.*;
public class TempleRaider_logoImage extends BitmapAsset {
}
}//package
Section 84
//TempleRaider_mainMenuImage (TempleRaider_mainMenuImage)
package {
import mx.core.*;
public class TempleRaider_mainMenuImage extends BitmapAsset {
}
}//package
Section 85
//TempleRaider_menuScreen (TempleRaider_menuScreen)
package {
import mx.core.*;
public class TempleRaider_menuScreen extends BitmapAsset {
}
}//package
Section 86
//TempleRaider_moreGamesHighlightImage (TempleRaider_moreGamesHighlightImage)
package {
import mx.core.*;
public class TempleRaider_moreGamesHighlightImage extends BitmapAsset {
}
}//package
Section 87
//TempleRaider_moreGamesImage (TempleRaider_moreGamesImage)
package {
import mx.core.*;
public class TempleRaider_moreGamesImage extends BitmapAsset {
}
}//package
Section 88
//TempleRaider_pmLogoImage (TempleRaider_pmLogoImage)
package {
import mx.core.*;
public class TempleRaider_pmLogoImage extends BitmapAsset {
}
}//package
Section 89
//TempleRaider_quitGameHighlightImage (TempleRaider_quitGameHighlightImage)
package {
import mx.core.*;
public class TempleRaider_quitGameHighlightImage extends BitmapAsset {
}
}//package
Section 90
//TempleRaider_quitGameImage (TempleRaider_quitGameImage)
package {
import mx.core.*;
public class TempleRaider_quitGameImage extends BitmapAsset {
}
}//package
Section 91
//TempleRaider_quitLevelDisabledImage (TempleRaider_quitLevelDisabledImage)
package {
import mx.core.*;
public class TempleRaider_quitLevelDisabledImage extends BitmapAsset {
}
}//package
Section 92
//TempleRaider_quitLevelHighlightImage (TempleRaider_quitLevelHighlightImage)
package {
import mx.core.*;
public class TempleRaider_quitLevelHighlightImage extends BitmapAsset {
}
}//package
Section 93
//TempleRaider_quitLevelImage (TempleRaider_quitLevelImage)
package {
import mx.core.*;
public class TempleRaider_quitLevelImage extends BitmapAsset {
}
}//package
Section 94
//TempleRaider_restartLevelDisabledImage (TempleRaider_restartLevelDisabledImage)
package {
import mx.core.*;
public class TempleRaider_restartLevelDisabledImage extends BitmapAsset {
}
}//package
Section 95
//TempleRaider_restartLevelHighlightImage (TempleRaider_restartLevelHighlightImage)
package {
import mx.core.*;
public class TempleRaider_restartLevelHighlightImage extends BitmapAsset {
}
}//package
Section 96
//TempleRaider_restartLevelImage (TempleRaider_restartLevelImage)
package {
import mx.core.*;
public class TempleRaider_restartLevelImage extends BitmapAsset {
}
}//package
Section 97
//TempleRaider_soundHighlightImage (TempleRaider_soundHighlightImage)
package {
import mx.core.*;
public class TempleRaider_soundHighlightImage extends BitmapAsset {
}
}//package
Section 98
//TempleRaider_soundImage (TempleRaider_soundImage)
package {
import mx.core.*;
public class TempleRaider_soundImage extends BitmapAsset {
}
}//package
Section 99
//TempleRaider_startGameHighlightImage (TempleRaider_startGameHighlightImage)
package {
import mx.core.*;
public class TempleRaider_startGameHighlightImage extends BitmapAsset {
}
}//package
Section 100
//TempleRaider_startGameImage (TempleRaider_startGameImage)
package {
import mx.core.*;
public class TempleRaider_startGameImage extends BitmapAsset {
}
}//package
Section 101
//TempleRaider_storyHighlightImage (TempleRaider_storyHighlightImage)
package {
import mx.core.*;
public class TempleRaider_storyHighlightImage extends BitmapAsset {
}
}//package
Section 102
//TempleRaider_storyImage (TempleRaider_storyImage)
package {
import mx.core.*;
public class TempleRaider_storyImage extends BitmapAsset {
}
}//package
Section 103
//TempleRaider_storyMenuScreen (TempleRaider_storyMenuScreen)
package {
import mx.core.*;
public class TempleRaider_storyMenuScreen extends BitmapAsset {
}
}//package
Section 104
//TempleRaider_storyScreen (TempleRaider_storyScreen)
package {
import mx.core.*;
public class TempleRaider_storyScreen extends BitmapAsset {
}
}//package
Section 105
//TextDisplay (TextDisplay)
package {
import flash.display.*;
import flash.text.*;
public class TextDisplay extends Sprite {
protected var field:String;
protected var _object;
protected var textField:TextField;
private var listeners:Array;
private static var _Berlin:Class = TextDisplay__Berlin;
private static var _Huxtable:Class = TextDisplay__Huxtable;
private static var registered:Boolean = false;
public function TextDisplay(_arg1:String, _arg2:String=null, _arg3:int=150, _arg4:int=40, _arg5:int=18, _arg6:int=0, _arg7:Array=null, _arg8:String="_Huxtable"):void{
field = _arg1;
if (!registered){
Font.registerFont(_Huxtable);
Font.registerFont(_Berlin);
registered = true;
};
var _local9:TextFormat = new TextFormat(_arg8, _arg5, _arg6, true);
if (((!(_arg2)) || ((_arg2.length == 0)))){
_arg2 = TextFormatAlign.LEFT;
};
_local9.align = _arg2;
_local9.leading = -4;
textField = new TextField();
textField.width = _arg3;
textField.height = _arg4;
textField.multiline = true;
textField.wordWrap = true;
textField.defaultTextFormat = _local9;
textField.embedFonts = true;
textField.antiAliasType = AntiAliasType.ADVANCED;
textField.selectable = false;
if (_arg7){
textField.filters = _arg7;
};
addChild(textField);
listeners = [];
}
public function set object(_arg1):void{
if (((_object) && (_object.hasOwnProperty("removeEventListener")))){
_object.removeEventListener(objectChanged);
};
_object = _arg1;
if (((_object) && (_object.hasOwnProperty("addEventListener")))){
_object.addEventListener(objectChanged);
};
objectChanged();
}
public function cleanup():void{
if (((_object) && (_object.hasOwnProperty("removeEventListener")))){
_object.removeEventListener(objectChanged);
};
}
public function get text():String{
return (textField.text);
}
public function addListener(_arg1:Function):void{
listeners.push(_arg1);
}
protected function informListeners():void{
var _local1:Function;
for each (_local1 in listeners) {
_local1();
};
}
public function objectChanged():void{
var _local1:String;
if ((_object is String)){
_local1 = _object;
} else {
_local1 = _object[field].toString();
};
if (_local1 != textField.text){
textField.text = _local1;
informListeners();
};
}
public function removeListener(_arg1:Function):void{
var _local2:int;
while (_local2 < listeners.length) {
if (listeners[_local2] == _arg1){
listeners.splice(_local2, 1);
break;
};
_local2++;
};
}
}
}//package
Section 106
//TextDisplay__Berlin (TextDisplay__Berlin)
package {
import mx.core.*;
public class TextDisplay__Berlin extends FontAsset {
}
}//package
Section 107
//TextDisplay__Huxtable (TextDisplay__Huxtable)
package {
import mx.core.*;
public class TextDisplay__Huxtable extends FontAsset {
}
}//package
Section 108
//Tile (Tile)
package {
public class Tile {
protected var _x:int;
protected var _data:String;
protected var _state:int;
protected var _type:int;
protected var _style:int;
protected var _y:int;
protected var listeners:Array;
public static var OVERLAY_START:int = 40;
public static var GROUND:int = 8;
public static var ITEM_END:int = 31;
public static var GOLDDOOR:int = 10;
public static var ARROWTRAP:int = 13;
public static var TRIGGER:int = 16;
public static var EXIT:int = 2;
public static var SHADOW:int = 20;
public static var WATERTRAP:int = 19;
public static var ITEM_START:int = 24;
public static var LOCK:int = 9;
public static var EMPTY:int = 7;
public static var DOOR:int = 12;
public static var TREASURE:int = 25;
public static var LOCKOVERLAY:int = 42;
public static var FIRE:int = 4;
public static var OBJECT_END:int = 23;
public static var SIGN:int = 17;
public static var KEY:int = 24;
public static var OBJECT_START:int = 16;
public static var RAFT:int = 18;
public static var CREATURE_START:int = 32;
public static var WALL:int = 1;
public static var FORCE:int = 6;
public static var SUCTION:int = 27;
public static var OVERLAY_END:int = 48;
public static var FIREPROOF:int = 28;
public static var CREATURE_END:int = 39;
public static var ROOM_END:int = 7;
public static var ROOM_START:int = 0;
public static var TRAPCEILING:int = 41;
public static var PLAYER:int = 32;
public static var FLIPPERS:int = 26;
public static var BLOCK_END:int = 15;
public static var ICE:int = 5;
public static var FLOOR:int = 0;
public static var BLOCK:int = 33;
public static var BLOCK_START:int = 8;
public static var CEILING:int = 40;
public static var WATER:int = 3;
public static var ARROW:int = 34;
public static var SKATES:int = 29;
public static var TRAPWALL:int = 11;
public function Tile(_arg1:int, _arg2:int, _arg3:int){
_state = -1;
_type = _arg1;
_data = "";
_style = 0;
_x = _arg2;
_y = _arg3;
listeners = [];
}
public function get y():int{
return (_y);
}
public function removeEventListener(_arg1:Function):void{
var _local2:int;
while (_local2 < listeners.length) {
if (listeners[_local2] == _arg1){
listeners.splice(_local2, 1);
break;
};
_local2++;
};
}
public function addEventListener(_arg1:Function):void{
listeners.push(_arg1);
}
public function get state():int{
return (_state);
}
public function set data(_arg1:String):void{
_data = _arg1;
}
protected function informListeners():void{
var _local1:Function;
for each (_local1 in listeners) {
_local1();
};
}
public function get type():int{
return (_type);
}
public function set y(_arg1:int):void{
_y = _arg1;
informListeners();
}
public function set state(_arg1:int):void{
_state = _arg1;
informListeners();
}
public function set style(_arg1:int):void{
_style = _arg1;
informListeners();
}
public function get data():String{
return (_data);
}
public function set x(_arg1:int):void{
_x = _arg1;
informListeners();
}
public function get style():int{
return (_style);
}
public function get x():int{
return (_x);
}
public function set type(_arg1:int):void{
_type = _arg1;
informListeners();
}
}
}//package