STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229473
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2574 · P5148

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/34484566?noj=FRM34484566-10DC" width="1" height="1"></div>

Don´t Look Back.swf

This is the info page for
Flash #50957

(Click the ID number above for more basic data on this flash file.)


Text
www.kongregate.com

ActionScript [AS3]

Section 1
//KeyPoll (bigroom.input.KeyPoll) package bigroom.input { import flash.events.*; import flash.display.*; import flash.utils.*; public class KeyPoll { private var states:ByteArray; public var press:Boolean;// = false public var click:Boolean;// = false public var onscreen:Boolean;// = true public var hasclicked:Boolean;// = false private var dispObj:DisplayObject; public function KeyPoll(_arg1:DisplayObject){ states = new ByteArray(); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); dispObj = _arg1; dispObj.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true); dispObj.addEventListener(KeyboardEvent.KEY_UP, keyUpListener, false, 0, true); dispObj.addEventListener(Event.ACTIVATE, activateListener, false, 0, true); dispObj.addEventListener(Event.DEACTIVATE, deactivateListener, false, 0, true); dispObj.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener); dispObj.addEventListener(MouseEvent.MOUSE_UP, mouseUpListener); dispObj.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); dispObj.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); } public function mouseOutHandler(_arg1:MouseEvent):void{ onscreen = false; } public function isUp(_arg1:uint):Boolean{ return (((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0)); } private function activateListener(_arg1:Event):void{ var _local2:int; while (_local2 < 8) { states[_local2] = 0; _local2++; }; } public function isDown(_arg1:uint):Boolean{ return (!(((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0))); } private function keyUpListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] & ~((1 << (_arg1.keyCode & 7)))); } private function deactivateListener(_arg1:Event):void{ var _local2:int; while (_local2 < 8) { states[_local2] = 0; _local2++; }; } public function mouseOverHandler(_arg1:MouseEvent):void{ onscreen = true; } public function mouseUpListener(_arg1:MouseEvent):void{ press = false; click = false; hasclicked = false; } public function mouseDownListener(_arg1:MouseEvent):void{ press = true; click = true; hasclicked = true; } private function keyDownListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] | (1 << (_arg1.keyCode & 7))); } } }//package bigroom.input
Section 2
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent) package com.kongregate.as3.client.events { import flash.events.*; public class KongregateEvent extends Event { public static const COMPLETE:String = "component_api_available"; public function KongregateEvent(_arg1:String){ super(_arg1); } } }//package com.kongregate.as3.client.events
Section 3
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService) package com.kongregate.as3.client.services { import flash.events.*; public class AbstractShadowService extends EventDispatcher { protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{ trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4)); } } }//package com.kongregate.as3.client.services
Section 4
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow) package com.kongregate.as3.client.services { public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices { private var mode:String; public function HighScoreServiceShadow(){ mode = ""; } public function submit(_arg1:Number, _arg2:String=null):void{ alert("IHighScoreServices", "submit", arguments); } public function connect():Boolean{ alert("IKongregateServices", "connect"); return (true); } public function requestList(_arg1:Function):void{ alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]")); _arg1({success:false}); } public function setMode(_arg1:String):void{ alert("IHighScoreServices", "setMode", arguments); this.mode = _arg1; } } }//package com.kongregate.as3.client.services
Section 5
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices) package com.kongregate.as3.client.services { public interface IHighScoreServices { function setMode(_arg1:String):void; function submit(_arg1:Number, _arg2:String=null):void; function requestList(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 6
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices) package com.kongregate.as3.client.services { import flash.events.*; public interface IKongregateServices extends IEventDispatcher { function getPlayerInfo(_arg1:Function):void; function connect(_arg1:Number=-1):Boolean; } }//package com.kongregate.as3.client.services
Section 7
//IStatServices (com.kongregate.as3.client.services.IStatServices) package com.kongregate.as3.client.services { public interface IStatServices { function submitArray(_arg1:Array):void; function submit(_arg1:String, _arg2:Number):void; } }//package com.kongregate.as3.client.services
Section 8
//IUserServices (com.kongregate.as3.client.services.IUserServices) package com.kongregate.as3.client.services { public interface IUserServices { function getName():String; function getPlayerInfo(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 9
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow) package com.kongregate.as3.client.services { public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices { public function getName():String{ alert("IKongregateServices", "getName"); return ("Guest"); } public function connect(_arg1:Number=-1):Boolean{ alert("IKongregateServices", "connect", arguments); return (true); } public function getPlayerInfo(_arg1:Function):void{ alert("IKongregateServices", "getPlayerInfo"); _arg1(new Object()); } } }//package com.kongregate.as3.client.services
Section 10
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow) package com.kongregate.as3.client.services { public class StatServiceShadow extends AbstractShadowService implements IStatServices { public function submitArray(_arg1:Array):void{ alert("IStatServices", "submitArray", arguments); } public function submit(_arg1:String, _arg2:Number):void{ alert("IStatServices", "submitStat", arguments); } } }//package com.kongregate.as3.client.services
Section 11
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow) package com.kongregate.as3.client.services { public class UserServiceShadow extends AbstractShadowService implements IUserServices { public function getName():String{ alert("UserService", "getName"); return ("Guest"); } public function getPlayerInfo(_arg1:Function):void{ alert("UserService", "getPlayerInfo"); _arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""}); } } }//package com.kongregate.as3.client.services
Section 12
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; public interface IAPIBootstrap { function init(_arg1:Event=null, _arg2:Stage=null):void; function hideLog():void; function showLog(_arg1:int=0):void; } }//package com.kongregate.as3.client
Section 13
//KongregateAPI (com.kongregate.as3.client.KongregateAPI) package com.kongregate.as3.client { import flash.events.*; import com.kongregate.as3.client.services.*; import flash.display.*; import flash.system.*; import com.kongregate.as3.client.events.*; import flash.net.*; import flash.utils.*; import flash.errors.*; public class KongregateAPI extends Sprite { private const VERSION:Number = 1; private var loader:Loader; private var loadedDomain:ApplicationDomain; private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices"; private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices"; private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices"; private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices"; private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf"; private static var _connected:Boolean; private static var kUser:IUserServices; private static var _loaded:Boolean; private static var kServices:IKongregateServices; private static var kScores:IHighScoreServices; private static var mInstance:KongregateAPI; private static var kStats:IStatServices; private static var kAPI:IAPIBootstrap; public function KongregateAPI(){ if (mInstance != null){ throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access.")); }; mInstance = this; this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } public function get loaded():Boolean{ return (_loaded); } public function get connected():Boolean{ return (_connected); } private function alertConnected(_arg1:TimerEvent=null):void{ var _local2:KongregateEvent; var _local3:Boolean; _local2 = new KongregateEvent(KongregateEvent.COMPLETE); _local3 = this.dispatchEvent(_local2); } private function init(_arg1:Event):void{ var _local2:Object; var _local3:String; var _local4:URLRequest; var _local5:LoaderContext; this.removeEventListener(Event.ADDED_TO_STAGE, init); _loaded = false; _connected = false; _local2 = LoaderInfo(root.loaderInfo).parameters; _local3 = _local2.api_path; if (_local3 == null){ trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded."); createShadowServices(); return; }; Security.allowDomain("*.kongregate.com"); Security.allowDomain("kongregatetrunk.com"); _local4 = new URLRequest(_local3); _local5 = new LoaderContext(false); _local5.applicationDomain = ApplicationDomain.currentDomain; _local5.securityDomain = SecurityDomain.currentDomain; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); loader.load(_local4, _local5); } public function get api():IAPIBootstrap{ return (kAPI); } private function loadComplete(_arg1:Event):void{ getServices(); } public function get scores():IHighScoreServices{ return (kScores); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ throw (new IOError(("API file not found. " + _arg1))); } public function get services():IKongregateServices{ return (kServices); } public function get stats():IStatServices{ return (kStats); } private function createShadowServices():void{ var _local1:Timer; trace(">>> Kongregate Shadow Services instantiated for local development.."); kServices = new KongregateServiceShadow(); kScores = new HighScoreServiceShadow(); kStats = new StatServiceShadow(); kUser = new UserServiceShadow(); _local1 = new Timer(200, 1); _local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected); _local1.start(); _connected = true; } public function get user():IUserServices{ return (kUser); } private function getServices():void{ var _local1:ApplicationDomain; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = ApplicationDomain.currentDomain; kAPI = IAPIBootstrap(loader.getChildAt(0)); this.addChild(loader); _local2 = _local1.getDefinition(CLASS_SERVICES); trace(_local2); kServices = _local2.getInstance(); _local3 = _local1.getDefinition(CLASS_SCORES); kScores = _local3.getInstance(); _local4 = _local1.getDefinition(CLASS_STATS); kStats = _local4.getInstance(); _local5 = _local1.getDefinition(CLASS_USER); kUser = _local5.getInstance(); kServices.connect(VERSION); _loaded = true; _connected = true; alertConnected(); } public static function getInstance():KongregateAPI{ if (!mInstance){ throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it.")); }; return (mInstance); } } }//package com.kongregate.as3.client
Section 14
//LivePreviewParent (fl.livepreview.LivePreviewParent) package fl.livepreview { import flash.display.*; import flash.utils.*; import flash.external.*; public class LivePreviewParent extends MovieClip { public var myInstance:DisplayObject; public function LivePreviewParent(){ super(); try { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; myInstance = getChildAt(0); onResize(stage.width, stage.height); if (ExternalInterface.available){ ExternalInterface.addCallback("onResize", onResize); ExternalInterface.addCallback("onUpdate", onUpdate); }; } catch(e) { }; } private function updateCollection(_arg1:Object, _arg2:String):void{ var _local3:Class; var _local4:Class; var _local5:Object; var _local6:int; var _local7:Object; var _local8:Object; var _local9:*; _local3 = Class(getDefinitionByName(_arg1.collectionClass)); _local4 = Class(getDefinitionByName(_arg1.collectionItemClass)); _local5 = new (_local3); _local6 = 0; while (_local6 < _arg1.collectionArray.length) { _local7 = new (_local4); _local8 = _arg1.collectionArray[_local6]; for (_local9 in _local8) { _local7[_local9] = _local8[_local9]; }; _local5.addItem(_local7); _local6++; }; myInstance[_arg2] = (_local5 as _local3); } public function onResize(_arg1:Number, _arg2:Number):void{ var setSizeFn:Function; var width = _arg1; var height = _arg2; setSizeFn = null; try { setSizeFn = myInstance["setSize"]; } catch(e:Error) { setSizeFn = null; }; if (setSizeFn != null){ setSizeFn(width, height); } else { myInstance.width = width; myInstance.height = height; }; } public function onUpdate(... _args):void{ var i:int; var name:String; var value:*; var updateArray = _args; i = 0; while ((i + 1) < updateArray.length) { try { name = String(updateArray[i]); value = updateArray[(i + 1)]; if ((((typeof(value) == "object")) && (value.__treatAsCollectionSpecialSauce__))){ updateCollection(value, name); } else { myInstance[name] = value; }; } catch(e:Error) { }; i = (i + 2); }; } } }//package fl.livepreview
Section 15
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.system.*; import flash.net.*; import flash.utils.*; 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:2000, 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:2000, 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://x.mochiads.com/srv/1/", 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:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; 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 16
//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.2.0.3794"; 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 17
//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.2.0.3794"; 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 18
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 19
//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 20
//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 21
//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 22
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3794"; } }//package mx.core
Section 23
//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.2.0.3794"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = _arg1; try { o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; } catch(e:SecurityError) { }; return (result); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 24
//dwgraphicsclass (dwgraphicsclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class dwgraphicsclass extends Sprite { public var temptile:BitmapData; public var images:Array; public var backgrounds:Array; public var alphamult:uint; public var bfontpos:int; public var tiles:Array; public var bfontmask:Array; public var bg_rect:Rectangle; public var screenbuffer:BitmapData; public var bfont:Array; public var bfont_rect:Rectangle; public var updatebackground:Boolean; public var cur:int; public var bfontlen:Array; public var bfontmask_rect:Rectangle; public var stemp:String; public var images_rect:Rectangle; public var buffer:BitmapData; public var temp:int; public var tiles_rect:Rectangle; public var temp3:int; public var temp2:int; public var backbuffer:BitmapData; public var screen:Bitmap; public var ct:ColorTransform; public var tl:Point; public function dwgraphicsclass(){ backgrounds = new Array(); images = new Array(); tiles = new Array(); bfont = new Array(); bfontmask = new Array(); bfontlen = new Array(); super(); } public function makebfont():void{ var _local2:Array; var _local5:Number; var _local6:BitmapData; var _local7:Rectangle; var _local1:Number = 0; while (_local1 < 16) { _local5 = 0; while (_local5 < 16) { _local6 = new BitmapData(8, 8, true, 0); _local7 = new Rectangle((_local5 * 8), (_local1 * 8), 8, 8); _local6.copyPixels(buffer, _local7, tl); bfont.push(_local6); _local5++; }; _local1++; }; _local5 = 0; while (_local5 < 0x0100) { bfontlen.push(6); _local5++; }; var _local3 = "4,3,5,7,6,7,6,3,4,4,7,7,3,5,2,5,6,5,6,6,6,6,6,6,6,6,2,3,5,5,5,6,7,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,4,5,4,5,6,4,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,5,3,5,6,4"; _local2 = new Array(); _local2 = _local3.split(","); var _local4:int; while (_local4 < 96) { bfontlen[(_local4 + 32)] = int(_local2[_local4]); _local4++; }; } public function drawentities(_arg1:entityclass, _arg2:helpclass):void{ var _local3:int; var _local4:int; var _local5:int; while (_local5 < _arg1.nentity) { if (_arg1.entities[_local5].size == 1){ _local3 = 0; while (_local3 < 2) { _local4 = 0; while (_local4 < 2) { backbuffer.copyPixels(tiles[((_arg1.entities[_local5].drawframe + _local3) + (_local4 * 20))], tiles_rect, new Point((_arg1.entities[_local5].xp + (_local3 * 16)), (_arg1.entities[_local5].yp + (_local4 * 16)))); _local4++; }; _local3++; }; } else { if (_arg1.entities[_local5].size == 2){ _local3 = 0; while (_local3 < 4) { _local4 = 0; while (_local4 < 5) { backbuffer.copyPixels(tiles[((_arg1.entities[_local5].drawframe + _local3) + (_local4 * 20))], tiles_rect, new Point((_arg1.entities[_local5].xp + (_local3 * 16)), (_arg1.entities[_local5].yp + (_local4 * 16)))); _local4++; }; _local3++; }; } else { if (!_arg1.entities[_local5].invis){ if (_arg1.entities[_local5].type == 28){ backbuffer.copyPixels(tiles[_arg1.entities[_local5].drawframe], tiles_rect, new Point(_arg1.entities[_local5].xp, (_arg1.entities[_local5].yp + (2 * _arg2.sine[int(_arg2.slowsine)])))); } else { backbuffer.copyPixels(tiles[_arg1.entities[_local5].drawframe], tiles_rect, new Point(_arg1.entities[_local5].xp, _arg1.entities[_local5].yp)); }; }; }; }; _local5++; }; } public function bprint(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ printmask(_arg1, _arg2, _arg3, _arg7); print(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); } public function bprinttemptile(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ printmasktemptile(_arg1, _arg2, _arg3, _arg7); printtemptile(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); } public function addbackground():void{ var _local1:BitmapData = new BitmapData(160, 144, true, 0); _local1.copyPixels(buffer, bg_rect, tl); backgrounds.push(_local1); } public function init():void{ updatebackground = true; tiles_rect = new Rectangle(0, 0, 16, 16); bfont_rect = new Rectangle(0, 0, 8, 8); bfontmask_rect = new Rectangle(0, 0, 9, 9); bg_rect = new Rectangle(0, 0, 160, 144); tl = new Point(0, 0); ct = new ColorTransform(0, 0, 0, 1, 0xFF, 0xFF, 0xFF, 1); backbuffer = new BitmapData(160, 144, false, 0); screenbuffer = new BitmapData(160, 144, false, 0); temptile = new BitmapData(16, 16, false, 0); screen = new Bitmap(screenbuffer); screen.width = 640; screen.height = 576; addChild(screen); } public function len(_arg1:String):int{ bfontpos = 0; var _local2:int; while (_local2 < _arg1.length) { cur = _arg1.charCodeAt(_local2); bfontpos = (bfontpos + bfontlen[cur]); _local2++; }; return (bfontpos); } public function render():void{ screenbuffer.lock(); screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); screenbuffer.unlock(); backbuffer.lock(); backbuffer.fillRect(backbuffer.rect, 0); backbuffer.unlock(); } public function drawimage(_arg1:int, _arg2:int, _arg3:int, _arg4:Boolean=false):void{ if (_arg4){ backbuffer.copyPixels(images[_arg1], new Rectangle(0, 0, images[_arg1].width, images[_arg1].height), new Point((80 - int((images[_arg1].width / 2))), _arg3)); } else { backbuffer.copyPixels(images[_arg1], new Rectangle(0, 0, images[_arg1].width, images[_arg1].height), new Point(_arg2, _arg3)); }; } public function printmask(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{ if (_arg4){ _arg1 = (80 - (len(_arg3) / 2)); }; bfontpos = 0; var _local5:int; while (_local5 < _arg3.length) { cur = _arg3.charCodeAt(_local5); backbuffer.copyPixels(bfontmask[cur], bfont_rect, new Point(((_arg1 + bfontpos) - 1), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local5++; }; } public function screenshake():void{ screenbuffer.lock(); screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); screenbuffer.copyPixels(backbuffer, backbuffer.rect, new Point(((Math.random() * 5) - 3), ((Math.random() * 5) - 3)), null, null, false); screenbuffer.unlock(); backbuffer.lock(); backbuffer.fillRect(backbuffer.rect, 0); backbuffer.unlock(); } public function printmasktemptile(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{ if (_arg4){ _arg1 = (80 - (len(_arg3) / 2)); }; bfontpos = 0; var _local5:int; while (_local5 < _arg3.length) { cur = _arg3.charCodeAt(_local5); temptile.copyPixels(bfontmask[cur], bfont_rect, new Point(((_arg1 + bfontpos) - 1), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local5++; }; } public function flashlight():void{ backbuffer.fillRect(backbuffer.rect, 9383213); } public function RGB(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (((_arg3 | (_arg2 << 8)) | (_arg1 << 16))); } public function printtemptile(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ if (_arg4 < 0){ _arg4 = 0; }; if (_arg5 < 0){ _arg5 = 0; }; if (_arg6 < 0){ _arg6 = 0; }; if (_arg4 > 0xFF){ _arg4 = 0xFF; }; if (_arg5 > 0xFF){ _arg5 = 0xFF; }; if (_arg6 > 0xFF){ _arg6 = 0xFF; }; ct.color = RGB(_arg4, _arg5, _arg6); if (_arg7){ _arg1 = (80 - (len(_arg3) / 2)); }; bfontpos = 0; var _local8:int; while (_local8 < _arg3.length) { cur = _arg3.charCodeAt(_local8); bfont[cur].colorTransform(bfont_rect, ct); temptile.copyPixels(bfont[cur], bfont_rect, new Point((_arg1 + bfontpos), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local8++; }; } public function print(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ if (_arg4 < 0){ _arg4 = 0; }; if (_arg5 < 0){ _arg5 = 0; }; if (_arg6 < 0){ _arg6 = 0; }; if (_arg4 > 0xFF){ _arg4 = 0xFF; }; if (_arg5 > 0xFF){ _arg5 = 0xFF; }; if (_arg6 > 0xFF){ _arg6 = 0xFF; }; ct.color = RGB(_arg4, _arg5, _arg6); if (_arg7){ _arg1 = (80 - (len(_arg3) / 2)); }; bfontpos = 0; var _local8:int; while (_local8 < _arg3.length) { cur = _arg3.charCodeAt(_local8); bfont[cur].colorTransform(bfont_rect, ct); backbuffer.copyPixels(bfont[cur], bfont_rect, new Point((_arg1 + bfontpos), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local8++; }; } public function drawbuffertile(_arg1:int, _arg2:int, _arg3:int):void{ buffer.copyPixels(tiles[_arg3], tiles_rect, new Point(_arg1, _arg2)); } public function maketilearray():void{ var _local2:Number; var _local3:BitmapData; var _local4:Rectangle; var _local1:Number = 0; while (_local1 < 15) { _local2 = 0; while (_local2 < 20) { _local3 = new BitmapData(16, 16, true, 0); _local4 = new Rectangle((_local2 * 16), (_local1 * 16), 16, 16); _local3.copyPixels(buffer, _local4, tl); tiles.push(_local3); _local2++; }; _local1++; }; } public function addimage():void{ var _local1:BitmapData = new BitmapData(buffer.width, buffer.height, true, 0); _local1.copyPixels(buffer, new Rectangle(0, 0, buffer.width, buffer.height), tl); images.push(_local1); } public function makebfontmask():void{ var _local2:Number; var _local3:BitmapData; var _local4:Rectangle; var _local1:Number = 0; while (_local1 < 16) { _local2 = 0; while (_local2 < 16) { _local3 = new BitmapData(9, 9, true, 0); _local4 = new Rectangle((_local2 * 9), (_local1 * 9), 9, 9); _local3.copyPixels(buffer, _local4, tl); bfontmask.push(_local3); _local2++; }; _local1++; }; } public function drawbackground(_arg1:int):void{ backbuffer.copyPixels(backgrounds[_arg1], bg_rect, tl); } public function drawbossmeter(_arg1:gameclass):void{ if (_arg1.hpposition > ((_arg1.currenthp * 120) / _arg1.totalhp)){ _arg1.hpposition = (_arg1.hpposition - 2); }; if (_arg1.hpposition < ((_arg1.currenthp * 120) / _arg1.totalhp)){ _arg1.hpposition = ((_arg1.currenthp * 120) / _arg1.totalhp); }; backbuffer.fillRect(new Rectangle(19, 130, 122, 8), 1114884); backbuffer.fillRect(new Rectangle(20, 131, _arg1.hpposition, 6), 9383213); } public function drawtile(_arg1:int, _arg2:int, _arg3:int):void{ backbuffer.copyPixels(tiles[_arg3], tiles_rect, new Point(_arg1, _arg2)); } } }//package
Section 25
//entityclass (entityclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class entityclass extends Sprite { public var flags:Array; public var restartcounter:int; public var temph:int; public var tempw:int; public var tempx:int; public var tempy:int; public var restartmode:int; public var temprect:Rectangle; public var norestartsound:Boolean; public var entities:Array; public var onladder:Boolean; public var nentity:int; public var temp:int; public var temp2:int; public var removeentity:Boolean; public var restartroom:Boolean; public var activetrigger:int; public function entityclass(){ entities = new Array(); flags = new Array(); super(); } public function updateentities(_arg1:int, _arg2:helpclass, _arg3:gameclass, _arg4:musicclass):Boolean{ var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; removeentity = false; if (entities[_arg1].statedelay <= 0){ switch (entities[_arg1].type){ case 0: if (entities[_arg1].state == 1){ entities[_arg1].state = 2; _local5 = 0; while (_local5 < 2) { _local6 = 0; while (_local6 < 10) { createentity(((entities[_arg1].xp + 8) + _local5), ((entities[_arg1].yp + 3) + _local6), 30); _local6++; }; _local5++; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].life--; if (entities[_arg1].life <= 8){ entities[_arg1].invis = true; }; entities[_arg1].vx = 0; entities[_arg1].vy = 0; }; }; break; case 1: if (entities[_arg1].state == 0){ if (entities[_arg1].xp < -30){ entities[_arg1].state = 1; }; if (entities[_arg1].xp > 190){ entities[_arg1].state = 1; }; if (entities[_arg1].yp < -30){ entities[_arg1].state = 1; }; if (entities[_arg1].yp > 174){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 1){ removeentity = true; if (entities[_arg1].vx <= 0){ createentity((entities[_arg1].xp + 1), entities[_arg1].yp, 16, 3, (-(Math.random()) * 2)); } else { createentity((entities[_arg1].xp + 1), entities[_arg1].yp, 16, -3, (-(Math.random()) * 2)); }; }; }; break; case 2: if (entities[_arg1].state == 0){ temp = getplayer(); entities[_arg1].vx = 0; entities[_arg1].vy = 0; if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].vx = 1; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].vx = -1; }; if ((entities[_arg1].yp + 1) < (entities[temp].yp + 5)){ entities[_arg1].vy = 1; }; if ((entities[_arg1].yp - 1) > (entities[temp].yp + 5)){ entities[_arg1].vy = -1; }; } else { if (entities[_arg1].state == 1){ _arg3.incenemycount(); flags[entities[_arg1].flag] = 2; _arg4.playef(5, 50); createentity(entities[_arg1].xp, entities[_arg1].yp, 3, entities[_arg1].bulletvel, -5); removeentity = true; }; }; break; case 4: if (entities[_arg1].state == 0){ entities[_arg1].life--; if (entities[_arg1].life <= 0){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 1){ if (entities[_arg1].yp > 30){ if (Math.random() < 0.5){ createentity(entities[_arg1].xp, (entities[_arg1].yp + 5), 5, (Math.random() + 1), -4); } else { createentity(entities[_arg1].xp, (entities[_arg1].yp + 5), 5, (-(Math.random()) - 1), -4); }; }; removeentity = true; }; }; break; case 5: if (entities[_arg1].state == 0){ entities[_arg1].life--; if (entities[_arg1].life <= 0){ entities[_arg1].state = 2; }; } else { if (entities[_arg1].state == 1){ if (!entities[_arg1].bounce){ entities[_arg1].state = 0; entities[_arg1].life = (entities[_arg1].life - 8); if (entities[_arg1].life <= 0){ removeentity = true; }; entities[_arg1].ay = -2; entities[_arg1].jumping = true; entities[_arg1].jumpframe = 2; entities[_arg1].bounce = true; entities[_arg1].onwall = 0; } else { removeentity = true; }; } else { if (entities[_arg1].state == 2){ removeentity = true; }; }; }; break; case 6: if (entities[_arg1].state == 1){ temp = getplayer(); entities[_arg1].vx = (entities[_arg1].vx * 0.95); if (((entities[temp].onground) && (entities[_arg1].onground))){ if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].vx = 4; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].vx = -4; }; entities[_arg1].dir = 1; if (entities[_arg1].vx > 0){ entities[_arg1].dir = 0; }; }; entities[_arg1].onxwall = 2; } else { if (entities[_arg1].state == 2){ entities[_arg1].vx = 0; entities[_arg1].state = 1; entities[_arg1].onxwall = 0; } else { if (entities[_arg1].state == 3){ entities[_arg1].hp--; if (entities[_arg1].hp <= 0){ _arg3.incenemycount(); flags[entities[_arg1].flag] = 2; _arg4.playef(5, 50); createentity(entities[_arg1].xp, entities[_arg1].yp, 7, entities[_arg1].bulletvel, -5); removeentity = true; } else { entities[_arg1].vx = entities[_arg1].bulletvel; entities[_arg1].vy = -5; entities[_arg1].state = 1; }; }; }; }; break; case 9: if (entities[_arg1].state == 0){ temp = getplayer(); if (Math.abs((entities[_arg1].xp - entities[temp].xp)) < 50){ entities[_arg1].state = 1; entities[_arg1].tile = 94; entities[_arg1].drawframe = 94; entities[_arg1].gravity = true; }; } else { if (entities[_arg1].state == 1){ } else { if (entities[_arg1].state == 2){ temp = getplayer(); entities[_arg1].onywall = 0; entities[_arg1].onwall = 0; entities[_arg1].state = 3; entities[_arg1].tile = 89; if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].state = 4; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].state = 3; }; } else { if (entities[_arg1].state == 3){ entities[_arg1].onxwall = 4; entities[_arg1].vx = -2; entities[_arg1].dir = 1; if (entities[_arg1].xp < 0){ entities[_arg1].state = 4; }; } else { if (entities[_arg1].state == 4){ entities[_arg1].onxwall = 3; entities[_arg1].vx = 2; entities[_arg1].dir = 0; if (entities[_arg1].xp > 145){ entities[_arg1].state = 3; }; } else { if (entities[_arg1].state == 10){ _arg3.incenemycount(); flags[entities[_arg1].flag] = 2; _arg4.playef(5, 50); createentity(entities[_arg1].xp, entities[_arg1].yp, 10, entities[_arg1].bulletvel, -5); removeentity = true; }; }; }; }; }; }; break; case 11: if (entities[_arg1].state == 0){ temp = getplayer(); if (Math.abs((entities[_arg1].xp - entities[temp].xp)) < 25){ entities[_arg1].state = 1; entities[_arg1].gravity = true; }; } else { if (entities[_arg1].state == 1){ entities[_arg1].yp++; } else { if (entities[_arg1].state == 2){ createentity((entities[_arg1].xp + 2), (entities[_arg1].yp + 13), 5, Math.random(), -8); createentity((entities[_arg1].xp + 2), (entities[_arg1].yp + 13), 5, -(Math.random()), -8); createentity((entities[_arg1].xp + 2), (entities[_arg1].yp + 13), 5, (Math.random() + 1), -6); createentity((entities[_arg1].xp + 2), (entities[_arg1].yp + 13), 5, (-(Math.random()) - 1), -6); _arg4.playef(7, 50); removeentity = true; }; }; }; break; case 12: if (entities[_arg1].state == 0){ temp = getplayer(); if (Math.abs((entities[_arg1].xp - entities[temp].xp)) < 100){ if (Math.abs((entities[_arg1].yp - entities[temp].yp)) < 50){ entities[_arg1].onywall = 2; }; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].onywall = 0; entities[_arg1].vx = (entities[_arg1].vx * 0.4); entities[_arg1].state = 3; entities[_arg1].statedelay = 6; } else { if (entities[_arg1].state == 3){ entities[_arg1].onywall = 2; entities[_arg1].state = 1; entities[_arg1].ay = (-4 - (Math.random() * 5)); entities[_arg1].jumping = true; entities[_arg1].jumpframe = (7 + (Math.random() * 6)); temp = getplayer(); if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].vx = 2; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].vx = -2; }; } else { if (entities[_arg1].state == 10){ entities[_arg1].hp--; if (entities[_arg1].hp <= 0){ _arg3.incenemycount(); _arg4.playef(14); flags[entities[_arg1].flag] = 2; if (entities[_arg1].vx <= 0){ createentity(entities[_arg1].xp, entities[_arg1].yp, 13, entities[_arg1].bulletvel, -5); }; if (entities[_arg1].vx > 0){ createentity(entities[_arg1].xp, entities[_arg1].yp, 14, entities[_arg1].bulletvel, -5); }; removeentity = true; } else { _arg4.playef(5); entities[_arg1].vx = entities[_arg1].bulletvel; entities[_arg1].vy = -1; entities[_arg1].state = 1; entities[_arg1].onywall = 2; }; }; }; }; }; break; case 15: if (entities[_arg1].state == 0){ if (entities[_arg1].xp < -10){ removeentity = true; }; if (entities[_arg1].xp > 170){ removeentity = true; }; if (entities[_arg1].yp < -10){ removeentity = true; }; if (entities[_arg1].yp > 154){ removeentity = true; }; if (entities[_arg1].vx < -0.5){ if ((((Math.random() < 0.9)) && ((nentity < 40)))){ createentity((entities[_arg1].xp + 4), (entities[_arg1].yp + 1), 16, Math.random(), -(Math.random())); }; if (Math.random() < 0.9){ createentity((entities[_arg1].xp + 4), (entities[_arg1].yp + 4), 16, Math.random(), -(Math.random())); }; } else { if (entities[_arg1].vx > 0.5){ if ((((Math.random() < 0.9)) && ((nentity < 40)))){ createentity((entities[_arg1].xp - 2), (entities[_arg1].yp + 1), 16, Math.random(), -(Math.random())); }; if (Math.random() < 0.9){ createentity((entities[_arg1].xp - 2), (entities[_arg1].yp + 4), 16, Math.random(), -(Math.random())); }; } else { if ((((Math.random() < 0.9)) && ((nentity < 40)))){ createentity((entities[_arg1].xp + 2), (entities[_arg1].yp + 1), 16, (0.5 - Math.random()), -(Math.random())); }; if (Math.random() < 0.9){ createentity((entities[_arg1].xp + 3), (entities[_arg1].yp + 1), 16, (0.5 - Math.random()), -(Math.random())); }; }; }; } else { if (entities[_arg1].state == 1){ removeentity = true; }; }; break; case 17: if (entities[_arg1].state == 0){ if (!entities[_arg1].roar){ _arg4.playef(11); entities[_arg1].roar = true; }; temp = getplayer(); entities[_arg1].onbullet = 10; entities[_arg1].state = 1; entities[_arg1].vx = 0; if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].state = 2; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].state = 1; }; entities[_arg1].statedelay = 10; } else { if (entities[_arg1].state == 1){ entities[_arg1].onxwall = 2; entities[_arg1].vx = -1; entities[_arg1].dir = 1; if (entities[_arg1].xp < 0){ entities[_arg1].state = 2; }; temp = getplayer(); if (Math.abs((entities[_arg1].yp - entities[temp].yp)) < 30){ entities[_arg1].charge--; if (entities[_arg1].charge <= 0){ entities[_arg1].state = 3; }; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].onxwall = 1; entities[_arg1].vx = 1; entities[_arg1].dir = 0; if (entities[_arg1].xp > 135){ entities[_arg1].state = 1; }; temp = getplayer(); if (Math.abs((entities[_arg1].yp - entities[temp].yp)) < 30){ entities[_arg1].charge--; if (entities[_arg1].charge <= 0){ entities[_arg1].state = 3; }; }; } else { if (entities[_arg1].state == 3){ entities[_arg1].charge = 40; entities[_arg1].state = 4; entities[_arg1].vx = 0; temp = getplayer(); if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].dir = 0; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].dir = 1; }; } else { if (entities[_arg1].state == 4){ entities[_arg1].state = 0; entities[_arg1].statedelay = 5; if (entities[_arg1].dir == 1){ createentity((entities[_arg1].xp - 5), (entities[_arg1].yp + 14), 15, -4, (0.5 - Math.random())); }; if (entities[_arg1].dir == 0){ createentity((entities[_arg1].xp + 5), (entities[_arg1].yp + 14), 15, 4, (0.5 - Math.random())); }; _arg4.playef(8); } else { if (entities[_arg1].state == 10){ entities[_arg1].hp--; if (entities[_arg1].hp <= 0){ _arg3.incenemycount(); flags[entities[_arg1].flag] = 2; _arg4.playef(13); _arg4.playef(8); createentity(entities[_arg1].xp, (entities[_arg1].yp + 14), 15, -2, -1); createentity(entities[_arg1].xp, (entities[_arg1].yp + 14), 15, -1, -2); createentity(entities[_arg1].xp, (entities[_arg1].yp + 14), 15, 0, -2.4); createentity(entities[_arg1].xp, (entities[_arg1].yp + 14), 15, 2, -1); createentity(entities[_arg1].xp, (entities[_arg1].yp + 14), 15, 1, -2); removeentity = true; _arg3.screenshake = 10; } else { _arg4.playef(14); entities[_arg1].vx = 0; entities[_arg1].state = 3; createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); createentity(((entities[_arg1].xp + 6) + (Math.random() * 24)), ((entities[_arg1].yp + 6) + (Math.random() * 16)), 29); }; }; }; }; }; }; }; break; case 19: if (entities[_arg1].state == 0){ entities[_arg1].state = 1; } else { if (entities[_arg1].state == 1){ entities[_arg1].onywall = 2; entities[_arg1].vy = 4; if (entities[_arg1].yp > 128){ entities[_arg1].state = 2; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].onywall = 1; entities[_arg1].vy = -4; if (entities[_arg1].yp <= 0){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 3){ removeentity = true; }; }; }; }; break; case 20: if (entities[_arg1].state == 0){ entities[_arg1].state = 1; } else { if (entities[_arg1].state == 1){ entities[_arg1].onxwall = 2; entities[_arg1].vx = 4; if (entities[_arg1].xp > 144){ entities[_arg1].state = 2; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].onxwall = 1; entities[_arg1].vx = -4; if (entities[_arg1].xp <= 0){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 3){ removeentity = true; }; }; }; }; break; case 21: if (entities[_arg1].state == 0){ entities[_arg1].state = 1; } else { if (entities[_arg1].state == 1){ entities[_arg1].onxwall = 2; entities[_arg1].onywall = 0; entities[_arg1].vx = 3; entities[_arg1].vy = 0; if (entities[_arg1].xp > 151){ entities[_arg1].state = 2; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].onxwall = 0; entities[_arg1].onywall = 3; entities[_arg1].vx = 0; entities[_arg1].vy = 3; if (entities[_arg1].yp > 135){ entities[_arg1].state = 3; }; } else { if (entities[_arg1].state == 3){ entities[_arg1].onxwall = 4; entities[_arg1].onywall = 0; entities[_arg1].vx = -3; entities[_arg1].vy = 0; if (entities[_arg1].xp <= 0){ entities[_arg1].state = 4; }; } else { if (entities[_arg1].state == 4){ entities[_arg1].onxwall = 0; entities[_arg1].onywall = 1; entities[_arg1].vx = 0; entities[_arg1].vy = -3; if (entities[_arg1].yp <= 0){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 10){ removeentity = true; }; }; }; }; }; }; break; case 22: if (entities[_arg1].state == 0){ entities[_arg1].framedelay++; if (entities[_arg1].framedelay > 90){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 1){ createentity((entities[_arg1].xp + 2), (entities[_arg1].yp - 4), 18, 0, 0); _arg4.playef(8); entities[_arg1].state = 0; entities[_arg1].framedelay = 0; }; }; break; case 23: if (entities[_arg1].state == 0){ _arg3.removeblockat(_arg2, entities[_arg1].xp, entities[_arg1].yp); _arg3.createblock(entities[_arg1].xp, entities[_arg1].yp, entities[_arg1].cw, entities[_arg1].ch); entities[_arg1].state = 1; entities[_arg1].invis = false; entities[_arg1].tile = 33; entities[_arg1].drawframe = 33; } else { if (entities[_arg1].state == 1){ entities[_arg1].framedelay++; if (entities[_arg1].framedelay > 60){ entities[_arg1].state = 2; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].state = 3; entities[_arg1].statedelay = 5; entities[_arg1].tile = 34; entities[_arg1].drawframe = 34; } else { if (entities[_arg1].state == 3){ entities[_arg1].state = 4; entities[_arg1].statedelay = 5; entities[_arg1].tile = 35; entities[_arg1].drawframe = 35; } else { if (entities[_arg1].state == 4){ entities[_arg1].framedelay = 0; entities[_arg1].state = 5; entities[_arg1].statedelay = 5; entities[_arg1].tile = 36; entities[_arg1].drawframe = 36; } else { if (entities[_arg1].state == 5){ entities[_arg1].invis = true; _arg3.removeblockat(_arg2, entities[_arg1].xp, entities[_arg1].yp); entities[_arg1].framedelay++; if (entities[_arg1].framedelay > 45){ entities[_arg1].state = 6; }; } else { if (entities[_arg1].state == 6){ _arg3.createblock(entities[_arg1].xp, entities[_arg1].yp, entities[_arg1].cw, entities[_arg1].ch); entities[_arg1].invis = false; entities[_arg1].framedelay = 0; entities[_arg1].tile = 36; entities[_arg1].drawframe = 36; entities[_arg1].state = 7; entities[_arg1].statedelay = 5; } else { if (entities[_arg1].state == 7){ entities[_arg1].state = 8; entities[_arg1].statedelay = 5; entities[_arg1].tile = 35; entities[_arg1].drawframe = 35; } else { if (entities[_arg1].state == 8){ entities[_arg1].state = 0; entities[_arg1].statedelay = 5; entities[_arg1].tile = 34; entities[_arg1].drawframe = 34; }; }; }; }; }; }; }; }; }; break; case 24: if (entities[_arg1].state == 0){ _arg3.createblock(entities[_arg1].xp, (entities[_arg1].yp + 1), entities[_arg1].cw, entities[_arg1].ch); entities[_arg1].state = 1; } else { if (entities[_arg1].state == 1){ } else { if (entities[_arg1].state == 2){ entities[_arg1].onplayer = 0; _arg4.playef(9); entities[_arg1].state = 3; entities[_arg1].statedelay = 5; entities[_arg1].tile = 53; entities[_arg1].drawframe = 53; createentity(((entities[_arg1].xp + 4) + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); createentity(((entities[_arg1].xp + 8) + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); } else { if (entities[_arg1].state == 3){ entities[_arg1].onplayer = 0; entities[_arg1].state = 4; entities[_arg1].statedelay = 5; entities[_arg1].tile = 54; entities[_arg1].drawframe = 54; createentity((entities[_arg1].xp + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); createentity(((entities[_arg1].xp + 12) + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); } else { if (entities[_arg1].state == 4){ entities[_arg1].state = 5; entities[_arg1].statedelay = 5; entities[_arg1].tile = 55; entities[_arg1].drawframe = 55; createentity(((entities[_arg1].xp + 4) + (Math.random() * 4)), (entities[_arg1].yp + 5), 5, 0, (1 + (Math.random() * 2))); createentity(((entities[_arg1].xp + 8) + (Math.random() * 4)), (entities[_arg1].yp + 5), 5, 0, (1 + (Math.random() * 2))); } else { if (entities[_arg1].state == 5){ entities[_arg1].framedelay = 0; entities[_arg1].state = 6; entities[_arg1].statedelay = 5; entities[_arg1].tile = 56; entities[_arg1].drawframe = 56; createentity((entities[_arg1].xp + (Math.random() * 4)), (entities[_arg1].yp + 5), 5, 0, (1 + (Math.random() * 2))); createentity(((entities[_arg1].xp + 12) + (Math.random() * 4)), (entities[_arg1].yp + 5), 5, 0, (1 + (Math.random() * 2))); } else { if (entities[_arg1].state == 6){ _arg3.removeblockat(_arg2, entities[_arg1].xp, (entities[_arg1].yp + 1)); removeentity = true; createentity((entities[_arg1].xp + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); createentity(((entities[_arg1].xp + 4) + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); createentity(((entities[_arg1].xp + 8) + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); createentity(((entities[_arg1].xp + 12) + (Math.random() * 4)), (entities[_arg1].yp + 4), 5, 0, (1 + (Math.random() * 2))); }; }; }; }; }; }; }; break; case 26: if (entities[_arg1].state == 0){ entities[_arg1].harmdelay = 0; entities[_arg1].onbullet = 10; if (entities[_arg1].onground){ entities[_arg1].vx = (entities[_arg1].vx * 0.2); }; if (entities[_arg1].hp == 3){ entities[_arg1].attackdelay--; entities[_arg1].onywall = 0; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].onywall = 3; entities[_arg1].attackdelay = 25; }; } else { if (entities[_arg1].hp == 2){ entities[_arg1].attackdelay--; entities[_arg1].onywall = 0; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].onywall = 4; entities[_arg1].attackdelay = 20; }; } else { temp = getplayer(); if (((entities[_arg1].onground) && ((entities[_arg1].attackdelay <= 6)))){ if ((entities[_arg1].xp - entities[temp].xp) > 0){ entities[_arg1].dir = 1; } else { entities[_arg1].dir = 0; }; }; entities[_arg1].attackdelay--; entities[_arg1].onywall = 0; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].onywall = 4; entities[_arg1].attackdelay = 30; }; }; }; } else { if (entities[_arg1].state == 1){ if ((((entities[_arg1].vx < -1)) && ((entities[_arg1].xp < 10)))){ entities[_arg1].vx = -(entities[_arg1].vx); entities[_arg1].dir = 0; }; if ((((entities[_arg1].vx > 1)) && ((entities[_arg1].xp > 135)))){ entities[_arg1].vx = -(entities[_arg1].vx); entities[_arg1].dir = 1; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].onywall = 0; entities[_arg1].state = 0; } else { if (entities[_arg1].state == 3){ if ((Math.random() * 100) > 50){ if ((Math.random() * 100) > 80){ _arg4.playef(10); } else { _arg4.playef(21); }; }; entities[_arg1].onywall = 2; entities[_arg1].state = 1; entities[_arg1].ay = -6; entities[_arg1].jumping = true; entities[_arg1].jumpframe = 8; temp = getplayer(); if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].vx = 2; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].vx = -2; }; entities[_arg1].dir = 0; if (entities[_arg1].vx < 0){ entities[_arg1].dir = 1; }; } else { if (entities[_arg1].state == 4){ if ((Math.random() * 100) > 50){ if ((Math.random() * 100) > 80){ _arg4.playef(10); } else { _arg4.playef(21); }; }; entities[_arg1].onywall = 2; entities[_arg1].state = 1; entities[_arg1].ay = -6; if (entities[_arg1].hp == 1){ entities[_arg1].ay = -2; }; entities[_arg1].jumping = true; entities[_arg1].jumpframe = 8; temp = getplayer(); if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].vx = 3; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].vx = -3; }; if (entities[_arg1].hp == 1){ if ((entities[_arg1].xp + 1) < (entities[temp].xp + 2)){ entities[_arg1].vx = 4; }; if ((entities[_arg1].xp - 1) > (entities[temp].xp + 2)){ entities[_arg1].vx = -4; }; }; entities[_arg1].dir = 0; if (entities[_arg1].vx < 0){ entities[_arg1].dir = 1; }; } else { if (entities[_arg1].state == 8){ entities[_arg1].onbullet = 0; entities[_arg1].harmdelay--; if (entities[_arg1].onground){ entities[_arg1].vx = (entities[_arg1].vx * 0.2); }; entities[_arg1].oxp = entities[_arg1].xp; entities[_arg1].oyp = entities[_arg1].yp; entities[_arg1].xp = ((entities[_arg1].oxp + (Math.random() * 2)) - 1); entities[_arg1].yp = (entities[_arg1].oyp - Math.random()); if (entities[_arg1].harmdelay == 80){ _arg4.playef(13); _arg3.flashlight = 4; }; if (entities[_arg1].harmdelay == 40){ _arg4.playef(13); _arg3.flashlight = 4; }; if (entities[_arg1].harmdelay == 20){ _arg4.playef(13); _arg3.flashlight = 4; }; if (entities[_arg1].harmdelay == 2){ _arg4.playef(13); _arg3.flashlight = 4; }; createentity(((entities[_arg1].xp + 2) + (Math.random() * 10)), ((entities[_arg1].yp + 6) + (Math.random() * 3)), 29); createentity(((entities[_arg1].xp + 2) + (Math.random() * 10)), ((entities[_arg1].yp + 6) + (Math.random() * 3)), 29); if (entities[_arg1].harmdelay <= 0){ flags[entities[_arg1].flag] = 2; _local7 = 0; while (_local7 < 6) { _local8 = 0; while (_local8 < 4) { createentity(((entities[_arg1].xp + 2) + (_local7 * 2)), ((entities[_arg1].yp + 2) + (_local8 * 3)), 29); _local8++; }; _local7++; }; _arg3.flashlight = 4; _arg3.state = 12; removeentity = true; _arg4.playef(14); }; } else { if (entities[_arg1].state == 9){ entities[_arg1].onbullet = 0; entities[_arg1].harmdelay--; if (entities[_arg1].onground){ entities[_arg1].vx = (entities[_arg1].vx * 0.2); }; entities[_arg1].oxp = entities[_arg1].xp; entities[_arg1].oyp = entities[_arg1].yp; entities[_arg1].xp = ((entities[_arg1].oxp + (Math.random() * 2)) - 1); entities[_arg1].yp = (entities[_arg1].oyp - Math.random()); createentity(((entities[_arg1].xp + 2) + (Math.random() * 10)), ((entities[_arg1].yp + 6) + (Math.random() * 3)), 29); if (entities[_arg1].harmdelay <= 0){ entities[_arg1].state = 0; entities[_arg1].harmdelay = 0; entities[_arg1].attackdelay = 15; temp = getplayer(); if (entities[_arg1].onground){ if ((entities[_arg1].xp - entities[temp].xp) > 0){ entities[_arg1].dir = 1; } else { entities[_arg1].dir = 0; }; }; }; } else { if (entities[_arg1].state == 10){ if ((((((entities[_arg1].dir == 1)) && ((entities[_arg1].bulletvel < 0)))) || ((((entities[_arg1].dir == 0)) && ((entities[_arg1].bulletvel > 0)))))){ entities[_arg1].harmdelay = 45; entities[_arg1].hp--; _arg3.currenthp--; _arg3.flashlight = 4; _arg3.screenshake = 45; if (entities[_arg1].hp <= 0){ _arg3.incenemycount(); _arg4.playef(12); entities[_arg1].vx = entities[_arg1].bulletvel; entities[_arg1].vy = -1; entities[_arg1].state = 8; entities[_arg1].onywall = 0; entities[_arg1].harmdelay = 120; _arg3.screenshake = 120; _arg4.fadeout(); entities[_arg1].harmful = false; } else { if (entities[_arg1].hp == 2){ _arg4.playef(11); } else { _arg4.playef(11); }; entities[_arg1].vx = entities[_arg1].bulletvel; entities[_arg1].vy = -1; entities[_arg1].state = 9; entities[_arg1].onywall = 0; }; } else { _arg4.playef(22); entities[_arg1].state = 0; }; }; }; }; }; }; }; }; }; break; case 27: if (entities[_arg1].state == 0){ _arg4.play(2); if (!entities[_arg1].roar){ _arg4.playef(16); entities[_arg1].roar = true; }; entities[_arg1].xp = 90; entities[_arg1].yp = 30; if (entities[_arg1].framedelay <= 0){ entities[_arg1].tile = 180; }; entities[_arg1].harmdelay = 0; entities[_arg1].onbullet = 100; if (entities[_arg1].hp >= 5){ entities[_arg1].attackdelay--; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].attackdelay = 60; temp = (Math.random() * 40); if (temp < 10){ entities[_arg1].state = 1; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 3; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 5; } else { entities[_arg1].state = 6; }; }; }; }; } else { if (entities[_arg1].hp == 4){ entities[_arg1].attackdelay--; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].attackdelay = 55; temp = (Math.random() * 40); if (temp < 10){ entities[_arg1].state = 2; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 3; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 6; } else { entities[_arg1].state = 5; }; }; }; }; } else { if (entities[_arg1].hp == 3){ entities[_arg1].attackdelay--; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].attackdelay = 50; temp = (Math.random() * 40); if (temp < 10){ entities[_arg1].state = 7; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 8; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 3; } else { entities[_arg1].state = 2; }; }; }; }; } else { if (entities[_arg1].hp == 2){ entities[_arg1].attackdelay--; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].attackdelay = 50; temp = (Math.random() * 40); if (temp < 10){ entities[_arg1].state = 9; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 10; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 11; } else { entities[_arg1].state = 4; }; }; }; }; } else { if (entities[_arg1].hp == 1){ entities[_arg1].attackdelay--; if (entities[_arg1].attackdelay <= 0){ entities[_arg1].attackdelay = 50; temp = (Math.random() * 40); if (temp < 10){ entities[_arg1].state = 1; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 2; } else { temp = (temp - 10); if (temp < 10){ entities[_arg1].state = 12; } else { entities[_arg1].state = 10; }; }; }; }; }; }; }; }; }; } else { if (entities[_arg1].state == 1){ entities[_arg1].tile = (180 + 8); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; temp = (Math.random() * 40); if (temp < 10){ createentity(25, 0, 11); } else { temp = (temp - 10); if (temp < 10){ createentity(42, 0, 11); } else { temp = (temp - 10); if (temp < 10){ createentity(65, 0, 11); } else { createentity(90, 0, 11); }; }; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].tile = (180 + 4); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; temp = (Math.random() * 30); if (temp < 10){ createentity(60, -10, 9); } else { temp = (temp - 10); if (temp < 10){ createentity(60, -10, 9); } else { createentity(60, -10, 9); }; }; } else { if (entities[_arg1].state == 3){ entities[_arg1].tile = (180 + 4); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; temp = (Math.random() * 20); if (temp < 10){ createentity(128, 30, 2); } else { createentity(138, 60, 2); }; } else { if (entities[_arg1].state == 4){ entities[_arg1].tile = (180 + 4); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; createentity(70, -10, 9); createentity(80, -20, 9); createentity(90, -10, 9); } else { if (entities[_arg1].state == 5){ if (entities[_arg1].framedelay < 5){ entities[_arg1].tile = (180 + 12); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; createentity(105, 80, 15, -3, 0); _arg4.playef(8); }; } else { if (entities[_arg1].state == 6){ if (entities[_arg1].framedelay < 5){ entities[_arg1].tile = (180 + 8); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; createentity(95, 60, 15, -3, 0); _arg4.playef(8); }; } else { if (entities[_arg1].state == 7){ entities[_arg1].tile = (180 + 12); entities[_arg1].framedelay = 15; entities[_arg1].state = 6; entities[_arg1].statedelay = 10; createentity(105, 80, 15, -3, 0); _arg4.playef(8); } else { if (entities[_arg1].state == 8){ entities[_arg1].tile = (180 + 8); entities[_arg1].framedelay = 15; entities[_arg1].state = 5; entities[_arg1].statedelay = 10; createentity(95, 60, 15, -3, 0); _arg4.playef(8); } else { if (entities[_arg1].state == 9){ if (entities[_arg1].framedelay < 5){ entities[_arg1].tile = (180 + 4); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; createentity(95, 40, 15, -2, 0); createentity(95, 40, 15, -2, 1); createentity(95, 40, 15, -1.6, 1.6); createentity(95, 40, 15, -1, 2); createentity(95, 40, 15, 0, 2); _arg4.playef(8); }; } else { if (entities[_arg1].state == 10){ if (entities[_arg1].framedelay < 5){ entities[_arg1].tile = (180 + 8); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; createentity(93, 60, 15, 0, -2); createentity(93, 60, 15, -1.6, -1.6); createentity(93, 60, 15, -2, 0); createentity(93, 60, 15, -1.6, 1.6); createentity(93, 60, 15, 0, 2); _arg4.playef(8); }; } else { if (entities[_arg1].state == 11){ if (entities[_arg1].framedelay < 5){ entities[_arg1].tile = (180 + 12); entities[_arg1].framedelay = 15; entities[_arg1].state = 0; createentity(105, 80, 15, 0, -2); createentity(105, 80, 15, -1, -2); createentity(105, 80, 15, -1.6, -1.6); createentity(105, 80, 15, -2, -1); createentity(105, 80, 15, -2, 0); _arg4.playef(8); }; } else { if (entities[_arg1].state == 12){ if (entities[_arg1].framedelay < 5){ entities[_arg1].tile = (180 + 4); entities[_arg1].framedelay = 15; entities[_arg1].state = 11; createentity(95, 40, 15, -2, 0); createentity(95, 40, 15, -2, 1); createentity(95, 40, 15, -1.6, 1.6); createentity(95, 40, 15, -1, 2); createentity(95, 40, 15, 0, 2); _arg4.playef(8); }; } else { if (entities[_arg1].state == 80){ entities[_arg1].onbullet = 0; entities[_arg1].harmdelay--; entities[_arg1].xp = ((90 + (Math.random() * 8)) - 4); entities[_arg1].yp = (30 - (Math.random() * 4)); if (entities[_arg1].harmdelay == 80){ _arg4.playef(13); _arg3.flashlight = 4; }; if (entities[_arg1].harmdelay == 40){ _arg4.playef(13); _arg3.flashlight = 4; }; if (entities[_arg1].harmdelay == 20){ _arg4.playef(13); _arg3.flashlight = 4; }; if (entities[_arg1].harmdelay == 2){ _arg4.playef(13); _arg3.flashlight = 45; }; createentity(((entities[_arg1].xp + 28) + (Math.random() * 30)), ((entities[_arg1].yp + 36) + (Math.random() * 3)), 29); createentity(((entities[_arg1].xp + 28) + (Math.random() * 30)), ((entities[_arg1].yp + 36) + (Math.random() * 3)), 29); if (entities[_arg1].harmdelay <= 0){ _arg3.flashlight = 10; _arg3.bg = 59; _arg3.state = 13; removeentity = true; _arg4.playef(14); }; } else { if (entities[_arg1].state == 90){ entities[_arg1].onbullet = 0; entities[_arg1].harmdelay--; entities[_arg1].xp = ((90 + Math.random()) - 0.5); entities[_arg1].yp = (30 - Math.random()); createentity(((entities[_arg1].xp + 28) + (Math.random() * 30)), ((entities[_arg1].yp + 36) + (Math.random() * 3)), 29); if (entities[_arg1].harmdelay <= 0){ entities[_arg1].state = 0; entities[_arg1].harmdelay = 0; entities[_arg1].attackdelay = 0; }; } else { if (entities[_arg1].state == 100){ entities[_arg1].tile = (180 + 16); entities[_arg1].framedelay = 45; entities[_arg1].harmdelay = 45; entities[_arg1].hp--; _arg3.currenthp--; _arg3.flashlight = 4; _arg3.screenshake = 45; if (entities[_arg1].hp <= 0){ _arg4.fadeout(); _arg4.playef(18); entities[_arg1].state = 80; entities[_arg1].harmdelay = 120; entities[_arg1].framedelay = 120; _arg3.createblock(100, -10, 5, 110); _arg3.screenshake = 120; while (_local9 < nentity) { if (entities[_local9].type == 9){ entities[_local9].state = 10; } else { if (entities[_local9].type == 2){ entities[_local9].state = 1; }; }; _local9++; }; } else { _arg4.playef(17); entities[_arg1].state = 90; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; break; case 28: if (entities[_arg1].state == 0){ if (_arg3.eurydicemode){ temp = getplayer(); entities[_arg1].vx = (entities[_arg1].vx * 0.75); if (entities[_arg1].xp > (entities[temp].xp + 20)){ entities[_arg1].vx = -2; }; if (entities[_arg1].xp < (entities[temp].xp + 12)){ entities[_arg1].vx = 2; }; entities[_arg1].vy = (entities[_arg1].vy * 0.75); if (entities[_arg1].yp > (entities[temp].yp - 4)){ entities[_arg1].vy = -2; }; if (entities[_arg1].yp < (entities[temp].yp - 12)){ entities[_arg1].vy = 2; }; }; } else { if (entities[_arg1].state == 1){ _arg4.playef(19); entities[_arg1].state = 2; _local10 = 0; while (_local10 < 2) { _local11 = 0; while (_local11 < 10) { createentity(((entities[_arg1].xp + 8) + _local10), ((entities[_arg1].yp + 3) + _local11), 30); _local11++; }; _local10++; }; } else { if (entities[_arg1].state == 2){ entities[_arg1].drawframe = 19; entities[_arg1].life--; if (entities[_arg1].life <= 8){ entities[_arg1].invis = true; }; entities[_arg1].vx = 0; entities[_arg1].vy = 0; }; }; }; break; case 29: if (entities[_arg1].state == 0){ entities[_arg1].yp = (entities[_arg1].yp - 3); entities[_arg1].xp = (entities[_arg1].xp + ((Math.random() * 6) - 3)); entities[_arg1].life--; if (entities[_arg1].life <= 0){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 1){ removeentity = true; }; }; break; case 30: if (entities[_arg1].state == 0){ entities[_arg1].yp = (entities[_arg1].yp - 1); entities[_arg1].xp = (entities[_arg1].xp + ((Math.random() * 4) - 1)); entities[_arg1].life--; if (entities[_arg1].life <= 0){ entities[_arg1].state = 1; }; } else { if (entities[_arg1].state == 1){ removeentity = true; }; }; break; }; } else { entities[_arg1].statedelay--; if (entities[_arg1].statedelay < 0){ entities[_arg1].statedelay = 0; }; }; if (removeentity){ _arg2.removeObject(entities[_arg1], entities); nentity--; return (false); }; return (true); } public function init():void{ var _local2:int; restartroom = false; norestartsound = false; nentity = 0; var _local1:Number = 0; while (_local1 < 300) { _local2 = 0; flags.push(_local2); _local1++; }; } public function gettype(_arg1:int):Boolean{ var _local2:int; _local2 = 0; while (_local2 < nentity) { if (entities[_local2].type == _arg1){ return (true); }; _local2++; }; return (false); } public function resetflags():void{ var _local1:Number = 0; while (_local1 < 300) { if (flags[_local1] == 2){ flags[_local1] = 0; }; _local1++; }; } public function changeflag(_arg1:int, _arg2:int):void{ flags[_arg1] = _arg2; } public function removeentitytype(_arg1:helpclass, _arg2:int):void{ var _local3:int; while (_local3 < nentity) { if (entities[_local3].type == _arg2){ removeanentity(_arg1, _local3); _local3--; }; _local3++; }; } public function animateentities(_arg1:int, _arg2:helpclass, _arg3:gameclass):void{ if (entities[_arg1].statedelay <= 0){ switch (entities[_arg1].type){ case 0: entities[_arg1].framedelay--; if (entities[_arg1].dir == 1){ entities[_arg1].drawframe = 0; } else { entities[_arg1].drawframe = 20; }; if ((((((((((((_arg3.shotdelay > 0)) && ((entities[_arg1].pickupmode == 0)))) && (entities[_arg1].onground))) && ((entities[_arg1].vx == 0)))) && (!(onladder)))) && ((entities[_arg1].bigfallframe == 0)))){ if (_arg3.isshooting){ if (entities[_arg1].dir == 1){ entities[_arg1].drawframe = 37; } else { entities[_arg1].drawframe = 38; }; }; }; if (entities[_arg1].pickupmode == 0){ if (((!((entities[_arg1].vx == 0))) && (entities[_arg1].onground))){ if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 2; entities[_arg1].walkingframe++; if (entities[_arg1].walkingframe > 8){ entities[_arg1].walkingframe = 0; }; }; entities[_arg1].drawframe = (entities[_arg1].drawframe + (entities[_arg1].walkingframe + 1)); }; if (!entities[_arg1].onground){ if (entities[_arg1].jumping){ entities[_arg1].drawframe = (entities[_arg1].drawframe + 1); } else { entities[_arg1].drawframe = (entities[_arg1].drawframe + 2); }; } else { if (onladder){ if (entities[_arg1].dir == 1){ entities[_arg1].drawframe = 12; } else { entities[_arg1].drawframe = 32; }; } else { if (entities[_arg1].bigfallframe > 0){ if (entities[_arg1].bigfallframe == 4){ entities[_arg1].bigfallframe = 3; entities[_arg1].bigfallframedelay = 2; }; entities[_arg1].bigfallframedelay--; if (entities[_arg1].bigfallframedelay <= 0){ entities[_arg1].bigfallframedelay = 3; entities[_arg1].bigfallframe--; }; if (entities[_arg1].bigfallframe > 0){ if (entities[_arg1].dir == 1){ if (entities[_arg1].bigfallframe == 3){ entities[_arg1].drawframe = 10; }; if (entities[_arg1].bigfallframe == 2){ entities[_arg1].drawframe = 11; }; if (entities[_arg1].bigfallframe == 1){ entities[_arg1].drawframe = 10; }; } else { if (entities[_arg1].bigfallframe == 3){ entities[_arg1].drawframe = 30; }; if (entities[_arg1].bigfallframe == 2){ entities[_arg1].drawframe = 31; }; if (entities[_arg1].bigfallframe == 1){ entities[_arg1].drawframe = 30; }; }; }; }; }; }; } else { if (entities[_arg1].pickupmode == 1){ if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 2; entities[_arg1].pickupframe++; if (entities[_arg1].pickupframe > 2){ entities[_arg1].pickupframe = 2; entities[_arg1].pickupmode = 2; }; }; entities[_arg1].drawframe = (14 + entities[_arg1].pickupframe); } else { if (entities[_arg1].pickupmode == 2){ if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 2; entities[_arg1].pickupframe--; if (entities[_arg1].pickupframe < 0){ entities[_arg1].pickupframe = 0; entities[_arg1].pickupmode = 0; }; }; entities[_arg1].drawframe = (14 + entities[_arg1].pickupframe); }; }; }; break; case 2: entities[_arg1].framedelay--; entities[_arg1].drawframe = entities[_arg1].tile; if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 2; entities[_arg1].walkingframe++; if (entities[_arg1].walkingframe > 3){ entities[_arg1].walkingframe = 0; }; }; entities[_arg1].drawframe = (entities[_arg1].drawframe + entities[_arg1].walkingframe); break; case 6: entities[_arg1].framedelay--; if (entities[_arg1].dir == 1){ entities[_arg1].drawframe = entities[_arg1].tile; } else { entities[_arg1].drawframe = (entities[_arg1].tile + 4); }; if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 2; entities[_arg1].walkingframe++; if (entities[_arg1].walkingframe > 3){ entities[_arg1].walkingframe = 0; }; }; if (Math.abs(entities[_arg1].vx) > 1){ entities[_arg1].drawframe = (entities[_arg1].drawframe + entities[_arg1].walkingframe); }; break; case 9: if (entities[_arg1].tile == 89){ entities[_arg1].framedelay--; if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 2; entities[_arg1].walkingframe++; if (entities[_arg1].walkingframe > 3){ entities[_arg1].walkingframe = 0; }; }; if (Math.abs(entities[_arg1].vx) > 1){ entities[_arg1].drawframe = (89 + entities[_arg1].walkingframe); } else { entities[_arg1].drawframe = 89; }; }; break; case 12: if (entities[_arg1].state == 0){ entities[_arg1].drawframe = entities[_arg1].tile; } else { if (entities[_arg1].onground){ entities[_arg1].drawframe = (entities[_arg1].tile + 1); } else { entities[_arg1].drawframe = (entities[_arg1].tile + 2); }; }; break; case 17: entities[_arg1].framedelay--; if (entities[_arg1].dir == 1){ entities[_arg1].drawframe = entities[_arg1].tile; } else { entities[_arg1].drawframe = (entities[_arg1].tile + 40); }; if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 2; entities[_arg1].walkingframe++; if (entities[_arg1].walkingframe > 6){ entities[_arg1].walkingframe = 0; }; }; if (Math.abs(entities[_arg1].vx) >= 1){ entities[_arg1].drawframe = (entities[_arg1].drawframe + (2 + (entities[_arg1].walkingframe * 2))); }; break; case 19: case 20: entities[_arg1].framedelay--; entities[_arg1].drawframe = entities[_arg1].tile; if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 1; entities[_arg1].walkingframe++; if (entities[_arg1].walkingframe > 1){ entities[_arg1].walkingframe = 0; }; }; entities[_arg1].drawframe = (entities[_arg1].drawframe + entities[_arg1].walkingframe); break; case 25: entities[_arg1].framedelay--; entities[_arg1].drawframe = entities[_arg1].tile; if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 15; entities[_arg1].walkingframe++; if (entities[_arg1].walkingframe > 1){ entities[_arg1].walkingframe = 0; }; }; entities[_arg1].drawframe = (entities[_arg1].drawframe + entities[_arg1].walkingframe); break; case 26: entities[_arg1].framedelay--; if (entities[_arg1].dir == 1){ entities[_arg1].drawframe = entities[_arg1].tile; } else { entities[_arg1].drawframe = (entities[_arg1].tile + 4); }; if (entities[_arg1].harmdelay > 0){ entities[_arg1].drawframe = (entities[_arg1].drawframe + 3); } else { if (!entities[_arg1].onground){ if (entities[_arg1].vy < 0){ entities[_arg1].drawframe = (entities[_arg1].drawframe + 2); } else { entities[_arg1].drawframe = (entities[_arg1].drawframe + 1); }; }; }; if (Math.abs(entities[_arg1].vx) > 1){ entities[_arg1].drawframe = (entities[_arg1].drawframe + entities[_arg1].walkingframe); }; break; case 27: entities[_arg1].framedelay--; if (entities[_arg1].framedelay <= 0){ entities[_arg1].framedelay = 0; }; entities[_arg1].drawframe = entities[_arg1].tile; break; default: entities[_arg1].drawframe = entities[_arg1].tile; break; }; } else { entities[_arg1].statedelay--; if (entities[_arg1].statedelay < 0){ entities[_arg1].statedelay = 0; }; }; } public function checkladder(_arg1:gameclass):Boolean{ var _local2:int; var _local3:int; _local2 = 0; while (_local2 < nentity) { if (entities[_local2].type == 0){ tempx = (entities[_local2].xp + entities[_local2].cx); tempy = (entities[_local2].yp + entities[_local2].cy); tempw = entities[_local2].cw; temph = entities[_local2].ch; temprect = new Rectangle(tempx, tempy, tempw, temph); _local3 = 0; while (_local3 < _arg1.nblocks) { if (_arg1.blocks[_local3].type == 2){ if (_arg1.blocks[_local3].rect.intersects(temprect)){ return (true); }; }; _local3++; }; }; _local2++; }; return (false); } public function checktrigger(_arg1:gameclass):Boolean{ var _local2:int; var _local3:int; _local2 = 0; while (_local2 < nentity) { if (entities[_local2].type == 0){ tempx = (entities[_local2].xp + entities[_local2].cx); tempy = (entities[_local2].yp + entities[_local2].cy); tempw = entities[_local2].cw; temph = entities[_local2].ch; temprect = new Rectangle(tempx, tempy, tempw, temph); _local3 = 0; while (_local3 < _arg1.nblocks) { if (_arg1.blocks[_local3].type == 1){ if (_arg1.blocks[_local3].rect.intersects(temprect)){ activetrigger = _arg1.blocks[_local3].trigger; return (true); }; }; _local3++; }; }; _local2++; }; return (false); } public function getplayer():int{ var _local1:int; _local1 = 0; while (_local1 < nentity) { if (entities[_local1].type == 0){ return (_local1); }; _local1++; }; return (-1); } public function testwallsx(_arg1:gameclass, _arg2:int, _arg3:int, _arg4:int):Boolean{ var _local5:int; tempx = (_arg3 + entities[_arg2].cx); tempy = (_arg4 + entities[_arg2].cy); tempw = entities[_arg2].cw; temph = entities[_arg2].ch; temprect = new Rectangle(tempx, tempy, tempw, temph); if (checkwall(_arg1)){ if (entities[_arg2].vx > 1){ entities[_arg2].vx--; entities[_arg2].newxp = (entities[_arg2].xp + entities[_arg2].vx); return (testwallsx(_arg1, _arg2, entities[_arg2].newxp, entities[_arg2].yp)); }; if (entities[_arg2].vx < -1){ entities[_arg2].vx++; entities[_arg2].newxp = (entities[_arg2].xp + entities[_arg2].vx); return (testwallsx(_arg1, _arg2, entities[_arg2].newxp, entities[_arg2].yp)); }; entities[_arg2].vx = 0; return (false); }; return (true); } public function testwallsy(_arg1:gameclass, _arg2:int, _arg3:int, _arg4:int):Boolean{ var _local5:int; tempx = (_arg3 + entities[_arg2].cx); tempy = (_arg4 + entities[_arg2].cy); tempw = entities[_arg2].cw; temph = entities[_arg2].ch; temprect = new Rectangle(tempx, tempy, tempw, temph); if (checkwall(_arg1)){ if (entities[_arg2].vy > 1){ entities[_arg2].vy--; entities[_arg2].newyp = (entities[_arg2].yp + entities[_arg2].vy); return (testwallsy(_arg1, _arg2, entities[_arg2].xp, entities[_arg2].newyp)); }; if (entities[_arg2].vy < -1){ entities[_arg2].vy++; entities[_arg2].newyp = (entities[_arg2].yp + entities[_arg2].vy); return (testwallsy(_arg1, _arg2, entities[_arg2].xp, entities[_arg2].newyp)); }; entities[_arg2].vy = 0; return (false); }; return (true); } public function confirmflags():void{ var _local1:Number = 0; while (_local1 < 300) { if (flags[_local1] == 2){ flags[_local1] = 1; }; _local1++; }; } public function checkwall(_arg1:gameclass):Boolean{ var _local2:int; _local2 = 0; while (_local2 < _arg1.nblocks) { if (_arg1.blocks[_local2].type == 0){ if (_arg1.blocks[_local2].rect.intersects(temprect)){ return (true); }; }; _local2++; }; return (false); } public function removeanentity(_arg1:helpclass, _arg2:int):void{ _arg1.removeObject(entities[_arg2], entities); nentity--; } public function removeallentities(_arg1:helpclass):void{ while (nentity > 0) { removeanentity(_arg1, 0); }; } public function createentity(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Number=0, _arg5:Number=0, _arg6:int=0):void{ var _local7:Object; if ((((((((_arg6 == 0)) || ((flags[_arg6] == 0)))) || ((_arg3 == 23)))) || ((_arg3 == 22)))){ _local7 = new Object(); switch (_arg3){ case 0: _local7.type = 0; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.onground = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.gravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 6; _local7.cy = 0; _local7.cw = 5; _local7.ch = 16; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 0; _local7.life = 15; _local7.framedelay = 0; _local7.drawframe = 0; _local7.walkingframe = 0; _local7.dir = 0; _local7.bigfallframe = 0; _local7.bigfallframedelay = 0; _local7.bigfallcounter = 0; _local7.pickupmode = 0; _local7.pickupframe = 0; break; case 1: _local7.type = 1; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 0; _local7.cy = 0; _local7.cw = 6; _local7.ch = 3; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 40; _local7.drawframe = 40; break; case 2: _local7.type = 2; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = true; _local7.onbullet = 1; _local7.harmful = true; _local7.flag = _arg6; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 2; _local7.cy = 0; _local7.cw = 7; _local7.ch = 5; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 60; _local7.bulletvel = 0; _local7.framedelay = 0; _local7.drawframe = 60; _local7.walkingframe = 0; break; case 3: _local7.type = 3; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 11; _local7.ch = 5; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 64; _local7.framedelay = 0; _local7.drawframe = 64; _local7.walkingframe = 0; break; case 4: _local7.type = 4; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 0; _local7.cy = 0; _local7.cw = 2; _local7.ch = 6; _local7.state = 0; _local7.statedelay = 0; _local7.life = 20; _local7.tile = 42; _local7.drawframe = 42; break; case 5: _local7.type = 5; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 1; _local7.ch = 1; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 41; _local7.framedelay = 0; _local7.drawframe = 41; _local7.life = 20; break; case 6: _local7.type = 6; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 2; _local7.onywall = 0; _local7.onentity = true; _local7.onbullet = 3; _local7.harmful = true; _local7.flag = _arg6; _local7.hp = 3; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 5; _local7.cy = 5; _local7.cw = 9; _local7.ch = 11; _local7.gravity = true; _local7.vx = 0; _local7.vy = 0; _local7.state = 1; _local7.statedelay = 0; _local7.tile = 80; _local7.bulletvel = 0; _local7.framedelay = 0; _local7.drawframe = 80; _local7.walkingframe = 0; break; case 7: _local7.type = 3; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 16; _local7.ch = 16; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 88; _local7.framedelay = 0; _local7.drawframe = 88; _local7.walkingframe = 0; break; case 8: _local7.type = 8; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 5; _local7.ch = 4; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 43; _local7.framedelay = 0; _local7.drawframe = 43; _local7.walkingframe = 0; break; case 9: _local7.type = 9; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 2; _local7.onentity = true; _local7.onbullet = 10; _local7.harmful = true; _local7.flag = _arg6; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 2; _local7.cy = 0; _local7.cw = 12; _local7.ch = 8; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 93; _local7.bulletvel = 0; _local7.framedelay = 0; _local7.drawframe = 93; _local7.walkingframe = 0; break; case 10: _local7.type = 3; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 12; _local7.ch = 6; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 95; _local7.framedelay = 0; _local7.drawframe = 95; _local7.walkingframe = 0; break; case 11: _local7.type = 11; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 2; _local7.harmful = true; _local7.flag = _arg6; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 5; _local7.ch = 16; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 65; _local7.bulletvel = 0; _local7.framedelay = 0; _local7.drawframe = 65; _local7.walkingframe = 0; break; case 12: _local7.type = 12; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = true; _local7.onbullet = 10; _local7.harmful = true; _local7.flag = _arg6; _local7.hp = 3; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 1; _local7.cy = 3; _local7.cw = 6; _local7.ch = 13; _local7.gravity = true; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 66; _local7.bulletvel = 0; _local7.framedelay = 0; _local7.drawframe = 66; _local7.walkingframe = 0; break; case 13: _local7.type = 3; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 16; _local7.ch = 16; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 69; _local7.framedelay = 0; _local7.drawframe = 69; _local7.walkingframe = 0; break; case 14: _local7.type = 3; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 16; _local7.ch = 16; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 70; _local7.framedelay = 0; _local7.drawframe = 70; _local7.walkingframe = 0; break; case 15: _local7.type = 15; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.harmful = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 1; _local7.cy = 1; _local7.cw = 4; _local7.ch = 4; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 44; _local7.drawframe = 44; break; case 16: _local7.type = 5; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = true; _local7.xgravity = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 1; _local7.ch = 1; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 50; _local7.framedelay = 0; _local7.drawframe = 50; _local7.life = 4; break; case 17: _local7.type = 17; _local7.size = 1; _local7.onwall = 0; _local7.onxwall = 1; _local7.onywall = 0; _local7.onentity = true; _local7.onbullet = 10; _local7.harmful = true; _local7.flag = _arg6; _local7.hp = 4; _local7.onground = false; _local7.gravity = true; _local7.xgravity = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 10; _local7.cy = 0; _local7.cw = 12; _local7.ch = 32; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 100; _local7.charge = 40; _local7.bulletvel = 0; _local7.roar = false; _local7.framedelay = 0; _local7.drawframe = 100; _local7.walkingframe = 0; break; case 18: _local7.type = 15; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.harmful = true; _local7.gravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = -6; _local7.ay = -16; _local7.jumping = true; _local7.jumpframe = 24; _local7.cx = 1; _local7.cy = 1; _local7.cw = 4; _local7.ch = 4; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 44; _local7.drawframe = 44; break; case 19: _local7.type = 19; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 2; _local7.onentity = false; _local7.onbullet = 0; _local7.harmful = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 1; _local7.cy = 0; _local7.cw = 2; _local7.ch = 16; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 47; _local7.drawframe = 47; _local7.framedelay = 0; _local7.walkingframe = 0; break; case 20: _local7.type = 20; _local7.size = 0; _local7.onwall = 0; _local7.onywall = 0; _local7.onxwall = 2; _local7.onentity = false; _local7.onbullet = 0; _local7.harmful = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 0; _local7.cy = 0; _local7.cw = 16; _local7.ch = 4; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 45; _local7.drawframe = 45; _local7.framedelay = 0; _local7.walkingframe = 0; break; case 21: _local7.type = 21; _local7.size = 0; _local7.onwall = 0; _local7.onywall = 0; _local7.onxwall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.harmful = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = 0; _local7.vy = _arg5; _local7.cx = 0; _local7.cy = 0; _local7.cw = 9; _local7.ch = 9; _local7.state = _arg4; _local7.statedelay = 0; _local7.tile = 49; _local7.drawframe = 49; _local7.framedelay = 0; _local7.walkingframe = 0; break; case 22: _local7.type = 22; _local7.size = 0; _local7.onwall = 0; _local7.onywall = 0; _local7.onxwall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 0; _local7.cy = 0; _local7.cw = 8; _local7.ch = 3; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 51; _local7.drawframe = 51; _local7.framedelay = _arg6; _local7.walkingframe = 0; break; case 23: _local7.type = 23; _local7.size = 0; _local7.onwall = 0; _local7.onywall = 0; _local7.onxwall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 0; _local7.cy = 0; _local7.cw = 16; _local7.ch = 4; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 33; _local7.drawframe = 33; _local7.framedelay = _arg6; _local7.walkingframe = 0; break; case 24: _local7.type = 24; _local7.size = 0; _local7.onwall = 0; _local7.onywall = 0; _local7.onxwall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.onplayer = 2; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = _arg4; _local7.vy = _arg5; _local7.cx = 0; _local7.cy = 0; _local7.cw = 16; _local7.ch = 5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 53; _local7.drawframe = 53; _local7.framedelay = 0; _local7.walkingframe = 0; break; case 25: _local7.type = 25; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.harmful = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.vx = 0; _local7.vy = 0; _local7.cx = 1; _local7.cy = 0; _local7.cw = 2; _local7.ch = 16; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 47; _local7.drawframe = 47; _local7.framedelay = 0; _local7.walkingframe = _arg4; break; case 26: _local7.type = 26; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = true; _local7.onbullet = 10; _local7.harmful = true; _local7.hp = 3; _local7.oxp = 0; _local7.oyp = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 4; _local7.cy = 5; _local7.cw = 12; _local7.ch = 11; _local7.gravity = true; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 71; _local7.bulletvel = 0; _local7.framedelay = 0; _local7.drawframe = 71; _local7.walkingframe = 0; _local7.attackdelay = 0; _local7.harmdelay = 0; break; case 27: _local7.type = 27; _local7.size = 2; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = true; _local7.onbullet = 100; _local7.harmful = true; _local7.flag = _arg6; _local7.hp = 5; _local7.onground = false; _local7.gravity = true; _local7.xgravity = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 32; _local7.cy = 0; _local7.cw = 16; _local7.ch = 80; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 180; _local7.charge = 40; _local7.bulletvel = 0; _local7.roar = false; _local7.framedelay = 0; _local7.drawframe = 180; _local7.walkingframe = 0; _local7.attackdelay = 30; _local7.harmdelay = 0; break; case 28: _local7.type = 28; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = true; _local7.onbullet = 0; _local7.harmful = false; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 4; _local7.cy = 2; _local7.cw = 8; _local7.ch = 14; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 18; _local7.bulletvel = 0; _local7.life = 15; _local7.framedelay = 0; _local7.drawframe = 18; _local7.walkingframe = 0; break; case 29: _local7.type = 29; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = false; _local7.xgravity = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 1; _local7.ch = 1; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 50; _local7.life = 40; _local7.framedelay = 0; _local7.drawframe = 50; break; case 30: _local7.type = 30; _local7.size = 0; _local7.onwall = 1; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onground = false; _local7.gravity = false; _local7.xgravity = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 0; _local7.cy = 0; _local7.cw = 1; _local7.ch = 1; _local7.vx = _arg4; _local7.vy = _arg5; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 50; _local7.life = 40; _local7.framedelay = 0; _local7.drawframe = 50; break; case 31: _local7.type = 31; _local7.size = 0; _local7.onwall = 0; _local7.onxwall = 0; _local7.onywall = 0; _local7.onentity = false; _local7.onbullet = 0; _local7.onground = false; _local7.jumping = false; _local7.jumpframe = 0; _local7.gravity = true; _local7.ax = 0; _local7.ay = 0; _local7.xp = _arg1; _local7.yp = _arg2; _local7.cx = 6; _local7.cy = 0; _local7.cw = 5; _local7.ch = 16; _local7.vx = 0; _local7.vy = 0; _local7.state = 0; _local7.statedelay = 0; _local7.tile = 20; _local7.life = 15; _local7.framedelay = 0; _local7.drawframe = 20; _local7.walkingframe = 0; _local7.dir = 0; _local7.bigfallframe = 0; _local7.bigfallframedelay = 0; _local7.bigfallcounter = 0; _local7.pickupmode = 0; _local7.pickupframe = 0; break; }; entities.push(_local7); nentity++; }; } public function applyfriction(_arg1:int, _arg2:Number, _arg3:Number):void{ if (entities[_arg1].xgravity){ if (Math.abs(entities[_arg1].vx) <= _arg2){ entities[_arg1].vx = 0; }; }; if (Math.abs(entities[_arg1].vy) <= _arg3){ entities[_arg1].vy = 0; }; if (entities[_arg1].xgravity){ if (entities[_arg1].vx > 0){ entities[_arg1].vx = (entities[_arg1].vx - _arg2); }; }; if (entities[_arg1].xgravity){ if (entities[_arg1].vx < 0){ entities[_arg1].vx = (entities[_arg1].vx + _arg2); }; }; if (entities[_arg1].vy > 0){ entities[_arg1].vy = (entities[_arg1].vy - _arg3); }; if (entities[_arg1].vy < 0){ entities[_arg1].vy = (entities[_arg1].vy + _arg3); }; if (entities[_arg1].vy > 4){ entities[_arg1].vy = 4; }; if (entities[_arg1].vy < -3){ entities[_arg1].vy = -3; }; if (entities[_arg1].vx > 3){ entities[_arg1].vx = 3; }; if (entities[_arg1].vx < -3){ entities[_arg1].vx = -3; }; } public function entitycollidefloor(_arg1:gameclass, _arg2:int):Boolean{ tempx = (entities[_arg2].xp + entities[_arg2].cx); tempy = ((entities[_arg2].yp + entities[_arg2].cy) + 1); tempw = entities[_arg2].cw; temph = entities[_arg2].ch; temprect = new Rectangle(tempx, tempy, tempw, temph); if (checkwall(_arg1)){ return (true); }; return (false); } public function geteurydice():int{ var _local1:int; _local1 = 0; while (_local1 < nentity) { if (entities[_local1].type == 28){ return (_local1); }; _local1++; }; return (-1); } public function checkdamage(_arg1:gameclass):Boolean{ var _local2:int; var _local3:int; _local2 = 0; while (_local2 < nentity) { if (entities[_local2].type == 0){ tempx = (entities[_local2].xp + entities[_local2].cx); tempy = (entities[_local2].yp + entities[_local2].cy); tempw = entities[_local2].cw; temph = entities[_local2].ch; temprect = new Rectangle(tempx, tempy, tempw, temph); _local3 = 0; while (_local3 < _arg1.nblocks) { if (_arg1.blocks[_local3].type == 3){ if (_arg1.blocks[_local3].rect.intersects(temprect)){ return (true); }; }; _local3++; }; }; _local2++; }; return (false); } public function entitycollide(_arg1:int, _arg2:int):Boolean{ tempx = (entities[_arg1].xp + entities[_arg1].cx); tempy = (entities[_arg1].yp + entities[_arg1].cy); tempw = entities[_arg1].cw; temph = entities[_arg1].ch; temprect = new Rectangle(tempx, tempy, tempw, temph); tempx = (entities[_arg2].xp + entities[_arg2].cx); tempy = (entities[_arg2].yp + entities[_arg2].cy); tempw = entities[_arg2].cw; temph = entities[_arg2].ch; if (temprect.intersects(new Rectangle(tempx, tempy, tempw, temph))){ return (true); }; return (false); } } }//package
Section 26
//gameclass (gameclass) package { import flash.events.*; import com.kongregate.as3.client.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; import com.kongregate.as3.client.*; public class gameclass extends Sprite { public var restorehighlighted:Boolean; public var inmenu:Boolean; public var startspecial:Boolean; public var screenshake:int; public var kongversion:Boolean; public var teststring:String; public var showcreditline:int; public var flashlight:int; public var visithighlighted:Boolean; public var hpposition:int; public var paused:Boolean; public var savepoint:int; public var startroom:int; public var currenthp:int; public var bg:int; public var door_right:int; public var totalhp:int; public var startx:int; public var starty:int; public var globalsound:int; public var hasgun:Boolean; public var jumpheld:Boolean; public var raindelay:int; public var muted:Boolean; public var nblocks:int; public var debugmode:Boolean; public var showtitle:int; public var showimage:int; public var newgamehighlighted:Boolean; public var currentimage:int; public var hascontrol:Boolean; public var blocks:Array; public var enemycount:int; public var mutebutton:int; public var offlinehighlighted:Boolean; public var state:int; public var statedelay:int; public var door_down:int; public var rain:Boolean; public var isshooting:Boolean; public var toggledeath:Boolean; public var test:Boolean; public var lastx:int; public var lasty:int; public var mx:int; public var my:int; public var ongroundlasttime:Boolean; public var eurydicemode:Boolean; public var entdir:int; public var showblocks:Boolean; public var shotdelay:int; public var door_up:int; public var currentroom:int; public var gamecookie:SharedObject; public var showmenu:int; public var infocus:Boolean; public var kongapi:KongregateAPI; public var entvx:int; public var enty:int; public var standaloneversion:Boolean; public var entx:int; public var entvy:int; public var door_left:int; public var onkongregate:Boolean; public function gameclass(_arg1:entityclass, _arg2:helpclass, _arg3:musicclass):void{ blocks = new Array(); super(); gamecookie = SharedObject.getLocal("dwdontlookback"); kongversion = true; if (kongversion){ kongapi = KongregateAPI.getInstance(); }; if (gamecookie.data.counter == undefined){ gamecookie.data.counter = 0; } else { savepoint = gamecookie.data.counter; }; infocus = true; paused = false; muted = false; globalsound = 1; mutebutton = 0; addEventListener(Event.DEACTIVATE, windowNotActive); addEventListener(Event.ACTIVATE, windowActive); showtitle = 0; showcreditline = 0; showmenu = 0; lastx = 0; lasty = 0; test = false; teststring = "Test=TRUE"; jumpheld = false; shotdelay = 0; hasgun = false; hascontrol = true; rain = true; raindelay = 0; showblocks = false; nblocks = 0; currentroom = 0; gotoroom(0, _arg1, _arg2, _arg3); state = 1; statedelay = 0; updatestate(_arg1, _arg2, _arg3); } public function setsavepoint(_arg1:int):void{ savepoint = _arg1; gamecookie.data.counter = savepoint; if (kongversion){ kongapi.stats.submit("progress", _arg1); }; } public function resetenemycount():void{ enemycount = 0; } public function createblock(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:Object = new Object(); _local5.type = 0; _local5.xp = _arg1; _local5.yp = _arg2; _local5.w = _arg3; _local5.h = _arg4; _local5.rect = new Rectangle(_arg1, _arg2, _arg3, _arg4); blocks.push(_local5); nblocks++; } public function windowActive(_arg1:Event):void{ infocus = true; } public function createladder(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:Object = new Object(); _local5.type = 2; _local5.xp = _arg1; _local5.yp = _arg2; _local5.w = _arg3; _local5.h = _arg4; _local5.rect = new Rectangle(_arg1, _arg2, _arg3, _arg4); blocks.push(_local5); nblocks++; } public function createtrigger(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:Object = new Object(); _local6.type = 1; _local6.xp = _arg1; _local6.yp = _arg2; _local6.w = _arg3; _local6.h = _arg4; _local6.rect = new Rectangle(_arg1, _arg2, _arg3, _arg4); _local6.trigger = _arg5; blocks.push(_local6); nblocks++; } public function removeallblocks(_arg1:helpclass):void{ while (nblocks > 0) { removeblock(_arg1, 0); }; } public function updatestate(_arg1:entityclass, _arg2:helpclass, _arg3:musicclass):void{ var _local4:Number; statedelay--; if (statedelay <= 0){ statedelay = 0; }; if (statedelay <= 0){ switch (state){ case 0: break; case 1: state = 17; statedelay = 10; resetenemycount(); startspecial = false; currentroom = 0; entx = 30; enty = 94; _arg1.createentity(entx, enty, 0); _arg1.entities[_arg1.getplayer()].onground = true; _arg1.entities[_arg1.getplayer()].dir = 0; _arg1.entities[_arg1.getplayer()].drawframe = 20; inmenu = true; hascontrol = false; break; case 2: state = 0; removetrigger(_arg2, 2); rain = false; break; case 3: state = 0; removetrigger(_arg2, 3); rain = true; break; case 4: if (_arg1.flags[3] == 1){ removetrigger(_arg2, 4); state = 0; } else { state = 5; statedelay = 6; _arg3.stopstep(); removetrigger(_arg2, 4); hascontrol = false; }; break; case 5: _arg2.globaltemp = _arg1.getplayer(); if (_arg1.entities[_arg2.globaltemp].onground){ state = 6; statedelay = 4; _arg1.entities[_arg2.globaltemp].pickupmode = 1; _arg1.entities[_arg2.globaltemp].pickupframe = 0; }; break; case 6: state = 7; statedelay = 4; showimage = 150; currentimage = 0; _arg1.changeflag(3, 1); _arg1.removeentitytype(_arg2, 8); break; case 7: state = 0; hascontrol = true; hasgun = true; break; case 8: if (showimage > 20){ showimage = 20; }; removetrigger(_arg2, 8); state = 0; break; case 9: if (_arg1.flags[4] == 0){ _arg1.changeflag(4, 1); showimage = 150; currentimage = 2; }; removetrigger(_arg2, 9); state = 0; break; case 10: removetrigger(_arg2, 10); if (_arg1.flags[26] == 0){ state = 11; hascontrol = false; currenthp = 3; totalhp = 3; hpposition = 120; _arg3.play(2); } else { state = 0; }; break; case 11: _arg2.globaltemp = _arg1.getplayer(); if (_arg1.entities[_arg2.globaltemp].onground){ _arg1.createentity(165, 94, 26); _arg1.createentity(5, 108, 25); _arg1.createentity(5, 93, 25, 1); _arg1.createentity(5, 78, 25); _arg1.createentity(5, 63, 25, 1); _arg1.createentity(150, 108, 25); _arg1.createentity(150, 93, 25, 1); _arg1.createentity(150, 78, 25); _arg1.createentity(150, 63, 25, 1); hascontrol = true; state = 0; }; break; case 12: _arg1.removeentitytype(_arg2, 25); _arg1.changeflag(26, 1); state = 0; currenthp = 0; totalhp = 0; hpposition = 0; if (kongversion){ kongapi.stats.submit("defeated_cerberus", 1); }; break; case 13: _arg1.removeentitytype(_arg2, 23); totalhp = 0; currenthp = 0; removeblockat(_arg2, 40, 90); removeblockat(_arg2, 20, 70); removeblockat(_arg2, 100, -10); state = 0; if (kongversion){ kongapi.stats.submit("defeated_hades", 1); }; break; case 14: hascontrol = false; _arg2.globaltemp = _arg1.getplayer(); _arg1.entities[_arg2.globaltemp].vx = 2; _arg1.entities[_arg2.globaltemp].dir = 1; if (currentroom == 52){ if (_arg1.entities[_arg2.globaltemp].xp >= 80){ _arg3.playef(20); state = 15; statedelay = 10; _arg1.entities[_arg2.globaltemp].vx = 0; }; }; if (((!((_arg1.entities[_arg2.globaltemp].vx == 0))) && (_arg1.entities[_arg2.globaltemp].onground))){ _arg3.playstep(_arg3.steptype); } else { _arg3.stopstep(); }; break; case 15: eurydicemode = true; state = 16; statedelay = 60; break; case 16: _arg2.globaltemp = _arg1.getplayer(); _arg1.entities[_arg2.globaltemp].vx = -2; _arg1.entities[_arg2.globaltemp].dir = 0; if (currentroom == 53){ _arg1.entities[_arg2.globaltemp].vx = 0; hascontrol = true; state = 0; }; if (((!((_arg1.entities[_arg2.globaltemp].vx == 0))) && (_arg1.entities[_arg2.globaltemp].onground))){ _arg3.playstep(_arg3.steptype); } else { _arg3.stopstep(); }; break; case 17: state = 18; showcreditline = 5; break; case 18: showcreditline--; if (showcreditline == 1){ state = 19; }; break; case 19: state = 20; statedelay = 80; break; case 20: showcreditline++; if (showcreditline >= 5){ state = 21; statedelay = 60; showcreditline = 0; }; break; case 21: state = 22; showtitle = 5; break; case 22: showtitle--; if (showtitle == 1){ state = 23; }; break; case 23: showmenu = 1; state = 0; break; case 24: showtitle++; if (showtitle >= 5){ state = 25; }; break; case 25: showtitle = 0; state = 26; statedelay = 20; break; case 26: newgamehighlighted = false; inmenu = false; hascontrol = true; state = 27; statedelay = 15; setsavepoint(0); break; case 27: showimage = 160; currentimage = 1; state = 0; break; case 28: hascontrol = false; _arg2.globaltemp = _arg1.getplayer(); _arg1.entities[_arg2.globaltemp].vx = -2; _arg1.entities[_arg2.globaltemp].dir = 0; if (currentroom == 86){ if (_arg1.entities[_arg2.globaltemp].xp <= 90){ state = 29; statedelay = 90; _arg1.entities[_arg2.globaltemp].vx = 0; }; }; if (((!((_arg1.entities[_arg2.globaltemp].vx == 0))) && (_arg1.entities[_arg2.globaltemp].onground))){ _arg3.playstep(_arg3.steptype); } else { _arg3.stopstep(); }; break; case 29: _arg1.entities[_arg1.geteurydice()].state = 1; _arg1.entities[_arg1.getplayer()].state = 1; state = 30; statedelay = 75; break; case 30: if (kongversion){ kongapi.stats.submit("gamecomplete", 1); }; state = 31; statedelay = 1; startspecial = false; currentroom = 0; entx = 30; enty = 94; _arg1.removeentitytype(_arg2, 0); _arg1.createentity(entx, enty, 0); _arg1.entities[_arg1.getplayer()].onground = true; _arg1.entities[_arg1.getplayer()].dir = 0; _arg1.entities[_arg1.getplayer()].drawframe = 20; inmenu = true; hascontrol = false; break; case 31: _local4 = 0; while (_local4 < 300) { _arg1.flags[_local4] = 0; _local4++; }; currentroom = 0; bg = 8; door_right = 5; toggledeath = false; flashlight = 0; screenshake = 0; eurydicemode = false; rain = true; hasgun = false; createtrigger(130, 0, 10, 150, 8); state = 17; statedelay = 10; _arg1.removeentitytype(_arg2, 31); break; case 32: removetrigger(_arg2, 32); if (_arg1.flags[250] == 0){ _arg3.play(0); state = 0; _arg1.changeflag(250, 1); } else { state = 0; }; break; case 33: showtitle++; if (showtitle >= 5){ state = 34; }; break; case 34: showtitle = 0; state = 35; statedelay = 20; break; case 35: state = 0; hascontrol = true; hasgun = true; rain = false; restorehighlighted = false; inmenu = false; eurydicemode = false; _arg1.restartroom = true; _arg1.restartmode = 0; _arg1.restartcounter = 0; _arg1.norestartsound = true; entdir = 1; if (savepoint >= 1){ _arg1.flags[1] = 1; _arg1.flags[2] = 1; _arg1.flags[3] = 1; _arg1.flags[4] = 1; _arg1.flags[250] = 1; }; if (savepoint >= 2){ _arg1.flags[13] = 1; _arg1.flags[14] = 1; _arg1.flags[15] = 1; }; if (savepoint >= 5){ _arg1.flags[26] = 1; }; if (savepoint >= 6){ _arg1.flags[48] = 1; _arg1.flags[49] = 1; }; if (savepoint >= 7){ _arg1.flags[50] = 1; _arg1.flags[51] = 1; }; if (savepoint == 1){ _arg3.changeamb(1); _arg3.steptype = 1; currentroom = 8; entx = 2; enty = 109; } else { if (savepoint == 2){ _arg3.changeamb(1); _arg3.steptype = 1; currentroom = 16; entx = 2; enty = 106; } else { if (savepoint == 3){ currentroom = 27; entx = 2; enty = 94; _arg3.changeamb(2); _arg3.steptype = 1; } else { if (savepoint == 4){ currentroom = 37; entx = 2; enty = 94; _arg3.changeamb(1); _arg3.steptype = 1; } else { if (savepoint == 5){ currentroom = 39; entx = 2; enty = 94; _arg3.changeamb(1); _arg3.steptype = 1; } else { if (savepoint == 6){ currentroom = 45; entx = 2; enty = 74; _arg3.changeamb(1); _arg3.steptype = 1; } else { if (savepoint == 7){ currentroom = 47; entx = 2; enty = 57; _arg3.changeamb(1); _arg3.steptype = 1; } else { if (savepoint == 8){ currentroom = 49; entx = 2; enty = 94; _arg3.changeamb(3); _arg3.steptype = 1; } else { if (savepoint == 9){ currentroom = 64; entx = 150; enty = 94; entdir = 0; _arg3.changeamb(1); _arg3.steptype = 1; _arg3.play(3); eurydicemode = true; } else { if (savepoint == 10){ currentroom = 69; entx = 150; enty = 94; entdir = 0; _arg3.changeamb(1); _arg3.steptype = 1; _arg3.play(3); eurydicemode = true; } else { if (savepoint == 11){ currentroom = 75; entx = 150; enty = 94; entdir = 0; _arg3.changeamb(1); _arg3.steptype = 1; _arg3.play(3); eurydicemode = true; }; }; }; }; }; }; }; }; }; }; }; break; }; }; } public function createdamage(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:Object = new Object(); _local5.type = 3; _local5.xp = _arg1; _local5.yp = _arg2; _local5.w = _arg3; _local5.h = _arg4; _local5.rect = new Rectangle(_arg1, _arg2, _arg3, _arg4); blocks.push(_local5); nblocks++; } public function removeblockat(_arg1:helpclass, _arg2:int, _arg3:int):void{ var _local4:int; while (_local4 < nblocks) { if ((((blocks[_local4].xp == _arg2)) && ((blocks[_local4].yp == _arg3)))){ removeblock(_arg1, _local4); }; _local4++; }; } public function removeblock(_arg1:helpclass, _arg2:int):void{ _arg1.removeObject(blocks[_arg2], blocks); nblocks--; } public function windowNotActive(_arg1:Event):void{ infocus = false; } public function removetrigger(_arg1:helpclass, _arg2:int):void{ var _local3:int; while (_local3 < nblocks) { if (blocks[_local3].type == 1){ if (blocks[_local3].trigger == _arg2){ removeblock(_arg1, _local3); }; }; _local3++; }; } public function gotoroom(_arg1:int, _arg2:entityclass, _arg3:helpclass, _arg4:musicclass):void{ if ((((_arg1 == currentroom)) || ((((_arg1 == startroom)) && ((startspecial == true)))))){ _arg2.resetflags(); } else { _arg2.confirmflags(); }; removeallblocks(_arg3); _arg2.removeallentities(_arg3); door_up = -2; door_down = -2; door_right = -2; door_left = -2; currentroom = _arg1; switch (_arg1){ case 0: bg = 8; door_right = 5; toggledeath = false; flashlight = 0; screenshake = 0; eurydicemode = false; createblock(-10, 110, 180, 100); createtrigger(130, 0, 10, 150, 8); break; case 1: bg = 2; door_right = 2; door_left = 7; createblock(-10, 125, 180, 100); _arg2.createentity(90, 109, 6, 0, 0, 1); createtrigger(-10, 110, 180, 100, 32); break; case 2: bg = 5; door_right = 3; door_left = 1; createblock(-10, 125, 180, 100); createtrigger(70, 0, 20, 160, 4); _arg2.createentity(75, 121, 8, 0, 0, 3); break; case 3: bg = 3; door_right = 4; door_left = 2; createdamage(-10, 130, 180, 100); createblock(-10, 125, 65, 100); createblock(130, 125, 40, 100); createblock(73, 119, 12, 4); createblock(101, 112, 12, 4); break; case 4: _arg4.changeamb(0); _arg4.steptype = 0; bg = 4; door_right = 8; door_left = 3; rain = true; createblock(-10, 125, 180, 100); createblock(72, -2, 200, 10); _arg2.createentity(165, 50, 2, 0, 0, 2); break; case 5: bg = 6; door_left = 0; door_right = 6; createblock(-10, 110, 180, 100); createblock(90, 88, 90, 90); createtrigger(10, 0, 10, 150, 9); createtrigger(130, 0, 10, 150, 8); break; case 6: bg = 0; door_left = 5; door_down = 7; createblock(-10, 88, 80, 100); break; case 7: bg = 1; door_up = 6; door_right = 1; createblock(0, 0, 28, 128); createblock(0, -2, 70, 10); createblock(-10, 125, 180, 100); createtrigger(-10, 110, 180, 100, 32); break; case 8: _arg4.changeamb(1); _arg4.steptype = 1; bg = 9; door_left = 4; door_right = 9; rain = false; createblock(-10, 125, 180, 100); _arg2.createentity(50, 18, 11); _arg2.createentity(100, 15, 11); _arg2.createentity(70, 58, 2, 0, 0, 5); if (savepoint < 1){ setsavepoint(1); }; break; case 9: bg = 10; door_left = 8; door_right = 10; createblock(-10, 125, 180, 100); _arg2.createentity(10, 14, 11); _arg2.createentity(130, 42, 11); _arg2.createentity(110, 35, 9, 0, 0, 6); break; case 10: bg = 11; door_left = 9; door_right = 11; createblock(-10, 125, 180, 100); createblock(-10, -10, 180, 15); createblock(132, 36, 60, 150); createladder(117, 17, 2, 85); _arg2.createentity(15, 32, 2, 0, 0, 9); _arg2.createentity(140, 6, 9, 0, 0, 7); _arg2.createentity(40, 6, 9, 0, 0, 12); break; case 11: bg = 12; door_left = 10; door_down = 12; createblock(-10, 36, 105, 13); createblock(-10, -10, 180, 15); createblock(111, 0, 9, 22); createblock(138, 0, 30, 150); createblock(78, 87, 90, 70); createblock(0, 88, 48, 100); createblock(-10, 36, 35, 100); _arg2.createentity(122, 8, 9, 0, 0, 11); break; case 12: bg = 13; door_right = 13; createblock(-10, 122, 180, 100); createblock(0, 0, 15, 160); createblock(102, -1, 80, 66); createblock(146, 100, 40, 30); _arg2.createentity(150, 84, 6, 0, 0, 13); _arg2.createentity(30, 65, 2, 0, 0, 14); _arg2.createentity(165, 80, 2, 0, 0, 15); break; case 13: bg = 14; door_left = 12; door_right = 14; createblock(-20, 100, 200, 80); createblock(-20, 0, 200, 44); createblock(-20, -1, 30, 66); _arg2.createentity(50, 55, 19); _arg2.createentity(85, 75, 19); _arg2.createentity(120, 55, 19); startspecial = true; startx = 2; starty = 84; startroom = 13; break; case 14: bg = 15; door_left = 13; door_right = 15; _arg4.fadeout(); createblock(-20, 100, 75, 80); createblock(-20, 0, 200, 44); createblock(-10, 122, 180, 100); _arg2.createentity(30, 55, 19); _arg2.createentity(40, 60, 19); startspecial = false; break; case 15: bg = 16; door_left = 14; door_right = 16; createblock(-10, 122, 180, 100); break; case 16: bg = 17; door_left = 15; door_down = 17; createblock(-10, 122, 40, 100); if (savepoint < 2){ setsavepoint(2); }; break; case 17: _arg4.changeamb(1); _arg4.steptype = 1; _arg4.play(1); bg = 18; door_down = 18; createblock(-10, -50, 15, 300); createblock(155, -50, 15, 300); break; case 18: _arg4.changeamb(-1); _arg4.steptype = 2; bg = 7; door_down = 20; createblock(-10, -50, 15, 300); createblock(155, -50, 15, 300); break; case 20: bg = 7; door_down = 21; createblock(-10, -50, 15, 300); createblock(155, -50, 15, 300); break; case 21: bg = 7; door_right = 22; createblock(-10, -50, 15, 300); createblock(155, -10, 15, 60); createblock(-10, 125, 180, 100); break; case 22: bg = 7; door_left = 21; door_right = 23; createblock(-10, -10, 15, 60); createblock(-100, 125, 280, 100); _arg2.createentity(-60, 106, 6, 0, 0, 16); _arg2.createentity(170, 106, 6, 0, 0, 22); break; case 23: bg = 7; door_left = 22; door_right = 25; createblock(-10, 125, 180, 100); createblock(100, 110, 100, 100); _arg2.createentity(30, -80, 9, 0, 0, 18); _arg2.createentity(65, -60, 9, 0, 0, 19); _arg2.createentity(100, -40, 9, 0, 0, 20); _arg2.createentity(135, -20, 9, 0, 0, 21); break; case 24: bg = 7; door_left = 23; door_right = 25; createblock(-10, -10, 180, 15); createblock(-10, 110, 180, 100); createblock(130, 90, 25, 5); createblock(90, 70, 25, 5); createblock(50, 50, 25, 5); createblock(50, 0, 5, 50); createblock(130, 50, 25, 5); createblock(90, 30, 40, 5); createblock(130, 30, 5, 25); createblock(155, 50, 20, 100); _arg2.createentity(20, 50, 20); _arg2.createentity(20, 70, 20); _arg2.createentity(20, 90, 20); _arg2.createentity(20, 6, 11); _arg2.createentity(60, 6, 11); _arg2.createentity(100, 6, 11); break; case 25: bg = 7; door_left = 23; door_right = 26; createblock(-10, -10, 180, 15); createblock(-10, 110, 180, 100); createblock(20, 95, 15, 51); createblock(30, 5, 50, 30); createblock(30, 80, 50, 40); createblock(110, 5, 60, 30); createblock(110, 80, 60, 40); _arg2.createentity(80, 5, 21); _arg2.createentity(100, 100, 21); _arg2.createentity(50, 40, 19); _arg2.createentity(80, 30, 20); _arg2.createentity(80, 90, 20); break; case 26: _arg4.changeamb(-1); _arg4.steptype = 2; bg = 7; door_left = 25; door_right = 27; createblock(-10, -10, 180, 15); createblock(-10, 110, 180, 100); createblock(-10, 80, 50, 40); break; case 27: _arg4.changeamb(2); _arg4.steptype = 1; bg = 19; door_left = 26; door_right = 28; createblock(-10, 110, 180, 100); startspecial = false; if (savepoint < 3){ setsavepoint(3); }; break; case 28: bg = 20; door_left = 27; door_right = 29; createblock(-10, 110, 93, 100); createdamage(-10, 125, 180, 100); _arg2.createentity(110, 110, 22, 0, 0, 80); _arg2.createentity(140, 105, 22, 0, 0, 80); _arg2.createentity(60, 88, 24); _arg2.createentity(90, 75, 24); _arg2.createentity(120, 75, 24); _arg2.createentity(150, 75, 24); createblock(150, 76, 16, 4); startspecial = true; startx = 40; starty = 94; startroom = 28; break; case 29: bg = 21; door_left = 28; door_right = 30; createdamage(-10, 125, 180, 100); _arg2.createentity(0, 75, 24); _arg2.createentity(16, 75, 24); _arg2.createentity(32, 75, 24); _arg2.createentity(48, 75, 24); _arg2.createentity(70, 105, 22, 0, 0, 65); _arg2.createentity(82, 105, 22, 0, 0, 55); _arg2.createentity(94, 105, 22, 0, 0, 45); _arg2.createentity(106, 75, 24); _arg2.createentity(122, 75, 24); _arg2.createentity(138, 75, 24); _arg2.createentity(154, 75, 24); createblock(0, 76, 16, 4); createblock(138, 76, 16, 4); createblock(154, 76, 16, 4); break; case 30: bg = 22; door_left = 29; door_right = 31; createdamage(-10, 125, 180, 100); _arg2.createentity(0, 75, 24); _arg2.createentity(80, 50, 23, 0, 0, 40); _arg2.createentity(20, 95, 22, 0, 0, 80); _arg2.createentity(70, 95, 22, 0, 0, 20); _arg2.createentity(100, 95, 22, 0, 0, 20); createblock(0, 76, 16, 4); createblock(42, 64, 16, 4); createblock(122, 42, 40, 6); startspecial = true; startx = 45; starty = 48; startroom = 30; break; case 31: bg = 23; door_left = 30; door_right = 32; createdamage(-10, 125, 180, 100); createblock(-10, 42, 74, 6); createblock(107, 70, 16, 6); createblock(155, 63, 16, 6); createdamage(130, 100, 25, 7); createblock(130, 107, 25, 6); _arg2.createentity(80, 95, 22, 0, 0, 89); _arg2.createentity(128, 95, 22, 0, 0, 80); _arg2.createentity(140, 95, 22, 0, 0, 60); _arg2.createentity(128, 95, 22, 0, 0, 35); _arg2.createentity(140, 95, 22, 0, 0, 15); _arg2.createentity(170, 40, 2, 0, 0, 24); startspecial = true; startx = 110; starty = 54; startroom = 31; break; case 32: bg = 24; door_left = 31; door_right = 33; createdamage(-10, 125, 180, 100); createblock(-10, 63, 26, 6); _arg2.createentity(40, 50, 23, 0, 0, -15); _arg2.createentity(80, 40, 23, 0, 0, -13); _arg2.createentity(120, 30, 23, 0, 0, -11); _arg2.createentity(136, 30, 23, 0, 0, -11); _arg2.createentity(152, 30, 23, 0, 0, -11); startspecial = true; startx = 2; starty = 47; startroom = 32; break; case 33: bg = 21; door_left = 32; door_right = 34; createdamage(-10, 125, 180, 100); _arg2.createentity(0, 60, 24); _arg2.createentity(16, 60, 24); _arg2.createentity(32, 60, 24); _arg2.createentity(48, 60, 24); _arg2.createentity(64, 60, 24); _arg2.createentity(20, 80, 23, 0, 0, 10); _arg2.createentity(36, 80, 23, 0, 0, 15); _arg2.createentity(52, 80, 23, 0, 0, 20); _arg2.createentity(68, 80, 23, 0, 0, 25); _arg2.createentity(84, 80, 23, 0, 0, 30); _arg2.createentity(100, 80, 23, 0, 0, 35); _arg2.createentity(116, 80, 23, 0, 0, 45); _arg2.createentity(132, 80, 23, 0, 0, 50); _arg2.createentity(148, 80, 23, 0, 0, 55); break; case 34: bg = 21; door_left = 33; door_right = 35; createdamage(-10, 125, 180, 100); _arg2.createentity(-12, 80, 23, 0, 0, 45); _arg2.createentity(4, 80, 23, 0, 0, 45); _arg2.createentity(20, 80, 23, 0, 0, 35); _arg2.createentity(36, 80, 23, 0, 0, 35); _arg2.createentity(52, 80, 23, 0, 0, 25); _arg2.createentity(68, 80, 23, 0, 0, 25); _arg2.createentity(84, 80, 23, 0, 0, 15); _arg2.createentity(100, 80, 23, 0, 0, 15); _arg2.createentity(116, 79, 24); _arg2.createentity(132, 79, 24); _arg2.createentity(148, 79, 24); break; case 35: bg = 25; door_left = 34; door_right = 36; createdamage(-10, 125, 180, 100); createblock(0, 80, 16, 4); _arg2.createentity(0, 79, 24); createblock(30, 82, 23, 8); createblock(82, 76, 24, 8); createblock(128, 87, 22, 8); _arg2.createentity(56, 95, 22, 0, 0, 80); _arg2.createentity(68, 95, 22, 0, 0, 60); _arg2.createentity(56, 95, 22, 0, 0, 20); _arg2.createentity(68, 95, 22, 0, 0, 40); _arg2.createentity(112, 105, 22, 0, 0, 80); _arg2.createentity(112, 105, 22, 0, 0, 50); _arg2.createentity(112, 105, 22, 0, 0, 20); startspecial = true; startx = 40; starty = 66; startroom = 35; break; case 36: _arg4.changeamb(2); bg = 26; door_left = 35; door_right = 37; createdamage(-10, 125, 180, 100); createblock(145, 110, 93, 100); _arg2.createentity(10, 85, 24); _arg2.createentity(55, 85, 24); _arg2.createentity(100, 85, 24); break; case 37: _arg4.changeamb(1); bg = 27; door_left = 36; door_right = 38; createblock(-10, 110, 200, 100); startspecial = false; if (savepoint < 4){ setsavepoint(4); }; break; case 38: bg = 28; door_left = 37; door_right = 39; createblock(-100, 110, 400, 100); createtrigger(20, -10, 40, 200, 10); currenthp = 0; totalhp = 0; hpposition = 0; startspecial = true; startx = 20; starty = 94; startroom = 38; break; case 39: bg = 29; door_left = 38; door_right = 40; createblock(-100, 110, 400, 100); _arg2.createentity(120, 94, 12, 0, 0, 30); _arg2.createentity(165, 60, 2, 0, 0, 33); startspecial = false; if (_arg2.flags[251] == 0){ _arg2.changeflag(251, 1); _arg4.play(0); }; if (savepoint < 5){ setsavepoint(5); }; break; case 40: bg = 30; door_left = 39; door_right = 41; createblock(-100, 110, 400, 100); _arg2.createentity(120, 94, 12, 0, 0, 31); _arg2.createentity(80, 94, 12, 0, 0, 32); _arg2.createentity(-40, 94, 12, 0, 0, 34); break; case 41: bg = 31; door_left = 40; door_right = 42; createblock(-100, 110, 154, 100); createblock(125, 110, 400, 100); createdamage(-10, 125, 200, 100); _arg2.createentity(64, 95, 23, 0, 0, 45); _arg2.createentity(80, 95, 23, 0, 0, 30); _arg2.createentity(96, 95, 23, 0, 0, 15); _arg2.createentity(165, 40, 2, 0, 0, 35); _arg2.createentity(195, 10, 2, 0, 0, 36); _arg2.createentity(225, -20, 2, 0, 0, 37); _arg2.createentity(0xFF, -50, 2, 0, 0, 38); _arg2.createentity(285, -80, 2, 0, 0, 39); _arg2.createentity(315, -110, 2, 0, 0, 40); _arg2.createentity(-50, 40, 2, 0, 0, 41); _arg2.createentity(-80, 10, 2, 0, 0, 42); _arg2.createentity(-110, -20, 2, 0, 0, 43); _arg2.createentity(-140, -50, 2, 0, 0, 44); _arg2.createentity(-170, -80, 2, 0, 0, 45); _arg2.createentity(-200, -110, 2, 0, 0, 46); break; case 42: bg = 32; door_left = 41; door_right = 43; createblock(-10, 110, 200, 100); _arg2.createentity(130, 78, 17, 0, 0, 47); startspecial = false; break; case 43: bg = 33; door_left = 42; door_down = 44; createblock(-10, 110, 55, 100); startspecial = true; startx = 5; starty = 94; startroom = 43; break; case 44: bg = 34; door_right = 45; createblock(-10, -50, 55, 60); createblock(-10, -50, 40, 200); createblock(-10, 90, 200, 200); _arg2.createentity(130, 74, 6, 0, 0, 48); _arg2.createentity(50, 74, 12, 0, 0, 49); break; case 45: bg = 37; door_left = 44; door_right = 46; createblock(136, 40, 200, 200); createblock(-10, 90, 200, 200); _arg2.createentity(80, 80, 23, 0, 0, 50); _arg2.createentity(50, 60, 23, 0, 0, 10); _arg2.createentity(20, 40, 23, 0, 0, 30); _arg2.createentity(65, 20, 24); _arg2.createentity(49, 20, 24); _arg2.createentity(100, 20, 23, 0, 0, 40); _arg2.flags[48] = 1; _arg2.flags[49] = 1; startspecial = true; startx = 5; starty = 74; startroom = 45; if (savepoint < 6){ setsavepoint(6); }; _arg4.fadeout(); break; case 46: bg = 35; door_left = 45; door_right = 47; createblock(-10, 110, 80, 200); createblock(-10, 120, 200, 200); createblock(-10, 40, 28, 200); createblock(124, 73, 60, 200); createblock(124, 67, 5, 200); createladder(116, 58, 3, 30); _arg2.createentity(25, 95, 23); _arg2.createentity(40, 80, 23); _arg2.createentity(55, 65, 23); _arg2.createentity(71, 65, 23); _arg2.createentity(90, 88, 17, 0, 0, 50); _arg2.createentity(150, 41, 17, 0, 0, 51); startspecial = false; break; case 47: bg = 36; door_left = 46; door_down = 48; createblock(-10, 73, 30, 200); createblock(50, -10, 7, 200); startspecial = true; startx = 5; starty = 57; startroom = 47; currenthp = 0; totalhp = 0; if (savepoint < 7){ setsavepoint(7); }; if (kongversion){ kongapi.stats.submit("minchallenge", enemycount); }; break; case 48: _arg4.changeamb(1); bg = 38; door_right = 49; createblock(-10, 110, 200, 200); createblock(-10, -50, 22, 300); createblock(50, -50, 7, 65); createblock(157, -50, 7, 125); _arg2.createentity(90, 30, 27, 0, 0, 52); currenthp = 5; totalhp = 5; hpposition = 120; _arg2.createentity(40, 90, 23, 0, 0, 60); _arg2.createentity(20, 70, 23, 0, 0, 0); break; case 49: _arg4.changeamb(3); bg = 39; door_left = -1; door_right = 50; createblock(-10, -50, 13, 125); createblock(-10, 110, 200, 200); startspecial = false; if (savepoint < 8){ setsavepoint(8); }; break; case 50: bg = 40; door_left = -1; door_right = 51; createblock(-10, 110, 200, 200); break; case 51: bg = 41; door_left = -1; door_right = 52; createblock(-10, 110, 200, 200); hasgun = true; eurydicemode = false; createtrigger(140, -10, 200, 200, 14); break; case 52: bg = 42; door_left = 53; createblock(-10, 110, 200, 200); createblock(105, -30, 200, 200); _arg2.createentity(115, 85, 28); hasgun = false; break; case 53: bg = 41; door_left = 54; door_right = -1; createblock(-10, 110, 200, 200); hasgun = true; break; case 54: bg = 40; door_left = 55; door_right = -1; createblock(-10, 110, 200, 200); break; case 55: _arg4.changeamb(3); bg = 39; door_left = 56; door_right = -1; createblock(-10, -50, 13, 125); createblock(-10, 110, 200, 200); break; case 56: _arg4.changeamb(1); bg = 43; door_right = -1; door_up = 57; createblock(-10, 110, 200, 200); createblock(-10, -50, 22, 300); createblock(50, -50, 20, 65); createblock(157, -50, 7, 125); createladder(99, -10, 3, 90); break; case 57: _arg4.play(3); bg = 44; door_down = -1; door_up = 58; createblock(50, -50, 20, 265); createladder(99, -10, 3, 190); break; case 58: bg = 45; door_down = -1; door_up = 59; createblock(-10, 120, 80, 265); createblock(-10, -10, 30, 265); createladder(43, -10, 3, 102); createladder(99, 50, 3, 190); break; case 59: bg = 46; door_down = -1; door_left = 60; createblock(-10, 110, 42, 10); createblock(-10, 110, 30, 100); createladder(43, 70, 3, 190); break; case 60: bg = 47; door_right = -1; door_left = 93; createblock(-10, 110, 200, 100); break; case 61: bg = 47; door_right = -1; door_left = 87; createblock(-10, 110, 200, 100); _arg2.createentity(20, 108, 22, 0, 0, 60); _arg2.createentity(30, 108, 22, 0, 0, 70); _arg2.createentity(40, 108, 22, 0, 0, 80); _arg2.createentity(50, 108, 22, 0, 0, 0); _arg2.createentity(60, 108, 22, 0, 0, 10); _arg2.createentity(70, 108, 22, 0, 0, 20); _arg2.createentity(80, 108, 22, 0, 0, 30); _arg2.createentity(90, 108, 22, 0, 0, 40); _arg2.createentity(100, 108, 22, 0, 0, 50); _arg2.createentity(110, 108, 22, 0, 0, 60); _arg2.createentity(120, 108, 22, 0, 0, 70); _arg2.createentity(130, 108, 22, 0, 0, 80); break; case 62: bg = 48; door_right = -1; door_left = 63; createblock(-10, 110, 200, 100); createblock(30, 80, 13, 100); createblock(118, 17, 11, 24); createblock(30, 95, 98, 100); createblock(30, 0, 100, 26); _arg2.createentity(44, 28, 21, 1); _arg2.createentity(105, 29, 21, 2); _arg2.createentity(105, 80, 21, 3); _arg2.createentity(44, 80, 21, 4); break; case 63: bg = 47; door_right = -1; door_left = 88; createblock(-10, 110, 200, 100); _arg2.createentity(10, 100, 20); _arg2.createentity(30, 50, 19); _arg2.createentity(80, 50, 19); _arg2.createentity(130, 50, 19); break; case 64: bg = 49; door_right = -1; door_up = 65; createblock(-10, 110, 200, 265); createblock(-10, -10, 32, 265); createladder(43, -10, 5, 95); if (savepoint < 9){ setsavepoint(9); }; break; case 65: bg = 46; door_down = -1; door_left = 89; createblock(-10, 110, 42, 10); createblock(-10, 110, 30, 100); createladder(43, 70, 5, 190); break; case 66: bg = 47; door_right = -1; door_left = 90; createblock(-10, 110, 200, 100); _arg2.createentity(0, 10, 11); _arg2.createentity(10, 10, 11); _arg2.createentity(20, 10, 11); _arg2.createentity(30, 10, 11); _arg2.createentity(40, 10, 11); _arg2.createentity(50, 10, 11); _arg2.createentity(60, 10, 11); _arg2.createentity(70, 10, 11); _arg2.createentity(80, 10, 11); _arg2.createentity(90, 10, 11); _arg2.createentity(100, 10, 11); _arg2.createentity(110, 10, 11); _arg2.createentity(120, 10, 11); _arg2.createentity(130, 10, 11); _arg2.createentity(140, 10, 11); _arg2.createentity(150, 10, 11); _arg2.createentity(160, 10, 11); break; case 67: bg = 47; door_right = -1; door_left = 68; createblock(-10, 110, 200, 100); _arg2.createentity(35, 108, 22, 0, 0, 80); _arg2.createentity(45, 108, 22, 0, 0, 0); _arg2.createentity(55, 108, 22, 0, 0, 10); _arg2.createentity(65, 108, 22, 0, 0, 20); _arg2.createentity(85, 108, 22, 0, 0, 80); _arg2.createentity(95, 108, 22, 0, 0, 0); _arg2.createentity(105, 108, 22, 0, 0, 10); _arg2.createentity(115, 108, 22, 0, 0, 20); _arg2.createentity(35, 108, 22, 0, 0, 35); _arg2.createentity(45, 108, 22, 0, 0, 45); _arg2.createentity(55, 108, 22, 0, 0, 55); _arg2.createentity(65, 108, 22, 0, 0, 65); _arg2.createentity(85, 108, 22, 0, 0, 35); _arg2.createentity(95, 108, 22, 0, 0, 45); _arg2.createentity(105, 108, 22, 0, 0, 55); _arg2.createentity(115, 108, 22, 0, 0, 65); break; case 68: bg = 50; door_right = -1; door_left = 69; createblock(-10, 110, 200, 100); createblock(34, 95, 86, 60); createblock(34, 0, 86, 28); _arg2.createentity(40, 30, 19); _arg2.createentity(50, 35, 19); _arg2.createentity(60, 40, 19); _arg2.createentity(90, 50, 19); _arg2.createentity(100, 55, 19); _arg2.createentity(110, 60, 19); break; case 69: bg = 49; door_right = -1; door_up = 70; createblock(-10, 110, 200, 265); createblock(-10, -10, 32, 265); createladder(43, -10, 5, 95); if (savepoint < 10){ setsavepoint(10); }; break; case 70: bg = 46; door_down = -1; door_left = 91; createblock(-10, 110, 42, 10); createblock(-10, 110, 30, 100); createladder(43, 70, 5, 190); toggledeath = false; break; case 71: bg = 53; door_right = -1; door_left = 72; createblock(-10, 110, 200, 100); createblock(19, -10, 121, 55); createblock(19, 98, 16, 60); createblock(19, -10, 16, 60); createblock(125, -10, 16, 60); createblock(125, 98, 16, 60); _arg2.createentity(35, 101, 21, 4); _arg2.createentity(54, 101, 21, 3); _arg2.createentity(73, 101, 21, 3); _arg2.createentity(93, 101, 21, 3); _arg2.createentity(116, 101, 21, 3); _arg2.createentity(35, 45, 21, 1); _arg2.createentity(54, 45, 21, 1); _arg2.createentity(73, 45, 21, 1); _arg2.createentity(93, 45, 21, 1); _arg2.createentity(116, 45, 21, 2); _arg2.createentity(19, 50, 23); _arg2.createentity(19, 54, 23); _arg2.createentity(19, 58, 23); _arg2.createentity(19, 62, 23); _arg2.createentity(19, 66, 23); _arg2.createentity(19, 70, 23); _arg2.createentity(19, 74, 23); _arg2.createentity(19, 78, 23); _arg2.createentity(19, 82, 23); _arg2.createentity(19, 86, 23); _arg2.createentity(19, 90, 23); _arg2.createentity(19, 94, 23); toggledeath = true; break; case 72: bg = 52; door_right = -1; door_left = 73; createblock(-10, 110, 200, 100); createblock(112, 40, 20, 100); createblock(13, 9, 24, 68); createladder(135, 23, 6, 60); createblock(-10, -10, 200, 25); _arg2.createentity(56, 40, 20); _arg2.createentity(66, 55, 20); _arg2.createentity(76, 70, 20); toggledeath = false; break; case 73: bg = 54; door_right = -1; door_left = 92; createblock(-10, -10, 200, 25); createblock(-10, 110, 200, 100); createblock(15, 40, 5, 100); createblock(15, 40, 30, 5); createblock(15, 63, 10, 5); createblock(40, 40, 5, 10); createblock(40, 80, 5, 100); createblock(140, 0, 5, 90); createblock(115, 85, 30, 5); createblock(135, 63, 10, 5); createblock(115, 0, 5, 50); createblock(115, 80, 5, 10); _arg2.createentity(20, 45, 21); _arg2.createentity(131, 76, 21); createblock(80, 35, 10, 5); createblock(100, 45, 10, 5); createladder(105, 55, 5, 28); createladder(80, 45, 5, 28); createladder(55, 25, 5, 38); break; case 74: bg = 51; door_right = -1; door_left = 75; createblock(-10, -10, 200, 25); createblock(144, 110, 80, 100); createblock(-10, 110, 34, 100); createdamage(-10, 120, 200, 100); createladder(132, 22, 5, 70); createladder(29, 22, 5, 70); _arg2.createentity(64, 85, 23); _arg2.createentity(80, 85, 23); break; case 75: bg = 55; door_right = -1; door_left = 76; createblock(-10, 110, 200, 100); if (savepoint < 11){ setsavepoint(11); }; break; case 76: bg = 56; door_right = -1; door_down = 77; createblock(120, 110, 200, 100); createblock(80, 122, 200, 100); createblock(0, 0, 40, 200); break; case 77: bg = 10; door_right = -1; door_left = 78; createblock(-10, 125, 180, 100); _arg2.createentity(10, 14, 11); _arg2.createentity(130, 42, 11); break; case 78: _arg4.changeamb(1); _arg4.steptype = 1; bg = 9; door_left = 79; door_right = -1; rain = false; createblock(-10, 125, 180, 100); _arg2.createentity(50, 18, 11); _arg2.createentity(100, 15, 11); break; case 79: _arg4.fadeout(); _arg4.changeamb(0); _arg4.steptype = 0; bg = 4; door_right = -1; door_left = 80; rain = true; createblock(-10, 125, 180, 100); createblock(72, -2, 200, 10); break; case 80: bg = 3; door_right = -1; door_left = 81; createdamage(-10, 130, 180, 100); createblock(-10, 125, 60, 100); createblock(130, 125, 40, 100); createblock(73, 119, 12, 4); createblock(102, 112, 10, 4); break; case 81: bg = 5; door_right = -1; door_left = 82; createblock(-10, 125, 180, 100); break; case 82: bg = 2; door_right = -1; door_left = 83; createblock(-10, 125, 180, 100); break; case 83: bg = 57; door_up = 84; door_right = 1; createblock(0, 0, 28, 128); createblock(0, -2, 70, 10); createblock(-10, 125, 180, 100); createladder(72, -10, 5, 110); break; case 84: bg = 58; door_left = 85; door_down = -1; door_right = -1; createblock(-10, 88, 80, 100); createladder(72, 75, 5, 110); break; case 85: bg = 6; door_left = 86; door_right = -1; createtrigger(-10, -10, 60, 200, 28); createblock(-10, 110, 180, 100); createblock(90, 88, 90, 90); break; case 86: bg = 8; door_right = -1; createblock(-10, 110, 180, 100); _arg2.createentity(30, 94, 31); setsavepoint(0); break; case 87: bg = 47; door_right = -1; door_left = 62; createblock(-10, 110, 200, 100); break; case 88: bg = 47; door_right = -1; door_left = 64; createblock(-10, 110, 200, 100); break; case 89: bg = 47; door_right = -1; door_left = 66; createblock(-10, 110, 200, 100); break; case 90: bg = 47; door_right = -1; door_left = 67; createblock(-10, 110, 200, 100); break; case 91: bg = 47; door_right = -1; door_left = 71; createblock(-10, 110, 200, 100); break; case 92: bg = 47; door_right = -1; door_left = 74; createblock(-10, 110, 200, 100); break; case 93: bg = 60; door_right = -1; door_left = 61; createblock(-10, 110, 200, 100); createblock(10, -10, 10, 100); createblock(40, 30, 70, 10); createblock(40, 30, 40, 30); createblock(140, -10, 10, 100); createblock(110, 80, 30, 10); createblock(100, 90, 50, 4); createblock(10, -10, 140, 15); createladder(125, 10, 3, 50); _arg2.createentity(40, 60, 19); _arg2.createentity(57, 60, 19); _arg2.createentity(75, 60, 19); break; }; } public function updaterain(_arg1:entityclass):void{ raindelay--; if (raindelay <= 0){ raindelay = 0; }; if (((rain) && ((raindelay <= 0)))){ raindelay = 2; _arg1.createentity((Math.random() * 200), (-5 - (Math.random() * 5)), 4, -3, 8); }; } public function incenemycount():void{ if (currentroom != 48){ enemycount++; }; } public function kongapitest(_arg1:KongregateEvent):void{ trace("Services available; kongapitest() called."); } } }//package
Section 27
//helpclass (helpclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class helpclass extends Sprite { public var glowdir:int; public var globaltemp3:int; public var glow:int; public var slowsine:int; public var sine:Array; public var globaltemp:int; public var cosine:Array; public var globaltemp2:int; public function removeObject(_arg1:Object, _arg2:Array):void{ var _local3:String; for (_local3 in _arg2) { if (_arg2[_local3] == _arg1){ _arg2.splice(_local3, 1); break; }; }; } public function init():void{ sine = new Array(); cosine = new Array(); var _local1:int; while (_local1 < 64) { sine[_local1] = Math.sin(((_local1 * 6.283) / 64)); cosine[_local1] = Math.cos(((_local1 * 6.283) / 64)); _local1++; }; glow = 0; glowdir = 0; slowsine = 0; } public function updateglow():void{ slowsine++; if (slowsine >= 64){ slowsine = 0; }; if (glowdir == 0){ glow = (glow + 2); if (glow >= 62){ glowdir = 1; }; } else { glow = (glow - 2); if (glow < 2){ glowdir = 0; }; }; } } }//package
Section 28
//KONG_30FPS (KONG_30FPS) package { import flash.display.*; public dynamic class KONG_30FPS extends MovieClip { } }//package
Section 29
//Main (Main) package { import bigroom.input.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.net.*; import flash.ui.*; public class Main extends Sprite { public const GAMEMODE:int = 0; private var im_opt_offline1:Class; public var dwgfx:dwgraphicsclass; public var pj:uint; public var game:gameclass; private var ef_0:Class; private var ef_1:Class; private var ef_2:Class; private var ef_3:Class; private var ef_4:Class; private var amb_3:Class; private var ef_6:Class; private var ef_7:Class; private var ef_8:Class; private var ef_9:Class; private var ef_5:Class; public var music:musicclass; private var im_opt_newgame2:Class; private var im_opt_newgame1:Class; public var clickedlogo:Boolean; private var im_title1:Class; private var im_title2:Class; public var key:KeyPoll; public var pixel2:uint; private var ef_10:Class; private var ef_11:Class; private var ef_12:Class; private var im_website:Class; private var ef_14:Class; private var ef_16:Class; private var ef_17:Class; private var ef_18:Class; public var pixel:uint; private var ef_13:Class; private var ef_15:Class; private var ef_19:Class; private var music_1:Class; private var music_2:Class; private var music_3:Class; private var im_background_0:Class; private var im_background_1:Class; private var im_background_2:Class; private var im_background_3:Class; public var slogo:MovieClip; private var im_background_5:Class; private var im_background_6:Class; private var im_background_7:Class; private var im_background_8:Class; private var im_background_9:Class; private var im_background_4:Class; private var music_4:Class; private var im_opt_restore2:Class; private var ef_22:Class; private var im_opt_restore1:Class; private var im_tiles:Class; private var im_sponsorwebsite:Class; private var ef_21:Class; private var im_bfontmask:Class; private var im_creditline1:Class; private var im_creditline2:Class; private var im_presszorup:Class; private var ef_20:Class; private var im_bfont:Class; private var im_opt_visitsite2:Class; private var footsteps_1:Class; private var im_opt_visitsite1:Class; private var im_pressxorspace:Class; private var im_background_10:Class; private var im_background_11:Class; public var obj:entityclass; private var im_background_13:Class; private var im_background_14:Class; private var im_background_15:Class; private var im_background_16:Class; private var im_background_17:Class; private var im_background_18:Class; private var im_background_19:Class; private var footsteps_2:Class; private var im_sponsorwebsite2:Class; private var im_background_12:Class; private var footsteps_3:Class; private var im_background_20:Class; private var im_pressarrowkeys:Class; private var im_background_22:Class; private var im_background_23:Class; private var im_background_25:Class; private var im_background_26:Class; private var im_background_27:Class; private var im_background_21:Class; private var im_background_29:Class; private var im_background_24:Class; private var im_background_28:Class; private var im_opt_fullscreen1:Class; private var im_opt_fullscreen2:Class; private var im_background_30:Class; private var im_background_32:Class; private var im_background_34:Class; private var im_background_36:Class; private var im_background_38:Class; private var im_background_33:Class; private var im_background_35:Class; public var help:helpclass; private var im_background_37:Class; private var im_background_31:Class; private var im_background_40:Class; private var im_background_41:Class; private var im_background_43:Class; private var im_background_45:Class; private var im_background_46:Class; private var im_background_47:Class; private var im_background_48:Class; private var im_background_49:Class; private var im_background_44:Class; private var im_background_39:Class; private var im_background_42:Class; private var im_background_50:Class; private var im_background_51:Class; private var im_background_52:Class; private var im_background_53:Class; private var im_background_54:Class; private var im_background_55:Class; private var im_background_56:Class; private var im_background_58:Class; private var im_background_59:Class; private var im_background_57:Class; private var im_background_60:Class; private var im_sponscreditline1:Class; private var im_sponscreditline2:Class; public var logoposition:Matrix; public var gamestate:int; private var amb_1:Class; private var amb_2:Class; private var amb_4:Class; public var pi:uint; private var im_opt_offline2:Class; public function Main():void{ dwgfx = new dwgraphicsclass(); music = new musicclass(); help = new helpclass(); obj = new entityclass(); im_title1 = Main_im_title1; im_title2 = Main_im_title2; im_creditline1 = Main_im_creditline1; im_creditline2 = Main_im_creditline2; im_sponscreditline1 = Main_im_sponscreditline1; im_sponscreditline2 = Main_im_sponscreditline2; im_opt_newgame1 = Main_im_opt_newgame1; im_opt_newgame2 = Main_im_opt_newgame2; im_opt_offline1 = Main_im_opt_offline1; im_opt_offline2 = Main_im_opt_offline2; im_opt_visitsite1 = Main_im_opt_visitsite1; im_opt_visitsite2 = Main_im_opt_visitsite2; im_opt_fullscreen1 = Main_im_opt_fullscreen1; im_opt_fullscreen2 = Main_im_opt_fullscreen2; im_website = Main_im_website; im_sponsorwebsite = Main_im_sponsorwebsite; im_sponsorwebsite2 = Main_im_sponsorwebsite2; im_opt_restore1 = Main_im_opt_restore1; im_opt_restore2 = Main_im_opt_restore2; im_tiles = Main_im_tiles; im_bfont = Main_im_bfont; im_bfontmask = Main_im_bfontmask; im_pressxorspace = Main_im_pressxorspace; im_pressarrowkeys = Main_im_pressarrowkeys; im_presszorup = Main_im_presszorup; im_background_0 = Main_im_background_0; im_background_1 = Main_im_background_1; im_background_2 = Main_im_background_2; im_background_3 = Main_im_background_3; im_background_4 = Main_im_background_4; im_background_5 = Main_im_background_5; im_background_6 = Main_im_background_6; im_background_7 = Main_im_background_7; im_background_8 = Main_im_background_8; im_background_9 = Main_im_background_9; im_background_10 = Main_im_background_10; im_background_11 = Main_im_background_11; im_background_12 = Main_im_background_12; im_background_13 = Main_im_background_13; im_background_14 = Main_im_background_14; im_background_15 = Main_im_background_15; im_background_16 = Main_im_background_16; im_background_17 = Main_im_background_17; im_background_18 = Main_im_background_18; im_background_19 = Main_im_background_19; im_background_20 = Main_im_background_20; im_background_21 = Main_im_background_21; im_background_22 = Main_im_background_22; im_background_23 = Main_im_background_23; im_background_24 = Main_im_background_24; im_background_25 = Main_im_background_25; im_background_26 = Main_im_background_26; im_background_27 = Main_im_background_27; im_background_28 = Main_im_background_28; im_background_29 = Main_im_background_29; im_background_30 = Main_im_background_30; im_background_31 = Main_im_background_31; im_background_32 = Main_im_background_32; im_background_33 = Main_im_background_33; im_background_34 = Main_im_background_34; im_background_35 = Main_im_background_35; im_background_36 = Main_im_background_36; im_background_37 = Main_im_background_37; im_background_38 = Main_im_background_38; im_background_39 = Main_im_background_39; im_background_40 = Main_im_background_40; im_background_41 = Main_im_background_41; im_background_42 = Main_im_background_42; im_background_43 = Main_im_background_43; im_background_44 = Main_im_background_44; im_background_45 = Main_im_background_45; im_background_46 = Main_im_background_46; im_background_47 = Main_im_background_47; im_background_48 = Main_im_background_48; im_background_49 = Main_im_background_49; im_background_50 = Main_im_background_50; im_background_51 = Main_im_background_51; im_background_52 = Main_im_background_52; im_background_53 = Main_im_background_53; im_background_54 = Main_im_background_54; im_background_55 = Main_im_background_55; im_background_56 = Main_im_background_56; im_background_57 = Main_im_background_57; im_background_58 = Main_im_background_58; im_background_59 = Main_im_background_59; im_background_60 = Main_im_background_60; music_1 = Main_music_1; music_2 = Main_music_2; music_3 = Main_music_3; music_4 = Main_music_4; amb_1 = Main_amb_1; amb_2 = Main_amb_2; amb_3 = Main_amb_3; amb_4 = Main_amb_4; footsteps_1 = Main_footsteps_1; footsteps_2 = Main_footsteps_2; footsteps_3 = Main_footsteps_3; ef_0 = Main_ef_0; ef_1 = Main_ef_1; ef_2 = Main_ef_2; ef_3 = Main_ef_3; ef_4 = Main_ef_4; ef_5 = Main_ef_5; ef_6 = Main_ef_6; ef_7 = Main_ef_7; ef_8 = Main_ef_8; ef_9 = Main_ef_9; ef_10 = Main_ef_10; ef_11 = Main_ef_11; ef_12 = Main_ef_12; ef_13 = Main_ef_13; ef_14 = Main_ef_14; ef_15 = Main_ef_15; ef_16 = Main_ef_16; ef_17 = Main_ef_17; ef_18 = Main_ef_18; ef_19 = Main_ef_19; ef_20 = Main_ef_20; ef_21 = Main_ef_21; ef_22 = Main_ef_22; super(); if (stage){ init(); } else { addEventListener(Event.ADDED_TO_STAGE, gameinit); }; } private function gameinit(_arg1:Event=null):void{ var _local2:Bitmap; var _local3:ContextMenu; var _local4:ContextMenuItem; var _local5:ContextMenuItem; removeEventListener(Event.ADDED_TO_STAGE, gameinit); if (sitelock()){ _local3 = new ContextMenu(); _local4 = new ContextMenuItem("Visit distractionware.com"); _local5 = new ContextMenuItem("Visit kongregate.com"); _local4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, visit_distractionware); _local5.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, visit_sponsor); _local5.separatorBefore = false; _local3.hideBuiltInItems(); _local3.customItems.push(_local4); _local3.customItems.push(_local5); this.contextMenu = _local3; gamestate = GAMEMODE; obj.init(); help.init(); key = new KeyPoll(stage); SoundMixer.soundTransform = new SoundTransform(1); music.currentamb = -1; music.currentsong = -1; music.musicfade = 0; music.step1playing = false; music.step2playing = false; music.stepchanlen = 0; music.initefchannels(); music.currentefchan = 0; music.musicchan.push(new music_1()); music.musicchan.push(new music_2()); music.musicchan.push(new music_3()); music.musicchan.push(new music_4()); music.ambchan.push(new amb_1()); music.ambchan.push(new amb_2()); music.ambchan.push(new amb_3()); music.ambchan.push(new amb_4()); music.stepchan.push(new footsteps_1()); music.stepchan.push(new footsteps_2()); music.stepchan.push(new footsteps_3()); music.efchan.push(new ef_0()); music.efchan.push(new ef_1()); music.efchan.push(new ef_2()); music.efchan.push(new ef_3()); music.efchan.push(new ef_4()); music.efchan.push(new ef_5()); music.efchan.push(new ef_6()); music.efchan.push(new ef_7()); music.efchan.push(new ef_8()); music.efchan.push(new ef_9()); music.efchan.push(new ef_10()); music.efchan.push(new ef_11()); music.efchan.push(new ef_12()); music.efchan.push(new ef_13()); music.efchan.push(new ef_14()); music.efchan.push(new ef_15()); music.efchan.push(new ef_16()); music.efchan.push(new ef_17()); music.efchan.push(new ef_18()); music.efchan.push(new ef_19()); music.efchan.push(new ef_20()); music.efchan.push(new ef_21()); music.efchan.push(new ef_22()); game = new gameclass(obj, help, music); game.standaloneversion = false; dwgfx.init(); _local2 = new im_tiles(); dwgfx.buffer = _local2.bitmapData; dwgfx.maketilearray(); _local2 = new im_bfont(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfont(); _local2 = new im_bfontmask(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfontmask(); _local2 = new im_pressxorspace(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_pressarrowkeys(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_presszorup(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_title1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_title2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_creditline1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_creditline2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_newgame1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_newgame2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_offline1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_offline2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_visitsite1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_visitsite2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_fullscreen1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_fullscreen2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_website(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_restore1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_opt_restore2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_sponsorwebsite(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_sponscreditline1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_sponscreditline2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_sponsorwebsite2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_background_0(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_3(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_4(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_5(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_6(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_7(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_8(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_9(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_10(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_11(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_12(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_13(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_14(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_15(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_16(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_17(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_18(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_19(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_20(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_21(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_22(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_23(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_24(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_25(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_26(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_27(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_28(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_29(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_30(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_31(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_32(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_33(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_34(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_35(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_36(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_37(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_38(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_39(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_40(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_41(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_42(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_43(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_44(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_45(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_46(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_47(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_48(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_49(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_50(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_51(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_52(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_53(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_54(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_55(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_56(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_57(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_58(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_59(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); _local2 = new im_background_60(); dwgfx.buffer = _local2.bitmapData; dwgfx.addbackground(); dwgfx.buffer = new BitmapData(160, 144, false, 0); sponsorinit(); } else { dwgfx.init(); addChild(dwgfx); _local2 = new im_bfont(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfont(); _local2 = new im_bfontmask(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfontmask(); dwgfx.buffer = new BitmapData(160, 144, false, 0); addEventListener(Event.ENTER_FRAME, lockedloop); }; } public function gamerender(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:gameclass, _arg4:entityclass, _arg5:helpclass):void{ var _local6:int; _arg2.backbuffer.lock(); _arg2.drawbackground(_arg3.bg); if (_arg3.showblocks){ _local6 = 0; while (_local6 < _arg3.nblocks) { if (_arg3.blocks[_local6].type == 0){ _arg2.backbuffer.fillRect(_arg3.blocks[_local6].rect, 0xAAAAAA); } else { if (_arg3.blocks[_local6].type == 1){ _arg2.backbuffer.fillRect(_arg3.blocks[_local6].rect, 170); } else { if (_arg3.blocks[_local6].type == 2){ _arg2.backbuffer.fillRect(_arg3.blocks[_local6].rect, 0xAA00); } else { if (_arg3.blocks[_local6].type == 3){ _arg2.backbuffer.fillRect(_arg3.blocks[_local6].rect, 0xFF0000); }; }; }; }; _local6++; }; }; _arg2.drawentities(_arg4, _arg5); if (_arg3.totalhp > 0){ _arg2.drawbossmeter(_arg3); }; if (((_arg4.restartroom) && ((_arg4.restartmode > -1)))){ _arg2.backbuffer.fillRect(new Rectangle(0, 0, 160, (8 * _arg4.restartcounter)), 1114884); _arg2.backbuffer.fillRect(new Rectangle(0, (144 - (8 * _arg4.restartcounter)), 160, 180), 1114884); _arg2.backbuffer.fillRect(new Rectangle(0, 0, (9 * _arg4.restartcounter), 144), 1114884); _arg2.backbuffer.fillRect(new Rectangle((160 - (9 * _arg4.restartcounter)), 0, 190, 144), 1114884); }; if (_arg3.showimage > 0){ _arg3.showimage--; if (_arg3.showimage > 130){ _arg2.drawimage(_arg3.currentimage, 0, (140 - _arg3.showimage), true); } else { if (_arg3.showimage < 20){ _arg2.drawimage(_arg3.currentimage, 0, (_arg3.showimage - 10), true); } else { _arg2.drawimage(_arg3.currentimage, 0, 10, true); }; }; }; if (_arg3.showcreditline > 1){ if (_arg3.kongversion){ _arg2.drawimage(20, 0, 8, true); } else { _arg2.drawimage(6, 0, 16, true); }; } else { if (_arg3.showcreditline == 1){ if (_arg3.kongversion){ _arg2.drawimage(19, 0, 8, true); } else { _arg2.drawimage(5, 0, 16, true); }; }; }; if (_arg3.showtitle > 1){ _arg2.drawimage(4, 0, 8, true); } else { if (_arg3.showtitle == 1){ _arg2.drawimage(3, 0, 8, true); }; }; if (_arg3.showmenu > 0){ if (_arg3.standaloneversion){ if (_arg3.savepoint > 0){ if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 32, true); } else { _arg2.drawimage(8, 0, 32, true); }; if (_arg3.restorehighlighted){ _arg2.drawimage(16, 0, 42, true); } else { _arg2.drawimage(17, 0, 42, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 52, true); } else { _arg2.drawimage(12, 0, 52, true); }; } else { if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 37, true); } else { _arg2.drawimage(8, 0, 37, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 47, true); } else { _arg2.drawimage(12, 0, 47, true); }; }; _arg2.drawimage(13, 0, 128, true); _arg2.drawimage(15, 0, 136, true); } else { if (_arg3.savepoint > 0){ if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 28, true); } else { _arg2.drawimage(8, 0, 28, true); }; if (_arg3.restorehighlighted){ _arg2.drawimage(16, 0, 37, true); } else { _arg2.drawimage(17, 0, 37, true); }; if (_arg3.offlinehighlighted){ _arg2.drawimage(9, 0, 46, true); } else { _arg2.drawimage(10, 0, 46, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 55, true); } else { _arg2.drawimage(12, 0, 55, true); }; } else { if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 32, true); } else { _arg2.drawimage(8, 0, 32, true); }; if (_arg3.offlinehighlighted){ _arg2.drawimage(9, 0, 42, true); } else { _arg2.drawimage(10, 0, 42, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 52, true); } else { _arg2.drawimage(12, 0, 52, true); }; }; if (_arg3.kongversion){ if (_arg3.my > 134){ _arg2.drawimage(21, 0, 135, true); } else { _arg2.drawimage(18, 0, 135, true); }; } else { _arg2.drawimage(15, 0, 136, true); }; }; }; if (_arg3.standaloneversion){ if (_arg3.savepoint > 0){ if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 32, true); }; if (_arg3.restorehighlighted){ _arg2.drawimage(16, 0, 42, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 52, true); }; } else { if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 37, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 47, true); }; }; } else { if (_arg3.savepoint > 0){ if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 28, true); }; if (_arg3.restorehighlighted){ _arg2.drawimage(16, 0, 37, true); }; if (_arg3.offlinehighlighted){ _arg2.drawimage(9, 0, 46, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 55, true); }; } else { if (_arg3.newgamehighlighted){ _arg2.drawimage(7, 0, 32, true); }; if (_arg3.offlinehighlighted){ _arg2.drawimage(9, 0, 42, true); }; if (_arg3.visithighlighted){ _arg2.drawimage(11, 0, 52, true); }; }; }; if (_arg3.test){ _arg2.print(2, 2, _arg3.teststring, 0xFF, 0xFF, 0xFF); }; if (_arg3.debugmode){ _arg2.backbuffer.fillRect(new Rectangle(_arg3.lastx, _arg3.lasty, (int((mouseX / 4)) - _arg3.lastx), (int((mouseY / 4)) - _arg3.lasty)), 0x999999); _arg2.print(2, 134, ((((((String(_arg3.lastx) + ",") + String(_arg3.lasty)) + ": ") + String((int((mouseX / 4)) - _arg3.lastx))) + ",") + String((int((mouseY / 4)) - _arg3.lasty))), 0xFF, 0xFF, 0xFF); }; if (_arg3.flashlight > 0){ _arg3.flashlight--; _arg2.flashlight(); }; if (_arg3.screenshake > 0){ _arg3.screenshake--; _arg2.screenshake(); _arg2.backbuffer.unlock(); } else { _arg2.render(); _arg2.backbuffer.unlock(); }; } public function visit_sponsor_logo():void{ var _local1:URLRequest = new URLRequest("http://www.kongregate.com/?gamereferral=dontlookback"); navigateToURL(_local1, "_blank"); } public function visit_sponsor(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.kongregate.com/?gamereferral=dontlookback"); navigateToURL(_local2, "_blank"); } public function gamelogic(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:gameclass, _arg4:entityclass, _arg5:helpclass, _arg6:musicclass):void{ var _local7:int; var _local8:int; var _local9:int; var _local10:int; _arg6.processmusic(); _arg6.processamb(); _arg6.processstep(); _arg5.updateglow(); if (((_arg4.checkdamage(_arg3)) && (!(_arg4.restartroom)))){ _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; }; if (_arg4.restartroom){ if (_arg4.restartmode == -1){ _local7 = 0; while (_local7 < _arg4.nentity) { if ((((_arg4.entities[_local7].type == 28)) || ((_arg4.entities[_local7].type == 30)))){ _arg4.updateentities(_local7, _arg5, _arg3, _arg6); _arg4.entities[_local7].newxp = (_arg4.entities[_local7].xp + _arg4.entities[_local7].vx); _arg4.entities[_local7].newyp = (_arg4.entities[_local7].yp + _arg4.entities[_local7].vy); _arg4.entities[_local7].xp = _arg4.entities[_local7].newxp; _arg4.entities[_local7].yp = _arg4.entities[_local7].newyp; }; _local7++; }; _arg4.restartcounter++; if (_arg4.restartcounter == 30){ _arg4.restartcounter = 0; _arg4.restartmode = 0; }; } else { if (_arg4.restartmode == 0){ _arg3.screenshake = 0; if (_arg4.restartcounter == 0){ if (_arg4.norestartsound == false){ _arg6.playef(6, 200); }; _arg4.norestartsound = false; }; _arg4.restartcounter++; if (_arg4.restartcounter == 10){ _arg4.restartmode = 1; }; } else { if (_arg4.restartmode == 1){ _arg4.restartcounter++; if (_arg4.restartcounter == 12){ _arg4.restartmode = 2; _arg4.restartcounter = 10; if (_arg3.startspecial){ _arg5.globaltemp = _arg4.getplayer(); _arg5.globaltemp2 = _arg4.entities[_arg5.globaltemp].dir; _arg3.gotoroom(_arg3.startroom, _arg4, _arg5, _arg6); _arg4.createentity(_arg3.startx, _arg3.starty, 0); if (_arg3.eurydicemode){ _arg4.createentity((_arg3.entx + 18), _arg3.enty, 28); }; _arg5.globaltemp = _arg4.getplayer(); _arg4.entities[_arg5.globaltemp].dir = _arg5.globaltemp2; } else { _arg3.gotoroom(_arg3.currentroom, _arg4, _arg5, _arg6); _arg4.createentity(_arg3.entx, _arg3.enty, 0); if (_arg3.eurydicemode){ _arg4.createentity((_arg3.entx + 18), _arg3.enty, 28); }; _arg5.globaltemp = _arg4.getplayer(); _arg4.entities[_arg5.globaltemp].vx = _arg3.entvx; _arg4.entities[_arg5.globaltemp].vy = _arg3.entvy; _arg4.entities[_arg5.globaltemp].dir = _arg3.entdir; }; }; } else { if (_arg4.restartmode == 2){ _arg4.restartcounter--; if (_arg4.restartcounter == 0){ _arg4.restartmode = 0; _arg4.restartroom = false; _arg3.shotdelay = 10; }; }; }; }; }; } else { _arg3.updaterain(_arg4); _arg3.updatestate(_arg4, _arg5, _arg6); _arg4.onladder = false; if (_arg4.checkladder(_arg3)){ _arg4.onladder = true; }; _local8 = 0; while (_local8 < _arg4.nentity) { _arg4.entities[_local8].vx = (_arg4.entities[_local8].vx + _arg4.entities[_local8].ax); _arg4.entities[_local8].vy = (_arg4.entities[_local8].vy + _arg4.entities[_local8].ay); _arg4.entities[_local8].ax = 0; if (_arg4.entities[_local8].jumping){ if (_arg4.entities[_local8].ay < 0){ _arg4.entities[_local8].ay++; }; if (_arg4.entities[_local8].ay > -1){ _arg4.entities[_local8].ay = 0; }; _arg4.entities[_local8].jumpframe--; if (_arg4.entities[_local8].jumpframe <= 0){ _arg4.entities[_local8].jumping = false; }; } else { if (_arg4.onladder){ if (_arg4.entities[_local8].type == 0){ _arg4.entities[_local8].vy = (_arg4.entities[_local8].vy / 2); _arg4.entities[_local8].bigfallcounter = 0; _arg4.entities[_local8].onground = true; _arg4.entities[_local8].ay = 0; _arg4.entities[_local8].jumpframe = 0; _arg4.entities[_local8].jumping = false; } else { if (_arg4.entities[_local8].gravity){ _arg4.entities[_local8].ay = 1; }; }; } else { if (_arg4.entities[_local8].gravity){ _arg4.entities[_local8].ay = 1; }; }; }; if (_arg4.entities[_local8].gravity){ _arg4.applyfriction(_local8, 0.15, 0.5); }; _arg4.entities[_local8].newxp = (_arg4.entities[_local8].xp + _arg4.entities[_local8].vx); _arg4.entities[_local8].newyp = (_arg4.entities[_local8].yp + _arg4.entities[_local8].vy); if ((((_arg4.entities[_local8].type == 0)) && ((_arg3.currentroom == 0)))){ if (_arg4.entities[_local8].newxp < 30){ _arg4.entities[_local8].newxp = 30; _arg4.entities[_local8].vx = 0; }; }; if (_arg4.entities[_local8].type != 28){ if (_arg4.testwallsx(_arg3, _local8, _arg4.entities[_local8].newxp, _arg4.entities[_local8].yp)){ _arg4.entities[_local8].xp = _arg4.entities[_local8].newxp; } else { if (_arg4.entities[_local8].onwall > 0){ _arg4.entities[_local8].state = _arg4.entities[_local8].onwall; }; if (_arg4.entities[_local8].onxwall > 0){ _arg4.entities[_local8].state = _arg4.entities[_local8].onxwall; }; }; if (_arg4.testwallsy(_arg3, _local8, _arg4.entities[_local8].xp, _arg4.entities[_local8].newyp)){ _arg4.entities[_local8].yp = _arg4.entities[_local8].newyp; } else { if (_arg4.entities[_local8].onwall > 0){ _arg4.entities[_local8].state = _arg4.entities[_local8].onwall; }; if (_arg4.entities[_local8].onywall > 0){ _arg4.entities[_local8].state = _arg4.entities[_local8].onywall; }; _arg4.entities[_local8].jumpframe = 0; }; if (!_arg4.testwallsx(_arg3, _local8, _arg4.entities[_local8].xp, _arg4.entities[_local8].yp)){ if (((((((((((((((((((((!((_arg4.entities[_local8].type == 1))) && (!((_arg4.entities[_local8].type == 23))))) && (!((_arg4.entities[_local8].type == 24))))) && (!((_arg4.entities[_local8].type == 25))))) && (!((_arg4.entities[_local8].type == 2))))) && (!((_arg4.entities[_local8].type == 16))))) && (!((_arg4.entities[_local8].type == 15))))) && (!((_arg4.entities[_local8].type == 22))))) && (!((_arg4.entities[_local8].type == 17))))) && (!((_arg4.entities[_local8].type == 14))))) && (!((_arg4.entities[_local8].type == 14))))){ if (_arg3.toggledeath){ _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; } else { _arg4.entities[_local8].yp = (_arg4.entities[_local8].yp - 3); }; }; }; _arg4.animateentities(_local8, _arg5, _arg3); _local9 = (_local8 + 1); while (_local9 < _arg4.nentity) { if (_local8 != _local9){ if (_arg4.entities[_local8].onentity){ if (_arg4.entitycollide(_local8, _local9)){ if ((((_arg4.entities[_local8].type == 1)) && ((_arg4.entities[_local8].state == 0)))){ if (_arg4.entities[_local9].onbullet > 0){ if (_arg4.entities[_local9].type == 27){ if (_arg4.entities[_local8].yp < 52){ _arg4.entities[_local9].state = _arg4.entities[_local9].onbullet; } else { _arg6.playef(22); }; _arg4.entities[_local9].bulletvel = _arg4.entities[_local8].vx; _arg4.entities[_local8].state = 1; } else { _arg4.entities[_local9].state = _arg4.entities[_local9].onbullet; _arg4.entities[_local9].bulletvel = _arg4.entities[_local8].vx; _arg4.entities[_local8].state = 1; }; } else { _arg4.entities[_local8].state = 1; }; }; if ((((_arg4.entities[_local9].type == 1)) && ((_arg4.entities[_local9].state == 0)))){ if (_arg4.entities[_local8].onbullet > 0){ if (_arg4.entities[_local8].type == 27){ if (_arg4.entities[_local9].yp < 52){ _arg4.entities[_local8].state = _arg4.entities[_local8].onbullet; }; _arg4.entities[_local8].bulletvel = _arg4.entities[_local9].vx; _arg4.entities[_local9].state = 1; } else { _arg4.entities[_local8].state = _arg4.entities[_local8].onbullet; _arg4.entities[_local8].bulletvel = _arg4.entities[_local9].vx; _arg4.entities[_local9].state = 1; }; } else { _arg4.entities[_local9].state = 1; }; }; }; }; if ((((_arg4.entities[_local8].type == 0)) || ((_arg4.entities[_local9].type == 0)))){ if (((_arg4.entities[_local9].harmful) || (_arg4.entities[_local8].harmful))){ if (_arg4.entitycollide(_local8, _local9)){ if ((((_arg4.entities[_local8].size == 0)) && ((_arg4.entities[_local9].size == 0)))){ if (_arg2.tiles[_arg4.entities[_local8].drawframe].hitTest(new Point(_arg4.entities[_local8].xp, _arg4.entities[_local8].yp), 1, _arg2.tiles[_arg4.entities[_local9].drawframe], new Point(_arg4.entities[_local9].xp, _arg4.entities[_local9].yp), 1) == true){ _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; }; } else { _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; }; }; }; if ((((_arg4.entities[_local9].onplayer > 0)) || ((_arg4.entities[_local8].onplayer > 0)))){ if (_arg4.entitycollide(_local8, _local9)){ if (_arg4.entities[_local8].onplayer > 0){ _arg4.entities[_local8].state = _arg4.entities[_local8].onplayer; }; if (_arg4.entities[_local9].onplayer > 0){ _arg4.entities[_local9].state = _arg4.entities[_local9].onplayer; }; }; }; }; }; _local9++; }; } else { _arg4.entities[_local8].xp = _arg4.entities[_local8].newxp; _arg4.entities[_local8].yp = _arg4.entities[_local8].newyp; }; if (_arg4.entitycollidefloor(_arg3, _local8)){ _arg4.entities[_local8].bigfallcounter = 0; _arg4.entities[_local8].onground = true; if (_arg4.entities[_local8].bigfallframe == -1){ _arg4.entities[_local8].bigfallframe = 3; if (_arg4.entities[_local8].type == 0){ _arg6.playef(_arg6.steptype); }; }; if (((_arg3.ongroundlasttime) && ((_arg4.entities[_local8].type == 0)))){ _arg3.ongroundlasttime = false; _arg6.playef(_arg6.steptype); }; } else { if (!_arg4.onladder){ if (_arg4.entities[_local8].type == 0){ _arg3.ongroundlasttime = true; }; _arg4.entities[_local8].onground = false; _arg4.entities[_local8].bigfallcounter++; if (_arg4.entities[_local8].bigfallcounter > 25){ _arg4.entities[_local8].bigfallframe = -1; }; }; }; _local8++; }; _arg4.activetrigger = -1; if (_arg4.checktrigger(_arg3)){ _arg3.state = _arg4.activetrigger; }; if (!_arg4.restartroom){ _local10 = 0; while (_local10 < _arg4.nentity) { if (!_arg4.updateentities(_local10, _arg5, _arg3, _arg6)){ _local10--; }; _local10++; }; _arg5.globaltemp = _arg4.getplayer(); if ((((_arg4.entities[_arg5.globaltemp].xp < -7)) && ((_arg3.door_left >= -1)))){ if (_arg3.door_left == -1){ if (!_arg4.restartroom){ _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; }; } else { _arg3.enty = _arg4.entities[_arg5.globaltemp].yp; _arg3.entdir = _arg4.entities[_arg5.globaltemp].dir; _arg3.entvx = _arg4.entities[_arg5.globaltemp].vx; _arg3.entvy = _arg4.entities[_arg5.globaltemp].vy; _arg5.globaltemp2 = _arg4.entities[_arg5.globaltemp].bigfallcounter; _arg3.gotoroom(_arg3.door_left, _arg4, _arg5, _arg6); _arg3.entx = 152; _arg4.createentity(_arg3.entx, _arg3.enty, 0); if (_arg3.eurydicemode){ _arg4.createentity((_arg3.entx + 18), _arg3.enty, 28); }; _arg5.globaltemp = _arg4.getplayer(); _arg4.entities[_arg5.globaltemp].dir = _arg3.entdir; _arg4.entities[_arg5.globaltemp].bigfallcounter = _arg5.globaltemp2; _arg4.restartroom = false; }; } else { if ((((_arg4.entities[_arg5.globaltemp].xp > 153)) && ((_arg3.door_right >= -1)))){ if (_arg3.door_right == -1){ if (!_arg4.restartroom){ _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; }; } else { _arg3.enty = _arg4.entities[_arg5.globaltemp].yp; _arg3.entdir = _arg4.entities[_arg5.globaltemp].dir; _arg3.entvx = _arg4.entities[_arg5.globaltemp].vx; _arg3.entvy = _arg4.entities[_arg5.globaltemp].vy; _arg5.globaltemp2 = _arg4.entities[_arg5.globaltemp].bigfallcounter; _arg3.gotoroom(_arg3.door_right, _arg4, _arg5, _arg6); _arg3.entx = -6; _arg4.createentity(_arg3.entx, _arg3.enty, 0); if (_arg3.eurydicemode){ _arg4.createentity((_arg3.entx + 18), _arg3.enty, 28); }; _arg5.globaltemp = _arg4.getplayer(); _arg4.entities[_arg5.globaltemp].dir = _arg3.entdir; _arg4.entities[_arg5.globaltemp].bigfallcounter = _arg5.globaltemp2; _arg4.restartroom = false; }; } else { if ((((_arg4.entities[_arg5.globaltemp].yp < -4)) && ((_arg3.door_up >= -1)))){ if (_arg3.door_up == -1){ if (!_arg4.restartroom){ _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; }; } else { _arg3.entx = _arg4.entities[_arg5.globaltemp].xp; _arg3.entdir = _arg4.entities[_arg5.globaltemp].dir; _arg3.entvx = _arg4.entities[_arg5.globaltemp].vx; _arg3.entvy = _arg4.entities[_arg5.globaltemp].vy; _arg5.globaltemp2 = _arg4.entities[_arg5.globaltemp].bigfallcounter; _arg3.gotoroom(_arg3.door_up, _arg4, _arg5, _arg6); _arg3.enty = 137; _arg4.createentity(_arg3.entx, _arg3.enty, 0); if (_arg3.eurydicemode){ _arg4.createentity((_arg3.entx + 18), _arg3.enty, 28); }; _arg5.globaltemp = _arg4.getplayer(); _arg4.entities[_arg5.globaltemp].vy = _arg3.entvy; _arg4.entities[_arg5.globaltemp].dir = _arg3.entdir; _arg4.entities[_arg5.globaltemp].bigfallcounter = _arg5.globaltemp2; _arg4.restartroom = false; }; } else { if ((((_arg4.entities[_arg5.globaltemp].yp > 138)) && ((_arg3.door_down >= -1)))){ if (_arg3.door_down == -1){ if (!_arg4.restartroom){ _arg4.restartroom = true; _arg4.restartmode = 0; _arg4.restartcounter = 0; }; } else { _arg3.entx = _arg4.entities[_arg5.globaltemp].xp; _arg3.entdir = _arg4.entities[_arg5.globaltemp].dir; _arg3.entvx = _arg4.entities[_arg5.globaltemp].vx; _arg3.entvy = _arg4.entities[_arg5.globaltemp].vy; _arg5.globaltemp2 = _arg4.entities[_arg5.globaltemp].bigfallcounter; _arg3.gotoroom(_arg3.door_down, _arg4, _arg5, _arg6); _arg3.enty = -3; _arg4.createentity(_arg3.entx, _arg3.enty, 0); if (_arg3.eurydicemode){ _arg4.createentity((_arg3.entx + 18), _arg3.enty, 28); }; _arg5.globaltemp = _arg4.getplayer(); _arg4.entities[_arg5.globaltemp].vy = _arg3.entvy; _arg4.entities[_arg5.globaltemp].dir = _arg3.entdir; _arg4.entities[_arg5.globaltemp].bigfallcounter = _arg5.globaltemp2; _arg4.restartroom = false; }; }; }; }; }; }; }; } public function lockedloop(_arg1:Event):void{ dwgfx.backbuffer.lock(); dwgfx.bprint(5, 57, "Sorry! This game can", 0xFF, 177, 181, true); dwgfx.bprint(5, 67, "only by played on", 0xFF, 177, 181, true); dwgfx.bprint(5, 77, "www.distractionware.com", 0xFF, 177, 181, true); dwgfx.render(); dwgfx.backbuffer.unlock(); help.updateglow(); } public function sponsorloop(_arg1:Event):void{ var _local2:uint; var _local3:uint; dwgfx.backbuffer.lock(); dwgfx.backbuffer.fillRect(new Rectangle(0, 0, 160, 144), 1114884); dwgfx.backbuffer.draw(slogo, logoposition); dwgfx.backbuffer.fillRect(new Rectangle(0, 131, 160, 25), 1114884); dwgfx.backbuffer.fillRect(new Rectangle(0, 0, 25, 131), 1114884); dwgfx.backbuffer.fillRect(new Rectangle(133, 0, 27, 131), 1114884); dwgfx.backbuffer.fillRect(new Rectangle(25, 0, 108, 14), 1114884); pj = 14; while (pj < 131) { pi = 25; while (pi < 133) { _local2 = dwgfx.backbuffer.getPixel(pi, pj); _local2 = ((_local2 >> 16) & 0xFF); if (_local2 < 90){ _local3 = 1114884; } else { if (_local2 < 154){ _local3 = 4522758; } else { if (_local2 < 240){ _local3 = 9383213; } else { _local3 = 15832473; }; }; }; dwgfx.backbuffer.setPixel(pi, pj, _local3); pi++; }; pj++; }; dwgfx.render(); dwgfx.backbuffer.unlock(); if (slogo.currentFrame == slogo.totalFrames){ slogo.stop(); slogo.removeEventListener(MouseEvent.CLICK, visit_sponsor); removeEventListener(Event.ENTER_FRAME, sponsorloop); addChild(dwgfx); music.changeamb(0); music.steptype = 0; addEventListener(Event.ENTER_FRAME, mainloop); }; if (((key.hasclicked) && (!(clickedlogo)))){ clickedlogo = true; visit_sponsor_logo(); }; if (key.hasclicked){ key.click = false; }; } public function sitelock():Boolean{ var _local1:String = stage.loaderInfo.url.toLowerCase(); if ((((_local1.indexOf("distractionware.com") <= 0)) && ((_local1.indexOf("flashgamelicense.com") <= 0)))){ return (true); }; return (true); } public function gameinput(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:gameclass, _arg4:entityclass, _arg5:helpclass, _arg6:musicclass):void{ var _local8:Number; var _local9:URLRequest; var _local10:URLRequest; var _local11:URLRequest; var _local12:URLRequest; var _local13:int; _arg3.mx = (mouseX / 4); _arg3.my = (mouseY / 4); if (_arg3.showmenu > 0){ _arg3.newgamehighlighted = false; _arg3.offlinehighlighted = false; _arg3.visithighlighted = false; _arg3.restorehighlighted = false; if (_arg3.standaloneversion){ if (_arg3.savepoint > 0){ if ((((_arg3.my >= 31)) && ((_arg3.my <= 37)))){ _arg3.newgamehighlighted = true; }; if ((((_arg3.my >= 41)) && ((_arg3.my <= 47)))){ _arg3.restorehighlighted = true; }; if ((((_arg3.my >= 51)) && ((_arg3.my <= 57)))){ _arg3.visithighlighted = true; }; } else { if ((((_arg3.my >= 36)) && ((_arg3.my <= 42)))){ _arg3.newgamehighlighted = true; }; if ((((_arg3.my >= 46)) && ((_arg3.my <= 52)))){ _arg3.visithighlighted = true; }; }; } else { if (_arg3.savepoint > 0){ if ((((_arg3.my >= 27)) && ((_arg3.my <= 33)))){ _arg3.newgamehighlighted = true; }; if ((((_arg3.my >= 37)) && ((_arg3.my <= 42)))){ _arg3.restorehighlighted = true; }; if ((((_arg3.my >= 45)) && ((_arg3.my <= 51)))){ _arg3.offlinehighlighted = true; }; if ((((_arg3.my >= 54)) && ((_arg3.my <= 60)))){ _arg3.visithighlighted = true; }; } else { if ((((_arg3.my >= 31)) && ((_arg3.my <= 37)))){ _arg3.newgamehighlighted = true; }; if ((((_arg3.my >= 41)) && ((_arg3.my <= 47)))){ _arg3.offlinehighlighted = true; }; if ((((_arg3.my >= 51)) && ((_arg3.my <= 57)))){ _arg3.visithighlighted = true; }; }; }; if (_arg1.click){ if (_arg3.newgamehighlighted){ _local8 = 0; while (_local8 < 300) { _arg4.flags[_local8] = 0; _local8++; }; _arg3.toggledeath = false; _arg3.flashlight = 0; _arg3.screenshake = 0; _arg3.eurydicemode = false; _arg3.rain = true; _arg3.hasgun = false; _arg3.createtrigger(130, 0, 10, 150, 8); _arg3.offlinehighlighted = false; _arg3.visithighlighted = false; _arg3.restorehighlighted = false; _arg3.state = 24; _arg3.showmenu = 0; }; if (_arg3.restorehighlighted){ _arg3.offlinehighlighted = false; _arg3.visithighlighted = false; _arg3.newgamehighlighted = false; _arg3.state = 33; _arg3.showmenu = 0; }; if (_arg3.visithighlighted){ _local9 = new URLRequest("http://www.distractionware.com"); navigateToURL(_local9, "_blank"); }; if (_arg3.offlinehighlighted){ _local10 = new URLRequest("http://www.distractionware.com/games/flash/dontlookback/offline/"); navigateToURL(_local10, "_blank"); }; if (_arg3.showmenu > 0){ if ((((_arg3.my >= 134)) && ((_arg3.my <= 142)))){ if (_arg3.kongversion){ _local11 = new URLRequest("http://www.kongregate.com/?gamereferral=dontlookback"); navigateToURL(_local11, "_blank"); } else { _local12 = new URLRequest("http://www.distractionware.com"); navigateToURL(_local12, "_blank"); }; }; }; }; }; var _local7:int; while (_local7 < _arg4.nentity) { if (_arg4.entities[_local7].type == 0){ if (_arg4.entities[_local7].bigfallframe <= 0){ if (_arg3.hascontrol){ if (((_arg1.isDown(Keyboard.LEFT)) || (_arg1.isDown(65)))){ _arg6.playstep(_arg6.steptype); _arg4.entities[_local7].vx = -2; _arg4.entities[_local7].dir = 0; } else { if (((_arg1.isDown(Keyboard.RIGHT)) || (_arg1.isDown(68)))){ if (((_arg3.eurydicemode) && (!(_arg4.restartroom)))){ if (_arg4.entities[_local7].onground){ _arg6.playstep(_arg6.steptype); }; _arg4.restartroom = true; _arg4.restartmode = -1; _arg4.restartcounter = 0; _arg4.entities[_local7].dir = 1; _arg4.entities[_arg4.geteurydice()].state = 1; _arg4.animateentities(_local7, _arg5, _arg3); } else { if (_arg4.entities[_local7].onground){ _arg6.playstep(_arg6.steptype); }; _arg4.entities[_local7].vx = 2; _arg4.entities[_local7].dir = 1; }; } else { _arg4.entities[_local7].vx = 0; _arg6.stopstep(); }; }; if (!_arg4.entities[_local7].onground){ _arg6.stopstep(); }; if (_arg4.restartroom){ _arg6.stopstep(); }; if (_arg4.onladder){ _arg3.jumpheld = false; if (((((_arg1.isDown(Keyboard.UP)) || (_arg1.isDown(90)))) || (_arg1.isDown(87)))){ if (((_arg4.entities[_local7].onground) && (!(_arg4.entities[_local7].jumping)))){ _arg4.entities[_local7].ay = -2; _arg4.entities[_local7].jumping = true; _arg4.entities[_local7].jumpframe = 2; }; } else { if (((_arg1.isDown(Keyboard.DOWN)) || (_arg1.isDown(83)))){ _arg4.entities[_local7].vy = 4; }; }; } else { if (((((_arg1.isUp(Keyboard.UP)) && (_arg1.isUp(90)))) && (_arg1.isUp(87)))){ _arg3.jumpheld = false; }; if (((((((_arg1.isDown(Keyboard.UP)) || (_arg1.isDown(90)))) || (_arg1.isDown(87)))) && (!(_arg3.jumpheld)))){ _arg3.jumpheld = true; if (((_arg4.entities[_local7].onground) && (!(_arg4.entities[_local7].jumping)))){ _arg4.entities[_local7].ay = -5; _arg4.entities[_local7].jumping = true; _arg4.entities[_local7].jumpframe = 10; }; }; }; if (((_arg1.isDown(Keyboard.SPACE)) || (_arg1.isDown(88)))){ _arg3.isshooting = true; } else { _arg3.isshooting = false; }; if (((_arg3.hasgun) && (!(_arg4.restartroom)))){ _arg3.shotdelay--; if (_arg3.shotdelay <= 0){ _arg3.shotdelay = 0; }; if (((((_arg1.isDown(Keyboard.SPACE)) || (_arg1.isDown(88)))) && ((_arg3.shotdelay <= 0)))){ _arg6.playef(4); _arg3.shotdelay = 12; _local13 = _arg4.getplayer(); if (_local13 > -1){ if (_arg4.entities[_local13].dir == 0){ _arg4.createentity((_arg4.entities[_local13].xp + 6), (_arg4.entities[_local13].yp + 6), 1, (-7 + _arg4.entities[_local13].vx), 0); }; if (_arg4.entities[_local13].dir == 1){ _arg4.createentity((_arg4.entities[_local13].xp + 4), (_arg4.entities[_local13].yp + 6), 1, (7 + _arg4.entities[_local13].vx), 0); }; }; }; }; } else { _arg4.entities[_local7].vx = 0; }; } else { _arg4.entities[_local7].vx = (_arg4.entities[_local7].vx / 2); }; }; _local7++; }; } private function sponsorinit():void{ slogo = new KONG_30FPS(); slogo.addEventListener(MouseEvent.CLICK, visit_sponsor); addChild(dwgfx); logoposition = new Matrix(); logoposition.scale(0.65, 0.65); logoposition.translate(84, 87); clickedlogo = false; addEventListener(Event.ENTER_FRAME, sponsorloop); } public function visit_distractionware(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.distractionware.com"); navigateToURL(_local2, "_blank"); } public function getsite():String{ var _local1:String = stage.loaderInfo.url.toLowerCase(); return (_local1); } public function mainloop(_arg1:Event):void{ if (((game.paused) || (!(game.infocus)))){ if (game.globalsound > 0){ game.globalsound = 0; SoundMixer.soundTransform = new SoundTransform(0); }; dwgfx.backbuffer.lock(); dwgfx.backbuffer.fillRect(new Rectangle(0, 0, 160, 144), 1114884); dwgfx.bprint(5, 60, "[Game paused]", 253, 196, 195, true); dwgfx.bprint(5, 70, "Click to resume", 253, 196, 195, true); dwgfx.bprint(5, 134, "[Press M to Mute in game]", 253, 196, 195, true); dwgfx.render(); dwgfx.backbuffer.unlock(); music.processmusic(); music.processamb(); music.processstep(); } else { gamerender(key, dwgfx, game, obj, help); gameinput(key, dwgfx, game, obj, help, music); gamelogic(key, dwgfx, game, obj, help, music); if (((key.isDown(77)) && ((game.mutebutton <= 0)))){ game.mutebutton = 8; if (game.muted){ game.muted = false; } else { game.muted = true; }; }; if (game.mutebutton > 0){ game.mutebutton--; }; if (game.muted){ if (game.globalsound == 1){ game.globalsound = 0; SoundMixer.soundTransform = new SoundTransform(0); }; }; if (((!(game.muted)) && ((game.globalsound == 0)))){ game.globalsound = 1; SoundMixer.soundTransform = new SoundTransform(1); }; }; if (key.hasclicked){ key.click = false; }; } } }//package
Section 30
//Main_amb_1 (Main_amb_1) package { import mx.core.*; public class Main_amb_1 extends SoundAsset { } }//package
Section 31
//Main_amb_2 (Main_amb_2) package { import mx.core.*; public class Main_amb_2 extends SoundAsset { } }//package
Section 32
//Main_amb_3 (Main_amb_3) package { import mx.core.*; public class Main_amb_3 extends SoundAsset { } }//package
Section 33
//Main_amb_4 (Main_amb_4) package { import mx.core.*; public class Main_amb_4 extends SoundAsset { } }//package
Section 34
//Main_ef_0 (Main_ef_0) package { import mx.core.*; public class Main_ef_0 extends SoundAsset { } }//package
Section 35
//Main_ef_1 (Main_ef_1) package { import mx.core.*; public class Main_ef_1 extends SoundAsset { } }//package
Section 36
//Main_ef_10 (Main_ef_10) package { import mx.core.*; public class Main_ef_10 extends SoundAsset { } }//package
Section 37
//Main_ef_11 (Main_ef_11) package { import mx.core.*; public class Main_ef_11 extends SoundAsset { } }//package
Section 38
//Main_ef_12 (Main_ef_12) package { import mx.core.*; public class Main_ef_12 extends SoundAsset { } }//package
Section 39
//Main_ef_13 (Main_ef_13) package { import mx.core.*; public class Main_ef_13 extends SoundAsset { } }//package
Section 40
//Main_ef_14 (Main_ef_14) package { import mx.core.*; public class Main_ef_14 extends SoundAsset { } }//package
Section 41
//Main_ef_15 (Main_ef_15) package { import mx.core.*; public class Main_ef_15 extends SoundAsset { } }//package
Section 42
//Main_ef_16 (Main_ef_16) package { import mx.core.*; public class Main_ef_16 extends SoundAsset { } }//package
Section 43
//Main_ef_17 (Main_ef_17) package { import mx.core.*; public class Main_ef_17 extends SoundAsset { } }//package
Section 44
//Main_ef_18 (Main_ef_18) package { import mx.core.*; public class Main_ef_18 extends SoundAsset { } }//package
Section 45
//Main_ef_19 (Main_ef_19) package { import mx.core.*; public class Main_ef_19 extends SoundAsset { } }//package
Section 46
//Main_ef_2 (Main_ef_2) package { import mx.core.*; public class Main_ef_2 extends SoundAsset { } }//package
Section 47
//Main_ef_20 (Main_ef_20) package { import mx.core.*; public class Main_ef_20 extends SoundAsset { } }//package
Section 48
//Main_ef_21 (Main_ef_21) package { import mx.core.*; public class Main_ef_21 extends SoundAsset { } }//package
Section 49
//Main_ef_22 (Main_ef_22) package { import mx.core.*; public class Main_ef_22 extends SoundAsset { } }//package
Section 50
//Main_ef_3 (Main_ef_3) package { import mx.core.*; public class Main_ef_3 extends SoundAsset { } }//package
Section 51
//Main_ef_4 (Main_ef_4) package { import mx.core.*; public class Main_ef_4 extends SoundAsset { } }//package
Section 52
//Main_ef_5 (Main_ef_5) package { import mx.core.*; public class Main_ef_5 extends SoundAsset { } }//package
Section 53
//Main_ef_6 (Main_ef_6) package { import mx.core.*; public class Main_ef_6 extends SoundAsset { } }//package
Section 54
//Main_ef_7 (Main_ef_7) package { import mx.core.*; public class Main_ef_7 extends SoundAsset { } }//package
Section 55
//Main_ef_8 (Main_ef_8) package { import mx.core.*; public class Main_ef_8 extends SoundAsset { } }//package
Section 56
//Main_ef_9 (Main_ef_9) package { import mx.core.*; public class Main_ef_9 extends SoundAsset { } }//package
Section 57
//Main_footsteps_1 (Main_footsteps_1) package { import mx.core.*; public class Main_footsteps_1 extends SoundAsset { } }//package
Section 58
//Main_footsteps_2 (Main_footsteps_2) package { import mx.core.*; public class Main_footsteps_2 extends SoundAsset { } }//package
Section 59
//Main_footsteps_3 (Main_footsteps_3) package { import mx.core.*; public class Main_footsteps_3 extends SoundAsset { } }//package
Section 60
//Main_im_background_0 (Main_im_background_0) package { import mx.core.*; public class Main_im_background_0 extends BitmapAsset { } }//package
Section 61
//Main_im_background_1 (Main_im_background_1) package { import mx.core.*; public class Main_im_background_1 extends BitmapAsset { } }//package
Section 62
//Main_im_background_10 (Main_im_background_10) package { import mx.core.*; public class Main_im_background_10 extends BitmapAsset { } }//package
Section 63
//Main_im_background_11 (Main_im_background_11) package { import mx.core.*; public class Main_im_background_11 extends BitmapAsset { } }//package
Section 64
//Main_im_background_12 (Main_im_background_12) package { import mx.core.*; public class Main_im_background_12 extends BitmapAsset { } }//package
Section 65
//Main_im_background_13 (Main_im_background_13) package { import mx.core.*; public class Main_im_background_13 extends BitmapAsset { } }//package
Section 66
//Main_im_background_14 (Main_im_background_14) package { import mx.core.*; public class Main_im_background_14 extends BitmapAsset { } }//package
Section 67
//Main_im_background_15 (Main_im_background_15) package { import mx.core.*; public class Main_im_background_15 extends BitmapAsset { } }//package
Section 68
//Main_im_background_16 (Main_im_background_16) package { import mx.core.*; public class Main_im_background_16 extends BitmapAsset { } }//package
Section 69
//Main_im_background_17 (Main_im_background_17) package { import mx.core.*; public class Main_im_background_17 extends BitmapAsset { } }//package
Section 70
//Main_im_background_18 (Main_im_background_18) package { import mx.core.*; public class Main_im_background_18 extends BitmapAsset { } }//package
Section 71
//Main_im_background_19 (Main_im_background_19) package { import mx.core.*; public class Main_im_background_19 extends BitmapAsset { } }//package
Section 72
//Main_im_background_2 (Main_im_background_2) package { import mx.core.*; public class Main_im_background_2 extends BitmapAsset { } }//package
Section 73
//Main_im_background_20 (Main_im_background_20) package { import mx.core.*; public class Main_im_background_20 extends BitmapAsset { } }//package
Section 74
//Main_im_background_21 (Main_im_background_21) package { import mx.core.*; public class Main_im_background_21 extends BitmapAsset { } }//package
Section 75
//Main_im_background_22 (Main_im_background_22) package { import mx.core.*; public class Main_im_background_22 extends BitmapAsset { } }//package
Section 76
//Main_im_background_23 (Main_im_background_23) package { import mx.core.*; public class Main_im_background_23 extends BitmapAsset { } }//package
Section 77
//Main_im_background_24 (Main_im_background_24) package { import mx.core.*; public class Main_im_background_24 extends BitmapAsset { } }//package
Section 78
//Main_im_background_25 (Main_im_background_25) package { import mx.core.*; public class Main_im_background_25 extends BitmapAsset { } }//package
Section 79
//Main_im_background_26 (Main_im_background_26) package { import mx.core.*; public class Main_im_background_26 extends BitmapAsset { } }//package
Section 80
//Main_im_background_27 (Main_im_background_27) package { import mx.core.*; public class Main_im_background_27 extends BitmapAsset { } }//package
Section 81
//Main_im_background_28 (Main_im_background_28) package { import mx.core.*; public class Main_im_background_28 extends BitmapAsset { } }//package
Section 82
//Main_im_background_29 (Main_im_background_29) package { import mx.core.*; public class Main_im_background_29 extends BitmapAsset { } }//package
Section 83
//Main_im_background_3 (Main_im_background_3) package { import mx.core.*; public class Main_im_background_3 extends BitmapAsset { } }//package
Section 84
//Main_im_background_30 (Main_im_background_30) package { import mx.core.*; public class Main_im_background_30 extends BitmapAsset { } }//package
Section 85
//Main_im_background_31 (Main_im_background_31) package { import mx.core.*; public class Main_im_background_31 extends BitmapAsset { } }//package
Section 86
//Main_im_background_32 (Main_im_background_32) package { import mx.core.*; public class Main_im_background_32 extends BitmapAsset { } }//package
Section 87
//Main_im_background_33 (Main_im_background_33) package { import mx.core.*; public class Main_im_background_33 extends BitmapAsset { } }//package
Section 88
//Main_im_background_34 (Main_im_background_34) package { import mx.core.*; public class Main_im_background_34 extends BitmapAsset { } }//package
Section 89
//Main_im_background_35 (Main_im_background_35) package { import mx.core.*; public class Main_im_background_35 extends BitmapAsset { } }//package
Section 90
//Main_im_background_36 (Main_im_background_36) package { import mx.core.*; public class Main_im_background_36 extends BitmapAsset { } }//package
Section 91
//Main_im_background_37 (Main_im_background_37) package { import mx.core.*; public class Main_im_background_37 extends BitmapAsset { } }//package
Section 92
//Main_im_background_38 (Main_im_background_38) package { import mx.core.*; public class Main_im_background_38 extends BitmapAsset { } }//package
Section 93
//Main_im_background_39 (Main_im_background_39) package { import mx.core.*; public class Main_im_background_39 extends BitmapAsset { } }//package
Section 94
//Main_im_background_4 (Main_im_background_4) package { import mx.core.*; public class Main_im_background_4 extends BitmapAsset { } }//package
Section 95
//Main_im_background_40 (Main_im_background_40) package { import mx.core.*; public class Main_im_background_40 extends BitmapAsset { } }//package
Section 96
//Main_im_background_41 (Main_im_background_41) package { import mx.core.*; public class Main_im_background_41 extends BitmapAsset { } }//package
Section 97
//Main_im_background_42 (Main_im_background_42) package { import mx.core.*; public class Main_im_background_42 extends BitmapAsset { } }//package
Section 98
//Main_im_background_43 (Main_im_background_43) package { import mx.core.*; public class Main_im_background_43 extends BitmapAsset { } }//package
Section 99
//Main_im_background_44 (Main_im_background_44) package { import mx.core.*; public class Main_im_background_44 extends BitmapAsset { } }//package
Section 100
//Main_im_background_45 (Main_im_background_45) package { import mx.core.*; public class Main_im_background_45 extends BitmapAsset { } }//package
Section 101
//Main_im_background_46 (Main_im_background_46) package { import mx.core.*; public class Main_im_background_46 extends BitmapAsset { } }//package
Section 102
//Main_im_background_47 (Main_im_background_47) package { import mx.core.*; public class Main_im_background_47 extends BitmapAsset { } }//package
Section 103
//Main_im_background_48 (Main_im_background_48) package { import mx.core.*; public class Main_im_background_48 extends BitmapAsset { } }//package
Section 104
//Main_im_background_49 (Main_im_background_49) package { import mx.core.*; public class Main_im_background_49 extends BitmapAsset { } }//package
Section 105
//Main_im_background_5 (Main_im_background_5) package { import mx.core.*; public class Main_im_background_5 extends BitmapAsset { } }//package
Section 106
//Main_im_background_50 (Main_im_background_50) package { import mx.core.*; public class Main_im_background_50 extends BitmapAsset { } }//package
Section 107
//Main_im_background_51 (Main_im_background_51) package { import mx.core.*; public class Main_im_background_51 extends BitmapAsset { } }//package
Section 108
//Main_im_background_52 (Main_im_background_52) package { import mx.core.*; public class Main_im_background_52 extends BitmapAsset { } }//package
Section 109
//Main_im_background_53 (Main_im_background_53) package { import mx.core.*; public class Main_im_background_53 extends BitmapAsset { } }//package
Section 110
//Main_im_background_54 (Main_im_background_54) package { import mx.core.*; public class Main_im_background_54 extends BitmapAsset { } }//package
Section 111
//Main_im_background_55 (Main_im_background_55) package { import mx.core.*; public class Main_im_background_55 extends BitmapAsset { } }//package
Section 112
//Main_im_background_56 (Main_im_background_56) package { import mx.core.*; public class Main_im_background_56 extends BitmapAsset { } }//package
Section 113
//Main_im_background_57 (Main_im_background_57) package { import mx.core.*; public class Main_im_background_57 extends BitmapAsset { } }//package
Section 114
//Main_im_background_58 (Main_im_background_58) package { import mx.core.*; public class Main_im_background_58 extends BitmapAsset { } }//package
Section 115
//Main_im_background_59 (Main_im_background_59) package { import mx.core.*; public class Main_im_background_59 extends BitmapAsset { } }//package
Section 116
//Main_im_background_6 (Main_im_background_6) package { import mx.core.*; public class Main_im_background_6 extends BitmapAsset { } }//package
Section 117
//Main_im_background_60 (Main_im_background_60) package { import mx.core.*; public class Main_im_background_60 extends BitmapAsset { } }//package
Section 118
//Main_im_background_7 (Main_im_background_7) package { import mx.core.*; public class Main_im_background_7 extends BitmapAsset { } }//package
Section 119
//Main_im_background_8 (Main_im_background_8) package { import mx.core.*; public class Main_im_background_8 extends BitmapAsset { } }//package
Section 120
//Main_im_background_9 (Main_im_background_9) package { import mx.core.*; public class Main_im_background_9 extends BitmapAsset { } }//package
Section 121
//Main_im_bfont (Main_im_bfont) package { import mx.core.*; public class Main_im_bfont extends BitmapAsset { } }//package
Section 122
//Main_im_bfontmask (Main_im_bfontmask) package { import mx.core.*; public class Main_im_bfontmask extends BitmapAsset { } }//package
Section 123
//Main_im_creditline1 (Main_im_creditline1) package { import mx.core.*; public class Main_im_creditline1 extends BitmapAsset { } }//package
Section 124
//Main_im_creditline2 (Main_im_creditline2) package { import mx.core.*; public class Main_im_creditline2 extends BitmapAsset { } }//package
Section 125
//Main_im_opt_fullscreen1 (Main_im_opt_fullscreen1) package { import mx.core.*; public class Main_im_opt_fullscreen1 extends BitmapAsset { } }//package
Section 126
//Main_im_opt_fullscreen2 (Main_im_opt_fullscreen2) package { import mx.core.*; public class Main_im_opt_fullscreen2 extends BitmapAsset { } }//package
Section 127
//Main_im_opt_newgame1 (Main_im_opt_newgame1) package { import mx.core.*; public class Main_im_opt_newgame1 extends BitmapAsset { } }//package
Section 128
//Main_im_opt_newgame2 (Main_im_opt_newgame2) package { import mx.core.*; public class Main_im_opt_newgame2 extends BitmapAsset { } }//package
Section 129
//Main_im_opt_offline1 (Main_im_opt_offline1) package { import mx.core.*; public class Main_im_opt_offline1 extends BitmapAsset { } }//package
Section 130
//Main_im_opt_offline2 (Main_im_opt_offline2) package { import mx.core.*; public class Main_im_opt_offline2 extends BitmapAsset { } }//package
Section 131
//Main_im_opt_restore1 (Main_im_opt_restore1) package { import mx.core.*; public class Main_im_opt_restore1 extends BitmapAsset { } }//package
Section 132
//Main_im_opt_restore2 (Main_im_opt_restore2) package { import mx.core.*; public class Main_im_opt_restore2 extends BitmapAsset { } }//package
Section 133
//Main_im_opt_visitsite1 (Main_im_opt_visitsite1) package { import mx.core.*; public class Main_im_opt_visitsite1 extends BitmapAsset { } }//package
Section 134
//Main_im_opt_visitsite2 (Main_im_opt_visitsite2) package { import mx.core.*; public class Main_im_opt_visitsite2 extends BitmapAsset { } }//package
Section 135
//Main_im_pressarrowkeys (Main_im_pressarrowkeys) package { import mx.core.*; public class Main_im_pressarrowkeys extends BitmapAsset { } }//package
Section 136
//Main_im_pressxorspace (Main_im_pressxorspace) package { import mx.core.*; public class Main_im_pressxorspace extends BitmapAsset { } }//package
Section 137
//Main_im_presszorup (Main_im_presszorup) package { import mx.core.*; public class Main_im_presszorup extends BitmapAsset { } }//package
Section 138
//Main_im_sponscreditline1 (Main_im_sponscreditline1) package { import mx.core.*; public class Main_im_sponscreditline1 extends BitmapAsset { } }//package
Section 139
//Main_im_sponscreditline2 (Main_im_sponscreditline2) package { import mx.core.*; public class Main_im_sponscreditline2 extends BitmapAsset { } }//package
Section 140
//Main_im_sponsorwebsite (Main_im_sponsorwebsite) package { import mx.core.*; public class Main_im_sponsorwebsite extends BitmapAsset { } }//package
Section 141
//Main_im_sponsorwebsite2 (Main_im_sponsorwebsite2) package { import mx.core.*; public class Main_im_sponsorwebsite2 extends BitmapAsset { } }//package
Section 142
//Main_im_tiles (Main_im_tiles) package { import mx.core.*; public class Main_im_tiles extends BitmapAsset { } }//package
Section 143
//Main_im_title1 (Main_im_title1) package { import mx.core.*; public class Main_im_title1 extends BitmapAsset { } }//package
Section 144
//Main_im_title2 (Main_im_title2) package { import mx.core.*; public class Main_im_title2 extends BitmapAsset { } }//package
Section 145
//Main_im_website (Main_im_website) package { import mx.core.*; public class Main_im_website extends BitmapAsset { } }//package
Section 146
//Main_music_1 (Main_music_1) package { import mx.core.*; public class Main_music_1 extends SoundAsset { } }//package
Section 147
//Main_music_2 (Main_music_2) package { import mx.core.*; public class Main_music_2 extends SoundAsset { } }//package
Section 148
//Main_music_3 (Main_music_3) package { import mx.core.*; public class Main_music_3 extends SoundAsset { } }//package
Section 149
//Main_music_4 (Main_music_4) package { import mx.core.*; public class Main_music_4 extends SoundAsset { } }//package
Section 150
//musicclass (musicclass) package { import flash.events.*; import flash.display.*; import flash.media.*; public class musicclass extends Sprite { public var stepstopother:int; public var ambchan:Array; public var ambchanlen:int; public var currentsong:int; public var step2playing:Boolean; public var ambchannel:SoundChannel; public var musicfadein:int; public var currentstepchan:int; public var currentamb:int; public var currentmusicchan:int; public var stepchan:Array; public var musicfade:int; public var step1playing:Boolean; public var currentefchan:int; public var steptype:int; public var ambchancur:int; public var playingsteps:Boolean; public var musicchannel:SoundChannel; public var amb2active:Boolean; public var musicchannel2:SoundChannel; public var ambchannel2:SoundChannel; public var stepchannel:SoundChannel; public var musicstopother:int; public var currentstep:int; public var musicchanlen:int; public var stopother:int; public var stepchanlen:int; public var efchannel:Array; public var stepchannel2:SoundChannel; public var stepchancur:int; public var musicchancur:int; public var currentambchan:int; public var efchan:Array; public var musicchan:Array; public function musicclass(){ ambchan = new Array(); musicchan = new Array(); stepchan = new Array(); efchannel = new Array(); efchan = new Array(); super(); } public function playstep(_arg1:int):void{ if (currentstep != _arg1){ if (currentstep != -1){ stepchanlen = 0; stepchancur = stepchanlen; currentstepchan = 0; stepstopother = 0; if (step1playing){ stepchannel.stop(); }; if (step2playing){ stepchannel2.stop(); }; }; if (_arg1 != -1){ if (_arg1 == 0){ stepchanlen = 64; }; if (_arg1 == 1){ stepchanlen = 52; }; if (_arg1 == 2){ stepchanlen = 52; }; stepchancur = stepchanlen; currentstepchan = 0; currentstep = _arg1; stepchannel = stepchan[currentstep].play(); step1playing = true; step2playing = false; } else { currentstep = -1; }; }; } public function initefchannels():void{ var _local1:int; while (_local1 < 16) { efchannel.push(new SoundChannel()); _local1++; }; } public function changeamb(_arg1:int):void{ if (currentamb != _arg1){ if (currentamb != -1){ ambchanlen = 0; ambchancur = ambchanlen; currentambchan = 0; stopother = 0; ambchannel.stop(); if (amb2active){ ambchannel2.stop(); }; }; if (_arg1 != -1){ if (_arg1 == 0){ ambchanlen = 285; }; if (_arg1 == 1){ ambchanlen = 360; }; if (_arg1 == 2){ ambchanlen = 120; }; if (_arg1 == 3){ ambchanlen = 480; }; ambchancur = ambchanlen; currentambchan = 0; currentamb = _arg1; ambchannel = ambchan[currentamb].play(); } else { currentamb = -1; }; }; } public function processmusicfade():void{ musicfade--; if (musicfade > 0){ if (currentmusicchan == 0){ musicchannel.soundTransform = new SoundTransform((musicfade / 60)); }; if (currentmusicchan == 1){ musicchannel2.soundTransform = new SoundTransform((musicfade / 60)); }; } else { if (currentmusicchan == 0){ musicchannel.stop(); }; if (currentmusicchan == 1){ musicchannel2.stop(); }; currentsong = -1; }; } public function processmusic():void{ if (musicfade > 0){ processmusicfade(); }; if (musicfadein > 0){ processmusicfadein(); }; musicstopother--; if (musicstopother == 1){ musicstopother = 0; if (currentmusicchan == 0){ musicchannel2.stop(); }; if (currentmusicchan == 1){ musicchannel.stop(); }; }; if (musicstopother < 0){ musicstopother = 0; }; musicchancur--; if ((((((musicchancur <= 0)) && ((currentsong > -1)))) && ((musicchanlen > 0)))){ musicchancur = musicchanlen; if (currentmusicchan == 0){ musicchannel2 = musicchan[currentsong].play(); musicstopother = 3; currentmusicchan = 1; } else { musicchannel = musicchan[currentsong].play(); musicstopother = 3; currentmusicchan = 0; }; }; } public function play(_arg1:int):void{ if (currentsong != _arg1){ if (currentsong != -1){ musicchanlen = 0; musicchancur = musicchanlen; currentmusicchan = 0; musicstopother = 0; musicchannel.stop(); musicchannel2.stop(); }; if (_arg1 != -1){ musicchanlen = -1; if (_arg1 == 2){ musicchanlen = 1231; }; if (_arg1 == 3){ musicchanlen = 3280; }; musicchancur = musicchanlen; currentmusicchan = 0; currentsong = _arg1; if (currentsong == 3){ musicfadein = 61; musicchannel = musicchan[currentsong].play(0, 0, new SoundTransform(0)); } else { musicchannel = musicchan[currentsong].play(); }; if (musicchanlen < 0){ musicchannel.addEventListener(Event.SOUND_COMPLETE, stopmusic); }; } else { currentsong = -1; }; }; } public function processmusicfadein():void{ musicfadein--; if (musicfadein > 0){ musicchannel.soundTransform = new SoundTransform(((60 - musicfadein) / 60)); } else { musicchannel.soundTransform = new SoundTransform(1); }; } public function processstep():void{ stepstopother--; if (stepstopother == 1){ stepstopother = 0; if (currentstepchan == 0){ stepchannel2.stop(); step2playing = false; }; if (currentstepchan == 1){ stepchannel.stop(); step1playing = false; }; }; if (stepstopother < 0){ stepstopother = 0; }; stepchancur--; if ((((((stepchancur <= 0)) && ((currentstep > -1)))) && ((stepchanlen > 0)))){ stepchancur = stepchanlen; if (currentstepchan == 0){ stepchannel2 = stepchan[currentstep].play(); step2playing = true; stepstopother = 3; currentstepchan = 1; } else { stepchannel = stepchan[currentstep].play(); step1playing = true; stepstopother = 3; currentstepchan = 0; }; }; } public function fadeout():void{ if ((((currentsong == 2)) || ((currentsong == 3)))){ if (musicfade == 0){ musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); musicfade = 61; }; } else { if (currentsong == 0){ if (musicfade == 0){ musicfade = 61; }; }; }; } public function stopstep():void{ if (step1playing){ stepchannel.stop(); step1playing = false; }; if (step2playing){ stepchannel2.stop(); step2playing = false; }; currentstep = -1; } public function playef(_arg1:int, _arg2:int=0):void{ efchannel[currentefchan] = efchan[_arg1].play(_arg2); currentefchan++; if (currentefchan > 15){ currentefchan = (currentefchan - 16); }; } public function loopamb1(_arg1:Event):void{ ambchannel.removeEventListener(Event.SOUND_COMPLETE, loopamb1); ambchannel = ambchan[currentamb].play(0, 0, new SoundTransform(0.5)); ambchannel.addEventListener(Event.SOUND_COMPLETE, loopamb1); } public function loopamb2(_arg1:Event):void{ ambchannel.removeEventListener(Event.SOUND_COMPLETE, loopamb2); ambchannel2 = ambchan[currentamb].play(0, 0, new SoundTransform(0.5)); ambchannel2.addEventListener(Event.SOUND_COMPLETE, loopamb2); } public function stopmusic(_arg1:Event):void{ musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); musicchannel.stop(); currentsong = -1; } public function processamb():void{ stopother--; if (stopother == 1){ stopother = 0; if (currentambchan == 0){ ambchannel2.stop(); }; if (currentambchan == 1){ ambchannel.stop(); }; }; if (stopother < 0){ stopother = 0; }; ambchancur--; if ((((ambchancur <= 0)) && ((currentamb > -1)))){ ambchancur = ambchanlen; if (currentambchan == 0){ amb2active = true; ambchannel2 = ambchan[currentamb].play(); stopother = 3; if (currentamb == 3){ stopother = 20; }; currentambchan = 1; } else { ambchannel = ambchan[currentamb].play(); stopother = 3; if (currentamb == 3){ stopother = 20; }; currentambchan = 0; }; }; } } }//package
Section 151
//Preloader (Preloader) package { import flash.events.*; import com.kongregate.as3.client.*; import flash.display.*; import mochi.as3.*; import flash.ui.*; import flash.net.*; import flash.utils.*; public dynamic class Preloader extends MovieClip { private var im_loading:Class; public var showctp:Boolean; public var startgame:Boolean; public var adson:Boolean; public var loading:Bitmap; public function Preloader(){ im_loading = Preloader_im_loading; super(); if (checksite()){ adson = false; } else { adson = true; }; var _local1:KongregateAPI = new KongregateAPI(); this.addChild(_local1); if (adson){ MochiAd.showPreGameAd({clip:root, id:"3da6e9186ed03b91", res:"640x576", background:1114884, color:9383213, outline:4522758, no_bg:false}); }; var _local2:ContextMenu = new ContextMenu(); var _local3:ContextMenuItem = new ContextMenuItem("Visit distractionware.com"); var _local4:ContextMenuItem = new ContextMenuItem("Visit kongregate.com"); _local3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, visit_distractionware); _local4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, visit_sponsor); _local4.separatorBefore = false; _local2.hideBuiltInItems(); _local2.customItems.push(_local3); _local2.customItems.push(_local4); this.contextMenu = _local2; addEventListener(Event.ENTER_FRAME, checkFrame); if (!adson){ loading = new im_loading(); loading.x = (320 - (loading.width / 2)); loading.y = 316; addChild(loading); }; showctp = false; startgame = false; } private function checkFrame(_arg1:Event):void{ var _local3:int; var _local2:Number = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal); if (!adson){ graphics.clear(); graphics.beginFill(1114884); graphics.drawRect(0, 0, 640, 576); graphics.endFill(); graphics.beginFill(15832473); graphics.drawRect(120, 279, 400, 18); graphics.endFill(); }; if (_local2 < 1){ if (!adson){ graphics.beginFill(1114884); _local3 = int(Math.round((_local2 * 391))); graphics.drawRect((125 + _local3), 283, (391 - _local3), 10); graphics.endFill(); }; } else { if (!showctp){ showctp = true; startgame = true; }; }; if (currentFrame == totalFrames){ if (startgame){ startup(); }; }; } public function visit_sponsor(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.kongregate.com/?gamereferral=dontlookback"); navigateToURL(_local2, "_blank"); } public function visit_distractionware(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.distractionware.com"); navigateToURL(_local2, "_blank"); } public function checksite():Boolean{ var _local1:String = stage.loaderInfo.url.toLowerCase(); if ((((((((_local1.indexOf("distractionware.com") <= 0)) && ((_local1.indexOf("flashgamelicense.com") <= 0)))) && ((_local1.indexOf("kongregate.com") <= 0)))) && ((_local1.indexOf("chat.kongregate.com") <= 0)))){ return (false); }; return (true); } private function startup():void{ removeEventListener(Event.ENTER_FRAME, checkFrame); var _local1:Class = (getDefinitionByName("Main") as Class); addChild((new (_local1) as DisplayObject)); } } }//package
Section 152
//Preloader_im_loading (Preloader_im_loading) package { import mx.core.*; public class Preloader_im_loading extends BitmapAsset { } }//package

Library Items

Symbol 1 MovieClip {com.kongregate.as3.client.KongregateAPI} [com.kongregate.as3.client.KongregateAPI]
Symbol 2 Bitmap {Preloader_im_loading}
Symbol 3 Sound {Main_amb_3} [Main_amb_3]
Symbol 4 Sound {Main_amb_4} [Main_amb_4]
Symbol 5 Sound {Main_amb_1} [Main_amb_1]
Symbol 6 Sound {Main_amb_2} [Main_amb_2]
Symbol 7 GraphicUsed by:8 37
Symbol 8 MovieClipUses:7Used by:37
Symbol 9 GraphicUsed by:10
Symbol 10 ButtonUses:9Used by:37
Symbol 11 GraphicUsed by:37
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClipUses:12Used by:31 37
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:14Used by:30 37
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:24 30 31 37
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClipUses:18Used by:24 30 31 37
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:20Used by:24 30 31 37
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:24 30 31 37
Symbol 24 MovieClipUses:17 19 21 23Used by:37
Symbol 25 GraphicUsed by:37
Symbol 26 GraphicUsed by:27 37
Symbol 27 MovieClipUses:26Used by:37
Symbol 28 GraphicUsed by:37
Symbol 29 GraphicUsed by:31
Symbol 30 MovieClipUses:15 17 19 21 23Used by:31
Symbol 31 MovieClipUses:29 13 30 17 19 21 23Used by:37
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClipUses:32Used by:37
Symbol 34 FontUsed by:35
Symbol 35 TextUses:34Used by:36
Symbol 36 MovieClipUses:35Used by:37
Symbol 37 MovieClip {KONG_30FPS} [KONG_30FPS]Uses:7 8 10 11 13 15 24 25 27 28 17 19 21 23 31 33 26 36
Symbol 38 Sound {Main_music_1} [Main_music_1]
Symbol 39 Sound {Main_music_2} [Main_music_2]
Symbol 40 Sound {Main_music_3} [Main_music_3]
Symbol 41 Sound {Main_music_4} [Main_music_4]
Symbol 42 Sound {Main_ef_19} [Main_ef_19]
Symbol 43 Sound {Main_ef_22} [Main_ef_22]
Symbol 44 Sound {Main_ef_20} [Main_ef_20]
Symbol 45 Sound {Main_ef_21} [Main_ef_21]
Symbol 46 Sound {Main_ef_1} [Main_ef_1]
Symbol 47 Sound {Main_ef_0} [Main_ef_0]
Symbol 48 Sound {Main_ef_3} [Main_ef_3]
Symbol 49 Sound {Main_ef_2} [Main_ef_2]
Symbol 50 Sound {Main_ef_5} [Main_ef_5]
Symbol 51 Sound {Main_ef_4} [Main_ef_4]
Symbol 52 Sound {Main_ef_7} [Main_ef_7]
Symbol 53 Sound {Main_ef_6} [Main_ef_6]
Symbol 54 Sound {Main_ef_13} [Main_ef_13]
Symbol 55 Sound {Main_ef_14} [Main_ef_14]
Symbol 56 Sound {Main_ef_11} [Main_ef_11]
Symbol 57 Sound {Main_ef_12} [Main_ef_12]
Symbol 58 Sound {Main_ef_17} [Main_ef_17]
Symbol 59 Sound {Main_ef_18} [Main_ef_18]
Symbol 60 Sound {Main_ef_15} [Main_ef_15]
Symbol 61 Sound {Main_ef_16} [Main_ef_16]
Symbol 62 Sound {Main_footsteps_2} [Main_footsteps_2]
Symbol 63 Sound {Main_footsteps_3} [Main_footsteps_3]
Symbol 64 Sound {Main_ef_10} [Main_ef_10]
Symbol 65 Sound {Main_footsteps_1} [Main_footsteps_1]
Symbol 66 Sound {Main_ef_8} [Main_ef_8]
Symbol 67 Sound {Main_ef_9} [Main_ef_9]
Symbol 68 Bitmap {Main_im_website}
Symbol 69 Bitmap {Main_im_background_22}
Symbol 70 Bitmap {Main_im_background_23}
Symbol 71 Bitmap {Main_im_background_24}
Symbol 72 Bitmap {Main_im_background_25}
Symbol 73 Bitmap {Main_im_presszorup}
Symbol 74 Bitmap {Main_im_bfont}
Symbol 75 Bitmap {Main_im_opt_newgame1}
Symbol 76 Bitmap {Main_im_opt_newgame2}
Symbol 77 Bitmap {Main_im_background_20}
Symbol 78 Bitmap {Main_im_background_21}
Symbol 79 Bitmap {Main_im_background_19}
Symbol 80 Bitmap {Main_im_opt_visitsite2}
Symbol 81 Bitmap {Main_im_background_16}
Symbol 82 Bitmap {Main_im_opt_visitsite1}
Symbol 83 Bitmap {Main_im_background_15}
Symbol 84 Bitmap {Main_im_background_18}
Symbol 85 Bitmap {Main_im_background_17}
Symbol 86 Bitmap {Main_im_background_13}
Symbol 87 Bitmap {Main_im_background_14}
Symbol 88 Bitmap {Main_im_sponsorwebsite}
Symbol 89 Bitmap {Main_im_background_11}
Symbol 90 Bitmap {Main_im_background_12}
Symbol 91 Bitmap {Main_im_background_10}
Symbol 92 Bitmap {Main_im_bfontmask}
Symbol 93 Bitmap {Main_im_sponscreditline1}
Symbol 94 Bitmap {Main_im_sponscreditline2}
Symbol 95 Bitmap {Main_im_title2}
Symbol 96 Bitmap {Main_im_title1}
Symbol 97 Bitmap {Main_im_background_40}
Symbol 98 Bitmap {Main_im_background_41}
Symbol 99 Bitmap {Main_im_background_42}
Symbol 100 Bitmap {Main_im_background_43}
Symbol 101 Bitmap {Main_im_background_44}
Symbol 102 Bitmap {Main_im_opt_restore2}
Symbol 103 Bitmap {Main_im_background_45}
Symbol 104 Bitmap {Main_im_opt_restore1}
Symbol 105 Bitmap {Main_im_background_46}
Symbol 106 Bitmap {Main_im_background_47}
Symbol 107 Bitmap {Main_im_pressxorspace}
Symbol 108 Bitmap {Main_im_background_38}
Symbol 109 Bitmap {Main_im_background_2}
Symbol 110 Bitmap {Main_im_background_37}
Symbol 111 Bitmap {Main_im_background_3}
Symbol 112 Bitmap {Main_im_background_0}
Symbol 113 Bitmap {Main_im_background_39}
Symbol 114 Bitmap {Main_im_background_1}
Symbol 115 Bitmap {Main_im_tiles}
Symbol 116 Bitmap {Main_im_background_8}
Symbol 117 Bitmap {Main_im_background_9}
Symbol 118 Bitmap {Main_im_background_6}
Symbol 119 Bitmap {Main_im_background_7}
Symbol 120 Bitmap {Main_im_background_4}
Symbol 121 Bitmap {Main_im_background_5}
Symbol 122 Bitmap {Main_im_background_31}
Symbol 123 Bitmap {Main_im_background_32}
Symbol 124 Bitmap {Main_im_background_30}
Symbol 125 Bitmap {Main_im_background_35}
Symbol 126 Bitmap {Main_im_background_36}
Symbol 127 Bitmap {Main_im_background_33}
Symbol 128 Bitmap {Main_im_background_34}
Symbol 129 Bitmap {Main_im_background_29}
Symbol 130 Bitmap {Main_im_background_28}
Symbol 131 Bitmap {Main_im_background_27}
Symbol 132 Bitmap {Main_im_pressarrowkeys}
Symbol 133 Bitmap {Main_im_background_26}
Symbol 134 Bitmap {Main_im_background_59}
Symbol 135 Bitmap {Main_im_background_60}
Symbol 136 Bitmap {Main_im_creditline2}
Symbol 137 Bitmap {Main_im_background_48}
Symbol 138 Bitmap {Main_im_background_49}
Symbol 139 Bitmap {Main_im_background_56}
Symbol 140 Bitmap {Main_im_background_55}
Symbol 141 Bitmap {Main_im_background_58}
Symbol 142 Bitmap {Main_im_background_57}
Symbol 143 Bitmap {Main_im_background_52}
Symbol 144 Bitmap {Main_im_background_51}
Symbol 145 Bitmap {Main_im_background_54}
Symbol 146 Bitmap {Main_im_background_53}
Symbol 147 Bitmap {Main_im_creditline1}
Symbol 148 Bitmap {Main_im_background_50}
Symbol 149 Bitmap {Main_im_opt_offline1}
Symbol 150 Bitmap {Main_im_opt_fullscreen1}
Symbol 151 Bitmap {Main_im_opt_fullscreen2}
Symbol 152 Bitmap {Main_im_opt_offline2}
Symbol 153 Bitmap {Main_im_sponsorwebsite2}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 1 as "com.kongregate.as3.client.KongregateAPI"
ExportAssets (56)Timeline Frame 2Symbol 3 as "Main_amb_3"
ExportAssets (56)Timeline Frame 2Symbol 4 as "Main_amb_4"
ExportAssets (56)Timeline Frame 2Symbol 5 as "Main_amb_1"
ExportAssets (56)Timeline Frame 2Symbol 6 as "Main_amb_2"
ExportAssets (56)Timeline Frame 2Symbol 37 as "KONG_30FPS"
ExportAssets (56)Timeline Frame 2Symbol 38 as "Main_music_1"
ExportAssets (56)Timeline Frame 2Symbol 39 as "Main_music_2"
ExportAssets (56)Timeline Frame 2Symbol 40 as "Main_music_3"
ExportAssets (56)Timeline Frame 2Symbol 41 as "Main_music_4"
ExportAssets (56)Timeline Frame 2Symbol 42 as "Main_ef_19"
ExportAssets (56)Timeline Frame 2Symbol 43 as "Main_ef_22"
ExportAssets (56)Timeline Frame 2Symbol 44 as "Main_ef_20"
ExportAssets (56)Timeline Frame 2Symbol 45 as "Main_ef_21"
ExportAssets (56)Timeline Frame 2Symbol 46 as "Main_ef_1"
ExportAssets (56)Timeline Frame 2Symbol 47 as "Main_ef_0"
ExportAssets (56)Timeline Frame 2Symbol 48 as "Main_ef_3"
ExportAssets (56)Timeline Frame 2Symbol 49 as "Main_ef_2"
ExportAssets (56)Timeline Frame 2Symbol 50 as "Main_ef_5"
ExportAssets (56)Timeline Frame 2Symbol 51 as "Main_ef_4"
ExportAssets (56)Timeline Frame 2Symbol 52 as "Main_ef_7"
ExportAssets (56)Timeline Frame 2Symbol 53 as "Main_ef_6"
ExportAssets (56)Timeline Frame 2Symbol 54 as "Main_ef_13"
ExportAssets (56)Timeline Frame 2Symbol 55 as "Main_ef_14"
ExportAssets (56)Timeline Frame 2Symbol 56 as "Main_ef_11"
ExportAssets (56)Timeline Frame 2Symbol 57 as "Main_ef_12"
ExportAssets (56)Timeline Frame 2Symbol 58 as "Main_ef_17"
ExportAssets (56)Timeline Frame 2Symbol 59 as "Main_ef_18"
ExportAssets (56)Timeline Frame 2Symbol 60 as "Main_ef_15"
ExportAssets (56)Timeline Frame 2Symbol 61 as "Main_ef_16"
ExportAssets (56)Timeline Frame 2Symbol 62 as "Main_footsteps_2"
ExportAssets (56)Timeline Frame 2Symbol 63 as "Main_footsteps_3"
ExportAssets (56)Timeline Frame 2Symbol 64 as "Main_ef_10"
ExportAssets (56)Timeline Frame 2Symbol 65 as "Main_footsteps_1"
ExportAssets (56)Timeline Frame 2Symbol 66 as "Main_ef_8"
ExportAssets (56)Timeline Frame 2Symbol 67 as "Main_ef_9"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"start"Frame 2




http://swfchan.com/11/50957/info.shtml
Created: 20/11 -2018 07:13:04 Last modified: 2/5 -2024 13:16:48 Server time: 10/11 -2024 19:26:19