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

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

Epic Adventure Time - Revolt in Ogre Town fun pixel game.swf

This is the info page for
Flash #92783

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


Text
Zapapa nl

BR

ActionScript [AS3]

Section 1
//SpilGamesServices (com.spilgames.api.SpilGamesServices) package com.spilgames.api { import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; public class SpilGamesServices extends MovieClip { private var _connected:Boolean;// = false private var ERR_LOADCOMP:String;// = "Failed to load Spil Social Component." private var _loader:Loader; private var ERR_DOWNLOAD:String;// = "Failed downloading Spil Games Social configurator component." private var _connecting:Boolean;// = false private var DEFAULT_CONNECTION_LOCATION:String;// = "http://www8.agame.com/games/flash/services/ServicesConnection.swf" private var ERR_INITCOMP:String;// = "Failed to communication with a Spil Social Component." private var ERR_SPILCALL:String;// = "Failed processing a Spil call." private var ERR_NOPARENT:String;// = "Failed creating Spil Games connector: No parent provided." private var _showDebug:Boolean;// = false private var _servicesConnection;// = null private var _alwaysInFront:Boolean;// = false public static const INVALID_TYPE:int = -1; public static const INVALID_ID:int = -1; private static var _instance:SpilGamesServices = null; public function SpilGamesServices(){ if (_instance){ throw (new Error("Only a single instance can be created.")); }; _instance = this; } private function handleServicesFailed(_arg1:ErrorEvent):void{ _servicesConnection.removeEventListener(Event.COMPLETE, handleServicesReady); _servicesConnection.removeEventListener(ErrorEvent.ERROR, handleServicesFailed); _servicesConnection.removeEventListener("serviceError", handleServiceError); _servicesConnection = null; if (hasEventListener("servicesFailed")){ dispatchEvent(new ErrorEvent("servicesFailed", false, false, _arg1.text)); }; } private function handleLoadComplete(_arg1:Event):void{ _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); _servicesConnection = LoaderInfo(_arg1.target).content; _servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady); _servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed); _servicesConnection.addEventListener("serviceError", handleServiceError); addChild(_servicesConnection); } public function send(_arg1:String, _arg2:String, _arg3:Function, _arg4:Object=null):int{ if (_connected){ return (_servicesConnection.send(_arg1, _arg2, _arg3, _arg4)); }; return (INVALID_ID); } public function get connected():Boolean{ return (_connected); } public function showErrorMessage(_arg1:String):void{ if (((_servicesConnection) && (_servicesConnection.hasOwnProperty("showErrorMessage")))){ _servicesConnection.showErrorMessage(_arg1); }; } public function isSWFReady():Boolean{ return (isReady()); } public function getSiteID():int{ if (_servicesConnection != null){ return (_servicesConnection.getSiteID()); }; return (INVALID_ID); } public function isReady():Boolean{ return (((!((_servicesConnection == null))) && (_servicesConnection.isReady()))); } private function handleServiceError(_arg1:Event):void{ var _local2 = ""; if ((_arg1 is ErrorEvent)){ _local2 = ErrorEvent(_arg1).text; } else { _local2 = _arg1.toString(); }; if (hasEventListener("serviceError")){ dispatchEvent(new ErrorEvent("serviceError", false, false, _local2)); }; } public function disconnect():void{ if (_connected){ _servicesConnection.removeEventListener(); _servicesConnection.removeEventListener(); _servicesConnection.removeEventListener(); _servicesConnection.disconnect(); _servicesConnection = null; }; if (_loader){ try { _loader.close(); } catch(e:Error) { } finally { _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); }; }; removeEventListener(Event.ENTER_FRAME, bringToFront); if (parent){ parent.removeChild(this); }; } private function handleServicesReady(_arg1:Event):void{ _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); _connected = true; _connecting = false; dispatchEvent(new Event("servicesReady")); } public function getChannelID():int{ if (_servicesConnection != null){ return (_servicesConnection.getChannelID()); }; return (INVALID_ID); } public function set showDebug(_arg1:Boolean):void{ if (_showDebug != _arg1){ _showDebug = _arg1; if (_showDebug){ bringToFront(); }; }; } public function hasValidUserData():Boolean{ return (isGuest()); } public function isDomainAllowed():Boolean{ return (((!((_servicesConnection == null))) && (_servicesConnection.isDomainValid()))); } public function isGuest():Boolean{ var _local1:Object; if (_servicesConnection != null){ return (_servicesConnection.isGuest()); }; trace("WARNING: SpilGamesServices connection not ready yet"); if (root.loaderInfo != null){ _local1 = root.loaderInfo.parameters; return (((((((!(_local1.username)) || ((_local1.username == "")))) || (!(_local1.hash)))) || ((_local1.hash == "")))); }; return (false); } public function get showDebug():Boolean{ return (_showDebug); } private function handleIOError(_arg1:IOErrorEvent):void{ _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); if (hasEventListener(_arg1.type)){ dispatchEvent(_arg1); }; } public function getItemType():int{ if (_servicesConnection != null){ return (_servicesConnection.getItemType()); }; return (INVALID_TYPE); } public function set alwaysInFront(_arg1:Boolean):void{ if (_alwaysInFront != _arg1){ _alwaysInFront = _arg1; if (_alwaysInFront){ addEventListener(Event.ENTER_FRAME, bringToFront); } else { removeEventListener(Event.ENTER_FRAME, bringToFront); }; }; } public function getItemID():int{ if (_servicesConnection != null){ return (_servicesConnection.getItemID()); }; return (INVALID_ID); } public function getUserName():String{ if (_servicesConnection != null){ return (_servicesConnection.getUserName()); }; return (""); } public function allowDomain(_arg1:String):void{ Security.allowDomain("*"); Security.allowInsecureDomain("*"); } public function getUserHash():String{ if (_servicesConnection != null){ return (_servicesConnection.getUserHash()); }; return (""); } public function connect(_arg1:DisplayObjectContainer):void{ var _local2:String; var _local3:URLRequest; if (((!(_connecting)) && (!(_connected)))){ if (!_arg1.stage){ trace("ERROR: The given clip must be present in the display list (added to stage)"); return; }; _connecting = true; _arg1.stage.addChild(this); _local2 = DEFAULT_CONNECTION_LOCATION; if (((root.loaderInfo.parameters["servicesLoc"]) && ((root.loaderInfo.parameters["servicesLoc"].length > 0)))){ _local2 = root.loaderInfo.parameters["servicesLoc"]; }; allowDomain(_local2); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleIOError); _local3 = new URLRequest(_local2); _loader.load(_local3); }; } public function get alwaysInFront():Boolean{ return (_alwaysInFront); } public function bringToFront(_arg1:Event=null):void{ var e = _arg1; if (parent){ try { parent.setChildIndex(this, (parent.numChildren - 1)); } catch(e:Error) { removeEventListener(Event.ENTER_FRAME, bringToFront); }; }; } public static function getInstance():SpilGamesServices{ if (!_instance){ _instance = new (SpilGamesServices); }; return (_instance); } } }//package com.spilgames.api
Section 2
//flag_icon_83 (components_fla.flag_icon_83) package components_fla { import flash.display.*; public dynamic class flag_icon_83 extends MovieClip { public function flag_icon_83(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package components_fla
Section 3
//AdLoader (CPMStar.AdLoader) package CPMStar { import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; public class AdLoader extends Sprite { private var cpmstarLoader:Loader; private var contentspotid:String; public function AdLoader(_arg1:String){ this.contentspotid = _arg1; addEventListener(Event.ADDED, addedHandler); } private function dispatchHandler(_arg1:Event):void{ dispatchEvent(_arg1); } private function addedHandler(_arg1:Event):void{ removeEventListener(Event.ADDED, addedHandler); Security.allowDomain("server.cpmstar.com"); var _local2 = "http://server.cpmstar.com/adviewas3.swf"; var _local3:DisplayObjectContainer = parent; cpmstarLoader = new Loader(); cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler); cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler); cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid))); addChild(cpmstarLoader); } } }//package CPMStar
Section 4
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; public static var _inventory:MochiInventory; public static function triggerEvent(_arg1:String, _arg2:Object):void{ MochiSocial.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.addEventListener(_arg1, _arg2); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(_arg1:Object=null):void{ MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:_arg1}, null, null); } public static function showItem(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:_arg1}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showVideo(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:_arg1}, null, null); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _inventory = new MochiInventory(); }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 5
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { public var Sibling:MochiDigits; public var Fragment:Number; public var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function reencode():void{ var _local1:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function set value(_arg1:Number):void{ setValue(_arg1); } public function toString():String{ var _local1:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 6
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { public var eventTable:Object; public function MochiEventDispatcher():void{ eventTable = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ return; }; for (_local3 in eventTable[_arg1]) { var _local6 = eventTable[_arg1]; _local6[_local3](_arg2); }; } public function removeEventListener(_arg1:String, _arg2:Function):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ eventTable[_arg1] = []; return; }; for (_local3 in eventTable[_arg1]) { if (eventTable[_arg1][_local3] != _arg2){ } else { eventTable[_arg1].splice(Number(_local3), 1); }; }; } public function addEventListener(_arg1:String, _arg2:Function):void{ removeEventListener(_arg1, _arg2); eventTable[_arg1][eventTable[_arg1].length] = _arg2; } } }//package mochi.as3
Section 7
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; public static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var gameStart:Number; public static var levelStart:Number; public static function endPlay():void{ MochiServices.send("events_clearRoundID", null, null, null); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function trackEvent(_arg1:String, _arg2=null):void{ MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function startSession(_arg1:String):void{ MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{ var _local4:Object; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; _local3.clip = _arg1; MochiServices.send("events_setNotifications", _local3, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startPlay(_arg1:String="gameplay"):void{ MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null); } } }//package mochi.as3
Section 8
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { public var _timer:Timer; public var _names:Array; public var _syncID:Number; public var _consumableProperties:Object; public var _storeSync:Object; public var _outstandingID:Number; public var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; public static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; public static const CONSUMER_KEY:String = "MochiConsumables"; public static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } public function newItems(_arg1:Object):void{ if (!this[(_arg1.id + KEY_SALT)]){ this[(_arg1.id + KEY_SALT)] = 0; }; if (!this[_arg1.id]){ this[_arg1.id] = 0; }; this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count); this[_arg1.id] = (this[_arg1.id] + _arg1.count); if (_arg1.publicProperties.consumable){ if (!this[_arg1.publicProperties.tag]){ this[_arg1.publicProperties.tag] = 0; }; this[_arg1.publicProperties.tag] = (this[_arg1.publicProperties.tag] + (_arg1.publicProperties.inc * _arg1.count)); }; } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[_arg1]){ return (MochiDigits(_consumableProperties[_arg1]).value); }; return (undefined); } public function loggedIn(_arg1:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[_arg1] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1)); } public function putConsumableBag(_arg1:MochiUserData):void{ _syncPending = false; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(_arg2 is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2}); return; }; if (_consumableProperties[_arg1]){ _local3 = MochiDigits(_consumableProperties[_arg1]); if (_local3.value == _arg2){ return; }; _local3.value = _arg2; } else { _names[_names.length] = _arg1; _consumableProperties[_arg1] = new MochiDigits(_arg2); }; _syncID++; } public function itemOwned(_arg1:Object):void{ _storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count}; } public function sync(_arg1:Event=null):void{ var _local3:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; var _local2:Object = {}; for (_local3 in _consumableProperties) { _local2[_local3] = MochiDigits(_consumableProperties[_local3]).value; }; MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (_names[(_arg1 - 1)]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ if (!_consumableProperties[_arg1]){ return (false); }; _names.splice(_names.indexOf(_arg1), 1); delete _consumableProperties[_arg1]; return (true); } public function getConsumableBag(_arg1:MochiUserData):void{ var _local2:String; var _local3:Number; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); return; }; _consumableProperties = {}; _names = new Array(); if (_arg1.data){ for (_local2 in _arg1.data) { _names[_names.length] = _local2; _consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]); }; }; for (_local2 in _storeSync) { _local3 = _storeSync[_local2].count; if (_consumableProperties[(_local2 + KEY_SALT)]){ _local3 = (_local3 - _consumableProperties[_local2]); }; if (_local3 == 0){ } else { newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties}); }; }; triggerEvent(READY, {}); } public function loggedOut(_arg1:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } } }//package mochi.as3
Section 9
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { public static var _container:Object; public static var _connected:Boolean = false; public static var _queue:Array; public static var _swfVersion:String; public static var _preserved:Object; public static var netupAttempted:Boolean = false; public static var _sendChannel:LocalConnection; public static var servicesSync:MochiSync = new MochiSync(); public static var _nextCallbackID:Number; public static var _clip:MovieClip; public static var _id:String; public static var _services:String = "services.swf"; public static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; public static var _timer:Timer; public static var _sendChannelName:String; public static var _loader:Loader; public static var _callbacks:Object; public static var _connecting:Boolean = false; public static var _mochiLocalConnection:MovieClip; public static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; public static var _mochiLC:String = "MochiLC.swf"; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } public static function onReceive(_arg1:Object):void{ var methodName:String; var pkg = _arg1; var cb:String = pkg.callbackID; var cblst:Object = _callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete _callbacks[cb]; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1)); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _queue[_queue.length] = {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}; }; if (_clip != null){ if (_callbacks != null){ _callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _nextCallbackID++; }; }; } public static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } public static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local4:int; var _local14:Loader; var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var _local6:Array = [0, 64, 0, 0, 0]; var _local7:MovieClip = new MovieClip(); var _local8:LocalConnection = new LocalConnection(); var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time)); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); var _local10:ByteArray = new ByteArray(); var _local11:ByteArray = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); var _local12:uint = ((_local3.length + _local11.length) + 4); var _local13:uint = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var avm1Click:DisplayObject; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); var s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); var _local2:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _mochiLocalConnection.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.8 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } public static function warnID(_arg1:String, _arg2:Boolean):void{ _arg1 = _arg1.toLowerCase(); if (_arg1.length != 16){ trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (_arg1 == "1e113c7239048b3f"){ if (_arg2){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (_arg1 == "84993a1de4031cd8"){ if (_arg2){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; var _local3:Number = 0; while (_local3 < _arg1.length) { switch (_arg1.charAt(_local3)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + _arg1)); return; }; _local3++; }; } public static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (((_clip) && (_queue))){ while (_queue.length > 0) { _local2 = _queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _callbacks[_local2.callbackID]; }; delete _callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } public static function onEvent(_arg1:Object):void{ var _local2:String = _arg1.target; var _local3:String = _arg1.event; switch (_local2){ case "events": MochiEvents.triggerEvent(_arg1.event, _arg1.args); break; case "coins": MochiCoins.triggerEvent(_arg1.event, _arg1.args); break; case "sync": servicesSync.triggerEvent(_arg1.event, _arg1.args); break; }; } public static function urlOptions(_arg1:Object):Object{ var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; var _local2:Object = {}; if (_arg1.stage){ _local3 = _arg1.stage.loaderInfo.parameters.mochiad_options; } else { _local3 = _arg1.loaderInfo.parameters.mochiad_options; }; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_clip.parent){ _clip.parent.removeChild(_clip); }; if (_arg1 != null){ if ((_arg1 is DisplayObjectContainer)){ _container = _arg1; }; }; if (_arg2){ if ((_container is DisplayObjectContainer)){ DisplayObjectContainer(_container).addChild(_clip); }; }; } public static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } public static function loadError(_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); } public static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift()); }; }; } public static function loadLCBridge(_arg1:Object):void{ var loader:Loader; var clip = _arg1; loader = new Loader(); var mochiLCURL:String = (_servURL + _mochiLC); var req:URLRequest = new URLRequest(mochiLCURL); var complete:Function = function (_arg1:Object):void{ _mochiLocalConnection = MovieClip(loader.content); listen(); }; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); loader.load(req); clip.addChild(loader); } public static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } public static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(_arg2).servURL){ _servURL = urlOptions(_arg2).servURL; }; var _local3:String = (_servURL + _services); if (urlOptions(_arg2).servicesURL){ _local3 = urlOptions(_arg2).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(_local3); _clip = new MovieClip(); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); var _local4:URLRequest = new URLRequest(_local3); var _local5:URLVariables = new URLVariables(); _local5.listenLC = _listenChannelName; _local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options; _local5.api_version = getVersion(); if (widget){ _local5.widget = true; }; _local4.data = _local5; _loader.load(_local4); _clip.addChild(_loader); _sendChannel = new LocalConnection(); _queue = []; _nextCallbackID = 0; _callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; warnID(id, false); if ((clip is DisplayObject)){ if (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function updateCopy(_arg1:Object):void{ MochiServices.send("coins_updateCopy", _arg1, null, null); } public static function bringToTop(_arg1:Event=null):void{ var e = _arg1; if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 10
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const NO_USER:String = "NoUser"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const USER_INFO:String = "UserInfo"; public static const ERROR:String = "Error"; public static const LOGIN_SHOW:String = "LoginShow"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_SHOWN:String = "LoginShown"; public static const LOGIN_HIDE:String = "LoginHide"; public static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _user_info:Object = null; public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(_arg1:Object):void{ MochiServices.send("coins_saveUserProperties", _arg1); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function getUserInfo():void{ MochiServices.send("coins_getUserInfo"); } public static function showLoginWidget(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showLoginWidget", {options:_arg1}); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function requestLogin():void{ MochiServices.send("coins_requestLogin"); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("coins_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _user_info = _arg1; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 11
//MochiSync (mochi.as3.MochiSync) package mochi.as3 { import flash.utils.*; public dynamic class MochiSync extends Proxy { public var _syncContainer:Object; public static var SYNC_PROPERTY:String = "UpdateProperty"; public static var SYNC_REQUEST:String = "SyncRequest"; public function MochiSync():void{ _syncContainer = {}; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ if (_syncContainer[_arg1] == _arg2){ return; }; var _local3:String = _arg1.toString(); _syncContainer[_local3] = _arg2; MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ return (_syncContainer[_arg1]); } public function triggerEvent(_arg1:String, _arg2:Object):void{ switch (_arg1){ case SYNC_REQUEST: MochiServices.send("sync_syncronize", _syncContainer); break; case SYNC_PROPERTY: _syncContainer[_arg2.name] = _arg2.value; break; }; } } }//package mochi.as3
Section 12
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.utils.*; import flash.net.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var operation:String;// = null public var error:Event;// = null public var data;// = null public var _loader:URLLoader; public var key:String;// = null public function MochiUserData(_arg1:String="", _arg2:Function=null){ this.key = _arg1; this.callback = _arg2; } public function serialize(_arg1):ByteArray{ var _local2:ByteArray = new ByteArray(); _local2.objectEncoding = ObjectEncoding.AMF3; _local2.writeObject(_arg1); _local2.compress(); return (_local2); } public function errorHandler(_arg1:IOErrorEvent):void{ data = null; error = _arg1; if (callback != null){ performCallback(); } else { dispatchEvent(_arg1); }; close(); } public function putEvent(_arg1):void{ request("put", serialize(_arg1)); } public function deserialize(_arg1:ByteArray){ _arg1.objectEncoding = ObjectEncoding.AMF3; _arg1.uncompress(); return (_arg1.readObject()); } public function securityErrorHandler(_arg1:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString()))); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function performCallback():void{ try { callback(this); } catch(e:Error) { trace(("[MochiUserData] exception during callback: " + e)); }; } public function request(_arg1:String, _arg2:ByteArray):void{ var _operation = _arg1; var _data = _arg2; operation = _operation; var api_url:String = MochiSocial.getAPIURL(); var api_token:String = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); var args:URLVariables = new URLVariables(); args.op = _operation; args.key = key; var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); try { _loader.load(req); } catch(e:SecurityError) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString()))); }; } public function completeHandler(_arg1:Event):void{ var event = _arg1; try { if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; } catch(e:Error) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString()))); return; }; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public static function get(_arg1:String, _arg2:Function):void{ var _local3:MochiUserData = new MochiUserData(_arg1, _arg2); _local3.getEvent(); } public static function put(_arg1:String, _arg2, _arg3:Function):void{ var _local4:MochiUserData = new MochiUserData(_arg1, _arg3); _local4.putEvent(_arg2); } } }//package mochi.as3
Section 13
//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.5.0.12683"; 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 14
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 15
//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.5.0.12683"; 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 16
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 17
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 18
//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 19
//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 20
//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 21
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 22
//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.5.0.12683"; 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 23
//FlxAnim (org.flixel.data.FlxAnim) package org.flixel.data { public class FlxAnim { public var delay:Number; public var frames:Array; public var looped:Boolean; public var name:String; public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){ name = _arg1; delay = 0; if (_arg3 > 0){ delay = (1 / _arg3); }; frames = _arg2; looped = _arg4; } } }//package org.flixel.data
Section 24
//FlxConsole (org.flixel.data.FlxConsole) package org.flixel.data { import flash.display.*; import org.flixel.*; import flash.text.*; public class FlxConsole extends Sprite { protected const MAX_CONSOLE_LINES:uint = 0x0100; protected var _lines:Array; public var lastElapsed:Number; protected var _text:TextField; protected var _fpsUpdate:Boolean; protected var _console:Sprite; protected var _Y:Number; protected var _curFPS:uint; protected var _fps:Array; protected var _bx:int; protected var _by:int; protected var _fpsDisplay:TextField; protected var _YT:Number; protected var _byt:int; public function FlxConsole(_arg1:uint, _arg2:uint, _arg3:uint){ visible = false; x = (_arg1 * _arg3); _by = (_arg2 * _arg3); _byt = (_by - (FlxG.height * _arg3)); _YT = (_Y = (y = _byt)); var _local4:Bitmap = new Bitmap(new BitmapData((FlxG.width * _arg3), (FlxG.height * _arg3), true, 2130706432)); addChild(_local4); _fps = new Array(8); _curFPS = 0; _fpsUpdate = true; _text = new TextField(); _text.width = _local4.width; _text.height = _local4.height; _text.multiline = true; _text.wordWrap = true; _text.embedFonts = true; _text.antiAliasType = AntiAliasType.NORMAL; _text.gridFitType = GridFitType.PIXEL; _text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF); addChild(_text); _fpsDisplay = new TextField(); _fpsDisplay.width = _local4.width; _fpsDisplay.height = 20; _fpsDisplay.multiline = true; _fpsDisplay.wordWrap = true; _fpsDisplay.embedFonts = true; _fpsDisplay.antiAliasType = AntiAliasType.NORMAL; _fpsDisplay.gridFitType = GridFitType.PIXEL; _fpsDisplay.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right"); addChild(_fpsDisplay); _lines = new Array(); } public function log(_arg1:String):void{ var _local2:String; var _local3:uint; if (_arg1 == null){ _arg1 = "NULL"; }; trace(_arg1); _lines[_lines.length] = _arg1; if (_lines.length > MAX_CONSOLE_LINES){ _lines.shift(); _local2 = ""; _local3 = 0; while (_local3 < _lines.length) { _local2 = (_local2 + (_lines[_local3] + "\n")); _local3++; }; _text.text = _local2; } else { _text.appendText((_arg1 + "\n")); }; _text.scrollV = _text.height; } public function update():void{ var _local1:uint; var _local2:uint; if (visible){ _fps[_curFPS] = (1 / lastElapsed); if (++_curFPS >= _fps.length){ _curFPS = 0; }; _fpsUpdate = !(_fpsUpdate); if (_fpsUpdate){ _local1 = 0; _local2 = 0; while (_local2 < _fps.length) { _local1 = (_local1 + _fps[_local2]); _local2++; }; _fpsDisplay.text = (Math.floor((_local1 / _fps.length)) + " fps"); }; }; if (_Y < _YT){ _Y = (_Y + ((FlxG.height * 10) * FlxG.elapsed)); } else { if (_Y > _YT){ _Y = (_Y - ((FlxG.height * 10) * FlxG.elapsed)); }; }; if (_Y > _by){ _Y = _by; } else { if (_Y < _byt){ _Y = _byt; visible = false; }; }; y = Math.floor(_Y); } public function toggle():void{ if (_YT == _by){ _YT = _byt; } else { _YT = _by; visible = true; }; } } }//package org.flixel.data
Section 25
//FlxFade (org.flixel.data.FlxFade) package org.flixel.data { import org.flixel.*; public class FlxFade extends FlxSprite { protected var _delay:Number; protected var _complete:Function; public function FlxFade(){ createGraphic(FlxG.width, FlxG.height, 0, true); scrollFactor.x = 0; scrollFactor.y = 0; exists = false; } override public function update():void{ alpha = (alpha + (FlxG.elapsed / _delay)); if (alpha >= 1){ alpha = 1; if (_complete != null){ _complete(); }; }; } public function start(_arg1:uint=4278190080, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ if (((!(_arg4)) && (exists))){ return; }; fill(_arg1); _delay = _arg2; _complete = _arg3; alpha = 0; exists = true; } public function stop():void{ exists = false; } } }//package org.flixel.data
Section 26
//FlxFlash (org.flixel.data.FlxFlash) package org.flixel.data { import org.flixel.*; public class FlxFlash extends FlxSprite { protected var _delay:Number; protected var _complete:Function; public function FlxFlash(){ createGraphic(FlxG.width, FlxG.height, 0, true); scrollFactor.x = 0; scrollFactor.y = 0; exists = false; } override public function update():void{ alpha = (alpha - (FlxG.elapsed / _delay)); if (alpha <= 0){ exists = false; if (_complete != null){ _complete(); }; }; } public function start(_arg1:uint=4294967295, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ if (((!(_arg4)) && (exists))){ return; }; fill(_arg1); _delay = _arg2; _complete = _arg3; alpha = 1; exists = true; } public function stop():void{ exists = false; } } }//package org.flixel.data
Section 27
//FlxKeyboard (org.flixel.data.FlxKeyboard) package org.flixel.data { import flash.events.*; public class FlxKeyboard { protected const _t:uint = 0x0100; public var RIGHT:Boolean; public var LEFT:Boolean; public var FOUR:Boolean; public var TWO:Boolean; public var CONTROL:Boolean; public var A:Boolean; public var B:Boolean; public var C:Boolean; public var D:Boolean; public var E:Boolean; public var ONE:Boolean; public var G:Boolean; public var H:Boolean; public var I:Boolean; public var J:Boolean; public var K:Boolean; public var F:Boolean; public var N:Boolean; public var O:Boolean; public var Q:Boolean; public var R:Boolean; public var S:Boolean; public var T:Boolean; public var U:Boolean; public var MINUS:Boolean; public var Y:Boolean; public var L:Boolean; public var Z:Boolean; public var QUOTE:Boolean; public var V:Boolean; public var X:Boolean; public var P:Boolean; public var SHIFT:Boolean; public var SLASH:Boolean; public var BACKSPACE:Boolean; public var EIGHT:Boolean; public var W:Boolean; public var M:Boolean; public var THREE:Boolean; public var ESCAPE:Boolean; public var SEMICOLON:Boolean; public var CAPSLOCK:Boolean; protected var _lookup:Object; public var PLUS:Boolean; protected var _map:Array; public var ZERO:Boolean; public var DOWN:Boolean; public var F1:Boolean; public var F2:Boolean; public var F3:Boolean; public var F4:Boolean; public var F5:Boolean; public var F6:Boolean; public var F7:Boolean; public var NINE:Boolean; public var F9:Boolean; public var ALT:Boolean; public var F8:Boolean; public var DELETE:Boolean; public var LBRACKET:Boolean; public var UP:Boolean; public var ENTER:Boolean; public var FIVE:Boolean; public var SIX:Boolean; public var COMMA:Boolean; public var PERIOD:Boolean; public var BACKSLASH:Boolean; public var F10:Boolean; public var F11:Boolean; public var F12:Boolean; public var SEVEN:Boolean; public var SPACE:Boolean; public var RBRACKET:Boolean; public function FlxKeyboard(){ var _local1:uint; _lookup = new Object(); _map = new Array(_t); _local1 = 65; while (_local1 <= 90) { addKey(String.fromCharCode(_local1), _local1); _local1++; }; _local1 = 48; var _temp1 = _local1; _local1 = (_local1 + 1); addKey("ZERO", _temp1); var _temp2 = _local1; _local1 = (_local1 + 1); addKey("ONE", _temp2); var _temp3 = _local1; _local1 = (_local1 + 1); addKey("TWO", _temp3); var _temp4 = _local1; _local1 = (_local1 + 1); addKey("THREE", _temp4); var _temp5 = _local1; _local1 = (_local1 + 1); addKey("FOUR", _temp5); var _temp6 = _local1; _local1 = (_local1 + 1); addKey("FIVE", _temp6); var _temp7 = _local1; _local1 = (_local1 + 1); addKey("SIX", _temp7); var _temp8 = _local1; _local1 = (_local1 + 1); addKey("SEVEN", _temp8); var _temp9 = _local1; _local1 = (_local1 + 1); addKey("EIGHT", _temp9); var _temp10 = _local1; _local1 = (_local1 + 1); addKey("NINE", _temp10); _local1 = 1; while (_local1 <= 12) { addKey(("F" + _local1), (111 + _local1)); _local1++; }; addKey("ESCAPE", 27); addKey("MINUS", 189); addKey("PLUS", 187); addKey("DELETE", 46); addKey("BACKSPACE", 8); addKey("LBRACKET", 219); addKey("RBRACKET", 221); addKey("BACKSLASH", 220); addKey("CAPSLOCK", 20); addKey("SEMICOLON", 186); addKey("QUOTE", 222); addKey("ENTER", 13); addKey("SHIFT", 16); addKey("COMMA", 188); addKey("PERIOD", 190); addKey("SLASH", 191); addKey("CONTROL", 17); addKey("ALT", 18); addKey("SPACE", 32); addKey("UP", 38); addKey("DOWN", 40); addKey("LEFT", 37); addKey("RIGHT", 39); } public function handleKeyUp(_arg1:KeyboardEvent):void{ var _local2:Object = _map[_arg1.keyCode]; if (_local2 == null){ return; }; if (_local2.current > 0){ _local2.current = -1; } else { _local2.current = 0; }; this[_local2.name] = false; } public function pressed(_arg1:String):Boolean{ return (this[_arg1]); } public function justReleased(_arg1:String):Boolean{ return ((_map[_lookup[_arg1]].current == -1)); } public function handleKeyDown(_arg1:KeyboardEvent):void{ var _local2:Object = _map[_arg1.keyCode]; if (_local2 == null){ return; }; if (_local2.current > 0){ _local2.current = 1; } else { _local2.current = 2; }; this[_local2.name] = true; } public function reset():void{ var _local2:Object; var _local1:uint; while (_local1 < _t) { if (_map[_local1] == null){ } else { _local2 = _map[_local1]; this[_local2.name] = false; _local2.current = 0; _local2.last = 0; }; _local1++; }; } public function justPressed(_arg1:String):Boolean{ return ((_map[_lookup[_arg1]].current == 2)); } public function update():void{ var _local2:Object; var _local1:uint; while (_local1 < _t) { if (_map[_local1] == null){ } else { _local2 = _map[_local1]; if ((((_local2.last == -1)) && ((_local2.current == -1)))){ _local2.current = 0; } else { if ((((_local2.last == 2)) && ((_local2.current == 2)))){ _local2.current = 1; }; }; _local2.last = _local2.current; }; _local1++; }; } protected function addKey(_arg1:String, _arg2:uint):void{ _lookup[_arg1] = _arg2; _map[_arg2] = {name:_arg1, current:0, last:0}; } } }//package org.flixel.data
Section 28
//FlxKong (org.flixel.data.FlxKong) package org.flixel.data { import flash.events.*; import flash.display.*; import flash.net.*; public class FlxKong extends Sprite { public var API; public function FlxKong(){ API = null; } public function init():void{ var _local1:Object = LoaderInfo(root.loaderInfo).parameters; var _local2:String = ((_local1.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf")); var _local3:URLRequest = new URLRequest(_local2); var _local4:Loader = new Loader(); _local4.contentLoaderInfo.addEventListener(Event.COMPLETE, APILoaded); _local4.load(_local3); this.addChild(_local4); } protected function APILoaded(_arg1:Event):void{ API = _arg1.target.content; API.services.connect(); } } }//package org.flixel.data
Section 29
//FlxList (org.flixel.data.FlxList) package org.flixel.data { import org.flixel.*; public class FlxList { public var next:FlxList; public var object:FlxObject; public function FlxList(){ object = null; next = null; } } }//package org.flixel.data
Section 30
//FlxMouse (org.flixel.data.FlxMouse) package org.flixel.data { import flash.events.*; import org.flixel.*; public class FlxMouse { protected var ImgDefaultCursor:Class; protected var _out:Boolean; public var cursor:FlxSprite; public var screenY:int; protected var _last:int; public var x:int; public var y:int; protected var _current:int; public var screenX:int; public function FlxMouse(){ ImgDefaultCursor = FlxMouse_ImgDefaultCursor; super(); x = 0; y = 0; screenX = 0; screenY = 0; _current = 0; _last = 0; cursor = null; _out = false; } public function hide():void{ if (cursor != null){ cursor.visible = false; _out = false; }; } public function update(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):void{ screenX = _arg1; screenY = _arg2; x = (screenX - FlxU.floor(_arg3)); y = (screenY - FlxU.floor(_arg4)); if (cursor != null){ cursor.x = x; cursor.y = y; }; if ((((_last == -1)) && ((_current == -1)))){ _current = 0; } else { if ((((_last == 2)) && ((_current == 2)))){ _current = 1; }; }; _last = _current; } public function reset():void{ _current = 0; _last = 0; } public function justReleased():Boolean{ return ((_current == -1)); } public function handleMouseOver(_arg1:MouseEvent):void{ if (cursor != null){ cursor.visible = _out; }; } public function handleMouseDown(_arg1:MouseEvent):void{ if (_current > 0){ _current = 1; } else { _current = 2; }; } public function pressed():Boolean{ return ((_current > 0)); } public function justPressed():Boolean{ return ((_current == 2)); } public function load(_arg1:Class, _arg2:int=0, _arg3:int=0):void{ if (_arg1 == null){ _arg1 = ImgDefaultCursor; }; cursor = new FlxSprite(screenX, screenY, _arg1); cursor.offset.x = _arg2; cursor.offset.y = _arg3; } public function handleMouseUp(_arg1:MouseEvent):void{ if (_current > 0){ _current = -1; } else { _current = 0; }; } public function handleMouseOut(_arg1:MouseEvent):void{ if (cursor != null){ _out = cursor.visible; cursor.visible = false; }; } public function show(_arg1:Class=null, _arg2:int=0, _arg3:int=0):void{ _out = true; if (_arg1 != null){ load(_arg1, _arg2, _arg3); } else { if (cursor != null){ cursor.visible = true; } else { load(null); }; }; } public function unload():void{ if (cursor != null){ if (cursor.visible){ load(null); } else { cursor = null; }; }; } } }//package org.flixel.data
Section 31
//FlxMouse_ImgDefaultCursor (org.flixel.data.FlxMouse_ImgDefaultCursor) package org.flixel.data { import mx.core.*; public class FlxMouse_ImgDefaultCursor extends BitmapAsset { } }//package org.flixel.data
Section 32
//FlxPanel (org.flixel.data.FlxPanel) package org.flixel.data { import org.flixel.*; import flash.ui.*; public class FlxPanel extends FlxObject { protected var _close:FlxButton; protected var _digg:FlxButton; protected var _gameTitle:String; protected var _closed:Boolean; protected var _payPalID:String; protected var _donate:FlxButton; private var ImgClose:Class; protected var _topBar:FlxSprite; protected var _ty:Number; protected var _caption:FlxText; protected var _initialized:Boolean; protected var _twitter:FlxButton; protected var _delicious:FlxButton; protected var _stumble:FlxButton; private var ImgDelicious:Class; private var ImgTwitter:Class; protected var _mainBar:FlxSprite; protected var _gameURL:String; private var ImgStumble:Class; private var ImgReddit:Class; private var ImgDigg:Class; protected var _bottomBar:FlxSprite; protected var _payPalAmount:Number; protected var _s:Number; private var ImgDonate:Class; protected var _reddit:FlxButton; public function FlxPanel(){ ImgDonate = FlxPanel_ImgDonate; ImgStumble = FlxPanel_ImgStumble; ImgDigg = FlxPanel_ImgDigg; ImgReddit = FlxPanel_ImgReddit; ImgDelicious = FlxPanel_ImgDelicious; ImgTwitter = FlxPanel_ImgTwitter; ImgClose = FlxPanel_ImgClose; super(); y = -21; _ty = y; _closed = false; _initialized = false; _topBar = new FlxSprite(); _topBar.createGraphic(FlxG.width, 1, 2147483647); _topBar.scrollFactor.x = 0; _topBar.scrollFactor.y = 0; _mainBar = new FlxSprite(); _mainBar.createGraphic(FlxG.width, 19, 2130706432); _mainBar.scrollFactor.x = 0; _mainBar.scrollFactor.y = 0; _bottomBar = new FlxSprite(); _bottomBar.createGraphic(FlxG.width, 1, 2147483647); _bottomBar.scrollFactor.x = 0; _bottomBar.scrollFactor.y = 0; _donate = new FlxButton(3, 0, onDonate); _donate.loadGraphic(new FlxSprite(0, 0, ImgDonate)); _donate.scrollFactor.x = 0; _donate.scrollFactor.y = 0; _stumble = new FlxButton(((((((FlxG.width / 2) - 6) - 13) - 6) - 13) - 6), 0, onStumble); _stumble.loadGraphic(new FlxSprite(0, 0, ImgStumble)); _stumble.scrollFactor.x = 0; _stumble.scrollFactor.y = 0; _digg = new FlxButton(((((FlxG.width / 2) - 6) - 13) - 6), 0, onDigg); _digg.loadGraphic(new FlxSprite(0, 0, ImgDigg)); _digg.scrollFactor.x = 0; _digg.scrollFactor.y = 0; _reddit = new FlxButton(((FlxG.width / 2) - 6), 0, onReddit); _reddit.loadGraphic(new FlxSprite(0, 0, ImgReddit)); _reddit.scrollFactor.x = 0; _reddit.scrollFactor.y = 0; _delicious = new FlxButton((((FlxG.width / 2) + 7) + 6), 0, onDelicious); _delicious.loadGraphic(new FlxSprite(0, 0, ImgDelicious)); _delicious.scrollFactor.x = 0; _delicious.scrollFactor.y = 0; _twitter = new FlxButton((((((FlxG.width / 2) + 7) + 6) + 12) + 6), 0, onTwitter); _twitter.loadGraphic(new FlxSprite(0, 0, ImgTwitter)); _twitter.scrollFactor.x = 0; _twitter.scrollFactor.y = 0; _caption = new FlxText((FlxG.width / 2), 0, ((FlxG.width / 2) - 19), ""); _caption.alignment = "right"; _caption.scrollFactor.x = 0; _caption.scrollFactor.y = 0; _close = new FlxButton((FlxG.width - 16), 0, onClose); _close.loadGraphic(new FlxSprite(0, 0, ImgClose)); _close.scrollFactor.x = 0; _close.scrollFactor.y = 0; hide(); _s = 50; } public function onDelicious():void{ FlxU.openURL(((("http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=" + encodeURIComponent(_gameURL)) + "&amp;title=") + encodeURIComponent(_gameTitle))); } public function onTwitter():void{ FlxU.openURL(("http://twitter.com/home?status=Playing" + encodeURIComponent((((" " + _gameTitle) + " - ") + _gameURL)))); } public function setup(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{ _payPalID = _arg1; if (_payPalID.length <= 0){ _donate.visible = false; }; _payPalAmount = _arg2; _gameTitle = _arg3; _gameURL = _arg4; _caption.text = _arg5; _initialized = true; } public function onStumble():void{ FlxU.openURL(("http://www.stumbleupon.com/submit?url=" + encodeURIComponent(_gameURL))); } override public function render():void{ if (!_initialized){ return; }; if (_topBar.visible){ _topBar.render(); }; if (_mainBar.visible){ _mainBar.render(); }; if (_bottomBar.visible){ _bottomBar.render(); }; if (_donate.visible){ _donate.render(); }; if (_stumble.visible){ _stumble.render(); }; if (_digg.visible){ _digg.render(); }; if (_reddit.visible){ _reddit.render(); }; if (_delicious.visible){ _delicious.render(); }; if (_twitter.visible){ _twitter.render(); }; if (_caption.visible){ _caption.render(); }; if (_close.visible){ _close.render(); }; } public function onDigg():void{ FlxU.openURL(((("http://digg.com/submit?url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle))); } public function onReddit():void{ FlxU.openURL(("http://www.reddit.com/submit?url=" + encodeURIComponent(_gameURL))); } public function onDonate():void{ FlxU.openURL(((((("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + encodeURIComponent(_payPalID)) + "&item_name=") + encodeURIComponent(((_gameTitle + " Contribution (") + _gameURL))) + ")&currency_code=USD&amount=") + _payPalAmount)); } override public function update():void{ if (!_initialized){ return; }; if (_ty != y){ if (y < _ty){ y = (y + (FlxG.elapsed * _s)); if (y > _ty){ y = _ty; }; } else { y = (y - (FlxG.elapsed * _s)); if (y < _ty){ y = _ty; }; }; }; if ((((y <= -21)) || ((y > FlxG.height)))){ visible = false; }; _topBar.y = y; _mainBar.y = (y + 1); _bottomBar.y = (y + 20); _donate.y = (y + 4); _stumble.y = (y + 4); _digg.y = (y + 4); _reddit.y = (y + 4); _delicious.y = (y + 5); _twitter.y = (y + 4); _caption.y = (y + 4); _close.y = (y + 4); if (_donate.active){ _donate.update(); }; if (_stumble.active){ _stumble.update(); }; if (_digg.active){ _digg.update(); }; if (_reddit.active){ _reddit.update(); }; if (_delicious.active){ _delicious.update(); }; if (_twitter.active){ _twitter.update(); }; if (_caption.active){ _caption.update(); }; if (_close.active){ _close.update(); }; } public function show(_arg1:Boolean=true):void{ if (!_initialized){ FlxG.log("SUPPORT PANEL ERROR: Uninitialized.\nYou forgot to call FlxGame.setupSupportPanel()\nfrom your game constructor."); return; }; if (_closed){ return; }; if (_arg1){ y = -21; _ty = -1; } else { y = FlxG.height; _ty = (FlxG.height - 20); }; Mouse.show(); visible = true; } public function onClose():void{ _closed = true; hide(); } public function hide():void{ if (y < 0){ _ty = -21; } else { _ty = FlxG.height; }; Mouse.hide(); visible = false; } } }//package org.flixel.data
Section 33
//FlxPanel_ImgClose (org.flixel.data.FlxPanel_ImgClose) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgClose extends BitmapAsset { } }//package org.flixel.data
Section 34
//FlxPanel_ImgDelicious (org.flixel.data.FlxPanel_ImgDelicious) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgDelicious extends BitmapAsset { } }//package org.flixel.data
Section 35
//FlxPanel_ImgDigg (org.flixel.data.FlxPanel_ImgDigg) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgDigg extends BitmapAsset { } }//package org.flixel.data
Section 36
//FlxPanel_ImgDonate (org.flixel.data.FlxPanel_ImgDonate) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgDonate extends BitmapAsset { } }//package org.flixel.data
Section 37
//FlxPanel_ImgReddit (org.flixel.data.FlxPanel_ImgReddit) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgReddit extends BitmapAsset { } }//package org.flixel.data
Section 38
//FlxPanel_ImgStumble (org.flixel.data.FlxPanel_ImgStumble) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgStumble extends BitmapAsset { } }//package org.flixel.data
Section 39
//FlxPanel_ImgTwitter (org.flixel.data.FlxPanel_ImgTwitter) package org.flixel.data { import mx.core.*; public class FlxPanel_ImgTwitter extends BitmapAsset { } }//package org.flixel.data
Section 40
//FlxPause (org.flixel.data.FlxPause) package org.flixel.data { import org.flixel.*; public class FlxPause extends FlxGroup { private var ImgKeyP:Class; private var ImgKey0:Class; private var ImgKeyPlus:Class; private var ImgKeyMinus:Class; public function FlxPause(){ var _local2:uint; ImgKeyMinus = FlxPause_ImgKeyMinus; ImgKeyPlus = FlxPause_ImgKeyPlus; ImgKey0 = FlxPause_ImgKey0; ImgKeyP = FlxPause_ImgKeyP; super(); scrollFactor.x = 0; scrollFactor.y = 0; var _local1:uint = 80; _local2 = 92; x = ((FlxG.width - _local1) / 2); y = ((FlxG.height - _local2) / 2); add(new FlxSprite().createGraphic(_local1, _local2, 2852126720, true), true); (add(new FlxText(0, 0, _local1, "this game is"), true) as FlxText).alignment = "center"; add(new FlxText(0, 10, _local1, "PAUSED").setFormat(null, 16, 0xFFFFFF, "center"), true); add(new FlxSprite(4, 36, ImgKeyP), true); add(new FlxText(16, 36, (_local1 - 16), "Pause Game"), true); add(new FlxSprite(4, 50, ImgKey0), true); add(new FlxText(16, 50, (_local1 - 16), "Mute Sound"), true); add(new FlxSprite(4, 64, ImgKeyMinus), true); add(new FlxText(16, 64, (_local1 - 16), "Sound Down"), true); add(new FlxSprite(4, 78, ImgKeyPlus), true); add(new FlxText(16, 78, (_local1 - 16), "Sound Up"), true); } } }//package org.flixel.data
Section 41
//FlxPause_ImgKey0 (org.flixel.data.FlxPause_ImgKey0) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKey0 extends BitmapAsset { } }//package org.flixel.data
Section 42
//FlxPause_ImgKeyMinus (org.flixel.data.FlxPause_ImgKeyMinus) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyMinus extends BitmapAsset { } }//package org.flixel.data
Section 43
//FlxPause_ImgKeyP (org.flixel.data.FlxPause_ImgKeyP) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyP extends BitmapAsset { } }//package org.flixel.data
Section 44
//FlxPause_ImgKeyPlus (org.flixel.data.FlxPause_ImgKeyPlus) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyPlus extends BitmapAsset { } }//package org.flixel.data
Section 45
//FlxQuake (org.flixel.data.FlxQuake) package org.flixel.data { import org.flixel.*; public class FlxQuake { public var y:int; protected var _timer:Number; protected var _intensity:Number; public var x:int; protected var _zoom:uint; public function FlxQuake(_arg1:uint){ _zoom = _arg1; start(0); } public function update():void{ if (_timer > 0){ _timer = (_timer - FlxG.elapsed); if (_timer <= 0){ _timer = 0; x = 0; y = 0; } else { x = (((((Math.random() * _intensity) * FlxG.width) * 2) - (_intensity * FlxG.width)) * _zoom); y = (((((Math.random() * _intensity) * FlxG.height) * 2) - (_intensity * FlxG.height)) * _zoom); }; }; } public function start(_arg1:Number=0.05, _arg2:Number=0.5):void{ stop(); _intensity = _arg1; _timer = _arg2; } public function stop():void{ x = 0; y = 0; _intensity = 0; _timer = 0; } } }//package org.flixel.data
Section 46
//FlxButton (org.flixel.FlxButton) package org.flixel { import flash.events.*; public class FlxButton extends FlxGroup { protected var _on:FlxSprite; protected var _offT:FlxText; protected var _initialized:Boolean; protected var _onT:FlxText; protected var _pressed:Boolean; protected var _callback:Function; protected var _off:FlxSprite; protected var _onToggle:Boolean; protected var _sf:FlxPoint; public function FlxButton(_arg1:int, _arg2:int, _arg3:Function){ x = _arg1; y = _arg2; width = 100; height = 20; _off = new FlxSprite().createGraphic(width, height, 4286545791); _off.solid = false; add(_off, true); _on = new FlxSprite().createGraphic(width, height, 4294967295); _on.solid = false; add(_on, true); _offT = null; _onT = null; _callback = _arg3; _onToggle = false; _pressed = false; _initialized = false; _sf = null; } protected function onMouseUp(_arg1:MouseEvent):void{ if (((((((((!(exists)) || (!(visible)))) || (!(active)))) || (!(FlxG.mouse.justReleased())))) || ((_callback == null)))){ return; }; if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){ _callback(); }; } override public function update():void{ if (!_initialized){ if (FlxG.stage != null){ FlxG.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); _initialized = true; }; }; super.update(); visibility(false); if (overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){ if (!FlxG.mouse.pressed()){ _pressed = false; } else { if (!_pressed){ _pressed = true; }; }; visibility(!(_pressed)); }; if (_onToggle){ visibility(_off.visible); }; } protected function visibility(_arg1:Boolean):void{ if (_arg1){ _off.visible = false; if (_offT != null){ _offT.visible = false; }; _on.visible = true; if (_onT != null){ _onT.visible = true; }; } else { _on.visible = false; if (_onT != null){ _onT.visible = false; }; _off.visible = true; if (_offT != null){ _offT.visible = true; }; }; } public function get on():Boolean{ return (_onToggle); } public function loadGraphic(_arg1:FlxSprite, _arg2:FlxSprite=null):FlxButton{ _off = (replace(_off, _arg1) as FlxSprite); if (_arg2 == null){ if (_on != _off){ remove(_on); }; _on = _off; } else { _on = (replace(_on, _arg2) as FlxSprite); }; _on.solid = (_off.solid = false); _off.scrollFactor = scrollFactor; _on.scrollFactor = scrollFactor; width = _off.width; height = _off.height; refreshHulls(); return (this); } public function loadText(_arg1:FlxText, _arg2:FlxText=null):FlxButton{ if (_arg1 != null){ if (_offT == null){ _offT = _arg1; add(_offT); } else { _offT = (replace(_offT, _arg1) as FlxText); }; }; if (_arg2 == null){ _onT = _offT; } else { if (_onT == null){ _onT = _arg2; add(_onT); } else { _onT = (replace(_onT, _arg2) as FlxText); }; }; _offT.scrollFactor = scrollFactor; _onT.scrollFactor = scrollFactor; return (this); } override public function destroy():void{ if (FlxG.stage != null){ FlxG.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); }; } public function set on(_arg1:Boolean):void{ _onToggle = _arg1; } } }//package org.flixel
Section 47
//FlxEmitter (org.flixel.FlxEmitter) package org.flixel { public class FlxEmitter extends FlxGroup { public var maxRotation:Number; public var delay:Number; public var quantity:uint; protected var _timer:Number; public var gravity:Number; public var particleDrag:FlxPoint; public var maxParticleSpeed:FlxPoint; public var on:Boolean; protected var _explode:Boolean; protected var _particle:uint; public var minParticleSpeed:FlxPoint; public var minRotation:Number; protected var _counter:uint; public function FlxEmitter(_arg1:Number=0, _arg2:Number=0){ x = _arg1; y = _arg2; width = 0; height = 0; minParticleSpeed = new FlxPoint(-100, -100); maxParticleSpeed = new FlxPoint(100, 100); minRotation = -360; maxRotation = 360; gravity = 400; particleDrag = new FlxPoint(); delay = 0.1; quantity = 0; _counter = 0; _explode = true; exists = false; on = false; } public function setRotation(_arg1:Number=0, _arg2:Number=0):void{ minRotation = _arg1; maxRotation = _arg2; } override public function update():void{ super.update(); updateEmitter(); } public function setYSpeed(_arg1:Number=0, _arg2:Number=0):void{ minParticleSpeed.y = _arg1; maxParticleSpeed.y = _arg2; } public function stop(_arg1:Number=3):void{ _explode = true; delay = _arg1; if (delay < 0){ delay = -(_arg1); }; on = false; } public function setSize(_arg1:uint, _arg2:uint):void{ width = _arg1; height = _arg2; } public function at(_arg1:FlxObject):void{ x = (_arg1.x + _arg1.origin.x); y = (_arg1.y + _arg1.origin.y); } override protected function updateMembers():void{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((((!((_local1 == null))) && (_local1.exists))) && (_local1.active))){ _local1.update(); }; _local3++; }; } public function start(_arg1:Boolean=true, _arg2:Number=0, _arg3:uint=0):void{ if (members.length <= 0){ FlxG.log("WARNING: there are no sprites loaded in your emitter.\nAdd some to FlxEmitter.members or use FlxEmitter.createSprites()."); return; }; _explode = _arg1; if (!_explode){ _counter = 0; }; if (!exists){ _particle = 0; }; exists = true; visible = true; active = true; dead = false; on = true; _timer = 0; if (quantity == 0){ quantity = _arg3; }; if (_arg2 != 0){ delay = _arg2; }; if (delay < 0){ delay = -(delay); }; } protected function updateEmitter():void{ var _local1:uint; var _local2:uint; if (_explode){ _timer = (_timer + FlxG.elapsed); if ((((delay > 0)) && ((_timer > delay)))){ kill(); return; }; if (on){ on = false; _local2 = members.length; if (quantity > 0){ _local2 = quantity; }; _local2 = (_local2 + _particle); _local1 = _particle; while (_local1 < _local2) { emitParticle(); _local1++; }; }; return; }; if (!on){ return; }; _timer = (_timer + FlxG.elapsed); while ((((_timer > delay)) && ((((quantity <= 0)) || ((_counter < quantity)))))) { _timer = (_timer - delay); emitParticle(); }; } override public function kill():void{ super.kill(); on = false; } public function setXSpeed(_arg1:Number=0, _arg2:Number=0):void{ minParticleSpeed.x = _arg1; maxParticleSpeed.x = _arg2; } public function createSprites(_arg1:Class, _arg2:uint=50, _arg3:uint=16, _arg4:Boolean=true, _arg5:Number=0):FlxEmitter{ var _local6:uint; var _local7:FlxSprite; var _local9:Number; var _local10:Number; members = new Array(); var _local8:uint = 1; if (_arg4){ _local7 = new FlxSprite(0, 0, _arg1); _local8 = (_local7.width / _local7.height); }; var _local11:uint; while (_local11 < _arg2) { _local7 = new FlxSprite(); if (_arg4){ _local6 = (FlxU.random() * _local8); if (_arg3 > 0){ _local7.loadRotatedGraphic(_arg1, _arg3, _local6); } else { _local7.loadGraphic(_arg1, true); _local7.frame = _local6; }; } else { if (_arg3 > 0){ _local7.loadRotatedGraphic(_arg1, _arg3); } else { _local7.loadGraphic(_arg1); }; }; if (_arg5 > 0){ _local9 = _local7.width; _local10 = _local7.height; _local7.width = (_local7.width * _arg5); _local7.height = (_local7.height * _arg5); _local7.offset.x = ((_local9 - _local7.width) / 2); _local7.offset.y = ((_local10 - _local7.height) / 2); _local7.solid = true; } else { _local7.solid = false; }; _local7.exists = false; _local7.scrollFactor = scrollFactor; add(_local7); _local11++; }; return (this); } public function emitParticle():void{ _counter++; var _local1:FlxSprite = (members[_particle] as FlxSprite); if (_local1 != null){ _local1.visible = true; _local1.exists = true; _local1.active = true; _local1.x = ((x - (_local1.width >> 1)) + (FlxU.random() * width)); _local1.y = ((y - (_local1.height >> 1)) + (FlxU.random() * height)); _local1.velocity.x = minParticleSpeed.x; if (minParticleSpeed.x != maxParticleSpeed.x){ _local1.velocity.x = (_local1.velocity.x + (FlxU.random() * (maxParticleSpeed.x - minParticleSpeed.x))); }; _local1.velocity.y = minParticleSpeed.y; if (minParticleSpeed.y != maxParticleSpeed.y){ _local1.velocity.y = (_local1.velocity.y + (FlxU.random() * (maxParticleSpeed.y - minParticleSpeed.y))); }; _local1.acceleration.y = gravity; _local1.angularVelocity = minRotation; if (minRotation != maxRotation){ _local1.angularVelocity = (_local1.angularVelocity + (FlxU.random() * (maxRotation - minRotation))); }; if (_local1.angularVelocity != 0){ _local1.angle = ((FlxU.random() * 360) - 180); }; _local1.drag.x = particleDrag.x; _local1.drag.y = particleDrag.y; _local1.visible = true; _particle++; if (_particle >= members.length){ _particle = 0; }; _local1.onEmit(); }; } } }//package org.flixel
Section 48
//FlxG (org.flixel.FlxG) package org.flixel { import flash.display.*; import flash.geom.*; import org.flixel.data.*; public class FlxG { public static var panel:FlxPanel; protected static var _mute:Boolean; public static var kong:FlxKong; public static var scores:Array; public static var music:FlxSound; public static var height:uint; protected static var _volume:Number; public static var buffer:BitmapData; public static var sounds:Array; public static var debug:Boolean; public static var LIBRARY_MINOR_VERSION:uint = 23; public static var LIBRARY_MAJOR_VERSION:uint = 2; public static var levels:Array; public static var fade:FlxFade; public static var timeScale:Number; protected static var _cache:Object; public static var level:int; public static var elapsed:Number; public static var score:int; public static var save:int; public static var saves:Array; protected static var _scrollTarget:Point; public static var mouse:FlxMouse; public static var followTarget:FlxObject; public static var followLead:Point; public static var LIBRARY_NAME:String = "flixel"; public static var width:uint; public static var followLerp:Number; public static var scroll:Point; protected static var _game:FlxGame; public static var quake:FlxQuake; public static var followMin:Point; public static var flash:FlxFlash; public static var followMax:Point; public static var keys:FlxKeyboard; protected static var _pause:Boolean; public static function get stage():Stage{ if (((!((_game._state == null))) && (!((_game._state.parent == null))))){ return (_game._state.parent.stage); }; return (null); } protected static function changeSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.updateTransform(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.updateTransform(); }; _local3++; }; } public static function get mute():Boolean{ return (_mute); } public static function get volume():Number{ return (_volume); } static function doFollow():void{ if (followTarget != null){ _scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x); _scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y); if (((!((followLead == null))) && ((followTarget is FlxSprite)))){ _scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x)); _scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y)); }; scroll.x = (scroll.x + (((_scrollTarget.x - scroll.x) * followLerp) * FlxG.elapsed)); scroll.y = (scroll.y + (((_scrollTarget.y - scroll.y) * followLerp) * FlxG.elapsed)); if (followMin != null){ if (scroll.x > followMin.x){ scroll.x = followMin.x; }; if (scroll.y > followMin.y){ scroll.y = followMin.y; }; }; if (followMax != null){ if (scroll.x < followMax.x){ scroll.x = followMax.x; }; if (scroll.y < followMax.y){ scroll.y = followMax.y; }; }; }; } public static function getMuteValue():uint{ if (_mute){ return (0); }; return (1); } public static function addBitmap(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null):BitmapData{ var _local8:uint; var _local9:String; var _local10:BitmapData; var _local11:Matrix; var _local5:Boolean; var _local6:String = _arg4; if (_local6 == null){ _local6 = String(_arg1); if (((((_arg3) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){ _local8 = 0; do { var _temp1 = _local8; _local8 = (_local8 + 1); _local9 = (_local6 + _temp1); } while (((!((_cache[_local9] == undefined))) && (!((_cache[_local9] == null))))); _local6 = _local9; }; }; if (!checkBitmapCache(_local6)){ _cache[_local6] = new (_arg1).bitmapData; if (_arg2){ _local5 = true; }; }; var _local7:BitmapData = _cache[_local6]; if (((((!(_local5)) && (_arg2))) && ((_local7.width == new (_arg1).bitmapData.width)))){ _local5 = true; }; if (_local5){ _local10 = new BitmapData((_local7.width << 1), _local7.height, true, 0); _local10.draw(_local7); _local11 = new Matrix(); _local11.scale(-1, 1); _local11.translate(_local10.width, 0); _local10.draw(_local7, _local11); _local7 = _local10; }; return (_local7); } public static function set state(_arg1:FlxState):void{ _game.switchState(_arg1); } public static function set mute(_arg1:Boolean):void{ _mute = _arg1; changeSounds(); } public static function play(_arg1:Class, _arg2:Number=1, _arg3:Boolean=false):FlxSound{ var _local4:uint = sounds.length; var _local5:uint; while (_local5 < _local4) { if (!(sounds[_local5] as FlxSound).active){ break; }; _local5++; }; if (sounds[_local5] == null){ sounds[_local5] = new FlxSound(); }; var _local6:FlxSound = sounds[_local5]; _local6.loadEmbedded(_arg1, _arg3); _local6.volume = _arg2; _local6.play(); return (_local6); } public static function set volume(_arg1:Number):void{ _volume = _arg1; if (_volume < 0){ _volume = 0; } else { if (_volume > 1){ _volume = 1; }; }; changeSounds(); } static function setGameData(_arg1:FlxGame, _arg2:uint, _arg3:uint, _arg4:uint):void{ _game = _arg1; _cache = new Object(); width = _arg2; height = _arg3; _mute = false; _volume = 0.5; sounds = new Array(); mouse = new FlxMouse(); keys = new FlxKeyboard(); scroll = null; _scrollTarget = null; unfollow(); FlxG.levels = new Array(); FlxG.scores = new Array(); level = 0; score = 0; FlxU.seed = NaN; kong = null; pause = false; timeScale = 1; panel = new FlxPanel(); quake = new FlxQuake(_arg4); flash = new FlxFlash(); fade = new FlxFade(); FlxU.setWorldBounds(); } public static function playMusic(_arg1:Class, _arg2:Number=1):void{ if (music == null){ music = new FlxSound(); } else { if (music.active){ music.stop(); }; }; music.loadEmbedded(_arg1, true); music.volume = _arg2; music.survive = true; music.play(); } public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:String=null):BitmapData{ var _local7:uint; var _local8:String; var _local6:String = _arg5; if (_local6 == null){ _local6 = ((((_arg1 + "x") + _arg2) + ":") + _arg3); if (((((_arg4) && (!((_cache[_local6] == undefined))))) && (!((_cache[_local6] == null))))){ _local7 = 0; do { var _temp1 = _local7; _local7 = (_local7 + 1); _local8 = (_local6 + _temp1); } while (((!((_cache[_local8] == undefined))) && (!((_cache[_local8] == null))))); _local6 = _local8; }; }; if (!checkBitmapCache(_local6)){ _cache[_local6] = new BitmapData(_arg1, _arg2, true, _arg3); }; return (_cache[_local6]); } public static function log(_arg1:Object):void{ if (((!((_game == null))) && (!((_game._console == null))))){ _game._console.log(((_arg1)==null) ? "ERROR: null object" : _arg1.toString()); }; } public static function checkBitmapCache(_arg1:String):Boolean{ return (((!((_cache[_arg1] == undefined))) && (!((_cache[_arg1] == null))))); } static function updateSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.update(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.update(); }; _local3++; }; } static function updateInput():void{ keys.update(); mouse.update(state.mouseX, state.mouseY, scroll.x, scroll.y); } public static function stream(_arg1:String, _arg2:Number=1, _arg3:Boolean=false):FlxSound{ var _local4:uint = sounds.length; var _local5:uint; while (_local5 < _local4) { if (!(sounds[_local5] as FlxSound).active){ break; }; _local5++; }; if (sounds[_local5] == null){ sounds[_local5] = new FlxSound(); }; var _local6:FlxSound = sounds[_local5]; _local6.loadStream(_arg1, _arg3); _local6.volume = _arg2; _local6.play(); return (_local6); } static function unfollow():void{ followTarget = null; followLead = null; followLerp = 1; followMin = null; followMax = null; if (scroll == null){ scroll = new Point(); } else { scroll.x = (scroll.y = 0); }; if (_scrollTarget == null){ _scrollTarget = new Point(); } else { _scrollTarget.x = (_scrollTarget.y = 0); }; } public static function get state():FlxState{ return (_game._state); } protected static function playSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.play(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.play(); }; _local3++; }; } public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{ followLead = new Point(_arg1, _arg2); } public static function follow(_arg1:FlxObject, _arg2:Number=1):void{ followTarget = _arg1; followLerp = _arg2; _scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x); _scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y); scroll.x = _scrollTarget.x; scroll.y = _scrollTarget.y; doFollow(); } public static function resetInput():void{ keys.reset(); mouse.reset(); } public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0, _arg5:Boolean=true):void{ followMin = new Point(-(_arg1), -(_arg2)); followMax = new Point((-(_arg3) + width), (-(_arg4) + height)); if (followMax.x > followMin.x){ followMax.x = followMin.x; }; if (followMax.y > followMin.y){ followMax.y = followMin.y; }; if (_arg5){ FlxU.setWorldBounds(-(_arg1), -(_arg2), (-(_arg1) + _arg3), (-(_arg2) + _arg4)); }; doFollow(); } protected static function pauseSounds():void{ var _local1:FlxSound; if (((!((music == null))) && (music.active))){ music.pause(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { _local1 = (sounds[_local3] as FlxSound); if (((!((_local1 == null))) && (_local1.active))){ _local1.pause(); }; _local3++; }; } static function destroySounds(_arg1:Boolean=false):void{ var _local2:FlxSound; if (sounds == null){ return; }; if (((!((music == null))) && (((_arg1) || (!(music.survive)))))){ music.destroy(); }; var _local3:uint = sounds.length; var _local4:uint; while (_local4 < _local3) { _local2 = (sounds[_local4] as FlxSound); if (((!((_local2 == null))) && (((_arg1) || (!(_local2.survive)))))){ _local2.destroy(); }; _local4++; }; } public static function set pause(_arg1:Boolean):void{ var _local2:Boolean = _pause; _pause = _arg1; if (_pause != _local2){ if (_pause){ _game.pauseGame(); pauseSounds(); } else { _game.unpauseGame(); playSounds(); }; }; } public static function get pause():Boolean{ return (_pause); } } }//package org.flixel
Section 49
//FlxGame (org.flixel.FlxGame) package org.flixel { import flash.events.*; import flash.display.*; import flash.geom.*; import org.flixel.data.*; import flash.text.*; import flash.utils.*; import flash.ui.*; public class FlxGame extends Sprite { const MAX_ELAPSED:Number = 0.0333; var _bmpFront:Bitmap; protected var SndFlixel:Class; var _state:FlxState; protected var SndBeep:Class; var _console:FlxConsole; var _created:Boolean; var _zoom:uint; var _gameXOffset:int; var _elapsed:Number; var _flipped:Boolean; var _total:uint; var _soundTrayBars:Array; public var useDefaultHotKeys:Boolean; protected var junk:String;// = "FlxGame_junk" var _zeroPoint:Point; var _bmpBack:Bitmap; var _iState:Class; var _paused:Boolean; var _gameYOffset:int; var _buffer:Sprite; var _soundTray:Sprite; var _frame:Class; var _r:Rectangle; public var pause:FlxGroup; var _soundTrayTimer:Number; public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2){ SndBeep = FlxGame_SndBeep; SndFlixel = FlxGame_SndFlixel; super(); Mouse.hide(); _zoom = _arg4; FlxState.bgColor = 4278190080; FlxG.setGameData(this, _arg1, _arg2, _arg4); _elapsed = 0; _total = 0; pause = new FlxPause(); _state = null; _iState = _arg3; _zeroPoint = new Point(); useDefaultHotKeys = true; _frame = null; _gameXOffset = 0; _gameYOffset = 0; _paused = false; _created = false; addEventListener(Event.ENTER_FRAME, onEnterFrame); } function pauseGame():void{ if (((!((x == 0))) || (!((y == 0))))){ x = 0; y = 0; }; if (!_flipped){ _bmpBack.bitmapData.copyPixels(_bmpFront.bitmapData, _r, _zeroPoint); } else { _bmpFront.bitmapData.copyPixels(_bmpBack.bitmapData, _r, _zeroPoint); }; Mouse.show(); _paused = true; stage.frameRate = 10; } function unpauseGame():void{ if (!FlxG.panel.visible){ Mouse.hide(); }; FlxG.resetInput(); _paused = false; stage.frameRate = 60; } protected function onFocus(_arg1:Event=null):void{ if (FlxG.pause){ FlxG.pause = false; }; } protected function onKeyUp(_arg1:KeyboardEvent):void{ var _local2:int; var _local3:String; if ((((_arg1.keyCode == 192)) || ((_arg1.keyCode == 220)))){ _console.toggle(); return; }; if (useDefaultHotKeys){ _local2 = _arg1.keyCode; _local3 = String.fromCharCode(_arg1.charCode); switch (_local2){ case 48: case 96: FlxG.mute = !(FlxG.mute); showSoundTray(); return; case 109: case 189: FlxG.mute = false; FlxG.volume = (FlxG.volume - 0.1); showSoundTray(); return; case 107: case 187: FlxG.mute = false; FlxG.volume = (FlxG.volume + 0.1); showSoundTray(); return; case 80: FlxG.pause = !(FlxG.pause); default: break; }; }; FlxG.keys.handleKeyUp(_arg1); } public function switchState(_arg1:FlxState):void{ FlxG.panel.hide(); FlxG.unfollow(); FlxG.resetInput(); FlxG.destroySounds(); FlxG.flash.stop(); FlxG.fade.stop(); FlxG.quake.stop(); _buffer.x = 0; _buffer.y = 0; _buffer.addChild(_arg1); if (_state != null){ _state.destroy(); _buffer.swapChildren(_arg1, _state); _buffer.removeChild(_state); }; _state = _arg1; _state.create(); } protected function addFrame(_arg1:Class, _arg2:uint, _arg3:uint):FlxGame{ _frame = _arg1; _gameXOffset = _arg2; _gameYOffset = _arg3; return (this); } protected function onEnterFrame(_arg1:Event):void{ var _local2:uint; var _local3:FlxSave; var _local5:String; var _local6:String; var _local7:Bitmap; var _local8:TextField; var _local9:uint; var _local10:uint; var _local11:Bitmap; var _local4:uint = getTimer(); _elapsed = ((_local4 - _total) / 1000); if (_created){ _console.lastElapsed = _elapsed; }; _total = _local4; FlxG.elapsed = _elapsed; if (FlxG.elapsed > MAX_ELAPSED){ FlxG.elapsed = MAX_ELAPSED; }; FlxG.elapsed = (FlxG.elapsed * FlxG.timeScale); if (_soundTray != null){ if (_soundTrayTimer > 0){ _soundTrayTimer = (_soundTrayTimer - _elapsed); } else { if (_soundTray.y > -(_soundTray.height)){ _soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2)); if (_soundTray.y <= -(_soundTray.height)){ _soundTray.visible = false; _local3 = new FlxSave(); if (_local3.bind("flixel")){ if (_local3.data.sound == null){ _local3.data.sound = new Object(); }; _local3.data.mute = FlxG.mute; _local3.data.volume = FlxG.volume; _local3.forceSave(); }; }; }; }; }; if (_created){ FlxG.panel.update(); _console.update(); FlxG.updateInput(); FlxG.updateSounds(); if (_paused){ pause.update(); if (_flipped){ FlxG.buffer.copyPixels(_bmpFront.bitmapData, _r, _zeroPoint); } else { FlxG.buffer.copyPixels(_bmpBack.bitmapData, _r, _zeroPoint); }; pause.render(); } else { if (_flipped){ FlxG.buffer = _bmpFront.bitmapData; } else { FlxG.buffer = _bmpBack.bitmapData; }; FlxState.screen.unsafeBind(FlxG.buffer); _state.preProcess(); FlxG.doFollow(); _state.update(); if (FlxG.flash.exists){ FlxG.flash.update(); }; if (FlxG.fade.exists){ FlxG.fade.update(); }; FlxG.quake.update(); _buffer.x = FlxG.quake.x; _buffer.y = FlxG.quake.y; _state.render(); if (FlxG.flash.exists){ FlxG.flash.render(); }; if (FlxG.fade.exists){ FlxG.fade.render(); }; if (FlxG.panel.visible){ FlxG.panel.render(); }; if (FlxG.mouse.cursor != null){ if (FlxG.mouse.cursor.active){ FlxG.mouse.cursor.update(); }; if (FlxG.mouse.cursor.visible){ FlxG.mouse.cursor.render(); }; }; _state.postProcess(); _bmpBack.visible = !((_bmpFront.visible = _flipped)); _flipped = !(_flipped); }; } else { if (root != null){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stage.frameRate = 60; _buffer = new Sprite(); _buffer.scaleX = _zoom; _buffer.scaleY = _zoom; addChild(_buffer); _bmpBack = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, FlxState.bgColor)); _bmpBack.x = _gameXOffset; _bmpBack.y = _gameYOffset; _buffer.addChild(_bmpBack); _bmpFront = new Bitmap(new BitmapData(_bmpBack.width, _bmpBack.height, true, FlxState.bgColor)); _bmpFront.x = _bmpBack.x; _bmpFront.y = _bmpBack.y; _buffer.addChild(_bmpFront); _flipped = false; _r = new Rectangle(0, 0, _bmpFront.width, _bmpFront.height); _console = new FlxConsole(_gameXOffset, _gameYOffset, _zoom); addChild(_console); _local5 = ((((FlxG.LIBRARY_NAME + " v") + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION); if (FlxG.debug){ _local5 = (_local5 + " [debug]"); } else { _local5 = (_local5 + " [release]"); }; _local6 = ""; _local2 = 0; while (_local2 < (_local5.length + 32)) { _local6 = (_local6 + "-"); _local2++; }; FlxG.log(_local5); FlxG.log(_local6); stage.addEventListener(KeyboardEvent.KEY_DOWN, FlxG.keys.handleKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); stage.addEventListener(MouseEvent.MOUSE_DOWN, FlxG.mouse.handleMouseDown); stage.addEventListener(MouseEvent.MOUSE_UP, FlxG.mouse.handleMouseUp); stage.addEventListener(MouseEvent.MOUSE_OUT, FlxG.mouse.handleMouseOut); stage.addEventListener(MouseEvent.MOUSE_OVER, FlxG.mouse.handleMouseOver); stage.addEventListener(Event.DEACTIVATE, onFocusLost); stage.addEventListener(Event.ACTIVATE, onFocus); _soundTray = new Sprite(); _soundTray.visible = false; _soundTray.scaleX = 2; _soundTray.scaleY = 2; _local7 = new Bitmap(new BitmapData(80, 30, true, 2130706432)); _soundTray.x = (((_gameXOffset + (FlxG.width / 2)) * _zoom) - ((_local7.width / 2) * _soundTray.scaleX)); _soundTray.addChild(_local7); _local8 = new TextField(); _local8.width = _local7.width; _local8.height = _local7.height; _local8.multiline = true; _local8.wordWrap = true; _local8.selectable = false; _local8.embedFonts = true; _local8.antiAliasType = AntiAliasType.NORMAL; _local8.gridFitType = GridFitType.PIXEL; _local8.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center"); _soundTray.addChild(_local8); _local8.text = "VOLUME"; _local8.y = 16; _local9 = 10; _local10 = 14; _soundTrayBars = new Array(); _local2 = 0; while (_local2 < 10) { _local7 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF)); _local7.x = _local9; _local7.y = _local10; _soundTrayBars[_soundTrayBars.length] = _soundTray.addChild(_local7); _local9 = (_local9 + 6); _local10--; _local2++; }; addChild(_soundTray); if (_frame != null){ _local11 = new _frame(); _local11.scaleX = _zoom; _local11.scaleY = _zoom; addChild(_local11); }; _local3 = new FlxSave(); if (((_local3.bind("flixel")) && (!((_local3.data.sound == null))))){ if (_local3.data.volume != null){ FlxG.volume = _local3.data.volume; }; if (_local3.data.mute != null){ FlxG.mute = _local3.data.mute; }; showSoundTray(true); }; _created = true; switchState(new _iState()); }; }; } public function showSoundTray(_arg1:Boolean=false):void{ if (!_arg1){ FlxG.play(SndBeep); }; _soundTrayTimer = 1; _soundTray.y = (_gameYOffset * _zoom); _soundTray.visible = true; var _local2:uint = Math.round((FlxG.volume * 10)); if (FlxG.mute){ _local2 = 0; }; var _local3:uint; while (_local3 < _soundTrayBars.length) { if (_local3 < _local2){ _soundTrayBars[_local3].alpha = 1; } else { _soundTrayBars[_local3].alpha = 0.5; }; _local3++; }; } protected function onFocusLost(_arg1:Event=null):void{ FlxG.pause = true; } } }//package org.flixel
Section 50
//FlxGame_junk (org.flixel.FlxGame_junk) package org.flixel { import mx.core.*; public class FlxGame_junk extends FontAsset { } }//package org.flixel
Section 51
//FlxGame_SndBeep (org.flixel.FlxGame_SndBeep) package org.flixel { import mx.core.*; public class FlxGame_SndBeep extends SoundAsset { } }//package org.flixel
Section 52
//FlxGame_SndFlixel (org.flixel.FlxGame_SndFlixel) package org.flixel { import mx.core.*; public class FlxGame_SndFlixel extends SoundAsset { } }//package org.flixel
Section 53
//FlxGroup (org.flixel.FlxGroup) package org.flixel { public class FlxGroup extends FlxObject { public var members:Array; protected var _first:Boolean; protected var _last:FlxPoint; public function FlxGroup(){ _group = true; solid = false; members = new Array(); _last = new FlxPoint(); _first = true; } public function getFirstExtant():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((!((_local1 == null))) && (_local1.exists))){ return (_local1); }; _local3++; }; return (null); } override public function destroy():void{ destroyMembers(); super.destroy(); } public function getFirstAlive():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((((!((_local1 == null))) && (_local1.exists))) && (!(_local1.dead)))){ return (_local1); }; _local3++; }; return (null); } public function remove(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{ var _local3:int = members.indexOf(_arg1); if ((((_local3 < 0)) || ((_local3 >= members.length)))){ return (null); }; if (_arg2){ members.splice(_local3, 1); } else { members[_local3] = null; }; return (_arg1); } override public function update():void{ saveOldPosition(); updateMotion(); updateMembers(); updateFlickering(); } public function resetFirstAvail(_arg1:Number=0, _arg2:Number=0):Boolean{ var _local3:FlxObject = getFirstAvail(); if (_local3 == null){ return (false); }; _local3.reset(_arg1, _arg2); return (true); } override public function reset(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local6:FlxObject; saveOldPosition(); super.reset(_arg1, _arg2); var _local5:Boolean; if (((!((x == _last.x))) || (!((y == _last.y))))){ _local5 = true; _local3 = (x - _last.x); _local4 = (y - _last.y); }; var _local7:uint = members.length; var _local8:uint; while (_local8 < _local7) { _local6 = (members[_local8] as FlxObject); if (((!((_local6 == null))) && (_local6.exists))){ if (_local5){ if (_local6._group){ _local6.reset((_local6.x + _local3), (_local6.y + _local4)); } else { _local6.x = (_local6.x + _local3); _local6.y = (_local6.y + _local4); if (solid){ _local6.colHullX.width = (_local6.colHullX.width + ((_local3)>0) ? _local3 : -(_local3)); if (_local3 < 0){ _local6.colHullX.x = (_local6.colHullX.x + _local3); }; _local6.colHullY.x = x; _local6.colHullY.height = (_local6.colHullY.height + ((_local4)>0) ? _local4 : -(_local4)); if (_local4 < 0){ _local6.colHullY.y = (_local6.colHullY.y + _local4); }; _local6.colVector.x = (_local6.colVector.x + _local3); _local6.colVector.y = (_local6.colVector.y + _local4); }; }; }; }; _local8++; }; } protected function updateMembers():void{ var _local1:Number; var _local2:Number; var _local4:FlxObject; var _local3:Boolean; if (((!((x == _last.x))) || (!((y == _last.y))))){ _local3 = true; _local1 = (x - _last.x); _local2 = (y - _last.y); }; var _local5:uint = members.length; var _local6:uint; while (_local6 < _local5) { _local4 = (members[_local6] as FlxObject); if (((!((_local4 == null))) && (_local4.exists))){ if (_local3){ if (_local4._group){ _local4.reset((_local4.x + _local1), (_local4.y + _local2)); } else { _local4.x = (_local4.x + _local1); _local4.y = (_local4.y + _local2); }; }; if (_local4.active){ _local4.update(); }; if (((_local3) && (_local4.solid))){ _local4.colHullX.width = (_local4.colHullX.width + ((_local1)>0) ? _local1 : -(_local1)); if (_local1 < 0){ _local4.colHullX.x = (_local4.colHullX.x + _local1); }; _local4.colHullY.x = x; _local4.colHullY.height = (_local4.colHullY.height + ((_local2)>0) ? _local2 : -(_local2)); if (_local2 < 0){ _local4.colHullY.y = (_local4.colHullY.y + _local2); }; _local4.colVector.x = (_local4.colVector.x + _local1); _local4.colVector.y = (_local4.colVector.y + _local2); }; }; _local6++; }; } public function countDead():int{ var _local1:FlxObject; var _local2 = -1; var _local3:uint = members.length; var _local4:uint; while (_local4 < _local3) { _local1 = (members[_local4] as FlxObject); if (_local1 != null){ if (_local2 < 0){ _local2 = 0; }; if (_local1.dead){ _local2++; }; }; _local4++; }; return (_local2); } public function getFirstAvail():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((!((_local1 == null))) && (!(_local1.exists)))){ return (_local1); }; _local3++; }; return (null); } override public function render():void{ renderMembers(); } public function countLiving():int{ var _local1:FlxObject; var _local2 = -1; var _local3:uint = members.length; var _local4:uint; while (_local4 < _local3) { _local1 = (members[_local4] as FlxObject); if (_local1 != null){ if (_local2 < 0){ _local2 = 0; }; if (((_local1.exists) && (!(_local1.dead)))){ _local2++; }; }; _local4++; }; return (_local2); } public function countOnScreen():int{ var _local1:FlxObject; var _local2 = -1; var _local3:uint = members.length; var _local4:uint; while (_local4 < _local3) { _local1 = (members[_local4] as FlxObject); if (_local1 != null){ if (_local2 < 0){ _local2 = 0; }; if (_local1.onScreen()){ _local2++; }; }; _local4++; }; return (_local2); } protected function killMembers():void{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (_local1 != null){ _local1.kill(); }; _local3++; }; } override public function kill():void{ killMembers(); super.kill(); } public function getFirstNull():int{ var _local1:uint = members.length; var _local2:uint; while (_local2 < _local1) { if (members[_local2] == null){ return (_local2); }; _local2++; }; return (-1); } protected function renderMembers():void{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((((!((_local1 == null))) && (_local1.exists))) && (_local1.visible))){ _local1.render(); }; _local3++; }; } public function add(_arg1:FlxObject, _arg2:Boolean=false):FlxObject{ members[members.length] = _arg1; if (_arg2){ _arg1.scrollFactor = scrollFactor; }; return (_arg1); } protected function saveOldPosition():void{ if (_first){ _first = false; _last.x = 0; _last.y = 0; return; }; _last.x = x; _last.y = y; } public function replace(_arg1:FlxObject, _arg2:FlxObject):FlxObject{ var _local3:int = members.indexOf(_arg1); if ((((_local3 < 0)) || ((_local3 >= members.length)))){ return (null); }; members[_local3] = _arg2; return (_arg2); } public function getRandom():FlxObject{ var _local1:uint; var _local2:FlxObject; var _local3:uint = members.length; var _local4:uint = uint((FlxU.random() * _local3)); while ((((_local2 == null)) && ((_local1 < members.length)))) { ++_local4; _local2 = (members[(_local4 % _local3)] as FlxObject); _local1++; }; return (_local2); } public function getFirstDead():FlxObject{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (((!((_local1 == null))) && (_local1.dead))){ return (_local1); }; _local3++; }; return (null); } protected function destroyMembers():void{ var _local1:FlxObject; var _local2:uint = members.length; var _local3:uint; while (_local3 < _local2) { _local1 = (members[_local3] as FlxObject); if (_local1 != null){ _local1.destroy(); }; _local3++; }; members.length = 0; } } }//package org.flixel
Section 54
//FlxObject (org.flixel.FlxObject) package org.flixel { import flash.geom.*; public class FlxObject extends FlxRect { public var acceleration:FlxPoint; public var angularAcceleration:Number; public var active:Boolean; public var collideBottom:Boolean; var _group:Boolean; protected var _point:FlxPoint; public var colHullX:FlxRect; protected var _flickerTimer:Number; public var colHullY:FlxRect; protected var _flashPoint:Point; public var colOffsets:Array; public var solid:Boolean; public var origin:FlxPoint; public var drag:FlxPoint; public var angularDrag:Number; public var collideTop:Boolean; protected var _flicker:Boolean; protected var _rect:FlxRect; public var moves:Boolean; public var angle:Number; public var thrust:Number; public var health:Number; public var velocity:FlxPoint; public var maxAngular:Number; public var angularVelocity:Number; public var maxVelocity:FlxPoint; public var exists:Boolean; public var collideLeft:Boolean; public var colVector:FlxPoint; public var maxThrust:Number; public var onFloor:Boolean; public var dead:Boolean; public var fixed:Boolean; public var visible:Boolean; public var scrollFactor:FlxPoint; public var collideRight:Boolean; protected static const _pZero:FlxPoint = new FlxPoint(); public function FlxObject(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ super(_arg1, _arg2, _arg3, _arg4); exists = true; active = true; visible = true; solid = true; fixed = false; moves = true; collideLeft = true; collideRight = true; collideTop = true; collideBottom = true; origin = new FlxPoint(); velocity = new FlxPoint(); acceleration = new FlxPoint(); drag = new FlxPoint(); maxVelocity = new FlxPoint(10000, 10000); angle = 0; angularVelocity = 0; angularAcceleration = 0; angularDrag = 0; maxAngular = 10000; thrust = 0; scrollFactor = new FlxPoint(1, 1); _flicker = false; _flickerTimer = -1; health = 1; dead = false; _point = new FlxPoint(); _rect = new FlxRect(); _flashPoint = new Point(); colHullX = new FlxRect(); colHullY = new FlxRect(); colVector = new FlxPoint(); colOffsets = new Array(new FlxPoint()); _group = false; } public function onScreen():Boolean{ getScreenXY(_point); if (((((((((_point.x + width) < 0)) || ((_point.x > FlxG.width)))) || (((_point.y + height) < 0)))) || ((_point.y > FlxG.height)))){ return (false); }; return (true); } public function kill():void{ exists = false; dead = true; } protected function updateFlickering():void{ if (flickering()){ if (_flickerTimer > 0){ _flickerTimer = (_flickerTimer - FlxG.elapsed); if (_flickerTimer == 0){ _flickerTimer = -1; }; }; if (_flickerTimer < 0){ flicker(-1); } else { _flicker = !(_flicker); visible = !(_flicker); }; }; } public function render():void{ } public function hitBottom(_arg1:FlxObject, _arg2:Number):void{ onFloor = true; if (!fixed){ velocity.y = _arg2; }; } public function overlaps(_arg1:FlxObject):Boolean{ var _local10:FlxSprite; var _local11:FlxSprite; getScreenXY(_point); var _local2:Number = _point.x; var _local3:Number = _point.y; var _local4:Number = width; var _local5:Number = height; if ((this is FlxSprite)){ _local10 = (this as FlxSprite); _local4 = _local10.frameWidth; _local5 = _local10.frameHeight; }; _arg1.getScreenXY(_point); var _local6:Number = _point.x; var _local7:Number = _point.y; var _local8:Number = _arg1.width; var _local9:Number = _arg1.height; if ((_arg1 is FlxSprite)){ _local11 = (_arg1 as FlxSprite); _local8 = _local11.frameWidth; _local9 = _local11.frameHeight; }; if ((((((((_local6 <= (_local2 - _local8))) || ((_local6 >= (_local2 + _local4))))) || ((_local7 <= (_local3 - _local9))))) || ((_local7 >= (_local3 + _local5))))){ return (false); }; return (true); } public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{ _arg1 = (_arg1 + FlxU.floor(FlxG.scroll.x)); _arg2 = (_arg2 + FlxU.floor(FlxG.scroll.y)); getScreenXY(_point); if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + width))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + height))))){ return (false); }; return (true); } public function hurt(_arg1:Number):void{ if ((health = (health - _arg1)) <= 0){ kill(); }; } public function refreshHulls():void{ colHullX.x = x; colHullX.y = y; colHullX.width = width; colHullX.height = height; colHullY.x = x; colHullY.y = y; colHullY.width = width; colHullY.height = height; } public function preCollide(_arg1:FlxObject):void{ } public function hitLeft(_arg1:FlxObject, _arg2:Number):void{ if (!fixed){ velocity.x = _arg2; }; } public function collide(_arg1:FlxObject=null):Boolean{ return (FlxU.collide(this, ((_arg1)==null) ? this : _arg1)); } public function reset(_arg1:Number, _arg2:Number):void{ x = _arg1; y = _arg2; exists = true; dead = false; } public function update():void{ updateMotion(); updateFlickering(); } public function hitTop(_arg1:FlxObject, _arg2:Number):void{ if (!fixed){ velocity.y = _arg2; }; } protected function updateMotion():void{ var _local1:FlxPoint; var _local4:FlxPoint; var _local5:Number; if (!moves){ return; }; if (solid){ refreshHulls(); }; onFloor = false; angle = (angle + ((angularVelocity = FlxU.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular)) * FlxG.elapsed)); if (thrust != 0){ _local1 = FlxU.rotatePoint(-(thrust), 0, 0, 0, angle); _local4 = FlxU.rotatePoint(-(maxThrust), 0, 0, 0, angle); _local5 = ((_local4.x)>0) ? _local4.x : -(_local4.x); if (_local5 > ((_local4.y)>0) ? _local4.y : -(_local4.y)){ _local4.y = _local5; } else { _local5 = ((_local4.y)>0) ? _local4.y : -(_local4.y); }; maxVelocity.x = (maxVelocity.y = ((_local5)>0) ? _local5 : -(_local5)); } else { _local1 = _pZero; }; velocity.x = FlxU.computeVelocity(velocity.x, (acceleration.x + _local1.x), drag.x, maxVelocity.x); velocity.y = FlxU.computeVelocity(velocity.y, (acceleration.y + _local1.y), drag.y, maxVelocity.y); var _local2:Number = (velocity.x * FlxG.elapsed); var _local3:Number = (velocity.y * FlxG.elapsed); x = (x + _local2); y = (y + _local3); if (!solid){ return; }; colVector.x = _local2; colVector.y = _local3; colHullX.width = (colHullX.width + ((colVector.x)>0) ? colVector.x : -(colVector.x)); if (colVector.x < 0){ colHullX.x = (colHullX.x + colVector.x); }; colHullY.x = x; colHullY.height = (colHullY.height + ((colVector.y)>0) ? colVector.y : -(colVector.y)); if (colVector.y < 0){ colHullY.y = (colHullY.y + colVector.y); }; } public function flickering():Boolean{ return ((_flickerTimer >= 0)); } public function hitRight(_arg1:FlxObject, _arg2:Number):void{ hitLeft(_arg1, _arg2); } public function destroy():void{ } public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{ if (_arg1 == null){ _arg1 = new FlxPoint(); }; _arg1.x = (FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x))); _arg1.y = (FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y))); return (_arg1); } public function flicker(_arg1:Number=1):void{ _flickerTimer = _arg1; if (_flickerTimer < 0){ _flicker = false; visible = true; }; } } }//package org.flixel
Section 55
//FlxPoint (org.flixel.FlxPoint) package org.flixel { public class FlxPoint { public var x:Number; public var y:Number; public function FlxPoint(_arg1:Number=0, _arg2:Number=0){ x = _arg1; y = _arg2; } public function toString():String{ return (FlxU.getClassName(this, true)); } } }//package org.flixel
Section 56
//FlxPreloader (org.flixel.FlxPreloader) package org.flixel { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; import flash.net.*; public class FlxPreloader extends MovieClip { protected var _height:uint; protected var _width:uint; protected var ImgLogoLight:Class; protected var _logo:Bitmap; protected var _text:TextField; protected var _min:uint; protected var _buffer:Sprite; public var className:String; public var myURL:String; protected var _bmpBar:Bitmap; protected var ImgLogo:Class; protected var _init:Boolean; protected var ImgLogoCorners:Class; protected var _logoGlow:Bitmap; public var minDisplayTime:Number; public function FlxPreloader(){ var tmp:Bitmap; var re:RegExp; var fmt:TextFormat; var txt:TextField; ImgLogo = FlxPreloader_ImgLogo; ImgLogoCorners = FlxPreloader_ImgLogoCorners; ImgLogoLight = FlxPreloader_ImgLogoLight; super(); minDisplayTime = 0; stop(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; try { throw (new Error("Setting global debug flag...")); } catch(e:Error) { re = /\[.*:[0-9]+\]/; FlxG.debug = re.test(e.getStackTrace()); }; if (((((!(FlxG.debug)) && (!((myURL == null))))) && ((root.loaderInfo.url.indexOf(myURL) < 0)))){ tmp = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295)); addChild(tmp); fmt = new TextFormat(); fmt.color = 0; fmt.size = 16; fmt.align = "center"; fmt.bold = true; fmt.font = "system"; txt = new TextField(); txt.width = (tmp.width - 16); txt.height = (tmp.height - 16); txt.y = 8; txt.multiline = true; txt.wordWrap = true; txt.embedFonts = true; txt.defaultTextFormat = fmt; txt.text = (("Hi there! It looks like somebody copied this game without my permission. Just click anywhere, or copy-paste this URL into your browser.\n\n" + myURL) + "\n\nto play the game at my site. Thanks, and have fun!"); addChild(txt); txt.addEventListener(MouseEvent.CLICK, goToMyURL); tmp.addEventListener(MouseEvent.CLICK, goToMyURL); return; }; _init = false; addEventListener(Event.ENTER_FRAME, onEnterFrame); } protected function update(_arg1:Number):void{ _bmpBar.scaleX = (_arg1 * (_width - 8)); _text.text = (((((("FLX v" + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION) + " ") + FlxU.floor((_arg1 * 100))) + "%"); _text.setTextFormat(_text.defaultTextFormat); if (_arg1 < 0.1){ _logoGlow.alpha = 0; _logo.alpha = 0; } else { if (_arg1 < 0.15){ _logoGlow.alpha = FlxU.random(false); _logo.alpha = 0; } else { if (_arg1 < 0.2){ _logoGlow.alpha = 0; _logo.alpha = 0; } else { if (_arg1 < 0.25){ _logoGlow.alpha = 0; _logo.alpha = FlxU.random(false); } else { if (_arg1 < 0.7){ _logoGlow.alpha = ((_arg1 - 0.45) / 0.45); _logo.alpha = 1; } else { if ((((_arg1 > 0.8)) && ((_arg1 < 0.9)))){ _logoGlow.alpha = (1 - ((_arg1 - 0.8) / 0.1)); _logo.alpha = 0; } else { if (_arg1 > 0.9){ _buffer.alpha = (1 - ((_arg1 - 0.9) / 0.1)); }; }; }; }; }; }; }; } private function goToMyURL(_arg1:MouseEvent=null):void{ navigateToURL(new URLRequest(("http://" + myURL))); } private function onEnterFrame(_arg1:Event):void{ var _local2:int; var _local4:Class; var _local5:Object; var _local6:Number; if (!_init){ if ((((stage.stageWidth <= 0)) || ((stage.stageHeight <= 0)))){ return; }; create(); _init = true; }; graphics.clear(); var _local3:uint = getTimer(); if ((((framesLoaded >= totalFrames)) && ((_local3 > _min)))){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); _local4 = Class(getDefinitionByName(className)); if (_local4){ _local5 = new (_local4); addChild((_local5 as DisplayObject)); }; removeChild(_buffer); } else { _local6 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal); if ((((_min > 0)) && ((_local6 > (_local3 / _min))))){ _local6 = (_local3 / _min); }; update(_local6); }; } protected function create():void{ var _local3:uint; _min = 0; if (!FlxG.debug){ _min = (minDisplayTime * 1000); }; _buffer = new Sprite(); _buffer.scaleX = 2; _buffer.scaleY = 2; addChild(_buffer); _width = (stage.stageWidth / _buffer.scaleX); _height = (stage.stageHeight / _buffer.scaleY); _buffer.addChild(new Bitmap(new BitmapData(_width, _height, false, 13406))); var _local1:Bitmap = new ImgLogoLight(); _local1.smoothing = true; _local1.width = (_local1.height = _height); _local1.x = ((_width - _local1.width) / 2); _buffer.addChild(_local1); _bmpBar = new Bitmap(new BitmapData(1, 7, false, 6253311)); _bmpBar.x = 4; _bmpBar.y = (_height - 11); _buffer.addChild(_bmpBar); _text = new TextField(); _text.defaultTextFormat = new TextFormat("system", 8, 6253311); _text.embedFonts = true; _text.selectable = false; _text.multiline = false; _text.x = 2; _text.y = (_bmpBar.y - 11); _text.width = 80; _buffer.addChild(_text); _logo = new ImgLogo(); _logo.scaleX = (_logo.scaleY = (_height / 8)); _logo.x = ((_width - _logo.width) / 2); _logo.y = ((_height - _logo.height) / 2); _buffer.addChild(_logo); _logoGlow = new ImgLogo(); _logoGlow.smoothing = true; _logoGlow.blendMode = "screen"; _logoGlow.scaleX = (_logoGlow.scaleY = (_height / 8)); _logoGlow.x = ((_width - _logoGlow.width) / 2); _logoGlow.y = ((_height - _logoGlow.height) / 2); _buffer.addChild(_logoGlow); _local1 = new ImgLogoCorners(); _local1.smoothing = true; _local1.width = _width; _local1.height = _height; _buffer.addChild(_local1); _local1 = new Bitmap(new BitmapData(_width, _height, false, 0xFFFFFF)); var _local2:uint; while (_local2 < _height) { _local3 = 0; while (_local3 < _width) { _local1.bitmapData.setPixel(_local3, _local2, 0); _local3++; }; _local2 = (_local2 + 2); }; _local1.blendMode = "overlay"; _local1.alpha = 0.25; _buffer.addChild(_local1); } } }//package org.flixel
Section 57
//FlxPreloader_ImgLogo (org.flixel.FlxPreloader_ImgLogo) package org.flixel { import mx.core.*; public class FlxPreloader_ImgLogo extends BitmapAsset { } }//package org.flixel
Section 58
//FlxPreloader_ImgLogoCorners (org.flixel.FlxPreloader_ImgLogoCorners) package org.flixel { import mx.core.*; public class FlxPreloader_ImgLogoCorners extends BitmapAsset { } }//package org.flixel
Section 59
//FlxPreloader_ImgLogoLight (org.flixel.FlxPreloader_ImgLogoLight) package org.flixel { import mx.core.*; public class FlxPreloader_ImgLogoLight extends BitmapAsset { } }//package org.flixel
Section 60
//FlxQuadTree (org.flixel.FlxQuadTree) package org.flixel { import org.flixel.data.*; public class FlxQuadTree extends FlxRect { protected var _sw:FlxQuadTree; protected var _mx:Number; protected var _my:Number; protected var _ne:FlxQuadTree; protected var _hh:Number; protected var _headA:FlxList; protected var _headB:FlxList; protected var _canSubdivide:Boolean; protected var _l:Number; protected var _hw:Number; protected var _nw:FlxQuadTree; protected var _se:FlxQuadTree; protected var _tailA:FlxList; protected var _r:Number; protected var _t:Number; protected var _tailB:FlxList; protected var _b:Number; public static const A_LIST:uint = 0; public static const MIN:Number = 48; public static const B_LIST:uint = 1; protected static var _ot:Number; protected static var _or:Number; protected static var _o:FlxObject; protected static var _oa:uint; protected static var _oc:Function; protected static var _ob:Number; protected static var _ol:Number; public function FlxQuadTree(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:FlxQuadTree=null){ var _local6:FlxList; var _local7:FlxList; super(_arg1, _arg2, _arg3, _arg4); _canSubdivide = (((_arg3 > MIN)) || ((_arg4 > MIN))); _headA = (_tailA = new FlxList()); _headB = (_tailB = new FlxList()); if (_arg5){ if (_arg5._headA.object != null){ _local6 = _arg5._headA; while (_local6 != null) { if (_tailA.object != null){ _local7 = _tailA; _tailA = new FlxList(); _local7.next = _tailA; }; _tailA.object = _local6.object; _local6 = _local6.next; }; }; if (_arg5._headB.object != null){ _local6 = _arg5._headB; while (_local6 != null) { if (_tailB.object != null){ _local7 = _tailB; _tailB = new FlxList(); _local7.next = _tailB; }; _tailB.object = _local6.object; _local6 = _local6.next; }; }; }; _nw = null; _ne = null; _se = null; _sw = null; _l = x; _r = (x + width); _hw = (width / 2); _mx = (_l + _hw); _t = y; _b = (y + height); _hh = (height / 2); _my = (_t + _hh); } protected function addObject():void{ if (((!(_canSubdivide)) || ((((((((_l >= _ol)) && ((_r <= _or)))) && ((_t >= _ot)))) && ((_b <= _ob)))))){ addToList(); return; }; if ((((_ol > _l)) && ((_or < _mx)))){ if ((((_ot > _t)) && ((_ob < _my)))){ if (_nw == null){ _nw = new FlxQuadTree(_l, _t, _hw, _hh, this); }; _nw.addObject(); return; }; if ((((_ot > _my)) && ((_ob < _b)))){ if (_sw == null){ _sw = new FlxQuadTree(_l, _my, _hw, _hh, this); }; _sw.addObject(); return; }; }; if ((((_ol > _mx)) && ((_or < _r)))){ if ((((_ot > _t)) && ((_ob < _my)))){ if (_ne == null){ _ne = new FlxQuadTree(_mx, _t, _hw, _hh, this); }; _ne.addObject(); return; }; if ((((_ot > _my)) && ((_ob < _b)))){ if (_se == null){ _se = new FlxQuadTree(_mx, _my, _hw, _hh, this); }; _se.addObject(); return; }; }; if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _t)))) && ((_ot < _my)))){ if (_nw == null){ _nw = new FlxQuadTree(_l, _t, _hw, _hh, this); }; _nw.addObject(); }; if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _t)))) && ((_ot < _my)))){ if (_ne == null){ _ne = new FlxQuadTree(_mx, _t, _hw, _hh, this); }; _ne.addObject(); }; if ((((((((_or > _mx)) && ((_ol < _r)))) && ((_ob > _my)))) && ((_ot < _b)))){ if (_se == null){ _se = new FlxQuadTree(_mx, _my, _hw, _hh, this); }; _se.addObject(); }; if ((((((((_or > _l)) && ((_ol < _mx)))) && ((_ob > _my)))) && ((_ot < _b)))){ if (_sw == null){ _sw = new FlxQuadTree(_l, _my, _hw, _hh, this); }; _sw.addObject(); }; } protected function addToList():void{ var _local1:FlxList; if (_oa == A_LIST){ if (_tailA.object != null){ _local1 = _tailA; _tailA = new FlxList(); _local1.next = _tailA; }; _tailA.object = _o; } else { if (_tailB.object != null){ _local1 = _tailB; _tailB = new FlxList(); _local1.next = _tailB; }; _tailB.object = _o; }; if (!_canSubdivide){ return; }; if (_nw != null){ _nw.addToList(); }; if (_ne != null){ _ne.addToList(); }; if (_se != null){ _se.addToList(); }; if (_sw != null){ _sw.addToList(); }; } public function overlap(_arg1:Boolean=true, _arg2:Function=null):Boolean{ var _local4:FlxList; _oc = _arg2; var _local3:Boolean; if (_arg1){ _oa = B_LIST; if (_headA.object != null){ _local4 = _headA; while (_local4 != null) { _o = _local4.object; if (((((_o.exists) && (_o.solid))) && (overlapNode()))){ _local3 = true; }; _local4 = _local4.next; }; }; _oa = A_LIST; if (_headB.object != null){ _local4 = _headB; while (_local4 != null) { _o = _local4.object; if (((_o.exists) && (_o.solid))){ if (((!((_nw == null))) && (_nw.overlapNode()))){ _local3 = true; }; if (((!((_ne == null))) && (_ne.overlapNode()))){ _local3 = true; }; if (((!((_se == null))) && (_se.overlapNode()))){ _local3 = true; }; if (((!((_sw == null))) && (_sw.overlapNode()))){ _local3 = true; }; }; _local4 = _local4.next; }; }; } else { if (_headA.object != null){ _local4 = _headA; while (_local4 != null) { _o = _local4.object; if (((((_o.exists) && (_o.solid))) && (overlapNode(_local4.next)))){ _local3 = true; }; _local4 = _local4.next; }; }; }; if (((!((_nw == null))) && (_nw.overlap(_arg1, _oc)))){ _local3 = true; }; if (((!((_ne == null))) && (_ne.overlap(_arg1, _oc)))){ _local3 = true; }; if (((!((_se == null))) && (_se.overlap(_arg1, _oc)))){ _local3 = true; }; if (((!((_sw == null))) && (_sw.overlap(_arg1, _oc)))){ _local3 = true; }; return (_local3); } public function add(_arg1:FlxObject, _arg2:uint):void{ var _local3:FlxObject; var _local4:Array; var _local5:uint; var _local6:uint; _oa = _arg2; if (_arg1._group){ _local4 = (_arg1 as FlxGroup).members; _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local3 = (_local4[_local6] as FlxObject); if (((!((_local3 == null))) && (_local3.exists))){ if (_local3._group){ add(_local3, _arg2); } else { if (_local3.solid){ _o = _local3; _ol = _o.x; _ot = _o.y; _or = (_o.x + _o.width); _ob = (_o.y + _o.height); addObject(); }; }; }; _local6++; }; }; if (_arg1.solid){ _o = _arg1; _ol = _o.x; _ot = _o.y; _or = (_o.x + _o.width); _ob = (_o.y + _o.height); addObject(); }; } protected function overlapNode(_arg1:FlxList=null):Boolean{ var _local3:FlxObject; var _local2:Boolean; var _local4:FlxList = _arg1; if (_local4 == null){ if (_oa == A_LIST){ _local4 = _headA; } else { _local4 = _headB; }; }; if (_local4.object != null){ while (_local4 != null) { _local3 = _local4.object; if ((((((((((((((((((_o === _local3)) || (!(_local3.exists)))) || (!(_o.exists)))) || (!(_local3.solid)))) || (!(_o.solid)))) || (((_o.x + _o.width) < (_local3.x + FlxU.roundingError))))) || (((_o.x + FlxU.roundingError) > (_local3.x + _local3.width))))) || (((_o.y + _o.height) < (_local3.y + FlxU.roundingError))))) || (((_o.y + FlxU.roundingError) > (_local3.y + _local3.height))))){ _local4 = _local4.next; } else { if (_oc == null){ _o.kill(); _local3.kill(); _local2 = true; } else { if (_oc(_o, _local3)){ _local2 = true; }; }; _local4 = _local4.next; }; }; }; return (_local2); } } }//package org.flixel
Section 61
//FlxRect (org.flixel.FlxRect) package org.flixel { public class FlxRect extends FlxPoint { public var width:Number; public var height:Number; public function FlxRect(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ super(_arg1, _arg2); width = _arg3; height = _arg4; } public function get bottom():Number{ return ((y + height)); } public function get top():Number{ return (y); } public function get left():Number{ return (x); } public function get right():Number{ return ((x + width)); } } }//package org.flixel
Section 62
//FlxSave (org.flixel.FlxSave) package org.flixel { import flash.net.*; public class FlxSave { protected var _so:SharedObject; public var data:Object; public var name:String; public function FlxSave(){ name = null; _so = null; data = null; } public function read(_arg1:String):Object{ if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.read()."); return (null); }; return (data[_arg1]); } public function forceSave(_arg1:uint=0):Boolean{ var MinFileSize = _arg1; if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.forceSave()."); return (false); }; var status:Object; try { status = _so.flush(MinFileSize); } catch(e:Error) { FlxG.log("WARNING: There was a problem flushing\nthe shared object data from FlxSave."); return (false); }; return ((status == SharedObjectFlushStatus.FLUSHED)); } public function bind(_arg1:String):Boolean{ var Name = _arg1; name = null; _so = null; data = null; name = Name; try { _so = SharedObject.getLocal(name); } catch(e:Error) { FlxG.log("WARNING: There was a problem binding to\nthe shared object data from FlxSave."); name = null; _so = null; data = null; return (false); }; data = _so.data; return (true); } public function erase(_arg1:uint=0):Boolean{ if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.erase()."); return (false); }; _so.clear(); return (forceSave(_arg1)); } public function write(_arg1:String, _arg2:Object, _arg3:uint=0):Boolean{ if (_so == null){ FlxG.log("WARNING: You must call FlxSave.bind()\nbefore calling FlxSave.write()."); return (false); }; data[_arg1] = _arg2; return (forceSave(_arg3)); } } }//package org.flixel
Section 63
//FlxSound (org.flixel.FlxSound) package org.flixel { import flash.events.*; import flash.media.*; import flash.net.*; public class FlxSound extends FlxObject { public var name:String; protected var _position:Number; protected var _fadeOutTotal:Number; protected var _fadeOutTimer:Number; protected var _sound:Sound; protected var _pauseOnFadeOut:Boolean; protected var _volumeAdjust:Number; public var playing:Boolean; protected var _radius:Number; protected var _volume:Number; protected var _point2:FlxPoint; protected var _fadeInTimer:Number; public var artist:String; protected var _channel:SoundChannel; protected var _fadeInTotal:Number; protected var _looped:Boolean; protected var _pan:Boolean; protected var _transform:SoundTransform; protected var _init:Boolean; public var survive:Boolean; protected var _core:FlxObject; public function FlxSound(){ _point2 = new FlxPoint(); _transform = new SoundTransform(); init(); fixed = true; } public function loadStream(_arg1:String, _arg2:Boolean=false):FlxSound{ stop(); init(); _sound = new Sound(); _sound.addEventListener(Event.ID3, gotID3); _sound.load(new URLRequest(_arg1)); _looped = _arg2; updateTransform(); active = true; return (this); } public function stop():void{ _position = 0; if (_channel != null){ _channel.stop(); stopped(); }; } public function loadEmbedded(_arg1:Class, _arg2:Boolean=false):FlxSound{ stop(); init(); _sound = new (_arg1); _looped = _arg2; updateTransform(); active = true; return (this); } public function get volume():Number{ return (_volume); } function updateTransform():void{ _transform.volume = (((FlxG.getMuteValue() * FlxG.volume) * _volume) * _volumeAdjust); if (_channel != null){ _channel.soundTransform = _transform; }; } public function fadeOut(_arg1:Number, _arg2:Boolean=false):void{ _pauseOnFadeOut = _arg2; _fadeInTimer = 0; _fadeOutTimer = _arg1; _fadeOutTotal = _fadeOutTimer; } public function play():void{ if (_position < 0){ return; }; if (_looped){ if (_position == 0){ if (_channel == null){ _channel = _sound.play(0, 9999, _transform); }; if (_channel == null){ active = false; }; } else { _channel = _sound.play(_position, 0, _transform); if (_channel == null){ active = false; } else { _channel.addEventListener(Event.SOUND_COMPLETE, looped); }; }; } else { if (_position == 0){ if (_channel == null){ _channel = _sound.play(0, 0, _transform); if (_channel == null){ active = false; } else { _channel.addEventListener(Event.SOUND_COMPLETE, stopped); }; }; } else { _channel = _sound.play(_position, 0, _transform); if (_channel == null){ active = false; }; }; }; playing = !((_channel == null)); _position = 0; } public function set volume(_arg1:Number):void{ _volume = _arg1; if (_volume < 0){ _volume = 0; } else { if (_volume > 1){ _volume = 1; }; }; updateTransform(); } protected function init():void{ _transform.pan = 0; _sound = null; _position = 0; _volume = 1; _volumeAdjust = 1; _looped = false; _core = null; _radius = 0; _pan = false; _fadeOutTimer = 0; _fadeOutTotal = 0; _pauseOnFadeOut = false; _fadeInTimer = 0; _fadeInTotal = 0; active = false; visible = false; solid = false; playing = false; name = null; artist = null; } protected function looped(_arg1:Event=null):void{ if (_channel == null){ return; }; _channel.removeEventListener(Event.SOUND_COMPLETE, looped); _channel = null; play(); } protected function updateSound():void{ var _local3:FlxPoint; var _local4:FlxPoint; var _local5:Number; var _local6:Number; var _local7:Number; if (_position != 0){ return; }; var _local1:Number = 1; var _local2:Number = 1; if (_core != null){ _local3 = new FlxPoint(); _local4 = new FlxPoint(); _core.getScreenXY(_local3); getScreenXY(_local4); _local5 = (_local3.x - _local4.x); _local6 = (_local3.y - _local4.y); _local1 = ((_radius - Math.sqrt(((_local5 * _local5) + (_local6 * _local6)))) / _radius); if (_local1 < 0){ _local1 = 0; }; if (_local1 > 1){ _local1 = 1; }; if (_pan){ _local7 = (-(_local5) / _radius); if (_local7 < -1){ _local7 = -1; } else { if (_local7 > 1){ _local7 = 1; }; }; _transform.pan = _local7; }; }; if (_fadeOutTimer > 0){ _fadeOutTimer = (_fadeOutTimer - FlxG.elapsed); if (_fadeOutTimer <= 0){ if (_pauseOnFadeOut){ pause(); } else { stop(); }; }; _local2 = (_fadeOutTimer / _fadeOutTotal); if (_local2 < 0){ _local2 = 0; }; } else { if (_fadeInTimer > 0){ _fadeInTimer = (_fadeInTimer - FlxG.elapsed); _local2 = (_fadeInTimer / _fadeInTotal); if (_local2 < 0){ _local2 = 0; }; _local2 = (1 - _local2); }; }; _volumeAdjust = (_local1 * _local2); updateTransform(); } public function fadeIn(_arg1:Number):void{ _fadeOutTimer = 0; _fadeInTimer = _arg1; _fadeInTotal = _fadeInTimer; play(); } override public function update():void{ super.update(); updateSound(); } protected function stopped(_arg1:Event=null):void{ if (!_looped){ _channel.removeEventListener(Event.SOUND_COMPLETE, stopped); } else { _channel.removeEventListener(Event.SOUND_COMPLETE, looped); }; _channel = null; active = false; playing = false; } protected function gotID3(_arg1:Event=null):void{ FlxG.log("got ID3 info!"); if (_sound.id3.songName.length > 0){ name = _sound.id3.songName; }; if (_sound.id3.artist.length > 0){ artist = _sound.id3.artist; }; _sound.removeEventListener(Event.ID3, gotID3); } public function pause():void{ if (_channel == null){ _position = -1; return; }; _position = _channel.position; _channel.stop(); if (_looped){ while (_position >= _sound.length) { _position = (_position - _sound.length); }; }; _channel = null; playing = false; } override public function destroy():void{ if (active){ stop(); }; } public function proximity(_arg1:Number, _arg2:Number, _arg3:FlxObject, _arg4:Number, _arg5:Boolean=true):FlxSound{ x = _arg1; y = _arg2; _core = _arg3; _radius = _arg4; _pan = _arg5; return (this); } } }//package org.flixel
Section 64
//FlxSprite (org.flixel.FlxSprite) package org.flixel { import flash.display.*; import flash.geom.*; import org.flixel.data.*; public class FlxSprite extends FlxObject { protected var _mtx:Matrix; protected var _caf:uint; public var finished:Boolean; protected var _animations:Array; protected var _ct:ColorTransform; public var offset:FlxPoint; protected var _callback:Function; protected var _curAnim:FlxAnim; protected var _framePixels:BitmapData; protected var _flipped:uint; public var scale:FlxPoint; protected var _pixels:BitmapData; protected var _bakedRotation:Number; public var blend:String; public var frameWidth:uint; protected var _flashRect2:Rectangle; protected var _alpha:Number; protected var _flashPointZero:Point; protected var _curFrame:uint; public var frameHeight:uint; protected var _flashRect:Rectangle; protected var _frameTimer:Number; protected var _facing:uint; public var antialiasing:Boolean; protected var _color:uint; public static const LEFT:uint = 0; public static const DOWN:uint = 3; public static const UP:uint = 2; public static const RIGHT:uint = 1; public function FlxSprite(_arg1:Number=0, _arg2:Number=0, _arg3:Class=null){ x = _arg1; y = _arg2; _flashRect = new Rectangle(); _flashRect2 = new Rectangle(); _flashPointZero = new Point(); if (_arg3 == null){ createGraphic(8, 8); } else { loadGraphic(_arg3); }; offset = new FlxPoint(); scale = new FlxPoint(1, 1); _alpha = 1; _color = 0xFFFFFF; blend = null; antialiasing = false; finished = false; _facing = RIGHT; _animations = new Array(); _flipped = 0; _curAnim = null; _curFrame = 0; _caf = 0; _frameTimer = 0; _mtx = new Matrix(); _callback = null; } protected function renderSprite():void{ getScreenXY(_point); _flashPoint.x = _point.x; _flashPoint.y = _point.y; if ((((((((((angle == 0)) || ((_bakedRotation > 0)))) && ((scale.x == 1)))) && ((scale.y == 1)))) && ((blend == null)))){ FlxG.buffer.copyPixels(_framePixels, _flashRect, _flashPoint, null, null, true); return; }; _mtx.identity(); _mtx.translate(-(origin.x), -(origin.y)); _mtx.scale(scale.x, scale.y); if (angle != 0){ _mtx.rotate(((Math.PI * 2) * (angle / 360))); }; _mtx.translate((_point.x + origin.x), (_point.y + origin.y)); FlxG.buffer.draw(_framePixels, _mtx, null, blend, null, antialiasing); } public function fill(_arg1:uint):void{ _pixels.fillRect(_flashRect2, _arg1); calcFrame(); } public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{ _animations[_animations.length] = new FlxAnim(_arg1, _arg2, _arg3, _arg4); } override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{ _arg1 = (_arg1 - FlxU.floor(FlxG.scroll.x)); _arg2 = (_arg2 - FlxU.floor(FlxG.scroll.y)); getScreenXY(_point); if (_arg3){ return (_framePixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _point.x), (_arg2 - _point.y)))); }; if ((((((((_arg1 <= _point.x)) || ((_arg1 >= (_point.x + frameWidth))))) || ((_arg2 <= _point.y)))) || ((_arg2 >= (_point.y + frameHeight))))){ return (false); }; return (true); } override public function render():void{ renderSprite(); } protected function calcFrame():void{ var _local1:uint = (_caf * frameWidth); var _local2:uint; var _local3:uint = (_flipped) ? _flipped : _pixels.width; if (_local1 >= _local3){ _local2 = (uint((_local1 / _local3)) * frameHeight); _local1 = (_local1 % _local3); }; if (((_flipped) && ((_facing == LEFT)))){ _local1 = (((_flipped << 1) - _local1) - frameWidth); }; _flashRect.x = _local1; _flashRect.y = _local2; _framePixels.copyPixels(_pixels, _flashRect, _flashPointZero); _flashRect.x = (_flashRect.y = 0); if (_ct != null){ _framePixels.colorTransform(_flashRect, _ct); }; if (_callback != null){ _callback(_curAnim.name, _curFrame, _caf); }; } function unsafeBind(_arg1:BitmapData):void{ _pixels = (_framePixels = _arg1); } public function loadGraphic(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:Boolean=false):FlxSprite{ _bakedRotation = 0; _pixels = FlxG.addBitmap(_arg1, _arg3, _arg6); if (_arg3){ _flipped = (_pixels.width >> 1); } else { _flipped = 0; }; if (_arg4 == 0){ if (_arg2){ _arg4 = _pixels.height; } else { if (_flipped > 0){ _arg4 = (_pixels.width / 2); } else { _arg4 = _pixels.width; }; }; }; width = (frameWidth = _arg4); if (_arg5 == 0){ if (_arg2){ _arg5 = width; } else { _arg5 = _pixels.height; }; }; height = (frameHeight = _arg5); resetHelpers(); return (this); } public function get pixels():BitmapData{ return (_pixels); } public function set facing(_arg1:uint):void{ var _local2 = !((_facing == _arg1)); _facing = _arg1; if (_local2){ calcFrame(); }; } protected function resetHelpers():void{ _flashRect.x = 0; _flashRect.y = 0; _flashRect.width = frameWidth; _flashRect.height = frameHeight; _flashRect2.x = 0; _flashRect2.y = 0; _flashRect2.width = _pixels.width; _flashRect2.height = _pixels.height; if ((((((_framePixels == null)) || (!((_framePixels.width == width))))) || (!((_framePixels.height == height))))){ _framePixels = new BitmapData(width, height); }; origin.x = (frameWidth / 2); origin.y = (frameHeight / 2); _framePixels.copyPixels(_pixels, _flashRect, _flashPointZero); _caf = 0; refreshHulls(); } override public function getScreenXY(_arg1:FlxPoint=null):FlxPoint{ if (_arg1 == null){ _arg1 = new FlxPoint(); }; _arg1.x = ((FlxU.floor((x + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.x * scrollFactor.x))) - offset.x); _arg1.y = ((FlxU.floor((y + FlxU.roundingError)) + FlxU.floor((FlxG.scroll.y * scrollFactor.y))) - offset.y); return (_arg1); } public function set alpha(_arg1:Number):void{ if (_arg1 > 1){ _arg1 = 1; }; if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 == _alpha){ return; }; _alpha = _arg1; if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){ _ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha); } else { _ct = null; }; calcFrame(); } protected function updateAnimation():void{ var _local1:uint; var _local2:int; if (_bakedRotation){ _local1 = _caf; _local2 = (angle % 360); if (_local2 < 0){ _local2 = (_local2 + 360); }; _caf = (_local2 / _bakedRotation); if (_local1 != _caf){ calcFrame(); }; return; }; if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){ _frameTimer = (_frameTimer + FlxG.elapsed); if (_frameTimer > _curAnim.delay){ _frameTimer = (_frameTimer - _curAnim.delay); if (_curFrame == (_curAnim.frames.length - 1)){ if (_curAnim.looped){ _curFrame = 0; }; finished = true; } else { _curFrame++; }; _caf = _curAnim.frames[_curFrame]; calcFrame(); }; }; } public function draw(_arg1:FlxSprite, _arg2:int=0, _arg3:int=0):void{ var _local4:BitmapData = _arg1._framePixels; if ((((((((((_arg1.angle == 0)) || ((_arg1._bakedRotation > 0)))) && ((_arg1.scale.x == 1)))) && ((_arg1.scale.y == 1)))) && ((_arg1.blend == null)))){ _flashPoint.x = _arg2; _flashPoint.y = _arg3; _flashRect2.width = _local4.width; _flashRect2.height = _local4.height; _pixels.copyPixels(_local4, _flashRect2, _flashPoint, null, null, true); _flashRect2.width = _pixels.width; _flashRect2.height = _pixels.height; calcFrame(); return; }; _mtx.identity(); _mtx.translate(-(_arg1.origin.x), -(_arg1.origin.y)); _mtx.scale(_arg1.scale.x, _arg1.scale.y); if (_arg1.angle != 0){ _mtx.rotate(((Math.PI * 2) * (_arg1.angle / 360))); }; _mtx.translate((_arg2 + _arg1.origin.x), (_arg3 + _arg1.origin.y)); _pixels.draw(_local4, _mtx, null, _arg1.blend, null, _arg1.antialiasing); calcFrame(); } public function loadRotatedGraphic(_arg1:Class, _arg2:uint=16, _arg3:int=-1, _arg4:Boolean=false, _arg5:Boolean=false):FlxSprite{ var _local12:uint; var _local13:uint; var _local14:uint; var _local15:uint; var _local16:uint; var _local17:uint; var _local6:uint = 4; var _local7:FlxSprite = new FlxSprite().loadGraphic(_arg1, (_arg3 >= 0)); if (_arg3 >= 0){ _local7.frame = _arg3; }; _local7.antialiasing = _arg4; var _local8:uint = _local7.width; if (_local7.height > _local8){ _local8 = _local7.height; }; if (_arg5){ _local8 = (_local8 * 1.5); }; var _local9:uint = Math.ceil((_arg2 / _local6)); width = (_local8 * _local9); height = (_local8 * _local6); var _local10:String = ((((((String(_arg1) + ":") + _arg3) + ":") + width) + "x") + height); var _local11:Boolean = FlxG.checkBitmapCache(_local10); createGraphic(width, height, 0, true, _local10); _bakedRotation = (360 / _arg2); if (!_local11){ _local14 = (_local7.width / 2); _local15 = (_local7.height / 2); _local16 = (_local8 / 2); _local17 = (_local8 / 2); _local12 = 0; while (_local12 < _local6) { _local13 = 0; while (_local13 < _local9) { draw(_local7, ((_local16 + (_local8 * _local13)) - _local14), (_local17 - _local15)); _local7.angle = (_local7.angle + _bakedRotation); _local13++; }; _local17 = (_local17 + _local8); _local12++; }; }; frameWidth = (frameHeight = (width = (height = _local8))); resetHelpers(); return (this); } public function set color(_arg1:uint):void{ _arg1 = (_arg1 & 0xFFFFFF); if (_color == _arg1){ return; }; _color = _arg1; if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){ _ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha); } else { _ct = null; }; calcFrame(); } override public function update():void{ updateMotion(); updateAnimation(); updateFlickering(); } public function onEmit():void{ } public function createGraphic(_arg1:uint, _arg2:uint, _arg3:uint=4294967295, _arg4:Boolean=false, _arg5:String=null):FlxSprite{ _bakedRotation = 0; _pixels = FlxG.createBitmap(_arg1, _arg2, _arg3, _arg4, _arg5); width = (frameWidth = _pixels.width); height = (frameHeight = _pixels.height); resetHelpers(); return (this); } public function play(_arg1:String, _arg2:Boolean=false):void{ if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){ return; }; _curFrame = 0; _caf = 0; _frameTimer = 0; var _local3:uint = _animations.length; var _local4:uint; while (_local4 < _local3) { if (_animations[_local4].name == _arg1){ _curAnim = _animations[_local4]; if (_curAnim.delay <= 0){ finished = true; } else { finished = false; }; _caf = _curAnim.frames[_curFrame]; calcFrame(); return; }; _local4++; }; } public function addAnimationCallback(_arg1:Function):void{ _callback = _arg1; } public function set pixels(_arg1:BitmapData):void{ _pixels = _arg1; width = (frameWidth = _pixels.width); height = (frameHeight = _pixels.height); resetHelpers(); } public function get alpha():Number{ return (_alpha); } public function get facing():uint{ return (_facing); } public function get color():uint{ return (_color); } public function set frame(_arg1:uint):void{ _curAnim = null; _caf = _arg1; calcFrame(); } public function get frame():uint{ return (_caf); } public function randomFrame():void{ _curAnim = null; _caf = int((FlxU.random() * (_pixels.width / frameWidth))); calcFrame(); } } }//package org.flixel
Section 65
//FlxState (org.flixel.FlxState) package org.flixel { import flash.display.*; public class FlxState extends Sprite { public var defaultGroup:FlxGroup; public static var screen:FlxSprite; public static var bgColor:uint; public function FlxState(){ defaultGroup = new FlxGroup(); if (screen == null){ screen = new FlxSprite(); screen.createGraphic(FlxG.width, FlxG.height, 0, true); screen.origin.x = (screen.origin.y = 0); screen.antialiasing = true; }; } public function add(_arg1:FlxObject):FlxObject{ return (defaultGroup.add(_arg1)); } public function preProcess():void{ screen.fill(bgColor); } public function collide():void{ defaultGroup.collide(); } public function render():void{ defaultGroup.render(); } public function update():void{ defaultGroup.update(); } public function destroy():void{ defaultGroup.destroy(); } public function create():void{ } public function postProcess():void{ } } }//package org.flixel
Section 66
//FlxText (org.flixel.FlxText) package org.flixel { import flash.display.*; import flash.text.*; public class FlxText extends FlxSprite { protected var _tf:TextField; protected var _regen:Boolean; protected var _shadow:uint; public function FlxText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:String=null){ super(_arg1, _arg2); createGraphic(_arg3, 1); if (_arg4 == null){ _arg4 = ""; }; _tf = new TextField(); _tf.width = _arg3; _tf.embedFonts = true; _tf.selectable = false; _tf.sharpness = 100; _tf.multiline = true; _tf.wordWrap = true; _tf.text = _arg4; var _local5:TextFormat = new TextFormat("system", 8, 0xFFFFFF); _tf.defaultTextFormat = _local5; _tf.setTextFormat(_local5); if (_arg4.length <= 0){ _tf.height = 1; } else { _tf.height = 10; }; _regen = true; _shadow = 0; solid = false; calcFrame(); } public function get shadow():uint{ return (_shadow); } public function get size():Number{ return ((_tf.defaultTextFormat.size as Number)); } override public function get color():uint{ return ((_tf.defaultTextFormat.color as uint)); } override public function set color(_arg1:uint):void{ var _local2:TextFormat = dtfCopy(); _local2.color = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } public function set shadow(_arg1:uint):void{ _shadow = _arg1; calcFrame(); } public function set size(_arg1:Number):void{ var _local2:TextFormat = dtfCopy(); _local2.size = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } public function get alignment():String{ return (_tf.defaultTextFormat.align); } protected function dtfCopy():TextFormat{ var _local1:TextFormat = _tf.defaultTextFormat; return (new TextFormat(_local1.font, _local1.size, _local1.color, _local1.bold, _local1.italic, _local1.underline, _local1.url, _local1.target, _local1.align)); } public function get text():String{ return (_tf.text); } public function get font():String{ return (_tf.defaultTextFormat.font); } public function set alignment(_arg1:String):void{ var _local2:TextFormat = dtfCopy(); _local2.align = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); calcFrame(); } public function set font(_arg1:String):void{ var _local2:TextFormat = dtfCopy(); _local2.font = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } override protected function calcFrame():void{ var _local3:uint; var _local4:uint; if ((((((_tf == null)) || ((_tf.text == null)))) || ((_tf.text.length <= 0)))){ _pixels.fillRect(_flashRect, 0); return; }; if (_regen){ _local3 = _tf.numLines; height = 0; _local4 = 0; while (_local4 < _local3) { height = (height + _tf.getLineMetrics(_local4).height); _local4++; }; height = (height + 4); _pixels = new BitmapData(width, height, true, 0); frameHeight = height; _tf.height = (height * 1.2); _flashRect.x = 0; _flashRect.y = 0; _flashRect.width = width; _flashRect.height = height; _regen = false; } else { _pixels.fillRect(_flashRect, 0); }; var _local1:TextFormat = _tf.defaultTextFormat; var _local2:TextFormat = _local1; _mtx.identity(); if ((((_local1.align == "center")) && ((_tf.numLines == 1)))){ _local2 = new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, "left"); _tf.setTextFormat(_local2); _mtx.translate(Math.floor(((width - _tf.getLineMetrics(0).width) / 2)), 0); }; if (_shadow > 0){ _tf.setTextFormat(new TextFormat(_local2.font, _local2.size, _shadow, null, null, null, null, null, _local2.align)); _mtx.translate(1, 1); _pixels.draw(_tf, _mtx, _ct); _mtx.translate(-1, -1); _tf.setTextFormat(new TextFormat(_local2.font, _local2.size, _local2.color, null, null, null, null, null, _local2.align)); }; _pixels.draw(_tf, _mtx, _ct); _tf.setTextFormat(new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, _local1.align)); _framePixels = new BitmapData(_pixels.width, _pixels.height, true, 0); _framePixels.copyPixels(_pixels, _flashRect, _flashPointZero); if (solid){ refreshHulls(); }; } public function setFormat(_arg1:String=null, _arg2:Number=8, _arg3:uint=0xFFFFFF, _arg4:String=null, _arg5:uint=0):FlxText{ if (_arg1 == null){ _arg1 = ""; }; var _local6:TextFormat = dtfCopy(); _local6.font = _arg1; _local6.size = _arg2; _local6.color = _arg3; _local6.align = _arg4; _tf.defaultTextFormat = _local6; _tf.setTextFormat(_local6); _shadow = _arg5; _regen = true; calcFrame(); return (this); } public function set text(_arg1:String):void{ _tf.text = _arg1; _regen = true; calcFrame(); } } }//package org.flixel
Section 67
//FlxTileblock (org.flixel.FlxTileblock) package org.flixel { import flash.display.*; import flash.geom.*; public class FlxTileblock extends FlxObject { protected var _pixels:BitmapData; protected var _flashRect:Rectangle; protected var _rects:Array; protected var _tileSize:uint; public function FlxTileblock(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint){ x = _arg1; y = _arg2; width = _arg3; height = _arg4; fixed = true; refreshHulls(); } override public function render():void{ renderBlock(); } public function loadGraphic(_arg1:Class, _arg2:uint=0):void{ if (_arg1 == null){ return; }; _pixels = FlxG.addBitmap(_arg1); _rects = new Array(); _tileSize = _pixels.height; var _local3:uint = Math.ceil((width / _tileSize)); var _local4:uint = Math.ceil((height / _tileSize)); width = (_local3 * _tileSize); height = (_local4 * _tileSize); var _local5:uint = (_local3 * _local4); var _local6:uint = (_pixels.width / _tileSize); var _local7:uint; while (_local7 < _local5) { if ((FlxU.random() * (_local6 + _arg2)) > _arg2){ _rects[_rects.length] = new Rectangle((_tileSize * Math.floor((FlxU.random() * _local6))), 0, _tileSize, _tileSize); } else { _rects[_rects.length] = null; }; _local7++; }; } protected function renderBlock():void{ getScreenXY(_point); var _local1:int = _point.x; var _local2:uint = _rects.length; _flashPoint.x = _point.x; _flashPoint.y = _point.y; var _local3:uint; while (_local3 < _local2) { _flashRect = (_rects[_local3] as Rectangle); if (_flashRect != null){ FlxG.buffer.copyPixels(_pixels, _flashRect, _flashPoint, null, null, true); }; _flashPoint.x = (_flashPoint.x + _tileSize); if (_flashPoint.x >= (_local1 + width)){ _flashPoint.x = _local1; _flashPoint.y = (_flashPoint.y + _tileSize); }; _local3++; }; } } }//package org.flixel
Section 68
//FlxTilemap (org.flixel.FlxTilemap) package org.flixel { import flash.display.*; import flash.geom.*; public class FlxTilemap extends FlxObject { protected var _tileWidth:uint; protected var _screenRows:uint; protected var _data:Array; public var startingIndex:uint; protected var _pixels:BitmapData; protected var _block:FlxObject; protected var _callbacks:Array; protected var _rects:Array; protected var _tileHeight:uint; public var totalTiles:uint; protected var _screenCols:uint; public var drawIndex:uint; public var auto:uint; protected var _flashRect:Rectangle; public var heightInTiles:uint; public var widthInTiles:uint; public var collideIndex:uint; public static const ALT:uint = 2; public static const AUTO:uint = 1; public static const OFF:uint = 0; public static var ImgAutoAlt:Class = FlxTilemap_ImgAutoAlt; public static var ImgAuto:Class = FlxTilemap_ImgAuto; public function FlxTilemap(){ auto = OFF; collideIndex = 1; startingIndex = 0; drawIndex = 1; widthInTiles = 0; heightInTiles = 0; totalTiles = 0; _data = new Array(); _tileWidth = 0; _tileHeight = 0; _rects = null; _pixels = null; _block = new FlxObject(); _block.width = (_block.height = 0); _block.fixed = true; _callbacks = new Array(); fixed = true; } public function setTileByIndex(_arg1:uint, _arg2:uint, _arg3:Boolean=true):Boolean{ var _local5:uint; if (_arg1 >= _data.length){ return (false); }; var _local4:Boolean; _data[_arg1] = _arg2; if (!_arg3){ return (_local4); }; if (auto == OFF){ updateTile(_arg1); return (_local4); }; var _local6:int = (int((_arg1 / widthInTiles)) - 1); var _local7:int = (_local6 + 3); var _local8:int = ((_arg1 % widthInTiles) - 1); var _local9:int = (_local8 + 3); while (_local6 < _local7) { _local8 = (_local9 - 3); while (_local8 < _local9) { if ((((((((_local6 >= 0)) && ((_local6 < heightInTiles)))) && ((_local8 >= 0)))) && ((_local8 < widthInTiles)))){ _local5 = ((_local6 * widthInTiles) + _local8); autoTile(_local5); updateTile(_local5); }; _local8++; }; _local6++; }; return (_local4); } public function getTile(_arg1:uint, _arg2:uint):uint{ return (getTileByIndex(((_arg2 * widthInTiles) + _arg1))); } public function setCallback(_arg1:uint, _arg2:Function, _arg3:uint=1):void{ if (_arg3 <= 0){ return; }; var _local4:uint = _arg1; while (_local4 < (_arg1 + _arg3)) { _callbacks[_local4] = _arg2; _local4++; }; } override public function overlaps(_arg1:FlxObject):Boolean{ var _local2:uint; var _local3:uint; var _local4:uint; var _local5:uint; var _local6:Array = new Array(); var _local7:uint = Math.floor(((_arg1.x - x) / _tileWidth)); var _local8:uint = Math.floor(((_arg1.y - y) / _tileHeight)); var _local9:uint = (Math.ceil((_arg1.width / _tileWidth)) + 1); var _local10:uint = (Math.ceil((_arg1.height / _tileHeight)) + 1); var _local11:uint; while (_local11 < _local10) { if (_local11 >= heightInTiles){ break; }; _local3 = (((_local8 + _local11) * widthInTiles) + _local7); _local2 = 0; while (_local2 < _local9) { if (_local2 >= widthInTiles){ break; }; _local5 = (_data[(_local3 + _local2)] as uint); if (_local5 >= collideIndex){ _local6[_local6.length] = {x:(x + ((_local7 + _local2) * _tileWidth)), y:(y + ((_local8 + _local11) * _tileHeight)), data:_local5}; }; _local2++; }; _local11++; }; var _local12:uint = _local6.length; var _local13:Boolean; _local4 = 0; while (_local4 < _local12) { _block.x = _local6[_local4].x; _block.y = _local6[_local4].y; if (_block.overlaps(_arg1)){ return (true); }; _local4++; }; return (false); } public function loadMap(_arg1:String, _arg2:Class, _arg3:uint=0, _arg4:uint=0):FlxTilemap{ var _local5:uint; var _local6:Array; var _local9:uint; var _local7:Array = _arg1.split("\n"); heightInTiles = _local7.length; var _local8:uint; while (_local8 < heightInTiles) { _local6 = _local7[_local8].split(","); if (_local6.length <= 1){ heightInTiles--; } else { if (widthInTiles == 0){ widthInTiles = _local6.length; }; _local5 = 0; while (_local5 < widthInTiles) { _data[_data.length] = uint(_local6[_local5]); _local5++; }; }; _local8++; }; totalTiles = (widthInTiles * heightInTiles); if (auto > OFF){ collideIndex = (startingIndex = (drawIndex = 1)); _local9 = 0; while (_local9 < totalTiles) { autoTile(_local9); _local9++; }; }; _pixels = FlxG.addBitmap(_arg2); _tileWidth = _arg3; if (_tileWidth == 0){ _tileWidth = _pixels.height; }; _tileHeight = _arg4; if (_tileHeight == 0){ _tileHeight = _tileWidth; }; _block.width = _tileWidth; _block.height = _tileHeight; width = (widthInTiles * _tileWidth); height = (heightInTiles * _tileHeight); _rects = new Array(totalTiles); _local9 = 0; while (_local9 < totalTiles) { updateTile(_local9); _local9++; }; _screenRows = (Math.ceil((FlxG.height / _tileHeight)) + 1); if (_screenRows > heightInTiles){ _screenRows = heightInTiles; }; _screenCols = (Math.ceil((FlxG.width / _tileWidth)) + 1); if (_screenCols > widthInTiles){ _screenCols = widthInTiles; }; refreshHulls(); return (this); } public function ray(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:FlxPoint, _arg6:Number=1):Boolean{ var _local16:uint; var _local17:uint; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local7:Number = _tileWidth; if (_tileHeight < _tileWidth){ _local7 = _tileHeight; }; _local7 = (_local7 / _arg6); var _local8:Number = (_arg3 - _arg1); var _local9:Number = (_arg4 - _arg2); var _local10:Number = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); var _local11:uint = Math.ceil((_local10 / _local7)); var _local12:Number = (_local8 / _local11); var _local13:Number = (_local9 / _local11); var _local14:Number = (_arg1 - _local12); var _local15:Number = (_arg2 - _local13); var _local18:uint; while (_local18 < _local11) { _local14 = (_local14 + _local12); _local15 = (_local15 + _local13); if ((((((((_local14 < 0)) || ((_local14 > width)))) || ((_local15 < 0)))) || ((_local15 > height)))){ } else { _local16 = (_local14 / _tileWidth); _local17 = (_local15 / _tileHeight); if ((_data[((_local17 * widthInTiles) + _local16)] as uint) >= collideIndex){ _local16 = (_local16 * _tileWidth); _local17 = (_local17 * _tileHeight); _local19 = 0; _local20 = 0; _local22 = (_local14 - _local12); _local23 = (_local15 - _local13); _local21 = _local16; if (_local8 < 0){ _local21 = (_local21 + _tileWidth); }; _local19 = _local21; _local20 = (_local23 + (_local13 * ((_local21 - _local22) / _local12))); if ((((_local20 > _local17)) && ((_local20 < (_local17 + _tileHeight))))){ if (_arg5 == null){ _arg5 = new FlxPoint(); }; _arg5.x = _local19; _arg5.y = _local20; return (true); }; _local21 = _local17; if (_local9 < 0){ _local21 = (_local21 + _tileHeight); }; _local19 = (_local22 + (_local12 * ((_local21 - _local23) / _local13))); _local20 = _local21; if ((((_local19 > _local16)) && ((_local19 < (_local16 + _tileWidth))))){ if (_arg5 == null){ _arg5 = new FlxPoint(); }; _arg5.x = _local19; _arg5.y = _local20; return (true); }; return (false); }; }; _local18++; }; return (false); } override public function preCollide(_arg1:FlxObject):void{ var _local2:uint; var _local3:uint; colOffsets.length = 0; var _local4:int = FlxU.floor(((_arg1.x - x) / _tileWidth)); var _local5:int = FlxU.floor(((_arg1.y - y) / _tileHeight)); var _local6:uint = (FlxU.ceil((_arg1.width / _tileWidth)) + 1); var _local7:uint = (FlxU.ceil((_arg1.height / _tileHeight)) + 1); var _local8:uint; while (_local8 < _local7) { if (_local8 >= heightInTiles){ break; }; _local3 = (((_local5 + _local8) * widthInTiles) + _local4); _local2 = 0; while (_local2 < _local6) { if (_local2 >= widthInTiles){ break; }; if ((_data[(_local3 + _local2)] as uint) >= collideIndex){ colOffsets[colOffsets.length] = new FlxPoint((x + ((_local4 + _local2) * _tileWidth)), (y + ((_local5 + _local8) * _tileHeight))); }; _local2++; }; _local8++; }; } override public function render():void{ renderTilemap(); } protected function updateTile(_arg1:uint):void{ if (_data[_arg1] < drawIndex){ _rects[_arg1] = null; return; }; var _local2:uint = ((_data[_arg1] - startingIndex) * _tileWidth); var _local3:uint; if (_local2 >= _pixels.width){ _local3 = (uint((_local2 / _pixels.width)) * _tileHeight); _local2 = (_local2 % _pixels.width); }; _rects[_arg1] = new Rectangle(_local2, _local3, _tileWidth, _tileHeight); } override public function refreshHulls():void{ colHullX.x = 0; colHullX.y = 0; colHullX.width = _tileWidth; colHullX.height = _tileHeight; colHullY.x = 0; colHullY.y = 0; colHullY.width = _tileWidth; colHullY.height = _tileHeight; } public function setTile(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=true):Boolean{ if ((((_arg1 >= widthInTiles)) || ((_arg2 >= heightInTiles)))){ return (false); }; return (setTileByIndex(((_arg2 * widthInTiles) + _arg1), _arg3, _arg4)); } public function follow(_arg1:int=0):void{ FlxG.followBounds((x + (_arg1 * _tileWidth)), (y + (_arg1 * _tileHeight)), (width - (_arg1 * _tileWidth)), (height - (_arg1 * _tileHeight))); } protected function renderTilemap():void{ var _local5:uint; var _local6:uint; getScreenXY(_point); _flashPoint.x = _point.x; _flashPoint.y = _point.y; var _local1:int = Math.floor((-(_flashPoint.x) / _tileWidth)); var _local2:int = Math.floor((-(_flashPoint.y) / _tileHeight)); if (_local1 < 0){ _local1 = 0; }; if (_local1 > (widthInTiles - _screenCols)){ _local1 = (widthInTiles - _screenCols); }; if (_local2 < 0){ _local2 = 0; }; if (_local2 > (heightInTiles - _screenRows)){ _local2 = (heightInTiles - _screenRows); }; var _local3:int = ((_local2 * widthInTiles) + _local1); _flashPoint.x = (_flashPoint.x + (_local1 * _tileWidth)); _flashPoint.y = (_flashPoint.y + (_local2 * _tileHeight)); var _local4:int = _flashPoint.x; var _local7:uint; while (_local7 < _screenRows) { _local6 = _local3; _local5 = 0; while (_local5 < _screenCols) { var _temp1 = _local6; _local6 = (_local6 + 1); _flashRect = (_rects[_temp1] as Rectangle); if (_flashRect != null){ FlxG.buffer.copyPixels(_pixels, _flashRect, _flashPoint, null, null, true); }; _flashPoint.x = (_flashPoint.x + _tileWidth); _local5++; }; _local3 = (_local3 + widthInTiles); _flashPoint.x = _local4; _flashPoint.y = (_flashPoint.y + _tileHeight); _local7++; }; } protected function autoTile(_arg1:uint):void{ if (_data[_arg1] == 0){ return; }; _data[_arg1] = 0; if (((((_arg1 - widthInTiles) < 0)) || ((_data[(_arg1 - widthInTiles)] > 0)))){ _data[_arg1] = (_data[_arg1] + 1); }; if (((((_arg1 % widthInTiles) >= (widthInTiles - 1))) || ((_data[(_arg1 + 1)] > 0)))){ _data[_arg1] = (_data[_arg1] + 2); }; if (((((_arg1 + widthInTiles) >= totalTiles)) || ((_data[(_arg1 + widthInTiles)] > 0)))){ _data[_arg1] = (_data[_arg1] + 4); }; if (((((_arg1 % widthInTiles) <= 0)) || ((_data[(_arg1 - 1)] > 0)))){ _data[_arg1] = (_data[_arg1] + 8); }; if ((((auto == ALT)) && ((_data[_arg1] == 15)))){ if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) - 1)] <= 0)))){ _data[_arg1] = 1; }; if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) - 1)] <= 0)))){ _data[_arg1] = 2; }; if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) + 1)] <= 0)))){ _data[_arg1] = 4; }; if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) + 1)] <= 0)))){ _data[_arg1] = 8; }; }; _data[_arg1] = (_data[_arg1] + 1); } public function getTileByIndex(_arg1:uint):uint{ return ((_data[_arg1] as uint)); } public static function arrayToCSV(_arg1:Array, _arg2:int):String{ var _local3:uint; var _local4:uint; var _local5:String; var _local6:int = (_arg1.length / _arg2); _local3 = 0; while (_local3 < _local6) { _local4 = 0; while (_local4 < _arg2) { if (_local4 == 0){ if (_local3 == 0){ _local5 = (_local5 + _arg1[0]); } else { _local5 = (_local5 + ("\n" + _arg1[(_local3 * _arg2)])); }; } else { _local5 = (_local5 + (", " + _arg1[((_local3 * _arg2) + _local4)])); }; _local4++; }; _local3++; }; return (_local5); } public static function pngToCSV(_arg1:Class, _arg2:Boolean=false, _arg3:uint=1):String{ var _local4:Bitmap; var _local6:uint; var _local7:uint; var _local8:uint; var _local9:String; var _local12:Bitmap; var _local13:Matrix; if (_arg3 <= 1){ _local4 = new (_arg1); } else { _local12 = new (_arg1); _local4 = new Bitmap(new BitmapData((_local12.width * _arg3), (_local12.height * _arg3))); _local13 = new Matrix(); _local13.scale(_arg3, _arg3); _local4.bitmapData.draw(_local12, _local13); }; var _local5:BitmapData = _local4.bitmapData; var _local10:uint = _local4.width; var _local11:uint = _local4.height; _local6 = 0; while (_local6 < _local11) { _local7 = 0; while (_local7 < _local10) { _local8 = _local5.getPixel(_local7, _local6); if (((((_arg2) && ((_local8 > 0)))) || (((!(_arg2)) && ((_local8 == 0)))))){ _local8 = 1; } else { _local8 = 0; }; if (_local7 == 0){ if (_local6 == 0){ _local9 = (_local9 + _local8); } else { _local9 = (_local9 + ("\n" + _local8)); }; } else { _local9 = (_local9 + (", " + _local8)); }; _local7++; }; _local6++; }; return (_local9); } } }//package org.flixel
Section 69
//FlxTilemap_ImgAuto (org.flixel.FlxTilemap_ImgAuto) package org.flixel { import mx.core.*; public class FlxTilemap_ImgAuto extends BitmapAsset { } }//package org.flixel
Section 70
//FlxTilemap_ImgAutoAlt (org.flixel.FlxTilemap_ImgAutoAlt) package org.flixel { import mx.core.*; public class FlxTilemap_ImgAutoAlt extends BitmapAsset { } }//package org.flixel
Section 71
//FlxU (org.flixel.FlxU) package org.flixel { import flash.utils.*; import flash.net.*; public class FlxU { protected static var _originalSeed:Number; public static var quadTree:FlxQuadTree; protected static var _seed:Number; static var roundingError:Number = 1E-7; public static var quadTreeBounds:FlxRect; public static function random(_arg1:Boolean=true):Number{ var _local2:Number; if (((_arg1) && (!(isNaN(_seed))))){ _local2 = randomize(_seed); _seed = mutate(_seed, _local2); return (_local2); }; return (Math.random()); } public static function mutate(_arg1:Number, _arg2:Number):Number{ _arg1 = (_arg1 + _arg2); if (_arg1 > 1){ _arg1 = (_arg1 - int(_arg1)); }; return (_arg1); } public static function overlap(_arg1:FlxObject, _arg2:FlxObject, _arg3:Function=null):Boolean{ if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){ return (false); }; quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height); quadTree.add(_arg1, FlxQuadTree.A_LIST); if (_arg1 === _arg2){ return (quadTree.overlap(false, _arg3)); }; quadTree.add(_arg2, FlxQuadTree.B_LIST); return (quadTree.overlap(true, _arg3)); } public static function getClass(_arg1:String):Class{ return ((getDefinitionByName(_arg1) as Class)); } public static function openURL(_arg1:String):void{ navigateToURL(new URLRequest(_arg1), "_blank"); } public static function floor(_arg1:Number):Number{ var _local2:Number = int(_arg1); return (((_arg1)>0) ? _local2 : ((_local2)!=_arg1) ? (_local2 - 1) : _local2); } public static function solveYCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{ var _local5:Number; var _local7:Boolean; var _local14:uint; var _local15:uint; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local3:Number = _arg1.colVector.y; var _local4:Number = _arg2.colVector.y; if (_local3 == _local4){ return (false); }; _arg1.preCollide(_arg2); _arg2.preCollide(_arg1); var _local6:Boolean; var _local8 = (_local3 == 0); var _local9 = (_local3 < 0); var _local10 = (_local3 > 0); var _local11 = (_local4 == 0); var _local12 = (_local4 < 0); var _local13 = (_local4 > 0); var _local16:FlxRect = _arg1.colHullY; var _local17:FlxRect = _arg2.colHullY; var _local18:Array = _arg1.colOffsets; var _local19:Array = _arg2.colOffsets; var _local20:uint = _local18.length; var _local21:uint = _local19.length; _local7 = ((((((((((_local8) && (_local12))) || (((_local10) && (_local11))))) || (((_local10) && (_local12))))) || (((((_local9) && (_local12))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local10) && (_local13))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4)))))); if ((_local7) ? ((!(_arg1.collideBottom)) || (!(_arg2.collideTop))) : ((!(_arg1.collideTop)) || (!(_arg2.collideBottom)))){ return (false); }; _local14 = 0; while (_local14 < _local20) { _local22 = _local18[_local14].x; _local23 = _local18[_local14].y; _local16.x = (_local16.x + _local22); _local16.y = (_local16.y + _local23); _local15 = 0; while (_local15 < _local21) { _local24 = _local19[_local15].x; _local25 = _local19[_local15].y; _local17.x = (_local17.x + _local24); _local17.y = (_local17.y + _local25); if (((((((((_local16.x + _local16.width) < (_local17.x + roundingError))) || (((_local16.x + roundingError) > (_local17.x + _local17.width))))) || (((_local16.y + _local16.height) < (_local17.y + roundingError))))) || (((_local16.y + roundingError) > (_local17.y + _local17.height))))){ _local17.x = (_local17.x - _local24); _local17.y = (_local17.y - _local25); } else { if (_local7){ if (_local9){ _local26 = (_local16.y + _arg1.colHullX.height); } else { _local26 = (_local16.y + _local16.height); }; if (_local12){ _local27 = _local17.y; } else { _local27 = ((_local17.y + _local17.height) - _arg2.colHullX.height); }; } else { if (_local12){ _local26 = (-(_local17.y) - _arg2.colHullX.height); } else { _local26 = (-(_local17.y) - _local17.height); }; if (_local9){ _local27 = -(_local16.y); } else { _local27 = ((-(_local16.y) - _local16.height) + _arg1.colHullX.height); }; }; _local5 = (_local26 - _local27); if ((((((_local5 == 0)) || (((!(_arg1.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local16.height * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local5)>0) ? _local5 : -(_local5) > (_local17.height * 0.8))))))){ _local17.x = (_local17.x - _local24); _local17.y = (_local17.y - _local25); } else { _local6 = true; _local28 = _arg2.velocity.y; _local29 = _arg1.velocity.y; if (((!(_arg1.fixed)) && (_arg2.fixed))){ if (_arg1._group){ _arg1.reset(_arg1.x, (_arg1.y - _local5)); } else { _arg1.y = (_arg1.y - _local5); }; } else { if (((_arg1.fixed) && (!(_arg2.fixed)))){ if (_arg2._group){ _arg2.reset(_arg2.x, (_arg2.y + _local5)); } else { _arg2.y = (_arg2.y + _local5); }; } else { if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){ _local5 = (_local5 / 2); if (_arg1._group){ _arg1.reset(_arg1.x, (_arg1.y - _local5)); } else { _arg1.y = (_arg1.y - _local5); }; if (_arg2._group){ _arg2.reset(_arg2.x, (_arg2.y + _local5)); } else { _arg2.y = (_arg2.y + _local5); }; _local28 = (_local28 / 2); _local29 = (_local29 / 2); }; }; }; if (_local7){ _arg1.hitBottom(_arg2, _local28); _arg2.hitTop(_arg1, _local29); } else { _arg1.hitTop(_arg2, _local28); _arg2.hitBottom(_arg1, _local29); }; if (((!(_arg1.fixed)) && (!((_local5 == 0))))){ if (_local7){ _local16.y = (_local16.y - _local5); if (((_arg2.fixed) && (_arg2.moves))){ _local28 = _arg2.colVector.x; _arg1.x = (_arg1.x + _local28); _local16.x = (_local16.x + _local28); _arg1.colHullX.x = (_arg1.colHullX.x + _local28); }; } else { _local16.y = (_local16.y - _local5); _local16.height = (_local16.height + _local5); }; }; if (((!(_arg2.fixed)) && (!((_local5 == 0))))){ if (_local7){ _local17.y = (_local17.y + _local5); _local17.height = (_local17.height - _local5); } else { _local17.height = (_local17.height + _local5); if (((_arg1.fixed) && (_arg1.moves))){ _local29 = _arg1.colVector.x; _arg2.x = (_arg2.x + _local29); _local17.x = (_local17.x + _local29); _arg2.colHullX.x = (_arg2.colHullX.x + _local29); }; }; }; _local17.x = (_local17.x - _local24); _local17.y = (_local17.y - _local25); }; }; _local15++; }; _local16.x = (_local16.x - _local22); _local16.y = (_local16.y - _local23); _local14++; }; return (_local6); } public static function ceil(_arg1:Number):Number{ var _local2:Number = int(_arg1); return (((_arg1)>0) ? ((_local2)!=_arg1) ? (_local2 + 1) : _local2 : _local2); } public static function getAngle(_arg1:Number, _arg2:Number):Number{ return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI)); } public static function setWorldBounds(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{ if ((((((((_arg1 == 0)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){ _arg1 = (-128 * FlxG.width); _arg2 = (-128 * FlxG.height); _arg3 = (0x0100 * FlxG.width); _arg4 = (0x0100 * FlxG.height); }; if (quadTreeBounds == null){ quadTreeBounds = new FlxRect(); }; quadTreeBounds.x = _arg1; quadTreeBounds.y = _arg2; if (_arg3 != 0){ quadTreeBounds.width = _arg3; }; if (_arg4 != 0){ quadTreeBounds.height = _arg4; }; } public static function set seed(_arg1:Number):void{ _seed = _arg1; _originalSeed = _seed; } public static function getClassName(_arg1:Object, _arg2:Boolean=false):String{ var _local3:String = getQualifiedClassName(_arg1); _local3 = _local3.replace("::", "."); if (_arg2){ _local3 = _local3.substr((_local3.lastIndexOf(".") + 1)); }; return (_local3); } public static function randomize(_arg1:Number):Number{ return ((((69621 * int((_arg1 * 2147483647))) % 2147483647) / 2147483647)); } public static function abs(_arg1:Number):Number{ return (((_arg1)>0) ? _arg1 : -(_arg1)); } public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{ var _local5:Number; if (_arg2 != 0){ _arg1 = (_arg1 + (_arg2 * FlxG.elapsed)); } else { if (_arg3 != 0){ _local5 = (_arg3 * FlxG.elapsed); if ((_arg1 - _local5) > 0){ _arg1 = (_arg1 - _local5); } else { if ((_arg1 + _local5) < 0){ _arg1 = (_arg1 + _local5); } else { _arg1 = 0; }; }; }; }; if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){ if (_arg1 > _arg4){ _arg1 = _arg4; } else { if (_arg1 < -(_arg4)){ _arg1 = -(_arg4); }; }; }; return (_arg1); } public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:FlxPoint=null):FlxPoint{ if (_arg6 == null){ _arg6 = new FlxPoint(); }; var _local7:Number = ((-(_arg5) / 180) * Math.PI); var _local8:Number = (_arg1 - _arg3); var _local9:Number = (_arg4 - _arg2); _arg6.x = ((_arg3 + (Math.cos(_local7) * _local8)) - (Math.sin(_local7) * _local9)); _arg6.y = (_arg4 - ((Math.sin(_local7) * _local8) + (Math.cos(_local7) * _local9))); return (_arg6); } public static function get seed():Number{ return (_originalSeed); } public static function solveXCollision(_arg1:FlxObject, _arg2:FlxObject):Boolean{ var _local5:Boolean; var _local6:Boolean; var _local7:Number; var _local9:Boolean; var _local16:uint; var _local17:uint; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local3:Number = _arg1.colVector.x; var _local4:Number = _arg2.colVector.x; if (_local3 == _local4){ return (false); }; _arg1.preCollide(_arg2); _arg2.preCollide(_arg1); var _local8:Boolean; var _local10 = (_local3 == 0); var _local11 = (_local3 < 0); var _local12 = (_local3 > 0); var _local13 = (_local4 == 0); var _local14 = (_local4 < 0); var _local15 = (_local4 > 0); var _local18:FlxRect = _arg1.colHullX; var _local19:FlxRect = _arg2.colHullX; var _local20:Array = _arg1.colOffsets; var _local21:Array = _arg2.colOffsets; var _local22:uint = _local20.length; var _local23:uint = _local21.length; _local9 = ((((((((((_local10) && (_local14))) || (((_local12) && (_local13))))) || (((_local12) && (_local14))))) || (((((_local11) && (_local14))) && ((((_local3)>0) ? _local3 : -(_local3) < ((_local4)>0) ? _local4 : -(_local4))))))) || (((((_local12) && (_local15))) && ((((_local3)>0) ? _local3 : -(_local3) > ((_local4)>0) ? _local4 : -(_local4)))))); if ((_local9) ? ((!(_arg1.collideRight)) || (!(_arg2.collideLeft))) : ((!(_arg1.collideLeft)) || (!(_arg2.collideRight)))){ return (false); }; _local16 = 0; while (_local16 < _local22) { _local24 = _local20[_local16].x; _local25 = _local20[_local16].y; _local18.x = (_local18.x + _local24); _local18.y = (_local18.y + _local25); _local17 = 0; while (_local17 < _local23) { _local26 = _local21[_local17].x; _local27 = _local21[_local17].y; _local19.x = (_local19.x + _local26); _local19.y = (_local19.y + _local27); if (((((((((_local18.x + _local18.width) < (_local19.x + roundingError))) || (((_local18.x + roundingError) > (_local19.x + _local19.width))))) || (((_local18.y + _local18.height) < (_local19.y + roundingError))))) || (((_local18.y + roundingError) > (_local19.y + _local19.height))))){ _local19.x = (_local19.x - _local26); _local19.y = (_local19.y - _local27); } else { if (_local9){ if (_local11){ _local28 = (_local18.x + _arg1.colHullY.width); } else { _local28 = (_local18.x + _local18.width); }; if (_local14){ _local29 = _local19.x; } else { _local29 = ((_local19.x + _local19.width) - _arg2.colHullY.width); }; } else { if (_local14){ _local28 = (-(_local19.x) - _arg2.colHullY.width); } else { _local28 = (-(_local19.x) - _local19.width); }; if (_local11){ _local29 = -(_local18.x); } else { _local29 = ((-(_local18.x) - _local18.width) + _arg1.colHullY.width); }; }; _local7 = (_local28 - _local29); if ((((((_local7 == 0)) || (((!(_arg1.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local18.width * 0.8))))))) || (((!(_arg2.fixed)) && ((((_local7)>0) ? _local7 : -(_local7) > (_local19.width * 0.8))))))){ _local19.x = (_local19.x - _local26); _local19.y = (_local19.y - _local27); } else { _local8 = true; _local30 = _arg2.velocity.x; _local31 = _arg1.velocity.x; if (((!(_arg1.fixed)) && (_arg2.fixed))){ if (_arg1._group){ _arg1.reset((_arg1.x - _local7), _arg1.y); } else { _arg1.x = (_arg1.x - _local7); }; } else { if (((_arg1.fixed) && (!(_arg2.fixed)))){ if (_arg2._group){ _arg2.reset((_arg2.x + _local7), _arg2.y); } else { _arg2.x = (_arg2.x + _local7); }; } else { if (((!(_arg1.fixed)) && (!(_arg2.fixed)))){ _local7 = (_local7 / 2); if (_arg1._group){ _arg1.reset((_arg1.x - _local7), _arg1.y); } else { _arg1.x = (_arg1.x - _local7); }; if (_arg2._group){ _arg2.reset((_arg2.x + _local7), _arg2.y); } else { _arg2.x = (_arg2.x + _local7); }; _local30 = (_local30 / 2); _local31 = (_local31 / 2); }; }; }; if (_local9){ _arg1.hitRight(_arg2, _local30); _arg2.hitLeft(_arg1, _local31); } else { _arg1.hitLeft(_arg2, _local30); _arg2.hitRight(_arg1, _local31); }; if (((!(_arg1.fixed)) && (!((_local7 == 0))))){ if (_local9){ _local18.width = (_local18.width - _local7); } else { _local18.x = (_local18.x - _local7); _local18.width = (_local18.width + _local7); }; _arg1.colHullY.x = (_arg1.colHullY.x - _local7); }; if (((!(_arg2.fixed)) && (!((_local7 == 0))))){ if (_local9){ _local19.x = (_local19.x + _local7); _local19.width = (_local19.width - _local7); } else { _local19.width = (_local19.width + _local7); }; _arg2.colHullY.x = (_arg2.colHullY.x + _local7); }; _local19.x = (_local19.x - _local26); _local19.y = (_local19.y - _local27); }; }; _local17++; }; _local18.x = (_local18.x - _local24); _local18.y = (_local18.y - _local25); _local16++; }; return (_local8); } public static function collide(_arg1:FlxObject, _arg2:FlxObject):Boolean{ if ((((((((_arg1 == null)) || (!(_arg1.exists)))) || ((_arg2 == null)))) || (!(_arg2.exists)))){ return (false); }; quadTree = new FlxQuadTree(quadTreeBounds.x, quadTreeBounds.y, quadTreeBounds.width, quadTreeBounds.height); quadTree.add(_arg1, FlxQuadTree.A_LIST); var _local3 = (_arg1 === _arg2); if (!_local3){ quadTree.add(_arg2, FlxQuadTree.B_LIST); }; var _local4:Boolean = quadTree.overlap(!(_local3), solveXCollision); var _local5:Boolean = quadTree.overlap(!(_local3), solveYCollision); return (((_local4) || (_local5))); } } }//package org.flixel
Section 72
//Brand (spill.localisation.Brand) package spill.localisation { import flash.xml.*; public class Brand { public var domain:String; public var emailPage:String; public var name:String; public var site_id:uint; public var isExternal:Boolean;// = false public var id:Number; public var hostingDomain:String;// = "" public var preferedLanguage:String;// = "" public var moreLink:String;// = "" public var hasSendToFriendLink:Boolean;// = true public var emailLink:String;// = "game" public var portalGroup:uint; public var useGoogleAnalitics:Boolean;// = true private static const topLevelDoubles:String = (((((((((((((("ac.cn,ac.jp,ac.uk,ad.jp,adm.br,adv.br,agr.br," + "ah.cn,am.br,arq.br,art.br,asn.au,ato.br,av.tr,bel.tr,bio.br,biz.tr,bj.cn,bmd.br,") + "cim.br,cng.br,cnt.br,co.at,co.jp,co.uk,com.au,com.br,com.cn,com.eg,com.hk,com.mx,") + "com.ru,com.tr,com.tw,conf.au,cq.cn,csiro.au,dr.tr,ecn.br,edu.au,edu.br,edu.tr,") + "emu.id.au,eng.br,esp.br,etc.br,eti.br,eun.eg,far.br,fj.cn,fm.br,fnd.br,fot.br,") + "fst.br,g12.br,gb.com,gb.net,gd.cn,gen.tr,ggf.br,gob.mx,gov.au,gov.br,gov.cn,") + "gov.hk,gov.tr,gr.jp,gs.cn,gx.cn,gz.cn,ha.cn,hb.cn,he.cn,hi.cn,hk.cn,hl.cn,hn.cn,") + "id.au,idv.tw,imb.br,ind.br,inf.br,info.au,info.tr,jl.cn,jor.br,js.cn,jx.cn,k12.tr,") + "lel.br,ln.cn,ltd.uk,mat.br,me.uk,med.br,mil.br,mil.tr,mo.cn,mus.br,name.tr,ne.jp,") + "net.au,net.br,net.cn,net.eg,net.hk,net.lu,net.mx,net.ru,net.tr,net.tw,net.uk,") + "nm.cn,no.com,nom.br,not.br,ntr.br,nx.cn,odo.br,oop.br,or.at,or.jp,org.au,org.br,") + "org.cn,org.hk,org.lu,org.ru,org.tr,org.tw,org.uk,plc.uk,pol.tr,pp.ru,ppg.br,pro.br,") + "psc.br,psi.br,qh.cn,qsl.br,rec.br,sc.cn,sd.cn,se.com,se.net,sh.cn,slg.br,sn.cn,") + "srv.br,sx.cn,tel.tr,tj.cn,tmp.br,trd.br,tur.br,tv.br,tw.cn,uk.com,uk.net,vet.br,") + "wattle.id.au,web.tr,xj.cn,xz.cn,yn.cn,zj.cn,zlg.br,co.nr,co.nz,com.fr,com.ph,com.ar,"); private function get utm_campaign():String{ if (isExternal){ return (("utm_campaign=" + hostingDomain)); }; return (""); } public function exportXML():XML{ var _local3:XML; var _local1:XML = <portal/> ; _local1.@id = site_id; _local1.@language = preferedLanguage; _local1.@channel = portalGroup; var _local2:XML = <domain/> ; _local2.appendChild(new XMLNode(3, domain)); _local1.appendChild(_local2); if (moreLink){ _local3 = <more_games_path/> ; _local3.appendChild(new XMLNode(3, moreLink)); _local1.appendChild(_local3); }; _local2 = <game_path/> ; _local2.appendChild(new XMLNode(3, emailLink)); _local1.appendChild(_local2); if (!useGoogleAnalitics){ _local1.attributes.noGoogleAnalitics = true; }; if (!hasSendToFriendLink){ _local1.attributes.noSendToFriendLink = true; }; return (_local1); } public function getPromotionLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String="", _arg5:String=""):String{ var _local6:String = ("http://" + domain); _local6 = (_local6 + ((("/" + emailLink) + "/") + _arg2)); if (useGoogleAnalitics){ _local6 = (_local6 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal")); _local6 = (_local6 + ("&utm_campaign=" + _arg1)); _arg4 = stripSubDomain(_arg4); trace(_arg4); if (_arg4 == "localhost"){ _arg4 = "offline_play"; }; _local6 = (_local6 + ("&utm_source=" + _arg4)); if (((!((_arg5 == ""))) && (!((_arg5 == null))))){ _local6 = (_local6 + ("&utm_content=" + _arg5)); }; }; return (_local6); } private function get utm_source():String{ return (("utm_source=brandedgames_" + (isExternal) ? "external" : "internal")); } public function getMoreGamesLink(_arg1:String, _arg2:Boolean, _arg3:String="", _arg4:String=""):String{ var _local5:String = ("http://" + domain); _local5 = (_local5 + ("/" + moreLink)); if (useGoogleAnalitics){ _local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg2) ? "external" : "internal")); _local5 = (_local5 + ("&utm_campaign=" + _arg1)); _arg3 = stripSubDomain(_arg3); if (_arg3 == "localhost"){ _arg3 = "offline_play"; }; _local5 = (_local5 + ("&utm_source=" + _arg3)); if (((!((_arg4 == ""))) && (!((_arg4 == null))))){ _local5 = (_local5 + ("&utm_content=" + _arg4)); }; }; return (_local5); } public function get backgroundColor():uint{ return (PortalGroup.backgroundColors[portalGroup]); } private function get utm_term():String{ return ("utm_term="); } public function importXML(_arg1:XMLNode):void{ } public function getSendToFriendLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String=""):String{ if (!hasSendToFriendLink){ return (getMoreGamesLink(_arg1, _arg3)); }; var _local5:String = ("http://" + domain); _local5 = (_local5 + ((("/" + emailLink) + "/") + _arg2)); if (useGoogleAnalitics){ _local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal")); _local5 = (_local5 + ("&utm_campaign=" + _arg1)); _arg4 = stripSubDomain(_arg4); if (_arg4 == "localhost"){ _arg4 = "offline_play"; }; _local5 = (_local5 + ("&utm_source=" + _arg4)); _local5 = (_local5 + "&utm_content=send_to_friend"); }; return (_local5); } private static function stripSubDomain(_arg1:String):String{ if (!_arg1){ return (""); }; var _local2:Array = _arg1.split("."); if (_local2.length <= 2){ return (_arg1); }; _local2 = _local2.reverse(); if (topLevelDoubles.indexOf((((_local2[1] + ".") + _local2[0]) + ",")) > 0){ return (((((_local2[2] + ".") + _local2[1]) + ".") + _local2[0])); }; return (((_local2[1] + ".") + _local2[0])); } } }//package spill.localisation
Section 73
//BrandingLogo (spill.localisation.BrandingLogo) package spill.localisation { import flash.events.*; import flash.display.*; public class BrandingLogo extends MovieClip { public function BrandingLogo(){ addFrameScript(0, frame1); super(); stop(); mouseEnabled = false; mouseChildren = false; addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true); addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true); if (stage){ added(); }; brandingChanged(); } private function added(_arg1:Event=null):void{ SpilGame.addEventListener("brandingChanged", brandingChanged, false, 0, true); brandingChanged(); } private function brandingChanged(_arg1:Event=null):void{ if (SpilGame.currentBranding){ gotoAndStop(SpilGame.currentBranding.domain); }; } function frame1(){ stop(); } private function removed(_arg1:Event):void{ SpilGame.removeEventListener("brandingChanged", brandingChanged); } } }//package spill.localisation
Section 74
//Brandings (spill.localisation.Brandings) package spill.localisation { public class Brandings { private static var brands_by_id:Object = new Object(); private static var brands_by_domain:Object = new Object(); public static function getBrandByID(_arg1:Number):Brand{ return (brands_by_id[_arg1]); } public static function getBrandsArray():Array{ var _local2:Brand; var _local1:Array = new Array(); for each (_local2 in brands_by_domain) { _local1.push(_local2); }; return (_local1); } private static function addBrand(_arg1:Brand):Brand{ if (brands_by_domain[_arg1.domain]){ trace(("ERROR: Attempting to add duplicate brand by domain: " + _arg1.domain)); } else { brands_by_domain[_arg1.domain] = _arg1; }; if (brands_by_id[_arg1.site_id]){ trace(("ERROR: Attempting to add duplicate brand by id: " + _arg1.site_id)); } else { brands_by_id[_arg1.site_id] = _arg1; }; return (_arg1); } public static function initialize():void{ var _local1:Brand; _local1 = new Brand(); _local1.site_id = 79; _local1.domain = "www.agame.com"; _local1.preferedLanguage = "en_us"; _local1.portalGroup = PortalGroup.TWEEN; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 88; _local1.domain = "www.gamesgames.com"; _local1.preferedLanguage = "en_us"; _local1.portalGroup = PortalGroup.FAMILY; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 90; _local1.domain = "www.girlsgogames.com"; _local1.preferedLanguage = "en_us"; _local1.portalGroup = PortalGroup.GIRL; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 45; _local1.domain = "www.a10.com"; _local1.preferedLanguage = "en_us"; _local1.portalGroup = PortalGroup.TEEN; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 92; _local1.domain = "www.games.co.uk"; _local1.preferedLanguage = "en_uk"; _local1.portalGroup = PortalGroup.FAMILY; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 107; _local1.domain = "www.agame.co.uk"; _local1.preferedLanguage = "en_uk"; _local1.portalGroup = PortalGroup.TWEEN; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 102; _local1.domain = "www.girlsgogames.co.uk"; _local1.preferedLanguage = "en_uk"; _local1.portalGroup = PortalGroup.GIRL; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 2; _local1.domain = "www.game.com.cn"; _local1.moreLink = "moregames/"; _local1.preferedLanguage = "cn"; _local1.portalGroup = PortalGroup.NONE; _local1.useGoogleAnalitics = false; _local1.hasSendToFriendLink = false; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 25; _local1.domain = "www.spel.nl"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "nl"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 1; _local1.domain = "www.spelletjes.nl"; _local1.emailLink = "spel"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "nl"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 93; _local1.domain = "www.girlsgogames.nl"; _local1.emailLink = "spel"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "nl"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 12; _local1.domain = "www.jeu.fr"; _local1.emailLink = "jeu"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "fr"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 95; _local1.domain = "www.girlsgogames.fr"; _local1.emailLink = "jeu"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "fr"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 11; _local1.domain = "www.jeux.fr"; _local1.emailLink = "jeu"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "fr"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 26; _local1.domain = "www.spielen.com"; _local1.emailLink = "spiel"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "de"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 94; _local1.domain = "www.girlsgogames.de"; _local1.emailLink = "spiel"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "de"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 5; _local1.domain = "www.jetztspielen.de"; _local1.emailLink = "spiel"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "de"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 109; _local1.domain = "www.minigry.pl"; _local1.emailLink = "gra"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "pl"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 16; _local1.domain = "www.gry.pl"; _local1.emailLink = "gra"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "pl"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 98; _local1.domain = "www.girlsgogames.pl"; _local1.emailLink = "gra"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "pl"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 108; _local1.domain = "www.spel.se"; _local1.emailLink = "spel_"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "se"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 100; _local1.domain = "www.girlsgogames.se"; _local1.emailLink = "spel_"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "se"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 44; _local1.domain = "www.spela.se"; _local1.emailLink = "spel_"; _local1.preferedLanguage = "se"; _local1.portalGroup = PortalGroup.FAMILY; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 106; _local1.domain = "www.giocaregratis.it"; _local1.emailLink = "gioco"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "it"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 15; _local1.domain = "www.gioco.it"; _local1.emailLink = "gioco"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "it"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 99; _local1.domain = "www.girlsgogames.it"; _local1.emailLink = "gioco"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "it"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 97; _local1.domain = "www.zapjuegos.com"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 86; _local1.domain = "www.juegos.com"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 96; _local1.domain = "www.juegosdechicas.com"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 122; _local1.domain = "www.girlsgogames.es"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 125; _local1.domain = "www.juegos.mx"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 126; _local1.domain = "www.juegosdechicas.mx"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 127; _local1.domain = "www.juegos.com.ar"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 128; _local1.domain = "www.juegosdechicas.com.ar"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "es"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 91; _local1.domain = "www.clickjogos.com"; _local1.emailLink = "jogo"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "br"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 101; _local1.domain = "www.girlsgogames.com.br"; _local1.emailLink = "jogo"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "br"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 50; _local1.domain = "www.ojogos.com.br"; _local1.emailLink = "jogo"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "br"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 55; _local1.domain = "www.games.co.id"; _local1.emailLink = "permainanme"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "id"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 105; _local1.domain = "www.flashgames.ru"; _local1.emailLink = "igra"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "ru"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 104; _local1.domain = "www.girlsgogames.ru"; _local1.emailLink = "igra"; _local1.portalGroup = PortalGroup.GIRL; _local1.preferedLanguage = "ru"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 103; _local1.domain = "www.ourgames.ru"; _local1.emailLink = "igra"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "ru"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 24; _local1.domain = "www.game.co.in"; _local1.emailLink = "game"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "in"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 87; _local1.domain = "www.ojogos.pt"; _local1.emailLink = "jogo"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "pt"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 120; _local1.domain = "www.egames.jp"; _local1.emailLink = "game"; _local1.portalGroup = PortalGroup.TWEEN; _local1.preferedLanguage = "jp"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 121; _local1.domain = "www.dailygame.com"; _local1.emailLink = "/game/"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "en_us"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 123; _local1.domain = "www.zapapa.com"; _local1.emailLink = "game"; _local1.portalGroup = PortalGroup.ZAPAPA; _local1.preferedLanguage = "en_us"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 124; _local1.domain = "www.zapapa.nl"; _local1.emailLink = "game"; _local1.portalGroup = PortalGroup.HYVES; _local1.preferedLanguage = "nl"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 0; _local1.domain = "gamedev.dev.spilgames.com"; _local1.portalGroup = PortalGroup.FAMILY; _local1.preferedLanguage = "en_us"; addBrand(_local1); } public static function exportXML():XML{ var _local2:Brand; var _local1:XML = <portals/> ; for each (_local2 in brands_by_domain) { _local1.appendChild(_local2.exportXML()); }; return (_local1); } public static function getBrandByDomain(_arg1:String):Brand{ return (brands_by_domain[_arg1]); } public static function hasDomain(_arg1:String):Boolean{ return (!((brands_by_domain[_arg1] == null))); } } }//package spill.localisation
Section 75
//Language (spill.localisation.Language) package spill.localisation { import flash.xml.*; public class Language { public var portal_groups:Array; public var references:Array; public var name:String; public var embedInputFonts:Boolean;// = true public var id:uint; public var forceFont:String;// = null public var textLanguage:String; public var bwcId:int; public var embedFonts:Boolean;// = true public var displayName:String;// = "" public var dname:String; public function Language(_arg1:String, _arg2:String=null){ references = []; super(); name = _arg1; dname = _arg2; portal_groups = new Array(); } public function exportXML():XMLNode{ var _local1:XMLNode = new XMLNode(1, "language"); _local1.attributes.name = name; if (textLanguage != null){ _local1.attributes.textLanguage = textLanguage; }; if (references.length){ _local1.attributes.references = references.toString(); }; _local1.attributes.id = bwcId; var _local2:XMLNode = new XMLNode(1, "display_name"); _local2.firstChild = new XMLNode(3, displayName); _local1.appendChild(_local2); var _local3:Array = []; var _local4:Array = PortalGroup.channelNames; var _local5:int; while (_local5 < _local4.length) { _local3.push(Brandings.getBrandByDomain(portal_groups[_local5]).site_id); _local5++; }; _local1.attributes.channels = _local3.join(","); return (_local1); } public function get p_teen():String{ return (portal_groups[PortalGroup.TEEN]); } public function set p_hyves(_arg1:String):void{ portal_groups[PortalGroup.HYVES] = _arg1; } public function set p_teen(_arg1:String):void{ portal_groups[PortalGroup.TEEN] = _arg1; } public function get p_tween():String{ return (portal_groups[PortalGroup.TWEEN]); } public function get p_family():String{ return (portal_groups[PortalGroup.FAMILY]); } public function get p_girl():String{ trace("Language", portal_groups[PortalGroup.GIRL]); return (portal_groups[PortalGroup.GIRL]); } public function get p_hyves():String{ return (portal_groups[PortalGroup.HYVES]); } public function set p_girl(_arg1:String):void{ portal_groups[PortalGroup.GIRL] = _arg1; } public function set p_zapapa(_arg1:String):void{ portal_groups[PortalGroup.ZAPAPA] = _arg1; } public function get displayAcronim():String{ return ((dname) ? dname : name); } public function set p_family(_arg1:String):void{ portal_groups[PortalGroup.FAMILY] = _arg1; } public function set p_tween(_arg1:String):void{ portal_groups[PortalGroup.TWEEN] = _arg1; } public function get p_zapapa():String{ return (portal_groups[PortalGroup.ZAPAPA]); } } }//package spill.localisation
Section 76
//Languages (spill.localisation.Languages) package spill.localisation { import flash.xml.*; public class Languages { public static var languages:Object = new Object(); private static var _init:Boolean = false; public static function initialize():void{ var _local1:Language; if (_init){ return; }; _init = true; _local1 = new Language("nl"); _local1.displayName = "Nederlands"; _local1.p_family = "www.spelletjes.nl"; _local1.p_tween = "www.spel.nl"; _local1.p_girl = "www.girlsgogames.nl"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.p_hyves = "www.zapapa.nl"; _local1.bwcId = 3; addLanguage(_local1); _local1 = new Language("es"); _local1.displayName = "Español"; _local1.p_family = "www.juegos.com"; _local1.p_tween = "www.zapjuegos.com"; _local1.p_girl = "www.girlsgogames.es"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 9; addLanguage(_local1); _local1 = new Language("pl"); _local1.displayName = "Polski"; _local1.p_family = "www.gry.pl"; _local1.p_tween = "www.agame.com"; _local1.p_girl = "www.girlsgogames.pl"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 6; addLanguage(_local1); _local1 = new Language("fr"); _local1.displayName = "Français"; _local1.p_family = "www.jeux.fr"; _local1.p_tween = "www.jeu.fr"; _local1.p_girl = "www.girlsgogames.fr"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 4; addLanguage(_local1); _local1 = new Language("en_us", "us"); _local1.displayName = "English"; _local1.p_family = "www.gamesgames.com"; _local1.p_tween = "www.agame.com"; _local1.p_girl = "www.girlsgogames.com"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 1; addLanguage(_local1); addReference(_local1, "en"); _local1 = new Language("id"); _local1.displayName = "Bahasa Ind."; _local1.p_family = "www.gamesgames.com"; _local1.p_tween = "www.games.co.id"; _local1.p_girl = "www.girlsgogames.com"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 11; addLanguage(_local1); _local1 = new Language("ru"); _local1.displayName = "Русский"; _local1.p_family = "www.ourgames.ru"; _local1.p_tween = "www.flashgames.ru"; _local1.p_girl = "www.girlsgogames.ru"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 12; addLanguage(_local1); _local1 = new Language("se"); _local1.displayName = "Svenska"; _local1.p_family = "www.spela.se"; _local1.p_tween = "www.spel.se"; _local1.p_girl = "www.girlsgogames.se"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 7; addLanguage(_local1); addReference(_local1, "sv"); _local1 = new Language("it"); _local1.displayName = "Italiano"; _local1.p_family = "www.gioco.it"; _local1.p_tween = "www.gioco.it"; _local1.p_girl = "www.girlsgogames.it"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 8; addLanguage(_local1); _local1 = new Language("en_uk", "uk"); _local1.displayName = "English"; _local1.p_family = "www.games.co.uk"; _local1.p_tween = "www.agame.com"; _local1.p_girl = "www.girlsgogames.co.uk"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 13; addLanguage(_local1); _local1 = new Language("cn"); _local1.displayName = "中文"; _local1.p_family = "www.game.com.cn"; _local1.p_tween = "www.game.com.cn"; _local1.p_girl = "www.game.com.cn"; _local1.p_teen = "www.game.com.cn"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 2; _local1.embedFonts = false; _local1.embedInputFonts = false; _local1.forceFont = "_sans"; addLanguage(_local1); addReference(_local1, "zh-CN"); addReference(_local1, "zh-TW"); _local1 = new Language("pt"); _local1.displayName = "Português"; _local1.p_family = "www.ojogos.pt"; _local1.p_tween = "www.agame.com"; _local1.p_girl = "www.girlsgogames.com"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 17; addLanguage(_local1); _local1 = new Language("in"); _local1.displayName = "English"; _local1.p_family = "www.gamesgames.com"; _local1.p_tween = "www.game.co.in"; _local1.p_girl = "www.girlsgogames.com"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.textLanguage = "en_uk"; _local1.bwcId = 14; addLanguage(_local1); _local1 = new Language("de"); _local1.displayName = "Deutsch"; _local1.p_family = "www.jetztspielen.de"; _local1.p_tween = "www.spielen.com"; _local1.p_girl = "www.girlsgogames.de"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 5; addLanguage(_local1); _local1 = new Language("br"); _local1.displayName = "Português (BR)"; _local1.p_family = "www.ojogos.com.br"; _local1.p_tween = "www.clickjogos.com"; _local1.p_girl = "www.girlsgogames.com.br"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 10; addLanguage(_local1); _local1 = new Language("jp"); _local1.displayName = "日本語"; _local1.p_family = "www.gamesgames.com"; _local1.p_tween = "www.egames.jp"; _local1.p_girl = "www.girlsgogames.com"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.embedFonts = true; _local1.embedInputFonts = false; _local1.forceFont = "MS UI Gothic"; _local1.bwcId = 19; addLanguage(_local1); addReference(_local1, "ja"); _local1 = new Language("ar"); _local1.displayName = "English"; _local1.p_family = "www.dailygame.com"; _local1.p_tween = "www.agame.com"; _local1.p_girl = "www.girlsgogames.com"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.bwcId = 20; addLanguage(_local1); addReference(_local1, "ar"); _local1 = new Language("es_mx", "mx"); _local1.displayName = "Español"; _local1.p_family = "www.juegos.mx"; _local1.p_tween = "www.juegos.mx"; _local1.p_girl = "www.juegosdechicas.mx"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.textLanguage = "es"; addLanguage(_local1); addReference(_local1, "mx"); _local1 = new Language("es_ar", "arg"); _local1.displayName = "Español"; _local1.p_family = "www.juegos.com.ar"; _local1.p_tween = "www.juegos.com.ar"; _local1.p_girl = "www.juegosdechicas.com.ar"; _local1.p_teen = "www.a10.com"; _local1.p_zapapa = "www.zapapa.com"; _local1.textLanguage = "es"; addLanguage(_local1); addReference(_local1, "arg"); } public static function exportXML():XMLNode{ var _local3:Language; var _local1:Array = getLanguagesArray(); var _local2:XMLNode = new XMLNode(1, "languages"); for each (_local3 in _local1) { _local2.appendChild(_local3.exportXML()); }; return (_local2); } public static function getLanguagesArray():Array{ var _local3:Language; var _local1:Array = new Array(); var _local2:Object = new Object(); for each (_local3 in languages) { if (!_local2[_local3.name]){ _local1.push(_local3); _local2[_local3.name] = true; }; }; return (_local1); } public static function getLanguage(_arg1:String):Language{ return (languages[_arg1]); } private static function addLanguage(_arg1:Language):void{ languages[_arg1.name] = _arg1; } private static function addReference(_arg1:Language, _arg2:String):void{ languages[_arg2] = _arg1; _arg1.references.push(_arg2); } public static function getLanguageByOldID(_arg1:int):Language{ var _local2:Language; for each (_local2 in languages) { if (_local2.bwcId == _arg1){ return (_local2); }; }; return (null); } } }//package spill.localisation
Section 77
//LanguageSelectBox (spill.localisation.LanguageSelectBox) package spill.localisation { import flash.events.*; import flash.display.*; import flash.text.*; public class LanguageSelectBox extends MovieClip { private var flag:MovieClip; private var languageName_text:TextField; private var popup:MovieClip; private var mc:MovieClip; public function LanguageSelectBox(){ trace("new langselecbox"); super(); if (numChildren > 0){ removeChildAt(0); }; addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true); addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true); addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true); Languages.initialize(); popup = new LanguageSelectPopup_mc(); x = Math.round(x); y = Math.round(y); popup.y = (-(Math.floor(popup.height)) + 1); popup.visible = false; addChild(popup); mc = new LanguageSelectBox_mc(); addChild(mc); flag = mc.flag; languageName_text = mc.languageName_text; if (stage){ added(); }; init(); languageChanged(); } private function added(_arg1:Event=null):void{ trace("addedselebnox"); SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true); } private function mouseOut(_arg1:MouseEvent):void{ popup.visible = false; } public function set popupLocation(_arg1:String):void{ trace(("popupLocation = " + _arg1)); if (_arg1 == "bottom"){ popup.y = Math.floor(mc.height); } else { popup.y = (-(Math.floor(mc.height)) + 1); }; } private function removed(_arg1:Event):void{ SpilGame.removeEventListener("languageChanged", languageChanged); } public function init():void{ var _local3:MovieClip; var _local4:Language; trace("initselectbox"); var _local1:Array = new Array(popup.l_br, popup.l_de, popup.l_en_us, popup.l_fr, popup.l_in, popup.l_jp, popup.l_pt, popup.l_ru, popup.l_ar, popup.l_cn, popup.l_en_uk, popup.l_es, popup.l_id, popup.l_it, popup.l_nl, popup.l_pl, popup.l_se, popup.l_es_mx, popup.l_es_ar); var _local2:int; while (_local2 < _local1.length) { _local3 = MovieClip(_local1[_local2]); if (_local3){ _local3.addEventListener(MouseEvent.CLICK, itemClicked, true, 0, true); _local3.flag.gotoAndStop(_local3.name.substr(2)); _local3.flag.mouseEnabled = false; _local3.text.mouseEnabled = false; _local4 = Languages.getLanguage(_local3.name.substr(2)); if (_local4){ _local3.text.text = _local4.displayAcronim; } else { trace((("Error, '" + _local3.name.substr(2)) + "' language not found")); }; } else { trace((((("Error, btn number '" + _local2) + "' is not a MovieClip or there is no button '") + _local1[_local2]) + "'")); }; _local2++; }; } private function itemClicked(_arg1:MouseEvent):void{ SpilGame.changeLanguage(_arg1.currentTarget.name.substr(2)); popup.visible = false; } private function mouseOver(_arg1:MouseEvent):void{ popup.visible = true; } private function languageChanged(_arg1:Event=null):void{ if (SpilGame.currentLanguage){ flag.gotoAndStop(SpilGame.currentLanguage.name); languageName_text.text = SpilGame.currentLanguage.displayName; languageName_text.embedFonts = SpilGame.currentLanguage.embedInputFonts; }; } } }//package spill.localisation
Section 78
//LanguageSelectBox_mc (spill.localisation.LanguageSelectBox_mc) package spill.localisation { import flash.display.*; import flash.text.*; public dynamic class LanguageSelectBox_mc extends MovieClip { public var languageName_text:TextField; public var flag:MovieClip; } }//package spill.localisation
Section 79
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc) package spill.localisation { import flash.display.*; public dynamic class LanguageSelectPopup_mc extends MovieClip { public var l_cn:MovieClip; public var l_br:MovieClip; public var l_se:MovieClip; public var l_id:MovieClip; public var l_es_ar:MovieClip; public var l_es_mx:MovieClip; public var l_in:MovieClip; public var l_en_uk:MovieClip; public var l_en_us:MovieClip; public var l_es:MovieClip; public var l_ar:MovieClip; public var l_it:MovieClip; public var l_pl:MovieClip; public var l_nl:MovieClip; public var l_de:MovieClip; public var l_ru:MovieClip; public var l_pt:MovieClip; public var l_jp:MovieClip; public var l_fr:MovieClip; } }//package spill.localisation
Section 80
//LocalizedTextField (spill.localisation.LocalizedTextField) package spill.localisation { import flash.events.*; public class LocalizedTextField extends TextFieldFit { private var regex:RegExp; private var originalText:String; public function LocalizedTextField(){ regex = /{([^{}]*)}/g; super(); addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true); addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true); added(); } private function added(_arg1:Event=null):void{ SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true); text = originalText; } private function replaceFn():String{ var _local2:String = SpilGame.getString(arguments[1]); if (((!(_local2)) || ((_local2 == "")))){ return ((("{" + arguments[1]) + "}")); }; return (_local2); } private function removed(_arg1:Event):void{ SpilGame.removeEventListener("languageChanged", languageChanged); } override public function set text(_arg1:String):void{ originalText = _arg1; if ((_arg1 is String)){ super.text = _arg1.replace(regex, replaceFn); } else { super.text = ""; }; } private function languageChanged(_arg1:Event):void{ text = originalText; updateProperties(); } } }//package spill.localisation
Section 81
//PortalGroup (spill.localisation.PortalGroup) package spill.localisation { import flash.xml.*; public class PortalGroup { public static const FAMILY:uint = 0; public static const channelNames:Array = ["family", "tween", "girl", "teen", "zapapa", "hyves"]; public static const ZAPAPA:uint = 4; public static const TWEEN:uint = 1; public static const HYVES:uint = 5; public static const TEEN:uint = 3; public static const GIRL:uint = 2; public static const backgroundColors:Array = [0xFFFFFF, 0xFFFFFF, 16742331, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF]; public static const NONE:uint = 6; public static function getName(_arg1:int):String{ return (channelNames[_arg1]); } public static function exportXML():XMLNode{ var _local3:XMLNode; var _local1:XMLNode = new XMLNode(1, "channels"); var _local2:int; while (_local2 < 5) { _local3 = new XMLNode(1, "channel"); _local3.attributes.name = channelNames[_local2]; _local3.attributes.id = _local2; _local1.appendChild(_local3); _local2++; }; return (_local1); } } }//package spill.localisation
Section 82
//spil_internal (spill.localisation.spil_internal) package spill.localisation { public namespace spil_internal = "spill.localisation"; }//package spill.localisation
Section 83
//SpilGame (spill.localisation.SpilGame) package spill.localisation { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; import flash.ui.*; import flash.system.*; import flash.external.*; public class SpilGame { private static const cookieName:String = "spilgames_language_v100"; private static const cookiePath:String = "/"; private static const cookieLanguageVar:String = "savedLang"; public static const LANGUAGE_CHANGED:String = "languageChanged"; public static const BRANDING_CHANGED:String = "brandingChanged"; private static var strings:Object = new Object(); public static var currentBranding:Brand; private static var contexMenuItem:ContextMenuItem; spil_internal static var gameName:String; spil_internal static var debugHostDomain:String = ""; private static var localDomains:Object = new Object(); spil_internal static var emailPage:String; private static var channelLock:Boolean = false; spil_internal static var debugEmbedDomain:String = ""; private static var eventDispatcher:EventDispatcher; private static var _init:Boolean = false; public static var currentLanguage:Language; spil_internal static var portalGroup:uint; private static var stage:Sprite; public static function getSpilCompanyLink():String{ if (currentLanguage.name == "cn"){ return ("http://www.game.com.cn/downloads/"); }; return ("http://www.gameportal.net"); } public static function getPromotionLink(_arg1:String="feature_promotion"):String{ var _local2:String = (embedDomain) ? embedDomain : hostingDomain; return (currentBranding.getPromotionLink(gameName, emailPage, isExternal, _local2, _arg1)); } public static function traceAllBrands():void{ trace(outputAllBrands()); } public static function getString(_arg1:String):String{ var _local2:Object = strings[_arg1]; if (_local2){ if (currentLanguage.textLanguage){ return (_local2[currentLanguage.textLanguage]); }; return (_local2[currentLanguage.name]); //unresolved jump }; return (""); } public static function initialize(_arg1:String, _arg2:int, _arg3:String, _arg4:Sprite, _arg5:Boolean=false):void{ stage = _arg4; if (_init){ trace("ERROR: LocalisationManager already initialised"); return; }; _init = true; localDomains["localhost"] = true; localDomains["www8.agame.com"] = true; localDomains["gamedev.dev.spilgames.com"] = true; localDomains["stg.spel.nl"] = true; localDomains["stg.girlsgogames.nl"] = true; localDomains["stg.pl.spel.nl"] = true; localDomains["stg.pl.girlsgogames.nl"] = true; trace(localDomains["stg.girlsgogames.nl"]); Brandings.initialize(); Languages.initialize(); initContexMenu(_arg4); channelLock = _arg5; gameName = _arg1.replace(" ", "_"); portalGroup = _arg2; emailPage = _arg3; chooseLanguage(); chooseBranding(); } public static function get isExternal():Boolean{ return (((((!(Brandings.hasDomain(embedDomain))) && (!(localDomains[embedDomain])))) && (!(isStagingDomain)))); } private static function initContexMenu(_arg1:Sprite):void{ contexMenuItem = new ContextMenuItem(""); _arg1.contextMenu = new ContextMenu(); _arg1.contextMenu.customItems.push(contexMenuItem); contexMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contexMenuClicked); } private static function replaceFn():String{ var _local2:String = SpilGame.getString(arguments[1]); if (((!(_local2)) || ((_local2 == "")))){ return ((("{" + arguments[1]) + "}")); }; return (_local2); } spil_internal static function get hostingDomain():String{ var _local1:LocalConnection; if (debugHostDomain != ""){ return (debugHostDomain); }; _local1 = new LocalConnection(); return (_local1.domain); } spil_internal static function chooseLanguage():void{ if (cookieLanguage != null){ currentLanguage = cookieLanguage; } else { if (isExternal){ currentLanguage = systemLanguage; } else { currentLanguage = portalLanguage; if (!currentLanguage){ currentLanguage = systemLanguage; }; }; }; if (!currentLanguage){ trace("Unable to determine language, using 'English US'"); currentLanguage = Languages.getLanguage("en_us"); }; TextFieldFit.embedFonts = currentLanguage.embedFonts; TextFieldFit.forceFont = currentLanguage.forceFont; dispatchEvent(new Event(LANGUAGE_CHANGED)); } private static function contexMenuClicked(_arg1:ContextMenuEvent):void{ navigateToURL(new URLRequest(getMoreGamesLink("Contex_Menu"))); } public static function initTextField(_arg1:TextField):void{ var _local2:TextFormat; trace(_arg1.text); _arg1.text = _arg1.text.replace(/{([^{}]*)}/g, replaceFn); trace(_arg1.text); _arg1.embedFonts = currentLanguage.embedFonts; if (currentLanguage.forceFont != ""){ _local2 = new TextFormat(); _local2.font = currentLanguage.forceFont; _arg1.setTextFormat(_local2); }; } public static function importXMLv2(_arg1:XML):void{ var _local2:XML; var _local3:Object; var _local4:XML; for each (_local2 in _arg1.children()) { _local3 = (strings[_local2.attribute("identifier")] = new Object()); for each (_local4 in _local2.children()) { if (_local4.children().length() > 0){ _local3[_local4.name()] = _local4.children()[0].toString(); } else { _local3[_local4.name()] = ""; }; }; }; } spil_internal static function changeLanguage(_arg1:String):void{ var _local2:Language = Languages.getLanguage(_arg1); if (!_local2){ trace("ERROR: Supplied language string does not have a matching language"); } else { cookieLanguage = _local2; currentLanguage = _local2; }; TextFieldFit.embedFonts = currentLanguage.embedFonts; TextFieldFit.forceFont = currentLanguage.forceFont; chooseBranding(); dispatchEvent(new Event(LANGUAGE_CHANGED)); } public static function getSendToFriendLink():String{ return (currentBranding.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain)); } spil_internal static function chooseBranding():void{ currentBranding = Brandings.getBrandByDomain(currentLanguage.portal_groups[portalGroup]); if (!(currentBranding is Brand)){ currentBranding = Brandings.getBrandByDomain("www.agame.com"); }; contexMenuItem.caption = ("More Games: " + currentBranding.domain); dispatchEvent(new Event(BRANDING_CHANGED)); } spil_internal static function get systemLanguage():Language{ return (Languages.getLanguage(Capabilities.language)); } spil_internal static function set cookieLanguage(_arg1:Language):void{ var _local2:SharedObject = SharedObject.getLocal(cookieName, cookiePath); if (_arg1 == null){ _local2.data[cookieLanguageVar] = null; } else { _local2.data[cookieLanguageVar] = _arg1.name; }; _local2.flush(); } public static function importXML(_arg1:XML):void{ var _local2:XML; var _local3:Object; var _local4:XML; for each (_local2 in _arg1.children()) { _local3 = (strings[_local2.identifier] = new Object()); for each (_local4 in _local2.children()) { _local3[_local4.name()] = _local4.children()[0].toString(); }; }; } spil_internal static function dispatchEvent(_arg1:Event):void{ if (!eventDispatcher){ eventDispatcher = new EventDispatcher(); }; eventDispatcher.dispatchEvent(_arg1); } private static function getDomain(_arg1:String):String{ var _local2:String; var _local3:uint; if (_arg1.indexOf("file") == 0){ return ("offline_play"); }; _local2 = new String(); _local3 = 7; while (_local3 < _arg1.length) { if (_arg1.charAt(_local3) == "/"){ break; }; _local2 = (_local2 + _arg1.charAt(_local3)); _local3++; }; if (_local2 == "localhost"){ _local2 = "offline_play"; }; return (_local2); } public static function exportXML():XML{ var _local1:XML = <spil_games/> ; _local1.appendChild(Brandings.exportXML()); _local1.appendChild(Languages.exportXML()); _local1.appendChild(PortalGroup.exportXML()); return (_local1); } public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (!eventDispatcher){ eventDispatcher = new EventDispatcher(); }; eventDispatcher.removeEventListener(_arg1, _arg2, _arg3); } public static function outputAllBrands():String{ var _local3:Brand; var _local1:Array = Brandings.getBrandsArray(); var _local2 = ""; for each (_local3 in _local1) { _local2 = (_local2 + (_local3.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain) + "\n")); }; return (_local2); } public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (!eventDispatcher){ eventDispatcher = new EventDispatcher(); }; eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public static function getMoreGamesLink(_arg1:String=""):String{ var _local2:String = (embedDomain) ? embedDomain : hostingDomain; return (currentBranding.getMoreGamesLink(gameName, isExternal, _local2, _arg1)); } public static function get isStagingDomain():Boolean{ var _local1:String = ("http://" + embedDomain); return ((_local1.indexOf("http://stg.") >= 0)); } spil_internal static function get cookieLanguage():Language{ var _local1:SharedObject = SharedObject.getLocal(cookieName, cookiePath); var _local2:String = String(_local1.data[cookieLanguageVar]); return (Languages.getLanguage(_local2)); } private static function get portalLanguage():Language{ var _local1:Brand; var _local2:String; var _local3:Language; if (isExternal){ return (null); }; if (!embedDomain){ return (null); }; _local1 = Brandings.getBrandByDomain(embedDomain); if (!_local1){ return (null); }; _local2 = _local1.preferedLanguage; if (!_local2){ return (null); }; _local3 = Languages.getLanguage(_local2); if (!_local3){ return (null); }; return (_local3); } spil_internal static function get embedDomain():String{ var loc:String; if (debugEmbedDomain != ""){ return (debugEmbedDomain); }; if (ExternalInterface.available){ try { loc = ExternalInterface.call("window.location.href.toString"); if (((!((loc == ""))) && (!((loc == null))))){ trace(("embed domain = " + getDomain(loc))); return (getDomain(loc)); }; } catch(e:SecurityError) { trace(("Security Error connecting to external interface, error = " + e)); } catch(e:Error) { trace(("Error connecting to external interface, error = " + e)); }; }; return (null); } } }//package spill.localisation
Section 84
//TextFieldFit (spill.localisation.TextFieldFit) package spill.localisation { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; import flash.filters.*; public class TextFieldFit extends MovieClip { protected var _glowQuality:Number;// = 1 protected var _gridFitType:String;// = "pixel" protected var _text:String;// = "default" private var debugBounding:Sprite; protected var _disableWordwrap:Boolean;// = false protected var _textSize:Number;// = 12 protected var _multiline:Boolean;// = false protected var _font:String;// = "" protected var _embedFonts:Boolean;// = true protected var _underline:Boolean;// = false protected var _vAlign:String;// = "top" protected var _italic:Boolean;// = false protected var _useGlowFilter:Boolean;// = false protected var _glowColor:uint;// = 0 protected var _bold:Boolean;// = false private var h:Number; protected var _antiAliasType:String;// = "advanced" private var sizeChanged:Boolean;// = true private var w:Number; private var embeddedFonts:Array; protected var _hAlign:String;// = "left" protected var _textColor:uint;// = 0 protected var _glowStrength:Number;// = 5 protected var _glowBlur:Number;// = 3 protected var _selectable:Boolean;// = false private var format:TextFormat; private var field:TextField; private var valid:Boolean;// = true private static const gutter:Number = 2; spil_internal static var embedFonts:Boolean = true; spil_internal static var forceAAType:String = null; spil_internal static var forceFont:String = null; public static var alwaysCheckWidth:Boolean = false; public function TextFieldFit(){ var _local1:Boolean = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent"))); var _local2:Number = width; var _local3:Number = height; if (numChildren > 0){ removeChildAt(0); }; if (!field){ field = new TextField(); addChild(field); }; field.border = false; field.background = false; field.type = TextFieldType.DYNAMIC; mouseEnabled = false; mouseChildren = false; format = new TextFormat(); embeddedFonts = Font.enumerateFonts(false); setSize(_local2, _local3); validate(); if (stage){ addEventListener(Event.RENDER, init); stage.invalidate(); }; init(); } private function resizeText(_arg1:Boolean=false):void{ if (!doesTextFit()){ format.size = Object((Number(format.size) - 1)); if (format.size <= 3){ trace("WARNING: Text resised to 3px, either an error occured or the text just wont fit"); return; }; field.setTextFormat(format); resizeText(true); } else { if (_arg1 == false){ while (doesTextFit()) { if (format.size <= textSize){ format.size = Object((Number(format.size) + 1)); field.setTextFormat(format); if (!doesTextFit()){ format.size = Object((Number(format.size) - 1)); field.setTextFormat(format); break; }; } else { break; }; }; }; }; } public function set hAlign(_arg1:String):void{ _hAlign = _arg1; invalidate(); } public function set bold(_arg1:Boolean):void{ _bold = _arg1; invalidate(); } private function init(_arg1:Event=null):void{ removeEventListener(Event.RENDER, init); updateProperties(); layoutText(); } private function validate(_arg1:Event=null):void{ updateProperties(); layoutText(); removeEventListener(Event.ENTER_FRAME, validate); valid = true; } public function set glowBlur(_arg1:Number):void{ _glowBlur = _arg1; invalidate(); } public function get vAlign():String{ return (_vAlign); } public function get italic():Boolean{ return (_italic); } public function get textColor():uint{ return (_textColor); } private function invalidate():void{ if (valid){ addEventListener(Event.ENTER_FRAME, validate); if (stage){ stage.invalidate(); }; valid = false; }; } public function get text():String{ return (_text); } public function get useGlowFilter():Boolean{ return (_useGlowFilter); } public function get selectable():Boolean{ return (_selectable); } public function set text(_arg1:String):void{ _text = _arg1; invalidate(); } public function set embedFonts(_arg1:Boolean):void{ _embedFonts = _arg1; invalidate(); } public function set vAlign(_arg1:String):void{ _vAlign = _arg1; invalidate(); } public function set italic(_arg1:Boolean):void{ _italic = _arg1; invalidate(); } public function get font():String{ return (_font); } public function set multiline(_arg1:Boolean):void{ _multiline = _arg1; invalidate(); } public function get disableWordwrap():Boolean{ return (_disableWordwrap); } public function set textColor(_arg1:uint):void{ _textColor = _arg1; invalidate(); } public function get antiAliasType():String{ return (_antiAliasType); } private function layoutText():void{ resizeText(); field.height = (field.textHeight + (gutter * 2)); if (vAlign == "top"){ field.y = 0; } else { if (vAlign == "middle"){ field.y = ((h - field.height) / 2); } else { if (vAlign == "bottom"){ field.y = (h - field.height); }; }; }; } public function set glowQuality(_arg1:Number):void{ _glowQuality = _arg1; invalidate(); } public function get hAlign():String{ return (_hAlign); } public function setSize(_arg1:Number, _arg2:Number):void{ w = _arg1; h = _arg2; scaleX = (scaleY = 1); field.width = w; field.height = h; invalidate(); } public function get bold():Boolean{ return (_bold); } public function set gridFitType(_arg1:String):void{ _gridFitType = _arg1; invalidate(); } public function set underline(_arg1:Boolean):void{ _underline = _arg1; invalidate(); } public function get glowBlur():Number{ return (_glowBlur); } public function set useGlowFilter(_arg1:Boolean):void{ _useGlowFilter = _arg1; invalidate(); } public function set font(_arg1:String):void{ _font = _arg1; invalidate(); } public function set textSize(_arg1:Number):void{ _textSize = _arg1; sizeChanged = true; invalidate(); } public function set selectable(_arg1:Boolean):void{ _selectable = _arg1; invalidate(); } public function get multiline():Boolean{ return (_multiline); } public function get embedFonts():Boolean{ return (_embedFonts); } public function set glowColor(_arg1:uint):void{ _glowColor = _arg1; invalidate(); } public function set disableWordwrap(_arg1:Boolean):void{ _disableWordwrap = _arg1; invalidate(); } public function get glowQuality():Number{ return (_glowQuality); } public function get gridFitType():String{ return (_gridFitType); } public function get underline():Boolean{ return (_underline); } public function get textSize():Number{ return (_textSize); } public function get glowColor():uint{ return (_glowColor); } public function set antiAliasType(_arg1:String):void{ _antiAliasType = _arg1; invalidate(); } public function set glowStrength(_arg1:Number):void{ _glowStrength = _arg1; invalidate(); } protected function updateProperties():void{ var _local1:Boolean; var _local2:Font; field.text = _text; field.multiline = ((((_text.indexOf(" ") < 0)) && ((_text.length < 14)))) ? false : _multiline; field.wordWrap = ((field.multiline) && (!(_disableWordwrap))); field.selectable = _selectable; field.antiAliasType = (forceAAType) ? forceAAType : _antiAliasType; field.gridFitType = _gridFitType; embeddedFonts = Font.enumerateFonts(false); if (((((_embedFonts) && (!((_font == ""))))) && (TextFieldFit.embedFonts))){ _local1 = false; for each (_local2 in embeddedFonts) { if (_font == _local2.fontName){ _local1 = true; break; }; }; field.embedFonts = _local1; if (!_local1){ trace(((("WARNING: Embedded font '" + _font) + "' not found, disabling embedding of fonts, text = ") + _text)); }; } else { field.embedFonts = false; }; if (TextFieldFit.forceFont){ format.font = TextFieldFit.forceFont; } else { if (_font != ""){ format.font = _font; }; }; if (sizeChanged){ format.size = _textSize; }; format.color = _textColor; format.align = _hAlign; format.bold = _bold; format.italic = _italic; format.underline = _underline; format.leftMargin = 0; format.rightMargin = 0; field.setTextFormat(format); if (_useGlowFilter){ filters = [new GlowFilter(_glowColor, 1, _glowBlur, _glowBlur, _glowStrength, _glowQuality)]; } else { filters = []; }; } private function doesTextFit():Boolean{ if (((((field.textHeight + (gutter * 2)) > h)) || (((((field.textWidth + (gutter * 2)) > w)) && (((!(field.multiline)) || (alwaysCheckWidth))))))){ return (false); }; return (true); } public function get glowStrength():Number{ return (_glowStrength); } } }//package spill.localisation
Section 85
//Submitter (Spill.Components.Submitter) package Spill.Components { import flash.display.*; public dynamic class Submitter extends MovieClip { } }//package Spill.Components
Section 86
//Actor (Actor) package { import flash.geom.*; import org.flixel.*; import flash.utils.*; public class Actor extends Entity { public const MagicGravity:Number = 250; public const HardMaxJump:int = -1000; public const NormalGravity:Number = 1000; public const HardMaxRun:int = 1000; public const PCEnergyBase:Number = 50; public const DefaultJump:Number = -200; public var elapsedSincePrimary:Number;// = 1 public var dimensionsClimbing:FlxPoint; public var swordOffsetRight:Point; public var climbing:Boolean;// = false public var bulletPointRight:FlxPoint; public var propOffsetLeft:Point; public var bulletPointLeftDown:FlxPoint; public var damageCoolDown:Number;// = 0.25 public var swordOffsetLeft:Point; public var lookingDown:Boolean;// = false public var collideAttack:Attack; public var usingEnergy:Boolean;// = false public var landing:Boolean;// = false public var offsetLeft:FlxPoint; public var casting:Boolean;// = false public var timer:Timer; public var bulletPointRightUp:FlxPoint; public var moving:Boolean;// = false public var bulletPointLeftUp:FlxPoint; public var lvlUpEmitter:Emitter; public var offsetRight:FlxPoint; public var gravity:Number; public var prop:FlxSprite; public var offsetLeftClimbing:FlxPoint; public var healthMax:int; public var dervishing:Boolean;// = false public var experience:int; public var offsetRightClimbing:FlxPoint; public var jumpPower:Number; public var runSpeed:Number; public var level:int;// = 1 public var collisionEvent:Function;// = null public var controller:ActorController;// = null public var climbSpeed:int;// = 75 public var attacking:Boolean;// = false public var energyMax:Number; public var dimensions:FlxPoint; public var bulletPointRightDown:FlxPoint; public var energyCurrent:Number; public var bulletPointLeft:FlxPoint; public var secondaryAttack:Attack; public var inAir:Boolean;// = false public var propOffsetRight:Point; public var primaryAttack:Attack; public var lookingUp:Boolean;// = false public var myLadder:Ladder;// = null public var jumping:Boolean;// = false public var elapsedSinceSecondary:Number;// = 1 public var sword:Melee; public var preferredDirection:int;// = 0 public static const DAMAGE_STATUS_FIRE:uint = 3; public static const DAMAGE_STATUS_POISON:uint = 2; public static const DAMAGE_PHYSICAL:uint = 0; public static const DAMAGE_MAGICAL:uint = 1; public function Actor(_arg1:int=0, _arg2:int=0){ bulletPointRight = new FlxPoint(); bulletPointLeft = new FlxPoint(); bulletPointRightUp = new FlxPoint(); bulletPointLeftUp = new FlxPoint(); bulletPointRightDown = new FlxPoint(); bulletPointLeftDown = new FlxPoint(); offsetRight = new FlxPoint(2, 1); offsetLeft = new FlxPoint(2, 1); offsetRightClimbing = new FlxPoint(2, 0); offsetLeftClimbing = new FlxPoint(3, 0); dimensions = new FlxPoint(15, 16); dimensionsClimbing = new FlxPoint(8, 18); swordOffsetLeft = new Point(); swordOffsetRight = new Point(); propOffsetLeft = new Point(-4, -4); propOffsetRight = new Point(0, -4); super(_arg1, _arg2); this.gravity = this.NormalGravity; this.RestoreGravity(this.gravity); } public function RestoreGravity(_arg1:Number):void{ this.acceleration.y = _arg1; } public function TakeDamage(_arg1:Number, _arg2:uint=0, _arg3:Entity=null):void{ var _local5:FlxSound; if ((((this.flickering() == true)) && ((this.controller is PlayerCharacterController)))){ return; }; if (_arg1 < 0){ _arg1 = -(_arg1); }; if ((this.controller is WraithController)){ if ((_arg3 is Turret)){ return; }; _arg1 = (_arg1 * this.alpha); _arg1 = Math.floor(_arg1); if (_arg1 < 1){ _arg1 = 1; }; }; if ((this.controller is OgreController)){ if (health <= 0){ return; }; _arg1 = 1; }; super.hurt(_arg1); if ((this.controller is PlayerCharacterController) == false){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.damageDelt = (SaveData.ThisSession.ThisPlay.ThisArea.damageDelt + _arg1); }; if (this.health <= 0){ EatG.PC.ApplyExperience(this.experience); if (SaveData.ThisSession.ThisPlay != null){ var _local6 = SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled; var _local7 = this.controller.enemyType; var _local8 = (_local6[_local7] + 1); _local6[_local7] = _local8; }; if ((this.controller is OgreController)){ EatG.music.switchTheme(4); }; if ((this.controller is OgreController)){ if (EatG.SPIL_API){ EatG.Spil_Submitter._O00OOl1Ol("award5"); }; }; if (SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_MIN_MON] == 50){ if (EatG.SPIL_API){ EatG.Spil_Submitter._O00OOl1Ol("award3"); }; }; if (SaveData.TotalKills(SaveData.ENEMY_FLYING_SKULL) == 25){ if (EatG.SPIL_API){ EatG.Spil_Submitter._O00OOl1Ol("award4"); }; }; }; } else { if (_arg3 != null){ if ((_arg3 is Turret)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.damageFromEnemies[(_arg3 as Turret).type] = (SaveData.ThisSession.ThisPlay.ThisArea.damageFromEnemies[(_arg3 as Turret).type] + _arg1); } else { if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.damageFromEnemies[(_arg3 as Actor).Controller.enemyType] = (SaveData.ThisSession.ThisPlay.ThisArea.damageFromEnemies[(_arg3 as Actor).Controller.enemyType] + _arg1); }; }; }; }; }; if ((((_arg1 > 0)) && (this.onScreen()))){ _local5 = new FlxSound(); _local5.loadEmbedded(AssetsG.sndHurt); _local5.volume = 0.5; _local5.play(); }; if ((this.controller is OgreController)){ this.flicker(0.1); } else { this.flicker(this.damageCoolDown); }; if ((((_arg2 == Actor.DAMAGE_PHYSICAL)) || ((_arg2 == Actor.DAMAGE_MAGICAL)))){ this.SprayGibs(_arg1); }; var _local4:Text = NonEntityManager.GetFloatingText(); if (_local4 != null){ _local4.x = this.x; _local4.y = (this.y - 12); _local4.velocity.y = -50; if ((this.controller is PlayerCharacterController)){ _local4.color = 16724787; } else { _local4.color = 0xFFFFFF; }; if (_arg2 == Actor.DAMAGE_STATUS_POISON){ _local4.color = 2280482; } else { if (_arg2 == Actor.DAMAGE_STATUS_FIRE){ _local4.color = 15994125; }; }; _local4.text = ("Hit: " + _arg1); _local4.restart(1); }; } public function ApplyKnockback(_arg1:FlxPoint, _arg2:Number=0):void{ if ((this.controller is WraithController)){ return; }; if (this.climbing == true){ return; }; if (_arg2 != 0){ UtilsG.NormalizeVector(_arg1, _arg2); }; this.velocity.x = (this.velocity.x + _arg1.x); this.velocity.y = (this.velocity.y + _arg1.y); } public function AttackSecondary(_arg1:Entity=null):void{ if (this.secondaryAttack == null){ return; }; if (this.elapsedSinceSecondary < this.secondaryAttack.cooldown){ return; }; if (this.secondaryAttack.execute(_arg1) == false){ return; }; this.elapsedSinceSecondary = 0; } public function StopMoving():void{ this.acceleration.x = 0; this.moving = false; if (this.climbing == true){ this.velocity.y = (this.acceleration.y = 0); }; } override public function hitLeft(_arg1:FlxObject, _arg2:Number):void{ if (this.controller != null){ if (this.controller.hitLeft(_arg1, _arg2) == true){ OnOverlap(_arg1); }; }; super.hitLeft(_arg1, _arg2); } override public function OnOverlap(_arg1:FlxObject):void{ var _local2:Actor; var _local3:Explosion; if ((((_arg1 == EatG.PC)) && ((_arg1 is Actor)))){ _local2 = (_arg1 as Actor); if (this.collideAttack != null){ this.collideAttack.execute(_local2); }; if ((this.controller is ChandelierController)){ _local3 = NonEntityManager.GetExplosion(); if (_local3){ _local3.init(); _local3.x = ((this.x + (this.width / 2)) - (_local3.width / 2)); _local3.y = ((this.y + (this.height / 2)) - (_local3.height / 2)); _local3.Restart(); }; this.TakeDamage(this.health); }; if (this.collisionEvent != null){ this.collisionEvent(_local2); }; }; } override public function reset(_arg1:Number, _arg2:Number):void{ lookingDown = false; lookingUp = false; attacking = false; climbing = false; inAir = false; jumping = false; landing = false; moving = false; casting = false; dervishing = false; usingEnergy = false; sword = null; prop = null; experience = 0; level = 0; offset.x = 0; offset.y = 0; offsetLeft.x = 0; offsetLeft.y = 0; offsetRight.x = 0; offsetRight.y = 0; this.gravity = this.NormalGravity; this.RestoreGravity(this.gravity); super.reset(_arg1, _arg2); } public function XPForLevel(_arg1:int):int{ var _local2:int; var _local3 = 1; while (_local3 <= _arg1) { _local2 = (_local2 + (_local3 * 1000)); _local3++; }; return (_local2); } override public function kill():void{ var _local1:Loot; var _local2:Emitter; if ((this.controller is PlayerCharacterController) == false){ if ((controller is OgreController) == true){ dead = true; acceleration = new FlxPoint(); velocity = new FlxPoint(); solid = false; flicker(-1); (controller as OgreController).state = (controller as OgreController).STATE_DEATH; _local2 = NonEntityManager.GetEmitter(); if (_local2){ _local2.SpritePool = NonEntityManager.GetBloodPool(); _local2.x = ((this.x + (this.width / 2)) + ((facing)==FlxSprite.LEFT) ? -16 : 16); _local2.y = ((this.y + (this.height / 2)) + 10); _local2.gravity = 400; _local2.setXSpeed(-50, 50); _local2.setYSpeed(-80, 0); _local2.exists = true; _local2.visible = true; _local2.start(false, 0.025); }; return; }; _local1 = EntityManager.GetLoot(); if (_local1){ _local1.loadGraphic(AssetsG.sackImg, false, false, 8, 8); _local1.x = (this.x + (this.width / 4)); _local1.y = this.y; if (SaveData.ThisSession.ThisPlay != null){ _local1.value = UtilsG.dice(SaveData.ThisSession.ThisPlay.AreaCount, 250, 50); } else { _local1.value = UtilsG.dice(1, 250, 50); }; _local1.isChest = false; }; }; if (this.prop != null){ this.prop.kill(); }; this.prop = null; if (this.sword != null){ this.sword.kill(); }; this.sword = null; super.kill(); } public function get Level():int{ return (this.level); } public function Jump():void{ if ((((this.jumping == false)) && ((((this.velocity.y == 0)) || ((this.climbing == true)))))){ this.velocity.y = this.jumpPower; this.jumping = true; this.inAir = false; if ((this.controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.jumpCount++; }; }; }; if ((this.controller is PlayerCharacterController)){ if (this.facing == FlxSprite.RIGHT){ this.offset = this.offsetRight; } else { this.offset = this.offsetLeft; }; this.myLadder = null; this.width = this.dimensions.x; this.height = this.dimensions.y; }; this.climbing = false; this.RestoreGravity(this.gravity); } public function ApplyExperience(_arg1:int, _arg2:Boolean=false):void{ var _local4:Text; this.experience = (this.experience + _arg1); var _local3:Boolean; while (this.experience >= this.XPForNextLevel) { if (this.level > 999){ return; }; this.level++; _local3 = true; if ((this.Controller is PlayerCharacterController)){ this.DeriveStats(); this.drag.x = (this.runSpeed * 8); }; this.health = this.healthMax; }; if ((((_local3 == true)) && ((_arg2 == false)))){ _local4 = NonEntityManager.GetFloatingText(); if (_local4){ _local4.color = 4278255360; _local4.x = this.x; _local4.y = (this.y - 32); _local4.velocity.y = -60; _local4.text = "Level Up!"; _local4.restart(3); }; this.lvlUpEmitter = NonEntityManager.GetEmitter(); if (lvlUpEmitter){ this.lvlUpEmitter.SpritePool = NonEntityManager.GetLvLUpSparklePool(); this.lvlUpEmitter.x = this.x; this.lvlUpEmitter.y = this.y; this.lvlUpEmitter.width = this.width; this.lvlUpEmitter.height = this.height; this.lvlUpEmitter.setXSpeed(0, 0); this.lvlUpEmitter.setYSpeed(-70, -20); this.lvlUpEmitter.particleDrag.x = (this.lvlUpEmitter.particleDrag.y = 0); this.lvlUpEmitter.gravity = 0; this.lvlUpEmitter.start(true, 0.5); }; if (level == (EatG.enteredAreaLevel + 2)){ if (EatG.SPIL_API){ EatG.Spil_Submitter._O00OOl1Ol("award2"); }; }; }; } public function AttackPrimary(_arg1:Entity=null):void{ if (this.primaryAttack == null){ return; }; if (this.elapsedSincePrimary < this.primaryAttack.cooldown){ return; }; if (this.primaryAttack.execute(_arg1) == false){ return; }; this.elapsedSincePrimary = 0; } public function set Controller(_arg1:ActorController):void{ this.controller = _arg1; this.controller.init(this); } public function MoveForward():void{ if (this.preferredDirection == FlxSprite.RIGHT){ this.acceleration.x = this.runSpeed; if (this.dervishing == false){ this.facing = FlxSprite.RIGHT; }; } else { this.acceleration.x = -(this.runSpeed); if (this.dervishing == false){ this.facing = FlxSprite.LEFT; }; }; this.moving = true; this.RestoreGravity(this.gravity); } public function Climb(_arg1:Boolean=true):void{ if (this.climbing == false){ return; }; this.moving = true; this.RestoreGravity(0); if (_arg1){ this.velocity.y = -(this.climbSpeed); } else { this.velocity.y = this.climbSpeed; }; } override public function render():void{ if (this.sword != null){ this.sword.facing = this.facing; if (this.facing == FlxSprite.RIGHT){ this.sword.x = (this.x + this.swordOffsetRight.x); this.sword.y = (this.y + this.swordOffsetRight.y); } else { this.sword.x = (this.x + this.swordOffsetLeft.x); this.sword.y = (this.y + this.swordOffsetLeft.y); }; }; if (this.prop != null){ this.prop.facing = this.facing; if (this.facing == FlxSprite.RIGHT){ this.prop.x = (this.x + this.propOffsetRight.x); this.prop.y = (this.y + this.propOffsetRight.y); } else { this.prop.x = (this.x + this.propOffsetLeft.x); this.prop.y = (this.y + this.propOffsetLeft.y); }; }; super.render(); } override public function hitBottom(_arg1:FlxObject, _arg2:Number):void{ if (this.controller != null){ if (this.controller.hitBottom(_arg1, _arg2) == true){ OnOverlap(_arg1); }; }; super.hitBottom(_arg1, _arg2); } public function DeriveStats():void{ this.controller.applyLevelChanges(this.level); } public function get XPForNextLevel():int{ var _local1:int; var _local2 = 1; while (_local2 <= this.level) { _local1 = (_local1 + (_local2 * 1000)); _local2++; }; return (_local1); } public function handleAnimationState():void{ if ((((health <= 0)) && ((controller is OgreController)))){ if (health == -10000){ play("dead"); } else { play("death"); }; return; }; if (this.casting == true){ if (this.lookingUp){ this.play("casting up"); return; }; if (FlxG.keys.pressed("DOWN")){ this.play("casting down"); return; }; this.play("casting"); return; }; if (this.attacking == true){ if (this.lookingUp){ this.play("attack up"); return; }; if (FlxG.keys.pressed("DOWN")){ this.play("attack down"); return; }; this.play("attack"); return; }; if (this.climbing == true){ if (this.moving == true){ this.play("climbing"); } else { this.play("climbing pause"); }; return; }; if (this.jumping == true){ if (inAir == false){ this.play("jump pre"); return; }; if (velocity.y < 0){ this.play("jump raising"); } else { this.play("jump falling"); }; return; }; if (this.landing == true){ inAir = false; this.play("jump landing"); return; }; if (this.moving == true){ if (this.lookingUp){ this.play("run up"); } else { this.play("run"); }; return; }; if (this.lookingUp){ this.play("idle up"); } else { this.play("idle"); }; } public function get Controller():ActorController{ return (this.controller); } public function EnergyUse(_arg1:Number):void{ this.usingEnergy = true; this.energyCurrent = (this.energyCurrent - _arg1); } override public function hitTop(_arg1:FlxObject, _arg2:Number):void{ if (this.controller != null){ if (this.controller.hitTop(_arg1, _arg2) == true){ OnOverlap(_arg1); }; }; super.hitTop(_arg1, _arg2); } override public function update():void{ var _local1:Number; this.elapsedSincePrimary = (this.elapsedSincePrimary + FlxG.elapsed); this.elapsedSinceSecondary = (this.elapsedSinceSecondary + FlxG.elapsed); if (this.controller != null){ this.controller.update(); }; if ((((this.energyCurrent < this.energyMax)) && ((this.usingEnergy == false)))){ this.energyCurrent = (this.energyCurrent + (5 * FlxG.elapsed)); }; this.usingEnergy = false; super.update(); if ((((this.controller is PlayerCharacterController)) && ((FlxG.state is StatePlay)))){ SaveData.ThisSession.ThisPlay.ThisArea.distanceTravelled = (SaveData.ThisSession.ThisPlay.ThisArea.distanceTravelled + (UtilsG.VectorLength(velocity) * FlxG.elapsed)); if (this.climbing == true){ SaveData.ThisSession.ThisPlay.ThisArea.distanceClimbed = (SaveData.ThisSession.ThisPlay.ThisArea.distanceClimbed + (UtilsG.VectorLength(velocity) * FlxG.elapsed)); } else { if (this.velocity.y > 0){ SaveData.ThisSession.ThisPlay.ThisArea.distanceFallen = (SaveData.ThisSession.ThisPlay.ThisArea.distanceFallen + (this.velocity.y * FlxG.elapsed)); }; }; }; if ((((this.controller is PlayerCharacterController)) && (!((this.myLadder == null))))){ if (this.overlaps(this.myLadder) == true){ _local1 = ((this.myLadder.x + (this.myLadder.width / 2)) - (this.x + (this.width / 2))); if (_local1 < 0){ _local1 = -(_local1); }; if (_local1 < Ladder.LADDER_INTERACTION_RANGE){ if (((((((FlxG.keys.pressed("UP")) || (FlxG.keys.pressed("DOWN")))) || (FlxG.keys.pressed("W")))) || (FlxG.keys.pressed("S")))){ this.acceleration.x = (this.velocity.x = 0); this.acceleration.y = (this.velocity.y = 0); this.climbing = true; this.jumping = false; }; }; if (this.climbing == true){ if (this.facing == FlxSprite.RIGHT){ this.offset = this.offsetRightClimbing; this.x = this.myLadder.x; } else { this.offset = this.offsetLeftClimbing; this.x = this.myLadder.x; }; this.width = this.dimensionsClimbing.x; this.height = this.dimensionsClimbing.y; }; } else { if (this.facing == FlxSprite.RIGHT){ this.offset = this.offsetRight; } else { this.offset = this.offsetLeft; }; this.myLadder = null; this.climbing = false; this.RestoreGravity(this.gravity); this.width = this.dimensions.x; this.height = this.dimensions.y; }; }; if (this.sword != null){ if (this.dervishing == true){ if (this.facing == FlxSprite.RIGHT){ this.facing = FlxSprite.LEFT; } else { this.facing = FlxSprite.RIGHT; }; }; this.sword.facing = this.facing; if (this.facing == FlxSprite.RIGHT){ this.sword.x = (this.x + this.swordOffsetRight.x); this.sword.y = (this.y + this.swordOffsetRight.y); } else { this.sword.x = (this.x + this.swordOffsetLeft.x); this.sword.y = (this.y + this.swordOffsetLeft.y); }; if (this.prop != null){ if (this.sword.visible == true){ this.prop.visible = false; } else { this.prop.visible = true; }; }; }; if (this.prop != null){ this.prop.facing = this.facing; if (this.lookingUp == true){ this.prop.play("vert"); } else { this.prop.play("horz"); }; if (this.facing == FlxSprite.RIGHT){ this.prop.x = (this.x + this.propOffsetRight.x); this.prop.y = (this.y + this.propOffsetRight.y); } else { this.prop.x = (this.x + this.propOffsetLeft.x); this.prop.y = (this.y + this.propOffsetLeft.y); }; if (this.casting == true){ this.prop.visible = false; } else { this.prop.visible = true; }; }; if (EatG.Level != null){ if (this.y > (EatG.Level.heightInTiles * TileMap.TH)){ this.kill(); }; }; this.handleAnimationState(); if (y < 0){ y = 0; }; } public function AnimationCallback(_arg1:String, _arg2:uint, _arg3:uint):void{ if ((((((_arg1 == "attack")) || ((_arg1 == "attack up")))) || ((_arg1 == "attack down")))){ if (_arg2 == (this._curAnim.frames.length - 1)){ this.attacking = false; } else { return; }; } else { if (_arg1 == "jump landing"){ if (_arg2 == (this._curAnim.frames.length - 1)){ this.landing = false; }; } else { if (_arg1 == "jump pre"){ if (_arg2 == (this._curAnim.frames.length - 1)){ inAir = true; }; return; } else { if (_arg1 == "death"){ if (_arg2 == (this._curAnim.frames.length - 1)){ health = -10000; }; }; }; }; }; } public function SprayGibs(_arg1:Number):void{ var _local2:Emitter = NonEntityManager.GetEmitter(); if (_local2){ _local2.SpritePool = NonEntityManager.GetBloodPool(); _local2.x = (this.x + (this.width / 2)); _local2.y = (this.y + (this.height / 2)); _local2.gravity = 400; _local2.setXSpeed((-(_arg1) * 2), (_arg1 * 2)); _local2.setYSpeed(-80, 0); _local2.exists = true; _local2.visible = true; _local2.start(true, 1.25); }; } public function PerformAction(_arg1:String, _arg2:Entity=null):void{ switch (_arg1){ case "CLIMB UP": this.Climb(true); break; case "CLIMB DOWN": this.Climb(false); break; case "JUMP": this.Jump(); break; case "MOVE FORWARD": this.MoveForward(); break; case "STOP MOVING": this.StopMoving(); break; case "SUSPEND GRAVITY": this.RestoreGravity(0); break; case "MELEE ATTACK": this.AttackPrimary(_arg2); break; case "FIRE PROJECTILE": this.AttackSecondary(_arg2); break; default: break; }; } } }//package
Section 87
//ActorController (ActorController) package { import flash.geom.*; import org.flixel.*; public class ActorController { public var enemyType:uint;// = 0 public var actor:Actor; public var agroDistance:Number;// = 100 public function hitRight(_arg1:FlxObject, _arg2:Number):Boolean{ return (hitLeft(_arg1, _arg2)); } public function update():void{ this.Perceptron(); } public function applyLevelChanges(_arg1:uint):void{ } public function Perceptron():void{ var _local1:int; var _local2:Point = TileMap.TranslatePixelsToTiles((this.actor.x + (this.actor.width / 2)), ((this.actor.y + this.actor.height) - 1)); var _local3:int = EatG.Level.getTile(_local2.x, (_local2.y + 1)); var _local4:int = EatG.Level.getTile(_local2.x, (_local2.y - 1)); var _local5:int = EatG.Level.getTile(_local2.x, (_local2.y + 1)); var _local6:int = EatG.Level.getTile((_local2.x + 1), _local2.y); var _local7:int = EatG.Level.getTile((_local2.x + 2), _local2.y); var _local8:int = EatG.Level.getTile((_local2.x + 3), _local2.y); var _local9:int = EatG.Level.getTile((_local2.x + 3), (_local2.y + 1)); var _local10:int = EatG.Level.getTile((_local2.x + 3), (_local2.y - 1)); if (_local3 < EatG.Level.collideIndex){ if (this.actor.jumping == false){ if (this.actor.facing == FlxSprite.RIGHT){ this.actor.preferredDirection = FlxSprite.LEFT; } else { this.actor.preferredDirection = FlxSprite.RIGHT; }; }; }; } public function hitTop(_arg1:FlxObject, _arg2:Number):Boolean{ return (true); } public function init(_arg1:Actor):void{ this.actor = _arg1; this.actor.maxVelocity.x = 100; this.actor.runSpeed = (8 * this.actor.maxVelocity.x); this.actor.drag.x = (8 * this.actor.runSpeed); this.actor.jumpPower = this.actor.DefaultJump; this.actor.gravity = this.actor.NormalGravity; this.actor.damageCoolDown = 1; this.actor.healthMax = 1; this.actor.health = this.actor.healthMax; this.actor.energyMax = 100; this.actor.energyCurrent = this.actor.energyMax; this.actor.bulletPointRight.x = 7; this.actor.bulletPointRight.y = 10; this.actor.bulletPointLeft.x = 8; this.actor.bulletPointLeft.y = 10; this.actor.bulletPointRightUp.x = 12; this.actor.bulletPointRightUp.y = 1; this.actor.bulletPointLeftUp.x = 2; this.actor.bulletPointLeftUp.y = 1; } public function hitLeft(_arg1:FlxObject, _arg2:Number):Boolean{ return (true); } public function drillDown(_arg1:int, _arg2:int):int{ var _local3:Boolean; var _local4:int; while (!(_local3)) { _local4++; if ((_arg2 + _local4) >= EatG.Level.heightInTiles){ return (-1); }; if (EatG.Level.getTile(_arg1, (_arg2 + _local4)) >= EatG.Level.collideIndex){ _local3 = true; }; }; return (_local4); } public function hitBottom(_arg1:FlxObject, _arg2:Number):Boolean{ var _local3:FlxSound; if (this.actor.inAir == true){ if ((this is PlayerCharacterController)){ if (this.actor.jumping == true){ _local3 = new FlxSound(); _local3.loadEmbedded(AssetsG.sndLanding); _local3.volume = 0.5; _local3.play(); }; }; this.actor.landing = true; this.actor.jumping = false; }; if (this.actor.climbing == true){ this.actor.climbing = false; }; return (true); } } }//package
Section 88
//ArrowController (ArrowController) package { public class ArrowController extends ProjectileController { override public function init(_arg1:Projectile):void{ super.init(_arg1); this.projectile.loadGraphic(AssetsG.arrowImg, false, true, 8, 3); this.projectile.Arcs = true; this.projectile.velocity.x = 300; this.projectile.velocity.y = -60; } override public function update():void{ super.update(); } } }//package
Section 89
//AssetsG (AssetsG) package { public class AssetsG { public static var SkyImg:Class = AssetsG_SkyImg; public static var chestImg:Class = AssetsG_chestImg; public static var sndHurt:Class = AssetsG_sndHurt; public static var sndShadowBolt:Class = AssetsG_sndShadowBolt; public static var explodeImg:Class = AssetsG_explodeImg; public static var guyMageImg:Class = AssetsG_guyMageImg; public static var WantedPosterImg:Class = AssetsG_WantedPosterImg; public static var energyImg:Class = AssetsG_energyImg; public static var skullImg:Class = AssetsG_skullImg; public static var FireballImg:Class = AssetsG_FireballImg; public static var sndDervish:Class = AssetsG_sndDervish; public static var guySwordShadowImg:Class = AssetsG_guySwordShadowImg; public static var SwordsmanPosterImg:Class = AssetsG_SwordsmanPosterImg; public static var tileImg:Class = AssetsG_tileImg; public static var smanImg:Class = AssetsG_smanImg; public static var healthDoubleImg:Class = AssetsG_healthDoubleImg; public static var sndSwordSwing:Class = AssetsG_sndSwordSwing; public static var pbUpImg:Class = AssetsG_pbUpImg; public static var sndShotgun:Class = AssetsG_sndShotgun; public static var tileMiniImg:Class = AssetsG_tileMiniImg; public static var SponsorPosterImg:Class = AssetsG_SponsorPosterImg; public static var pilloryImg:Class = AssetsG_pilloryImg; public static var sndLanding:Class = AssetsG_sndLanding; public static var pbDownImg:Class = AssetsG_pbDownImg; public static var LearnPosterImg:Class = AssetsG_LearnPosterImg; public static var burnImg:Class = AssetsG_burnImg; public static var StorePosterImg:Class = AssetsG_StorePosterImg; public static var guyImg:Class = AssetsG_guyImg; public static var guyMageOrcImg:Class = AssetsG_guyMageOrcImg; public static var guyShadowImg:Class = AssetsG_guyShadowImg; public static var minmomImg:Class = AssetsG_minmomImg; public static var MagicianPosterImg:Class = AssetsG_MagicianPosterImg; public static var energyDoubleImg:Class = AssetsG_energyDoubleImg; public static var healthHalfImg:Class = AssetsG_healthHalfImg; public static var poisonImg:Class = AssetsG_poisonImg; public static var sndLootGrab:Class = AssetsG_sndLootGrab; public static var firespurtImg:Class = AssetsG_firespurtImg; public static var RiflemanPosterImg:Class = AssetsG_RiflemanPosterImg; public static var guyMageShadowImg:Class = AssetsG_guyMageShadowImg; public static var sackImg:Class = AssetsG_sackImg; public static var levelImg:Class = AssetsG_levelImg; public static var music4:Class = AssetsG_music4; public static var shadowMageImg:Class = AssetsG_shadowMageImg; public static var music1:Class = AssetsG_music1; public static var ghostImg:Class = AssetsG_ghostImg; public static var music3:Class = AssetsG_music3; public static var sndExplosion:Class = AssetsG_sndExplosion; public static var flickImg:Class = AssetsG_flickImg; public static var brickImg:Class = AssetsG_brickImg; public static var headImg:Class = AssetsG_headImg; public static var music2:Class = AssetsG_music2; public static var ogreImg:Class = AssetsG_ogreImg; public static var sndMagicMissile:Class = AssetsG_sndMagicMissile; public static var chandelierImg:Class = AssetsG_chandelierImg; public static var healthImg:Class = AssetsG_healthImg; public static var shadowboltImg:Class = AssetsG_shadowboltImg; public static var fontBigImg:Class = AssetsG_fontBigImg; public static var guySwordOrcImg:Class = AssetsG_guySwordOrcImg; public static var sndRifle:Class = AssetsG_sndRifle; public static var energyHalfImg:Class = AssetsG_energyHalfImg; public static var minmonImg:Class = AssetsG_minmonImg; public static var guillotineImg:Class = AssetsG_guillotineImg; public static var CreditsPosterImg:Class = AssetsG_CreditsPosterImg; public static var guyOrcImg:Class = AssetsG_guyOrcImg; public static var guySwordImg:Class = AssetsG_guySwordImg; public static var ScoresPosterImg:Class = AssetsG_ScoresPosterImg; public static var mwaveRedImg:Class = AssetsG_mwaveRedImg; public static var arrowImg:Class = AssetsG_arrowImg; public static var fontImg:Class = AssetsG_fontImg; public static var mwaveImg:Class = AssetsG_mwaveImg; } }//package
Section 90
//AssetsG_arrowImg (AssetsG_arrowImg) package { import mx.core.*; public class AssetsG_arrowImg extends BitmapAsset { } }//package
Section 91
//AssetsG_brickImg (AssetsG_brickImg) package { import mx.core.*; public class AssetsG_brickImg extends BitmapAsset { } }//package
Section 92
//AssetsG_burnImg (AssetsG_burnImg) package { import mx.core.*; public class AssetsG_burnImg extends BitmapAsset { } }//package
Section 93
//AssetsG_chandelierImg (AssetsG_chandelierImg) package { import mx.core.*; public class AssetsG_chandelierImg extends BitmapAsset { } }//package
Section 94
//AssetsG_chestImg (AssetsG_chestImg) package { import mx.core.*; public class AssetsG_chestImg extends BitmapAsset { } }//package
Section 95
//AssetsG_CreditsPosterImg (AssetsG_CreditsPosterImg) package { import mx.core.*; public class AssetsG_CreditsPosterImg extends BitmapAsset { } }//package
Section 96
//AssetsG_energyDoubleImg (AssetsG_energyDoubleImg) package { import mx.core.*; public class AssetsG_energyDoubleImg extends BitmapAsset { } }//package
Section 97
//AssetsG_energyHalfImg (AssetsG_energyHalfImg) package { import mx.core.*; public class AssetsG_energyHalfImg extends BitmapAsset { } }//package
Section 98
//AssetsG_energyImg (AssetsG_energyImg) package { import mx.core.*; public class AssetsG_energyImg extends BitmapAsset { } }//package
Section 99
//AssetsG_explodeImg (AssetsG_explodeImg) package { import mx.core.*; public class AssetsG_explodeImg extends BitmapAsset { } }//package
Section 100
//AssetsG_FireballImg (AssetsG_FireballImg) package { import mx.core.*; public class AssetsG_FireballImg extends BitmapAsset { } }//package
Section 101
//AssetsG_firespurtImg (AssetsG_firespurtImg) package { import mx.core.*; public class AssetsG_firespurtImg extends BitmapAsset { } }//package
Section 102
//AssetsG_flickImg (AssetsG_flickImg) package { import mx.core.*; public class AssetsG_flickImg extends BitmapAsset { } }//package
Section 103
//AssetsG_fontBigImg (AssetsG_fontBigImg) package { import mx.core.*; public class AssetsG_fontBigImg extends BitmapAsset { } }//package
Section 104
//AssetsG_fontImg (AssetsG_fontImg) package { import mx.core.*; public class AssetsG_fontImg extends BitmapAsset { } }//package
Section 105
//AssetsG_ghostImg (AssetsG_ghostImg) package { import mx.core.*; public class AssetsG_ghostImg extends BitmapAsset { } }//package
Section 106
//AssetsG_guillotineImg (AssetsG_guillotineImg) package { import mx.core.*; public class AssetsG_guillotineImg extends BitmapAsset { } }//package
Section 107
//AssetsG_guyImg (AssetsG_guyImg) package { import mx.core.*; public class AssetsG_guyImg extends BitmapAsset { } }//package
Section 108
//AssetsG_guyMageImg (AssetsG_guyMageImg) package { import mx.core.*; public class AssetsG_guyMageImg extends BitmapAsset { } }//package
Section 109
//AssetsG_guyMageOrcImg (AssetsG_guyMageOrcImg) package { import mx.core.*; public class AssetsG_guyMageOrcImg extends BitmapAsset { } }//package
Section 110
//AssetsG_guyMageShadowImg (AssetsG_guyMageShadowImg) package { import mx.core.*; public class AssetsG_guyMageShadowImg extends BitmapAsset { } }//package
Section 111
//AssetsG_guyOrcImg (AssetsG_guyOrcImg) package { import mx.core.*; public class AssetsG_guyOrcImg extends BitmapAsset { } }//package
Section 112
//AssetsG_guyShadowImg (AssetsG_guyShadowImg) package { import mx.core.*; public class AssetsG_guyShadowImg extends BitmapAsset { } }//package
Section 113
//AssetsG_guySwordImg (AssetsG_guySwordImg) package { import mx.core.*; public class AssetsG_guySwordImg extends BitmapAsset { } }//package
Section 114
//AssetsG_guySwordOrcImg (AssetsG_guySwordOrcImg) package { import mx.core.*; public class AssetsG_guySwordOrcImg extends BitmapAsset { } }//package
Section 115
//AssetsG_guySwordShadowImg (AssetsG_guySwordShadowImg) package { import mx.core.*; public class AssetsG_guySwordShadowImg extends BitmapAsset { } }//package
Section 116
//AssetsG_headImg (AssetsG_headImg) package { import mx.core.*; public class AssetsG_headImg extends BitmapAsset { } }//package
Section 117
//AssetsG_healthDoubleImg (AssetsG_healthDoubleImg) package { import mx.core.*; public class AssetsG_healthDoubleImg extends BitmapAsset { } }//package
Section 118
//AssetsG_healthHalfImg (AssetsG_healthHalfImg) package { import mx.core.*; public class AssetsG_healthHalfImg extends BitmapAsset { } }//package
Section 119
//AssetsG_healthImg (AssetsG_healthImg) package { import mx.core.*; public class AssetsG_healthImg extends BitmapAsset { } }//package
Section 120
//AssetsG_LearnPosterImg (AssetsG_LearnPosterImg) package { import mx.core.*; public class AssetsG_LearnPosterImg extends BitmapAsset { } }//package
Section 121
//AssetsG_levelImg (AssetsG_levelImg) package { import mx.core.*; public class AssetsG_levelImg extends BitmapAsset { } }//package
Section 122
//AssetsG_MagicianPosterImg (AssetsG_MagicianPosterImg) package { import mx.core.*; public class AssetsG_MagicianPosterImg extends BitmapAsset { } }//package
Section 123
//AssetsG_minmomImg (AssetsG_minmomImg) package { import mx.core.*; public class AssetsG_minmomImg extends BitmapAsset { } }//package
Section 124
//AssetsG_minmonImg (AssetsG_minmonImg) package { import mx.core.*; public class AssetsG_minmonImg extends BitmapAsset { } }//package
Section 125
//AssetsG_music1 (AssetsG_music1) package { import mx.core.*; public class AssetsG_music1 extends SoundAsset { } }//package
Section 126
//AssetsG_music2 (AssetsG_music2) package { import mx.core.*; public class AssetsG_music2 extends SoundAsset { } }//package
Section 127
//AssetsG_music3 (AssetsG_music3) package { import mx.core.*; public class AssetsG_music3 extends SoundAsset { } }//package
Section 128
//AssetsG_music4 (AssetsG_music4) package { import mx.core.*; public class AssetsG_music4 extends SoundAsset { } }//package
Section 129
//AssetsG_mwaveImg (AssetsG_mwaveImg) package { import mx.core.*; public class AssetsG_mwaveImg extends BitmapAsset { } }//package
Section 130
//AssetsG_mwaveRedImg (AssetsG_mwaveRedImg) package { import mx.core.*; public class AssetsG_mwaveRedImg extends BitmapAsset { } }//package
Section 131
//AssetsG_ogreImg (AssetsG_ogreImg) package { import mx.core.*; public class AssetsG_ogreImg extends BitmapAsset { } }//package
Section 132
//AssetsG_pbDownImg (AssetsG_pbDownImg) package { import mx.core.*; public class AssetsG_pbDownImg extends BitmapAsset { } }//package
Section 133
//AssetsG_pbUpImg (AssetsG_pbUpImg) package { import mx.core.*; public class AssetsG_pbUpImg extends BitmapAsset { } }//package
Section 134
//AssetsG_pilloryImg (AssetsG_pilloryImg) package { import mx.core.*; public class AssetsG_pilloryImg extends BitmapAsset { } }//package
Section 135
//AssetsG_poisonImg (AssetsG_poisonImg) package { import mx.core.*; public class AssetsG_poisonImg extends BitmapAsset { } }//package
Section 136
//AssetsG_RiflemanPosterImg (AssetsG_RiflemanPosterImg) package { import mx.core.*; public class AssetsG_RiflemanPosterImg extends BitmapAsset { } }//package
Section 137
//AssetsG_sackImg (AssetsG_sackImg) package { import mx.core.*; public class AssetsG_sackImg extends BitmapAsset { } }//package
Section 138
//AssetsG_ScoresPosterImg (AssetsG_ScoresPosterImg) package { import mx.core.*; public class AssetsG_ScoresPosterImg extends BitmapAsset { } }//package
Section 139
//AssetsG_shadowboltImg (AssetsG_shadowboltImg) package { import mx.core.*; public class AssetsG_shadowboltImg extends BitmapAsset { } }//package
Section 140
//AssetsG_shadowMageImg (AssetsG_shadowMageImg) package { import mx.core.*; public class AssetsG_shadowMageImg extends BitmapAsset { } }//package
Section 141
//AssetsG_skullImg (AssetsG_skullImg) package { import mx.core.*; public class AssetsG_skullImg extends BitmapAsset { } }//package
Section 142
//AssetsG_SkyImg (AssetsG_SkyImg) package { import mx.core.*; public class AssetsG_SkyImg extends BitmapAsset { } }//package
Section 143
//AssetsG_smanImg (AssetsG_smanImg) package { import mx.core.*; public class AssetsG_smanImg extends BitmapAsset { } }//package
Section 144
//AssetsG_sndDervish (AssetsG_sndDervish) package { import mx.core.*; public class AssetsG_sndDervish extends SoundAsset { } }//package
Section 145
//AssetsG_sndExplosion (AssetsG_sndExplosion) package { import mx.core.*; public class AssetsG_sndExplosion extends SoundAsset { } }//package
Section 146
//AssetsG_sndHurt (AssetsG_sndHurt) package { import mx.core.*; public class AssetsG_sndHurt extends SoundAsset { } }//package
Section 147
//AssetsG_sndLanding (AssetsG_sndLanding) package { import mx.core.*; public class AssetsG_sndLanding extends SoundAsset { } }//package
Section 148
//AssetsG_sndLootGrab (AssetsG_sndLootGrab) package { import mx.core.*; public class AssetsG_sndLootGrab extends SoundAsset { } }//package
Section 149
//AssetsG_sndMagicMissile (AssetsG_sndMagicMissile) package { import mx.core.*; public class AssetsG_sndMagicMissile extends SoundAsset { } }//package
Section 150
//AssetsG_sndRifle (AssetsG_sndRifle) package { import mx.core.*; public class AssetsG_sndRifle extends SoundAsset { } }//package
Section 151
//AssetsG_sndShadowBolt (AssetsG_sndShadowBolt) package { import mx.core.*; public class AssetsG_sndShadowBolt extends SoundAsset { } }//package
Section 152
//AssetsG_sndShotgun (AssetsG_sndShotgun) package { import mx.core.*; public class AssetsG_sndShotgun extends SoundAsset { } }//package
Section 153
//AssetsG_sndSwordSwing (AssetsG_sndSwordSwing) package { import mx.core.*; public class AssetsG_sndSwordSwing extends SoundAsset { } }//package
Section 154
//AssetsG_SponsorPosterImg (AssetsG_SponsorPosterImg) package { import mx.core.*; public class AssetsG_SponsorPosterImg extends BitmapAsset { } }//package
Section 155
//AssetsG_StorePosterImg (AssetsG_StorePosterImg) package { import mx.core.*; public class AssetsG_StorePosterImg extends BitmapAsset { } }//package
Section 156
//AssetsG_SwordsmanPosterImg (AssetsG_SwordsmanPosterImg) package { import mx.core.*; public class AssetsG_SwordsmanPosterImg extends BitmapAsset { } }//package
Section 157
//AssetsG_tileImg (AssetsG_tileImg) package { import mx.core.*; public class AssetsG_tileImg extends BitmapAsset { } }//package
Section 158
//AssetsG_tileMiniImg (AssetsG_tileMiniImg) package { import mx.core.*; public class AssetsG_tileMiniImg extends BitmapAsset { } }//package
Section 159
//AssetsG_WantedPosterImg (AssetsG_WantedPosterImg) package { import mx.core.*; public class AssetsG_WantedPosterImg extends BitmapAsset { } }//package
Section 160
//Attack (Attack) package { import org.flixel.*; public class Attack { public var damageDiceCount:uint;// = 1 public var dealer:Entity; public var damageType:uint; public var cooldown:Number;// = 0 public var damageDiceMod:int;// = 0 public var damageDiceSize:uint;// = 1 public function Attack(_arg1:Entity){ damageType = Actor.DAMAGE_PHYSICAL; super(); this.dealer = _arg1; } public function setDamage(_arg1:uint=1, _arg2:uint=1, _arg3:int=0):void{ this.damageDiceCount = _arg1; this.damageDiceSize = _arg2; this.damageDiceMod = _arg3; } public function execute(_arg1:Entity):Boolean{ var _local2:Actor = (dealer as Actor); if ((_arg1 is Actor)){ _local2.attacking = true; (_arg1 as Actor).TakeDamage(UtilsG.dice(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod), damageType, dealer); FlxG.quake.start(0.007, 0.1); return (true); }; return (false); } } }//package
Section 161
//AttackBomb (AttackBomb) package { import org.flixel.*; public class AttackBomb extends Attack { public function AttackBomb(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Explosive; _local2 = NonEntityManager.GetExplosive(); if (_local2){ _local2.x = (this.dealer.x + 16); _local2.y = (this.dealer.y - 32); if (this.dealer.facing == FlxSprite.RIGHT){ _local2.velocity.x = 200; } else { _local2.velocity.x = -200; }; _local2.velocity.y = -400; _local2.acceleration.y = 800; }; return (true); } } }//package
Section 162
//AttackCharge (AttackCharge) package { import org.flixel.*; public class AttackCharge extends Attack { public function AttackCharge(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Actor = (this.dealer as Actor); if (_local2.sword.visible == true){ return (false); }; var _local3:FlxSound = new FlxSound(); _local3.loadEmbedded(AssetsG.sndSwordSwing); _local3.volume = 0.5; _local3.play(); _local2.attacking = true; if ((_local2.Controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackPrimaryCount++; }; }; _local2.sword.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); _local2.sword.Attack(); if (_local2.facing == FlxSprite.RIGHT){ _local2.velocity.x = (_local2.velocity.x + 300); } else { _local2.velocity.x = (_local2.velocity.x - 300); }; return (true); } } }//package
Section 163
//AttackDervish (AttackDervish) package { import org.flixel.*; public class AttackDervish extends Attack { public function AttackDervish(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Actor = (this.dealer as Actor); if (_local2.energyCurrent <= 0){ _local2.dervishing = false; _local2.facing = _local2.preferredDirection; return (true); }; var _local3:FlxSound = new FlxSound(); _local3.loadEmbedded(AssetsG.sndDervish); _local3.volume = 0.5; _local3.play(); if ((_local2.Controller is PlayerCharacterController)){ if (!_local2.dervishing){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackSecondaryCount = (SaveData.ThisSession.ThisPlay.ThisArea.attackSecondaryCount + FlxG.elapsed); }; }; }; _local2.sword.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); _local2.sword.Attack(); if (FlxG.keys.pressed("DOWN")){ _local2.velocity.y = (_local2.velocity.y + (1100 * FlxG.elapsed)); _local2.acceleration.x = 0; } else { _local2.velocity.y = (_local2.velocity.y + (-1100 * FlxG.elapsed)); _local2.acceleration.x = 0; }; _local2.dervishing = true; _local2.attacking = true; _local2.EnergyUse((60 * FlxG.elapsed)); return (true); } } }//package
Section 164
//AttackFireball (AttackFireball) package { import flash.events.*; import org.flixel.*; import flash.utils.*; public class AttackFireball extends Attack { public var timer:Timer; public function AttackFireball(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Actor = (this.dealer as Actor); if (_local2.energyCurrent < 40){ return (false); }; if (_local2.casting == true){ return (false); }; _local2.EnergyUse(40); _local2.casting = true; if (_local2.prop != null){ _local2.prop.visible = false; }; timer = new Timer(500, 1); timer.addEventListener(TimerEvent.TIMER, this.Fireball); timer.start(); return (true); } public function Fireball(_arg1:TimerEvent):Boolean{ var _local2:Actor; var _local3:Projectile; _local2 = (this.dealer as Actor); timer.stop(); timer.removeEventListener(TimerEvent.TIMER, this.Fireball); if (_local2.prop != null){ _local2.prop.visible = true; }; _local2.casting = false; if ((_local2.Controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackSecondaryCount = (SaveData.ThisSession.ThisPlay.ThisArea.attackSecondaryCount + 1); }; }; _local3 = NonEntityManager.GetProjectile(); if (_local3){ _local3.Controller = new FireballController(); (_local3.Controller as FireballController).setDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); _local3.launcher = _local2; _local3.acceleration = new FlxPoint(); if (_local2.facing == FlxSprite.RIGHT){ if (_local2.lookingUp == true){ _local3.x = ((_local2.x + _local2.bulletPointRightUp.x) - 3); _local3.y = ((_local2.y + _local2.bulletPointRightUp.y) - 6); _local3.velocity.x = 0; _local3.velocity.y = -(Projectile.SpeedFireball); _local3.play("vertup", true); } else { if (_local2.lookingDown == true){ _local3.x = ((_local2.x + _local2.bulletPointRightDown.x) - 3); _local3.y = ((_local2.y + _local2.bulletPointRightDown.y) - 6); _local3.velocity.x = 0; _local3.velocity.y = Projectile.SpeedFireball; _local3.play("vertdown", true); } else { _local3.x = ((_local2.x + _local2.bulletPointRight.x) + 1); _local3.y = ((_local2.y + _local2.bulletPointRight.y) - 5); _local3.velocity.y = 0; _local3.velocity.x = Projectile.SpeedFireball; _local3.play("horz", true); }; }; } else { if (_local2.lookingUp == true){ _local3.x = ((_local2.x + _local2.bulletPointLeftUp.x) + 3); _local3.y = ((_local2.y + _local2.bulletPointLeftUp.y) - 6); _local3.velocity.x = 0; _local3.velocity.y = -(Projectile.SpeedFireball); _local3.play("vertup", true); } else { if (_local2.lookingDown == true){ _local3.x = ((_local2.x + _local2.bulletPointLeftDown.x) + 3); _local3.y = ((_local2.y + _local2.bulletPointLeftDown.y) - 6); _local3.velocity.x = 0; _local3.velocity.y = Projectile.SpeedFireball; _local3.play("vertdown", true); } else { _local3.x = (((_local2.x + _local2.bulletPointLeft.x) - _local3.width) - 1); _local3.y = ((_local2.y + _local2.bulletPointLeft.y) - 5); _local3.velocity.y = 0; _local3.velocity.x = -(Projectile.SpeedFireball); _local3.play("horz", true); }; }; }; _local3.Fire(); }; return (true); } } }//package
Section 165
//AttackGuillotine (AttackGuillotine) package { import org.flixel.*; public class AttackGuillotine extends Attack { public var myVictims:FlxGroup; public var myBlades:FlxGroup; public function AttackGuillotine(_arg1:Entity){ myBlades = new FlxGroup(); myVictims = new FlxGroup(); super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:int = this.myBlades.members.length; var _local3:int = UtilsG.dice(1, _local2, -1); if ((((this.myBlades.members[_local3].exists == true)) && ((this.myBlades.members[_local3].velocity.y == 0)))){ (this.myBlades.members[_local3] as FlxSprite).play("shine"); (this.myVictims.members[_local3] as FlxSprite).play("scream"); }; return (true); } } }//package
Section 166
//AttackMagicMissile (AttackMagicMissile) package { import org.flixel.*; public class AttackMagicMissile extends Attack { public function AttackMagicMissile(_arg1:Entity){ super(_arg1); this.damageType = Actor.DAMAGE_MAGICAL; } override public function execute(_arg1:Entity):Boolean{ var _local4:Projectile; var _local2:Actor = (dealer as Actor); var _local3:FlxSound = new FlxSound(); _local3.loadEmbedded(AssetsG.sndMagicMissile); _local3.volume = 0.5; _local3.play(); _local2.attacking = true; _local4 = NonEntityManager.GetProjectile(); if (_local4 == null){ return (false); }; if ((_local2.Controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackPrimaryCount++; }; }; _local4.Controller = new MissileController(); _local4.launcher = _local2; _local4.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); _local4.damageType = this.damageType; _local4.facing = _local2.facing; if (_local2.facing == FlxSprite.RIGHT){ if (_local2.lookingUp == true){ _local4.x = ((_local2.x + _local2.bulletPointRightUp.x) - 8); _local4.y = (_local2.y + _local2.bulletPointRightUp.y); _local4.acceleration.x = 0; _local4.acceleration.y = -(Projectile.SpeedMissile); _local4.play("vert", true); } else { if (_local2.lookingDown == true){ _local4.x = ((_local2.x + _local2.bulletPointRightDown.x) - 8); _local4.y = (_local2.y + _local2.bulletPointRightDown.y); _local4.acceleration.x = 0; _local4.acceleration.y = Projectile.SpeedMissile; _local4.play("vert", true); } else { _local4.x = (_local2.x + _local2.bulletPointRight.x); _local4.y = ((_local2.y + _local2.bulletPointRight.y) - 8); _local4.acceleration.y = 0; _local4.acceleration.x = Projectile.SpeedMissile; _local4.play("horz", true); }; }; } else { if (_local2.lookingUp == true){ _local4.x = ((_local2.x + _local2.bulletPointLeftUp.x) + 3); _local4.y = (_local2.y + _local2.bulletPointLeftUp.y); _local4.acceleration.x = 0; _local4.acceleration.y = -(Projectile.SpeedMissile); _local4.play("vert", true); } else { if (_local2.lookingDown == true){ _local4.x = ((_local2.x + _local2.bulletPointLeftDown.x) + 3); _local4.y = (_local2.y + _local2.bulletPointLeftDown.y); _local4.acceleration.x = 0; _local4.acceleration.y = Projectile.SpeedMissile; _local4.play("vert", true); } else { _local4.x = ((_local2.x + _local2.bulletPointLeft.x) - 6); _local4.y = ((_local2.y + _local2.bulletPointLeft.y) - 8); _local4.acceleration.y = 0; _local4.acceleration.x = -(Projectile.SpeedMissile); _local4.play("horz", true); }; }; }; _local4.Fire(); return (true); } } }//package
Section 167
//AttackRifle (AttackRifle) package { import org.flixel.*; public class AttackRifle extends Attack { public function AttackRifle(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Actor; var _local4:Projectile; _local2 = (dealer as Actor); _local2.attacking = true; var _local3:FlxSound = new FlxSound(); _local3.loadEmbedded(AssetsG.sndRifle); _local3.volume = 0.5; _local3.play(); _local4 = NonEntityManager.GetProjectile(); if (_local4 == null){ return (false); }; _local4.Controller = new BulletController(); _local4.acceleration = new FlxPoint(); _local4.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); if (_local2.facing == FlxSprite.RIGHT){ if (_local2.lookingUp == true){ _local4.x = (_local2.x + _local2.bulletPointRightUp.x); _local4.y = (_local2.y + _local2.bulletPointRightUp.y); _local4.velocity.x = 0.25; _local4.velocity.y = -1; } else { if (_local2.lookingDown == true){ _local4.x = (_local2.x + _local2.bulletPointRightDown.x); _local4.y = (_local2.y + _local2.bulletPointRightDown.y); _local4.velocity.x = 0.25; _local4.velocity.y = 0.75; } else { _local4.x = (_local2.x + _local2.bulletPointRight.x); _local4.y = (_local2.y + _local2.bulletPointRight.y); _local4.velocity.y = 0; _local4.velocity.x = 1; }; }; } else { if (_local2.lookingUp == true){ _local4.x = (_local2.x + _local2.bulletPointLeftUp.x); _local4.y = (_local2.y + _local2.bulletPointLeftUp.y); _local4.velocity.x = -0.25; _local4.velocity.y = -1; } else { if (_local2.lookingDown == true){ _local4.x = (_local2.x + _local2.bulletPointLeftDown.x); _local4.y = (_local2.y + _local2.bulletPointLeftDown.y); _local4.velocity.x = -0.25; _local4.velocity.y = 0.75; } else { _local4.x = (_local2.x + _local2.bulletPointLeft.x); _local4.y = (_local2.y + _local2.bulletPointLeft.y); _local4.velocity.y = 0; _local4.velocity.x = -1; }; }; }; UtilsG.NormalizeVector(_local4.velocity, Projectile.SpeedBullet); _local4.launcher = _local2; _local4.Fire(); _local4 = NonEntityManager.GetProjectile(); if (_local4 == null){ return (false); }; _local4.acceleration = new FlxPoint(); _local4.Controller = new BulletController(); _local4.acceleration = new FlxPoint(); _local4.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); if (_local2.facing == FlxSprite.RIGHT){ if (_local2.lookingUp == true){ _local4.x = (_local2.x + _local2.bulletPointRightUp.x); _local4.y = (_local2.y + _local2.bulletPointRightUp.y); _local4.velocity.x = 0.35; _local4.velocity.y = -1; } else { if (_local2.lookingDown == true){ _local4.x = (_local2.x + _local2.bulletPointRightDown.x); _local4.y = (_local2.y + _local2.bulletPointRightDown.y); _local4.velocity.x = 0.35; _local4.velocity.y = 0.75; } else { _local4.x = (_local2.x + _local2.bulletPointRight.x); _local4.y = ((_local2.y + _local2.bulletPointRight.y) - 1); _local4.velocity.y = -0.05; _local4.velocity.x = 1; }; }; } else { if (_local2.lookingUp == true){ _local4.x = (_local2.x + _local2.bulletPointLeftUp.x); _local4.y = (_local2.y + _local2.bulletPointLeftUp.y); _local4.velocity.x = -0.35; _local4.velocity.y = -1; } else { if (_local2.lookingDown == true){ _local4.x = (_local2.x + _local2.bulletPointLeftDown.x); _local4.y = (_local2.y + _local2.bulletPointLeftDown.y); _local4.velocity.x = -0.35; _local4.velocity.y = 0.75; } else { _local4.x = (_local2.x + _local2.bulletPointLeft.x); _local4.y = ((_local2.y + _local2.bulletPointLeft.y) - 1); _local4.velocity.y = -0.05; _local4.velocity.x = -1; }; }; }; UtilsG.NormalizeVector(_local4.velocity, Projectile.SpeedBullet); _local4.launcher = _local2; _local4.Fire(); _local4 = NonEntityManager.GetProjectile(); if (_local4 == null){ return (false); }; _local4.Controller = new BulletController(); _local4.acceleration = new FlxPoint(); _local4.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); if (_local2.facing == FlxSprite.RIGHT){ if (_local2.lookingUp == true){ _local4.x = (_local2.x + _local2.bulletPointRightUp.x); _local4.y = (_local2.y + _local2.bulletPointRightUp.y); _local4.velocity.x = 0.45; _local4.velocity.y = -1; } else { if (_local2.lookingDown == true){ _local4.x = (_local2.x + _local2.bulletPointRightDown.x); _local4.y = (_local2.y + _local2.bulletPointRightDown.y); _local4.velocity.x = 0.45; _local4.velocity.y = 0.75; } else { _local4.x = (_local2.x + _local2.bulletPointRight.x); _local4.y = ((_local2.y + _local2.bulletPointRight.y) + 1); _local4.velocity.y = 0.05; _local4.velocity.x = 1; }; }; } else { if (_local2.lookingUp == true){ _local4.x = (_local2.x + _local2.bulletPointLeftUp.x); _local4.y = (_local2.y + _local2.bulletPointLeftUp.y); _local4.velocity.x = -0.45; _local4.velocity.y = -1; } else { if (_local2.lookingDown == true){ _local4.x = (_local2.x + _local2.bulletPointLeftDown.x); _local4.y = (_local2.y + _local2.bulletPointLeftDown.y); _local4.velocity.x = -0.45; _local4.velocity.y = 0.75; } else { _local4.x = (_local2.x + _local2.bulletPointLeft.x); _local4.y = ((_local2.y + _local2.bulletPointLeft.y) + 1); _local4.velocity.y = 0.05; _local4.velocity.x = -1; }; }; }; UtilsG.NormalizeVector(_local4.velocity, Projectile.SpeedBullet); _local4.launcher = _local2; _local4.Fire(); if ((_local2.Controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackPrimaryCount++; }; }; return (true); } } }//package
Section 168
//AttackShadowBolt (AttackShadowBolt) package { import org.flixel.*; public class AttackShadowBolt extends Attack { public function AttackShadowBolt(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Actor; _local2 = (dealer as Actor); _local2.attacking = true; var _local3:Projectile = NonEntityManager.GetProjectile(); if (_local3 == null){ return (false); }; var _local4:FlxSound = new FlxSound(); _local4.loadEmbedded(AssetsG.sndShadowBolt); _local4.volume = 0.5; _local4.play(); if ((_local2.Controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackPrimaryCount++; }; }; if (_local2.facing == FlxSprite.RIGHT){ if (_local2.lookingUp == true){ _local3.x = (_local2.x + _local2.bulletPointRightUp.x); _local3.y = (_local2.y + _local2.bulletPointRightUp.y); } else { _local3.x = (_local2.x + _local2.bulletPointRight.x); _local3.y = (_local2.y + _local2.bulletPointRight.y); }; } else { if (_local2.lookingUp == true){ _local3.x = (_local2.x + _local2.bulletPointLeftUp.x); _local3.y = (_local2.y + _local2.bulletPointLeftUp.y); } else { _local3.x = (_local2.x + _local2.bulletPointLeft.x); _local3.y = (_local2.y + _local2.bulletPointLeft.y); }; }; _local3.Controller = new ShadowBoltController(); _local3.launcher = _local2; _local3.acceleration = new FlxPoint(); _local3.velocity.x = (_arg1.x - _local2.x); _local3.velocity.y = (_arg1.y - _local2.y); UtilsG.NormalizeVector(_local3.velocity, Projectile.SpeedShadowbolt); _local3.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); _local3.Fire(); return (true); } } }//package
Section 169
//AttackShotgun (AttackShotgun) package { import org.flixel.*; public class AttackShotgun extends Attack { public function AttackShotgun(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Actor; var _local5:Projectile; _local2 = (dealer as Actor); if (_local2.energyCurrent < 40){ return (false); }; var _local3:FlxSound = new FlxSound(); _local3.loadEmbedded(AssetsG.sndShotgun); _local3.volume = 0.5; _local3.play(); _local2.attacking = true; if ((_local2.Controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackSecondaryCount = (SaveData.ThisSession.ThisPlay.ThisArea.attackSecondaryCount + 1); }; }; var _local4:int; while (_local4 < 10) { _local5 = NonEntityManager.GetProjectile(); if (_local5 == null){ break; }; _local5.Controller = new BulletController(); _local5.acceleration = new FlxPoint(); _local5.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); if (_local2.facing == FlxSprite.RIGHT){ if (_local2.lookingUp == true){ _local5.x = (_local2.x + _local2.bulletPointRightUp.x); _local5.y = (_local2.y + _local2.bulletPointRightUp.y); _local5.velocity.x = UtilsG.dice(1, 200, -100); _local5.velocity.y = -(UtilsG.dice(1, 200, 200)); } else { if (_local2.lookingDown == true){ _local5.x = (_local2.x + _local2.bulletPointRightDown.x); _local5.y = (_local2.y + _local2.bulletPointRightDown.y); _local5.velocity.x = UtilsG.dice(1, 200, -100); _local5.velocity.y = UtilsG.dice(1, 200, 200); } else { _local5.x = (_local2.x + _local2.bulletPointRight.x); _local5.y = (_local2.y + _local2.bulletPointRight.y); _local5.velocity.y = UtilsG.dice(1, 200, -100); _local5.velocity.x = UtilsG.dice(1, 200, 200); }; }; } else { if (_local2.lookingUp == true){ _local5.x = (_local2.x + _local2.bulletPointLeftUp.x); _local5.y = (_local2.y + _local2.bulletPointLeftUp.y); _local5.velocity.x = UtilsG.dice(1, 200, -100); _local5.velocity.y = -(UtilsG.dice(1, 200, 200)); } else { if (_local2.lookingDown == true){ _local5.x = (_local2.x + _local2.bulletPointLeftDown.x); _local5.y = (_local2.y + _local2.bulletPointLeftDown.y); _local5.velocity.x = UtilsG.dice(1, 200, -100); _local5.velocity.y = UtilsG.dice(1, 200, 200); } else { _local5.x = (_local2.x + _local2.bulletPointLeft.x); _local5.y = (_local2.y + _local2.bulletPointLeft.y); _local5.velocity.y = UtilsG.dice(1, 200, -100); _local5.velocity.x = -(UtilsG.dice(1, 200, 200)); }; }; }; _local5.launcher = _local2; _local5.Fire(); _local4++; }; if (_local2.lookingDown == true){ _local2.velocity.y = (_local2.velocity.y + -400); }; _local2.EnergyUse(40); return (true); } } }//package
Section 170
//AttackSword (AttackSword) package { import org.flixel.*; public class AttackSword extends Attack { public function AttackSword(_arg1:Entity){ super(_arg1); } override public function execute(_arg1:Entity):Boolean{ var _local2:Actor = (this.dealer as Actor); if (_local2.sword.visible == true){ return (false); }; if (_local2.attacking == true){ return (false); }; var _local3:FlxSound = new FlxSound(); _local3.loadEmbedded(AssetsG.sndSwordSwing); _local3.volume = 0.5; _local3.play(); _local2.attacking = true; if ((_local2.Controller is PlayerCharacterController)){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.attackPrimaryCount++; }; }; _local2.sword.AssignDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); _local2.sword.Attack(); return (true); } } }//package
Section 171
//BulletController (BulletController) package { public class BulletController extends ProjectileController { public var lifeTimeCounter:Number;// = 0 public var lifeTime:Number;// = 2 override public function init(_arg1:Projectile):void{ super.init(_arg1); this.projectile.createGraphic(2, 2, 4294953984); this.projectile.Arcs = false; this.projectile.bouncesOnContact = true; this.projectile.damageType = Actor.DAMAGE_PHYSICAL; this.projectile.AssignDamage(2, 4); this.projectile.collisionEvent = null; } override public function update():void{ super.update(); if (this.projectile.onScreen() == false){ this.projectile.kill(); }; } } }//package
Section 172
//Camera (Camera) package { import org.flixel.*; public class Camera extends Entity { public const DOWN:int = 1; public const FORWARD:int = 0; public const LEFT:int = -1; public const UP:int = -1; public const RIGHT:int = 1; public var looking:int;// = 0 public var fac:int;// = 0 public var target:Entity; public var lookDistance:int;// = 64 public function Camera(_arg1:Entity){ target = _arg1; super(target.x, target.y); visible = false; } override public function update():void{ fac = ((this.target.facing)==FlxSprite.RIGHT) ? RIGHT : LEFT; if (FlxG.keys.pressed("UP")){ looking = UP; } else { if (FlxG.keys.pressed("DOWN")){ looking = DOWN; } else { looking = FORWARD; }; }; var _local1:FlxSprite = new FlxSprite(); _local1.x = ((this.target.x + (fac * 32)) - this.x); _local1.y = ((this.target.y + (looking * lookDistance)) - this.y); if (UtilsG.VectorLength(_local1) > 45){ _local1.x = (_local1.x * 3); _local1.y = (_local1.y * 3); this.velocity = _local1; } else { this.velocity = new FlxPoint(); }; super.update(); } } }//package
Section 173
//ChandelierController (ChandelierController) package { import flash.geom.*; import org.flixel.*; public class ChandelierController extends ActorController { public var state:uint; public static const STATE_NOTEVIL:uint = 3; public static const STATE_HANGING:uint = 0; public static const STATE_RUNNING:uint = 2; public static const STATE_FALLING:uint = 1; override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.loadGraphic(AssetsG.chandelierImg, true, true, 45, 18); this.actor.width = 25; this.actor.height = 16; this.actor.offset.x = 11; this.actor.offset.y = 2; this.actor.addAnimation("idle", [0, 0]); this.actor.addAnimation("run", [9, 10, 11, 12], 14, true); this.actor.addAnimation("attack", [13, 14, 15, 16, 17, 18, 19, 19, 19], 24, false); this.actor.addAnimation("jump falling", [1, 2]); this.actor.addAnimation("jump landing", [3, 4, 5, 6, 7, 8, 8, 8], 24, false); this.actor.addAnimation("casting", [20, 21, 22, 23, 24, 25, 26], 6, true); this.actor.play("idle"); this.actor.addAnimationCallback(this.actor.AnimationCallback); this.actor.acceleration = new FlxPoint(); this.actor.collideAttack = new Attack(this.actor); this.agroDistance = (7 * 16); this.actor.healthMax = 10; this.actor.health = this.actor.healthMax; this.actor.runSpeed = (UtilsG.dice(2, 4) * 100); this.actor.maxVelocity.x = UtilsG.dice(2, 25, 50); this.actor.jumpPower = -(UtilsG.dice(1, 50, 100)); this.actor.drag.x = 9001; this.state = ((UtilsG.dice(1, 3))==3) ? ChandelierController.STATE_NOTEVIL : ChandelierController.STATE_HANGING; this.enemyType = SaveData.ENEMY_CHANDELIER; this.actor.DeriveStats(); } override public function update():void{ var _local1:Actor = EatG.PC; var _local2:Point = new Point(_local1.x, _local1.y); var _local3:Point = new Point(this.actor.x, this.actor.y); var _local4:Point = new Point((_local2.x - _local3.x), (_local2.y - _local3.y)); switch (this.state){ case STATE_HANGING: if ((((Math.abs(_local4.length) < this.agroDistance)) && ((_local1.y > (this.actor.y + this.actor.height))))){ this.actor.gravity = 750; this.actor.acceleration.y = 750; this.state = STATE_FALLING; this.actor.jumping = (this.actor.inAir = true); }; break; case STATE_FALLING: break; case STATE_RUNNING: this.actor.PerformAction("MOVE FORWARD"); break; case STATE_NOTEVIL: actor.solid = false; default: break; }; } override public function hitLeft(_arg1:FlxObject, _arg2:Number):Boolean{ this.actor.TakeDamage(100); var _local3:Explosion = NonEntityManager.GetExplosion(); if (_local3){ _local3.init(); _local3.x = ((this.actor.x + (this.actor.width / 2)) - (_local3.width / 2)); _local3.y = ((this.actor.y + (this.actor.height / 2)) - (_local3.height / 2)); _local3.Restart(); }; return (true); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (30 + (20 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.experience = (120 + (10 * (_arg1 - 1))); this.actor.collideAttack.setDamage((2 + _arg1), 16, 0); } override public function hitBottom(_arg1:FlxObject, _arg2:Number):Boolean{ super.hitBottom(_arg1, _arg2); if (this.state == STATE_RUNNING){ return (true); }; var _local3:Actor = EatG.PC; var _local4:Point = new Point(_local3.x, _local3.y); var _local5:Point = new Point(this.actor.x, this.actor.y); var _local6:Point = new Point((_local4.x - _local5.x), (_local4.y - _local5.y)); if (_local6.x < 0){ this.actor.preferredDirection = FlxSprite.LEFT; } else { this.actor.preferredDirection = FlxSprite.RIGHT; }; this.state = STATE_RUNNING; return (true); } } }//package
Section 174
//EatG (EatG) package { import flash.display.*; import org.flixel.*; import spill.localisation.*; import Spill.Components.*; public class EatG { public static const HUMAN:int = 0; public static const ORC:int = 1; public static const SHADOWMONSTER:int = 2; public static var enteredAreaLevel:uint; public static var lsb:LanguageSelectBox; public static var brandingLogo:BrandingLogo; public static var brandingImg:BitmapData; public static var Spil_Submitter:Submitter; public static var CurrentOrg:int = 0; public static var brandingSmallImg:BitmapData; public static var KONG:Boolean = false; public static var music:Music; public static var MOCHI:Boolean = true; public static var NEWGROUNDS:Boolean = true; public static var SPIL_API:Boolean = false; public static function get Level():TileMap{ if ((FlxG.state is StatePlay)){ return ((FlxG.state as StatePlay).ThisMap); }; if ((FlxG.state is StateMenu)){ return ((FlxG.state as StateMenu).ThisMap); }; if ((FlxG.state is StateTutorial)){ return ((FlxG.state as StateTutorial).Level); }; if ((FlxG.state is StateExposition)){ return ((FlxG.state as StateExposition).Level); }; if ((FlxG.state is StateCredits)){ return ((FlxG.state as StateCredits).ThisMap); }; return (null); } public static function get PC():Actor{ if ((FlxG.state is StatePlay)){ return ((FlxG.state as StatePlay).PC); }; if ((FlxG.state is StateMenu)){ return ((FlxG.state as StateMenu).player); }; if ((FlxG.state is StateTutorial)){ return ((FlxG.state as StateTutorial).player); }; if ((FlxG.state is StateExposition)){ return ((FlxG.state as StateExposition).player); }; if ((FlxG.state is StateCredits)){ return ((FlxG.state as StateCredits).player); }; return (null); } } }//package
Section 175
//Emitter (Emitter) package { import org.flixel.*; public class Emitter extends FlxEmitter { public var SpritePool:FlxGroup; public var CrazyBloodPhysicsEnabled:Boolean;// = true public var CrazierBloodPhysicsEnabled:Boolean;// = false public var AllowParticleRotation:Boolean;// = false public function Emitter(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0.1){ super(_arg1, _arg2); } override public function setRotation(_arg1:Number=0, _arg2:Number=0):void{ if (this.AllowParticleRotation == true){ super.setRotation(_arg1, _arg2); } else { super.setRotation(0, 0); }; } override public function update():void{ super.update(); if (_explode){ if ((((delay > 0)) && ((_timer > delay)))){ this.kill(); }; }; } override public function reset(_arg1:Number, _arg2:Number):void{ super.reset(_arg1, _arg2); this.SpritePool = null; } override public function start(_arg1:Boolean=true, _arg2:Number=0, _arg3:uint=0):void{ if (this.SpritePool != null){ this.members = this.SpritePool.members; }; super.start(_arg1, _arg2, _arg3); } public function reload():void{ } override public function kill():void{ this.members = []; this._particle = 0; if (this.SpritePool != null){ this.SpritePool.kill(); }; super.kill(); } } }//package
Section 176
//Entity (Entity) package { import org.flixel.*; public class Entity extends FlxSprite { public var collisionSprite:FlxSprite; public function Entity(_arg1:int=0, _arg2:int=0){ collisionSprite = new FlxSprite(); super(_arg1, _arg2); } public function get CurrentAnimationName():String{ return (this._curAnim.name); } public function OnOverlap(_arg1:FlxObject):void{ } override public function render():void{ super.render(); } override public function reset(_arg1:Number, _arg2:Number):void{ velocity.x = 0; velocity.y = 0; drag.x = 0; drag.y = 0; acceleration.x = 0; acceleration.y = 0; _animations = []; _curAnim = null; _curFrame = 0; _callback = null; _flicker = false; _flickerTimer = -1; solid = true; visible = true; angle = 0; super.reset(_arg1, _arg2); } } }//package
Section 177
//EntityManager (EntityManager) package { import org.flixel.*; public class EntityManager { public static var LadderList:FlxGroup; public static var ActorNonMapList:FlxGroup; public static var HeadList:FlxGroup; public static var FallingObjectList:FlxGroup; public static var LootList:FlxGroup; public static var TurretList:FlxGroup; public static var SpikesList:FlxGroup; public static var ActorList:FlxGroup; public static var initialized:Boolean = false; public static var TriggerList:FlxGroup; public static var TrapDoorList:FlxGroup; public static function GetSpikes():Spikes{ var _local1:Spikes = (SpikesList.getFirstAvail() as Spikes); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetTurret():Turret{ var _local1:Turret = (TurretList.getFirstAvail() as Turret); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetFallingObject():FallingObject{ var _local1:FallingObject = (FallingObjectList.getFirstAvail() as FallingObject); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetTrapDoor():TrapDoor{ var _local1:TrapDoor = (TrapDoorList.getFirstAvail() as TrapDoor); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetActorNonMap():Actor{ var _local1:Actor = (ActorNonMapList.getFirstAvail() as Actor); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetActor():Actor{ var _local1:Actor = (ActorList.getFirstAvail() as Actor); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetTrigger():Trigger{ var _local1:Trigger = (TriggerList.getFirstAvail() as Trigger); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function FirstTimeInit():void{ var _local2:Array; var _local1:int; EntityManager.initialized = true; EntityManager.ActorNonMapList = new FlxGroup(); _local2 = ActorNonMapList.members; _local1 = 0; while (_local1 < 1) { _local2[_local1] = new Actor(); _local1++; }; EntityManager.ActorList = new FlxGroup(); _local2 = ActorList.members; _local1 = 0; while (_local1 < 100) { _local2[_local1] = new Actor(); _local1++; }; EntityManager.FallingObjectList = new FlxGroup(); _local2 = FallingObjectList.members; _local1 = 0; while (_local1 < 10) { _local2[_local1] = new FallingObject(); _local1++; }; EntityManager.HeadList = new FlxGroup(); _local2 = HeadList.members; _local1 = 0; while (_local1 < 10) { _local2[_local1] = new Head(); _local1++; }; EntityManager.LadderList = new FlxGroup(); _local2 = LadderList.members; _local1 = 0; while (_local1 < 100) { _local2[_local1] = new Ladder(); _local1++; }; EntityManager.LootList = new FlxGroup(); _local2 = LootList.members; _local1 = 0; while (_local1 < 200) { _local2[_local1] = new Loot(); _local1++; }; EntityManager.SpikesList = new FlxGroup(); _local2 = SpikesList.members; _local1 = 0; while (_local1 < 100) { _local2[_local1] = new Spikes(); _local1++; }; EntityManager.TriggerList = new FlxGroup(); _local2 = TriggerList.members; _local1 = 0; while (_local1 < 50) { _local2[_local1] = new Trigger(); _local1++; }; EntityManager.TurretList = new FlxGroup(); _local2 = TurretList.members; _local1 = 0; while (_local1 < 50) { _local2[_local1] = new Turret(); _local1++; }; EntityManager.TrapDoorList = new FlxGroup(); _local2 = TrapDoorList.members; _local1 = 0; while (_local1 < 5) { _local2[_local1] = new TrapDoor(); _local1++; }; } public static function Reset():void{ var _local1:Actor; var _local2:Actor; var _local3:FallingObject; var _local4:Head; var _local5:Ladder; var _local6:Loot; var _local7:Spikes; var _local8:Trigger; var _local9:Turret; var _local10:TrapDoor; if (EntityManager.initialized == false){ EntityManager.FirstTimeInit(); }; for each (_local1 in EntityManager.ActorNonMapList.members) { _local1.exists = false; }; for each (_local2 in EntityManager.ActorList.members) { _local2.exists = false; }; for each (_local3 in EntityManager.FallingObjectList.members) { _local3.exists = false; }; for each (_local4 in EntityManager.HeadList.members) { _local4.exists = false; }; for each (_local5 in EntityManager.LadderList.members) { _local5.exists = false; }; for each (_local6 in EntityManager.LootList.members) { _local6.exists = false; }; for each (_local7 in EntityManager.SpikesList.members) { _local7.exists = false; }; for each (_local8 in EntityManager.TriggerList.members) { _local8.exists = false; }; for each (_local9 in EntityManager.TurretList.members) { _local9.exists = false; }; for each (_local10 in EntityManager.TrapDoorList.members) { _local10.exists = false; _local10.triggered = false; _local10.tileToCloseOff = []; _local10.mobsToWatch = null; _local10.oldTiles = []; }; } public static function GetHead():Head{ var _local1:Head = (HeadList.getFirstAvail() as Head); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetLadder():Ladder{ var _local1:Ladder = (LadderList.getFirstAvail() as Ladder); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetLoot():Loot{ var _local1:Loot = (LootList.getFirstAvail() as Loot); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } } }//package
Section 178
//Explosion (Explosion) package { import org.flixel.*; public class Explosion extends Entity { public var damageDiceCount:uint;// = 0 public var dealer:Entity; public var victims:Array; public var damageDiceMod:int;// = 0 public var damageDiceSize:uint;// = 0 public var spawnSmaller:Boolean;// = true public function Explosion(_arg1:int=0, _arg2:int=0){ victims = []; super(_arg1, _arg2); this.visible = false; this.exists = false; } public function AnimationCallback(_arg1:String, _arg2:uint, _arg3:uint):void{ if ((((_arg1 == "EXPLODE")) && ((_arg2 == (_curAnim.frames.length - 1))))){ this.visible = false; this.kill(); this.victims.length = 0; }; } public function setDamage(_arg1:uint=1, _arg2:uint=1, _arg3:int=0):void{ this.damageDiceCount = _arg1; this.damageDiceSize = _arg2; this.damageDiceMod = _arg3; } override public function update():void{ super.update(); } override public function OnOverlap(_arg1:FlxObject):void{ if ((_arg1 is Actor)){ this.HurtEnemy(_arg1, this); }; } public function init():void{ this.loadGraphic(AssetsG.explodeImg, true, false, 64, 64); this.addAnimation("idle", [0]); this.addAnimation("EXPLODE", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], 24, false); this.addAnimationCallback(this.AnimationCallback); } public function HurtEnemy(_arg1:FlxObject, _arg2:FlxObject):void{ var _local3:int; var _local4:int; var _local5:Number; if (_arg1.exists == true){ _local3 = this.victims.length; _local4 = 0; while (_local4 < _local3) { if (this.victims[_local4] == _arg1){ return; }; _local4++; }; _local5 = UtilsG.dice(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); if (_arg1 != this.dealer){ (_arg1 as Actor).TakeDamage(_local5, Actor.DAMAGE_PHYSICAL, dealer); }; _arg1.velocity.y = (_arg1.velocity.y + -300); this.victims[this.victims.length] = _arg1; }; } public function DestroyEnvironment():void{ } public function Restart():void{ this.dead = false; this.exists = true; this.visible = true; this.play("EXPLODE", true); FlxG.quake.start(0.05, 0.3); var _local1:FlxSound = new FlxSound(); _local1.loadEmbedded(AssetsG.sndExplosion); _local1.volume = 0.5; _local1.play(); } } }//package
Section 179
//Explosive (Explosive) package { import org.flixel.*; public class Explosive extends Entity { public var lifetimeCounter:Number;// = 0 public var lifetime:Number;// = 2 public function Explosive(_arg1:int=0, _arg2:int=0){ super(_arg1, _arg2); this.createGraphic(16, 16, 2298426163); } override public function update():void{ this.lifetimeCounter = (this.lifetimeCounter + FlxG.elapsed); if (this.lifetimeCounter > this.lifetime){ this.createExplosion(); this.kill(); }; if (this.alpha == 1){ this.alpha = 0; } else { this.alpha = 1; }; super.update(); } public function createExplosion():void{ var _local1:Explosion; _local1 = NonEntityManager.GetExplosion(); if (_local1 == null){ return; }; _local1.x = ((this.x + (this.width / 2)) - (_local1.width / 2)); _local1.y = ((this.y + (this.height / 2)) - (_local1.height / 2)); _local1.setDamage(2, 10, 4); _local1.Restart(); } override public function hitBottom(_arg1:FlxObject, _arg2:Number):void{ super.hitBottom(_arg1, _arg2); this.velocity.x = 0; this.velocity.y = 0; } override public function reset(_arg1:Number, _arg2:Number):void{ super.reset(_arg1, _arg2); this.lifetimeCounter = 0; } } }//package
Section 180
//FallingObject (FallingObject) package { import org.flixel.*; public class FallingObject extends Entity { public var Origin:FlxPoint; public var DamageOne:Boolean;// = false public static const FALL_SPEED:Number = 800; public function FallingObject(_arg1:int=0, _arg2:int=0){ Origin = new FlxPoint(); super(_arg1, _arg2); this.loadGraphic(AssetsG.guillotineImg, false, false, 32, 16); this.addAnimation("idle", [0]); this.addAnimation("shine", [1, 2, 3, 4, 5, 6, 0], 8, false); this.addAnimationCallback(this.animCallback); } override public function hitBottom(_arg1:FlxObject, _arg2:Number):void{ } override public function OnOverlap(_arg1:FlxObject):void{ var _local2:Actor; var _local3:int; if (velocity.y == 0){ return; }; if ((_arg1 is Actor)){ if (this.DamageOne){ return; }; _local2 = (_arg1 as Actor); _local3 = UtilsG.dice(1, 10, (this.velocity.y / 100)); _local2.TakeDamage(_local3); this.DamageOne = true; } else { if ((_arg1 is Head)){ (_arg1 as Head).die(); this.DamageOne = true; }; }; } override public function update():void{ super.update(); if (this.y > EatG.Level.height){ this.reset(Origin.x, Origin.y); }; } public function animCallback(_arg1:String, _arg2:uint, _arg3:uint):void{ if ((((_arg1 == "shine")) && ((_arg2 == (_curAnim.frames.length - 1))))){ this.acceleration.y = FallingObject.FALL_SPEED; this.play("idle"); }; } override public function reset(_arg1:Number, _arg2:Number):void{ super.reset(_arg1, _arg2); this.loadGraphic(AssetsG.guillotineImg, false, false, 32, 16); this.addAnimation("idle", [0]); this.addAnimation("shine", [1, 2, 3, 4, 5, 6, 0], 8, false); this.addAnimationCallback(this.animCallback); this.play("idle"); this.DamageOne = false; this.velocity = new FlxPoint(); this.acceleration = new FlxPoint(); } } }//package
Section 181
//FighterController (FighterController) package { import org.flixel.*; public class FighterController extends PlayerCharacterController { override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.offsetRight = new FlxPoint(12, 7); this.actor.offsetLeft = new FlxPoint(13, 7); this.actor.offsetLeftClimbing = new FlxPoint(12, 7); this.actor.offsetRightClimbing = new FlxPoint(11, 7); if (EatG.CurrentOrg == EatG.ORC){ this.actor.loadGraphic(AssetsG.guySwordOrcImg, true, true, 40, 25); } else { if (EatG.CurrentOrg == EatG.SHADOWMONSTER){ this.actor.loadGraphic(AssetsG.guySwordShadowImg, true, true, 40, 25); } else { this.actor.loadGraphic(AssetsG.guySwordImg, true, true, 40, 25); }; }; this.actor.width = this.actor.dimensions.x; this.actor.height = this.actor.dimensions.y; this.actor.offset = this.actor.offsetRight; this.actor.addAnimation("idle", [0, 0]); this.actor.addAnimation("blink", [1, 2, 3], 6, false); this.actor.addAnimation("run", [4, 5, 6, 7], 14, true); this.actor.addAnimation("attack", [8, 9, 10, 11, 12, 13, 14, 14, 14], 18, false); this.actor.addAnimation("idle up", [16, 16]); this.actor.addAnimation("blink up", [17, 18, 19], 6, false); this.actor.addAnimation("run up", [20, 21, 22, 23], 14, true); this.actor.addAnimation("attack up", [24, 25, 26, 27, 28, 29, 30, 30, 30], 18, false); this.actor.addAnimation("attack down", [49, 50, 51, 52, 53, 54, 55], 14, false); this.actor.addAnimation("fly down", [55, 55, 55], 14, false); this.actor.addAnimation("jump pre", [32, 33, 34], 24, false); this.actor.addAnimation("jump raising", [35, 35]); this.actor.addAnimation("jump falling", [36, 36]); this.actor.addAnimation("jump landing", [37, 38, 39], 24, false); this.actor.addAnimation("climbing", [44, 45, 46, 47], 12); this.actor.addAnimation("climbing pause", [47, 47]); this.actor.addAnimation("turn inside", [40, 41, 42, 43], 12, false); this.actor.addAnimation("casting", [1, 2, 3], 6, true); this.actor.play("idle"); this.actor.maxVelocity.x = 153; this.actor.runSpeed = (8 * this.actor.maxVelocity.x); this.actor.drag.x = (8 * this.actor.runSpeed); this.actor.jumpPower = -340; this.actor.gravity = this.actor.NormalGravity; this.actor.damageCoolDown = 1; this.actor.healthMax = 200; this.actor.health = this.actor.healthMax; this.actor.energyMax = 50; this.actor.energyCurrent = this.actor.energyMax; this.actor.primaryAttack = new AttackSword(this.actor); this.actor.primaryAttack.cooldown = 0.2; this.actor.secondaryAttack = new AttackDervish(this.actor); this.actor.secondaryAttack.cooldown = 0; this.actor.DeriveStats(); this.actor.RestoreGravity(this.actor.gravity); } override public function update():void{ super.update(); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (200 + (30 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.primaryAttack.setDamage((2 + _arg1), 14, (2 * _arg1)); this.actor.secondaryAttack.setDamage((2 + _arg1), 4, _arg1); } } }//package
Section 182
//FireballController (FireballController) package { import org.flixel.*; public class FireballController extends ProjectileController { public var damageDiceSize:uint;// = 0 public var damageDiceCount:uint;// = 0 public var damageDiceMod:int;// = 0 override public function init(_arg1:Projectile):void{ super.init(_arg1); this.projectile.loadGraphic(AssetsG.FireballImg, true, true, 8, 8); this.projectile.addAnimation("horz", [0, 1, 2, 3], 8); this.projectile.addAnimation("vertup", [4, 5, 6, 7], 8); this.projectile.addAnimation("vertdown", [8, 9, 10, 11], 8); this.projectile.play("vert"); this.projectile.Arcs = false; this.projectile.bouncesOnContact = false; this.projectile.damageType = Actor.DAMAGE_MAGICAL; this.projectile.AssignDamage(0, 0); this.projectile.collisionEvent = this.CreateExplosion; } override public function update():void{ super.update(); } public function setDamage(_arg1:uint=1, _arg2:uint=1, _arg3:int=0):void{ this.damageDiceCount = _arg1; this.damageDiceSize = _arg2; this.damageDiceMod = _arg3; } override public function SetupEmitter():void{ this.projectile.emitter = NonEntityManager.GetEmitter(); if (this.projectile.emitter == null){ return; }; this.projectile.emitter.SpritePool = NonEntityManager.GetFireballSparklePool(); this.projectile.emitter.delay = 0.015; this.projectile.emitter.gravity = -100; this.projectile.emitter.minParticleSpeed.y = -50; this.projectile.emitter.maxParticleSpeed.y = 50; this.projectile.emitter.x = (this.projectile.x + (this.projectile.width / 2)); this.projectile.emitter.y = (this.projectile.y + (this.projectile.height / 2)); this.projectile.emitter.start(false); } public function CreateExplosion(_arg1:FlxObject):void{ var _local2:Explosion = NonEntityManager.GetExplosion(); if (_local2 == null){ return; }; _local2.init(); _local2.x = ((this.projectile.x + (this.projectile.width / 2)) - (_local2.width / 2)); _local2.y = ((this.projectile.y + (this.projectile.height / 2)) - (_local2.height / 2)); _local2.dealer = this.projectile.launcher; _local2.setDamage(this.damageDiceCount, this.damageDiceSize, this.damageDiceMod); _local2.Restart(); } } }//package
Section 183
//FlxBitmapText (FlxBitmapText) package { import flash.display.*; import flash.geom.*; import org.flixel.*; public class FlxBitmapText extends FlxSprite { public var _text:String; public var _horizontalPadding:uint; public var _rects:Array; public var _alignment:String; public var _myrect:Rectangle; public var _p:FlxPoint; public var _fontHeight:uint; public var _fontPixels:BitmapData; public var _verticalPadding:uint; public function FlxBitmapText(_arg1:int, _arg2:int, _arg3:String=" ", _arg4:String="left", _arg5:Class=null, _arg6:uint=9, _arg7:uint=1, _arg8:uint=5){ _text = _arg3; _alignment = _arg4.toLowerCase(); super(); fixed = true; x = _arg1; y = _arg2; loadFont(_arg5, _arg6, _arg7, _arg8); } public function set alignment(_arg1:String):void{ _alignment = _arg1.toLowerCase(); calcFrame(); } public function loadFont(_arg1:Class, _arg2:uint, _arg3:uint=1, _arg4:uint=5):void{ var _local10:uint; _fontPixels = FlxG.addBitmap(_arg1); _fontHeight = _arg2; _verticalPadding = _arg4; _horizontalPadding = _arg3; _rects = new Array(); var _local5:uint = _fontPixels.getPixel(0, 0); var _local6:uint = 1; var _local7:uint; var _local8:uint = 28; var _local9:uint; while (_local9 < Math.floor((_fontPixels.height / _fontHeight))) { _local10 = 0; while (_local10 < _fontPixels.width) { if (_fontPixels.getPixel(_local10, (_local6 - 1)) == _local5){ _rects[_local8] = new Rectangle(_local7, _local6, (_local10 - _local7), _fontHeight); _local8++; _local7 = (_local10 + 1); }; _local10++; }; _local6 = (_local6 + (_fontHeight + 1)); _local7 = 0; _local9++; }; if (!_rects[97]){ _rects[97] = _rects[65]; _rects = _rects.concat(_rects.slice(66, 90)); }; calcFrame(); } override public function render():void{ super.render(); getScreenXY(_p); FlxG.buffer.copyPixels(_pixels, _myrect, new Point(_p.x, _p.y), null, null, true); } override protected function calcFrame():void{ var _local2:uint; var _local3:uint; var _local6:uint; width = 0; height = 0; var _local1:Boolean; var _local4:Array = _text.split("\n"); var _local5:Array = new Array(); _local2 = 0; while (_local2 < _local4.length) { _local5[_local2] = 0; _local3 = 0; while (_local3 < _local4[_local2].length) { if (_local4[_local2].charAt(_local3) == "\t"){ _local1 = true; _local5[_local2] = (_local5[_local2] + _rects[29].width); }; if (_rects[_local4[_local2].charCodeAt(_local3)]){ if ((((_local4[_local2].charAt(_local3) == " ")) && (_local1))){ _local1 = false; _local5[_local2] = (_local5[_local2] + _rects[31].width); } else { _local5[_local2] = (_local5[_local2] + (_rects[_local4[_local2].charCodeAt(_local3)].width + _horizontalPadding)); }; }; _local3++; }; if (_local5[_local2] > width){ width = _local5[_local2]; }; height = (height + (_fontHeight + _verticalPadding)); _local2++; }; if (width == 0){ width = 1; }; _pixels = new BitmapData(width, height, true, 0); var _local7:uint; _local2 = 0; while (_local2 < _local4.length) { switch (_alignment){ case "left": _local6 = 0; break; case "center": _local6 = ((width - _local5[_local2]) / 2); break; case "right": _local6 = (width - _local5[_local2]); break; }; _local3 = 0; while (_local3 < _local4[_local2].length) { if ((((_local4[_local2].charAt(_local3) == " ")) && (_local1))){ _local1 = false; _p = new FlxPoint((_local6 - 1), _local7); _pixels.copyPixels(_fontPixels, _rects[31], new Point(_p.x, _p.y), null, null, true); _local6 = (_local6 + _rects[31].width); }; if (_rects[_local4[_local2].charCodeAt(_local3)]){ if (_local1){ _p = new FlxPoint(_local6, _local7); _myrect = _rects[30]; _myrect.width = (_rects[_local4[_local2].charCodeAt(_local3)].width + _horizontalPadding); _pixels.copyPixels(_fontPixels, _myrect, new Point(_p.x, _p.y), null, null, true); }; _p = new FlxPoint(_local6, _local7); _pixels.copyPixels(_fontPixels, _rects[_local4[_local2].charCodeAt(_local3)], new Point(_p.x, _p.y), null, null, true); _local6 = (_local6 + (_rects[_local4[_local2].charCodeAt(_local3)].width + _horizontalPadding)); }; if (_local4[_local2].charAt(_local3) == "\t"){ _local1 = true; _p = new FlxPoint(_local6, _local7); _pixels.copyPixels(_fontPixels, _rects[29], new Point(_p.x, _p.y), null, null, true); _local6 = (_local6 + _rects[29].width); }; _local3++; }; _local7 = (_local7 + (_fontHeight + _verticalPadding)); _local2++; }; switch (_alignment){ case "center": x = (x - Math.floor((width / 2))); break; case "right": x = (x - width); break; }; _myrect = new Rectangle(0, 0, width, height); if (_ct != null){ _pixels.colorTransform(_myrect, _ct); }; } public function set text(_arg1:String):void{ _text = _arg1; calcFrame(); } public function get alignment():String{ return (_alignment); } public function get text():String{ return (_text); } } }//package
Section 184
//FlyingSkullController (FlyingSkullController) package { import flash.geom.*; import org.flixel.*; public class FlyingSkullController extends ActorController { override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.offset.x = 2; this.actor.offset.y = 2; this.actor.offsetLeft.x = 2; this.actor.offsetLeft.y = 2; this.actor.offsetRight.x = 2; this.actor.offsetRight.y = 2; this.actor.loadGraphic(AssetsG.skullImg, true, true, 12, 12); this.actor.runSpeed = (UtilsG.dice(2, 4) * 100); this.actor.maxVelocity.x = UtilsG.dice(2, 25, 50); this.actor.acceleration.y = 0; this.actor.gravity = 100; this.actor.jumpPower = -(UtilsG.dice(1, 50, 100)); this.actor.width = 8; this.actor.height = 8; this.actor.secondaryAttack = new AttackShadowBolt(this.actor); this.actor.secondaryAttack.cooldown = 1; this.actor.addAnimation("idle", [0, 1, 2, 3], 4, true); this.actor.addAnimation("run", [0, 1, 2, 3], 4, true); this.actor.addAnimation("attack", [0, 1, 2, 3], 4, true); this.actor.play("idle"); this.enemyType = SaveData.ENEMY_FLYING_SKULL; this.actor.collideAttack = new Attack(this.actor); this.actor.DeriveStats(); this.actor.bulletPointLeft = new FlxPoint((this.actor.width / 2), (this.actor.height / 2)); this.actor.bulletPointLeftUp = new FlxPoint((this.actor.width / 2), (this.actor.height / 2)); this.actor.bulletPointRight = new FlxPoint((this.actor.width / 2), (this.actor.height / 2)); this.actor.bulletPointRightUp = new FlxPoint((this.actor.width / 2), (this.actor.height / 2)); } override public function update():void{ var _local1:Actor = EatG.PC; var _local2:Point = new Point(_local1.x, _local1.y); var _local3:Point = new Point(this.actor.x, this.actor.y); var _local4:Point = new Point((_local2.x - _local3.x), (_local2.y - _local3.y)); if (Math.abs(_local4.x) < 200){ if (this.actor.acceleration.y > 0){ if (this.actor.y > (_local1.y - 48)){ this.actor.gravity = -(this.actor.gravity); }; } else { if (this.actor.y < (_local1.y - 48)){ this.actor.gravity = -(this.actor.gravity); }; }; if (_local4.x < 0){ this.actor.preferredDirection = FlxSprite.LEFT; this.actor.PerformAction("MOVE FORWARD"); } else { this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.PerformAction("MOVE FORWARD"); }; if (Math.abs(_local4.x) < 128){ this.actor.PerformAction("FIRE PROJECTILE", _local1); }; } else { if (this.actor.acceleration.y > 0){ if (this.actor.y > (3 * TileMap.TH)){ this.actor.gravity = -(this.actor.gravity); }; } else { if (this.actor.y < (3 * TileMap.TH)){ this.actor.gravity = -(this.actor.gravity); }; }; }; } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (60 + (25 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.experience = (250 + (20 * (_arg1 - 1))); this.actor.secondaryAttack.setDamage(2, 8, (5 * (_arg1 - 1))); } } }//package
Section 185
//Head (Head) package { import org.flixel.*; public class Head extends Entity { public var screaming:Boolean;// = true public function Head(_arg1:int=0, _arg2:int=0){ super(_arg1, _arg2); this.screaming = true; this.loadGraphic(AssetsG.headImg, true, false, 22, 21); this.addAnimation("idle", [0, 1, 2, 3, 4, 5, 6, 7, 8], 4, true); this.play("idle"); } public function SprayGibs(_arg1:Number):void{ var _local2:Emitter; _local2 = NonEntityManager.GetEmitter(); if (_local2 == null){ return; }; _local2.SpritePool = NonEntityManager.GetBloodPool(); _local2.x = (this.x + (this.width / 2)); _local2.y = (this.y + (this.height / 2)); _local2.gravity = 400; _local2.setXSpeed((-(_arg1) * 2), (_arg1 * 2)); _local2.setYSpeed(-80, 0); _local2.exists = true; _local2.visible = true; _local2.start(true, 1.25); } public function die():void{ if (this.screaming == false){ return; }; this.screaming = false; this.SprayGibs(20); this.acceleration.y = (FallingObject.FALL_SPEED * 0.75); this.play("falling"); SaveData.ThisSession.ThisPlay.ThisArea.commonersLost++; } override public function update():void{ super.update(); if (this.y > EatG.Level.height){ this.reset(this.x, ((13 * TileMap.TH) - 7)); }; } override public function reset(_arg1:Number, _arg2:Number):void{ super.reset(_arg1, _arg2); this.loadGraphic(AssetsG.headImg, true, false, 22, 21); this.addAnimation("idle", [6, 7, 8], 4, true); this.addAnimation("scream", [0, 1, 2, 3, 4, 5, 6, 7, 8], 4, true); this.addAnimation("falling", [9, 9]); this.screaming = true; this.velocity = new FlxPoint(); this.acceleration = new FlxPoint(); this.randomFrame(); this.play("idle"); } } }//package
Section 186
//Ladder (Ladder) package { import org.flixel.*; public class Ladder extends Entity { public static const LADDER_INTERACTION_RANGE:Number = 8; public function Ladder(_arg1:int=0, _arg2:int=0, _arg3:int=1, _arg4:int=1){ super(_arg1, _arg2); this.createGraphic(_arg3, _arg4, 2298478591); this.visible = false; this.width = _arg3; this.height = _arg4; } override public function OnOverlap(_arg1:FlxObject):void{ if (_arg1 == EatG.PC){ if (this.exists){ EatG.PC.myLadder = this; }; }; } } }//package
Section 187
//LevelManager (LevelManager) package { import org.flixel.*; public class LevelManager { public static var miniMap:TileMap; private static var bossRoom:Class = LevelManager_bossRoom; private static var rewardRoom:Class = LevelManager_rewardRoom; public static var maps:Array = []; public static var bigMap:TileMap; public static function update():void{ var _local1:Actor = EatG.PC; if (_local1 == null){ return; }; if (bigMap == null){ return; }; } public static function placeEnviromentalObjects(_arg1:FlxTilemap):void{ var _local4:uint; var _local5:uint; var _local6:Spikes; var _local7:Turret; var _local9:int; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:Ladder; var _local14:Trigger; var _local15:FallingObject; var _local16:Head; var _local17:FlxSprite; var _local18:Actor; var _local19:Actor; var _local2:int = _arg1.widthInTiles; var _local3:int = _arg1.heightInTiles; _local5 = 1; var _local8:int; while (_local8 < _local3) { _local9 = 0; while (_local9 < _local2) { _local10 = _arg1.getTile(_local9, _local8); if (_local10 == 163){ _local12 = 1; _local11 = _arg1.getTile(_local9, (_local8 + _local12)); while (_local11 == 164) { _local12++; _local11 = _arg1.getTile(_local9, (_local8 + _local12)); }; _local13 = EntityManager.GetLadder(); if (_local13 != null){ _local13.x = (_local9 * TileMap.TW); _local13.y = ((_local8 * TileMap.TH) + 9); _local13.createGraphic(TileMap.TW, ((_local12 * TileMap.TH) - 9), 2298478591); _local13.visible = false; }; } else { if ((((_local10 == 165)) && (!((_arg1.getTile((_local9 - 1), _local8) == 165))))){ _local5 = 1; _local4 = _arg1.getTile((_local9 + _local5), _local8); while (_local4 == 165) { _local5++; _local4 = _arg1.getTile((_local9 + _local5), _local8); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = ((_local9 * TileMap.TW) + 2); _local6.y = ((_local8 * TileMap.TH) + 5); _local6.createGraphic(((_local5 * 16) - 4), 11, 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 166)) && (!((_arg1.getTile((_local9 - 1), _local8) == 166))))){ _local5 = 1; _local4 = _arg1.getTile((_local9 + _local5), _local8); while (_local4 == 166) { _local5++; _local4 = _arg1.getTile((_local9 + _local5), _local8); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = ((_local9 * TileMap.TW) + 2); _local6.y = ((_local8 * TileMap.TH) + 10); _local6.createGraphic(((_local5 * TileMap.TW) - 4), 6, 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 175)) && (!((_arg1.getTile((_local9 - 1), _local8) == 175))))){ _local5 = 1; _local4 = _arg1.getTile((_local9 + _local5), _local8); while (_local4 == 175) { _local5++; _local4 = _arg1.getTile((_local9 + _local5), _local8); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = ((_local9 * TileMap.TW) + 2); _local6.y = (_local8 * TileMap.TH); _local6.createGraphic(((_local5 * 16) - 4), 11, 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 174)) && (!((_arg1.getTile((_local9 - 1), _local8) == 174))))){ _local5 = 1; _local4 = _arg1.getTile((_local9 + _local5), _local8); while (_local4 == 174) { _local5++; _local4 = _arg1.getTile((_local9 + _local5), _local8); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = ((_local9 * TileMap.TW) + 2); _local6.y = (_local8 * TileMap.TH); _local6.createGraphic(((_local5 * TileMap.TW) - 4), 6, 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 172)) && (!((_arg1.getTile(_local9, (_local8 - 1)) == 172))))){ _local5 = 1; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); while (_local4 == 172) { _local5++; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = (_local9 * TileMap.TW); _local6.y = ((_local8 * TileMap.TH) + 2); _local6.createGraphic(11, ((_local5 * TileMap.TH) - 4), 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 169)) && (!((_arg1.getTile(_local9, (_local8 - 1)) == 169))))){ _local5 = 1; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); while (_local4 == 169) { _local5++; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = (_local9 * TileMap.TW); _local6.y = ((_local8 * TileMap.TH) + 2); _local6.createGraphic(6, ((_local5 * TileMap.TH) - 4), 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 171)) && (!((_arg1.getTile(_local9, (_local8 - 1)) == 171))))){ _local5 = 1; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); while (_local4 == 171) { _local5++; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = ((_local9 * TileMap.TW) + 5); _local6.y = ((_local8 * TileMap.TH) + 2); _local6.createGraphic(11, ((_local5 * TileMap.TH) - 4), 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 168)) && (!((_arg1.getTile(_local9, (_local8 - 1)) == 168))))){ _local5 = 1; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); while (_local4 == 168) { _local5++; _local4 = _arg1.getTile(_local9, (_local8 + _local5)); }; _local6 = EntityManager.GetSpikes(); if (_local6 != null){ _local6.x = ((_local9 * TileMap.TW) + 10); _local6.y = ((_local8 * TileMap.TH) + 2); _local6.createGraphic(6, ((_local5 * TileMap.TH) - 4), 2298413056); _local6.visible = false; }; } else { if ((((_local10 == 230)) || ((_local10 == 231)))){ _local7 = EntityManager.GetTurret(); if (_local7 != null){ _local7.x = (_local9 * TileMap.TW); _local7.y = (_local8 * TileMap.TH); _local7.visible = false; if (UtilsG.dice(1, 2) == 1){ _local7.type = Turret.ARROW_LAUNCHER; _local7.ammoCount = 1; _local7.refireRate = 0.4; } else { _local7.type = Turret.FLAME_THROWER; _local7.ammoCount = 60; _local7.refireRate = 0.01; }; _local14 = EntityManager.GetTrigger(); if (_local14 != null){ if (_local10 == 230){ _local7.facing = FlxSprite.LEFT; _local14.x = ((_local9 * TileMap.TW) - 64); _local14.y = (_local8 * TileMap.TH); } else { _local7.facing = FlxSprite.RIGHT; _local14.x = ((_local9 * TileMap.TW) + TileMap.TW); _local14.y = (_local8 * TileMap.TH); }; _local14.createGraphic(64, 16, 2298426112); _local14.visible = false; _local14.listeners.add(_local7); }; }; } else { if (_local10 == 48){ _local15 = EntityManager.GetFallingObject(); if (_local15 != null){ _local15.Origin = new FlxPoint(((_local9 * TileMap.TW) + 16), ((_local8 * TileMap.TH) + 10)); _local15.reset(((_local9 * TileMap.TW) + 16), ((_local8 * TileMap.TH) + 10)); }; _local16 = EntityManager.GetHead(); if (_local16 != null){ _local16.reset((_local15.x + 5), (((_local8 * TileMap.TH) + (6 * TileMap.TH)) - 7)); }; _local17 = NonEntityManager.GetProp(); if (_local17 != null){ _local17.loadGraphic(AssetsG.pilloryImg); _local17.visible = true; _local17.x = (_local9 * TileMap.TW); _local17.y = ((_local8 + 5) * TileMap.TH); }; for each (_local19 in EntityManager.ActorList.members) { if ((((_local19.Controller is OgreController)) && (_local19.exists))){ _local18 = _local19; break; }; }; if (_local18 != null){ (_local18.primaryAttack as AttackGuillotine).myBlades.add(_local15); (_local18.primaryAttack as AttackGuillotine).myVictims.add(_local16); }; }; }; }; }; }; }; }; }; }; }; }; _local9++; }; _local8++; }; } public static function createLevel(_arg1:int):void{ var _local5:Map; var _local6:int; var _local7:Map; var _local8:TileMap; var _local9:TileMap; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:uint; var _local2:int; var _local3:int; var _local4 = 40; maps.length = 0; maps[maps.length] = MapsG.Entrance; _local2 = 0; while (_local2 < _arg1) { maps[maps.length] = MapsG.Hallway; if ((_local2 % 3) == 0){ switch (UtilsG.dice(1, 8)){ default: maps[maps.length] = MapsG.CommonRoom; break; case 1: maps[maps.length] = MapsG.UncommonRoom; break; }; } else { switch (UtilsG.dice(1, 8)){ default: maps[maps.length] = MapsG.CommonObstacle; break; case 1: maps[maps.length] = MapsG.UncommonObstacle; break; }; }; _local2++; }; maps[maps.length] = MapsG.Hallway; maps[maps.length] = MapsG.Exit; for each (_local5 in maps) { _local8 = (_local5.layers.members[0] as TileMap); _local3 = (_local3 + _local8.widthInTiles); if (_local4 < _local8.heightInTiles){ _local4 = _local8.heightInTiles; }; }; bigMap = new TileMap(); bigMap.drawIndex = 0; bigMap.startingIndex = 0; bigMap.collideIndex = 192; bigMap.BlankMap(_local4, _local3, AssetsG.tileImg, 16, 16, 195); _local6 = 0; for each (_local7 in maps) { _local9 = (_local7.layers.members[0] as TileMap); _local10 = _local9.widthInTiles; _local11 = _local9.heightInTiles; _local12 = 0; while (_local12 < _local11) { _local13 = 0; while (_local13 < _local10) { _local14 = _local9.getTile(_local13, _local12); bigMap.setTile((_local6 + _local13), _local12, _local14); _local13++; }; _local12++; }; _local7.MoveToOffset((_local6 * 16), 0); _local6 = (_local6 + _local10); }; LevelManager.placeEnviromentalObjects(bigMap); } public static function createBossLevel():void{ var _local6:Map; var _local8:Map; var _local9:TileMap; var _local10:TileMap; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:uint; var _local1:Map = new Map(); _local1.Load(new bossRoom()); var _local2:int; var _local3:TrapDoor = EntityManager.GetTrapDoor(); if (_local3 != null){ _local3.x = (2 * TileMap.TW); _local3.y = (2 * TileMap.TH); _local3.createGraphic((1 * TileMap.TW), (12 * TileMap.TH), 2298413311); _local3.mobsToWatch = _local1.badguys; _local3.visible = false; _local2 = 2; while (_local2 < 14) { _local3.tileToCloseOff[_local3.tileToCloseOff.length] = new FlxPoint(0, _local2); _local3.tileToCloseOff[_local3.tileToCloseOff.length] = new FlxPoint(29, _local2); _local2++; }; _local1.triggers.add(_local3); }; var _local4:int; var _local5:int; maps.length = 0; maps[maps.length] = MapsG.Entrance; _local2 = 0; while (_local2 < 6) { maps[maps.length] = MapsG.Hallway; _local2++; }; maps[maps.length] = _local1; _local1 = new Map(); _local1.Load(new rewardRoom()); maps[maps.length] = _local1; maps[maps.length] = MapsG.Hallway; maps[maps.length] = MapsG.Exit; for each (_local6 in maps) { _local9 = (_local6.layers.members[0] as TileMap); _local4 = (_local4 + _local9.widthInTiles); if (_local5 < _local9.heightInTiles){ _local5 = _local9.heightInTiles; }; }; bigMap = new TileMap(); bigMap.drawIndex = 0; bigMap.startingIndex = 0; bigMap.collideIndex = 192; bigMap.BlankMap(_local5, _local4, AssetsG.tileImg, 16, 16, 0); var _local7:int; for each (_local8 in maps) { _local10 = (_local8.layers.members[0] as TileMap); _local11 = _local10.widthInTiles; _local12 = _local10.heightInTiles; _local13 = 0; while (_local13 < _local12) { _local14 = 0; while (_local14 < _local11) { _local15 = _local10.getTile(_local14, _local13); bigMap.setTile((_local7 + _local14), _local13, _local15); _local14++; }; _local13++; }; _local8.MoveToOffset((_local7 * 16), 0); _local7 = (_local7 + _local11); }; LevelManager.placeEnviromentalObjects(bigMap); } public static function makeMiniMap():void{ if (bigMap == null){ return; }; miniMap = new TileMap(); miniMap.drawIndex = 0; miniMap.startingIndex = 0; miniMap.collideIndex = 192; var _local1:String = FlxTilemap.arrayToCSV(bigMap.Data, bigMap.widthInTiles); miniMap.loadMap(_local1, AssetsG.tileMiniImg, 1, 1); } } }//package
Section 188
//LevelManager_bossRoom (LevelManager_bossRoom) package { import mx.core.*; public class LevelManager_bossRoom extends ByteArrayAsset { } }//package
Section 189
//LevelManager_rewardRoom (LevelManager_rewardRoom) package { import mx.core.*; public class LevelManager_rewardRoom extends ByteArrayAsset { } }//package
Section 190
//Loot (Loot) package { import org.flixel.*; public class Loot extends Entity { public var value:uint;// = 1 public var awardedLoot:Boolean;// = false public var isChest:Boolean;// = false public function Loot(_arg1:int=0, _arg2:int=0){ super(_arg1, _arg2); this.loadGraphic(AssetsG.sackImg, true, false, 8, 8); this.addAnimation("idle", [0], 1, true); this.value = UtilsG.dice(3, 100, 50); this.velocity.y = -200; this.acceleration.y = 800; } override public function kill():void{ this.awardedLoot = false; this.isChest = false; super.kill(); } override public function reset(_arg1:Number, _arg2:Number):void{ super.reset(_arg1, _arg2); acceleration.y = 800; this.play("idle", true); } public function AnimationCallback(_arg1:String, _arg2:uint, _arg3:uint):void{ if ((((_arg1 == "open")) && ((_arg2 == 3)))){ this.kill(); }; } override public function OnOverlap(_arg1:FlxObject):void{ var _local2:FlxSound; var _local3:Text; if (_arg1 == EatG.PC){ if (awardedLoot == true){ return; }; _local2 = new FlxSound(); _local2.loadEmbedded(AssetsG.sndLootGrab); _local2.volume = 0.5; _local2.play(); if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.Wealth = (SaveData.ThisSession.ThisPlay.Wealth + this.value); }; _local3 = NonEntityManager.GetFloatingText(); if (_local3 != null){ _local3.x = this.x; _local3.y = (this.y - 12); _local3.velocity.y = -50; _local3.color = 16757775; _local3.text = ("$" + this.value); _local3.restart(1); }; if (this.isChest == true){ this.play("open"); this.awardedLoot = true; } else { this.kill(); }; }; } } }//package
Section 191
//MageController (MageController) package { import org.flixel.*; public class MageController extends PlayerCharacterController { override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.offsetRight = new FlxPoint(5, 9); this.actor.offsetLeft = new FlxPoint(10, 9); this.actor.offsetLeftClimbing = new FlxPoint(9, 7); this.actor.offsetRightClimbing = new FlxPoint(2, 7); if (EatG.CurrentOrg == EatG.ORC){ this.actor.loadGraphic(AssetsG.guyMageOrcImg, true, true, 28, 27); } else { if (EatG.CurrentOrg == EatG.SHADOWMONSTER){ this.actor.loadGraphic(AssetsG.guyMageShadowImg, true, true, 28, 27); } else { this.actor.loadGraphic(AssetsG.guyMageImg, true, true, 28, 27); }; }; this.actor.width = this.actor.dimensions.x; this.actor.height = this.actor.dimensions.y; this.actor.offset = this.actor.offsetRight; this.actor.maxVelocity.x = 100; this.actor.runSpeed = (8 * this.actor.maxVelocity.x); this.actor.drag.x = (8 * this.actor.runSpeed); this.actor.jumpPower = -140; this.actor.gravity = this.actor.MagicGravity; this.actor.damageCoolDown = 1; this.actor.healthMax = 50; this.actor.health = this.actor.healthMax; this.actor.energyMax = 200; this.actor.energyCurrent = this.actor.energyMax; this.actor.primaryAttack = new AttackMagicMissile(this.actor); this.actor.primaryAttack.cooldown = 0.3; this.actor.secondaryAttack = new AttackFireball(this.actor); this.actor.secondaryAttack.cooldown = 0.7; this.actor.bulletPointLeftUp = new FlxPoint((-(this.actor.width) / 2), (-(this.actor.height) / 2)); this.actor.bulletPointRightUp = new FlxPoint((this.actor.width / 2), (this.actor.height / 2)); this.actor.bulletPointLeftDown = new FlxPoint((-(this.actor.width) / 2), (-(this.actor.height) / 2)); this.actor.bulletPointRightDown = new FlxPoint((this.actor.width / 2), (this.actor.height / 2)); this.actor.DeriveStats(); this.actor.RestoreGravity(this.actor.gravity); } override public function update():void{ super.update(); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (50 + (10 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.primaryAttack.setDamage((2 + _arg1), 10, _arg1); this.actor.secondaryAttack.setDamage((4 + _arg1), 12, _arg1); } } }//package
Section 192
//Main (Main) package { import flash.events.*; import org.flixel.*; import spill.localisation.*; import flash.display.*; import flash.geom.*; import org.flixel.data.*; import Spill.Components.*; import mochi.as3.*; public class Main extends FlxGame { public var _mochiads_game_id:String;// = "37e4b7dd7e52f7ac" public function Main():void{ super(320, 240, StateSplashTitle, 2); UtilsG.seedRand(new Date().time); EatG.music = new Music(); FlxG.sounds[FlxG.sounds.length] = EatG.music; addEventListener(Event.ADDED_TO_STAGE, init); } public function init(_arg1:Event=null):void{ Languages.initialize(); SpilGame.initialize("Epic_Adventure_Time_Revolt_In_Ogre_Town", PortalGroup.TWEEN, "Epic_Adventure_Time_Revolt_In_Ogre_Town.html", this, true); EatG.brandingLogo = new BrandingLogo(); stage.addChild(EatG.brandingLogo); EatG.brandingLogo.x = -199999; var _local2:Matrix = new Matrix(1, 0, 0, 1, ((EatG.brandingLogo.width / 2) + 5), ((EatG.brandingLogo.height / 2) + 5)); EatG.brandingImg = new BitmapData((EatG.brandingLogo.width + 10), (EatG.brandingLogo.height + 10), true, 0xFFFFFF); EatG.brandingImg.draw(EatG.brandingLogo, _local2); _local2.scale(0.5, 0.5); EatG.brandingSmallImg = new BitmapData(((EatG.brandingLogo.width / 2) + 10), ((EatG.brandingLogo.height / 2) + 10), true, 0xFFFFFF); EatG.brandingSmallImg.draw(EatG.brandingLogo, _local2); if (EatG.KONG){ if (!FlxG.kong){ (FlxG.kong = (parent.addChild(new FlxKong()) as FlxKong)).init(); }; }; if (EatG.NEWGROUNDS){ NewgroundsAPI.linkAPI(this); NewgroundsAPI.connectMovie(12793); } else { EatG.Spil_Submitter = new Submitter(); EatG.Spil_Submitter.addEventListener(Event.COMPLETE, onSubmitterReady); EatG.Spil_Submitter.addEventListener(IOErrorEvent.IO_ERROR, onSubmitterLoadFailed); EatG.Spil_Submitter.addEventListener("LoadingFailed", onSubmitterInitFailed); EatG.Spil_Submitter._O0000Ol01(this); }; SaveData.LoadScores(); SaveData.NewSession(); removeEventListener(Event.ADDED_TO_STAGE, init); if (EatG.MOCHI){ MochiServices.connect(_mochiads_game_id, this); }; if (Preloader.ad != null){ stage.removeChild(Preloader.ad); }; } public function err(_arg1:String):void{ } private function onSubmitterInitFailed(_arg1:Event):void{ trace("Submitter failed to initialize, probubly the domain on which you are running the game is not allowd to make use of the submitter"); trace(EatG.Spil_Submitter._O0Olll0lO()); } private function onSubmitterReady(_arg1:Event):void{ trace("Submitter READY!"); trace(EatG.Spil_Submitter._O0Olll0lO()); EatG.SPIL_API = true; } private function onSubmitterLoadFailed(_arg1:Event):void{ trace("Submitter failed to load"); trace(EatG.Spil_Submitter._O0Olll0lO()); } } }//package
Section 193
//Map (Map) package { import org.flixel.*; public class Map { public var layers:FlxGroup; public var width:int; public var height:int; public var loots:FlxGroup; public var badguys:FlxGroup; public var x:int; public var y:int; public var triggers:FlxGroup; public function Map(){ layers = new FlxGroup(); badguys = new FlxGroup(); triggers = new FlxGroup(); loots = new FlxGroup(); super(); } public function loadObjectGroup(_arg1:XML):void{ var _local4:XML; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:String; var _local10:String; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:XML; var _local16:int; var _local17:int; var _local18:int; var _local19:Actor; var _local20:XML; var _local21:Loot; var _local2:int = _arg1.object.length(); var _local3:int; while (_local3 < _local2) { _local4 = _arg1.object[_local3]; _local5 = _local4.@x; _local6 = _local4.@y; _local7 = _local4.@width; _local8 = _local4.@height; _local9 = _local4.@name; _local10 = _local4.@type; _local12 = 1; _local14 = 0; if (_local10 == "baddy"){ _local12 = 1; for each (_local15 in _local4.properties.property) { if (_local15.@name == "count"){ _local13 = _local15.@value; }; if (_local15.@name == "value"){ _local11 = _local15.@value; }; if (_local15.@name == "fixed"){ _local14 = _local15.@value; }; }; if (_local13 > _local12){ _local12 = _local13; }; _local16 = 0; while (_local16 < _local12) { _local17 = UtilsG.dice(1, _local7, -1); _local18 = UtilsG.dice(1, _local8, -1); _local19 = EntityManager.GetActor(); if (_local19 == null){ break; }; _local19.x = (_local5 + _local17); _local19.y = (_local6 + _local18); switch (_local9){ default: _local19.Controller = new MinMonController(); break; case "SmolderingMan": _local19.Controller = new SmolderingManController(); break; case "FlyingSkull": _local19.Controller = new FlyingSkullController(); break; case "ShadowBoltMage": _local19.Controller = new ShadowMageController(); if (_local14 == true){ (_local19.controller as ShadowMageController).doesntMove = true; }; break; case "Chandelier": _local19.Controller = new ChandelierController(); break; case "WaistcoatOgre": _local19.Controller = new OgreController(); break; case "Wraith": _local19 = EntityManager.GetActorNonMap(); if (_local19 != null){ _local19.x = _local5; _local19.y = _local6; _local19.Controller = new WraithController(); }; break; case "MinMon": _local19.Controller = new MinMonController(); break; case "MinMom": _local19.Controller = new MinMonMomController(); break; }; if (SaveData.ThisSession.ThisPlay != null){ _local19.level = SaveData.ThisSession.ThisPlay.AreaCount; } else { _local19.level = 1; }; _local19.DeriveStats(); this.badguys.add(_local19); _local16++; }; } else { if (_local10 == "trigger"){ } else { if (_local10 == "loot"){ for each (_local20 in _local4.properties.property) { if (_local20.@name == "value"){ _local11 = _local20.@value; }; }; _local21 = EntityManager.GetLoot(); if (_local21 != null){ _local21.x = _local5; _local21.y = _local6; switch (_local9){ case "Chest": _local21.isChest = true; _local21.loadGraphic(AssetsG.chestImg, true, false, 16, 16); _local21.addAnimation("idle", [0], 1, true); _local21.addAnimation("open", [1, 1, 1, 1], 10, false); _local21.addAnimationCallback(_local21.AnimationCallback); _local21.value = _local11; break; case "Sack": _local21.loadGraphic(AssetsG.sackImg, false, false, 8, 8); _local21.value = _local11; break; }; this.loots.add(_local21); }; }; }; }; _local3++; }; } public function LoadLayer(_arg1:XML):void{ var _local7:XML; var _local8:int; width = _arg1.@width; height = _arg1.@height; var _local2 = ""; var _local3:XMLList = _arg1.data.tile; var _local4:int = _local3.length(); var _local5:int; while (_local5 < _local4) { _local7 = _local3[_local5]; _local8 = _local7.@gid; _local8--; _local2 = (_local2 + _local8); if ((_local5 % width) == (width - 1)){ _local2 = (_local2 + "\n"); } else { _local2 = (_local2 + ","); }; _local5++; }; var _local6:TileMap = new TileMap(); _local6.drawIndex = 0; _local6.startingIndex = 0; _local6.collideIndex = 192; _local6.loadMap(_local2, AssetsG.tileImg, 16, 16); this.layers.add(_local6); } public function Load(_arg1:String):void{ var _local8:XML; var _local9:XML; var _local2:XML = new XML(_arg1); var _local3:XMLList = _local2.layer; var _local4:int = _local3.length(); var _local5:int; _local5 = 0; while (_local5 < _local4) { _local8 = _local3[_local5]; LoadLayer(_local8); _local5++; }; var _local6:XMLList = _local2.objectgroup; var _local7:int = _local6.length(); _local5 = 0; while (_local5 < _local7) { _local9 = _local6[_local5]; loadObjectGroup(_local9); _local5++; }; } public function MoveToOffset(_arg1:int, _arg2:int):void{ var _local3:Actor; var _local4:Trigger; var _local5:Loot; var _local6:TrapDoor; var _local7:FlxPoint; this.x = _arg1; this.y = _arg2; for each (_local3 in this.badguys.members) { _local3.x = (_local3.x + _arg1); _local3.y = (_local3.y + _arg2); }; for each (_local4 in this.triggers.members) { _local4.x = (_local4.x + _arg1); _local4.y = (_local4.y + _arg2); if ((_local4 is TrapDoor)){ _local6 = (_local4 as TrapDoor); for each (_local7 in _local6.tileToCloseOff) { _local7.x = (_local7.x + (_arg1 / TileMap.TW)); _local7.y = (_local7.y + (_arg2 / TileMap.TH)); }; }; }; for each (_local5 in this.loots.members) { _local5.x = (_local5.x + _arg1); _local5.y = (_local5.y + _arg2); }; } } }//package
Section 194
//MapsG (MapsG) package { import org.flixel.*; public class MapsG { private static var roomsCommon:Array = []; private static var ph_room_e_platforms:Class = MapsG_ph_room_e_platforms; private static var wgm_room_m_ladder_trap_01:Class = MapsG_wgm_room_m_ladder_trap_01; private static var wgm_ladder_tower:Class = MapsG_wgm_ladder_tower; private static var wm_room_h_platform_smen_skulls_01:Class = MapsG_wm_room_h_platform_smen_skulls_01; private static var wgm_minmons_gigeresque:Class = MapsG_wgm_minmons_gigeresque; private static var wgm_basement:Class = MapsG_wgm_basement; private static var ms_room_m_trappy:Class = MapsG_ms_room_m_trappy; private static var wgm_broken_floor_with_skulls:Class = MapsG_wgm_broken_floor_with_skulls; private static var exits:Array = []; private static var ph_room__spikeholes:Class = MapsG_ph_room__spikeholes; private static var hallways:Array = []; private static var wgm_room_h_temptation_01:Class = MapsG_wgm_room_h_temptation_01; private static var ms_room_e_M1:Class = MapsG_ms_room_e_M1; private static var wgm_bridge_big:Class = MapsG_wgm_bridge_big; private static var ms_exit_06:Class = MapsG_ms_exit_06; private static var ms_hall_03:Class = MapsG_ms_hall_03; private static var ms_hall_05:Class = MapsG_ms_hall_05; private static var ms_hall_06:Class = MapsG_ms_hall_06; private static var ms_exit_05:Class = MapsG_ms_exit_05; private static var wgm_trap_room_01:Class = MapsG_wgm_trap_room_01; private static var ms_hall_04:Class = MapsG_ms_hall_04; private static var ph_room__spikecolumns:Class = MapsG_ph_room__spikecolumns; private static var wgm_room_m_big_platform_01:Class = MapsG_wgm_room_m_big_platform_01; private static var wgm_column_platforms:Class = MapsG_wgm_column_platforms; private static var wgm_room_h_wall_01:Class = MapsG_wgm_room_h_wall_01; private static var ms_library_01:Class = MapsG_ms_library_01; private static var ms_room_e_armory:Class = MapsG_ms_room_e_armory; private static var wgm_mage_tunnel:Class = MapsG_wgm_mage_tunnel; private static var wgm_room_e_flyingskull_drop:Class = MapsG_wgm_room_e_flyingskull_drop; private static var wgm_room_h_wall_02:Class = MapsG_wgm_room_h_wall_02; private static var ms_room_e_ballroom:Class = MapsG_ms_room_e_ballroom; private static var wgm_minmon_pit:Class = MapsG_wgm_minmon_pit; private static var ph_room__spikecolumnsingle:Class = MapsG_ph_room__spikecolumnsingle; private static var wgm_EVIL_SPIKES_01:Class = MapsG_wgm_EVIL_SPIKES_01; private static var wgm_ladder_mage_pit:Class = MapsG_wgm_ladder_mage_pit; private static var ms_exit_03:Class = MapsG_ms_exit_03; private static var ms_exit_04:Class = MapsG_ms_exit_04; private static var wgm_room_high_libs_minmons_floor:Class = MapsG_wgm_room_high_libs_minmons_floor; private static var wgm_room_e_platform_mages:Class = MapsG_wgm_room_e_platform_mages; private static var wgm_mage_bridge:Class = MapsG_wgm_mage_bridge; private static var winecellar:Class = MapsG_winecellar; private static var wgm_room_m_evil_spikes_01:Class = MapsG_wgm_room_m_evil_spikes_01; private static var ms_exit_02:Class = MapsG_ms_exit_02; private static var wgm_simple_fire_corridor:Class = MapsG_wgm_simple_fire_corridor; private static var wgm_spike_platform:Class = MapsG_wgm_spike_platform; private static var ph_room__firemen1:Class = MapsG_ph_room__firemen1; private static var jdj_room_e_M1:Class = MapsG_jdj_room_e_M1; private static var entrances:Array = []; private static var wgm_column_room:Class = MapsG_wgm_column_room; private static var jdj_ent_01:Class = MapsG_jdj_ent_01; private static var ph_room_e_skullmons:Class = MapsG_ph_room_e_skullmons; private static var wgm_chandelier_room:Class = MapsG_wgm_chandelier_room; private static var ms_ent_02:Class = MapsG_ms_ent_02; private static var ms_ent_03:Class = MapsG_ms_ent_03; private static var ms_ent_04:Class = MapsG_ms_ent_04; private static var ms_ent_05:Class = MapsG_ms_ent_05; private static var ph_room_h_01:Class = MapsG_ph_room_h_01; private static var wgm_room_smolderingman_fireplaces_01:Class = MapsG_wgm_room_smolderingman_fireplaces_01; private static var wgm_room_minmons_chandeliers_01:Class = MapsG_wgm_room_minmons_chandeliers_01; private static var wgm_room_h_pit_01:Class = MapsG_wgm_room_h_pit_01; private static var wgm_steeple_spikes:Class = MapsG_wgm_steeple_spikes; private static var ph_room__lowhangingspikes:Class = MapsG_ph_room__lowhangingspikes; private static var wgm_room_m_giant_chasm:Class = MapsG_wgm_room_m_giant_chasm; private static var wgm_mage_hallway:Class = MapsG_wgm_mage_hallway; private static var obstaclesUncommon:Array = []; private static var jdj_room_e_foundry:Class = MapsG_jdj_room_e_foundry; private static var wgm_columned_minmon_pit:Class = MapsG_wgm_columned_minmon_pit; private static var wgm_simple_gap:Class = MapsG_wgm_simple_gap; private static var ms_room_e_foundry:Class = MapsG_ms_room_e_foundry; private static var jdj_room_m_angelOfSpikes:Class = MapsG_jdj_room_m_angelOfSpikes; private static var ph_room_e_firemen:Class = MapsG_ph_room_e_firemen; private static var wgm_space_platforms:Class = MapsG_wgm_space_platforms; private static var obstaclesCommon:Array = []; private static var wgm_the_great_outdoors:Class = MapsG_wgm_the_great_outdoors; private static var ph_room__destroyed1:Class = MapsG_ph_room__destroyed1; private static var wgm_windows_minmons:Class = MapsG_wgm_windows_minmons; private static var ph_room__spakes:Class = MapsG_ph_room__spakes; private static var wgm_minmon_spawn_room:Class = MapsG_wgm_minmon_spawn_room; private static var roomsUncommon:Array = []; private static var jdj_room_m_01:Class = MapsG_jdj_room_m_01; private static var wgm_room_m_tall_w_pit_01:Class = MapsG_wgm_room_m_tall_w_pit_01; private static var wgm_spiked_hallway:Class = MapsG_wgm_spiked_hallway; private static var wgm_tunnel_room_01:Class = MapsG_wgm_tunnel_room_01; private static var jdj_exit_01:Class = MapsG_jdj_exit_01; private static var jdj_hall_01:Class = MapsG_jdj_hall_01; private static var jdj_hall_02:Class = MapsG_jdj_hall_02; private static var jdj_room_m_minmonPit:Class = MapsG_jdj_room_m_minmonPit; private static var jdj_room_e_01:Class = MapsG_jdj_room_e_01; public static function init():void{ entrances[entrances.length] = new jdj_ent_01(); entrances[entrances.length] = new ms_ent_02(); entrances[entrances.length] = new ms_ent_03(); entrances[entrances.length] = new ms_ent_04(); entrances[entrances.length] = new ms_ent_05(); hallways[hallways.length] = new jdj_hall_01(); hallways[hallways.length] = new jdj_hall_02(); hallways[hallways.length] = new ms_hall_03(); hallways[hallways.length] = new ms_hall_04(); hallways[hallways.length] = new ms_hall_05(); hallways[hallways.length] = new ms_hall_06(); roomsCommon[roomsCommon.length] = new jdj_room_e_01(); roomsCommon[roomsCommon.length] = new jdj_room_e_foundry(); roomsCommon[roomsCommon.length] = new jdj_room_e_M1(); roomsCommon[roomsCommon.length] = new jdj_room_m_01(); roomsCommon[roomsCommon.length] = new jdj_room_m_minmonPit(); roomsCommon[roomsCommon.length] = new ms_room_e_armory(); roomsCommon[roomsCommon.length] = new ms_room_e_ballroom(); roomsCommon[roomsCommon.length] = new ms_room_e_foundry(); roomsCommon[roomsCommon.length] = new ms_room_e_M1(); roomsCommon[roomsCommon.length] = new ph_room__destroyed1(); roomsCommon[roomsCommon.length] = new ph_room__firemen1(); roomsCommon[roomsCommon.length] = new ph_room__lowhangingspikes(); roomsCommon[roomsCommon.length] = new ph_room__spikecolumns(); roomsCommon[roomsCommon.length] = new ph_room_e_firemen(); roomsCommon[roomsCommon.length] = new ph_room_e_platforms(); roomsCommon[roomsCommon.length] = new ph_room_e_skullmons(); roomsCommon[roomsCommon.length] = new ph_room_h_01(); roomsCommon[roomsCommon.length] = new wgm_basement(); roomsCommon[roomsCommon.length] = new wgm_broken_floor_with_skulls(); roomsCommon[roomsCommon.length] = new wgm_column_room(); roomsCommon[roomsCommon.length] = new wgm_columned_minmon_pit(); roomsCommon[roomsCommon.length] = new wgm_mage_tunnel(); roomsCommon[roomsCommon.length] = new wgm_minmon_pit(); roomsCommon[roomsCommon.length] = new wgm_minmon_spawn_room(); roomsCommon[roomsCommon.length] = new wgm_minmons_gigeresque(); roomsCommon[roomsCommon.length] = new wgm_room_e_platform_mages(); roomsCommon[roomsCommon.length] = new wgm_room_h_pit_01(); roomsCommon[roomsCommon.length] = new wgm_room_high_libs_minmons_floor(); roomsCommon[roomsCommon.length] = new wgm_room_minmons_chandeliers_01(); roomsCommon[roomsCommon.length] = new wgm_room_smolderingman_fireplaces_01(); roomsCommon[roomsCommon.length] = new wgm_simple_fire_corridor(); roomsCommon[roomsCommon.length] = new wgm_tunnel_room_01(); roomsCommon[roomsCommon.length] = new wgm_windows_minmons(); roomsUncommon[roomsUncommon.length] = new jdj_room_m_angelOfSpikes(); roomsUncommon[roomsUncommon.length] = new ms_library_01(); roomsUncommon[roomsUncommon.length] = new wgm_bridge_big(); roomsUncommon[roomsUncommon.length] = new wgm_room_m_big_platform_01(); roomsUncommon[roomsUncommon.length] = new wgm_room_m_tall_w_pit_01(); roomsUncommon[roomsUncommon.length] = new winecellar(); roomsUncommon[roomsUncommon.length] = new wm_room_h_platform_smen_skulls_01(); obstaclesCommon[obstaclesCommon.length] = new ms_room_m_trappy(); obstaclesCommon[obstaclesCommon.length] = new ph_room__spakes(); obstaclesCommon[obstaclesCommon.length] = new ph_room__spikecolumnsingle(); obstaclesCommon[obstaclesCommon.length] = new ph_room__spikeholes(); obstaclesCommon[obstaclesCommon.length] = new wgm_chandelier_room(); obstaclesCommon[obstaclesCommon.length] = new wgm_column_platforms(); obstaclesCommon[obstaclesCommon.length] = new wgm_ladder_mage_pit(); obstaclesCommon[obstaclesCommon.length] = new wgm_ladder_tower(); obstaclesCommon[obstaclesCommon.length] = new wgm_mage_bridge(); obstaclesCommon[obstaclesCommon.length] = new wgm_mage_hallway(); obstaclesCommon[obstaclesCommon.length] = new wgm_room_e_flyingskull_drop(); obstaclesCommon[obstaclesCommon.length] = new wgm_room_h_temptation_01(); obstaclesCommon[obstaclesCommon.length] = new wgm_room_h_wall_01(); obstaclesCommon[obstaclesCommon.length] = new wgm_room_m_ladder_trap_01(); obstaclesCommon[obstaclesCommon.length] = new wgm_simple_gap(); obstaclesCommon[obstaclesCommon.length] = new wgm_space_platforms(); obstaclesCommon[obstaclesCommon.length] = new wgm_spike_platform(); obstaclesCommon[obstaclesCommon.length] = new wgm_spiked_hallway(); obstaclesCommon[obstaclesCommon.length] = new wgm_steeple_spikes(); obstaclesCommon[obstaclesCommon.length] = new wgm_trap_room_01(); obstaclesUncommon[obstaclesUncommon.length] = new wgm_EVIL_SPIKES_01(); obstaclesUncommon[obstaclesUncommon.length] = new wgm_room_h_wall_02(); obstaclesUncommon[obstaclesUncommon.length] = new wgm_room_m_evil_spikes_01(); obstaclesUncommon[obstaclesUncommon.length] = new wgm_room_m_giant_chasm(); obstaclesUncommon[obstaclesUncommon.length] = new wgm_the_great_outdoors(); exits[exits.length] = new jdj_exit_01(); exits[exits.length] = new ms_exit_02(); exits[exits.length] = new ms_exit_03(); exits[exits.length] = new ms_exit_04(); exits[exits.length] = new ms_exit_05(); exits[exits.length] = new ms_exit_06(); } public static function get Exit():Map{ var _local1:String = exits[(UtilsG.dice(1, exits.length) - 1)]; var _local2:Map = new Map(); _local2.Load(_local1); return (_local2); } public static function get CommonRoom():Map{ var _local1:String = roomsCommon[(UtilsG.dice(1, roomsCommon.length) - 1)]; var _local2:Map = new Map(); _local2.Load(_local1); return (_local2); } public static function get UncommonObstacle():Map{ var _local1:String = obstaclesUncommon[(UtilsG.dice(1, obstaclesUncommon.length) - 1)]; var _local2:Map = new Map(); _local2.Load(_local1); return (_local2); } public static function get CommonObstacle():Map{ var _local1:String = obstaclesCommon[(UtilsG.dice(1, obstaclesCommon.length) - 1)]; var _local2:Map = new Map(); _local2.Load(_local1); return (_local2); } public static function get Entrance():Map{ var _local1:String = entrances[(UtilsG.dice(1, entrances.length) - 1)]; var _local2:Map = new Map(); _local2.Load(_local1); return (_local2); } public static function get UncommonRoom():Map{ var _local1:String = roomsUncommon[(UtilsG.dice(1, roomsUncommon.length) - 1)]; var _local2:Map = new Map(); _local2.Load(_local1); return (_local2); } public static function get Hallway():Map{ var _local1:String = hallways[(UtilsG.dice(1, hallways.length) - 1)]; var _local2:Map = new Map(); _local2.Load(_local1); return (_local2); } } }//package
Section 195
//MapsG_jdj_ent_01 (MapsG_jdj_ent_01) package { import mx.core.*; public class MapsG_jdj_ent_01 extends ByteArrayAsset { } }//package
Section 196
//MapsG_jdj_exit_01 (MapsG_jdj_exit_01) package { import mx.core.*; public class MapsG_jdj_exit_01 extends ByteArrayAsset { } }//package
Section 197
//MapsG_jdj_hall_01 (MapsG_jdj_hall_01) package { import mx.core.*; public class MapsG_jdj_hall_01 extends ByteArrayAsset { } }//package
Section 198
//MapsG_jdj_hall_02 (MapsG_jdj_hall_02) package { import mx.core.*; public class MapsG_jdj_hall_02 extends ByteArrayAsset { } }//package
Section 199
//MapsG_jdj_room_e_01 (MapsG_jdj_room_e_01) package { import mx.core.*; public class MapsG_jdj_room_e_01 extends ByteArrayAsset { } }//package
Section 200
//MapsG_jdj_room_e_foundry (MapsG_jdj_room_e_foundry) package { import mx.core.*; public class MapsG_jdj_room_e_foundry extends ByteArrayAsset { } }//package
Section 201
//MapsG_jdj_room_e_M1 (MapsG_jdj_room_e_M1) package { import mx.core.*; public class MapsG_jdj_room_e_M1 extends ByteArrayAsset { } }//package
Section 202
//MapsG_jdj_room_m_01 (MapsG_jdj_room_m_01) package { import mx.core.*; public class MapsG_jdj_room_m_01 extends ByteArrayAsset { } }//package
Section 203
//MapsG_jdj_room_m_angelOfSpikes (MapsG_jdj_room_m_angelOfSpikes) package { import mx.core.*; public class MapsG_jdj_room_m_angelOfSpikes extends ByteArrayAsset { } }//package
Section 204
//MapsG_jdj_room_m_minmonPit (MapsG_jdj_room_m_minmonPit) package { import mx.core.*; public class MapsG_jdj_room_m_minmonPit extends ByteArrayAsset { } }//package
Section 205
//MapsG_ms_ent_02 (MapsG_ms_ent_02) package { import mx.core.*; public class MapsG_ms_ent_02 extends ByteArrayAsset { } }//package
Section 206
//MapsG_ms_ent_03 (MapsG_ms_ent_03) package { import mx.core.*; public class MapsG_ms_ent_03 extends ByteArrayAsset { } }//package
Section 207
//MapsG_ms_ent_04 (MapsG_ms_ent_04) package { import mx.core.*; public class MapsG_ms_ent_04 extends ByteArrayAsset { } }//package
Section 208
//MapsG_ms_ent_05 (MapsG_ms_ent_05) package { import mx.core.*; public class MapsG_ms_ent_05 extends ByteArrayAsset { } }//package
Section 209
//MapsG_ms_exit_02 (MapsG_ms_exit_02) package { import mx.core.*; public class MapsG_ms_exit_02 extends ByteArrayAsset { } }//package
Section 210
//MapsG_ms_exit_03 (MapsG_ms_exit_03) package { import mx.core.*; public class MapsG_ms_exit_03 extends ByteArrayAsset { } }//package
Section 211
//MapsG_ms_exit_04 (MapsG_ms_exit_04) package { import mx.core.*; public class MapsG_ms_exit_04 extends ByteArrayAsset { } }//package
Section 212
//MapsG_ms_exit_05 (MapsG_ms_exit_05) package { import mx.core.*; public class MapsG_ms_exit_05 extends ByteArrayAsset { } }//package
Section 213
//MapsG_ms_exit_06 (MapsG_ms_exit_06) package { import mx.core.*; public class MapsG_ms_exit_06 extends ByteArrayAsset { } }//package
Section 214
//MapsG_ms_hall_03 (MapsG_ms_hall_03) package { import mx.core.*; public class MapsG_ms_hall_03 extends ByteArrayAsset { } }//package
Section 215
//MapsG_ms_hall_04 (MapsG_ms_hall_04) package { import mx.core.*; public class MapsG_ms_hall_04 extends ByteArrayAsset { } }//package
Section 216
//MapsG_ms_hall_05 (MapsG_ms_hall_05) package { import mx.core.*; public class MapsG_ms_hall_05 extends ByteArrayAsset { } }//package
Section 217
//MapsG_ms_hall_06 (MapsG_ms_hall_06) package { import mx.core.*; public class MapsG_ms_hall_06 extends ByteArrayAsset { } }//package
Section 218
//MapsG_ms_library_01 (MapsG_ms_library_01) package { import mx.core.*; public class MapsG_ms_library_01 extends ByteArrayAsset { } }//package
Section 219
//MapsG_ms_room_e_armory (MapsG_ms_room_e_armory) package { import mx.core.*; public class MapsG_ms_room_e_armory extends ByteArrayAsset { } }//package
Section 220
//MapsG_ms_room_e_ballroom (MapsG_ms_room_e_ballroom) package { import mx.core.*; public class MapsG_ms_room_e_ballroom extends ByteArrayAsset { } }//package
Section 221
//MapsG_ms_room_e_foundry (MapsG_ms_room_e_foundry) package { import mx.core.*; public class MapsG_ms_room_e_foundry extends ByteArrayAsset { } }//package
Section 222
//MapsG_ms_room_e_M1 (MapsG_ms_room_e_M1) package { import mx.core.*; public class MapsG_ms_room_e_M1 extends ByteArrayAsset { } }//package
Section 223
//MapsG_ms_room_m_trappy (MapsG_ms_room_m_trappy) package { import mx.core.*; public class MapsG_ms_room_m_trappy extends ByteArrayAsset { } }//package
Section 224
//MapsG_ph_room__destroyed1 (MapsG_ph_room__destroyed1) package { import mx.core.*; public class MapsG_ph_room__destroyed1 extends ByteArrayAsset { } }//package
Section 225
//MapsG_ph_room__firemen1 (MapsG_ph_room__firemen1) package { import mx.core.*; public class MapsG_ph_room__firemen1 extends ByteArrayAsset { } }//package
Section 226
//MapsG_ph_room__lowhangingspikes (MapsG_ph_room__lowhangingspikes) package { import mx.core.*; public class MapsG_ph_room__lowhangingspikes extends ByteArrayAsset { } }//package
Section 227
//MapsG_ph_room__spakes (MapsG_ph_room__spakes) package { import mx.core.*; public class MapsG_ph_room__spakes extends ByteArrayAsset { } }//package
Section 228
//MapsG_ph_room__spikecolumns (MapsG_ph_room__spikecolumns) package { import mx.core.*; public class MapsG_ph_room__spikecolumns extends ByteArrayAsset { } }//package
Section 229
//MapsG_ph_room__spikecolumnsingle (MapsG_ph_room__spikecolumnsingle) package { import mx.core.*; public class MapsG_ph_room__spikecolumnsingle extends ByteArrayAsset { } }//package
Section 230
//MapsG_ph_room__spikeholes (MapsG_ph_room__spikeholes) package { import mx.core.*; public class MapsG_ph_room__spikeholes extends ByteArrayAsset { } }//package
Section 231
//MapsG_ph_room_e_firemen (MapsG_ph_room_e_firemen) package { import mx.core.*; public class MapsG_ph_room_e_firemen extends ByteArrayAsset { } }//package
Section 232
//MapsG_ph_room_e_platforms (MapsG_ph_room_e_platforms) package { import mx.core.*; public class MapsG_ph_room_e_platforms extends ByteArrayAsset { } }//package
Section 233
//MapsG_ph_room_e_skullmons (MapsG_ph_room_e_skullmons) package { import mx.core.*; public class MapsG_ph_room_e_skullmons extends ByteArrayAsset { } }//package
Section 234
//MapsG_ph_room_h_01 (MapsG_ph_room_h_01) package { import mx.core.*; public class MapsG_ph_room_h_01 extends ByteArrayAsset { } }//package
Section 235
//MapsG_wgm_basement (MapsG_wgm_basement) package { import mx.core.*; public class MapsG_wgm_basement extends ByteArrayAsset { } }//package
Section 236
//MapsG_wgm_bridge_big (MapsG_wgm_bridge_big) package { import mx.core.*; public class MapsG_wgm_bridge_big extends ByteArrayAsset { } }//package
Section 237
//MapsG_wgm_broken_floor_with_skulls (MapsG_wgm_broken_floor_with_skulls) package { import mx.core.*; public class MapsG_wgm_broken_floor_with_skulls extends ByteArrayAsset { } }//package
Section 238
//MapsG_wgm_chandelier_room (MapsG_wgm_chandelier_room) package { import mx.core.*; public class MapsG_wgm_chandelier_room extends ByteArrayAsset { } }//package
Section 239
//MapsG_wgm_column_platforms (MapsG_wgm_column_platforms) package { import mx.core.*; public class MapsG_wgm_column_platforms extends ByteArrayAsset { } }//package
Section 240
//MapsG_wgm_column_room (MapsG_wgm_column_room) package { import mx.core.*; public class MapsG_wgm_column_room extends ByteArrayAsset { } }//package
Section 241
//MapsG_wgm_columned_minmon_pit (MapsG_wgm_columned_minmon_pit) package { import mx.core.*; public class MapsG_wgm_columned_minmon_pit extends ByteArrayAsset { } }//package
Section 242
//MapsG_wgm_EVIL_SPIKES_01 (MapsG_wgm_EVIL_SPIKES_01) package { import mx.core.*; public class MapsG_wgm_EVIL_SPIKES_01 extends ByteArrayAsset { } }//package
Section 243
//MapsG_wgm_ladder_mage_pit (MapsG_wgm_ladder_mage_pit) package { import mx.core.*; public class MapsG_wgm_ladder_mage_pit extends ByteArrayAsset { } }//package
Section 244
//MapsG_wgm_ladder_tower (MapsG_wgm_ladder_tower) package { import mx.core.*; public class MapsG_wgm_ladder_tower extends ByteArrayAsset { } }//package
Section 245
//MapsG_wgm_mage_bridge (MapsG_wgm_mage_bridge) package { import mx.core.*; public class MapsG_wgm_mage_bridge extends ByteArrayAsset { } }//package
Section 246
//MapsG_wgm_mage_hallway (MapsG_wgm_mage_hallway) package { import mx.core.*; public class MapsG_wgm_mage_hallway extends ByteArrayAsset { } }//package
Section 247
//MapsG_wgm_mage_tunnel (MapsG_wgm_mage_tunnel) package { import mx.core.*; public class MapsG_wgm_mage_tunnel extends ByteArrayAsset { } }//package
Section 248
//MapsG_wgm_minmon_pit (MapsG_wgm_minmon_pit) package { import mx.core.*; public class MapsG_wgm_minmon_pit extends ByteArrayAsset { } }//package
Section 249
//MapsG_wgm_minmon_spawn_room (MapsG_wgm_minmon_spawn_room) package { import mx.core.*; public class MapsG_wgm_minmon_spawn_room extends ByteArrayAsset { } }//package
Section 250
//MapsG_wgm_minmons_gigeresque (MapsG_wgm_minmons_gigeresque) package { import mx.core.*; public class MapsG_wgm_minmons_gigeresque extends ByteArrayAsset { } }//package
Section 251
//MapsG_wgm_room_e_flyingskull_drop (MapsG_wgm_room_e_flyingskull_drop) package { import mx.core.*; public class MapsG_wgm_room_e_flyingskull_drop extends ByteArrayAsset { } }//package
Section 252
//MapsG_wgm_room_e_platform_mages (MapsG_wgm_room_e_platform_mages) package { import mx.core.*; public class MapsG_wgm_room_e_platform_mages extends ByteArrayAsset { } }//package
Section 253
//MapsG_wgm_room_h_pit_01 (MapsG_wgm_room_h_pit_01) package { import mx.core.*; public class MapsG_wgm_room_h_pit_01 extends ByteArrayAsset { } }//package
Section 254
//MapsG_wgm_room_h_temptation_01 (MapsG_wgm_room_h_temptation_01) package { import mx.core.*; public class MapsG_wgm_room_h_temptation_01 extends ByteArrayAsset { } }//package
Section 255
//MapsG_wgm_room_h_wall_01 (MapsG_wgm_room_h_wall_01) package { import mx.core.*; public class MapsG_wgm_room_h_wall_01 extends ByteArrayAsset { } }//package
Section 256
//MapsG_wgm_room_h_wall_02 (MapsG_wgm_room_h_wall_02) package { import mx.core.*; public class MapsG_wgm_room_h_wall_02 extends ByteArrayAsset { } }//package
Section 257
//MapsG_wgm_room_high_libs_minmons_floor (MapsG_wgm_room_high_libs_minmons_floor) package { import mx.core.*; public class MapsG_wgm_room_high_libs_minmons_floor extends ByteArrayAsset { } }//package
Section 258
//MapsG_wgm_room_m_big_platform_01 (MapsG_wgm_room_m_big_platform_01) package { import mx.core.*; public class MapsG_wgm_room_m_big_platform_01 extends ByteArrayAsset { } }//package
Section 259
//MapsG_wgm_room_m_evil_spikes_01 (MapsG_wgm_room_m_evil_spikes_01) package { import mx.core.*; public class MapsG_wgm_room_m_evil_spikes_01 extends ByteArrayAsset { } }//package
Section 260
//MapsG_wgm_room_m_giant_chasm (MapsG_wgm_room_m_giant_chasm) package { import mx.core.*; public class MapsG_wgm_room_m_giant_chasm extends ByteArrayAsset { } }//package
Section 261
//MapsG_wgm_room_m_ladder_trap_01 (MapsG_wgm_room_m_ladder_trap_01) package { import mx.core.*; public class MapsG_wgm_room_m_ladder_trap_01 extends ByteArrayAsset { } }//package
Section 262
//MapsG_wgm_room_m_tall_w_pit_01 (MapsG_wgm_room_m_tall_w_pit_01) package { import mx.core.*; public class MapsG_wgm_room_m_tall_w_pit_01 extends ByteArrayAsset { } }//package
Section 263
//MapsG_wgm_room_minmons_chandeliers_01 (MapsG_wgm_room_minmons_chandeliers_01) package { import mx.core.*; public class MapsG_wgm_room_minmons_chandeliers_01 extends ByteArrayAsset { } }//package
Section 264
//MapsG_wgm_room_smolderingman_fireplaces_01 (MapsG_wgm_room_smolderingman_fireplaces_01) package { import mx.core.*; public class MapsG_wgm_room_smolderingman_fireplaces_01 extends ByteArrayAsset { } }//package
Section 265
//MapsG_wgm_simple_fire_corridor (MapsG_wgm_simple_fire_corridor) package { import mx.core.*; public class MapsG_wgm_simple_fire_corridor extends ByteArrayAsset { } }//package
Section 266
//MapsG_wgm_simple_gap (MapsG_wgm_simple_gap) package { import mx.core.*; public class MapsG_wgm_simple_gap extends ByteArrayAsset { } }//package
Section 267
//MapsG_wgm_space_platforms (MapsG_wgm_space_platforms) package { import mx.core.*; public class MapsG_wgm_space_platforms extends ByteArrayAsset { } }//package
Section 268
//MapsG_wgm_spike_platform (MapsG_wgm_spike_platform) package { import mx.core.*; public class MapsG_wgm_spike_platform extends ByteArrayAsset { } }//package
Section 269
//MapsG_wgm_spiked_hallway (MapsG_wgm_spiked_hallway) package { import mx.core.*; public class MapsG_wgm_spiked_hallway extends ByteArrayAsset { } }//package
Section 270
//MapsG_wgm_steeple_spikes (MapsG_wgm_steeple_spikes) package { import mx.core.*; public class MapsG_wgm_steeple_spikes extends ByteArrayAsset { } }//package
Section 271
//MapsG_wgm_the_great_outdoors (MapsG_wgm_the_great_outdoors) package { import mx.core.*; public class MapsG_wgm_the_great_outdoors extends ByteArrayAsset { } }//package
Section 272
//MapsG_wgm_trap_room_01 (MapsG_wgm_trap_room_01) package { import mx.core.*; public class MapsG_wgm_trap_room_01 extends ByteArrayAsset { } }//package
Section 273
//MapsG_wgm_tunnel_room_01 (MapsG_wgm_tunnel_room_01) package { import mx.core.*; public class MapsG_wgm_tunnel_room_01 extends ByteArrayAsset { } }//package
Section 274
//MapsG_wgm_windows_minmons (MapsG_wgm_windows_minmons) package { import mx.core.*; public class MapsG_wgm_windows_minmons extends ByteArrayAsset { } }//package
Section 275
//MapsG_winecellar (MapsG_winecellar) package { import mx.core.*; public class MapsG_winecellar extends ByteArrayAsset { } }//package
Section 276
//MapsG_wm_room_h_platform_smen_skulls_01 (MapsG_wm_room_h_platform_smen_skulls_01) package { import mx.core.*; public class MapsG_wm_room_h_platform_smen_skulls_01 extends ByteArrayAsset { } }//package
Section 277
//Melee (Melee) package { import org.flixel.*; public class Melee extends Entity { public var collisionEvent:Function;// = null public var damageType:uint; public var victims:Array; public var damageDieSize:int;// = 6 public var damageMod:int;// = 0 public var owner:Entity; public var damageDieCount:int;// = 1 public function Melee(_arg1:int=0, _arg2:int=0){ damageType = Actor.DAMAGE_PHYSICAL; victims = []; super(_arg1, _arg2); } public function Attack():void{ this.visible = true; this.play("run"); } public function AttackAnimationCallback(_arg1:String, _arg2:uint, _arg3:uint):void{ trace(((_arg1 + " ") + _arg2)); if ((((_arg1 == "run")) && ((_arg2 == (_curAnim.frames.length - 1))))){ this.play("idle"); this.visible = false; this.victims.length = 0; }; } override public function kill():void{ this.x = -1000; this.y = -1000; super.kill(); } override public function reset(_arg1:Number, _arg2:Number):void{ this.collisionEvent = null; super.reset(_arg1, _arg2); } public function AssignDamage(_arg1:int=1, _arg2:int=1, _arg3:int=0):void{ this.damageDieCount = _arg1; this.damageDieSize = _arg2; this.damageMod = _arg3; } override public function OnOverlap(_arg1:FlxObject):void{ var _local2:int; var _local3:int; var _local4:Actor; var _local5:int; var _local6:int; if (this.visible == false){ return; }; if (this.owner == _arg1){ return; }; if ((_arg1 is Actor)){ _local2 = this.victims.length; _local3 = 0; while (_local3 < _local2) { if (victims[_local3] == _arg1){ return; }; _local3++; }; _local4 = (_arg1 as Actor); _local5 = ((this.facing)==FlxSprite.RIGHT) ? 1 : -1; _local6 = UtilsG.dice(this.damageDieCount, this.damageDieSize, this.damageMod); if (this.collisionEvent != null){ this.collisionEvent(_local4); }; _local4.TakeDamage(_local6, this.damageType, this.owner); _local4.ApplyKnockback(new FlxPoint((100 * _local5), 0)); FlxG.quake.start(0.005, 0.1); this.victims[this.victims.length] = _local4; }; } } }//package
Section 278
//Meter (Meter) package { import org.flixel.*; public class Meter extends FlxSprite { public var fillColor:uint;// = 4278255360 public var fillWidthMax:Number;// = 81 public var max:Number;// = 0 public var fillOffset:FlxPoint; public var current:Number;// = 0 public var fillGfx:FlxSprite; public static const FILL_RED:uint = 4294901760; public static const FILL_BLUE:uint = 4289256191; public static const FILL_GREEN:uint = 4292542335; public function Meter(_arg1:int=0, _arg2:int=0){ fillOffset = new FlxPoint(11, 4); super(_arg1, _arg2); this.fillGfx = new FlxSprite((_arg1 + fillOffset.x), (_arg2 + fillOffset.y)); this.fillGfx.visible = false; } override public function render():void{ super.render(); if (this.fillGfx.visible){ this.fillGfx.render(); }; } override public function update():void{ var _local1:int; this.fillGfx.scrollFactor = this.scrollFactor; super.update(); this.fillGfx.update(); this.fillGfx.x = (this.x + this.fillOffset.x); this.fillGfx.y = (this.y + this.fillOffset.y); if (this.current > 0){ _local1 = ((this.fillWidthMax * this.current) / this.max); if (_local1 < 1){ _local1 = 1; }; this.fillGfx.createGraphic(_local1, 2, this.fillColor); this.fillGfx.visible = true; } else { this.fillGfx.visible = false; }; } override public function destroy():void{ super.destroy(); this.fillGfx.destroy(); } } }//package
Section 279
//MinMonController (MinMonController) package { import flash.geom.*; import org.flixel.*; public class MinMonController extends ActorController { override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.loadGraphic(AssetsG.minmonImg, true, true, 8, 7); this.actor.addAnimation("idle", [0, 1], 8, true); this.actor.addAnimation("run", [0, 1], 12, true); this.actor.addAnimation("attack", [2, 3, 4], 20, true); this.actor.addAnimation("jump pre", [0, 1], 24, false); this.actor.addAnimation("jump raising", [0, 1]); this.actor.addAnimation("jump falling", [0, 1]); this.actor.addAnimation("jump landing", [0, 1], 24, false); this.actor.addAnimationCallback(this.actor.AnimationCallback); this.actor.play("idle"); this.actor.facing = FlxSprite.LEFT; this.actor.runSpeed = (UtilsG.dice(2, 4) * 100); this.actor.maxVelocity.x = UtilsG.dice(2, 20, 75); this.actor.acceleration.y = 800; this.actor.jumpPower = -(UtilsG.dice(1, 50, 100)); this.actor.width = 6; this.actor.height = 6; this.actor.offset.x = 1; this.actor.offset.y = 1; this.agroDistance = 200; this.enemyType = SaveData.ENEMY_MIN_MON; this.actor.collideAttack = new Attack(this.actor); this.actor.DeriveStats(); } override public function update():void{ var _local1:Point = new Point(EatG.PC.x, EatG.PC.y); var _local2:Point = new Point(this.actor.x, this.actor.y); var _local3:Point = new Point((_local1.x - _local2.x), (_local1.y - _local2.y)); if (Math.abs(_local3.length) < this.agroDistance){ if (_local3.x < 0){ this.actor.preferredDirection = FlxSprite.LEFT; this.actor.PerformAction("MOVE FORWARD"); } else { this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.PerformAction("MOVE FORWARD"); }; }; this.actor.PerformAction("JUMP"); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (35 + (25 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.experience = (40 + (10 * (_arg1 - 1))); this.actor.collideAttack.setDamage(1, 4, (5 * (_arg1 - 1))); } } }//package
Section 280
//MinMonMomController (MinMonMomController) package { import flash.geom.*; import org.flixel.*; public class MinMonMomController extends ActorController { override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.loadGraphic(AssetsG.minmomImg, true, true, 21, 18); this.actor.addAnimation("idle", [0, 1, 2], 8, true); this.actor.addAnimation("run", [0, 1, 2], 12, true); this.actor.addAnimation("attack", [3, 4, 5, 6, 7], 20, true); this.actor.addAnimation("jump pre", [0, 1, 2], 24, false); this.actor.addAnimation("jump raising", [0, 1, 2]); this.actor.addAnimation("jump falling", [0, 1, 2]); this.actor.addAnimation("jump landing", [0, 1, 2], 24, false); this.actor.addAnimationCallback(this.actor.AnimationCallback); this.actor.play("idle"); this.actor.facing = FlxSprite.LEFT; if (SaveData.ThisSession.ThisPlay != null){ this.actor.experience = ((200 * SaveData.ThisSession.ThisPlay.AreaCount) / 2); } else { this.actor.experience = 0; }; this.actor.runSpeed = (UtilsG.dice(2, 4) * 100); this.actor.maxVelocity.x = UtilsG.dice(3, 25, 100); this.actor.acceleration.y = 800; this.actor.jumpPower = -(UtilsG.dice(1, 50, 100)); this.actor.width = 19; this.actor.height = 14; this.actor.offset.x = 2; this.actor.offset.y = 4; this.agroDistance = 200; this.enemyType = SaveData.ENEMY_MIN_MOM; this.actor.collideAttack = new Attack(this.actor); this.actor.DeriveStats(); } override public function update():void{ var _local1:Point = new Point(EatG.PC.x, EatG.PC.y); var _local2:Point = new Point(this.actor.x, this.actor.y); var _local3:Point = new Point((_local1.x - _local2.x), (_local1.y - _local2.y)); if (Math.abs(_local3.length) < this.agroDistance){ if (_local3.x < 0){ this.actor.preferredDirection = FlxSprite.LEFT; this.actor.PerformAction("MOVE FORWARD"); } else { this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.PerformAction("MOVE FORWARD"); }; }; this.actor.PerformAction("JUMP"); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (40 + (30 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.experience = (50 + (10 * (_arg1 - 1))); this.actor.collideAttack.setDamage(1, 4, (5 * (_arg1 - 1))); } } }//package
Section 281
//MissileController (MissileController) package { import org.flixel.*; public class MissileController extends ProjectileController { public var lifeTimeCounter:Number;// = 0 public var lifeTime:Number;// = 0.85 override public function init(_arg1:Projectile):void{ super.init(_arg1); if (EatG.CurrentOrg == EatG.ORC){ this.projectile.loadGraphic(AssetsG.mwaveRedImg, true, true, 16, 11); } else { if (EatG.CurrentOrg == EatG.SHADOWMONSTER){ this.projectile.loadGraphic(AssetsG.mwaveImg, true, true, 16, 11); } else { this.projectile.loadGraphic(AssetsG.mwaveImg, true, true, 16, 11); }; }; this.projectile.addAnimation("horz", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 16, true); this.projectile.addAnimation("horzimpact", [10, 11, 11, 11, 12, 13, 14, 15], 16, false); this.projectile.addAnimation("vert", [16, 17, 18, 19, 20, 21, 22, 23, 24, 25], 16, true); this.projectile.addAnimation("vertimpact", [26, 27, 27, 27, 28, 29, 30, 31], 16, false); this.projectile.addAnimation("vertimpactdown", [39, 38, 38, 38, 37, 36, 35, 34], 16, false); this.projectile.play("vert"); this.projectile.Arcs = false; this.projectile.bouncesOnContact = false; this.projectile.damageType = Actor.DAMAGE_MAGICAL; this.projectile.AssignDamage(2, 4); this.projectile.collisionEvent = null; } override public function SetupEmitter():void{ this.projectile.emitter = NonEntityManager.GetEmitter(); if (this.projectile.emitter == null){ return; }; this.projectile.emitter.SpritePool = NonEntityManager.GetMissileSparklePool(); this.projectile.emitter.delay = 0.01; this.projectile.emitter.gravity = 0; this.projectile.emitter.minParticleSpeed.y = -50; this.projectile.emitter.maxParticleSpeed.y = 50; this.projectile.emitter.x = (this.projectile.x + (this.projectile.width / 2)); this.projectile.emitter.y = (this.projectile.y + (this.projectile.height / 2)); this.projectile.emitter.start(false, 0.01); } override public function update():void{ super.update(); this.lifeTimeCounter = (this.lifeTimeCounter + FlxG.elapsed); if ((((this.lifeTimeCounter >= this.lifeTime)) || (!(this.projectile.onScreen())))){ this.projectile.kill(); }; } } }//package
Section 282
//Music (Music) package { import flash.events.*; import org.flixel.*; import flash.utils.*; public class Music extends FlxSound { public var currentTrack:int; public var positionTimer:Timer; public var restartPosition:int; public var nearEndPosition:int; public function Music(){ this.survive = true; } public function switchTheme(_arg1:int):void{ if (_arg1 == this.currentTrack){ return; }; if (this.positionTimer != null){ this.positionTimer.removeEventListener(TimerEvent.TIMER, this.positionTimerHandler); }; this.currentTrack = _arg1; switch (_arg1){ default: this.restartPosition = 24000; this.loadEmbedded(AssetsG.music1, true); this.play(); this.currentTrack = 1; break; case 1: this.restartPosition = 24000; this.loadEmbedded(AssetsG.music1, true); this.play(); break; case 2: this.restartPosition = 1; this.loadEmbedded(AssetsG.music2, true); this.play(); break; case 3: this.restartPosition = 13091; this.loadEmbedded(AssetsG.music3, true); this.play(); break; case 4: this.restartPosition = 18580; this.loadEmbedded(AssetsG.music4, true); this.play(); break; }; } override public function play():void{ super.play(); if (this._looped == true){ this.positionTimer = new Timer(10); this.positionTimer.addEventListener(TimerEvent.TIMER, this.positionTimerHandler); this.positionTimer.start(); this.nearEndPosition = (this._sound.length - 300); }; } public function positionTimerHandler(_arg1:TimerEvent):void{ if (this.playing){ if (_channel.position > nearEndPosition){ _channel.stop(); _position = restartPosition; play(); }; volume = 1; }; } } }//package
Section 283
//NewgroundsAPI (NewgroundsAPI) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.text.*; public class NewgroundsAPI { public static const ADS_APPROVED:Number = 3; public static const bridge:Sprite = new Sprite(); private static const STAT_NEW_VERSION:Number = 4; private static const STAT_AUTHOR_SITE:Number = 2; private static const GATEWAY_URL:String = "http://www.ngads.com/gateway.php"; private static const NEWGROUNDS_URL:String = "http://www.newgrounds.com"; private static const STAT_CUSTOM_STATS:Number = 50; private static const STAT_MOVIE_VIEWS:Number = 1; private static const STAT_NEWGROUNDS:Number = 3; public static const NEW_VERSION:Number = 2; public static const DENY_HOST:Number = 1; private static var tracker_id:Number; private static var movie_options:Object = new Object(); private static var connected:Boolean; private static var custom_events:Object = new Object(); private static var host:String; private static var linked:Boolean; private static var events:Object = new Object(); private static var debug:Boolean; private static var version:String; private static var custom_links:Object = new Object(); public static function getNewVersionURL(){ return (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + STAT_NEW_VERSION)); } private static function ReadGatewayData(_arg1:Object){ var _local2:*; var _local3:String; var _local4:*; var _local5:URLLoader; for (_local2 in _arg1) { _arg1[_local2] = unescape(_arg1[_local2]); movie_options[_local2] = _arg1[_local2]; }; if (_arg1["settings_loaded"]){ SendMessage("You have successfully connected to the Newgrounds API gateway!"); SendMessage((("Movie Identified as '" + movie_options["movie_name"]) + "'")); if (movie_options["message"]){ SendMessage(movie_options["message"]); }; if (movie_options["ad_url"]){ SendMessage("Your movie has been approved to run Flash Ads"); if (events[ADS_APPROVED]){ var _local6 = events; _local6[ADS_APPROVED](movie_options["ad_url"]); } else { onAdsApproved(movie_options["ad_url"]); }; }; if (((movie_options["movie_version"]) && (!((String(movie_options["movie_version"]) == String(version)))))){ SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!"); if (events[NEW_VERSION]){ _local6 = events; _local6[NEW_VERSION]({version:movie_options["movie_version"], real_url:getMovieURL(), redirect_url:getNewVersionURL()}); } else { onNewVersionAvailable(movie_options["movie_version"], getMovieURL(), getNewVersionURL()); }; }; if (movie_options["deny_host"]){ SendMessage("You have blocked 'localHost' in your API settings."); SendMessage("If you wish to test your movie you will need to remove this block."); if (events[DENY_HOST]){ _local6 = events; _local6[DENY_HOST]({host:host, real_url:getMovieURL(), redirect_url:getNewVersionURL()}); } else { onDenyHost(host, getMovieURL(), getNewVersionURL()); }; }; if (movie_options["request_portal_url"]){ _local3 = bridge.root.loaderInfo.url; _local4 = ((((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_local3)); _local5 = new URLLoader(new URLRequest(_local4)); }; if (events[69]){ _local6 = events; _local6[69](); }; } else { if (!movie_options["settings_loaded"]){ SendError("Could not establish connection to the API gateway."); }; }; } public static function setMovieVersion(_arg1){ if (!_arg1){ SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)"); } else { version = String(_arg1); }; } public static function loadCustomLink(_arg1:String){ if (!_arg1){ SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)"); } else { if (!custom_links[_arg1]){ SendError(("Attempted to open undefined custom link: " + _arg1)); } else { SendLink(custom_links[_arg1]); }; }; } public static function addCustomLink(_arg1:Number, _arg2:String){ if (!_arg1){ SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)"); } else { if (!_arg2){ SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)"); } else { custom_links[_arg2] = (STAT_CUSTOM_STATS + _arg1); SendMessage(((("Created custom link " + _arg1) + ": ") + _arg2)); }; }; } public static function getMovieURL(){ if (movie_options["movie_url"]){ return (movie_options["movie_url"]); }; return ("Newgrounds.com"); } public static function debugMode(){ debug = true; } public static function getAdURL(){ return (movie_options["ad_url"]); } private static function SendStat(_arg1:Number, _arg2:Boolean, _arg3=null){ var target_url:*; var x:*; var request:URLRequest; var gateway_loader:URLLoader; var stat_id = _arg1; var open_in_browser = _arg2; var extra = _arg3; if (!tracker_id){ SendError("You must call NewgroundsAPI.connectMovie() with a valid movie id before using API features!"); } else { var XML_Loaded:Function = function (_arg1:Event){ var _local5:XML; var _local6:*; var _local7:*; XML.ignoreWhitespace = true; var _local2:XML = XML(_arg1.target.data); var _local3:Object = new Object(); var _local4:XMLList = _local2.children(); for each (_local5 in _local4) { _local6 = _local5.localName(); _local7 = _local5.attribute("value"); if (_local7 == Number(_local7)){ _local7 = Number(_local7); }; _local3[_local6] = _local7; }; ReadGatewayData(_local3); }; target_url = (((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id) + addSeed()); if (extra){ for (x in extra) { target_url = (target_url + ((("&" + escape(x)) + "=") + escape(extra[x]))); }; }; if (debug){ target_url = (target_url + "&debug=1"); }; if (open_in_browser){ request = new URLRequest((target_url + addSeed())); navigateToURL(request, "_blank"); } else { gateway_loader = new URLLoader(new URLRequest((target_url + addSeed()))); gateway_loader.addEventListener(Event.COMPLETE, XML_Loaded); }; }; } public static function onAdsApproved(_arg1:String){ } public static function loadMySite(_arg1:Event=null){ SendLink(STAT_AUTHOR_SITE); } private static function SendMessage(_arg1:String){ trace(("[NEWGROUNDS API] :: " + _arg1)); } public static function linkAPI(_arg1){ _arg1.addChild(bridge); linked = true; } public static function loadNewgrounds(_arg1:Event=null, _arg2:String=null){ var _local3:URLRequest; var _local4:*; if (!tracker_id){ _local3 = new URLRequest(((NEWGROUNDS_URL + "/") + _arg2)); navigateToURL(_local3, "_blank"); } else { _local4 = null; if (_arg2){ _local4 = new Object(); _local4.page = _arg2; }; SendLink(STAT_NEWGROUNDS, _local4); }; } private static function SendLink(_arg1, _arg2=null){ SendStat(_arg1, true, _arg2); } public static function logCustomEvent(_arg1:String){ if (!_arg1){ SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)"); } else { if (!custom_events[_arg1]){ SendError(("Attempted to log undefined custom event: " + _arg1)); } else { SendEvent(custom_events[_arg1]); }; }; } private static function SendError(_arg1:String){ trace(("[NEWGROUNDS API ERROR] :: " + _arg1)); } public static function addCustomEvent(_arg1:Number, _arg2:String){ if (!_arg1){ SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)"); } else { if (!_arg2){ SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)"); } else { custom_events[_arg2] = (STAT_CUSTOM_STATS + _arg1); SendMessage(("Created custom event: " + _arg2)); }; }; } private static function addSeed(){ return (("&seed=" + Math.random())); } public static function addEventListener(_arg1:Number, _arg2:Function){ events[_arg1] = _arg2; } private static function SendEvent(_arg1){ SendStat(_arg1, false); } public static function onNewVersionAvailable(_arg1:String, _arg2:String, _arg3:String){ var mg:*; var _root:*; var overlay:MovieClip; var version = _arg1; var movie_url = _arg2; var redirect_url = _arg3; var sw:* = bridge.stage.stageWidth; var sh:* = bridge.stage.stageHeight; var tw:* = 350; var th:* = 160; mg = 20; _root = bridge.root; overlay = new MovieClip(); overlay.graphics.beginFill(0, 0.6); overlay.graphics.lineStyle(0, 0); overlay.graphics.drawRect(0, 0, sw, sh); overlay.graphics.endFill(); var overlay_x:* = Math.round(((sw - tw) / 2)); var overlay_y:* = Math.round(((sh - th) / 2)); overlay.graphics.beginFill(102); overlay.graphics.lineStyle(10, 0); overlay.graphics.drawRect((overlay_x - mg), (overlay_y - mg), (tw + mg), (th + mg)); overlay.graphics.endFill(); overlay.close = function (_arg1:Event){ _root.removeChild(overlay); }; var close_x:* = new MovieClip(); close_x.graphics.beginFill(0, 0.1); close_x.graphics.lineStyle(3, 22015); close_x.graphics.drawRect(0, 0, 16, 16); close_x.graphics.endFill(); close_x.graphics.moveTo(4, 4); close_x.graphics.lineTo(13, 13); close_x.graphics.moveTo(13, 4); close_x.graphics.lineTo(4, 13); close_x.x = ((overlay_x + tw) - 26); close_x.y = (overlay_y - 10); close_x.addEventListener(MouseEvent.CLICK, overlay.close); var blankarea:TextField = new TextField(); blankarea.x = (overlay_x - mg); blankarea.y = (overlay_y - mg); blankarea.width = (tw + mg); blankarea.height = (th + mg); blankarea.selectable = false; var header:TextField = new TextField(); header.width = tw; header.x = overlay_x; header.y = overlay_y; header.height = 100; header.selectable = false; var header_format:TextFormat = new TextFormat(); header_format.font = "Arial Black"; header_format.color = 0xFFFFFF; header_format.size = 20; header.defaultTextFormat = header_format; header.text = "New Version Available!"; var msgtext:TextField = new TextField(); msgtext.x = overlay_x; msgtext.y = (overlay_y + 70); msgtext.width = tw; msgtext.height = 60; msgtext.selectable = false; var msgtext_format:TextFormat = new TextFormat(); msgtext_format.font = "Arial"; msgtext_format.color = 0xFFFFFF; msgtext_format.size = 12; msgtext_format.bold = true; var msgtext_link:TextFormat = new TextFormat(); msgtext_link.font = "Arial"; msgtext_link.color = 0xFFFF00; msgtext_link.size = 12; msgtext_link.bold = true; msgtext_link.url = redirect_url; msgtext_link.target = "_blank"; if (version){ version = ("Version " + version); } else { version = "A new version"; }; msgtext.defaultTextFormat = msgtext_format; msgtext.appendText((version + " is now available")); if (movie_url){ msgtext.appendText(" at:\n"); msgtext.defaultTextFormat = msgtext_link; msgtext.appendText(movie_url); } else { msgtext.appendText("!"); }; _root.addChild(overlay); overlay.addChild(blankarea); overlay.addChild(header); overlay.addChild(msgtext); overlay.addChild(close_x); } public static function onDenyHost(_arg1:String, _arg2:String, _arg3:String){ var _local4:* = bridge.stage.stageWidth; var _local5:* = bridge.stage.stageHeight; var _local6:* = 350; var _local7:* = 160; var _local8:* = bridge.root; var _local9:MovieClip = new MovieClip(); _local9.graphics.beginFill(0x660000); _local9.graphics.lineStyle(20, 0); _local9.graphics.drawRect(0, 0, _local4, _local5); _local9.graphics.endFill(); var _local10:TextField = new TextField(); _local10.x = 0; _local10.y = 0; _local10.width = _local4; _local10.height = _local5; _local10.selectable = false; var _local11:TextField = new TextField(); _local11.x = Math.round(((_local4 - _local6) / 2)); _local11.y = Math.round(((_local5 - _local7) / 2.5)); _local11.width = _local6; _local11.height = 100; _local11.selectable = false; var _local12:TextFormat = new TextFormat(); _local12.font = "Arial Black"; _local12.color = 0xFF0000; _local12.size = 38; _local11.defaultTextFormat = _local12; _local11.text = "ERROR!"; var _local13:TextField = new TextField(); _local13.x = Math.round(((_local4 - _local6) / 2)); _local13.y = (Math.round(((_local5 - _local7) / 2.5)) + 80); _local13.width = _local6; _local13.height = 80; _local13.selectable = false; var _local14:TextFormat = new TextFormat(); _local14.font = "Arial"; _local14.color = 0xFFFFFF; _local14.size = 12; _local14.bold = true; var _local15:TextFormat = new TextFormat(); _local15.font = "Arial"; _local15.color = 0xFFFF00; _local15.size = 12; _local15.bold = true; _local15.url = _arg3; _local15.target = "_blank"; _local13.defaultTextFormat = _local14; _local13.appendText((("This movie has not been approved for use on " + _arg1) + "\n")); _local13.appendText("For an approved copy, please visit:\n"); _local13.defaultTextFormat = _local15; _local13.appendText(_arg2); _local8.addChild(_local9); _local9.addChild(_local10); _local9.addChild(_local11); _local9.addChild(_local13); } public static function connectMovie(_arg1:Number){ var _local2:String; var _local3:*; if (!_arg1){ SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)"); } else { if (!linked){ SendError("Attempted to call MewgroundsAPI.connectMovie() without first calling NewgroundsAPI.linkAPI(this)"); } else { if (!tracker_id){ SendMessage("Connecting to API gateway..."); tracker_id = _arg1; _local2 = bridge.root.loaderInfo.url; host = _local2.split("/")[2].toLowerCase(); if (host.length < 1){ host = "localhost"; }; _local3 = new Object(); SendEvent(STAT_MOVIE_VIEWS); }; }; }; } public static function isInstalled(){ return (true); } } }//package
Section 284
//NonEntityManager (NonEntityManager) package { import org.flixel.*; public class NonEntityManager { public static const StatusEffectsMax:uint = 32; public static const BloodSpritesPerEmitter:uint = 15; public static const EmittersMax:uint = 32; public static const FloatingTextsMax:uint = 24; public static const ExplosionsMax:uint = 16; public static const ProjectilesMax:uint = 48; public static var floatingTextList:FlxGroup; public static var missileSparklePoolList:FlxGroup; public static var fireballSparklePoolList:FlxGroup; public static var propList:FlxGroup; public static var projectileList:FlxGroup; public static var emitterList:FlxGroup; public static var shadowBoltEffectPoolList:FlxGroup; public static var explosionList:FlxGroup; public static var initialized:Boolean = false; public static var weaponList:FlxGroup; public static var statusEffectList:FlxGroup; public static var explosivesList:FlxGroup; public static var lvlUpSparkePoolList:FlxGroup; public static var poisonArrowSparklePoolList:FlxGroup; public static var bloodPoolList:FlxGroup; public static function get StatusEffects():FlxGroup{ return (NonEntityManager.statusEffectList); } public static function get Projectiles():FlxGroup{ return (NonEntityManager.projectileList); } public static function GetShadowBoltEffect():FlxGroup{ var _local1:FlxGroup = (shadowBoltEffectPoolList.getFirstAvail() as FlxGroup); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function get Explosions():FlxGroup{ return (NonEntityManager.explosionList); } public static function GetBloodPool():FlxGroup{ var _local1:FlxGroup = (bloodPoolList.getFirstAvail() as FlxGroup); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetLvLUpSparklePool():FlxGroup{ var _local1:FlxGroup = (lvlUpSparkePoolList.getFirstAvail() as FlxGroup); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function FirstTimeInit():void{ var _local4:FlxSprite; var _local5:Array; var _local6:Array; NonEntityManager.initialized = true; var _local1:int; var _local2:int; var _local3:int; weaponList = new FlxGroup(); _local5 = weaponList.members; _local1 = 0; while (_local1 < 200) { _local5[_local1] = new Melee(); _local1++; }; propList = new FlxGroup(); _local5 = propList.members; _local1 = 0; while (_local1 < 100) { _local5[_local1] = new FlxSprite(); _local1++; }; projectileList = new FlxGroup(); _local5 = projectileList.members; _local1 = 0; while (_local1 < 50) { _local5[_local1] = new Projectile(); _local1++; }; emitterList = new FlxGroup(); _local5 = emitterList.members; _local1 = 0; while (_local1 < 250) { _local5[_local1] = new Emitter(); _local1++; }; floatingTextList = new FlxGroup(); _local5 = floatingTextList.members; _local1 = 0; while (_local1 < 50) { _local5[_local1] = new Text(0, 0); _local1++; }; explosionList = new FlxGroup(); _local5 = explosionList.members; _local1 = 0; while (_local1 < 50) { _local5[_local1] = new Explosion(); (_local5[_local1] as Explosion).init(); _local1++; }; statusEffectList = new FlxGroup(); _local5 = statusEffectList.members; _local1 = 0; while (_local1 < 50) { _local5[_local1] = new StatusEffect(); _local1++; }; explosivesList = new FlxGroup(); _local5 = explosivesList.members; _local1 = 0; while (_local1 < 50) { _local5[_local1] = new Explosive(); _local1++; }; bloodPoolList = new FlxGroup(); _local5 = bloodPoolList.members; _local1 = 0; while (_local1 < 100) { _local5[_local1] = new FlxGroup(); _local6 = (_local5[_local1] as FlxGroup).members; _local2 = 0; while (_local2 < 15) { _local3 = UtilsG.dice(1, 3); _local4 = new FlxSprite(); _local4.createGraphic(_local3, _local3, 4291559424); _local6[_local2] = _local4; _local2++; }; _local1++; }; missileSparklePoolList = new FlxGroup(); _local5 = missileSparklePoolList.members; _local1 = 0; while (_local1 < 10) { _local5[_local1] = new FlxGroup(); _local6 = (_local5[_local1] as FlxGroup).members; _local2 = 0; while (_local2 < 30) { _local3 = UtilsG.dice(1, 3); _local4 = new FlxSprite(); _local4.solid = false; switch (_local3){ case 1: _local4.createGraphic(1, 1, 4294923453); break; case 2: _local4.createGraphic(1, 1, 4291611852); break; case 3: _local4.createGraphic(1, 1, 4294945416); break; }; _local6[_local2] = _local4; _local2++; }; _local1++; }; poisonArrowSparklePoolList = new FlxGroup(); _local5 = poisonArrowSparklePoolList.members; _local1 = 0; while (_local1 < 5) { _local5[_local1] = new FlxGroup(); _local6 = (_local5[_local1] as FlxGroup).members; _local2 = 0; while (_local2 < 30) { _local4 = new FlxSprite(); _local4.solid = false; _local4.createGraphic(1, 1, 4278255360); _local6[_local2] = _local4; _local2++; }; _local1++; }; shadowBoltEffectPoolList = new FlxGroup(); _local5 = shadowBoltEffectPoolList.members; _local1 = 0; while (_local1 < 20) { _local5[_local1] = new FlxGroup(); _local6 = (_local5[_local1] as FlxGroup).members; _local2 = 0; while (_local2 < 30) { _local4 = new FlxSprite(); _local4.solid = false; _local4.createGraphic(1, 1, 4290598143); _local6[_local2] = _local4; _local2++; }; _local1++; }; lvlUpSparkePoolList = new FlxGroup(); _local5 = lvlUpSparkePoolList.members; _local1 = 0; while (_local1 < 5) { _local5[_local1] = new FlxGroup(); _local6 = (_local5[_local1] as FlxGroup).members; _local2 = 0; while (_local2 < 50) { _local3 = UtilsG.dice(1, 2); _local4 = new FlxSprite(); _local4.solid = false; _local4.createGraphic(_local3, _local3, 4290598143); _local6[_local2] = _local4; _local2++; }; _local1++; }; fireballSparklePoolList = new FlxGroup(); _local5 = fireballSparklePoolList.members; _local1 = 0; while (_local1 < 5) { _local5[_local1] = new FlxGroup(); _local6 = (_local5[_local1] as FlxGroup).members; _local2 = 0; while (_local2 < 50) { _local3 = UtilsG.dice(1, 2); _local4 = new FlxSprite(); _local4.solid = false; _local4.createGraphic(_local3, _local3, 4294937904); _local6[_local2] = _local4; _local2++; }; _local1++; }; } public static function Reset():void{ var _local1:Melee; var _local2:FlxSprite; var _local3:Projectile; var _local4:Emitter; var _local5:Text; var _local6:Explosion; var _local7:Explosive; var _local8:StatusEffect; var _local9:FlxGroup; var _local10:FlxObject; if (NonEntityManager.initialized == false){ NonEntityManager.FirstTimeInit(); }; for each (_local1 in NonEntityManager.weaponList.members) { _local1.exists = false; }; for each (_local2 in NonEntityManager.propList.members) { _local2.exists = false; }; for each (_local3 in NonEntityManager.Projectiles.members) { _local3.exists = false; }; for each (_local4 in NonEntityManager.Emitters.members) { _local4.exists = false; }; for each (_local5 in NonEntityManager.FloatingTexts.members) { _local5.exists = false; }; for each (_local6 in NonEntityManager.Explosions.members) { _local6.exists = false; }; for each (_local7 in NonEntityManager.Explosives.members) { _local7.exists = false; }; for each (_local8 in NonEntityManager.StatusEffects.members) { _local8.exists = false; }; for each (_local9 in NonEntityManager.bloodPoolList.members) { _local9.exists = false; for each (_local10 in _local9.members) { _local10.exists = false; }; }; for each (_local9 in NonEntityManager.missileSparklePoolList.members) { _local9.exists = false; for each (_local10 in _local9.members) { _local10.exists = false; }; }; for each (_local9 in NonEntityManager.poisonArrowSparklePoolList.members) { _local9.exists = false; for each (_local10 in _local9.members) { _local10.exists = false; }; }; for each (_local9 in NonEntityManager.shadowBoltEffectPoolList.members) { _local9.exists = false; for each (_local10 in _local9.members) { _local10.exists = false; }; }; for each (_local9 in NonEntityManager.lvlUpSparkePoolList.members) { _local9.exists = false; for each (_local10 in _local9.members) { _local10.exists = false; }; }; for each (_local9 in NonEntityManager.fireballSparklePoolList.members) { _local9.exists = false; for each (_local10 in _local9.members) { _local10.exists = false; }; }; } public static function GetFloatingText():Text{ var _local1:Text = (floatingTextList.getFirstAvail() as Text); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetMissileSparklePool():FlxGroup{ var _local1:FlxGroup = (missileSparklePoolList.getFirstAvail() as FlxGroup); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function get Weapons():FlxGroup{ return (NonEntityManager.weaponList); } public static function GetProp():FlxSprite{ var _local1:FlxSprite = (propList.getFirstAvail() as FlxSprite); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetProjectile():Projectile{ var _local1:Projectile = (projectileList.getFirstAvail() as Projectile); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetFireballSparklePool():FlxGroup{ var _local1:FlxGroup = (fireballSparklePoolList.getFirstAvail() as FlxGroup); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetPoisonArrowSparkle():FlxGroup{ var _local1:FlxGroup = (poisonArrowSparklePoolList.getFirstAvail() as FlxGroup); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function get Explosives():FlxGroup{ return (NonEntityManager.explosivesList); } public static function GetExplosive():Explosive{ var _local1:Explosive = (explosivesList.getFirstAvail() as Explosive); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function get Props():FlxGroup{ return (NonEntityManager.propList); } public static function get FloatingTexts():FlxGroup{ return (NonEntityManager.floatingTextList); } public static function get Emitters():FlxGroup{ return (NonEntityManager.emitterList); } public static function GetEmitter():Emitter{ var _local1:Emitter = (emitterList.getFirstAvail() as Emitter); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetWeapon():Melee{ var _local1:Melee = (weaponList.getFirstAvail() as Melee); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetStatusEffect():StatusEffect{ var _local1:StatusEffect = (statusEffectList.getFirstAvail() as StatusEffect); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } public static function GetExplosion():Explosion{ var _local1:Explosion = (explosionList.getFirstAvail() as Explosion); if (_local1 != null){ _local1.reset(0, 0); }; return (_local1); } } }//package
Section 285
//OgreController (OgreController) package { import flash.geom.*; import org.flixel.*; public class OgreController extends ActorController { public const STATE_PATROL:uint = 1; public const STATE_IDLE:uint = 0; public const STATE_DEATH:uint = 3; public const STATE_ATTACK:uint = 2; public var state:uint; public var tertiaryAttack:Attack;// = null public var elaspedSinceTertiary:Number;// = 10 override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (40 + (10 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.collideAttack.setDamage(((_arg1 / 5) + 1), 24); this.actor.experience = (500 + (100 * (_arg1 - 1))); } override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.loadGraphic(AssetsG.ogreImg, true, true, 77, 56); this.actor.addAnimation("idle", [0, 0], 8, true); this.actor.addAnimation("run", [1, 2, 3, 4, 5, 6], 8, true); this.actor.addAnimation("attack", [16, 17, 18, 19, 20, 21], 8, true); this.actor.addAnimation("surprise", [22, 23, 24, 24, 24, 24], 8, true); this.actor.addAnimation("death", [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], 6, false); this.actor.addAnimation("dead", [39], 1, true); this.actor.facing = FlxSprite.LEFT; this.actor.offsetLeft.x = 37; this.actor.offsetLeft.y = 2; this.actor.offsetRight.x = 4; this.actor.offsetRight.y = 2; this.actor.bulletPointRight.x = 50; this.actor.bulletPointRight.y = 37; this.actor.bulletPointLeft.x = -20; this.actor.bulletPointLeft.y = 37; this.actor.width = 37; this.actor.height = 54; this.actor.runSpeed = (UtilsG.dice(2, 4) * 100); this.actor.maxVelocity.x = 50; this.actor.jumpPower = -100; this.actor.energyMax = 200; this.actor.energyCurrent = this.actor.energyMax; this.actor.drag.x = 9001; this.state = STATE_IDLE; this.enemyType = SaveData.ENEMY_OGRE; this.actor.primaryAttack = new AttackGuillotine(this.actor); this.actor.primaryAttack.cooldown = 1.8; this.actor.secondaryAttack = new AttackShotgun(this.actor); this.actor.secondaryAttack.cooldown = 2; this.tertiaryAttack = new AttackBomb(this.actor); this.tertiaryAttack.cooldown = 2; this.actor.collideAttack = new Attack(this.actor); this.actor.addAnimationCallback(this.actor.AnimationCallback); this.actor.DeriveStats(); } override public function hitLeft(_arg1:FlxObject, _arg2:Number):Boolean{ if ((_arg1 is Entity) == false){ if (this.actor.velocity.x < 0){ this.actor.facing = FlxSprite.LEFT; this.actor.preferredDirection = FlxSprite.LEFT; this.actor.offset = this.actor.offsetLeft; } else { this.actor.facing = FlxSprite.RIGHT; this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.offset = this.actor.offsetRight; }; }; return (true); } override public function update():void{ this.elaspedSinceTertiary = (this.elaspedSinceTertiary + FlxG.elapsed); var _local1:Point = new Point(EatG.PC.x, EatG.PC.y); var _local2:Point = new Point(this.actor.x, this.actor.y); var _local3:Point = new Point((_local1.x - _local2.x), (_local1.y - _local2.y)); switch (this.state){ case STATE_IDLE: if (_local3.length < 300){ this.state = STATE_PATROL; }; break; case STATE_PATROL: if (_local3.length < 200){ if (_local3.x < 0){ this.actor.facing = FlxSprite.LEFT; this.actor.preferredDirection = FlxSprite.LEFT; this.actor.offset = this.actor.offsetLeft; } else { this.actor.facing = FlxSprite.RIGHT; this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.offset = this.actor.offsetRight; }; this.state = STATE_ATTACK; this.actor.PerformAction("MOVE FORWARD"); } else { this.actor.PerformAction("MOVE FORWARD"); }; break; case STATE_ATTACK: this.actor.PerformAction("MELEE ATTACK"); this.actor.PerformAction("FIRE PROJECTILE"); this.state = STATE_PATROL; break; case STATE_DEATH: if (actor.health > 0){ state = STATE_IDLE; }; break; default: break; }; } } }//package
Section 286
//PlayerCharacterController (PlayerCharacterController) package { import org.flixel.*; public class PlayerCharacterController extends ActorController { public const PlayerHasControl:Boolean = true; override public function update():void{ if (this.PlayerHasControl == false){ this.Perceptron(); return; }; if (((((FlxG.keys.pressed("LEFT")) || (FlxG.keys.pressed("A")))) && ((this.actor.dervishing == false)))){ this.actor.preferredDirection = FlxSprite.LEFT; this.actor.facing = FlxSprite.LEFT; } else { if (((((FlxG.keys.pressed("RIGHT")) || (FlxG.keys.pressed("D")))) && ((this.actor.dervishing == false)))){ this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.facing = FlxSprite.RIGHT; }; }; if (((FlxG.keys.pressed("UP")) || (FlxG.keys.pressed("W")))){ this.actor.lookingUp = true; } else { this.actor.lookingUp = false; }; if (((((FlxG.keys.pressed("DOWN")) || (FlxG.keys.pressed("S")))) && ((this.actor.lookingUp == false)))){ this.actor.lookingDown = true; } else { this.actor.lookingDown = false; }; if (((((FlxG.keys.pressed("LEFT")) || (FlxG.keys.pressed("A")))) && ((this.actor.climbing == false)))){ this.actor.preferredDirection = FlxSprite.LEFT; this.actor.PerformAction("MOVE FORWARD"); this.actor.offset = this.actor.offsetLeft; } else { if (((((FlxG.keys.pressed("RIGHT")) || (FlxG.keys.pressed("D")))) && ((this.actor.climbing == false)))){ this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.PerformAction("MOVE FORWARD"); this.actor.offset = this.actor.offsetRight; } else { if (((((FlxG.keys.pressed("UP")) || (FlxG.keys.pressed("W")))) && ((this.actor.climbing == true)))){ this.actor.PerformAction("CLIMB UP"); } else { if (((((FlxG.keys.pressed("DOWN")) || (FlxG.keys.pressed("S")))) && ((this.actor.climbing == true)))){ this.actor.PerformAction("CLIMB DOWN"); } else { this.actor.PerformAction("STOP MOVING"); }; }; }; }; if (((FlxG.keys.justPressed("Z")) || (FlxG.keys.justPressed("SPACE")))){ this.actor.PerformAction("JUMP"); }; if (((FlxG.keys.justPressed("X")) || (FlxG.keys.pressed("K")))){ this.actor.PerformAction("MELEE ATTACK"); }; if (((FlxG.keys.pressed("C")) || (FlxG.keys.pressed("L")))){ this.actor.PerformAction("FIRE PROJECTILE"); } else { this.actor.dervishing = false; this.actor.facing = this.actor.preferredDirection; }; } override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.maxVelocity.x = 125; this.actor.runSpeed = (8 * this.actor.maxVelocity.x); this.actor.drag.x = (8 * this.actor.runSpeed); this.actor.jumpPower = -300; this.actor.gravity = this.actor.NormalGravity; this.actor.damageCoolDown = 1; if (EatG.CurrentOrg == EatG.ORC){ this.actor.loadGraphic(AssetsG.guyOrcImg, true, true, 22, 19); } else { if (EatG.CurrentOrg == EatG.SHADOWMONSTER){ this.actor.loadGraphic(AssetsG.guyShadowImg, true, true, 22, 19); } else { this.actor.loadGraphic(AssetsG.guyImg, true, true, 22, 19); }; }; this.actor.width = this.actor.dimensions.x; this.actor.height = this.actor.dimensions.y; this.actor.offset = this.actor.offsetRight; this.actor.facing = FlxSprite.RIGHT; this.actor.prop = null; this.actor.sword = NonEntityManager.GetWeapon(); if (this.actor.sword != null){ this.actor.sword.owner = this.actor; this.actor.sword.createGraphic(40, 24, 33489151); this.actor.sword.visible = false; this.actor.swordOffsetLeft.x = -16; this.actor.swordOffsetLeft.y = -8; this.actor.swordOffsetRight.x = -8; this.actor.swordOffsetRight.y = -8; this.actor.sword.addAnimation("idle", [0]); this.actor.sword.addAnimation("run", [0, 1, 1], 12, false); this.actor.sword.play("idle"); this.actor.sword.addAnimationCallback(this.actor.sword.AttackAnimationCallback); }; this.actor.bulletPointRightDown = new FlxPoint(this.actor.bulletPointRightUp.x, 12); this.actor.bulletPointLeftDown = new FlxPoint(this.actor.bulletPointLeftUp.x, 12); this.actor.addAnimation("idle", [0, 0]); this.actor.addAnimation("blink", [1, 2, 3], 6, false); this.actor.addAnimation("run", [4, 5, 6, 7], 14, true); this.actor.addAnimation("attack", [8, 9, 10, 11, 12, 13, 14, 14, 14], 22, false); this.actor.addAnimation("idle up", [16, 16]); this.actor.addAnimation("blink up", [17, 18, 19], 6, false); this.actor.addAnimation("run up", [20, 21, 22, 23], 14, true); this.actor.addAnimation("attack up", [24, 25, 26, 27, 28, 29, 30, 30, 30], 22, false); this.actor.addAnimation("attack down", [49, 50, 51, 52, 53, 54, 55], 22, false); this.actor.addAnimation("jump pre", [32, 33, 34], 24, false); this.actor.addAnimation("jump raising", [35, 35]); this.actor.addAnimation("jump falling", [36, 36]); this.actor.addAnimation("jump landing", [37, 38, 39], 24, false); this.actor.addAnimation("climbing", [44, 45, 46, 47], 12); this.actor.addAnimation("climbing pause", [47, 47]); this.actor.addAnimation("turn inside", [40, 41, 42, 43], 12, false); this.actor.addAnimation("casting", [1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 14, 14], 24, false); this.actor.addAnimation("casting up", [17, 18, 19, 24, 25, 26, 27, 28, 29, 30, 30, 30], 24, false); this.actor.addAnimation("casting down", [49, 50, 51, 52, 53, 54, 55, 55, 55, 55], 24, false); this.actor.play("idle"); this.actor.addAnimationCallback(this.actor.AnimationCallback); if (this.PlayerHasControl == false){ this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.PerformAction("MOVE FORWARD"); }; } } }//package
Section 287
//PoisonArrowController (PoisonArrowController) package { public class PoisonArrowController extends ArrowController { override public function init(_arg1:Projectile):void{ super.init(_arg1); this.projectile.collisionEvent = StatusEffect.EventPoison; this.projectile.loadGraphic(AssetsG.arrowImg, false, true, 8, 3); this.projectile.Arcs = true; this.projectile.velocity.x = 300; this.projectile.velocity.y = -60; } override public function SetupEmitter():void{ this.projectile.emitter = NonEntityManager.GetEmitter(); if (this.projectile.emitter == null){ return; }; this.projectile.emitter.SpritePool = NonEntityManager.GetPoisonArrowSparkle(); this.projectile.emitter.delay = 0.01; this.projectile.emitter.minParticleSpeed.y = -100; this.projectile.emitter.maxParticleSpeed.y = 100; this.projectile.emitter.x = (this.projectile.x + (this.projectile.width / 2)); this.projectile.emitter.y = (this.projectile.y + (this.projectile.height / 2)); this.projectile.emitter.start(false, 0.01); } } }//package
Section 288
//Preloader (Preloader) package { import org.flixel.*; import CPMStar.*; public class Preloader extends FlxPreloader { private var canHasAds:Boolean;// = true public static var ad:AdLoader; public function Preloader(){ this.className = "Main"; this.minDisplayTime = 2; } override protected function update(_arg1:Number):void{ super.update(_arg1); } override protected function create():void{ super.create(); if (!EatG.KONG){ if (loaderInfo.url.indexOf("3.xiaoyouxl.cn") != -1){ canHasAds = false; } else { if (loaderInfo.url.indexOf("files.game.com.cn") != -1){ canHasAds = false; } else { if (loaderInfo.url.indexOf("files.game.asia") != -1){ canHasAds = false; } else { if (loaderInfo.url.indexOf("www8.agame.com") != -1){ canHasAds = false; }; }; }; }; if (canHasAds){ _slot1.ad = new AdLoader("2070Q0EBE60B2"); _slot1.ad.x = (_width / 2); _slot1.ad.y = (_height / 2); stage.addChild(_slot1.ad); }; }; } } }//package
Section 289
//Projectile (Projectile) package { import org.flixel.*; public class Projectile extends Entity { public var collisionEvent:Function;// = null public var damageType:uint; public var damageMod:int;// = 0 public var bouncesOnContact:Boolean;// = false public var controller:ProjectileController; public var launcher:Entity; public var arcs:Boolean; public var victims:Array; public var emitter:Emitter; public var damageDieSize:int;// = 6 public var damageDieCount:int;// = 1 public static const SpeedFireball:uint = 250; public static const SpeedMissile:uint = 1200; public static const SpeedWordblast:uint = 100; public static const SpeedArrow:uint = 300; public static const SpeedBullet:uint = 300; public static const SpeedShadowbolt:uint = 150; public function Projectile(_arg1:int=0, _arg2:int=0, _arg3:Boolean=true){ damageType = Actor.DAMAGE_PHYSICAL; victims = []; super(_arg1, _arg2); this.health = 1; this.arcs = _arg3; if (this.arcs == true){ this.acceleration.y = 800; }; } public function get Arcs():Boolean{ return (this.arcs); } public function get Controller():ProjectileController{ return (this.controller); } override public function hurt(_arg1:Number):void{ super.hurt(_arg1); } public function set Arcs(_arg1:Boolean):void{ this.arcs = _arg1; if (this.arcs == true){ this.acceleration.y = 800; } else { this.acceleration.y = 0; }; } override public function OnOverlap(_arg1:FlxObject):void{ var _local5:int; if (_arg1 == this.launcher){ return; }; if ((_arg1 is Actor) == false){ return; }; var _local2:Actor = (_arg1 as Actor); var _local3:int = this.victims.length; var _local4:int; while (_local4 < _local3) { if (victims[_local4] == _local2){ return; }; _local4++; }; if (((((!((this.damageDieCount == 0))) || (!((this.damageDieSize == 0))))) || (!((this.damageMod == 0))))){ _local5 = UtilsG.dice(this.damageDieCount, this.damageDieSize, this.damageMod); _local2.TakeDamage(_local5, this.damageType, this.launcher); _local2.ApplyKnockback(new FlxPoint((this.velocity.x * 2), 0)); FlxG.quake.start(0.005, 0.1); }; if (this.collisionEvent != null){ this.collisionEvent(_local2); }; if ((this.controller is MissileController)){ this.victims[this.victims.length] = _local2; } else { this.hurt(1); }; } override public function update():void{ super.update(); if (this.controller != null){ this.controller.update(); }; if (this.velocity.x > 0){ this.facing = FlxSprite.RIGHT; } else { if (this.velocity.x < 0){ this.facing = FlxSprite.LEFT; }; }; if (((!((this.emitter == null))) && ((this.emitter.active == true)))){ this.emitter.x = (this.x + (this.width / 2)); this.emitter.y = (this.y + (this.height / 2)); }; if (this.y > EatG.Level.height){ this.kill(); }; } override public function hitTop(_arg1:FlxObject, _arg2:Number):void{ if (this.collisionEvent != null){ this.collisionEvent(_arg1); }; if (this.bouncesOnContact == true){ this.velocity.y = (this.velocity.y * -1); this.damageDieCount = (this.damageDieCount / 2); if (this.damageDieCount < 1){ this.kill(); }; return; }; if ((this.controller is MissileController) == false){ this.kill(); } else { this.velocity.y = 0; this.play("vertimpact"); }; } override public function hitBottom(_arg1:FlxObject, _arg2:Number):void{ if (this.collisionEvent != null){ this.collisionEvent(_arg1); }; if (this.bouncesOnContact == true){ this.velocity.y = (this.velocity.y * -1); this.damageDieCount = (this.damageDieCount / 2); if (this.damageDieCount < 1){ this.kill(); }; return; }; if ((this.controller is MissileController) == false){ this.kill(); } else { this.velocity.y = 0; this.play("vertimpactdown"); }; } override public function render():void{ super.render(); } public function Fire():void{ this.exists = true; this.active = true; this.visible = true; this.dead = false; this.controller.SetupEmitter(); } override public function kill():void{ this.AssignDamage(0, 0); this.victims.length = 0; this.collisionEvent = null; this.launcher = null; if (this.controller != null){ if ((this.controller is WordBlastController)){ (this.controller as WordBlastController).kill(); }; this.controller.projectile = null; }; this.controller = null; if (this.emitter){ this.emitter.stop(0); this.emitter.kill(); this.emitter = null; }; this.velocity = new FlxPoint(); this.x = -100; this.y = -100; super.kill(); } public function AssignDamage(_arg1:int=1, _arg2:int=1, _arg3:int=0):void{ this.damageDieCount = _arg1; this.damageDieSize = _arg2; this.damageMod = _arg3; } override public function hitLeft(_arg1:FlxObject, _arg2:Number):void{ if (this.collisionEvent != null){ this.collisionEvent(_arg1); }; if (this.bouncesOnContact == true){ this.velocity.x = (this.velocity.x * -1); this.damageDieCount = (this.damageDieCount / 2); if (this.damageDieCount < 1){ this.kill(); }; if (this.velocity.x >= 0){ this.facing = FlxSprite.RIGHT; } else { this.facing = FlxSprite.LEFT; }; return; }; if ((this.controller is MissileController) == false){ this.kill(); } else { this.velocity.x = 0; this.play("horzimpact"); }; } public function set Controller(_arg1:ProjectileController):void{ this.controller = _arg1; if (this.controller != null){ this.controller.init(this); }; } } }//package
Section 290
//ProjectileController (ProjectileController) package { public class ProjectileController { public var projectile:Projectile; public function init(_arg1:Projectile):void{ this.projectile = _arg1; } public function update():void{ if (this.projectile.exists == false){ this.projectile = null; }; } public function SetupEmitter():void{ } } }//package
Section 291
//RiflemanController (RiflemanController) package { import org.flixel.*; public class RiflemanController extends PlayerCharacterController { override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.offsetRight = new FlxPoint(2, 1); this.actor.offsetLeft = new FlxPoint(2, 1); this.actor.offsetRightClimbing = new FlxPoint(2, 0); this.actor.offsetLeftClimbing = new FlxPoint(3, 0); if (EatG.CurrentOrg == EatG.ORC){ this.actor.loadGraphic(AssetsG.guyOrcImg, true, true, 22, 19); } else { if (EatG.CurrentOrg == EatG.SHADOWMONSTER){ this.actor.loadGraphic(AssetsG.guyShadowImg, true, true, 22, 19); } else { this.actor.loadGraphic(AssetsG.guyImg, true, true, 22, 19); }; }; this.actor.width = this.actor.dimensions.x; this.actor.height = this.actor.dimensions.y; this.actor.offset = this.actor.offsetRight; this.actor.addAnimation("idle", [0, 0]); this.actor.addAnimation("blink", [1, 2, 3], 6, false); this.actor.addAnimation("run", [4, 5, 6, 7], 14, true); this.actor.addAnimation("attack", [8, 9, 10, 11, 12, 13, 14, 14, 14], 18, false); this.actor.addAnimation("idle up", [16, 16]); this.actor.addAnimation("blink up", [17, 18, 19], 6, false); this.actor.addAnimation("run up", [20, 21, 22, 23], 14, true); this.actor.addAnimation("attack up", [24, 25, 26, 27, 28, 29, 30, 30, 30], 18, false); this.actor.addAnimation("jump pre", [32, 33, 34], 24, false); this.actor.addAnimation("jump raising", [35, 35]); this.actor.addAnimation("jump falling", [36, 36]); this.actor.addAnimation("jump landing", [37, 38, 39], 24, false); this.actor.addAnimation("climbing", [44, 45, 46, 47], 12); this.actor.addAnimation("climbing pause", [47, 47]); this.actor.addAnimation("turn inside", [40, 41, 42, 43], 12, false); this.actor.addAnimation("casting", [1, 2, 3], 6, true); this.actor.play("idle"); this.actor.addAnimationCallback(this.actor.AnimationCallback); this.actor.maxVelocity.x = 125; this.actor.runSpeed = (8 * this.actor.maxVelocity.x); this.actor.drag.x = (8 * this.actor.runSpeed); this.actor.jumpPower = -300; this.actor.gravity = this.actor.NormalGravity; this.actor.damageCoolDown = 1; this.actor.healthMax = 100; this.actor.health = this.actor.healthMax; this.actor.energyMax = 100; this.actor.energyCurrent = this.actor.energyMax; this.actor.primaryAttack = new AttackRifle(this.actor); this.actor.primaryAttack.cooldown = 0.5; this.actor.secondaryAttack = new AttackShotgun(this.actor); this.actor.secondaryAttack.cooldown = 0.4; this.actor.DeriveStats(); this.actor.RestoreGravity(this.actor.gravity); } override public function update():void{ super.update(); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (100 + (20 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.primaryAttack.setDamage((2 + _arg1), 6, _arg1); this.actor.secondaryAttack.setDamage((2 + _arg1), 4, _arg1); } } }//package
Section 292
//SaveData (SaveData) package { import org.flixel.*; public class SaveData { public static const ENEMY_INVALID:uint = 0; public static const ENEMY_OGRE:uint = 7; public static const ENEMY_FLYING_SKULL:uint = 4; public static const ENEMY_MIN_MOM:uint = 2; public static const ENEMY_MIN_MON:uint = 1; public static const CLASS_RIFLEMAN:uint = 5; public static const ENEMY_FLAME_TRAP:uint = 11; public static const ENEMY_WRAITH:uint = 8; public static const CLASS_FIGHTER:uint = 2; public static const CLASS_ARCHER:uint = 3; public static const ENEMY_SPIKE:uint = 9; public static const ENEMY_SMOLDERING_MAN:uint = 3; public static const CLASS_MAX:uint = 6; public static const CLASS_COMMONER:uint = 1; public static const ENEMY_SHADOW_MAGE:uint = 6; public static const ENEMY_MAX:uint = 12; public static const CLASS_INVALID:uint = 0; public static const CLASS_MAGE:uint = 4; public static const ENEMY_ARROW_TRAP:uint = 10; public static const ENEMY_CHANDELIER:uint = 5; public static var sessionsStats:Array = []; public static var ogreKills:uint; public static var minMonKills:uint; public static var MageScores:Array = []; public static var WarriorScores:Array = []; public static var flyingSkullKills:uint; public static var RiflemanScores:Array = []; public static var lastRunScore:Object; public static function TotalKills(_arg1:int=12):int{ var _local3:Object; var _local4:Object; var _local5:Object; var _local6:uint; if (_arg1 == 0){ return (-1); }; var _local2:uint; for each (_local3 in sessionsStats) { _local4 = _local3.playsStats[(_local3.playsStats.length - 1)]; for each (_local5 in _local4.areaStats) { if (_arg1 == ENEMY_MAX){ for each (_local6 in _local5.enemiesKilled) { _local2 = (_local2 + _local6); }; } else { _local2 = (_local2 + _local5.enemiesKilled[_arg1]); }; }; }; return (_local2); } public static function SaveScores():void{ WarriorScores.sort((Array.NUMERIC | Array.DESCENDING)); RiflemanScores.sort((Array.NUMERIC | Array.DESCENDING)); MageScores.sort((Array.NUMERIC | Array.DESCENDING)); minMonKills = (minMonKills + (TotalKills(ENEMY_MIN_MOM) + TotalKills(ENEMY_MIN_MON))); ogreKills = (ogreKills + TotalKills(ENEMY_OGRE)); flyingSkullKills = (flyingSkullKills + TotalKills(ENEMY_FLYING_SKULL)); if (WarriorScores.length > 5){ WarriorScores.length = 5; }; if (RiflemanScores.length > 5){ RiflemanScores.length = 5; }; if (MageScores.length > 5){ MageScores.length = 5; }; var _local1:FlxSave = new FlxSave(); _local1.bind("eat_riot"); _local1.write("WarriorScores", WarriorScores); _local1.write("RiflemanScores", RiflemanScores); _local1.write("MageScores", MageScores); _local1.write("MinMonKills", minMonKills); _local1.write("OgreKills", ogreKills); _local1.write("FlyingSkullKills", flyingSkullKills); _local1.forceSave(); } public static function TweetScore():void{ var _local1 = (("I just got a score of " + Math.floor(SaveData.lastRunScore.total)) + " leading the revolution as a "); switch (SaveData.lastRunScore.characterType){ case SaveData.CLASS_FIGHTER: _local1 = (_local1 + "Swordsman"); break; case SaveData.CLASS_RIFLEMAN: _local1 = (_local1 + "Rifleman"); break; case SaveData.CLASS_MAGE: _local1 = (_local1 + "Magician"); }; _local1 = (_local1 + " in Epic Adventure Time: Revolt in Ogre Town | www.epicadventuretime.com"); FlxU.openURL(("http://twitter.com/home?status=" + _local1)); } public static function LoadScores():void{ var _local1:FlxSave = new FlxSave(); _local1.bind("eat_riot"); WarriorScores = (_local1.read("WarriorScores") as Array); RiflemanScores = (_local1.read("RiflemanScores") as Array); MageScores = (_local1.read("MageScores") as Array); minMonKills = (_local1.read("MinMonKills") as uint); ogreKills = (_local1.read("OgreKills") as uint); flyingSkullKills = (_local1.read("flyingSkullKills") as uint); if (WarriorScores == null){ WarriorScores = []; }; if (RiflemanScores == null){ RiflemanScores = []; }; if (MageScores == null){ MageScores = []; }; } public static function LoadInfo():void{ } public static function DumpInfo():void{ } public static function NewSession():void{ SaveData.sessionsStats[SaveData.sessionsStats.length] = new StatsSession(); } public static function get ThisSession():StatsSession{ return (SaveData.sessionsStats[(SaveData.sessionsStats.length - 1)]); } } }//package
Section 293
//ShadowBoltController (ShadowBoltController) package { import org.flixel.*; public class ShadowBoltController extends ProjectileController { public var lifeTimeCounter:Number;// = 0 public var lifeTime:Number;// = 2 override public function init(_arg1:Projectile):void{ super.init(_arg1); this.projectile.loadRotatedGraphic(AssetsG.shadowboltImg, 16, -1, false, false); this.projectile.Arcs = false; this.projectile.bouncesOnContact = false; this.projectile.damageType = Actor.DAMAGE_MAGICAL; this.projectile.collisionEvent = null; } override public function SetupEmitter():void{ this.projectile.emitter = NonEntityManager.GetEmitter(); if (this.projectile.emitter == null){ return; }; this.projectile.emitter.SpritePool = NonEntityManager.GetShadowBoltEffect(); this.projectile.emitter.minParticleSpeed.y = -100; this.projectile.emitter.maxParticleSpeed.y = 50; this.projectile.emitter.x = (this.projectile.x + (this.projectile.width / 2)); this.projectile.emitter.y = (this.projectile.y + (this.projectile.height / 2)); this.projectile.emitter.start(false, 0.01); } override public function update():void{ var _local1:Number; super.update(); this.lifeTimeCounter = (this.lifeTimeCounter + FlxG.elapsed); this.projectile.angle = (this.projectile.angle + (FlxG.elapsed * 720)); if ((((this.lifeTimeCounter >= this.lifeTime)) || (!(this.projectile.onScreen())))){ this.projectile.kill(); }; } } }//package
Section 294
//ShadowMageController (ShadowMageController) package { import flash.geom.*; import org.flixel.*; public class ShadowMageController extends ActorController { public var doesntMove:Boolean;// = false override public function update():void{ var _local1:Actor = EatG.PC; var _local2:Point = new Point(_local1.x, _local1.y); var _local3:Point = new Point(this.actor.x, this.actor.y); var _local4:Point = new Point((_local2.x - _local3.x), (_local2.y - _local3.y)); if (_local4.x < 0){ actor.facing = FlxSprite.LEFT; } else { actor.facing = FlxSprite.RIGHT; }; var _local5:Number = ((_local4.x)<0) ? -(_local4.x) : _local4.x; if (_local5 < 150){ this.actor.PerformAction("FIRE PROJECTILE", _local1); }; if ((((_local5 < 75)) && ((doesntMove == false)))){ if (_local4.x < 0){ this.actor.preferredDirection = FlxSprite.RIGHT; this.actor.PerformAction("MOVE FORWARD"); } else { this.actor.preferredDirection = FlxSprite.LEFT; this.actor.PerformAction("MOVE FORWARD"); }; } else { this.actor.PerformAction("STOP MOVING"); this.actor.velocity.x = 0; }; } override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.loadGraphic(AssetsG.shadowMageImg, true, true, 19, 19); this.actor.addAnimation("idle", [0, 0]); this.actor.addAnimation("run", [1, 2, 3, 4], 14, true); this.actor.addAnimation("attack", [5, 6, 7, 8, 9, 10, 11, 12, 13], 20, false); this.actor.play("idle"); this.actor.addAnimationCallback(this.actor.AnimationCallback); this.actor.facing = FlxSprite.LEFT; this.actor.offsetRight = new FlxPoint(2, 1); this.actor.offsetLeft = new FlxPoint(2, 1); this.actor.offset = this.actor.offsetLeft; this.actor.runSpeed = (UtilsG.dice(2, 4) * 100); this.actor.maxVelocity.x = UtilsG.dice(2, 25, 50); this.actor.acceleration.y = 400; this.actor.jumpPower = -(UtilsG.dice(1, 50, 100)); this.actor.width = 13; this.actor.height = 18; this.actor.secondaryAttack = new AttackShadowBolt(this.actor); this.actor.secondaryAttack.cooldown = 1; this.enemyType = SaveData.ENEMY_SHADOW_MAGE; this.actor.DeriveStats(); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (50 + (25 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.experience = (160 + (20 * (_arg1 - 1))); this.actor.secondaryAttack.setDamage(2, 8, (10 * (_arg1 - 1))); } } }//package
Section 295
//SmolderingManController (SmolderingManController) package { import flash.geom.*; import org.flixel.*; public class SmolderingManController extends ActorController { public var oldSpeed:Number;// = 0 override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.offsetLeft.x = 3; this.actor.offsetLeft.y = 1; this.actor.offsetRight.x = 2; this.actor.offsetRight.y = 1; this.actor.loadGraphic(AssetsG.smanImg, true, true, 20, 17); this.actor.width = 15; this.actor.height = 16; this.actor.offset.x = 2; this.actor.offset.y = 1; this.actor.addAnimation("idle", [0, 0]); this.actor.addAnimation("run", [1, 2, 3, 4], 14, true); this.actor.addAnimation("attack", [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0], 24, false); this.actor.play("idle"); this.actor.addAnimationCallback(this.actor.AnimationCallback); this.actor.facing = FlxSprite.LEFT; this.actor.maxVelocity.x = UtilsG.dice(2, 25, 50); this.oldSpeed = this.actor.maxVelocity.x; this.actor.runSpeed = (this.actor.maxVelocity.x * 800); this.actor.acceleration.y = 400; this.actor.jumpPower = -(UtilsG.dice(1, 50, 100)); this.actor.primaryAttack = new AttackCharge(this.actor); this.actor.primaryAttack.cooldown = 1.4; this.actor.width = 13; this.actor.height = 15; this.actor.offset.x = 1; this.actor.offset.y = 1; this.actor.sword = NonEntityManager.GetWeapon(); if (this.actor.sword != null){ this.actor.sword.createGraphic(20, 17, 33489151); this.actor.sword.visible = false; this.actor.sword.owner = this.actor; this.actor.swordOffsetLeft = new Point(); this.actor.swordOffsetRight = new Point(); this.actor.sword.addAnimation("idle", [0]); this.actor.sword.addAnimation("run", [0, 1, 1], 12, false); this.actor.sword.addAnimationCallback(this.actor.sword.AttackAnimationCallback); this.actor.sword.play("idle"); this.actor.sword.collisionEvent = StatusEffect.EventBurn; }; this.enemyType = SaveData.ENEMY_SMOLDERING_MAN; this.actor.DeriveStats(); } override public function update():void{ var _local1:Point = new Point(EatG.PC.x, EatG.PC.y); var _local2:Point = new Point(this.actor.x, this.actor.y); var _local3:Point = new Point((_local1.x - _local2.x), (_local1.y - _local2.y)); if (_local3.length < 48){ if (actor.attacking == true){ if (_local3.x < 0){ this.actor.facing = FlxSprite.LEFT; this.actor.preferredDirection = FlxSprite.LEFT; } else { this.actor.facing = FlxSprite.RIGHT; this.actor.preferredDirection = FlxSprite.RIGHT; }; }; this.actor.PerformAction("MELEE ATTACK"); } else { super.update(); this.actor.PerformAction("MOVE FORWARD"); }; if (this.actor.attacking == true){ this.actor.maxVelocity.x = (this.oldSpeed * 2); } else { this.actor.maxVelocity.x = this.oldSpeed; }; } override public function hitLeft(_arg1:FlxObject, _arg2:Number):Boolean{ if (this.actor.jumping == false){ if (this.actor.facing == FlxSprite.RIGHT){ this.actor.preferredDirection = FlxSprite.LEFT; } else { this.actor.preferredDirection = FlxSprite.RIGHT; }; }; return (true); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (70 + (20 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.experience = (200 + (20 * (_arg1 - 1))); this.actor.primaryAttack.setDamage(2, 5, (5 * (_arg1 - 1))); } } }//package
Section 296
//Spikes (Spikes) package { import org.flixel.*; public class Spikes extends Entity { public function Spikes(_arg1:int=0, _arg2:int=0){ super(_arg1, _arg2); this.createGraphic(16, 8, 2298413056); this.visible = false; } override public function OnOverlap(_arg1:FlxObject):void{ var _local2:Actor; if ((_arg1 is Actor)){ _local2 = (_arg1 as Actor); if ((_local2.Controller is WraithController)){ return; }; _local2.SprayGibs(100); _local2.SprayGibs(100); _local2.SprayGibs(100); _local2.kill(); }; } } }//package
Section 297
//StateCredits (StateCredits) package { import org.flixel.*; public class StateCredits extends FlxState { public var player:Actor; public var level:TileMap; private static var creditsRoom:Class = StateCredits_creditsRoom; override public function update():void{ super.update(); SaveData.ThisSession.ElapsedTimeInMenues = (SaveData.ThisSession.ElapsedTimeInMenues + FlxG.elapsed); FlxU.overlap(this.player, EntityManager.LadderList, this.Overlaps); this.level.collide(this.player); if (this.player.y > (this.level.height - 8)){ FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; } public function Overlaps(_arg1:FlxObject, _arg2:FlxObject):void{ if ((_arg2 is Entity)){ (_arg2 as Entity).OnOverlap(_arg1); }; } public function shadowText(_arg1:int, _arg2:int, _arg3:String, _arg4:uint=4294967295):void{ var _local5:Text; _local5 = new Text((_arg1 + 1), (_arg2 + 1), "Invalid"); _local5.text = _arg3; _local5.color = 4278190080; this.add(_local5); _local5 = new Text(_arg1, _arg2, "Invalid"); _local5.text = _arg3; _local5.color = _arg4; this.add(_local5); } public function credits():void{ var _local1:uint = 4294967295; this.shadowText((8 * TileMap.TW), (90 * TileMap.TH), "Mindfield Media is...", _local1); this.shadowText((8 * TileMap.TW), (80 * TileMap.TH), "Paul Harrison\nCode - Design - Enabling", _local1); this.shadowText((8 * TileMap.TW), (70 * TileMap.TH), "Jeremy Jorgensen\nCode - Design - Art", _local1); this.shadowText((8 * TileMap.TW), (60 * TileMap.TH), "William Marsden\nCode - Design - Audio", _local1); this.shadowText((8 * TileMap.TW), (50 * TileMap.TH), "Matt Scates\nProduction - Design - Business", _local1); this.shadowText((8 * TileMap.TW), (40 * TileMap.TH), "Artwork Created By\n Yu Gao\nwww.eworkproxy.com", _local1); this.shadowText((8 * TileMap.TW), (30 * TileMap.TH), " Special Thanks To\nOur Families and loved ones\n and...\nManagement Cat", _local1); this.shadowText(((6 * TileMap.TW) + 8), (6 * TileMap.TH), "Thanks for playing!", _local1); } public function onFadeComplete():void{ FlxG.state = new StateMenu(); if (this.player.climbing == true){ (FlxG.state as StateMenu).usingLadder = true; }; (FlxG.state as StateMenu).spawnLocation = 1; } override public function destroy():void{ this.defaultGroup.members = []; super.destroy(); } override public function create():void{ super.create(); this.useHandCursor = true; FlxState.bgColor = 4281576447; EatG.music.switchTheme(4); NonEntityManager.Reset(); EntityManager.Reset(); this.add(new FlxSprite(0, 0, AssetsG.SkyImg)).scrollFactor = new FlxSprite(); var _local1:Map = new Map(); _local1.Load(new StateCredits.creditsRoom()); this.level = (_local1.layers.members[0] as TileMap); this.level.drawIndex = 0; this.level.startingIndex = 0; this.level.collideIndex = 192; this.add(this.level); LevelManager.placeEnviromentalObjects(this.level); this.add(EntityManager.ActorNonMapList); this.add(EntityManager.ActorList); this.add(EntityManager.FallingObjectList); this.add(EntityManager.HeadList); this.add(EntityManager.LadderList); this.add(EntityManager.LootList); this.add(EntityManager.SpikesList); this.add(EntityManager.TriggerList); this.add(EntityManager.TurretList); this.add(NonEntityManager.Emitters); this.add(NonEntityManager.Explosions); this.add(NonEntityManager.FloatingTexts); this.add(NonEntityManager.Projectiles); this.add(NonEntityManager.StatusEffects); this.add(NonEntityManager.Props); this.add(NonEntityManager.Weapons); this.player = new Actor((3 * TileMap.TW), (this.level.height - (2 * TileMap.TH))); this.player.Controller = new PlayerCharacterController(); this.add(this.player); this.player.climbing = true; FlxG.follow(this.player); FlxG.followAdjust(1, 1); FlxG.followBounds(0, 0, this.level.width, this.level.height); this.credits(); FlxG.flash.start(4281545523, 0.5); } public function get ThisMap():TileMap{ return (this.level); } } }//package
Section 298
//StateCredits_creditsRoom (StateCredits_creditsRoom) package { import mx.core.*; public class StateCredits_creditsRoom extends ByteArrayAsset { } }//package
Section 299
//StateExposition (StateExposition) package { import org.flixel.*; public class StateExposition extends FlxState { private var level:TileMap; private var manaMeter:Meter; private var healthMeter:Meter; private var collidesVsActors:FlxGroup; private var swordsmanText:FlxText; private var objects:FlxGroup; private var magicianText:FlxText; private var collidesVsPlayerOnly:FlxGroup; public var player:Actor; private var allActors:FlxGroup; private var collidesVsMap:FlxGroup; private var exitDoor:FlxSprite; private var riflemanText:FlxText; private static var tutorial:Class = StateExposition_tutorial; public function StateExposition(){ objects = new FlxGroup(); super(); } public function onFadeComplete():void{ FlxG.state = new StateMenu(); } public function get Level():TileMap{ return (this.level); } override public function update():void{ super.update(); FlxU.overlap(EatG.PC, this.collidesVsPlayerOnly, this.Overlaps); FlxU.overlap(allActors, this.collidesVsActors, this.Overlaps); FlxU.overlap(EntityManager.HeadList, EntityManager.FallingObjectList, this.Overlaps); FlxU.collide(EntityManager.ActorList, EntityManager.ActorList); FlxU.collide(this.level, this.collidesVsMap); this.healthMeter.max = this.player.healthMax; this.healthMeter.current = this.player.health; this.manaMeter.max = this.player.energyMax; this.manaMeter.current = this.player.energyCurrent; if (this.player.dead == true){ FlxG.followTarget = null; FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; if ((((this.player.overlaps(this.exitDoor) == true)) && (((FlxG.keys.justPressed("UP")) || (FlxG.keys.pressed("W")))))){ FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; } override public function destroy():void{ this.defaultGroup.members = []; super.destroy(); } public function Overlaps(_arg1:FlxObject, _arg2:FlxObject):void{ if ((_arg2 is Entity)){ (_arg2 as Entity).OnOverlap(_arg1); }; } override public function create():void{ super.create(); NonEntityManager.Reset(); EntityManager.Reset(); this.useHandCursor = true; FlxState.bgColor = 4281576447; this.add(new FlxSprite(0, 0, AssetsG.SkyImg)).scrollFactor = new FlxSprite(); var _local1:Map = new Map(); _local1.Load(new StateExposition.tutorial()); this.level = (_local1.layers.members[0] as TileMap); this.level.drawIndex = 0; this.level.startingIndex = 0; this.level.collideIndex = 192; this.add(this.level); LevelManager.placeEnviromentalObjects(this.level); var _local2:Text = new Text((26 * 16), (7 * 16), "Invalid"); _local2.alignment = "left"; _local2.text = "\n Ogre Town was a haven\n for freethinkers and\n capitalists. The people\n could never agree on\n anything"; _local2.color = 4294967294; this.add(_local2); _local2 = new Text((45 * 16), (7 * 16), "Invalid"); _local2.alignment = "left"; _local2.text = "\n Then one day the ogres\n came. They brought\n evil magics and order to\n the people of Ogre Town."; _local2.color = 4294967294; this.add(_local2); _local2 = new Text((66 * 16), (5 * 16), "Invalid"); _local2.alignment = "left"; _local2.text = "\n Some of the people\n sided with the Ogres.\n Their bodies were\n corrupted by flame,\n darkness, and hunger."; _local2.color = 4294967294; this.add(_local2); _local2 = new Text((86 * 16), (4 * 16), "Invalid"); _local2.alignment = "left"; _local2.text = "\n Even the dead could\n not rest. The skulls\n of those who died float\n throughout the town\n enforcing order."; _local2.color = 4294967294; this.add(_local2); _local2 = new Text(((102 * 16) - 8), (7 * 16), "Invalid"); _local2.alignment = "left"; _local2.text = "\n There are those who\n would take up sword,\n firearm, or wand to storm\n the castle of everchanging\n aspect and return\n freedom to Ogre Town."; _local2.color = 4294967294; this.add(_local2); this.add(EntityManager.ActorNonMapList); this.add(EntityManager.ActorList); this.add(EntityManager.FallingObjectList); this.add(EntityManager.HeadList); this.add(EntityManager.LadderList); this.add(EntityManager.LootList); this.add(EntityManager.SpikesList); this.add(EntityManager.TriggerList); this.add(EntityManager.TurretList); this.add(NonEntityManager.Emitters); this.add(NonEntityManager.Explosions); this.add(NonEntityManager.FloatingTexts); this.add(NonEntityManager.Projectiles); this.add(NonEntityManager.StatusEffects); this.add(NonEntityManager.Props); this.add(NonEntityManager.Weapons); this.exitDoor = new FlxSprite(((115 * TileMap.TW) + 8), ((14 * TileMap.TH) - 8)); this.exitDoor.createGraphic(16, 24, 4294967295); this.exitDoor.visible = false; this.add(this.exitDoor); this.allActors = new FlxGroup(); this.allActors.add(EntityManager.ActorList); this.allActors.add(EntityManager.ActorNonMapList); this.collidesVsPlayerOnly = new FlxGroup(); this.collidesVsPlayerOnly.add(EntityManager.ActorList); this.collidesVsPlayerOnly.add(EntityManager.ActorNonMapList); this.collidesVsPlayerOnly.add(EntityManager.LadderList); this.collidesVsPlayerOnly.add(EntityManager.LootList); this.collidesVsActors = new FlxGroup(); this.collidesVsActors.add(NonEntityManager.weaponList); this.collidesVsActors.add(NonEntityManager.projectileList); this.collidesVsActors.add(NonEntityManager.explosionList); this.collidesVsActors.add(EntityManager.FallingObjectList); this.collidesVsActors.add(EntityManager.SpikesList); this.collidesVsActors.add(EntityManager.TriggerList); this.collidesVsMap = new FlxGroup(); this.collidesVsMap.add(EntityManager.ActorList); this.collidesVsMap.add(EntityManager.LootList); this.collidesVsMap.add(NonEntityManager.projectileList); this.collidesVsMap.add(NonEntityManager.emitterList); healthMeter = new Meter(1, 1); healthMeter.scrollFactor = new FlxPoint(); healthMeter.loadGraphic(AssetsG.healthImg); healthMeter.fillColor = Meter.FILL_RED; healthMeter.fillOffset = new FlxPoint(11, 4); healthMeter.fillWidthMax = 81; healthMeter.current = (healthMeter.max = 100); this.add(healthMeter); manaMeter = new Meter(1, 11); manaMeter.scrollFactor = new FlxPoint(); manaMeter.loadGraphic(AssetsG.energyImg); manaMeter.fillColor = Meter.FILL_BLUE; manaMeter.fillOffset = new FlxPoint(11, 3); manaMeter.fillWidthMax = 81; manaMeter.current = (manaMeter.max = 100); this.add(manaMeter); this.player = EntityManager.GetActor(); player.x = ((2 * TileMap.TW) + 8); player.y = (11 * TileMap.TH); this.player.Controller = new RiflemanController(); this.player.health = (this.player.healthMax = 300); this.player.preferredDirection = (this.player.facing = FlxSprite.RIGHT); FlxG.follow(this.player); FlxG.followAdjust(1, 0); FlxG.followBounds(0, 0, this.level.width, this.level.height); FlxG.flash.start(4278190080, 0.5); } } }//package
Section 300
//StateExposition_tutorial (StateExposition_tutorial) package { import mx.core.*; public class StateExposition_tutorial extends ByteArrayAsset { } }//package
Section 301
//StateMenu (StateMenu) package { import org.flixel.*; import spill.localisation.*; import mochi.as3.*; public class StateMenu extends FlxState { public var scoreText:Text; public var level:TileMap; private var objects:FlxGroup; public var factionHelpBox:FlxSprite; public var magicianTextShadow:Text; private var tutTextShadow:Text; private var tutorialText:Text; private var tutorialTextShadow:Text; public var minMonsKilled:uint;// = 0 private var door1:FlxSprite; private var door2:FlxSprite; private var door3:FlxSprite; private var door4:FlxSprite; private var door5:FlxSprite; private var area1:FlxSprite; public var usingLadder:Boolean;// = false public var spawnLocation:int;// = 0 public var swordsmanText:Text; public var magicianText:Text; public var swordsmanTextShadow:Text; public var scoreTextShadow:Text; public var player:Actor; public var tmpText:Text; public var riflemanText:Text; private var tutText:Text; public var orcFactionText:Text; public var riflemanTextShadow:Text; public var shadowMonsterFactionText:Text; public var ogresKilled:uint;// = 0 public var humanFactionText:Text; private static var menuRoom:Class = StateMenu_menuRoom; public function StateMenu(){ objects = new FlxGroup(); super(); } override public function create():void{ var _local6:String; super.create(); this.useHandCursor = true; FlxG.mouse.show(); FlxState.bgColor = 4281576447; NonEntityManager.Reset(); EntityManager.Reset(); this.add(new FlxSprite(0, 0, AssetsG.SkyImg)).scrollFactor = new FlxSprite(); var _local1:Map = new Map(); _local1.Load(new StateMenu.menuRoom()); this.level = (_local1.layers.members[0] as TileMap); this.level.drawIndex = 0; this.level.startingIndex = 0; this.level.collideIndex = 192; this.add(this.level); LevelManager.placeEnviromentalObjects(this.level); this.add(EntityManager.ActorNonMapList); this.add(EntityManager.ActorList); this.add(EntityManager.FallingObjectList); this.add(EntityManager.HeadList); this.add(EntityManager.LadderList); this.add(EntityManager.LootList); this.add(EntityManager.SpikesList); this.add(EntityManager.TriggerList); this.add(EntityManager.TurretList); this.add(NonEntityManager.Emitters); this.add(NonEntityManager.Explosions); this.add(NonEntityManager.FloatingTexts); this.add(NonEntityManager.Projectiles); this.add(NonEntityManager.StatusEffects); this.add(NonEntityManager.Props); this.add(NonEntityManager.Weapons); var _local2 = "\n\nUse \tleft and\n\tright to move "; var _local3 = ((" Swordsman\nPros:\n Speed, Jump Height" + "\n High Damage, High Health\n") + "Cons:\n Short Range, Low Energy"); var _local4 = (" Rifleman\nPros:\n Long Range, Attacks Spread" + "\nCons:\n Short Jump Range, Bad Breath\n Jumps the Gun"); var _local5 = ((" Magician\nPros:\n High Energy, Slow Falling" + "\n Missile pierces\n Fireball explodes\nCons:") + "\n Slow Speed, Low Health"); _local6 = "\n\n New to Ogre Town?\n See how things\n work in here\n Use \tup to enter"; var _local7 = "\n\n Curious to see how\n you are doing?"; this.tutorialText = new Text(((10 * 16) - 8), (4 * 16), _local2); this.tutorialText.color = 4294967294; this.tutorialText.visible = true; this.add(this.tutorialText); this.swordsmanTextShadow = new Text(((10 * 16) - 7), ((4 * 16) + 1), _local3); this.swordsmanTextShadow.color = 4278190080; this.swordsmanTextShadow.visible = false; this.add(this.swordsmanTextShadow); this.swordsmanText = new Text(((10 * 16) - 8), (4 * 16), _local3); this.swordsmanText.color = 4294967294; this.swordsmanText.visible = false; this.add(this.swordsmanText); this.riflemanTextShadow = new Text(((10 * 16) - 7), ((4 * 16) + 1), _local4); this.riflemanTextShadow.color = 4278190080; this.riflemanTextShadow.visible = false; this.add(this.riflemanTextShadow); this.riflemanText = new Text(((10 * 16) - 8), (4 * 16), _local4); this.riflemanText.color = 4294967294; this.riflemanText.visible = false; this.add(this.riflemanText); this.magicianTextShadow = new Text(((10 * 16) - 7), ((4 * 16) + 1), _local5); this.magicianTextShadow.color = 4278190080; this.magicianTextShadow.visible = false; this.add(this.magicianTextShadow); this.magicianText = new Text(((10 * 16) - 8), (4 * 16), _local5); this.magicianText.color = 4294967294; this.magicianText.visible = false; this.add(this.magicianText); this.tutText = new Text(((10 * 16) - 8), (3 * 16), _local6); this.tutText.color = 4294967294; this.tutText.visible = false; this.add(this.tutText); this.scoreTextShadow = new Text(((11 * 16) - 7), ((3 * 16) + 1), _local7); this.scoreTextShadow.color = 4278190080; this.scoreTextShadow.visible = false; this.add(this.scoreTextShadow); this.scoreText = new Text(((11 * 16) - 8), (3 * 16), _local7); this.scoreText.color = 4294967294; this.scoreText.visible = false; this.add(this.scoreText); minMonsKilled = SaveData.minMonKills; ogresKilled = SaveData.ogreKills; factionHelpBox = new FlxSprite(); factionHelpBox.createGraphic(16, 16); factionHelpBox.x = ((7 * 16) + 8); factionHelpBox.y = (11 * 16); this.humanFactionText = new Text(((10 * 16) - 7), ((2 * 16) + 1), "Press \t1 to join the\nOgre Town Liberation Front."); this.humanFactionText.color = 4294967294; this.humanFactionText.visible = false; if (EatG.CurrentOrg == EatG.HUMAN){ this.humanFactionText.text = "You have joined the\nOgre Town Liberation Front."; }; this.orcFactionText = new Text(((10 * 16) - 7), ((2 * 16) + 22), ((ogresKilled)>0) ? "Press \t2 to join the\nOrcs for the Ethical\nTreatment of Humans." : "Kill the boss in\nArea 5 to unlock."); this.orcFactionText.color = ((ogresKilled)>0) ? 4294967294 : 4284900966; this.orcFactionText.visible = false; if (EatG.CurrentOrg == EatG.ORC){ this.orcFactionText.text = "You have joined the\nOrcs for the Ethical\nTreatment of Humans."; }; this.shadowMonsterFactionText = new Text(((10 * 16) - 7), ((2 * 16) + 50), ((minMonsKilled)>1000) ? "Press \t3 to join the\nShadow Monsters Against\nHuman Cruelty." : (("Kill more shadow monsters\nto unlock. " + minMonsKilled) + "/1000")); this.shadowMonsterFactionText.color = ((minMonsKilled)>1000) ? 4294967294 : 4284900966; this.shadowMonsterFactionText.visible = false; if (EatG.CurrentOrg == EatG.SHADOWMONSTER){ this.shadowMonsterFactionText.text = "You have joined the\nShadow Monsters Against\nHuman Cruelty."; }; this.add(this.humanFactionText); this.add(this.orcFactionText); this.add(this.shadowMonsterFactionText); this.door1 = new FlxSprite(((10 * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.door1.createGraphic(16, 24, 4294967295); this.door1.visible = false; this.add(this.door1); this.door2 = new FlxSprite(((14 * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.door2.createGraphic(16, 24, 4294967295); this.door2.visible = false; this.add(this.door2); this.door3 = new FlxSprite(((18 * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.door3.createGraphic(16, 24, 4294967295); this.door3.visible = false; this.add(this.door3); this.door4 = new FlxSprite(((4 * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.door4.createGraphic(16, 24, 4294967295); this.door4.visible = false; this.add(this.door4); this.door5 = new FlxSprite(((24 * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.door5.createGraphic(16, 24, 4294967295); this.door5.visible = false; this.add(this.door5); this.area1 = new FlxSprite(((1 * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.area1.createGraphic(24, 24, 4294967295); this.area1.visible = false; this.add(this.area1); this.add(new FlxSprite(((1 * TileMap.TW) + 9), ((9 * TileMap.TH) + 5), AssetsG.SponsorPosterImg)); this.add(new FlxSprite(((4 * TileMap.TW) + 9), ((8 * TileMap.TH) + 5), AssetsG.LearnPosterImg)); this.add(new FlxSprite(((7 * TileMap.TW) + 9), ((9 * TileMap.TH) + 5), AssetsG.WantedPosterImg)); this.add(new FlxSprite(((10 * TileMap.TW) + 9), ((8 * TileMap.TH) + 5), AssetsG.SwordsmanPosterImg)); this.add(new FlxSprite(((14 * TileMap.TW) + 9), ((8 * TileMap.TH) + 5), AssetsG.RiflemanPosterImg)); this.add(new FlxSprite(((18 * TileMap.TW) + 9), ((8 * TileMap.TH) + 5), AssetsG.MagicianPosterImg)); this.add(new FlxSprite(((24 * TileMap.TW) + 9), ((8 * TileMap.TH) + 5), AssetsG.ScoresPosterImg)); this.player = new Actor((2 * TileMap.TW), (11 * TileMap.TH)); this.player.Controller = new PlayerCharacterController(); this.add(this.player); this.player.preferredDirection = (this.player.facing = FlxSprite.RIGHT); FlxG.follow(this.player); FlxG.followAdjust(1, 0); FlxG.followBounds(0, 16, this.level.width, this.level.height); var _local8:FlxSprite = new FlxSprite(0, 0); _local8.pixels = EatG.brandingSmallImg; _local8.color = 4293848814; var _local9:FlxSprite = new FlxSprite(0, 0); _local9.pixels = EatG.brandingSmallImg; _local9.color = 4294967295; var _local10:FlxButton = new FlxButton(50, 50, handleBrandingLogoClicked); _local10.loadGraphic(_local8, _local9); add(_local10); _local10.x = 1; _local10.y = ((FlxG.height - _local10.height) + 3); _local10.scrollFactor.x = 0; _local10.scrollFactor.y = 0; FlxG.flash.start(4281545523, 0.5); } public function onFadeCredits():void{ FlxG.state = new StateCredits(); } private function handleBrandingLogoClicked():void{ FlxU.openURL(SpilGame.getMoreGamesLink("Mainscreen")); } public function Overlaps(_arg1:FlxObject, _arg2:FlxObject):void{ if ((_arg2 is Entity)){ (_arg2 as Entity).OnOverlap(_arg1); }; } override public function update():void{ if (this.spawnLocation == 1){ this.player.x = (22 * TileMap.TW); this.player.y = (1 * TileMap.TH); if (this.usingLadder == true){ this.player.climbing = true; } else { this.player.climbing = false; }; this.spawnLocation = 0; FlxG.follow(this.player); }; if (this.spawnLocation == 2){ this.player.x = this.door5.x; this.player.y = this.door5.y; this.spawnLocation = 0; FlxG.follow(this.player); }; super.update(); SaveData.ThisSession.ElapsedTimeInMenues = (SaveData.ThisSession.ElapsedTimeInMenues + FlxG.elapsed); FlxU.overlap(this.player, EntityManager.LadderList, this.Overlaps); this.level.collide(this.player); this.swordsmanTextShadow.visible = this.door1.overlaps(this.player); this.riflemanTextShadow.visible = this.door2.overlaps(this.player); this.magicianTextShadow.visible = this.door3.overlaps(this.player); this.swordsmanText.visible = this.door1.overlaps(this.player); this.riflemanText.visible = this.door2.overlaps(this.player); this.magicianText.visible = this.door3.overlaps(this.player); this.tutText.visible = this.door4.overlaps(this.player); this.scoreText.visible = this.door5.overlaps(this.player); this.scoreTextShadow.visible = this.door5.overlaps(this.player); this.tutorialText.visible = this.area1.overlaps(this.player); if (((FlxG.keys.justPressed("UP")) || (FlxG.keys.pressed("W")))){ if (this.door1.overlaps(this.player) == true){ SaveData.ThisSession.NewPlay(SaveData.CLASS_FIGHTER); if (EatG.MOCHI){ MochiEvents.trackEvent("CLASS_FIGHTER"); }; FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; if (this.door2.overlaps(this.player) == true){ SaveData.ThisSession.NewPlay(SaveData.CLASS_RIFLEMAN); if (EatG.MOCHI){ MochiEvents.trackEvent("CLASS_RIFLEMAN"); }; FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; if (this.door3.overlaps(this.player) == true){ SaveData.ThisSession.NewPlay(SaveData.CLASS_MAGE); if (EatG.MOCHI){ MochiEvents.trackEvent("CLASS_MAGE"); }; FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; if (this.door4.overlaps(this.player) == true){ FlxG.fade.start(4281545523, 0.5, this.onFadeTutorial); }; if (this.door5.overlaps(this.player) == true){ FlxG.fade.start(4281545523, 0.5, this.onfadeScores); }; }; if (((((FlxG.keys.pressed("UP")) || (FlxG.keys.pressed("W")))) && ((this.player.y < TileMap.TH)))){ FlxG.fade.start(4281545523, 0.5, this.onFadeCredits); }; if (factionHelpBox.overlaps(this.player)){ humanFactionText.visible = true; orcFactionText.visible = true; shadowMonsterFactionText.visible = true; } else { humanFactionText.visible = false; orcFactionText.visible = false; shadowMonsterFactionText.visible = false; }; if (FlxG.keys.ONE){ player.Controller = new PlayerCharacterController(); player.facing = player.preferredDirection; EatG.CurrentOrg = EatG.HUMAN; humanFactionText.text = "You have joined the\nOgre Town Liberation Front."; orcFactionText.text = ((ogresKilled)>0) ? "Press \t2 to join the\nOrcs for the Ethical\nTreatment of Humans." : "Kill the boss in\nArea 5 to unlock."; shadowMonsterFactionText.text = ((minMonsKilled)>1000) ? "Press \t3 to join the\nShadow Monsters Against\nHuman Cruelty." : (("Kill more shadow monsters\nto unlock. " + minMonsKilled) + "/1000"); this.orcFactionText.color = ((ogresKilled)>0) ? 4294967294 : 4284900966; this.shadowMonsterFactionText.color = ((minMonsKilled)>1000) ? 4294967294 : 4284900966; } else { if (((FlxG.keys.TWO) && ((ogresKilled > 0)))){ player.Controller = new PlayerCharacterController(); player.facing = player.preferredDirection; EatG.CurrentOrg = EatG.ORC; humanFactionText.text = "Press \t1 to join the\nOgre Town Liberation Front."; orcFactionText.text = "You have joined the\nOrcs for the Ethical\nTreatment of Humans."; shadowMonsterFactionText.text = ((minMonsKilled)>1000) ? "Press \t3 to join the\nShadow Monsters Against\nHuman Cruelty." : (("Kill more shadow monsters\nto unlock. " + minMonsKilled) + "/1000"); this.shadowMonsterFactionText.color = ((minMonsKilled)>1000) ? 4294967294 : 4284900966; } else { if (((FlxG.keys.THREE) && ((minMonsKilled > 1000)))){ player.Controller = new PlayerCharacterController(); player.facing = player.preferredDirection; EatG.CurrentOrg = EatG.SHADOWMONSTER; humanFactionText.text = "Press \t1 to join the\nOgre Town Liberation Front."; orcFactionText.text = ((ogresKilled)>0) ? "Press \t2 to join the\nOrcs for the Ethical\nTreatment of Humans." : "Kill the boss in\nArea 5 to unlock."; shadowMonsterFactionText.text = "You have joined the\nShadow Monsters Against\nHuman Cruelty."; this.orcFactionText.color = ((ogresKilled)>0) ? 4294967294 : 4284900966; }; }; }; } public function onFadeComplete():void{ if (EatG.MOCHI){ MochiEvents.startPlay(); }; FlxG.state = new StatePlay(); } public function onfadeScores():void{ FlxG.state = new StateScores(); } public function get ThisMap():TileMap{ return (this.level); } public function shadowText(_arg1:int, _arg2:int, _arg3:String, _arg4:uint=4294967295):void{ var _local5:Text; _local5 = new Text((_arg1 + 1), (_arg2 + 1), "Invalid"); _local5.text = _arg3; _local5.color = 4278190080; this.add(_local5); _local5 = new Text(_arg1, _arg2, "Invalid"); _local5.text = _arg3; _local5.color = _arg4; this.add(_local5); } public function onFadeTutorial():void{ FlxG.state = new StateTutorial(); } override public function destroy():void{ this.defaultGroup.members = []; super.destroy(); } } }//package
Section 302
//StateMenu_menuRoom (StateMenu_menuRoom) package { import mx.core.*; public class StateMenu_menuRoom extends ByteArrayAsset { } }//package
Section 303
//StatePlay (StatePlay) package { import org.flixel.*; public class StatePlay extends FlxState { public var manaMeter:Meter; public var healthMeter:Meter; public var collidesVsActors:FlxGroup; public var levelText:Text; public var bossLevel:Boolean;// = false public var map:TileMap; public var allActors:FlxGroup; public var areaText:Text; public var camera:Camera; public var store:FlxSprite; public var collidesVsMap:FlxGroup; public var exitDoor:FlxSprite; public var collidesVsPlayerOnly:FlxGroup; public var healthRechargeText:Text; public var xpMeter:Meter; public var healthRechargeTextShadow:Text; public var pc:Actor; public var lootText:Text; override public function destroy():void{ this.defaultGroup.members = []; super.destroy(); } override public function create():void{ var _local1:FlxObject; var _local2:int; var _local3:Actor; super.create(); FlxG.mouse.hide(); this.add(new FlxSprite(0, 0, AssetsG.SkyImg)).scrollFactor = new FlxSprite(); NonEntityManager.Reset(); EntityManager.Reset(); MapsG.init(); SaveData.ThisSession.ThisPlay.NewArea(); if ((SaveData.ThisSession.ThisPlay.AreaCount % 5) == 0){ LevelManager.createBossLevel(); bossLevel = true; EatG.music.switchTheme(2); } else { LevelManager.createLevel(6); EatG.music.switchTheme(1); _local2 = UtilsG.dice(1, 10); if (_local2 == 1){ _local3 = EntityManager.GetActorNonMap(); _local3.Controller = new WraithController(); _local3.x = LevelManager.bigMap.width; _local3.y = 0; EatG.music.switchTheme(3); }; }; this.map = LevelManager.bigMap; this.add(this.map); this.add(new FlxSprite(((this.map.width - (7 * 16)) + 9), ((11 * 16) + 5), AssetsG.StorePosterImg)); for each (_local1 in EntityManager.LootList.members) { this.add(_local1); }; for each (_local1 in EntityManager.LadderList.members) { this.add(_local1); }; for each (_local1 in EntityManager.SpikesList.members) { this.add(_local1); }; for each (_local1 in EntityManager.TriggerList.members) { this.add(_local1); }; for each (_local1 in EntityManager.TrapDoorList.members) { this.add(_local1); }; for each (_local1 in EntityManager.TurretList.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.Explosives.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.Props.members) { this.add(_local1); }; for each (_local1 in EntityManager.HeadList.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.Weapons.members) { this.add(_local1); }; for each (_local1 in EntityManager.FallingObjectList.members) { this.add(_local1); }; for each (_local1 in EntityManager.ActorNonMapList.members) { this.add(_local1); }; for each (_local1 in EntityManager.ActorList.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.FloatingTexts.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.Projectiles.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.StatusEffects.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.Emitters.members) { this.add(_local1); }; for each (_local1 in NonEntityManager.Explosions.members) { this.add(_local1); }; this.SetupPlayer(); this.exitDoor = new FlxSprite((((this.map.widthInTiles - 3) * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.exitDoor.createGraphic(16, 24, 4294967295); this.exitDoor.visible = false; this.allActors = new FlxGroup(); for each (_local1 in EntityManager.ActorList.members) { this.allActors.add(_local1); }; for each (_local1 in EntityManager.ActorNonMapList.members) { this.allActors.add(_local1); }; this.collidesVsPlayerOnly = new FlxGroup(); for each (_local1 in EntityManager.LootList.members) { this.collidesVsPlayerOnly.add(_local1); }; for each (_local1 in EntityManager.ActorNonMapList.members) { this.collidesVsPlayerOnly.add(_local1); }; for each (_local1 in EntityManager.LadderList.members) { this.collidesVsPlayerOnly.add(_local1); }; for each (_local1 in EntityManager.TrapDoorList.members) { this.collidesVsPlayerOnly.add(_local1); }; this.collidesVsActors = new FlxGroup(); for each (_local1 in NonEntityManager.weaponList.members) { this.collidesVsActors.add(_local1); }; for each (_local1 in NonEntityManager.projectileList.members) { this.collidesVsActors.add(_local1); }; for each (_local1 in NonEntityManager.explosionList.members) { this.collidesVsActors.add(_local1); }; for each (_local1 in EntityManager.FallingObjectList.members) { this.collidesVsActors.add(_local1); }; for each (_local1 in EntityManager.SpikesList.members) { this.collidesVsActors.add(_local1); }; for each (_local1 in EntityManager.TriggerList.members) { this.collidesVsActors.add(_local1); }; this.collidesVsMap = new FlxGroup(); for each (_local1 in EntityManager.LootList.members) { this.collidesVsMap.add(_local1); }; for each (_local1 in EntityManager.ActorList.members) { this.collidesVsMap.add(_local1); }; for each (_local1 in NonEntityManager.projectileList.members) { this.collidesVsMap.add(_local1); }; for each (_local1 in NonEntityManager.emitterList.members) { this.collidesVsMap.add(_local1); }; for each (_local1 in NonEntityManager.explosivesList.members) { this.collidesVsMap.add(_local1); }; this.camera = new Camera(this.pc); this.add(camera); FlxG.follow(this.camera, 10); FlxG.followAdjust(0, 0); FlxG.followBounds(0, 0, (this.map.widthInTiles * 16), (this.map.heightInTiles * 16)); healthMeter = new Meter(1, 1); healthMeter.scrollFactor = new FlxPoint(); if (SaveData.ThisSession.ThisPlay.Class == SaveData.CLASS_FIGHTER){ healthMeter.loadGraphic(AssetsG.healthDoubleImg); healthMeter.fillWidthMax = 176; } else { if (SaveData.ThisSession.ThisPlay.Class == SaveData.CLASS_MAGE){ healthMeter.loadGraphic(AssetsG.healthHalfImg); healthMeter.fillWidthMax = 33; } else { healthMeter.loadGraphic(AssetsG.healthImg); healthMeter.fillWidthMax = 81; }; }; healthMeter.fillColor = Meter.FILL_RED; healthMeter.fillOffset = new FlxPoint(11, 4); healthMeter.current = (healthMeter.max = this.pc.healthMax); this.add(healthMeter); manaMeter = new Meter(1, 11); manaMeter.scrollFactor = new FlxPoint(); if (SaveData.ThisSession.ThisPlay.Class == SaveData.CLASS_FIGHTER){ manaMeter.loadGraphic(AssetsG.energyHalfImg); manaMeter.fillWidthMax = 33; } else { if (SaveData.ThisSession.ThisPlay.Class == SaveData.CLASS_MAGE){ manaMeter.loadGraphic(AssetsG.energyDoubleImg); manaMeter.fillWidthMax = 176; } else { manaMeter.loadGraphic(AssetsG.energyImg); manaMeter.fillWidthMax = 81; }; }; manaMeter.fillColor = Meter.FILL_BLUE; manaMeter.fillOffset = new FlxPoint(11, 3); manaMeter.current = (manaMeter.max = this.pc.energyMax); this.add(manaMeter); xpMeter = new Meter(2, 2); xpMeter.scrollFactor = new FlxPoint(); xpMeter.loadGraphic(AssetsG.levelImg); xpMeter.y = ((FlxG.height - xpMeter.height) - 1); xpMeter.fillColor = Meter.FILL_GREEN; xpMeter.fillOffset = new FlxPoint(64, 4); xpMeter.fillWidthMax = 249; xpMeter.current = (xpMeter.max = 1); this.add(xpMeter); levelText = new Text(0, 0); levelText.reset(42, xpMeter.y); levelText.velocity = new FlxPoint(); levelText.color = 4278190080; levelText.text = "999"; levelText.scrollFactor = new FlxPoint(); levelText.restart(-1); this.add(levelText); this.areaText = new Text(0, 0); this.areaText.reset(4, (xpMeter.y - 8)); this.areaText.velocity = new FlxPoint(); this.areaText.color = 4294953984; this.areaText.text = "999"; this.areaText.scrollFactor = new FlxPoint(); this.areaText.restart(-1); this.add(this.areaText); this.lootText = new Text(0, 0); this.lootText.reset(60, (xpMeter.y - 8)); this.lootText.velocity = new FlxPoint(); this.lootText.color = 4294953984; this.lootText.text = "999"; this.lootText.scrollFactor = new FlxPoint(); this.lootText.restart(-1); this.add(this.lootText); this.healthRechargeTextShadow = new Text((exitDoor.x - (TileMap.TW * 8)), (TileMap.TH * 6), ""); this.healthRechargeTextShadow.visible = false; this.healthRechargeTextShadow.text = (" Press \tENTER to\n purchase a health\n recharge for:\n $" + (SaveData.ThisSession.ThisPlay.AreaCount * 10000)); this.healthRechargeTextShadow.color = 4278190081; this.add(this.healthRechargeTextShadow); this.healthRechargeText = new Text(((exitDoor.x - (TileMap.TW * 8)) - 1), ((TileMap.TH * 6) - 1), ""); this.healthRechargeText.visible = false; this.healthRechargeText.text = (" Press \tENTER to\n purchase a health\n recharge for:\n $" + (SaveData.ThisSession.ThisPlay.AreaCount * 10000)); this.healthRechargeText.color = 4294967295; this.add(this.healthRechargeText); this.store = new FlxSprite(((this.map.width - (7 * 16)) + 9), ((11 * 16) + 5)); this.store.createGraphic(14, 23); FlxG.flash.start(4281545523, 0.5); } public function LogPlayStats():void{ var _local1:Actor; for each (_local1 in EntityManager.ActorList.members) { if (_local1 == this.pc){ } else { if ((((_local1.dead == false)) && (!((_local1.controller == null))))){ var _local4 = SaveData.ThisSession.ThisPlay.ThisArea.enemiesLeftAlive; var _local5 = _local1.Controller.enemyType; var _local6 = (_local4[_local5] + 1); _local4[_local5] = _local6; }; }; }; SaveData.ThisSession.ThisPlay.Experience = this.PC.experience; SaveData.ThisSession.ThisPlay.Health = this.PC.health; SaveData.ThisSession.ThisPlay.Energy = this.PC.energyCurrent; } public function OnFadeForNewLevel():void{ this.LogPlayStats(); var _local1:int; var _local2:int; while (_local2 < SaveData.ENEMY_MAX) { _local1 = (_local1 + SaveData.ThisSession.ThisPlay.ThisArea.enemiesLeftAlive[_local2]); _local2++; }; if (_local1 == 0){ if (EatG.SPIL_API){ EatG.Spil_Submitter._O00OOl1Ol("award1"); }; if (((EatG.KONG) && (FlxG.kong))){ FlxG.kong.API.stats.submit("Killed Everything In Area", 1); }; }; if (((EatG.KONG) && (FlxG.kong))){ FlxG.kong.API.stats.submit("Chandeliers Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_CHANDELIER]); FlxG.kong.API.stats.submit("Flying Skulls Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_FLYING_SKULL]); FlxG.kong.API.stats.submit("MinMoms Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_MIN_MOM]); FlxG.kong.API.stats.submit("MinMons Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_MIN_MON]); FlxG.kong.API.stats.submit("Ogres Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_OGRE]); FlxG.kong.API.stats.submit("Shadow Mages Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_SHADOW_MAGE]); FlxG.kong.API.stats.submit("Smoldering Men Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_SMOLDERING_MAN]); FlxG.kong.API.stats.submit("Wraiths Killed In Area", SaveData.ThisSession.ThisPlay.ThisArea.enemiesKilled[SaveData.ENEMY_WRAITH]); }; FlxG.state = new StatePlay(); } public function SetupPlayer():void{ pc = EntityManager.GetActor(); pc.x = (2 * TileMap.TW); pc.y = (11 * TileMap.TH); pc.Controller = new PlayerCharacterController(); switch (SaveData.ThisSession.ThisPlay.Class){ case SaveData.CLASS_FIGHTER: pc.Controller = new FighterController(); break; case SaveData.CLASS_RIFLEMAN: pc.Controller = new RiflemanController(); break; case SaveData.CLASS_MAGE: pc.Controller = new MageController(); break; default: break; }; if (SaveData.ThisSession.ThisPlay.IsNewGame() == false){ pc.ApplyExperience(SaveData.ThisSession.ThisPlay.Experience, true); pc.health = SaveData.ThisSession.ThisPlay.Health; pc.energyCurrent = SaveData.ThisSession.ThisPlay.Energy; } else { pc.level = 1; }; EatG.enteredAreaLevel = pc.level; } override public function update():void{ var _local4:Actor; SaveData.ThisSession.ThisPlay.ThisArea.timeElapsed = (SaveData.ThisSession.ThisPlay.ThisArea.timeElapsed + FlxG.elapsed); FlxU.overlap(pc, collidesVsPlayerOnly, Overlaps); FlxU.overlap(allActors, collidesVsActors, Overlaps); if (bossLevel){ FlxU.overlap(EntityManager.HeadList, EntityManager.FallingObjectList, Overlaps); }; super.update(); var _local1:Array = EntityManager.ActorList.members; var _local2:int = _local1.length; var _local3:int; _local3 = 0; while (_local3 < _local2) { _local4 = (_local1[_local3] as Actor); if (((((_local4.exists) && (_local4.attacking))) && ((_local4.controller is SmolderingManController)))){ _local4.solid = false; } else { if (((_local4.exists) && ((_local4.controller is OgreController)))){ _local4.fixed = true; } else { if (((_local4.exists) && (_local4.dervishing))){ _local4.solid = false; }; }; }; _local3++; }; FlxU.overlap(EntityManager.ActorList, EntityManager.ActorList, FakeColide); _local3 = 0; while (_local3 < _local2) { _local4 = (_local1[_local3] as Actor); if (((((_local4.exists) && (_local4.attacking))) && ((_local4.controller is SmolderingManController)))){ _local4.solid = true; } else { if (((_local4.exists) && ((_local4.controller is OgreController)))){ _local4.fixed = false; } else { if (((_local4.exists) && (_local4.dervishing))){ _local4.solid = true; }; }; }; _local3++; }; FlxU.collide(map, collidesVsMap); if (this.PC.dead == true){ FlxG.followTarget = null; FlxG.fade.start(4281545523, 0.5, OnFadeForDeath); }; if (pc.overlaps(exitDoor) == true){ if (((FlxG.keys.justPressed("UP")) || (FlxG.keys.pressed("W")))){ FlxG.fade.start(4281545523, 0.5, OnFadeForNewLevel); }; }; if (pc.overlaps(store) == true){ healthRechargeText.visible = true; healthRechargeTextShadow.visible = true; if (FlxG.keys.justPressed("ENTER") == true){ if (SaveData.ThisSession.ThisPlay.wealthScore >= (SaveData.ThisSession.ThisPlay.AreaCount * 10000)){ SaveData.ThisSession.ThisPlay.wealthScore = (SaveData.ThisSession.ThisPlay.wealthScore - (SaveData.ThisSession.ThisPlay.AreaCount * 10000)); pc.health = pc.healthMax; }; }; } else { healthRechargeText.visible = false; healthRechargeTextShadow.visible = false; }; healthMeter.max = pc.healthMax; healthMeter.current = pc.health; manaMeter.max = pc.energyMax; manaMeter.current = pc.energyCurrent; xpMeter.max = (pc.level * 1000); xpMeter.current = (pc.experience - pc.XPForLevel((pc.level - 1))); levelText.text = ("" + pc.level); areaText.text = ("Area: " + SaveData.ThisSession.ThisPlay.AreaCount); lootText.text = ("$: " + SaveData.ThisSession.ThisPlay.Wealth); } public function OnFadeForDeath():void{ var _local2:int; var _local3:StatsArea; this.LogPlayStats(); var _local1:Object = new Object(); _local1.loot = SaveData.ThisSession.ThisPlay.Wealth; _local1.xp = SaveData.ThisSession.ThisPlay.Experience; _local1.area = SaveData.ThisSession.ThisPlay.AreaCount; _local1.characterType = SaveData.ThisSession.ThisPlay.playerClass; _local1.total = ((_local1.loot + _local1.xp) * (1 + ((_local1.area - 1) * 0.05))); SaveData.lastRunScore = _local1; switch (_local1.characterType){ case SaveData.CLASS_FIGHTER: SaveData.WarriorScores[SaveData.WarriorScores.length] = _local1.total; break; case SaveData.CLASS_RIFLEMAN: SaveData.RiflemanScores[SaveData.RiflemanScores.length] = _local1.total; break; case SaveData.CLASS_MAGE: SaveData.MageScores[SaveData.MageScores.length] = _local1.total; break; }; SaveData.SaveScores(); if (EatG.SPIL_API){ trace("Scores Submited"); EatG.Spil_Submitter._O01lOO10O(_local1.total); }; if (((EatG.KONG) && (FlxG.kong))){ FlxG.kong.API.stats.submit("High Score All", _local1.total); switch (_local1.characterType){ case SaveData.CLASS_FIGHTER: FlxG.kong.API.stats.submit("High Score Swordsman", _local1.total); break; case SaveData.CLASS_RIFLEMAN: FlxG.kong.API.stats.submit("High Score Rifleman", _local1.total); break; case SaveData.CLASS_MAGE: FlxG.kong.API.stats.submit("High Score Magician", _local1.total); break; }; _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_CHANDELIER]); }; FlxG.kong.API.stats.submit("Chandeliers Killed In Play", _local2); _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_FLYING_SKULL]); }; FlxG.kong.API.stats.submit("Flying Skulls Killed In Play", _local2); _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_MIN_MOM]); }; FlxG.kong.API.stats.submit("MinMoms Killed In Play", _local2); _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_MIN_MON]); }; FlxG.kong.API.stats.submit("MinMons Killed In Play", _local2); _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_OGRE]); }; FlxG.kong.API.stats.submit("Ogres Killed In Play", _local2); _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_SHADOW_MAGE]); }; FlxG.kong.API.stats.submit("Shadow Mages Killed In Play", _local2); _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_SMOLDERING_MAN]); }; FlxG.kong.API.stats.submit("Smoldering Men Killed In Play", _local2); _local2 = 0; for each (_local3 in SaveData.ThisSession.ThisPlay.areaStats) { _local2 = (_local2 + _local3.enemiesKilled[SaveData.ENEMY_WRAITH]); }; FlxG.kong.API.stats.submit("Wraiths Killed In Play", _local2); }; FlxG.state = new StateScores(); } public function get PC():Actor{ return (this.pc); } public function Overlaps(_arg1:FlxObject, _arg2:FlxObject):void{ if ((_arg2 is Entity)){ (_arg2 as Entity).OnOverlap(_arg1); }; } public function get ThisMap():TileMap{ return (this.map); } public function FakeColide(_arg1:FlxObject, _arg2:FlxObject):void{ var _local3:FlxPoint = new FlxPoint(); _local3.x = ((_arg1.x + (_arg1.width / 2)) - (_arg2.x + (_arg2.width / 2))); _local3.y = ((_arg1.y + (_arg1.height / 2)) - (_arg2.y + (_arg2.height / 2))); (_arg1 as Actor).ApplyKnockback(_local3, 15); _local3.x = (_local3.x * -1); _local3.y = (_local3.y * -1); (_arg2 as Actor).ApplyKnockback(_local3, 15); if ((_arg2 is Entity)){ (_arg2 as Entity).OnOverlap(_arg1); }; } } }//package
Section 304
//StateScores (StateScores) package { import org.flixel.*; import spill.localisation.*; public class StateScores extends FlxState { public var player:Actor; public var door1:FlxSprite; public var level:TileMap; private var ImgTwitter:Class; private var ImgTwitterH:Class; private static var scoreRoom:Class = StateScores_scoreRoom; public function StateScores(){ ImgTwitter = StateScores_ImgTwitter; ImgTwitterH = StateScores_ImgTwitterH; super(); } override public function update():void{ super.update(); SaveData.ThisSession.ElapsedTimeInMenues = (SaveData.ThisSession.ElapsedTimeInMenues + FlxG.elapsed); FlxU.overlap(this.player, EntityManager.LadderList, this.Overlaps); this.level.collide(this.player); if ((((((FlxG.keys.justPressed("UP") == true)) || (FlxG.keys.pressed("W")))) && ((this.door1.overlaps(this.player) == true)))){ FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; } public function Overlaps(_arg1:FlxObject, _arg2:FlxObject):void{ } public function shadowText(_arg1:int, _arg2:int, _arg3:String, _arg4:uint=4294967295):void{ var _local5:Text; _local5 = new Text((_arg1 + 1), (_arg2 + 1), "Invalid"); _local5.text = _arg3; _local5.color = 4278190080; this.add(_local5); _local5 = new Text(_arg1, _arg2, "Invalid"); _local5.text = _arg3; _local5.color = _arg4; this.add(_local5); } public function score():void{ var _local11:int; var _local12:FlxButton; var _local1:int; var _local2:uint = 4294967295; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7 = ""; var _local8:FlxSprite = new FlxSprite(0, 0); _local8.pixels = EatG.brandingSmallImg; _local8.color = 4293848814; var _local9:FlxSprite = new FlxSprite(0, 0); _local9.pixels = EatG.brandingSmallImg; _local9.color = 4294967295; var _local10:FlxButton = new FlxButton(50, 50, handleBrandingLogoClicked); _local10.loadGraphic(_local8, _local9); add(_local10); _local10.x = 1; _local10.y = ((FlxG.height - _local10.height) + 3); _local10.scrollFactor.x = 0; _local10.scrollFactor.y = 0; if (SaveData.lastRunScore != null){ FlxG.mouse.show(); _local3 = SaveData.lastRunScore.loot; _local4 = SaveData.lastRunScore.xp; _local6 = SaveData.lastRunScore.total; _local5 = ((_local3 + _local4) * ((SaveData.lastRunScore.area - 1) * 0.05)); switch (SaveData.lastRunScore.characterType){ case SaveData.CLASS_FIGHTER: _local7 = "Swordsman"; break; case SaveData.CLASS_RIFLEMAN: _local7 = "Rifleman"; break; case SaveData.CLASS_MAGE: _local7 = "Magician"; }; this.shadowText((2 * TileMap.TW), (5 * TileMap.TH), ("Total Score: " + _local6), _local2); this.shadowText((2 * TileMap.TW), ((5 * TileMap.TH) + 12), (" As: " + _local7), _local2); this.shadowText((2 * TileMap.TW), ((5 * TileMap.TH) + 24), (" Loot: " + _local3), _local2); this.shadowText((2 * TileMap.TW), ((5 * TileMap.TH) + 36), (" XP: " + _local4), _local2); this.shadowText((2 * TileMap.TW), ((5 * TileMap.TH) + 48), (" Bonus: " + _local5), _local2); _local12 = new FlxButton((FlxG.width - 16), (FlxG.height - 16), SaveData.TweetScore); _local12.loadGraphic(new FlxSprite(0, 0, ImgTwitter), new FlxSprite(0, 0, ImgTwitterH)); _local12.scrollFactor.x = 0; _local12.scrollFactor.y = 0; this.add(_local12); }; this.shadowText((10 * TileMap.TW), ((5 * TileMap.TH) + -12), "Swordsman", _local2); _local1 = 0; while (_local1 < 5) { if (SaveData.WarriorScores[_local1] != null){ _local11 = SaveData.WarriorScores[_local1]; } else { _local11 = 0; }; this.shadowText(((10 * TileMap.TW) + 8), ((5 * TileMap.TH) + (_local1 * 12)), ((("" + (_local1 + 1)) + ": ") + _local11), _local2); _local1++; }; this.shadowText(((16 * TileMap.TW) + 8), ((5 * TileMap.TH) + -12), "Rifleman", _local2); _local1 = 0; while (_local1 < 5) { if (SaveData.RiflemanScores[_local1] != null){ _local11 = SaveData.RiflemanScores[_local1]; } else { _local11 = 0; }; this.shadowText(((16 * TileMap.TW) + 16), ((5 * TileMap.TH) + (_local1 * 12)), ((("" + (_local1 + 1)) + ": ") + _local11), _local2); _local1++; }; this.shadowText(((23 * TileMap.TW) - 8), ((5 * TileMap.TH) + -12), "Magician", _local2); _local1 = 0; while (_local1 < 5) { if (SaveData.MageScores[_local1] != null){ _local11 = SaveData.MageScores[_local1]; } else { _local11 = 0; }; this.shadowText((23 * TileMap.TW), ((5 * TileMap.TH) + (_local1 * 12)), ((("" + (_local1 + 1)) + ": ") + _local11), _local2); _local1++; }; } public function onFadeComplete():void{ FlxG.state = new StateMenu(); (FlxG.state as StateMenu).spawnLocation = 2; } private function handleBrandingLogoClicked():void{ FlxU.openURL(SpilGame.getMoreGamesLink("Mainscreen")); } override public function destroy():void{ this.defaultGroup.members = []; super.destroy(); } override public function create():void{ super.create(); this.add(new FlxSprite(0, 0, AssetsG.SkyImg)).scrollFactor = new FlxSprite(); FlxState.bgColor = 4281576447; EatG.music.switchTheme(4); NonEntityManager.Reset(); EntityManager.Reset(); this.add(new FlxSprite(0, 0, AssetsG.SkyImg)).scrollFactor = new FlxSprite(); var _local1:Map = new Map(); _local1.Load(new StateScores.scoreRoom()); this.level = (_local1.layers.members[0] as TileMap); this.level.drawIndex = 0; this.level.startingIndex = 0; this.level.collideIndex = 192; this.add(this.level); LevelManager.placeEnviromentalObjects(this.level); this.add(EntityManager.LadderList); this.door1 = new FlxSprite(((2 * TileMap.TW) + 8), ((9 * TileMap.TH) - 8)); this.door1.createGraphic(16, 24, 4294967295); this.door1.visible = false; this.add(this.door1); this.player = new Actor(this.door1.x, this.door1.y); this.player.Controller = new PlayerCharacterController(); this.add(this.player); this.player.preferredDirection = (this.player.facing = FlxSprite.RIGHT); FlxG.follow(this.player); FlxG.followAdjust(1, 1); FlxG.followBounds(0, 0, this.level.width, this.level.height); FlxG.flash.start(4281545523, 0.5); this.score(); } public function get ThisMap():TileMap{ return (this.level); } } }//package
Section 305
//StateScores_ImgTwitter (StateScores_ImgTwitter) package { import mx.core.*; public class StateScores_ImgTwitter extends BitmapAsset { } }//package
Section 306
//StateScores_ImgTwitterH (StateScores_ImgTwitterH) package { import mx.core.*; public class StateScores_ImgTwitterH extends BitmapAsset { } }//package
Section 307
//StateScores_scoreRoom (StateScores_scoreRoom) package { import mx.core.*; public class StateScores_scoreRoom extends ByteArrayAsset { } }//package
Section 308
//StateSplashTitle (StateSplashTitle) package { import org.flixel.*; import spill.localisation.*; import flash.display.*; import flash.geom.*; public class StateSplashTitle extends FlxState { public var brandingFlxOver:FlxSprite; public var message:String; public var messageText:Text; public var playMoreGamesText:Text; public var prompt:String; public var promptText:FlxText; public var button:FlxButton; public var brandingFlx:FlxSprite; public var field:LocalizedTextField; public var bButton:FlxButton; override public function update():void{ var _local1:Matrix = new Matrix(1, 0, 0, 1, ((EatG.brandingLogo.width / 2) + 5), ((EatG.brandingLogo.height / 2) + 5)); EatG.brandingImg = new BitmapData((EatG.brandingLogo.width + 10), (EatG.brandingLogo.height + 10), true, 0xFFFFFF); EatG.brandingImg.draw(EatG.brandingLogo, _local1); _local1.scale(0.5, 0.5); EatG.brandingSmallImg = new BitmapData(((EatG.brandingLogo.width / 2) + 10), ((EatG.brandingLogo.height / 2) + 10), true, 0xFFFFFF); EatG.brandingSmallImg.draw(EatG.brandingLogo, _local1); brandingFlx = new FlxSprite(0, 0); brandingFlx.pixels = EatG.brandingImg; brandingFlx.color = 4293848814; brandingFlxOver = new FlxSprite(0, 0); brandingFlxOver.pixels = EatG.brandingImg; brandingFlxOver.color = 4294967295; var _local2:FlxButton = bButton; bButton = new FlxButton(50, 50, handleBrandingLogoClicked); defaultGroup.replace(_local2, bButton); bButton.loadGraphic(brandingFlx, brandingFlxOver); bButton.x = ((FlxG.width / 2) - (bButton.width / 2)); bButton.y = ((FlxG.height - bButton.height) - 5); playMoreGamesText.y = (bButton.y - 8); super.update(); } public function onFadeComplete():void{ FlxG.state = new StateMenu(); } private function handleBrandingLogoClicked():void{ FlxU.openURL(SpilGame.getMoreGamesLink("Mainscreen")); } override public function create():void{ super.create(); FlxG.mouse.show(); var _local1:FlxTileblock = new FlxTileblock(0, 0, FlxG.width, FlxG.height); _local1.loadGraphic(AssetsG.brickImg); add(_local1); message = "Epic Adventure Time"; messageText = new Text(0, 0, message); messageText.loadFont(AssetsG.fontBigImg, 18, 0, 0); messageText.color = 4294967295; messageText.alignment = "center"; messageText.text = message; messageText.x = ((FlxG.width / 2) - (messageText.width / 2)); messageText.y = (((FlxG.height / 2) - (messageText.height / 2)) - 65); add(messageText); message = "\n\nRevolt in Ogre Town"; messageText = new Text(0, 0, message); messageText.color = 4294967295; messageText.alignment = "center"; messageText.text = message; messageText.x = ((FlxG.width / 2) - (messageText.width / 2)); messageText.y = (((FlxG.height / 2) - (messageText.height / 2)) - 60); add(messageText); message = "Play more GAMES at"; playMoreGamesText = new Text(0, 0, message); playMoreGamesText.color = 4294967295; playMoreGamesText.alignment = "center"; playMoreGamesText.text = message; playMoreGamesText.x = ((FlxG.width / 2) - (messageText.width / 2)); playMoreGamesText.y = (FlxG.height - 45); add(playMoreGamesText); prompt = "Play Now!"; promptText = new FlxText(0, 0, 64, prompt); promptText.color = 4294967295; promptText.alignment = "center"; promptText.text = prompt; promptText.x = 0; promptText.y = 2; var _local2:FlxSprite = new FlxSprite(); _local2.loadGraphic(AssetsG.pbDownImg); var _local3:FlxSprite = new FlxSprite(); _local3.loadGraphic(AssetsG.pbUpImg); button = new FlxButton(((FlxG.width / 2) - (promptText.width / 2)), (((FlxG.height / 2) - (promptText.height / 2)) - 5), startFade); button.loadGraphic(_local3, _local2); button.x = ((FlxG.width / 2) - (button.width / 2)); add(button); brandingFlx = new FlxSprite(0, 0); brandingFlx.pixels = EatG.brandingImg; brandingFlx.color = 4293848814; brandingFlxOver = new FlxSprite(0, 0); brandingFlxOver.pixels = EatG.brandingImg; brandingFlxOver.color = 4294967295; bButton = new FlxButton(50, 50, handleBrandingLogoClicked); bButton.loadGraphic(brandingFlx, brandingFlxOver); add(bButton); bButton.x = ((FlxG.width / 2) - (bButton.width / 2)); bButton.y = ((FlxG.height - bButton.height) - 5); playMoreGamesText.y = (bButton.y - 8); FlxG.flash.start(4281545523, 0.5); EatG.lsb = new LanguageSelectBox(); EatG.lsb.x = 5; EatG.lsb.y = 5; EatG.lsb.popupLocation = "bottom"; stage.addChild(EatG.lsb); } public function startFade():void{ stage.removeChild(EatG.brandingLogo); stage.removeChild(EatG.lsb); FlxG.fade.start(4281545523, 0.5, onFadeComplete); } } }//package
Section 309
//StateTutorial (StateTutorial) package { import org.flixel.*; public class StateTutorial extends FlxState { public var level:TileMap; public var manaMeter:Meter; public var healthMeter:Meter; public var collidesVsActors:FlxGroup; public var swordsmanText:FlxText; public var objects:FlxGroup; public var magicianText:FlxText; public var collidesVsPlayerOnly:FlxGroup; public var player:Actor; public var allActors:FlxGroup; public var collidesVsMap:FlxGroup; public var exitDoor:FlxSprite; public var riflemanText:FlxText; private static var tutorial:Class = StateTutorial_tutorial; public function StateTutorial(){ objects = new FlxGroup(); super(); } public function onFadeComplete():void{ FlxG.state = new StateExposition(); } public function get Level():TileMap{ return (this.level); } override public function update():void{ var _local4:Actor; FlxU.overlap(player, collidesVsPlayerOnly, Overlaps); FlxU.overlap(allActors, collidesVsActors, Overlaps); super.update(); var _local1:Array = EntityManager.ActorList.members; var _local2:int = _local1.length; var _local3:int; _local3 = 0; while (_local3 < _local2) { _local4 = (_local1[_local3] as Actor); if (((((_local4.exists) && (_local4.attacking))) && ((_local4.controller is SmolderingManController)))){ _local4.solid = false; } else { if (((_local4.exists) && ((_local4.controller is OgreController)))){ _local4.fixed = true; } else { if (((_local4.exists) && (_local4.dervishing))){ _local4.solid = false; }; }; }; _local3++; }; FlxU.collide(EntityManager.ActorList, EntityManager.ActorList); _local3 = 0; while (_local3 < _local2) { _local4 = (_local1[_local3] as Actor); if (((((_local4.exists) && (_local4.attacking))) && ((_local4.controller is SmolderingManController)))){ _local4.solid = true; } else { if (((_local4.exists) && ((_local4.controller is OgreController)))){ _local4.fixed = false; } else { if (((_local4.exists) && (_local4.dervishing))){ _local4.solid = true; }; }; }; _local3++; }; FlxU.collide(level, collidesVsMap); this.healthMeter.max = this.player.healthMax; this.healthMeter.current = this.player.health; this.manaMeter.max = this.player.energyMax; this.manaMeter.current = this.player.energyCurrent; if (this.player.dead == true){ FlxG.followTarget = null; FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; if ((((this.player.overlaps(this.exitDoor) == true)) && (((FlxG.keys.justPressed("UP")) || (FlxG.keys.pressed("W")))))){ FlxG.fade.start(4281545523, 0.5, this.onFadeComplete); }; } override public function destroy():void{ this.defaultGroup.members = []; super.destroy(); } public function Overlaps(_arg1:FlxObject, _arg2:FlxObject):void{ if ((_arg2 is Entity)){ (_arg2 as Entity).OnOverlap(_arg1); }; } override public function create():void{ super.create(); NonEntityManager.Reset(); EntityManager.Reset(); FlxState.bgColor = 4281576447; this.add(new FlxSprite(0, 0, AssetsG.SkyImg)).scrollFactor = new FlxSprite(); EatG.music.switchTheme(3); var _local1:Map = new Map(); _local1.Load(new StateTutorial.tutorial()); this.level = (_local1.layers.members[0] as TileMap); this.level.drawIndex = 0; this.level.startingIndex = 0; this.level.collideIndex = 192; this.add(this.level); LevelManager.placeEnviromentalObjects(this.level); var _local2:Text = new Text((12 * 16), (10 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n Press \tspace \n or \tZ to jump"; _local2.color = 4294967295; this.add(_local2); _local2 = new Text((22 * 16), (8 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n move in front of\n the ladder and\n press \tup to\n climb"; _local2.color = 4294967295; this.add(_local2); _local2 = new Text((44 * 16), (4 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n Drop down from here\n You won't take damage"; _local2.color = 4294967295; this.add(_local2); _local2 = new Text(((61 * 16) - 8), (12 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n Spikes can mean\n instant death for\n you or enemies"; _local2.color = 4294967295; this.add(_local2); _local2 = new Text(((78 * 16) - 8), (2 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n There are enemies below\n drop down and fight your\n way through using \tX "; _local2.color = 4294967295; this.add(_local2); _local2 = new Text(((78 * 16) - 8), (4 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n Attacking while using \tdown \n will allow you to fire\n down with ranged weapons "; _local2.color = 4294967295; this.add(_local2); _local2 = new Text(((80 * 16) - 8), (11 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n use your special attack \tC \n special attacks use energy\n energy recharges over time"; _local2.color = 4294967295; this.add(_local2); _local2 = new Text(((96 * 16) - 8), (8 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n Some damage works\n over time watch for\n the icon above you"; _local2.color = 4294967295; this.add(_local2); _local2 = new Text(((114 * 16) - 8), (11 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n Traps provide \nhaZards in the\n form of fire\n or arrows"; _local2.color = 4294967295; this.add(_local2); _local2 = new Text(((130 * 16) - 8), (8 * 16), "Invalid"); _local2.alignment = "center"; _local2.text = "\n Special attacks can\n be used in various\n ways to give you lift,\n so experiment"; _local2.color = 4294967295; this.add(_local2); var _local3:Loot = EntityManager.GetLoot(); if (_local3 != null){ _local3.x = ((35 * TileMap.TW) - 8); _local3.y = (15 * TileMap.TH); _local3.value = 1000; }; this.add(EntityManager.ActorNonMapList); this.add(EntityManager.ActorList); this.add(EntityManager.FallingObjectList); this.add(EntityManager.HeadList); this.add(EntityManager.LadderList); this.add(EntityManager.LootList); this.add(EntityManager.SpikesList); this.add(EntityManager.TriggerList); this.add(EntityManager.TurretList); this.add(NonEntityManager.Emitters); this.add(NonEntityManager.Explosions); this.add(NonEntityManager.FloatingTexts); this.add(NonEntityManager.Projectiles); this.add(NonEntityManager.StatusEffects); this.add(NonEntityManager.Props); this.add(NonEntityManager.Weapons); this.exitDoor = new FlxSprite((((this.level.widthInTiles - 3) * TileMap.TW) + 8), ((11 * TileMap.TH) - 8)); this.exitDoor.createGraphic(16, 24, 4294967295); this.exitDoor.visible = false; this.add(this.exitDoor); this.allActors = new FlxGroup(); this.allActors.add(EntityManager.ActorList); this.allActors.add(EntityManager.ActorNonMapList); this.collidesVsPlayerOnly = new FlxGroup(); this.collidesVsPlayerOnly.add(EntityManager.LootList); this.collidesVsPlayerOnly.add(EntityManager.ActorNonMapList); this.collidesVsPlayerOnly.add(EntityManager.LadderList); this.collidesVsPlayerOnly.add(EntityManager.TrapDoorList); this.collidesVsActors = new FlxGroup(); this.collidesVsActors.add(NonEntityManager.weaponList); this.collidesVsActors.add(NonEntityManager.projectileList); this.collidesVsActors.add(NonEntityManager.explosionList); this.collidesVsActors.add(EntityManager.FallingObjectList); this.collidesVsActors.add(EntityManager.SpikesList); this.collidesVsActors.add(EntityManager.TriggerList); this.collidesVsMap = new FlxGroup(); this.collidesVsMap.add(EntityManager.LootList); this.collidesVsMap.add(EntityManager.ActorList); this.collidesVsMap.add(NonEntityManager.projectileList); this.collidesVsMap.add(NonEntityManager.emitterList); this.collidesVsMap.add(NonEntityManager.explosivesList); healthMeter = new Meter(1, 1); healthMeter.scrollFactor = new FlxPoint(); healthMeter.loadGraphic(AssetsG.healthImg); healthMeter.fillColor = Meter.FILL_RED; healthMeter.fillOffset = new FlxPoint(11, 4); healthMeter.fillWidthMax = 81; healthMeter.current = (healthMeter.max = 100); this.add(healthMeter); manaMeter = new Meter(1, 11); manaMeter.scrollFactor = new FlxPoint(); manaMeter.loadGraphic(AssetsG.energyImg); manaMeter.fillColor = Meter.FILL_BLUE; manaMeter.fillOffset = new FlxPoint(11, 3); manaMeter.fillWidthMax = 81; manaMeter.current = (manaMeter.max = 100); this.add(manaMeter); this.player = EntityManager.GetActor(); player.x = ((3 * TileMap.TW) + 8); player.y = (15 * TileMap.TH); this.player.Controller = new RiflemanController(); this.player.health = (this.player.healthMax = 300); this.player.preferredDirection = (this.player.facing = FlxSprite.RIGHT); FlxG.follow(this.player); FlxG.followAdjust(1, 0); FlxG.followBounds(0, 0, this.level.width, this.level.height); FlxG.flash.start(4278190080, 0.5); } } }//package
Section 310
//StateTutorial_tutorial (StateTutorial_tutorial) package { import mx.core.*; public class StateTutorial_tutorial extends ByteArrayAsset { } }//package
Section 311
//StatsArea (StatsArea) package { public class StatsArea { public var enemiesLeftAlive:Array; public var jumpCount:uint;// = 0 public var enemiesKilled:Array; public var attackPrimaryCount:uint;// = 0 public var damageDelt:uint;// = 0 public var commonersLost:uint;// = 0 public var attackSecondaryCount:Number;// = 0 public var trapsSprung:uint;// = 0 public var damageFromEnemies:Array; public var distanceClimbed:Number;// = 0 public var timeElapsed:Number;// = 0 public var distanceFallen:Number;// = 0 public var distanceTravelled:Number;// = 0 public function StatsArea(){ var _local1:int; damageFromEnemies = []; enemiesLeftAlive = []; enemiesKilled = []; super(); _local1 = 0; while (_local1 < SaveData.ENEMY_MAX) { this.damageFromEnemies[_local1] = 0; this.enemiesLeftAlive[_local1] = 0; this.enemiesKilled[_local1] = 0; _local1++; }; } } }//package
Section 312
//StatsPlay (StatsPlay) package { public class StatsPlay { public var killedByEnemyType:uint;// = 0 public var energyCurrent:uint;// = 0 public var areaStats:Array; public var playerClass:uint;// = 0 public var wealthScore:uint;// = 0 public var experience:uint;// = 0 public var healthCurrent:uint;// = 0 public function StatsPlay(_arg1:uint=2){ areaStats = []; super(); this.playerClass = _arg1; } public function IsNewGame():Boolean{ return (((this.AreaCount)==1) ? true : false); } public function get Experience():uint{ return (this.experience); } public function get Wealth():uint{ return (this.wealthScore); } public function set Energy(_arg1:uint):void{ this.energyCurrent = _arg1; } public function get Class():uint{ return (this.playerClass); } public function set Wealth(_arg1:uint):void{ this.wealthScore = _arg1; } public function set Experience(_arg1:uint):void{ this.experience = _arg1; } public function get Energy():uint{ return (this.energyCurrent); } public function get AreaCount():uint{ return (this.areaStats.length); } public function get ThisArea():StatsArea{ return (this.areaStats[(this.areaStats.length - 1)]); } public function NewArea():void{ this.areaStats[this.areaStats.length] = new StatsArea(); } public function set Health(_arg1:uint):void{ this.healthCurrent = _arg1; } public function get Health():uint{ return (this.healthCurrent); } } }//package
Section 313
//StatsSession (StatsSession) package { public class StatsSession { public var playsStats:Array; public var elapsedTimeInMenues:Number;// = 0 public function StatsSession(){ playsStats = []; super(); } public function NewPlay(_arg1:uint):void{ this.playsStats[this.playsStats.length] = new StatsPlay(_arg1); } public function set ElapsedTimeInMenues(_arg1:Number):void{ this.elapsedTimeInMenues = _arg1; } public function get ThisPlay():StatsPlay{ var _local1:int = (this.playsStats.length - 1); if (_local1 > -1){ return (this.playsStats[(this.playsStats.length - 1)]); }; return (null); } public function get ElapsedTimeInMenues():Number{ return (this.elapsedTimeInMenues); } } }//package
Section 314
//StatusEffect (StatusEffect) package { import org.flixel.*; public class StatusEffect extends FlxSprite { public var lifetimer:Number; public var damageDieCount:int;// = 1 public var lifetime:Number;// = 1 public var target:Entity; public var damageMod:int;// = 0 public var refireTimer:Number; public var damageTypeFire:uint; public var refireRate:Number;// = 0.25 public var damageTypePoison:uint; public var damageDieSize:int;// = 2 public var ApplyEffect:Function; public function StatusEffect(_arg1:int=0, _arg2:int=0){ damageTypePoison = Actor.DAMAGE_STATUS_POISON; damageTypeFire = Actor.DAMAGE_STATUS_FIRE; super(_arg1, _arg2); this.kill(); } public function init(_arg1:Entity):void{ this.target = _arg1; this.reset(0, 0); this.lifetimer = 0; this.refireTimer = 0; this.visible = true; this.loadGraphic(AssetsG.poisonImg); } override public function update():void{ if (this.target == null){ this.kill(); return; }; if ((((this.lifetimer >= this.lifetime)) || ((this.target.exists == false)))){ this.kill(); return; }; this.lifetimer = (this.lifetimer + FlxG.elapsed); super.update(); this.x = ((this.target.x + (this.target.width / 2)) - (this.width / 2)); this.y = (this.target.y - 16); if (this.ApplyEffect != null){ this.refireTimer = (this.refireTimer + FlxG.elapsed); if (this.refireTimer >= this.refireRate){ this.refireTimer = (this.refireTimer - this.refireRate); this.ApplyEffect(this.target); }; }; } override public function kill():void{ super.kill(); this.visible = false; this.target = null; } public function AssignDamage(_arg1:int=1, _arg2:int=1, _arg3:int=0):void{ this.damageDieCount = _arg1; this.damageDieSize = _arg2; this.damageMod = _arg3; } public function ApplyFire(_arg1:Entity):void{ var _local2:int; if ((_arg1 is Actor)){ _local2 = UtilsG.dice(this.damageDieCount, this.damageDieSize, this.damageMod); (_arg1 as Actor).TakeDamage(_local2, this.damageTypeFire); }; } public function ApplyPoison(_arg1:Entity):void{ var _local2:int; if ((_arg1 is Actor)){ _local2 = UtilsG.dice(this.damageDieCount, this.damageDieSize, this.damageMod); (_arg1 as Actor).TakeDamage(_local2, this.damageTypePoison); }; } public static function EventBurn(_arg1:Actor=null):void{ if (_arg1 == null){ return; }; if ((_arg1 is Actor) != true){ return; }; if (((_arg1 as Actor).controller is SmolderingManController)){ return; }; var _local2:StatusEffect = NonEntityManager.GetStatusEffect(); if (_local2 == null){ return; }; _local2.init(_arg1); _local2.loadGraphic(AssetsG.burnImg); _local2.lifetime = 2; _local2.ApplyEffect = _local2.ApplyFire; if (SaveData.ThisSession.ThisPlay != null){ _local2.AssignDamage((2 + SaveData.ThisSession.ThisPlay.AreaCount), 4, 0); } else { _local2.AssignDamage(2, 4, 0); }; } public static function EventPoison(_arg1:FlxObject=null):void{ if (_arg1 == null){ return; }; if ((_arg1 is Actor) != true){ return; }; var _local2:StatusEffect = NonEntityManager.GetStatusEffect(); if (_local2 == null){ return; }; _local2.init((_arg1 as Actor)); _local2.lifetime = 2; _local2.ApplyEffect = _local2.ApplyPoison; if (SaveData.ThisSession.ThisPlay != null){ _local2.AssignDamage((2 + SaveData.ThisSession.ThisPlay.AreaCount), 4, 0); } else { _local2.AssignDamage(2, 4, 0); }; } } }//package
Section 315
//SubmitterProxy (SubmitterProxy) package { import flash.events.*; import flash.display.*; import com.spilgames.api.*; import flash.system.*; public class SubmitterProxy extends MovieClip { public var m_scoreXMLData:XML; public var m_achievXMLData:XML; private var parentObj; public var m_scoreServerTimeXMLData:XML; private static var _failed:Boolean = false; private static var _loading:Boolean = false; private static var _initialised:Boolean = false; private static var SpilComp:SpilGamesServices; public function SubmitterProxy():void{ var cld:*; super(); Security.allowDomain("*"); parentObj = this.parent; parentObj.stop(); var i:int = (parentObj.numChildren - 1); while (i >= 0) { cld = parentObj.getChildAt(i); if ((cld is MovieClip)){ cld.visible = false; } else { if (cld != null){ parentObj.removeChild(cld); }; }; i = (i - 1); }; try { parentObj["setLoader"] = setLoader; parentObj["isDomainAllowed"] = isDomainAllowed; parentObj["hasUserData"] = hasUserData; parentObj["_O0000Ol01"] = setLoader; parentObj["_O0Olll0lO"] = isDomainAllowed; } catch(e:Error) { trace(e); }; } private function SpilConfiguratorFailedToInitialise(_arg1:Event):void{ if (SpilComp){ SpilComp.removeEventListener("servicesReady", SpilConfiguratorReady); SpilComp.removeEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad); SpilComp.removeEventListener("servicesFailed", SpilConfiguratorFailedToInitialise); }; _failed = true; _loading = false; parentObj.dispatchEvent(new Event("LoadingFailed")); } public function SpilCallback(_arg1:int, _arg2:Object):void{ } private function onLoadDone():void{ parentObj["isSWFReady"] = isSWFReady; parentObj["setServerSelect"] = setServerSelect; parentObj["requestScoreServerTime"] = requestScoreServerTime; parentObj["getScoreServerTime"] = getScoreServerTime; parentObj["submitScore"] = submitScore; parentObj["requestHighscoreList"] = requestHighscoreList; parentObj["requestUserHighscoreList"] = requestUserHighscoreList; parentObj["submitGrantAward"] = submitGrantAward; parentObj["requestAwardList"] = requestAwardList; parentObj["requestAwardInfo"] = requestAwardInfo; parentObj["destroy"] = destroy; parentObj["getSpilGamesConnector"] = getSpilGamesConnector; parentObj["_O0O1l0OO0"] = isSWFReady; parentObj["_O0lOO010l"] = requestScoreServerTime; parentObj["_O01Ol1O1O"] = getScoreServerTime; parentObj["_O01lOO10O"] = submitScore; parentObj["_O110l10ll"] = requestHighscoreList; parentObj["_O11lll1OO0"] = requestUserHighscoreList; parentObj["_O00OOl1Ol"] = submitGrantAward; parentObj["_O1OlO10OO"] = requestAwardList; parentObj["_OOlOOOll1"] = requestAwardInfo; parentObj["_O010ll111"] = destroy; parentObj["OO00OO1l1l"] = OO00OO1l1l(); } private function processTimeResults(_arg1:int, _arg2:Object):void{ if (_arg2){ if (_arg2.errorMessage){ } else { if (_arg2.xml){ m_scoreServerTimeXMLData = _arg2.xml; }; }; } else { m_scoreServerTimeXMLData = new XML("<hyscore><time>123456789</time></hyscore>"); }; } private function isSWFReady():Boolean{ return (((SpilComp) && (SpilComp.isSWFReady()))); } private function requestAwardList():void{ if (SpilComp){ SpilComp.send("Awards", "getAwardList", processAwardResults, {userName:SpilComp.getUserName(), userHash:SpilComp.getUserHash()}); }; } public function set O1lll0ll0(_arg1:XML):void{ m_scoreServerTimeXMLData = _arg1; } public function OO00OO1l1l():SubmitterProxy{ return (this); } private function hasUserData():Boolean{ return (!(SpilComp.hasValidUserData())); } public function get O0l00l0O0():XML{ return (m_scoreXMLData); } private function destroy():void{ parentObj = null; m_scoreXMLData = null; m_achievXMLData = null; } private function requestScoreServerTime():void{ if (SpilComp){ SpilComp.send("Score", "checkServerTime", processTimeResults); }; } private function requestUserHighscoreList(_arg1:String):void{ if (SpilComp){ SpilComp.send("Score", "getUserRankList", processScoreResults, {targetUserName:_arg1}); }; } public function get O1OlOO00O():XML{ return (m_achievXMLData); } private function submitGrantAward(_arg1:String):void{ if (SpilComp){ SpilComp.send("Awards", "submitAward", processAwardResults, {tag:_arg1, userName:SpilComp.getUserName(), userHash:SpilComp.getUserHash()}); }; } private function setLoader(_arg1=null, _arg2:String="default", _arg3="", _arg4:int=0, _arg5:String="normal", _arg6:String="", _arg7:int=0, _arg8:int=0, _arg9:int=1, _arg10:Boolean=false, _arg11:int=1):void{ if (!_initialised){ trace("Initialising for the first time"); _initialised = true; if (_arg1){ SpilComp = SpilGamesServices.getInstance(); SpilComp.addEventListener("servicesReady", SpilConfiguratorReady); SpilComp.addEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad); SpilComp.addEventListener("servicesFailed", SpilConfiguratorFailedToInitialise); _loading = true; SpilComp.connect(_arg1); } else { throw (new Error("'container' cannot be null")); }; } else { trace("Initialisation called multiple times"); if (!_loading){ trace("Ready with loading"); if (!_failed){ trace("Simulate Submitter complete"); onLoadDone(); parentObj.dispatchEvent(new Event(Event.COMPLETE)); } else { trace("Simulate Submitter LoadingFailed"); parentObj.dispatchEvent(new Event("LoadingFailed")); }; } else { trace("Still loading"); }; }; } private function requestHighscoreList():void{ if (SpilComp){ SpilComp.send("Score", "getRankingList", processScoreResults, null); }; } public function set O0l00l0O0(_arg1:XML):void{ m_scoreXMLData = _arg1; } private function setServerSelect(_arg1:int):void{ if (SpilComp){ }; } private function requestAwardInfo(_arg1:int):void{ if (SpilComp){ SpilComp.send("Awards", "getAward", SpilCallback, {awardID:_arg1}); }; } public function set O1OlOO00O(_arg1:XML):void{ m_achievXMLData = _arg1; } private function processAwardResults(_arg1:int, _arg2:Object):void{ if (_arg2){ m_achievXMLData = _arg2.xml; } else { m_achievXMLData = new XML("<hyscor><awardid>147</awardid></hyscor>"); }; } public function getSpilGamesConnector(){ return (SpilComp); } public function get O1lll0ll0():XML{ return (m_scoreServerTimeXMLData); } private function processScoreResults(_arg1:int, _arg2:Object):void{ if (_arg2){ m_scoreXMLData = _arg2.xml; } else { m_scoreXMLData = <hyscor><resultset> <group>daily</group> <result> <position>1</position> <timestamp>1271247768</timestamp> <username>noot</username> <authenticated>1</authenticated> <score>2</score> <gamelevel>0</gamelevel> <country>NL</country> </result> </resultset> <resultset> <group>weekly</group> <result> <position>1</position> <timestamp>1271247768</timestamp> <username>noot</username> <authenticated>1</authenticated> <score>2</score> <gamelevel>0</gamelevel> <country>NL</country> </result> </resultset> <resultset> <group>monthly</group> <result> <position>1</position> <timestamp>1271247768</timestamp> <username>noot</username> <authenticated>1</authenticated> <score>2</score> <gamelevel>0</gamelevel> <country>NL</country> </result> </resultset> </hyscor> ; }; } private function getScoreServerTime():void{ if (SpilComp){ SpilComp.send("Score", "getLatestTimeCheck", processTimeResults); }; } private function SpilConfiguratorReady(_arg1:Event):void{ if (SpilComp){ SpilComp.removeEventListener("servicesReady", SpilConfiguratorReady); SpilComp.removeEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad); SpilComp.removeEventListener("servicesFailed", SpilConfiguratorFailedToInitialise); }; _loading = false; onLoadDone(); parentObj.dispatchEvent(new Event(Event.COMPLETE)); } private function doCommTest():String{ if (SpilComp){ return ("y"); }; return (("FAILED " + SpilComp)); } private function submitScore(_arg1:int):void{ if (SpilComp){ SpilComp.send("Score", "submitScore", processScoreResults, {score:_arg1, userName:SpilComp.getUserName(), userHash:SpilComp.getUserHash()}); }; } private function SpilConfiguratorFailedToLoad(_arg1:Event):void{ if (SpilComp){ SpilComp.removeEventListener("servicesReady", SpilConfiguratorReady); SpilComp.removeEventListener(IOErrorEvent.IO_ERROR, SpilConfiguratorFailedToLoad); SpilComp.removeEventListener("servicesFailed", SpilConfiguratorFailedToInitialise); }; trace("SpilConfiguratorFailedToLoad", _arg1.toString()); _failed = true; _loading = false; if (parentObj.hasEventListener(IOErrorEvent.IO_ERROR)){ parentObj.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR)); }; } private function onLegacyEvent(_arg1:Event):void{ dispatchEvent(_arg1); } private function isDomainAllowed(_arg1:Boolean=false):Boolean{ return (SpilComp.isDomainAllowed()); } private function setLoader2(_arg1=null, _arg2:String="default", _arg3:int=1, _arg4="", _arg5:int=0, _arg6:String="normal", _arg7:String="", _arg8:int=0, _arg9:int=0, _arg10:int=1, _arg11:Boolean=false, _arg12:int=1):void{ setLoader(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12); } } }//package
Section 316
//Text (Text) package { import org.flixel.*; public class Text extends FlxBitmapText { public var lifetime:Number;// = -1 public var elapsed:Number;// = 0 public function Text(_arg1:Number, _arg2:Number, _arg3:String=""){ super(_arg1, _arg2, _arg3, "left", AssetsG.fontImg, 9, 1, 0); this.createGraphic(1, 1, 0xFFFFFF); } override public function update():void{ super.update(); if (this.lifetime < 0){ return; }; this.elapsed = (this.elapsed - FlxG.elapsed); if (this.elapsed < 0){ this.kill(); }; this.alpha = (this.elapsed / this.lifetime); } override public function set color(_arg1:uint):void{ super.color = _arg1; } public function restart(_arg1:Number):void{ this.lifetime = _arg1; this.exists = true; this.visible = true; this.alpha = 1; this.elapsed = this.lifetime; } } }//package
Section 317
//TileMap (TileMap) package { import flash.geom.*; import org.flixel.*; public class TileMap extends FlxTilemap { public static const TW:uint = 16; public static const TH:uint = 16; public static const SpikedTileIndex:uint = 22; public function BlankMap(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=0, _arg5:uint=0, _arg6:uint=3):FlxTilemap{ var _local7:uint; var _local9:uint; heightInTiles = _arg1; var _local8:uint; while (_local8 < heightInTiles) { widthInTiles = _arg2; _local7 = 0; while (_local7 < widthInTiles) { _data[_data.length] = _arg6; _local7++; }; _local8++; }; totalTiles = (widthInTiles * heightInTiles); if (auto > OFF){ collideIndex = (startingIndex = (drawIndex = 1)); _local9 = 0; while (_local9 < totalTiles) { autoTile(_local9); _local9++; }; }; _pixels = FlxG.addBitmap(_arg3); _tileWidth = _arg4; if (_tileWidth == 0){ _tileWidth = _pixels.height; }; _tileHeight = _arg5; if (_tileHeight == 0){ _tileHeight = _tileWidth; }; _block.width = _tileWidth; _block.height = _tileHeight; width = (widthInTiles * _tileWidth); height = (heightInTiles * _tileHeight); _rects = new Array(totalTiles); _local9 = 0; while (_local9 < totalTiles) { updateTile(_local9); _local9++; }; _screenRows = (Math.ceil((FlxG.height / _tileHeight)) + 1); if (_screenRows > heightInTiles){ _screenRows = heightInTiles; }; _screenCols = (Math.ceil((FlxG.width / _tileWidth)) + 1); if (_screenCols > widthInTiles){ _screenCols = widthInTiles; }; refreshHulls(); return (this); } public function get Data():Array{ return (_data); } public function ChangeArea(_arg1:int, _arg2:int, _arg3:int, _arg4:int=1, _arg5:int=0, _arg6:int=1, _arg7:int=0):void{ var _local9:int; var _local8:int = (_arg2 - _arg7); while (_local8 < (_arg2 + _arg6)) { if ((((_local8 < 1)) || ((_local8 >= (this.heightInTiles - 1))))){ } else { _local9 = (_arg1 - _arg5); while (_local9 < (_arg1 + _arg4)) { if ((((_local9 < 1)) || ((_local9 >= (this.widthInTiles - 1))))){ } else { this.setTile(_local9, _local8, _arg3); }; _local9++; }; }; _local8++; }; } public static function TranslatePixelsToTiles(_arg1:int, _arg2:int):Point{ return (new Point(new int((_arg1 / 16)), new int((_arg2 / 16)))); } } }//package
Section 318
//TrapDoor (TrapDoor) package { import org.flixel.*; public class TrapDoor extends Trigger { public var tileToCloseOff:Array; public var mobsToWatch:FlxGroup; public var triggered:Boolean;// = false public var oldTiles:Array; public function TrapDoor(_arg1:int=0, _arg2:int=0){ super(_arg1, _arg2); tileToCloseOff = []; oldTiles = []; mobsToWatch = new FlxGroup(); } override public function OnTriggered(_arg1:Entity):void{ var _local5:FlxPoint; var _local6:int; if (triggered == true){ return; }; triggered = true; FlxG.quake.start(0.005); var _local2:FlxSound = new FlxSound(); _local2.loadEmbedded(AssetsG.sndExplosion); _local2.volume = 0.5; _local2.play(); var _local3:int = tileToCloseOff.length; var _local4:int; while (_local4 < _local3) { _local5 = (tileToCloseOff[_local4] as FlxPoint); _local6 = EatG.Level.getTile(_local5.x, _local5.y); oldTiles[oldTiles.length] = _local6; EatG.Level.setTile(_local5.x, _local5.y, 248, true); _local4++; }; this.solid = false; } override public function update():void{ var _local1:int; var _local2:int; var _local3:FlxSound; var _local4:FlxPoint; var _local5:int; super.update(); if (mobsToWatch.countLiving() <= 0){ _local1 = tileToCloseOff.length; _local2 = 0; while (_local2 < _local1) { FlxG.quake.start(0.005); _local3 = new FlxSound(); _local3.loadEmbedded(AssetsG.sndExplosion); _local3.volume = 0.5; _local3.play(); _local4 = (tileToCloseOff[_local2] as FlxPoint); _local5 = oldTiles[_local2]; EatG.Level.setTile(_local4.x, _local4.y, _local5, true); _local2++; }; this.kill(); }; } override public function reset(_arg1:Number, _arg2:Number):void{ tileToCloseOff = []; oldTiles = []; mobsToWatch = null; triggered = false; super.reset(_arg1, _arg2); } } }//package
Section 319
//Trigger (Trigger) package { import org.flixel.*; public class Trigger extends Entity { public var elapsedCounter:Number;// = 0 public var listeners:FlxGroup; public var uses:int;// = -1 public var refireRate:Number;// = 1 public static const UNLIMITED:int = -1; public static const VISIBLE:Boolean = false; public function Trigger(_arg1:int=0, _arg2:int=0){ listeners = new FlxGroup(); super(); this.x = _arg1; this.y = _arg2; this.elapsedCounter = this.refireRate; this.createGraphic(8, 8, 2298413311); this.visible = Trigger.VISIBLE; } override public function OnOverlap(_arg1:FlxObject):void{ this.OnTriggered((_arg1 as Entity)); } override public function update():void{ this.elapsedCounter = (this.elapsedCounter + FlxG.elapsed); super.update(); } override public function reset(_arg1:Number, _arg2:Number):void{ solid = true; refireRate = 1; listeners = new FlxGroup(); uses = UNLIMITED; elapsedCounter = 0; super.reset(_arg1, _arg2); } public function OnTriggered(_arg1:Entity):void{ if (this.elapsedCounter < this.refireRate){ return; }; this.elapsedCounter = 0; var _local2:int = this.listeners.members.length; var _local3:int; while (_local3 < _local2) { (this.listeners.members[_local3] as Turret).fire(); _local3++; }; if (this.uses == UNLIMITED){ return; }; this.uses--; if (this.uses == 0){ this.kill(); }; } } }//package
Section 320
//Turret (Turret) package { import org.flixel.*; public class Turret extends Entity { public var elapsedCounter:Number;// = 0 public var ammoCount:int;// = -1 public var refireRate:Number;// = 1 public var unloadAmmo:Boolean;// = false public var damageStream:Melee; public var firedOnce:Boolean;// = false public var type:uint;// = 10 public static const MINMON_LAUNCHER:uint = 12; public static const ARROW_LAUNCHER:uint = 10; public static const FLAME_THROWER:uint = 11; public function Turret(_arg1:int=0, _arg2:int=0){ super(_arg1, _arg2); this.createGraphic(16, 16, 2281736447); this.visible = false; } override public function kill():void{ super.kill(); } override public function update():void{ this.elapsedCounter = (this.elapsedCounter + FlxG.elapsed); if (this.type == MINMON_LAUNCHER){ if (this.unloadAmmo == true){ this.fire(); }; }; if (this.type == FLAME_THROWER){ if (this.unloadAmmo == true){ this.fire(); }; }; super.update(); } override public function reset(_arg1:Number, _arg2:Number):void{ this.ammoCount = -1; this.elapsedCounter = this.refireRate; this.damageStream = NonEntityManager.GetWeapon(); if (this.damageStream == null){ return; }; this.damageStream.loadGraphic(AssetsG.firespurtImg, true, true, 32, 32); visible = false; this.damageStream.addAnimation("idle", [0, 0]); this.damageStream.addAnimation("run", [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], 24); this.damageStream.visible = false; this.damageStream.collisionEvent = StatusEffect.EventBurn; this.damageStream.owner = this; super.reset(_arg1, _arg2); } public function fire():void{ var _local1:Projectile; var _local2:Actor; if (this.elapsedCounter < this.refireRate){ return; }; if (this.ammoCount == 0){ return; }; if (this.firedOnce == false){ if (SaveData.ThisSession.ThisPlay != null){ SaveData.ThisSession.ThisPlay.ThisArea.trapsSprung = (SaveData.ThisSession.ThisPlay.ThisArea.trapsSprung + 1); }; }; this.firedOnce = true; if (this.type == ARROW_LAUNCHER){ _local1 = NonEntityManager.GetProjectile(); if (_local1 == null){ return; }; _local1.Controller = new PoisonArrowController(); if (this.facing == FlxSprite.RIGHT){ _local1.x = (this.x + this.width); } else { _local1.x = (this.x - _local1.width); _local1.velocity.x = (_local1.velocity.x * -1); }; _local1.y = (this.y + 7); _local1.launcher = this; _local1.facing = this.facing; _local1.damageType = Actor.DAMAGE_PHYSICAL; _local1.AssignDamage(2, 6); _local1.Fire(); this.ammoCount--; } else { if (this.type == FLAME_THROWER){ if (this.facing == FlxSprite.RIGHT){ this.damageStream.x = (this.x + this.width); } else { this.damageStream.x = (this.x - this.damageStream.width); }; this.damageStream.y = (this.y - (this.damageStream.height / 2)); this.damageStream.facing = this.facing; this.damageStream.Attack(); this.unloadAmmo = true; this.ammoCount--; if (this.ammoCount == 0){ this.unloadAmmo = false; this.damageStream.visible = false; this.ammoCount = 60; this.damageStream.victims.length = 0; }; } else { if (this.type == MINMON_LAUNCHER){ this.unloadAmmo = true; _local2 = EntityManager.GetActor(); if (_local2 == null){ return; }; _local2.y = this.y; if (this.facing == FlxSprite.RIGHT){ _local2.x = (this.x + this.width); } else { _local2.x = (this.x - 16); }; _local2.Controller = new MinMonController(); this.ammoCount--; }; }; }; this.elapsedCounter = 0; } } }//package
Section 321
//UtilsG (UtilsG) package { import org.flixel.*; public class UtilsG { public static var s_GameRand_High:uint = 1; public static var s_GameRand_Low:uint = (1 ^ 1231121986); public static function dice(_arg1:int, _arg2:int, _arg3:int=0):int{ var _local5:Number; var _local4:int; while (_arg1--) { _local5 = gameRand(); _local4 = (_local4 + (Math.floor((_local5 * _arg2)) + 1)); }; return ((_local4 + _arg3)); } public static function NormalizeVector(_arg1:FlxPoint, _arg2:Number=1):void{ var _local3:Number = Math.sqrt(((_arg1.x * _arg1.x) + (_arg1.y * _arg1.y))); _arg1.x = ((_arg1.x / _local3) * _arg2); _arg1.y = ((_arg1.y / _local3) * _arg2); } public static function VectorLength(_arg1:FlxPoint):Number{ return (Math.sqrt(((_arg1.x * _arg1.x) + (_arg1.y * _arg1.y)))); } public static function seedRand(_arg1:uint):void{ s_GameRand_High = _arg1; s_GameRand_Low = (_arg1 ^ 1231121986); } public static function VectorLengthSquared(_arg1:FlxPoint):Number{ return (((_arg1.x * _arg1.x) + (_arg1.y * _arg1.y))); } public static function gameRand():Number{ s_GameRand_High = ((s_GameRand_High << 16) + (s_GameRand_High >> 16)); s_GameRand_High = (s_GameRand_High + s_GameRand_Low); s_GameRand_Low = (s_GameRand_Low + s_GameRand_High); return ((s_GameRand_High / uint.MAX_VALUE)); } } }//package
Section 322
//WordBlastController (WordBlastController) package { import org.flixel.*; public class WordBlastController extends ProjectileController { public var word:Text; override public function init(_arg1:Projectile):void{ var _local2:Array; _local2 = ["YOU CAD!", "I NEVER!", "MY WORD!", "INCONCEIVABLE!", "PHILISTINE!", "RUFFIAN!", "VAGRANT!", "WORKING-CLASS SWINE!"]; super.init(_arg1); this.projectile.velocity.x = 100; this.projectile.velocity.y = 0; this.projectile.Arcs = false; this.projectile.acceleration.y = 0; this.projectile.visible = false; this.projectile.bouncesOnContact = false; this.word = null; this.word = (NonEntityManager.FloatingTexts.getFirstAvail as Text); this.word.x = this.projectile.x; this.word.y = this.projectile.y; this.word.velocity = new FlxPoint(); this.word.acceleration = new FlxPoint(); this.word.text = _local2[(UtilsG.dice(1, _local2.length) - 1)]; this.word.color = 4294958336; this.word.restart(-1); this.projectile.width = this.word.width; this.projectile.height = this.word.height; } override public function SetupEmitter():void{ super.SetupEmitter(); } override public function update():void{ super.update(); this.projectile.y = (this.projectile.y + (Math.sin((this.projectile.x / 20)) * 1.3)); if (this.word == null){ return; }; this.word.x = this.projectile.x; this.word.y = this.projectile.y; } public function kill():void{ if (this.word != null){ this.word.kill(); }; this.word = null; } } }//package
Section 323
//WraithController (WraithController) package { import org.flixel.*; public class WraithController extends ActorController { public var fadeIn:Boolean;// = false override public function init(_arg1:Actor):void{ super.init(_arg1); this.actor.loadGraphic(AssetsG.ghostImg, true, true, 33, 35); this.actor.alpha = 0.4; this.actor.maxVelocity = new FlxPoint(25, 25); this.actor.runSpeed = 50; this.actor.gravity = 0; this.actor.RestoreGravity(_arg1.gravity); this.actor.addAnimation("idle", [0, 1, 2, 3], 7, true); this.actor.play("idle"); this.enemyType = SaveData.ENEMY_WRAITH; this.actor.collideAttack = new Attack(this.actor); this.actor.DeriveStats(); } override public function applyLevelChanges(_arg1:uint):void{ super.applyLevelChanges(_arg1); this.actor.healthMax = (85 + (30 * (_arg1 - 1))); this.actor.health = this.actor.healthMax; this.actor.experience = (300 + (30 * (_arg1 - 1))); this.actor.collideAttack.setDamage((4 + _arg1), 8, 0); } override public function update():void{ var _local1:FlxPoint = new FlxPoint(); _local1.x = (EatG.PC.x - this.actor.x); _local1.y = (EatG.PC.y - this.actor.y); if (_local1.x < 0){ this.actor.facing = FlxSprite.LEFT; } else { this.actor.facing = FlxSprite.RIGHT; }; UtilsG.NormalizeVector(_local1, this.actor.runSpeed); this.actor.acceleration = _local1; if (this.fadeIn == true){ this.actor.alpha = (this.actor.alpha + (0.3 * FlxG.elapsed)); if (this.actor.alpha >= 1){ this.fadeIn = false; }; } else { this.actor.alpha = (this.actor.alpha - (0.3 * FlxG.elapsed)); if (this.actor.alpha <= 0){ this.fadeIn = true; }; }; } } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClipUses:1Used by:3 368
Symbol 3 MovieClip {spill.localisation.LanguageSelectBox} [spill.localisation.LanguageSelectBox]Uses:2
Symbol 4 GraphicUsed by:5
Symbol 5 MovieClipUses:4Used by:6
Symbol 6 MovieClipUses:5Used by:144
Symbol 7 GraphicUsed by:18
Symbol 8 GraphicUsed by:18
Symbol 9 GraphicUsed by:18
Symbol 10 GraphicUsed by:18 135
Symbol 11 GraphicUsed by:18
Symbol 12 GraphicUsed by:18
Symbol 13 GraphicUsed by:18
Symbol 14 GraphicUsed by:18
Symbol 15 GraphicUsed by:18
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:18
Symbol 18 MovieClipUses:7 8 9 10 11 12 13 14 15 17Used by:144
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClipUses:19Used by:144
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClipUses:21Used by:144
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClipUses:23Used by:144
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClipUses:25Used by:144
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClipUses:27Used by:144
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:144
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:144
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClipUses:33Used by:144
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClipUses:35Used by:144
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:37Used by:144
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:39Used by:144
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClipUses:41Used by:144
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:144
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClipUses:45Used by:144
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClipUses:47Used by:49
Symbol 49 MovieClipUses:48Used by:144
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClipUses:50Used by:52
Symbol 52 MovieClipUses:51Used by:144
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:55
Symbol 55 MovieClipUses:54Used by:144
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClipUses:56Used by:58
Symbol 58 MovieClipUses:57Used by:144
Symbol 59 GraphicUsed by:60
Symbol 60 MovieClipUses:59Used by:61
Symbol 61 MovieClipUses:60Used by:144
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClipUses:62Used by:64
Symbol 64 MovieClipUses:63Used by:144
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClipUses:65Used by:67
Symbol 67 MovieClipUses:66Used by:144
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClipUses:68Used by:70
Symbol 70 MovieClipUses:69Used by:144
Symbol 71 GraphicUsed by:72
Symbol 72 MovieClipUses:71Used by:73
Symbol 73 MovieClipUses:72Used by:144
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClipUses:74Used by:76
Symbol 76 MovieClipUses:75Used by:144
Symbol 77 GraphicUsed by:78
Symbol 78 MovieClipUses:77Used by:79
Symbol 79 MovieClipUses:78Used by:144
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClipUses:80Used by:82
Symbol 82 MovieClipUses:81Used by:144
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClipUses:83Used by:85
Symbol 85 MovieClipUses:84Used by:144
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClipUses:86Used by:144
Symbol 88 GraphicUsed by:89
Symbol 89 MovieClipUses:88Used by:144
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClipUses:90Used by:144
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClipUses:92Used by:144
Symbol 94 GraphicUsed by:95
Symbol 95 MovieClipUses:94Used by:144
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClipUses:96Used by:144
Symbol 98 GraphicUsed by:99
Symbol 99 MovieClipUses:98Used by:144
Symbol 100 GraphicUsed by:101
Symbol 101 MovieClipUses:100Used by:144
Symbol 102 GraphicUsed by:103
Symbol 103 MovieClipUses:102Used by:144
Symbol 104 BitmapUsed by:105
Symbol 105 GraphicUses:104Used by:106
Symbol 106 MovieClipUses:105Used by:144
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:109
Symbol 109 MovieClipUses:108Used by:144
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClipUses:110Used by:144
Symbol 112 GraphicUsed by:113
Symbol 113 MovieClipUses:112Used by:144
Symbol 114 GraphicUsed by:115
Symbol 115 MovieClipUses:114Used by:144
Symbol 116 GraphicUsed by:117
Symbol 117 MovieClipUses:116Used by:144
Symbol 118 GraphicUsed by:119
Symbol 119 MovieClipUses:118Used by:144
Symbol 120 GraphicUsed by:121
Symbol 121 MovieClipUses:120Used by:144
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClipUses:122Used by:144
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClipUses:124Used by:144
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClipUses:126Used by:128
Symbol 128 MovieClipUses:127Used by:144
Symbol 129 GraphicUsed by:131
Symbol 130 GraphicUsed by:131 142
Symbol 131 MovieClipUses:129 130Used by:136
Symbol 132 GraphicUsed by:135
Symbol 133 GraphicUsed by:134
Symbol 134 MovieClipUses:133Used by:135
Symbol 135 MovieClipUses:132 134 10Used by:136 143
Symbol 136 MovieClipUses:131 135Used by:144
Symbol 137 FontUsed by:139
Symbol 138 FontUsed by:139
Symbol 139 TextUses:137 138Used by:140
Symbol 140 MovieClipUses:139Used by:142
Symbol 141 GraphicUsed by:142
Symbol 142 MovieClipUses:140 141 130Used by:143
Symbol 143 MovieClipUses:142 135Used by:144
Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo]Uses:6 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 49 52 55 58 61 64 67 70 73 76 79 82 85 87 89 91 93 95 97 99 101 103 106 109 111 113 115 117 119 121 123 125 128 136 143
Symbol 145 GraphicUsed by:147
Symbol 146 MovieClip {SubmitterProxy} [SubmitterProxy]Used by:147
Symbol 147 MovieClip {Spill.Components.Submitter} [Spill.Components.Submitter]Uses:145 146
Symbol 148 Sound {org.flixel.FlxGame_SndFlixel} [org.flixel.FlxGame_SndFlixel]
Symbol 149 Sound {org.flixel.FlxGame_SndBeep} [org.flixel.FlxGame_SndBeep]
Symbol 150 GraphicUsed by:179
Symbol 151 FontUsed by:152
Symbol 152 EditableTextUses:151Used by:179
Symbol 153 GraphicUsed by:179 186
Symbol 154 GraphicUsed by:178
Symbol 155 GraphicUsed by:178
Symbol 156 GraphicUsed by:178
Symbol 157 GraphicUsed by:178
Symbol 158 GraphicUsed by:178
Symbol 159 GraphicUsed by:178
Symbol 160 GraphicUsed by:178
Symbol 161 GraphicUsed by:178
Symbol 162 GraphicUsed by:178
Symbol 163 GraphicUsed by:178
Symbol 164 GraphicUsed by:178
Symbol 165 GraphicUsed by:178
Symbol 166 GraphicUsed by:178
Symbol 167 GraphicUsed by:178
Symbol 168 GraphicUsed by:178
Symbol 169 GraphicUsed by:178
Symbol 170 GraphicUsed by:178
Symbol 171 GraphicUsed by:178
Symbol 172 GraphicUsed by:178
Symbol 173 GraphicUsed by:178
Symbol 174 BitmapUsed by:175
Symbol 175 GraphicUses:174Used by:178
Symbol 176 BitmapUsed by:177
Symbol 177 GraphicUses:176Used by:178
Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83]Uses:154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 175 177Used by:179 186
Symbol 179 MovieClip {spill.localisation.LanguageSelectBox_mc} [spill.localisation.LanguageSelectBox_mc]Uses:150 152 153 178
Symbol 180 GraphicUsed by:183
Symbol 181 GraphicUsed by:183
Symbol 182 GraphicUsed by:183
Symbol 183 ButtonUses:180 181 182Used by:186
Symbol 184 FontUsed by:185
Symbol 185 EditableTextUses:184Used by:186
Symbol 186 MovieClipUses:183 153 178 185Used by:189
Symbol 187 GraphicUsed by:188
Symbol 188 MovieClipUses:187Used by:189
Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc]Uses:186 188
Symbol 190 Sound {AssetsG_sndDervish} [AssetsG_sndDervish]
Symbol 191 Sound {AssetsG_music3} [AssetsG_music3]
Symbol 192 Sound {AssetsG_music2} [AssetsG_music2]
Symbol 193 Sound {AssetsG_music4} [AssetsG_music4]
Symbol 194 Sound {AssetsG_sndShotgun} [AssetsG_sndShotgun]
Symbol 195 Sound {AssetsG_sndShadowBolt} [AssetsG_sndShadowBolt]
Symbol 196 Sound {AssetsG_music1} [AssetsG_music1]
Symbol 197 Sound {AssetsG_sndSwordSwing} [AssetsG_sndSwordSwing]
Symbol 198 Sound {AssetsG_sndMagicMissile} [AssetsG_sndMagicMissile]
Symbol 199 Sound {AssetsG_sndLanding} [AssetsG_sndLanding]
Symbol 200 Sound {AssetsG_sndRifle} [AssetsG_sndRifle]
Symbol 201 Sound {AssetsG_sndHurt} [AssetsG_sndHurt]
Symbol 202 Sound {AssetsG_sndExplosion} [AssetsG_sndExplosion]
Symbol 203 Sound {AssetsG_sndLootGrab} [AssetsG_sndLootGrab]
Symbol 204 Bitmap {AssetsG_guySwordImg}
Symbol 205 BinaryData {MapsG_wm_room_h_platform_smen_skulls_01}
Symbol 206 BinaryData {MapsG_jdj_room_m_angelOfSpikes}
Symbol 207 BinaryData {MapsG_wgm_ladder_mage_pit}
Symbol 208 BinaryData {MapsG_ph_room_e_skullmons}
Symbol 209 BinaryData {MapsG_wgm_simple_gap}
Symbol 210 Bitmap {AssetsG_guyMageShadowImg}
Symbol 211 BinaryData {MapsG_wgm_column_room}
Symbol 212 BinaryData {MapsG_wgm_tunnel_room_01}
Symbol 213 BinaryData {MapsG_wgm_windows_minmons}
Symbol 214 Bitmap {AssetsG_poisonImg}
Symbol 215 Bitmap {org.flixel.data.FlxPanel_ImgReddit}
Symbol 216 BinaryData {MapsG_jdj_room_m_minmonPit}
Symbol 217 BinaryData {MapsG_wgm_ladder_tower}
Symbol 218 BinaryData {MapsG_jdj_ent_01}
Symbol 219 Bitmap {org.flixel.data.FlxMouse_ImgDefaultCursor}
Symbol 220 BinaryData {MapsG_jdj_room_m_01}
Symbol 221 Bitmap {AssetsG_MagicianPosterImg}
Symbol 222 Bitmap {org.flixel.FlxPreloader_ImgLogo}
Symbol 223 Bitmap {org.flixel.data.FlxPanel_ImgStumble}
Symbol 224 BinaryData {MapsG_wgm_spike_platform}
Symbol 225 Bitmap {org.flixel.data.FlxPause_ImgKeyPlus}
Symbol 226 Bitmap {AssetsG_skullImg}
Symbol 227 BinaryData {MapsG_ph_room__spikecolumnsingle}
Symbol 228 BinaryData {MapsG_ph_room__spikecolumns}
Symbol 229 Bitmap {AssetsG_levelImg}
Symbol 230 BinaryData {MapsG_ph_room__spakes}
Symbol 231 Bitmap {AssetsG_SkyImg}
Symbol 232 Bitmap {AssetsG_energyImg}
Symbol 233 BinaryData {MapsG_wgm_broken_floor_with_skulls}
Symbol 234 Bitmap {AssetsG_pbDownImg}
Symbol 235 BinaryData {MapsG_wgm_column_platforms}
Symbol 236 Bitmap {AssetsG_guySwordShadowImg}
Symbol 237 BinaryData {MapsG_wgm_mage_tunnel}
Symbol 238 BinaryData {MapsG_wgm_chandelier_room}
Symbol 239 Bitmap {AssetsG_SponsorPosterImg}
Symbol 240 Bitmap {AssetsG_burnImg}
Symbol 241 BinaryData {LevelManager_bossRoom}
Symbol 242 Bitmap {org.flixel.data.FlxPanel_ImgClose}
Symbol 243 BinaryData {MapsG_jdj_room_e_foundry}
Symbol 244 BinaryData {MapsG_ph_room__spikeholes}
Symbol 245 BinaryData {StateExposition_tutorial}
Symbol 246 Bitmap {org.flixel.data.FlxPause_ImgKeyP}
Symbol 247 BinaryData {StateScores_scoreRoom}
Symbol 248 Bitmap {AssetsG_pilloryImg}
Symbol 249 BinaryData {MapsG_wgm_the_great_outdoors}
Symbol 250 BinaryData {MapsG_wgm_EVIL_SPIKES_01}
Symbol 251 BinaryData {MapsG_ph_room__destroyed1}
Symbol 252 BinaryData {MapsG_jdj_room_e_01}
Symbol 253 BinaryData {MapsG_wgm_minmon_pit}
Symbol 254 Bitmap {AssetsG_guyShadowImg}
Symbol 255 BinaryData {MapsG_ph_room_e_platforms}
Symbol 256 Bitmap {AssetsG_guySwordOrcImg}
Symbol 257 BinaryData {MapsG_wgm_bridge_big}
Symbol 258 BinaryData {MapsG_wgm_steeple_spikes}
Symbol 259 Bitmap {AssetsG_ScoresPosterImg}
Symbol 260 Bitmap {AssetsG_guyMageOrcImg}
Symbol 261 Bitmap {AssetsG_FireballImg}
Symbol 262 Bitmap {AssetsG_guyMageImg}
Symbol 263 Bitmap {AssetsG_minmonImg}
Symbol 264 Bitmap {AssetsG_mwaveRedImg}
Symbol 265 Bitmap {AssetsG_flickImg}
Symbol 266 Bitmap {AssetsG_chestImg}
Symbol 267 BinaryData {MapsG_wgm_room_minmons_chandeliers_01}
Symbol 268 BinaryData {MapsG_wgm_room_m_evil_spikes_01}
Symbol 269 Bitmap {AssetsG_healthImg}
Symbol 270 Bitmap {AssetsG_StorePosterImg}
Symbol 271 Bitmap {org.flixel.FlxTilemap_ImgAuto}
Symbol 272 Bitmap {AssetsG_LearnPosterImg}
Symbol 273 Bitmap {AssetsG_mwaveImg}
Symbol 274 BinaryData {MapsG_ph_room_h_01}
Symbol 275 Bitmap {AssetsG_ogreImg}
Symbol 276 BinaryData {MapsG_ph_room_e_firemen}
Symbol 277 Bitmap {AssetsG_fontImg}
Symbol 278 Bitmap {AssetsG_CreditsPosterImg}
Symbol 279 Bitmap {AssetsG_sackImg}
Symbol 280 Bitmap {StateScores_ImgTwitterH}
Symbol 281 Bitmap {AssetsG_chandelierImg}
Symbol 282 BinaryData {MapsG_wgm_space_platforms}
Symbol 283 BinaryData {MapsG_ms_hall_04}
Symbol 284 BinaryData {MapsG_ms_hall_05}
Symbol 285 BinaryData {MapsG_ms_hall_06}
Symbol 286 BinaryData {MapsG_wgm_basement}
Symbol 287 Bitmap {AssetsG_firespurtImg}
Symbol 288 Bitmap {AssetsG_pbUpImg}
Symbol 289 BinaryData {MapsG_jdj_hall_02}
Symbol 290 Bitmap {AssetsG_arrowImg}
Symbol 291 BinaryData {MapsG_jdj_hall_01}
Symbol 292 Bitmap {AssetsG_tileMiniImg}
Symbol 293 Bitmap {AssetsG_guyOrcImg}
Symbol 294 BinaryData {MapsG_ms_room_e_M1}
Symbol 295 BinaryData {MapsG_winecellar}
Symbol 296 Bitmap {org.flixel.data.FlxPanel_ImgDelicious}
Symbol 297 BinaryData {MapsG_ms_ent_04}
Symbol 298 Bitmap {AssetsG_tileImg}
Symbol 299 BinaryData {MapsG_ms_room_e_armory}
Symbol 300 BinaryData {MapsG_ms_ent_05}
Symbol 301 BinaryData {MapsG_ms_ent_02}
Symbol 302 Bitmap {org.flixel.data.FlxPause_ImgKey0}
Symbol 303 BinaryData {MapsG_wgm_simple_fire_corridor}
Symbol 304 BinaryData {MapsG_ms_ent_03}
Symbol 305 Bitmap {AssetsG_healthDoubleImg}
Symbol 306 BinaryData {MapsG_wgm_mage_bridge}
Symbol 307 BinaryData {MapsG_wgm_room_m_big_platform_01}
Symbol 308 BinaryData {MapsG_wgm_room_high_libs_minmons_floor}
Symbol 309 Bitmap {AssetsG_shadowboltImg}
Symbol 310 BinaryData {MapsG_wgm_minmon_spawn_room}
Symbol 311 Bitmap {AssetsG_smanImg}
Symbol 312 Bitmap {AssetsG_headImg}
Symbol 313 BinaryData {MapsG_ms_hall_03}
Symbol 314 BinaryData {StateMenu_menuRoom}
Symbol 315 BinaryData {MapsG_wgm_room_h_wall_02}
Symbol 316 BinaryData {MapsG_wgm_room_h_wall_01}
Symbol 317 BinaryData {MapsG_wgm_room_m_ladder_trap_01}
Symbol 318 BinaryData {MapsG_wgm_room_h_temptation_01}
Symbol 319 BinaryData {MapsG_wgm_room_smolderingman_fireplaces_01}
Symbol 320 BinaryData {MapsG_wgm_mage_hallway}
Symbol 321 Bitmap {org.flixel.FlxTilemap_ImgAutoAlt}
Symbol 322 BinaryData {MapsG_jdj_exit_01}
Symbol 323 BinaryData {MapsG_wgm_trap_room_01}
Symbol 324 BinaryData {MapsG_ms_library_01}
Symbol 325 BinaryData {MapsG_ms_exit_04}
Symbol 326 BinaryData {LevelManager_rewardRoom}
Symbol 327 BinaryData {MapsG_ms_exit_03}
Symbol 328 Bitmap {AssetsG_shadowMageImg}
Symbol 329 BinaryData {MapsG_ms_exit_02}
Symbol 330 Bitmap {org.flixel.FlxPreloader_ImgLogoCorners}
Symbol 331 Bitmap {org.flixel.FlxPreloader_ImgLogoLight}
Symbol 332 Bitmap {AssetsG_ghostImg}
Symbol 333 BinaryData {MapsG_ms_exit_06}
Symbol 334 BinaryData {MapsG_ms_exit_05}
Symbol 335 BinaryData {MapsG_wgm_room_h_pit_01}
Symbol 336 Bitmap {AssetsG_healthHalfImg}
Symbol 337 BinaryData {MapsG_ms_room_m_trappy}
Symbol 338 Bitmap {org.flixel.data.FlxPause_ImgKeyMinus}
Symbol 339 Font {org.flixel.FlxGame_junk}
Symbol 340 Bitmap {AssetsG_guyImg}
Symbol 341 BinaryData {MapsG_wgm_room_e_flyingskull_drop}
Symbol 342 BinaryData {MapsG_wgm_spiked_hallway}
Symbol 343 BinaryData {MapsG_wgm_room_m_giant_chasm}
Symbol 344 BinaryData {StateTutorial_tutorial}
Symbol 345 Bitmap {AssetsG_SwordsmanPosterImg}
Symbol 346 BinaryData {MapsG_ms_room_e_ballroom}
Symbol 347 Bitmap {AssetsG_fontBigImg}
Symbol 348 Bitmap {AssetsG_energyHalfImg}
Symbol 349 BinaryData {MapsG_ms_room_e_foundry}
Symbol 350 Bitmap {org.flixel.data.FlxPanel_ImgDonate}
Symbol 351 Bitmap {StateScores_ImgTwitter}
Symbol 352 BinaryData {MapsG_jdj_room_e_M1}
Symbol 353 BinaryData {MapsG_wgm_minmons_gigeresque}
Symbol 354 BinaryData {MapsG_wgm_room_e_platform_mages}
Symbol 355 BinaryData {MapsG_ph_room__firemen1}
Symbol 356 Bitmap {org.flixel.data.FlxPanel_ImgDigg}
Symbol 357 BinaryData {StateCredits_creditsRoom}
Symbol 358 Bitmap {AssetsG_RiflemanPosterImg}
Symbol 359 BinaryData {MapsG_wgm_columned_minmon_pit}
Symbol 360 Bitmap {AssetsG_minmomImg}
Symbol 361 Bitmap {AssetsG_guillotineImg}
Symbol 362 BinaryData {MapsG_wgm_room_m_tall_w_pit_01}
Symbol 363 Bitmap {AssetsG_explodeImg}
Symbol 364 Bitmap {AssetsG_WantedPosterImg}
Symbol 365 Bitmap {AssetsG_energyDoubleImg}
Symbol 366 BinaryData {MapsG_ph_room__lowhangingspikes}
Symbol 367 Bitmap {AssetsG_brickImg}
Symbol 368 MovieClip {spill.localisation.LocalizedTextField} [spill.localisation.LocalizedTextField]Uses:2

Instance Names

"languageName_text"Symbol 179 MovieClip {spill.localisation.LanguageSelectBox_mc} [spill.localisation.LanguageSelectBox_mc] Frame 1Symbol 152 EditableText
"flag"Symbol 179 MovieClip {spill.localisation.LanguageSelectBox_mc} [spill.localisation.LanguageSelectBox_mc] Frame 1Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83]
"flag"Symbol 186 MovieClip Frame 1Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83]
"text"Symbol 186 MovieClip Frame 1Symbol 185 EditableText
"l_de"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_en_us"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_fr"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_it"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_nl"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_pl"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_es_mx"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_br"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_cn"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_en_uk"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_es"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_id"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_jp"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_pt"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_ar"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_in"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_es_ar"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_se"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip
"l_ru"Symbol 189 MovieClip {spill.localisation.LanguageSelectPopup_mc} [spill.localisation.LanguageSelectPopup_mc] Frame 1Symbol 186 MovieClip

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 3 as "spill.localisation.LanguageSelectBox"
ExportAssets (56)Timeline Frame 1Symbol 144 as "spill.localisation.BrandingLogo"
ExportAssets (56)Timeline Frame 1Symbol 147 as "Spill.Components.Submitter"
ExportAssets (56)Timeline Frame 1Symbol 148 as "org.flixel.FlxGame_SndFlixel"
ExportAssets (56)Timeline Frame 1Symbol 149 as "org.flixel.FlxGame_SndBeep"
ExportAssets (56)Timeline Frame 1Symbol 179 as "spill.localisation.LanguageSelectBox_mc"
ExportAssets (56)Timeline Frame 1Symbol 189 as "spill.localisation.LanguageSelectPopup_mc"
ExportAssets (56)Timeline Frame 1Symbol 146 as "SubmitterProxy"
ExportAssets (56)Timeline Frame 1Symbol 190 as "AssetsG_sndDervish"
ExportAssets (56)Timeline Frame 1Symbol 191 as "AssetsG_music3"
ExportAssets (56)Timeline Frame 1Symbol 192 as "AssetsG_music2"
ExportAssets (56)Timeline Frame 1Symbol 193 as "AssetsG_music4"
ExportAssets (56)Timeline Frame 1Symbol 194 as "AssetsG_sndShotgun"
ExportAssets (56)Timeline Frame 1Symbol 195 as "AssetsG_sndShadowBolt"
ExportAssets (56)Timeline Frame 1Symbol 196 as "AssetsG_music1"
ExportAssets (56)Timeline Frame 1Symbol 197 as "AssetsG_sndSwordSwing"
ExportAssets (56)Timeline Frame 1Symbol 198 as "AssetsG_sndMagicMissile"
ExportAssets (56)Timeline Frame 1Symbol 199 as "AssetsG_sndLanding"
ExportAssets (56)Timeline Frame 1Symbol 200 as "AssetsG_sndRifle"
ExportAssets (56)Timeline Frame 1Symbol 201 as "AssetsG_sndHurt"
ExportAssets (56)Timeline Frame 1Symbol 202 as "AssetsG_sndExplosion"
ExportAssets (56)Timeline Frame 1Symbol 203 as "AssetsG_sndLootGrab"
ExportAssets (56)Timeline Frame 1Symbol 178 as "components_fla.flag_icon_83"
ExportAssets (56)Timeline Frame 2Symbol 368 as "spill.localisation.LocalizedTextField"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"start"Frame 2
"www.agame.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 1
"www.game.com.cn"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 2
"www.zapjuegos.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 3
"www.spel.nl"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 4
"www.jeu.fr"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 5
"www.spielen.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 6
"www.clickjogos.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 7
"www.giocaregratis.it"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 8
"www.spel.se"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 9
"www.mygames.co.uk"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 10
"www.flashgames.ru"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 11
"www.game.co.in"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 12
"www.games.co.id"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 13
"www.minigry.pl"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 14
"www.asoyun.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 15
"www.game.com.my"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 16
"www.gamesgames.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 17
"www.spelletjes.nl"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 18
"www.jeux.fr"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 19
"www.jetztspielen.de"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 20
"www.gry.pl"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 21
"www.spela.se"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 22
"www.gioco.it"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 23
"www.juegos.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 24
"www.juegos.mx"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 25
"www.juegos.com.ar"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 26
"www.ojogos.com.br"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 27
"www.ourgames.ru"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 28
"www.games.co.uk"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 29
"www.oyunlar123.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 30
"www.girlsgogames.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 31
"www.girlsgogames.in"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 32
"www.girlsgogamestr.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 33
"www.girlsgogames.com.br"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 34
"www.girlsgogames.fr"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 35
"www.girlsgogames.co.uk"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 36
"www.girlsgogames.de"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 37
"www.girlsgogames.pl"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 38
"www.girlsgogames.ru"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 39
"www.juegosdechicas.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 40
"www.juegosdechicas.com.ar"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 41
"www.juegosdechicas.mx"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 42
"www.girlsgogames.it"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 43
"www.girlsgogames.es"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 44
"www.girlsgogames.nl"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 45
"www.girlsgogames.se"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 46
"www.ojogos.pt"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 47
"www.laro.com.ph"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 48
"www.egames.jp"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 49
"www.a10.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 50
"www.dailygame.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 51
"www.zapapa.com"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 52
"www.zapapa.nl"Symbol 144 MovieClip {spill.localisation.BrandingLogo} [spill.localisation.BrandingLogo] Frame 53
"br"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 1
"nl"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 2
"cn"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 3
"de"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 4
"es"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 5
"fr"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 6
"in"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 7
"it"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 8
"jp"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 9
"my"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 10
"ph"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 11
"pl"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 12
"pt"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 13
"ru"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 14
"se"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 15
"tr"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 16
"en_uk"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 17
"en_us"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 18
"id"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 19
"ar"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 20
"es_mx"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 21
"es_ar"Symbol 178 MovieClip {components_fla.flag_icon_83} [components_fla.flag_icon_83] Frame 22




http://swfchan.com/19/92783/info.shtml
Created: 27/3 -2019 06:32:08 Last modified: 27/3 -2019 06:32:08 Server time: 22/12 -2024 21:18:28