STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229456 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2574 · P5148 |
This is the info page for Flash #241839 |
BASIC |
row 1 row 2 |
1/5 |
<p align="center"><font face="_sans" size="14" color="#000000" letterSpacing="0.000000" kerning="0">Text</font></p> |
PLAY ON FACEBOOK! |
* Compete with your friends! * Over 1.000.000 players! * Unlock new towers! * Earn coins and trophies! |
If you want to climb even higher, continue your game on Facebook! - Compete with your friends! - Unlock and try out new towers! - Dress up your character! - Online top lists! - Earn coins and trophies! |
ActionScript [AS3]
Section 1//BinaryItem (br.com.stimuli.loading.loadingtypes.BinaryItem) package br.com.stimuli.loading.loadingtypes { import flash.display.*; import flash.events.*; import br.com.stimuli.loading.*; import flash.net.*; import flash.utils.*; public class BinaryItem extends LoadingItem { public var loader:URLLoader; public function BinaryItem(_arg1:URLRequest, _arg2:String, _arg3:String){ super(_arg1, _arg2, _arg3); } override public function onErrorHandler(_arg1:ErrorEvent):void{ super.onErrorHandler(_arg1); } override public function stop():void{ try { if (loader){ loader.close(); }; } catch(e:Error) { }; super.stop(); } override public function cleanListeners():void{ if (loader){ loader.removeEventListener(ProgressEvent.PROGRESS, onProgressHandler, false); loader.removeEventListener(Event.COMPLETE, onCompleteHandler, false); loader.removeEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false); loader.removeEventListener(BulkLoader.OPEN, onStartedHandler, false); loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false); loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, super.onSecurityErrorHandler, false); }; } override public function load():void{ super.load(); loader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.BINARY; loader.addEventListener(ProgressEvent.PROGRESS, onProgressHandler, false, 0, true); loader.addEventListener(Event.COMPLETE, onCompleteHandler, false, 0, true); loader.addEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false, 0, true); loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false, 0, true); loader.addEventListener(Event.OPEN, onStartedHandler, false, 0, true); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, super.onSecurityErrorHandler, false, 0, true); try { loader.load(url); } catch(e:SecurityError) { onSecurityErrorHandler(_createErrorEvent(e)); }; } override public function onStartedHandler(_arg1:Event):void{ super.onStartedHandler(_arg1); } override public function onCompleteHandler(_arg1:Event):void{ _content = _arg1.target.data; super.onCompleteHandler(_arg1); } override public function _parseOptions(_arg1:Object):Array{ return (super._parseOptions(_arg1)); } override public function destroy():void{ stop(); cleanListeners(); _content = null; loader = null; } } }//package br.com.stimuli.loading.loadingtypesSection 2//ImageItem (br.com.stimuli.loading.loadingtypes.ImageItem) package br.com.stimuli.loading.loadingtypes { import flash.display.*; import flash.events.*; import br.com.stimuli.loading.*; import flash.net.*; import flash.utils.*; public class ImageItem extends LoadingItem { public var loader:Loader; public function ImageItem(_arg1:URLRequest, _arg2:String, _arg3:String){ specificAvailableProps = [BulkLoader.CONTEXT]; super(_arg1, _arg2, _arg3); } override public function onErrorHandler(_arg1:ErrorEvent):void{ super.onErrorHandler(_arg1); } override public function stop():void{ try { if (loader){ loader.close(); }; } catch(e:Error) { }; super.stop(); } override public function load():void{ super.load(); loader = new Loader(); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler, false, 0, true); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false, 100, true); loader.contentLoaderInfo.addEventListener(Event.OPEN, onStartedHandler, false, 0, true); loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false, 0, true); try { loader.load(url, _context); } catch(e:SecurityError) { onSecurityErrorHandler(_createErrorEvent(e)); }; } override public function destroy():void{ stop(); cleanListeners(); _content = null; loader = null; } override public function _parseOptions(_arg1:Object):Array{ _context = ((_arg1[BulkLoader.CONTEXT]) || (null)); return (super._parseOptions(_arg1)); } override public function isImage():Boolean{ return ((type == BulkLoader.TYPE_IMAGE)); } override public function onCompleteHandler(_arg1:Event):void{ var evt = _arg1; try { _content = loader.content; super.onCompleteHandler(evt); } catch(e:SecurityError) { _content = loader; super.onCompleteHandler(evt); }; } override public function cleanListeners():void{ var _local1:Object; if (loader){ _local1 = loader.contentLoaderInfo; _local1.removeEventListener(ProgressEvent.PROGRESS, onProgressHandler, false); _local1.removeEventListener(Event.COMPLETE, onCompleteHandler, false); _local1.removeEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false); _local1.removeEventListener(BulkLoader.OPEN, onStartedHandler, false); _local1.removeEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false); }; } override public function isSWF():Boolean{ return ((type == BulkLoader.TYPE_MOVIECLIP)); } public function _onHttpStatusHandler(_arg1:HTTPStatusEvent):void{ _httpStatus = _arg1.status; dispatchEvent(_arg1); } } }//package br.com.stimuli.loading.loadingtypesSection 3//LoadingItem (br.com.stimuli.loading.loadingtypes.LoadingItem) package br.com.stimuli.loading.loadingtypes { import flash.display.*; import flash.events.*; import br.com.stimuli.loading.*; import flash.net.*; import flash.utils.*; public class LoadingItem extends EventDispatcher { public var _priority:int;// = 0 public var _type:String; public var status:String; public var _isLoaded:Boolean; public var _isLoading:Boolean; public var _additionIndex:int; public var _bytesTotal:int;// = -1 public var _httpStatus:int;// = -1 public var _content; public var _speed:Number; public var _weightPercentLoaded:Number; public var propertyParsingErrors:Array; public var url:URLRequest; public var errorEvent:ErrorEvent; public var weight:int;// = 1 public var _addedTime:int; public var _context;// = null public var preventCache:Boolean; public var _responseTime:Number; public var _uid:String; public var maxTries:int;// = 3 public var _bytesLoaded:int;// = 0 public var _percentLoaded:Number; public var _totalTime:int; public var numTries:int;// = 0 public var _id:String; public var _latency:Number; public var _startTime:int; public var _bytesRemaining:int;// = 10000000 public var _timeToDownload:int; public var specificAvailableProps:Array; public static const STATUS_STOPPED:String = "stopped"; public static const STATUS_STARTED:String = "started"; public static const STATUS_ERROR:String = "error"; public static const STATUS_FINISHED:String = "finished"; public function LoadingItem(_arg1:URLRequest, _arg2:String, _arg3:String){ this._type = _arg2; this.url = _arg1; if (!specificAvailableProps){ specificAvailableProps = []; }; this._uid = _arg3; } public function onSecurityErrorHandler(_arg1:ErrorEvent):void{ status = STATUS_ERROR; errorEvent = (_arg1 as ErrorEvent); _arg1.stopPropagation(); _dispatchErrorEvent(errorEvent); } public function stop():void{ if (_isLoaded){ return; }; status = STATUS_STOPPED; _isLoading = false; } public function isSound():Boolean{ return (false); } public function onCompleteHandler(_arg1:Event):void{ _totalTime = getTimer(); _timeToDownload = ((_totalTime - _responseTime) / 1000); if (_timeToDownload == 0){ _timeToDownload = 0.2; }; _speed = BulkLoader.truncateNumber(((bytesTotal / 0x0400) / _timeToDownload)); if (_timeToDownload == 0){ _speed = 3000; }; status = STATUS_FINISHED; _isLoaded = true; dispatchEvent(_arg1); _arg1.stopPropagation(); } public function get weightPercentLoaded():Number{ return (_weightPercentLoaded); } public function get id():String{ return (_id); } public function _dispatchErrorEvent(_arg1:ErrorEvent):void{ status = STATUS_ERROR; dispatchEvent(new ErrorEvent(BulkLoader.ERROR, true, false, _arg1.text)); } public function onHttpStatusHandler(_arg1:HTTPStatusEvent):void{ _httpStatus = _arg1.status; dispatchEvent(_arg1); } public function get totalTime():int{ return (_totalTime); } public function get type():String{ return (_type); } public function get speed():Number{ return (_speed); } public function _parseOptions(_arg1:Object):Array{ var _local3:String; preventCache = _arg1[BulkLoader.PREVENT_CACHING]; _id = _arg1[BulkLoader.ID]; _priority = ((int(_arg1[BulkLoader.PRIORITY])) || (0)); maxTries = ((_arg1[BulkLoader.MAX_TRIES]) || (3)); weight = ((int(_arg1[BulkLoader.WEIGHT])) || (1)); var _local2:Array = BulkLoader.GENERAL_AVAILABLE_PROPS.concat(specificAvailableProps); propertyParsingErrors = []; for (_local3 in _arg1) { if (_local2.indexOf(_local3) == -1){ propertyParsingErrors.push(((((this + ": got a wrong property name: ") + _local3) + ", with value:") + _arg1[_local3])); }; }; return (propertyParsingErrors); } public function get startTime():int{ return (_startTime); } public function get bytesLoaded():int{ return (_bytesLoaded); } public function isImage():Boolean{ return (false); } public function onStartedHandler(_arg1:Event):void{ _responseTime = getTimer(); _latency = BulkLoader.truncateNumber(((_responseTime - _startTime) / 1000)); status = STATUS_STARTED; dispatchEvent(_arg1); } override public function toString():String{ return (((((("LoadingItem url: " + url.url) + ", type:") + _type) + ", status: ") + status)); } public function isVideo():Boolean{ return (false); } public function isText():Boolean{ return (false); } public function get content(){ return (_content); } public function onProgressHandler(_arg1):void{ _bytesLoaded = _arg1.bytesLoaded; _bytesTotal = _arg1.bytesTotal; _bytesRemaining = (_bytesTotal - bytesLoaded); _percentLoaded = (_bytesLoaded / _bytesTotal); _weightPercentLoaded = (_percentLoaded * weight); dispatchEvent(_arg1); } public function isXML():Boolean{ return (false); } public function get bytesTotal():int{ return (_bytesTotal); } public function get httpStatus():int{ return (_httpStatus); } public function onErrorHandler(_arg1:ErrorEvent):void{ numTries++; _arg1.stopPropagation(); if (numTries < maxTries){ status = null; load(); } else { status = STATUS_ERROR; errorEvent = _arg1; _dispatchErrorEvent(errorEvent); }; } public function isStreamable():Boolean{ return (false); } public function get percentLoaded():Number{ return (_percentLoaded); } public function get responseTime():Number{ return (_responseTime); } public function get priority():int{ return (_priority); } public function get bytesRemaining():int{ return (_bytesRemaining); } public function get isLoaded():Boolean{ return (_isLoaded); } public function get timeToDownload():int{ return (_timeToDownload); } public function isLoader():Boolean{ return (false); } public function load():void{ var _local1:String; if (preventCache){ _local1 = ((("BulkLoaderNoCache=" + _uid) + "_") + int(((Math.random() * 100) * getTimer()))); if (url.url.indexOf("?") == -1){ url.url = (url.url + ("?" + _local1)); } else { url.url = (url.url + ("&" + _local1)); }; }; _isLoading = true; _startTime = getTimer(); } public function getStats():String{ return ((((((((((("Item url:" + url.url) + ", total time: ") + _timeToDownload) + "(s), latency:") + _latency) + "(s), speed: ") + _speed) + " kb/s, size: ") + BulkLoader.truncateNumber((_bytesTotal / 0x0400))) + " kb")); } public function get addedTime():int{ return (_addedTime); } public function _createErrorEvent(_arg1:Error):ErrorEvent{ return (new ErrorEvent(BulkLoader.ERROR, false, false, _arg1.message)); } public function cleanListeners():void{ } public function isSWF():Boolean{ return (false); } public function destroy():void{ _content = null; } public function get latency():Number{ return (_latency); } } }//package br.com.stimuli.loading.loadingtypesSection 4//SoundItem (br.com.stimuli.loading.loadingtypes.SoundItem) package br.com.stimuli.loading.loadingtypes { import flash.display.*; import flash.events.*; import br.com.stimuli.loading.*; import flash.media.*; import flash.net.*; import flash.utils.*; public class SoundItem extends LoadingItem { public var loader:Sound; public function SoundItem(_arg1:URLRequest, _arg2:String, _arg3:String){ specificAvailableProps = [BulkLoader.CONTEXT]; super(_arg1, _arg2, _arg3); } override public function onErrorHandler(_arg1:ErrorEvent):void{ super.onErrorHandler(_arg1); } override public function stop():void{ try { if (loader){ loader.close(); }; } catch(e:Error) { }; super.stop(); } override public function isStreamable():Boolean{ return (true); } override public function isSound():Boolean{ return (true); } override public function load():void{ super.load(); loader = new Sound(); loader.addEventListener(ProgressEvent.PROGRESS, onProgressHandler, false, 0, true); loader.addEventListener(Event.COMPLETE, onCompleteHandler, false, 0, true); loader.addEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false, 0, true); loader.addEventListener(Event.OPEN, onStartedHandler, false, 0, true); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, super.onSecurityErrorHandler, false, 0, true); try { loader.load(url, _context); } catch(e:SecurityError) { onSecurityErrorHandler(_createErrorEvent(e)); }; } override public function onStartedHandler(_arg1:Event):void{ _content = loader; super.onStartedHandler(_arg1); } override public function destroy():void{ cleanListeners(); stop(); _content = null; loader = null; } override public function _parseOptions(_arg1:Object):Array{ _context = ((_arg1[BulkLoader.CONTEXT]) || (null)); return (super._parseOptions(_arg1)); } override public function onCompleteHandler(_arg1:Event):void{ _content = loader; super.onCompleteHandler(_arg1); } override public function cleanListeners():void{ if (loader){ loader.removeEventListener(ProgressEvent.PROGRESS, onProgressHandler, false); loader.removeEventListener(Event.COMPLETE, onCompleteHandler, false); loader.removeEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false); loader.removeEventListener(BulkLoader.OPEN, onStartedHandler, false); loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, super.onSecurityErrorHandler, false); }; } } }//package br.com.stimuli.loading.loadingtypesSection 5//URLItem (br.com.stimuli.loading.loadingtypes.URLItem) package br.com.stimuli.loading.loadingtypes { import flash.events.*; import br.com.stimuli.loading.*; import flash.net.*; public class URLItem extends LoadingItem { public var loader:URLLoader; public function URLItem(_arg1:URLRequest, _arg2:String, _arg3:String){ super(_arg1, _arg2, _arg3); } override public function stop():void{ try { if (loader){ loader.close(); }; } catch(e:Error) { }; super.stop(); } override public function cleanListeners():void{ if (loader){ loader.removeEventListener(ProgressEvent.PROGRESS, onProgressHandler, false); loader.removeEventListener(Event.COMPLETE, onCompleteHandler, false); loader.removeEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false); loader.removeEventListener(BulkLoader.OPEN, onStartedHandler, false); loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false); }; } override public function load():void{ super.load(); loader = new URLLoader(); loader.addEventListener(ProgressEvent.PROGRESS, onProgressHandler, false, 0, true); loader.addEventListener(Event.COMPLETE, onCompleteHandler, false, 0, true); loader.addEventListener(IOErrorEvent.IO_ERROR, super.onErrorHandler, false, 0, true); loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false, 0, true); loader.addEventListener(Event.OPEN, onStartedHandler, false, 0, true); try { loader.load(url); } catch(e:SecurityError) { onSecurityErrorHandler(_createErrorEvent(e)); }; } override public function isText():Boolean{ return (true); } override public function onStartedHandler(_arg1:Event):void{ super.onStartedHandler(_arg1); } override public function onCompleteHandler(_arg1:Event):void{ _content = loader.data; super.onCompleteHandler(_arg1); } override public function _parseOptions(_arg1:Object):Array{ return (super._parseOptions(_arg1)); } override public function destroy():void{ stop(); cleanListeners(); _content = null; loader = null; } } }//package br.com.stimuli.loading.loadingtypesSection 6//VideoItem (br.com.stimuli.loading.loadingtypes.VideoItem) package br.com.stimuli.loading.loadingtypes { import flash.display.*; import flash.events.*; import br.com.stimuli.loading.*; import flash.net.*; import flash.utils.*; public class VideoItem extends LoadingItem { public var stream:NetStream; public var dummyEventTrigger:Sprite; public var pausedAtStart:Boolean;// = false public var _metaData:Object; public var _canBeginStreaming:Boolean;// = false private var nc:NetConnection; public var _checkPolicyFile:Boolean; public function VideoItem(_arg1:URLRequest, _arg2:String, _arg3:String){ specificAvailableProps = [BulkLoader.CHECK_POLICY_FILE, BulkLoader.PAUSED_AT_START]; super(_arg1, _arg2, _arg3); _bytesTotal = (_bytesLoaded = 0); } public function get checkPolicyFile():Object{ return (_checkPolicyFile); } override public function onStartedHandler(_arg1:Event):void{ _content = stream; if (((pausedAtStart) && (stream))){ stream.pause(); }; super.onStartedHandler(_arg1); } override public function stop():void{ try { if (stream){ stream.close(); }; } catch(e:Error) { }; super.stop(); } override public function _parseOptions(_arg1:Object):Array{ pausedAtStart = ((_arg1[BulkLoader.PAUSED_AT_START]) || (false)); _checkPolicyFile = ((_arg1[BulkLoader.CHECK_POLICY_FILE]) || (false)); return (super._parseOptions(_arg1)); } private function fireCanBeginStreamingEvent():void{ if (_canBeginStreaming){ return; }; _canBeginStreaming = true; var _local1:Event = new Event(BulkLoader.CAN_BEGIN_PLAYING); dispatchEvent(_local1); } public function get metaData():Object{ return (_metaData); } function onNetStatus(_arg1:NetStatusEvent):void{ var _local2:Event; if (!stream){ return; }; stream.removeEventListener(NetStatusEvent.NET_STATUS, onNetStatus, false); if (_arg1.info.code == "NetStream.Play.Start"){ _content = stream; _local2 = new Event(Event.OPEN); onStartedHandler(_local2); } else { if (_arg1.info.code == "NetStream.Play.StreamNotFound"){ onErrorHandler(_createErrorEvent(new Error(("[VideoItem] NetStream not found at " + this.url.url)))); }; }; } override public function isStreamable():Boolean{ return (true); } override public function load():void{ super.load(); nc = new NetConnection(); nc.connect(null); stream = new NetStream(nc); stream.addEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false, 0, true); stream.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus, false, 0, true); dummyEventTrigger = new Sprite(); dummyEventTrigger.addEventListener(Event.ENTER_FRAME, createNetStreamEvent, false, 0, true); var customClient:Object = new Object(); customClient.onCuePoint = function (... _args):void{ }; customClient.onMetaData = onVideoMetadata; customClient.onPlayStatus = function (... _args):void{ }; stream.client = customClient; try { stream.play(url.url, _checkPolicyFile); } catch(e:SecurityError) { onSecurityErrorHandler(_createErrorEvent(e)); }; stream.seek(0); } public function get canBeginStreaming():Boolean{ return (_canBeginStreaming); } function onVideoMetadata(_arg1):void{ _metaData = _arg1; } override public function onCompleteHandler(_arg1:Event):void{ _content = stream; super.onCompleteHandler(_arg1); } override public function cleanListeners():void{ if (stream){ stream.removeEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false); stream.removeEventListener(NetStatusEvent.NET_STATUS, onNetStatus, false); }; if (dummyEventTrigger){ dummyEventTrigger.removeEventListener(Event.ENTER_FRAME, createNetStreamEvent, false); dummyEventTrigger = null; }; } override public function isVideo():Boolean{ return (true); } public function createNetStreamEvent(_arg1:Event):void{ var _local2:Event; var _local3:Event; var _local4:ProgressEvent; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; if ((((_bytesTotal == _bytesLoaded)) && ((_bytesTotal > 8)))){ if (dummyEventTrigger){ dummyEventTrigger.removeEventListener(Event.ENTER_FRAME, createNetStreamEvent, false); }; fireCanBeginStreamingEvent(); _local2 = new Event(Event.COMPLETE); onCompleteHandler(_local2); } else { if ((((((_bytesTotal == 0)) && (stream))) && ((stream.bytesTotal > 4)))){ _local3 = new Event(Event.OPEN); onStartedHandler(_local3); _bytesLoaded = stream.bytesLoaded; _bytesTotal = stream.bytesTotal; } else { if (stream){ _local4 = new ProgressEvent(ProgressEvent.PROGRESS, false, false, stream.bytesLoaded, stream.bytesTotal); if (((((isVideo()) && (metaData))) && (!(_canBeginStreaming)))){ _local5 = (getTimer() - responseTime); if (_local5 > 100){ _local6 = (bytesLoaded / (_local5 / 1000)); _bytesRemaining = (_bytesTotal - bytesLoaded); _local7 = (_bytesRemaining / (_local6 * 0.8)); _local8 = (metaData.duration - stream.bufferLength); if (_local8 > _local7){ fireCanBeginStreamingEvent(); }; }; }; super.onProgressHandler(_local4); }; }; }; } override public function destroy():void{ if (stream){ }; stop(); cleanListeners(); stream = null; super.destroy(); } } }//package br.com.stimuli.loading.loadingtypesSection 7//XMLItem (br.com.stimuli.loading.loadingtypes.XMLItem) package br.com.stimuli.loading.loadingtypes { import flash.events.*; import br.com.stimuli.loading.*; import flash.net.*; public class XMLItem extends LoadingItem { public var loader:URLLoader; public function XMLItem(_arg1:URLRequest, _arg2:String, _arg3:String){ super(_arg1, _arg2, _arg3); } override public function onErrorHandler(_arg1:ErrorEvent):void{ super.onErrorHandler(_arg1); } override public function stop():void{ try { if (loader){ loader.close(); }; } catch(e:Error) { }; super.stop(); } override public function cleanListeners():void{ if (loader){ loader.removeEventListener(ProgressEvent.PROGRESS, onProgressHandler, false); loader.removeEventListener(Event.COMPLETE, onCompleteHandler, false); loader.removeEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false); loader.removeEventListener(BulkLoader.OPEN, onStartedHandler, false); loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false); loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, super.onSecurityErrorHandler, false); }; } override public function load():void{ super.load(); loader = new URLLoader(); loader.addEventListener(ProgressEvent.PROGRESS, onProgressHandler, false, 0, true); loader.addEventListener(Event.COMPLETE, onCompleteHandler, false, 0, true); loader.addEventListener(IOErrorEvent.IO_ERROR, onErrorHandler, false, 0, true); loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, super.onHttpStatusHandler, false, 0, true); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, super.onSecurityErrorHandler, false, 0, true); loader.addEventListener(Event.OPEN, onStartedHandler, false, 0, true); try { loader.load(url); } catch(e:SecurityError) { onSecurityErrorHandler(_createErrorEvent(e)); }; } override public function isText():Boolean{ return (true); } override public function onStartedHandler(_arg1:Event):void{ super.onStartedHandler(_arg1); } override public function onCompleteHandler(_arg1:Event):void{ var evt = _arg1; try { _content = new XML(loader.data); } catch(e:Error) { _content = null; status = STATUS_ERROR; dispatchEvent(_createErrorEvent(e)); }; super.onCompleteHandler(evt); } override public function _parseOptions(_arg1:Object):Array{ return (super._parseOptions(_arg1)); } override public function destroy():void{ stop(); cleanListeners(); _content = null; loader = null; } } }//package br.com.stimuli.loading.loadingtypesSection 8//BulkErrorEvent (br.com.stimuli.loading.BulkErrorEvent) package br.com.stimuli.loading { import flash.events.*; public class BulkErrorEvent extends Event { public var name:String; public var errors:Array; public static const ERROR:String = "error"; public function BulkErrorEvent(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); this.name = _arg1; } override public function toString():String{ return (super.toString()); } override public function clone():Event{ var _local1:BulkErrorEvent = new BulkErrorEvent(name, bubbles, cancelable); _local1.errors = (errors) ? errors.slice() : []; return (_local1); } } }//package br.com.stimuli.loadingSection 9//BulkLoader (br.com.stimuli.loading.BulkLoader) package br.com.stimuli.loading { import flash.display.*; import flash.events.*; import flash.media.*; import br.com.stimuli.loading.loadingtypes.*; import flash.net.*; import flash.utils.*; public class BulkLoader extends EventDispatcher { public var _itemsTotal:int;// = 0 public var speedAvg:Number; public var _numConnections:int;// = 7 public var _totalWeight:int;// = 0 public var _bytesTotalCurrent:int;// = 0 public var _itemsLoaded:int;// = 0 public var totalTime:Number; public var _additionIndex:int;// = 0 public var _bytesTotal:int;// = 0 public var _loadedRatio:Number;// = 0 public var _speed:Number; public var _lastSpeedCheck:int; public var _isPaused:Boolean;// = true public var _isFinished:Boolean; public var _name:String; public var _allowsAutoIDFromFileName:Boolean;// = false public var _contents:Dictionary; public var _logFunction:Function; public var _bytesLoaded:int;// = 0 public var _connections:Array; public var logLevel:int;// = 4 public var _percentLoaded:Number;// = 0 public var _weightPercent:Number; public var _lastBytesCheck:int; public var _isRunning:Boolean; public var _id:int; public var _items:Array; public var _stringSubstitutions:Object; public var avgLatency:Number; public var _startTime:int; public var _speedTotal:Number; public var _endTIme:int; public static const CAN_BEGIN_PLAYING:String = "canBeginPlaying"; public static const TYPE_VIDEO:String = "video"; public static const PREVENT_CACHING:String = "preventCache"; public static const TYPE_TEXT:String = "text"; public static const ID:String = "id"; public static const PAUSED_AT_START:String = "pausedAtStart"; public static const SECURITY_ERROR:String = "securityError"; public static const LOG_WARNINGS:int = 3; public static const PROGRESS:String = "progress"; public static const COMPLETE:String = "complete"; public static const AVAILABLE_TYPES:Array = [TYPE_VIDEO, TYPE_XML, TYPE_TEXT, TYPE_SOUND, TYPE_MOVIECLIP, TYPE_IMAGE, TYPE_BINARY]; public static const LOG_VERBOSE:int = 0; public static const OPEN:String = "open"; public static const HEADERS:String = "headers"; public static const TYPE_XML:String = "xml"; public static const HTTP_STATUS:String = "httpStatus"; public static const CONTEXT:String = "context"; public static const WEIGHT:String = "weight"; public static const CHECK_POLICY_FILE:String = "checkPolicyFile"; public static const TYPE_MOVIECLIP:String = "movieclip"; public static const PRIORITY:String = "priority"; public static const TYPE_BINARY:String = "binary"; public static const TYPE_SOUND:String = "sound"; public static const MAX_TRIES:String = "maxTries"; public static const VERSION:String = "$Id$"; public static const GENERAL_AVAILABLE_PROPS:Array = [WEIGHT, MAX_TRIES, HEADERS, ID, PRIORITY, PREVENT_CACHING, "type"]; public static const DEFAULT_NUM_CONNECTIONS:int = 7; public static const LOG_SILENT:int = 10; public static const ERROR:String = "error"; public static const LOG_INFO:int = 2; public static const DEFAULT_LOG_LEVEL:int = 4; public static const LOG_ERRORS:int = 4; public static const TYPE_IMAGE:String = "image"; public static var MOVIECLIP_EXTENSIONS:Array = ["swf"]; public static var XML_EXTENSIONS:Array = ["xml", "dae"]; public static var SOUND_EXTENSIONS:Array = ["mp3", "f4a", "f4b"]; public static var TEXT_EXTENSIONS:Array = ["txt", "js", "php", "asp", "py"]; public static var AVAILABLE_EXTENSIONS:Array = ["swf", "jpg", "jpeg", "gif", "png", "flv", "mp3", "xml", "txt", "js"]; public static var _allLoaders:Object = {}; public static var VIDEO_EXTENSIONS:Array = ["flv", "f4v", "f4p", "mp4"]; public static var IMAGE_EXTENSIONS:Array = ["jpg", "jpeg", "gif", "png"]; public static var _customTypesExtensions:Object; public static var _typeClasses:Object = {image:ImageItem, movieclip:ImageItem, xml:XMLItem, video:VideoItem, sound:SoundItem, text:URLItem, binary:BinaryItem}; public static var _instancesCreated:int = 0; public function BulkLoader(_arg1:String, _arg2:int=7, _arg3:int=4){ var name = _arg1; var numConnections = _arg2; var logLevel = _arg3; _items = []; _contents = new Dictionary(true); _logFunction = trace; super(); if (Boolean(_allLoaders[name])){ __debug_print_loaders(); throw (new Error((("BulkLoader with name'" + name) + "' has already been created."))); }; if (!name){ throw (new Error("Cannot create a BulkLoader instance without a name")); }; _allLoaders[name] = this; if (numConnections > 0){ this._numConnections = numConnections; }; this.logLevel = logLevel; _name = name; _instancesCreated++; _id = _instancesCreated; _additionIndex = 0; addEventListener(BulkLoader.ERROR, function (_arg1:Event):void{ }, false, 1, true); } public function get allowsAutoIDFromFileName():Boolean{ return (_allowsAutoIDFromFileName); } public function set allowsAutoIDFromFileName(_arg1:Boolean):void{ _allowsAutoIDFromFileName = _arg1; } public function get loadedRatio():Number{ return (_loadedRatio); } public function loadNow(_arg1):Boolean{ var _local3:LoadingItem; var _local2:LoadingItem = get(_arg1); if (!_local2){ return (false); }; if (!_connections){ _connections = []; }; if ((((_local2.status == LoadingItem.STATUS_FINISHED)) || ((_local2.status == LoadingItem.STATUS_STARTED)))){ return (true); }; if (_connections.length >= numConnections){ _local3 = _getLeastUrgentOpenedItem(); pause(_local3); _removeFromConnections(_local3); _local3.status = null; }; _local2._priority = highestPriority; _loadNext(_local2); return (true); } public function _onItemComplete(_arg1:Event):void{ var _local2:LoadingItem = (_arg1.target as LoadingItem); _removeFromConnections(_local2); log("Loaded ", _local2, LOG_INFO); log("Items to load", getNotLoadedItems(), LOG_VERBOSE); _local2.cleanListeners(); _contents[_local2.url.url] = _local2.content; var _local3:Boolean = _loadNext(); var _local4:Boolean = _isAllDoneP(); _itemsLoaded++; if (_local4){ _onAllLoaded(); }; } public function _getContentAsType(_arg1, _arg2:Class, _arg3:Boolean=false){ var res:*; var key = _arg1; var type = _arg2; var clearMemory = _arg3; if (!_name){ throw (new Error("[BulkLoader] Cannot use an instance that has been cleared from memory (.clear())")); }; var item:LoadingItem = get(key); if (!item){ return (null); }; try { if (((item._isLoaded) || (((item.isStreamable()) && ((item.status == LoadingItem.STATUS_STARTED)))))){ res = (item.content as type); if (res == null){ throw (new Error("bad cast")); }; if (clearMemory){ remove(key); }; return (res); }; } catch(e:Error) { log((("Failed to get content with url: '" + key) + "'as type:"), type, LOG_ERRORS); }; return (null); } public function set stringSubstitutions(_arg1:Object):void{ _stringSubstitutions = _arg1; } public function get contents():Object{ return (_contents); } public function get id():int{ return (_id); } public function getBitmap(_arg1:String, _arg2:Boolean=false):Bitmap{ return (Bitmap(_getContentAsType(_arg1, Bitmap, _arg2))); } public function _removeFromConnections(_arg1):Boolean{ if (!_connections){ return (false); }; var _local2:int = _connections.indexOf(_arg1); if (_local2 > -1){ _connections.splice(_local2, 1); return (true); }; return (false); } public function resume(_arg1):Boolean{ var _local2:LoadingItem = ((_arg1 is LoadingItem)) ? _arg1 : get(_arg1); _isPaused = false; if (((_local2) && ((_local2.status == LoadingItem.STATUS_STOPPED)))){ _local2.status = null; _loadNext(); return (true); }; return (false); } public function _onAllLoaded():void{ if (_isFinished){ return; }; var _local1:BulkProgressEvent = new BulkProgressEvent(COMPLETE); _local1.setInfo(bytesLoaded, bytesTotal, bytesTotalCurrent, _itemsLoaded, itemsTotal, weightPercent); var _local2:BulkProgressEvent = new BulkProgressEvent(PROGRESS); _local2.setInfo(bytesLoaded, bytesTotal, bytesTotalCurrent, _itemsLoaded, itemsTotal, weightPercent); _isRunning = false; _endTIme = getTimer(); totalTime = BulkLoader.truncateNumber(((_endTIme - _startTime) / 1000)); _updateStats(); _connections = []; getStats(); _isFinished = true; log("Finished all", LOG_INFO); dispatchEvent(_local2); dispatchEvent(_local1); } public function removePausedItems():Boolean{ var stoppedLoads:Array = _items.filter(function (_arg1:LoadingItem, ... _args):Boolean{ return ((_arg1.status == LoadingItem.STATUS_STOPPED)); }); stoppedLoads.forEach(function (_arg1:LoadingItem, ... _args):void{ remove(_arg1); }); _loadNext(); return ((stoppedLoads.length > 0)); } public function resumeAll():Boolean{ log("Resuming all items", LOG_VERBOSE); var affected:Boolean; _items.forEach(function (_arg1:LoadingItem, ... _args):void{ if (_arg1.status == LoadingItem.STATUS_STOPPED){ resume(_arg1); affected = true; }; }); _loadNext(); return (affected); } public function get isRunning():Boolean{ return (_isRunning); } public function getNetStreamMetaData(_arg1:String, _arg2:Boolean=false):Object{ var _local3:NetStream = getNetStream(_arg1, _arg2); return ((Boolean(_local3)) ? (get(_arg1) as Object).metaData : null); } public function get logFunction():Function{ return (_logFunction); } public function getProgressForItems(_arg1:Array):BulkProgressEvent{ var _local11:LoadingItem; var _local13:*; _bytesLoaded = (_bytesTotal = (_bytesTotalCurrent = 0)); var _local2:Number = 0; var _local3:int; var _local4:int; var _local5:Number = 0; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local12:Array = []; for each (_local13 in _arg1) { _local11 = get(_local13); if (!_local11){ } else { _local6++; _local3 = (_local3 + _local11.weight); if ((((((_local11.status == LoadingItem.STATUS_STARTED)) || ((_local11.status == LoadingItem.STATUS_FINISHED)))) || ((_local11.status == LoadingItem.STATUS_STOPPED)))){ _local8 = (_local8 + _local11._bytesLoaded); _local10 = (_local10 + _local11._bytesTotal); _local5 = (_local5 + ((_local11._bytesLoaded / _local11._bytesTotal) * _local11.weight)); if (_local11.status == LoadingItem.STATUS_FINISHED){ _local7++; }; _local4++; }; }; }; if (_local4 != _local6){ _local9 = Number.POSITIVE_INFINITY; } else { _local9 = _local10; }; _local2 = (_local5 / _local3); if (_local3 == 0){ _local2 = 0; }; var _local14:BulkProgressEvent = new BulkProgressEvent(PROGRESS); _local14.setInfo(_local8, _local9, _local9, _local7, _local6, _local2); return (_local14); } public function getContent(_arg1:String, _arg2:Boolean=false){ return (_getContentAsType(_arg1, Object, _arg2)); } public function getSerializedData(_arg1, _arg2:Boolean=false, _arg3:Function=null){ var raw:*; var parsed:*; var key = _arg1; var clearMemory = _arg2; var encodingFunction = _arg3; try { raw = _getContentAsType(key, Object, clearMemory); parsed = encodingFunction.apply(null, [raw]); return (parsed); } catch(e:Error) { log("Failed to parse key:", key, ("with encodingFunction:" + encodingFunction), LOG_ERRORS); }; return (null); } public function log(... _args):void{ var _local2:int = (isNaN(_args[(_args.length - 1)])) ? 3 : int(_args.pop()); if (_local2 >= logLevel){ _logFunction(("[BulkLoader] " + _args.join(" "))); }; } public function clear():void{ removeAll(); delete _allLoaders[name]; _name = null; } public function get speed():Number{ var _local1:int = (getTimer() - _lastSpeedCheck); var _local2:int = ((bytesLoaded - _lastBytesCheck) / 0x0400); var _local3:int = (_local2 / (_local1 / 1000)); _lastSpeedCheck = _local1; _lastBytesCheck = bytesLoaded; return (_local3); } public function get bytesLoaded():int{ return (_bytesLoaded); } public function getFailedItems():Array{ return (_items.filter(function (_arg1:LoadingItem, ... _args):Boolean{ return ((_arg1.status == LoadingItem.STATUS_ERROR)); })); } public function _loadNext(_arg1:LoadingItem=null):Boolean{ var checkItem:LoadingItem; var toLoad = _arg1; if (_isFinished){ return (false); }; if (!_connections){ _connections = []; }; _connections.forEach(function (_arg1:LoadingItem, ... _args):void{ if ((((_arg1.status == LoadingItem.STATUS_ERROR)) && ((_arg1.numTries < _arg1.maxTries)))){ _removeFromConnections(_arg1); }; }); var next:Boolean; if (!toLoad){ for each (checkItem in _items) { if (((!(checkItem._isLoading)) && (!((checkItem.status == LoadingItem.STATUS_STOPPED))))){ toLoad = checkItem; break; }; }; }; if (toLoad){ next = true; _isRunning = true; if (_connections.length < numConnections){ _connections.push(toLoad); toLoad.load(); log("Will load item:", toLoad, LOG_INFO); }; if (_connections.length < numConnections){ _loadNext(); }; }; return (next); } public function getSound(_arg1, _arg2:Boolean=false):Sound{ return (Sound(_getContentAsType(_arg1, Sound, _arg2))); } public function removeFailedItems():int{ var numCleared:int; var badItems:Array = _items.filter(function (_arg1:LoadingItem, ... _args):Boolean{ return ((_arg1.status == LoadingItem.STATUS_ERROR)); }); numCleared = badItems.length; badItems.forEach(function (_arg1:LoadingItem, ... _args):void{ remove(_arg1); }); _loadNext(); return (numCleared); } public function get(_arg1):LoadingItem{ var _local2:LoadingItem; if (!_arg1){ return (null); }; if ((_arg1 is LoadingItem)){ return (_arg1); }; for each (_local2 in _items) { if ((((((((_local2._id == _arg1)) || ((_local2.url.url == _arg1)))) || ((_local2.url == _arg1)))) || ((((_arg1 is URLRequest)) && ((_local2.url.url == _arg1.url)))))){ return (_local2); }; }; return (null); } public function get highestPriority():int{ var _local2:LoadingItem; var _local1:int = int.MIN_VALUE; for each (_local2 in _items) { if (_local2.priority > _local1){ _local1 = _local2.priority; }; }; return (_local1); } public function start(_arg1:int=-1):void{ if (_arg1 > 0){ _numConnections = _arg1; }; if (_connections){ _loadNext(); return; }; _startTime = getTimer(); _connections = []; _loadNext(); _isRunning = true; _lastBytesCheck = 0; _lastSpeedCheck = getTimer(); _isPaused = false; } public function _getLeastUrgentOpenedItem():LoadingItem{ var _local1:LoadingItem = LoadingItem(_connections.sortOn(["priority", "bytesRemaining", "_additionIndex"], [Array.NUMERIC, Array.DESCENDING, Array.NUMERIC, Array.NUMERIC])[0]); return (_local1); } public function get itemsTotal():int{ return (items.length); } public function getBitmapData(_arg1, _arg2:Boolean=false):BitmapData{ var key = _arg1; var clearMemory = _arg2; try { return (getBitmap(key, clearMemory).bitmapData); } catch(e:Error) { log("Failed to get bitmapData with url:", key, LOG_ERRORS); }; return (null); } public function set logFunction(_arg1:Function):void{ _logFunction = _arg1; } override public function toString():String{ return (((((("[BulkLoader] name:" + name) + ", itemsTotal: ") + itemsTotal) + ", itemsLoaded: ") + _itemsLoaded)); } public function sortItemsByPriority():void{ _items.sortOn(["priority", "_additionIndex"], [(Array.NUMERIC | Array.DESCENDING), Array.NUMERIC]); } public function get stringSubstitutions():Object{ return (_stringSubstitutions); } public function get name():String{ return (_name); } public function remove(_arg1, _arg2:Boolean=false):Boolean{ var item:LoadingItem; var allDone:Boolean; var key = _arg1; var internalCall = _arg2; try { item = get(key); if (!item){ return (false); }; _removeFromItems(item); _removeFromConnections(item); item.destroy(); delete _contents[item.url.url]; if (internalCall){ return (true); }; item = null; _onProgress(); allDone = _isAllDoneP(); if (allDone){ _onAllLoaded(); }; return (true); } catch(e:Error) { log(("Error while removing item from key:" + key), e.getStackTrace(), LOG_ERRORS); }; return (false); } public function removeAll():void{ var _local1:LoadingItem; for each (_local1 in _items.slice()) { remove(_local1, true); }; _items = []; _connections = []; _contents = new Dictionary(); } public function _updateStats():void{ var _local4:LoadingItem; avgLatency = 0; speedAvg = 0; var _local1:Number = 0; var _local2:int; _speedTotal = 0; var _local3:Number = 0; for each (_local4 in _items) { if (((_local4._isLoaded) && (!((_local4.status == LoadingItem.STATUS_ERROR))))){ _local1 = (_local1 + _local4.latency); _local2 = (_local2 + _local4.bytesTotal); _local3++; }; }; _speedTotal = ((_local2 / 0x0400) / totalTime); avgLatency = (_local1 / _local3); speedAvg = (_speedTotal / _local3); } public function reload(_arg1):Boolean{ var _local2:LoadingItem = get(_arg1); if (!_local2){ return (false); }; _removeFromItems(_local2); _removeFromConnections(_local2); _local2.stop(); _local2.cleanListeners(); _local2.status = null; _isFinished = false; _local2._addedTime = getTimer(); _local2._additionIndex = _additionIndex++; _local2.addEventListener(Event.COMPLETE, _onItemComplete, false, int.MIN_VALUE, true); _local2.addEventListener(ERROR, _onItemError, false, 0, true); _local2.addEventListener(Event.OPEN, _onItemStarted, false, 0, true); _local2.addEventListener(ProgressEvent.PROGRESS, _onProgress, false, 0, true); _items.push(_local2); _itemsTotal = (_itemsTotal + 1); _totalWeight = (_totalWeight + _local2.weight); sortItemsByPriority(); _isFinished = false; loadNow(_local2); return (true); } public function _onItemStarted(_arg1:Event):void{ var _local2:LoadingItem = (_arg1.target as LoadingItem); log("Started loading", _local2, LOG_INFO); dispatchEvent(_arg1); } public function add(_arg1, _arg2:Object=null):LoadingItem{ var _local4:String; var _local6:String; if (!_name){ throw (new Error("[BulkLoader] Cannot use an instance that has been cleared from memory (.clear())")); }; if (((!(_arg1)) || (!(String(_arg1))))){ throw (new Error("[BulkLoader] Cannot add an item with a null url")); }; _arg2 = ((_arg2) || ({})); if ((_arg1 is String)){ _arg1 = new URLRequest(BulkLoader.substituteURLString(_arg1, _stringSubstitutions)); if (_arg2[HEADERS]){ _arg1.requestHeaders = _arg2[HEADERS]; }; } else { if ((!(_arg1) is URLRequest)){ throw (new Error(("[BulkLoader] cannot add object with bad type for url:'" + _arg1.url))); }; }; var _local3:LoadingItem = get(_arg2[ID]); if (_local3){ log((("Add received an already added id: " + _arg2[ID]) + ", not adding a new item")); return (_local3); }; if (_arg2["type"]){ _local4 = _arg2["type"].toLowerCase(); if (AVAILABLE_TYPES.indexOf(_local4) == -1){ log("add received an unknown type:", _local4, "and will cast it to text", LOG_WARNINGS); }; }; if (!_local4){ _local4 = guessType(_arg1.url); }; _additionIndex++; _local3 = new _typeClasses[_local4](_arg1, _local4, ((_instancesCreated + "_") + String(_additionIndex))); if (((!(_arg2["id"])) && (_allowsAutoIDFromFileName))){ _arg2["id"] = getFileName(_arg1.url); log("Adding automatic id from file name for item:", _local3, (("( id= " + _arg2["id"]) + " )")); }; var _local5:Array = _local3._parseOptions(_arg2); for each (_local6 in _local5) { log(_local6, LOG_WARNINGS); }; log("Added", _local3, LOG_VERBOSE); _local3._addedTime = getTimer(); _local3._additionIndex = _additionIndex; _local3.addEventListener(Event.COMPLETE, _onItemComplete, false, int.MIN_VALUE, true); _local3.addEventListener(ERROR, _onItemError, false, 0, true); _local3.addEventListener(Event.OPEN, _onItemStarted, false, 0, true); _local3.addEventListener(ProgressEvent.PROGRESS, _onProgress, false, 0, true); _items.push(_local3); _itemsTotal = (_itemsTotal + 1); _totalWeight = (_totalWeight + _local3.weight); sortItemsByPriority(); _isFinished = false; if (!_isPaused){ _loadNext(); }; return (_local3); } public function getText(_arg1, _arg2:Boolean=false):String{ return (String(_getContentAsType(_arg1, String, _arg2))); } public function get bytesTotal():int{ return (_bytesTotal); } public function get percentLoaded():Number{ return (_percentLoaded); } public function get weightPercent():Number{ return (_weightPercent); } public function get bytesTotalCurrent():int{ return (_bytesTotalCurrent); } public function getAVM1Movie(_arg1:String, _arg2:Boolean=false):AVM1Movie{ return (AVM1Movie(_getContentAsType(_arg1, AVM1Movie, _arg2))); } public function get isFinished():Boolean{ return (_isFinished); } public function changeItemPriority(_arg1:String, _arg2:int):Boolean{ var _local3:LoadingItem = get(_arg1); if (!_local3){ return (false); }; _local3._priority = _arg2; sortItemsByPriority(); return (true); } public function get items():Array{ return (_items.slice()); } public function getNetStream(_arg1:String, _arg2:Boolean=false):NetStream{ return (NetStream(_getContentAsType(_arg1, NetStream, _arg2))); } public function getHttpStatus(_arg1):int{ var _local2:LoadingItem = get(_arg1); if (_local2){ return (_local2.httpStatus); }; return (-1); } public function set itemsLoaded(_arg1:int):void{ _itemsLoaded = _arg1; } public function _onProgress(_arg1:Event=null):void{ var _local2:BulkProgressEvent = getProgressForItems(_items); _bytesLoaded = _local2.bytesLoaded; _bytesTotal = _local2.bytesTotal; _weightPercent = _local2.weightPercent; _percentLoaded = _local2.percentLoaded; _bytesTotalCurrent = _local2.bytesTotalCurrent; _loadedRatio = _local2.ratioLoaded; dispatchEvent(_local2); } public function hasItem(_arg1, _arg2:Boolean=true):Boolean{ var _local3:*; var _local4:BulkLoader; if (_arg2){ _local3 = _allLoaders; } else { _local3 = [this]; }; for each (_local4 in _local3) { if (_hasItemInBulkLoader(_arg1, _local4)){ return (true); }; }; return (false); } public function _removeFromItems(_arg1:LoadingItem):Boolean{ var _local2:int = _items.indexOf(_arg1); if (_local2 > -1){ _items.splice(_local2, 1); } else { return (false); }; if (_arg1._isLoaded){ _itemsLoaded--; }; _itemsTotal--; _totalWeight = (_totalWeight - _arg1.weight); log(("Removing " + _arg1), LOG_VERBOSE); _arg1.removeEventListener(Event.COMPLETE, _onItemComplete, false); _arg1.removeEventListener(ERROR, _onItemError, false); _arg1.removeEventListener(Event.OPEN, _onItemStarted, false); _arg1.removeEventListener(ProgressEvent.PROGRESS, _onProgress, false); return (true); } public function _isAllDoneP():Boolean{ return (_items.every(function (_arg1:LoadingItem, ... _args):Boolean{ return (_arg1._isLoaded); })); } public function _onItemError(_arg1:ErrorEvent):void{ var _local2:LoadingItem = (_arg1.target as LoadingItem); log(((("After " + _local2.numTries) + " I am giving up on ") + _local2.url.url), LOG_ERRORS); log("Error loading", _local2, _arg1.text, LOG_ERRORS); _removeFromConnections(_local2); _arg1.stopPropagation(); dispatchEvent(_arg1); } public function pauseAll():void{ var _local1:LoadingItem; for each (_local1 in _items) { pause(_local1); }; _isRunning = false; _isPaused = true; log("Stopping all items", LOG_INFO); } public function getNotLoadedItems():Array{ return (_items.filter(function (_arg1:LoadingItem, ... _args):Boolean{ return (!((_arg1.status == LoadingItem.STATUS_FINISHED))); })); } public function getXML(_arg1, _arg2:Boolean=false):XML{ return (XML(_getContentAsType(_arg1, XML, _arg2))); } public function get totalWeight():int{ return (_totalWeight); } public function get itemsLoaded():int{ return (_itemsLoaded); } public function getMovieClip(_arg1:String, _arg2:Boolean=false):MovieClip{ return (MovieClip(_getContentAsType(_arg1, MovieClip, _arg2))); } public function getDisplayObjectLoader(_arg1:String, _arg2:Boolean=false):Loader{ return (Loader(_getContentAsType(_arg1, Loader, _arg2))); } public function get numConnections():int{ return (_numConnections); } public function getStats():String{ var stats:Array = []; stats.push("\n************************************"); stats.push((("All items loaded(" + itemsTotal) + ")")); stats.push(("Total time(s): " + totalTime)); stats.push(("Average latency(s): " + truncateNumber(avgLatency))); stats.push(("Average speed(kb/s): " + truncateNumber(speedAvg))); stats.push(("Median speed(kb/s): " + truncateNumber(_speedTotal))); stats.push(("KiloBytes total: " + truncateNumber((bytesTotal / 0x0400)))); var itemsInfo:Array = _items.map(function (_arg1:LoadingItem, ... _args):String{ return (("\t" + _arg1.getStats())); }); stats.push(itemsInfo.join("\n")); stats.push("************************************"); var statsString:String = stats.join("\n"); log(statsString, LOG_VERBOSE); return (statsString); } public function pause(_arg1, _arg2:Boolean=false):Boolean{ var _local3:LoadingItem = get(_arg1); if (!_local3){ return (false); }; if (_local3.status != LoadingItem.STATUS_FINISHED){ _local3.stop(); }; log("STOPPED ITEM:", _local3, LOG_INFO); var _local4:Boolean = _removeFromConnections(_local3); if (_arg2){ _loadNext(); }; return (_local4); } public function getBinary(_arg1, _arg2:Boolean=false):ByteArray{ return (ByteArray(_getContentAsType(_arg1, ByteArray, _arg2))); } public static function getLoader(_arg1:String):BulkLoader{ return ((BulkLoader._allLoaders[_arg1] as BulkLoader)); } public static function whichLoaderHasItem(_arg1):BulkLoader{ var _local2:BulkLoader; for each (_local2 in _allLoaders) { if (BulkLoader._hasItemInBulkLoader(_arg1, _local2)){ return (_local2); }; }; return (null); } public static function truncateNumber(_arg1:Number, _arg2:int=2):Number{ var _local3:int = Math.pow(10, _arg2); return ((Math.round((_arg1 * _local3)) / _local3)); } public static function __debug_printStackTrace():void{ try { throw (new Error("stack trace")); } catch(e:Error) { trace(e.getStackTrace()); }; } public static function __debug_print_loaders():void{ var instNames:String; var theNames:Array = []; for each (instNames in BulkLoader._allLoaders) { theNames.push(instNames); }; theNames.sort(); trace("All loaders"); theNames.forEach(function (_arg1, ... _args):void{ trace("\t", _arg1); }); trace("==========="); } public static function pauseAllLoaders():void{ var _local1:BulkLoader; for each (_local1 in _allLoaders) { _local1.pauseAll(); }; } public static function _hasItemInBulkLoader(_arg1, _arg2:BulkLoader):Boolean{ var _local3:LoadingItem = _arg2.get(_arg1); if (_local3){ return (true); }; return (false); } public static function createUniqueNamedLoader(_arg1:int=7, _arg2:int=4):BulkLoader{ return (new BulkLoader(BulkLoader.getUniqueName(), _arg1, _arg2)); } public static function removeAllLoaders():void{ var _local1:BulkLoader; for each (_local1 in _allLoaders) { _local1.removeAll(); _local1.clear(); _local1 = null; }; _allLoaders = {}; } public static function getFileName(_arg1:String):String{ if (_arg1.lastIndexOf("/") == (_arg1.length - 1)){ return (getFileName(_arg1.substring(0, (_arg1.length - 1)))); }; var _local2:int = (_arg1.lastIndexOf("/") + 1); var _local3:String = _arg1.substring(_local2); var _local4:int = _local3.indexOf("."); if (_local4 == -1){ if (_local3.indexOf("?") > -1){ _local4 = _local3.indexOf("?"); } else { _local4 = _local3.length; }; }; var _local5:String = _local3.substring(0, _local4); return (_local5); } public static function __debug_print_num_loaders():void{ var _local2:String; var _local1:int; for each (_local2 in BulkLoader._allLoaders) { _local1++; }; trace("BulkLoader has ", _local1, "instances"); } public static function guessType(_arg1:String):String{ var _local4:String; var _local5:String; var _local6:String; var _local2:String = ((_arg1.indexOf("?") > -1)) ? _arg1.substring(0, _arg1.indexOf("?")) : _arg1; var _local3:String = _local2.substring((_local2.lastIndexOf(".") + 1)).toLowerCase(); if (!Boolean(_local3)){ _local3 = BulkLoader.TYPE_TEXT; }; if ((((_local3 == BulkLoader.TYPE_IMAGE)) || ((BulkLoader.IMAGE_EXTENSIONS.indexOf(_local3) > -1)))){ _local4 = BulkLoader.TYPE_IMAGE; } else { if ((((_local3 == BulkLoader.TYPE_SOUND)) || ((BulkLoader.SOUND_EXTENSIONS.indexOf(_local3) > -1)))){ _local4 = BulkLoader.TYPE_SOUND; } else { if ((((_local3 == BulkLoader.TYPE_VIDEO)) || ((BulkLoader.VIDEO_EXTENSIONS.indexOf(_local3) > -1)))){ _local4 = BulkLoader.TYPE_VIDEO; } else { if ((((_local3 == BulkLoader.TYPE_XML)) || ((BulkLoader.XML_EXTENSIONS.indexOf(_local3) > -1)))){ _local4 = BulkLoader.TYPE_XML; } else { if ((((_local3 == BulkLoader.TYPE_MOVIECLIP)) || ((BulkLoader.MOVIECLIP_EXTENSIONS.indexOf(_local3) > -1)))){ _local4 = BulkLoader.TYPE_MOVIECLIP; } else { for (_local5 in _customTypesExtensions) { for each (_local6 in _customTypesExtensions[_local5]) { if (_local6 == _local3){ _local4 = _local5; break; }; if (_local4){ break; }; }; }; if (!_local4){ _local4 = BulkLoader.TYPE_TEXT; }; }; }; }; }; }; return (_local4); } public static function registerNewType(_arg1:String, _arg2:String, _arg3:Class):Boolean{ var _local4:Array; if (_arg1.charAt(0) == "."){ _arg1 = _arg1.substring(1); }; if (AVAILABLE_TYPES.indexOf(_arg2) == -1){ if (!Boolean(_arg3)){ throw (new Error("[BulkLoader]: When adding a new type and extension, you must determine which class to use")); }; _typeClasses[_arg2] = _arg3; if (!_customTypesExtensions){ _customTypesExtensions = {}; }; if (!_customTypesExtensions[_arg2]){ _customTypesExtensions[_arg2] = []; AVAILABLE_TYPES.push(_arg2); }; _customTypesExtensions[_arg2].push(_arg1); return (true); } else { _customTypesExtensions[_arg2].push(_arg1); }; var _local5:Object = {IMAGE_EXTENSIONS:TYPE_IMAGE, VIDEO_EXTENSIONS:TYPE_VIDEO, SOUND_EXTENSIONS:TYPE_SOUND, TEXT_EXTENSIONS:TYPE_TEXT}; _local4 = _local5[_arg2]; if (((_local4) && ((_local4.indexOf(_arg1) == -1)))){ _local4.push(_arg1); return (true); }; return (false); } public static function substituteURLString(_arg1:String, _arg2:Object):String{ var _local9:Object; var _local10:Object; var _local12:String; if (!_arg2){ return (_arg1); }; var _local3:RegExp = /(?P<var_name>\{\s*[^\}]*\})/g; var _local4:Object = _local3.exec(_arg1); var _local5:String = (_local4) ? _local4.var_name : null; var _local6:Array = []; var _local7:int; while (((Boolean(_local4)) && (Boolean(_local4.var_name)))) { if (_local4.var_name){ _local5 = _local4.var_name; _local5 = _local5.replace("{", ""); _local5 = _local5.replace("}", ""); _local5 = _local5.replace(/\s*/g, ""); }; _local6.push({start:_local4.index, end:(_local4.index + _local4.var_name.length), changeTo:_arg2[_local5]}); _local7++; if (_local7 > 400){ break; }; _local4 = _local3.exec(_arg1); _local5 = (_local4) ? _local4.var_name : null; }; if (_local6.length == 0){ return (_arg1); }; var _local8:Array = []; var _local11:String = _arg1.substr(0, _local6[0].start); for each (_local10 in _local6) { if (_local9){ _local11 = _arg1.substring(_local9.end, _local10.start); }; _local8.push(_local11); _local8.push(_local10.changeTo); _local9 = _local10; }; _local8.push(_arg1.substring(_local10.end)); return (_local8.join("")); } public static function getUniqueName():String{ return (("BulkLoader-" + _instancesCreated)); } } }//package br.com.stimuli.loadingSection 10//BulkProgressEvent (br.com.stimuli.loading.BulkProgressEvent) package br.com.stimuli.loading { import flash.events.*; public class BulkProgressEvent extends ProgressEvent { public var bytesTotalCurrent:int; public var itemsTotal:int; public var itemsLoaded:int; public var _percentLoaded:Number; public var _weightPercent:Number; public var _ratioLoaded:Number; public var name:String; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public function BulkProgressEvent(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); this.name = _arg1; } override public function clone():Event{ var _local1:BulkProgressEvent = new BulkProgressEvent(name, bubbles, cancelable); _local1.setInfo(bytesLoaded, bytesTotal, bytesTotalCurrent, itemsLoaded, itemsTotal, weightPercent); return (_local1); } public function get weightPercent():Number{ return (_weightPercent); } public function set ratioLoaded(_arg1:Number):void{ if (((isNaN(_arg1)) || (!(isFinite(_arg1))))){ _arg1 = 0; }; _ratioLoaded = _arg1; } public function setInfo(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Number):void{ this.bytesLoaded = _arg1; this.bytesTotal = _arg2; this.bytesTotalCurrent = _arg3; this.itemsLoaded = _arg4; this.itemsTotal = _arg5; this.weightPercent = _arg6; this.percentLoaded = ((_arg2 > 0)) ? (_arg1 / _arg2) : 0; ratioLoaded = ((_arg5 == 0)) ? 0 : (_arg4 / _arg5); } public function set percentLoaded(_arg1:Number):void{ if (((isNaN(_arg1)) || (!(isFinite(_arg1))))){ _arg1 = 0; }; _percentLoaded = _arg1; } public function loadingStatus():String{ var _local1:Array = []; _local1.push(("bytesLoaded: " + bytesLoaded)); _local1.push(("bytesTotal: " + bytesTotal)); _local1.push(("itemsLoaded: " + itemsLoaded)); _local1.push(("itemsTotal: " + itemsTotal)); _local1.push(("bytesTotalCurrent: " + bytesTotalCurrent)); _local1.push(("percentLoaded: " + BulkLoader.truncateNumber(percentLoaded))); _local1.push(("weightPercent: " + BulkLoader.truncateNumber(weightPercent))); _local1.push(("ratioLoaded: " + BulkLoader.truncateNumber(ratioLoaded))); return ((("BulkProgressEvent " + _local1.join(", ")) + ";")); } public function get ratioLoaded():Number{ return (_ratioLoaded); } public function get percentLoaded():Number{ return (_percentLoaded); } public function set weightPercent(_arg1:Number):void{ if (((isNaN(_arg1)) || (!(isFinite(_arg1))))){ _arg1 = 0; }; _weightPercent = _arg1; } override public function toString():String{ return (super.toString()); } } }//package br.com.stimuli.loadingSection 11//AuxFunctions (caurina.transitions.AuxFunctions) package caurina.transitions { public class AuxFunctions { public static function concatObjects(... _args):Object{ var _local3:Object; var _local5:String; var _local2:Object = {}; var _local4:int; while (_local4 < _args.length) { _local3 = _args[_local4]; for (_local5 in _local3) { if (_local3[_local5] == null){ delete _local2[_local5]; } else { _local2[_local5] = _local3[_local5]; }; }; _local4++; }; return (_local2); } public static function numberToG(_arg1:Number):Number{ return (((_arg1 & 0xFF00) >> 8)); } public static function numberToR(_arg1:Number):Number{ return (((_arg1 & 0xFF0000) >> 16)); } public static function isInArray(_arg1:String, _arg2:Array):Boolean{ var _local3:uint = _arg2.length; var _local4:uint; while (_local4 < _local3) { if (_arg2[_local4] == _arg1){ return (true); }; _local4++; }; return (false); } public static function getObjectLength(_arg1:Object):uint{ var _local3:String; var _local2:uint; for (_local3 in _arg1) { _local2++; }; return (_local2); } public static function numberToB(_arg1:Number):Number{ return ((_arg1 & 0xFF)); } } }//package caurina.transitionsSection 12//Equations (caurina.transitions.Equations) package caurina.transitions { public class Equations { public function Equations(){ trace("Equations is a static class and should not be instantiated."); } public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; if (_arg1 < 1){ --_arg1; return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); }; --_arg1; return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2)); } public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ _local6 = (_local6 * 1.525); return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2)); }; _arg1 = (_arg1 - 2); _local6 = (_local6 * 1.525); return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2)); } public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2)); } public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2)); } public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot; _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2)); } public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function init():void{ Tweener.registerTransition("easenone", easeNone); Tweener.registerTransition("linear", easeNone); Tweener.registerTransition("easeinquad", easeInQuad); Tweener.registerTransition("easeoutquad", easeOutQuad); Tweener.registerTransition("easeinoutquad", easeInOutQuad); Tweener.registerTransition("easeoutinquad", easeOutInQuad); Tweener.registerTransition("easeincubic", easeInCubic); Tweener.registerTransition("easeoutcubic", easeOutCubic); Tweener.registerTransition("easeinoutcubic", easeInOutCubic); Tweener.registerTransition("easeoutincubic", easeOutInCubic); Tweener.registerTransition("easeinquart", easeInQuart); Tweener.registerTransition("easeoutquart", easeOutQuart); Tweener.registerTransition("easeinoutquart", easeInOutQuart); Tweener.registerTransition("easeoutinquart", easeOutInQuart); Tweener.registerTransition("easeinquint", easeInQuint); Tweener.registerTransition("easeoutquint", easeOutQuint); Tweener.registerTransition("easeinoutquint", easeInOutQuint); Tweener.registerTransition("easeoutinquint", easeOutInQuint); Tweener.registerTransition("easeinsine", easeInSine); Tweener.registerTransition("easeoutsine", easeOutSine); Tweener.registerTransition("easeinoutsine", easeInOutSine); Tweener.registerTransition("easeoutinsine", easeOutInSine); Tweener.registerTransition("easeincirc", easeInCirc); Tweener.registerTransition("easeoutcirc", easeOutCirc); Tweener.registerTransition("easeinoutcirc", easeInOutCirc); Tweener.registerTransition("easeoutincirc", easeOutInCirc); Tweener.registerTransition("easeinexpo", easeInExpo); Tweener.registerTransition("easeoutexpo", easeOutExpo); Tweener.registerTransition("easeinoutexpo", easeInOutExpo); Tweener.registerTransition("easeoutinexpo", easeOutInExpo); Tweener.registerTransition("easeinelastic", easeInElastic); Tweener.registerTransition("easeoutelastic", easeOutElastic); Tweener.registerTransition("easeinoutelastic", easeInOutElastic); Tweener.registerTransition("easeoutinelastic", easeOutInElastic); Tweener.registerTransition("easeinback", easeInBack); Tweener.registerTransition("easeoutback", easeOutBack); Tweener.registerTransition("easeinoutback", easeInOutBack); Tweener.registerTransition("easeoutinback", easeOutInBack); Tweener.registerTransition("easeinbounce", easeInBounce); Tweener.registerTransition("easeoutbounce", easeOutBounce); Tweener.registerTransition("easeinoutbounce", easeInOutBounce); Tweener.registerTransition("easeoutinbounce", easeOutInBounce); } public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2)); } public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001))); } public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2)); } public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2)); } public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2)); } public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2)); } public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; --_arg1; return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2)); } public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2)); } public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = (_arg1 / _arg4); return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2)); } public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005))); }; --_arg1; return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2)); } public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period; var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude; if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){ _local8 = _arg3; _local7 = (_local6 / 4); } else { _local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8))); }; return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2)); } public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2)); } public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{ if (_arg1 < (_arg4 / 2)){ return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5)); }; return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5)); } } }//package caurina.transitionsSection 13//PropertyInfoObj (caurina.transitions.PropertyInfoObj) package caurina.transitions { public class PropertyInfoObj { public var modifierParameters:Array; public var isSpecialProperty:Boolean; public var valueComplete:Number; public var modifierFunction:Function; public var extra:Object; public var valueStart:Number; public var hasModifier:Boolean; public var arrayIndex:Number; public var originalValueComplete:Object; public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){ valueStart = _arg1; valueComplete = _arg2; originalValueComplete = _arg3; arrayIndex = _arg4; extra = _arg5; isSpecialProperty = _arg6; hasModifier = Boolean(_arg7); modifierFunction = _arg7; modifierParameters = _arg8; } public function toString():String{ var _local1 = "\n[PropertyInfoObj "; _local1 = (_local1 + ("valueStart:" + String(valueStart))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("valueComplete:" + String(valueComplete))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("arrayIndex:" + String(arrayIndex))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("extra:" + String(extra))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("hasModifier:" + String(hasModifier))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("modifierFunction:" + String(modifierFunction))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("modifierParameters:" + String(modifierParameters))); _local1 = (_local1 + "]\n"); return (_local1); } public function clone():PropertyInfoObj{ var _local1:PropertyInfoObj = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters); return (_local1); } } }//package caurina.transitionsSection 14//SpecialProperty (caurina.transitions.SpecialProperty) package caurina.transitions { public class SpecialProperty { public var parameters:Array; public var getValue:Function; public var preProcess:Function; public var setValue:Function; public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){ getValue = _arg1; setValue = _arg2; parameters = _arg3; preProcess = _arg4; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialProperty "); _local1 = (_local1 + ("getValue:" + String(getValue))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("setValue:" + String(setValue))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("parameters:" + String(parameters))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("preProcess:" + String(preProcess))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitionsSection 15//SpecialPropertyModifier (caurina.transitions.SpecialPropertyModifier) package caurina.transitions { public class SpecialPropertyModifier { public var getValue:Function; public var modifyValues:Function; public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){ modifyValues = _arg1; getValue = _arg2; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialPropertyModifier "); _local1 = (_local1 + ("modifyValues:" + String(modifyValues))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("getValue:" + String(getValue))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitionsSection 16//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter) package caurina.transitions { public class SpecialPropertySplitter { public var parameters:Array; public var splitValues:Function; public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){ splitValues = _arg1; parameters = _arg2; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + "[SpecialPropertySplitter "); _local1 = (_local1 + ("splitValues:" + String(splitValues))); _local1 = (_local1 + ", "); _local1 = (_local1 + ("parameters:" + String(parameters))); _local1 = (_local1 + "]"); return (_local1); } } }//package caurina.transitionsSection 17//Tweener (caurina.transitions.Tweener) package caurina.transitions { import flash.display.*; import flash.events.*; import flash.utils.*; public class Tweener { private static var _timeScale:Number = 1; private static var _currentTimeFrame:Number; private static var _specialPropertySplitterList:Object; private static var _engineExists:Boolean = false; private static var _specialPropertyModifierList:Object; private static var _currentTime:Number; private static var _tweenList:Array; private static var _specialPropertyList:Object; private static var _transitionList:Object; private static var _inited:Boolean = false; private static var __tweener_controller__:MovieClip; public function Tweener(){ trace("Tweener is a static class and should not be instantiated."); } public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{ if (!_inited){ init(); }; var _local4:SpecialPropertyModifier = new SpecialPropertyModifier(_arg2, _arg3); _specialPropertyModifierList[_arg1] = _local4; } public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{ if (!_inited){ init(); }; var _local6:SpecialProperty = new SpecialProperty(_arg2, _arg3, _arg4, _arg5); _specialPropertyList[_arg1] = _local6; } public static function init(... _args):void{ _inited = true; _transitionList = new Object(); Equations.init(); _specialPropertyList = new Object(); _specialPropertyModifierList = new Object(); _specialPropertySplitterList = new Object(); } private static function updateTweens():Boolean{ var _local1:int; if (_tweenList.length == 0){ return (false); }; _local1 = 0; while (_local1 < _tweenList.length) { if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){ if (!updateTweenByIndex(_local1)){ removeTweenByIndex(_local1); }; if (_tweenList[_local1] == null){ removeTweenByIndex(_local1, true); _local1--; }; }; _local1++; }; return (true); } public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{ var _local3:Number; var _local4:Array; var _local8:Function; var _local9:TweenListObj; var _local10:Number; var _local11:String; if (!Boolean(_arg1)){ return (false); }; if ((_arg1 is Array)){ _local4 = _arg1.concat(); } else { _local4 = [_arg1]; }; var _local5:Object = _arg2; if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; var _local6:Number = (isNaN(_local5.time)) ? 0 : _local5.time; var _local7:Number = (isNaN(_local5.delay)) ? 0 : _local5.delay; if (typeof(_local5.transition) == "string"){ _local11 = _local5.transition.toLowerCase(); _local8 = _transitionList[_local11]; } else { _local8 = _local5.transition; }; if (!Boolean(_local8)){ _local8 = _transitionList["easeoutexpo"]; }; _local3 = 0; while (_local3 < _local4.length) { if (_local5.useFrames == true){ _local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams); } else { _local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams); }; _local9.properties = null; _local9.onStart = _local5.onStart; _local9.onUpdate = _local5.onUpdate; _local9.onComplete = _local5.onComplete; _local9.onOverwrite = _local5.onOverwrite; _local9.onStartParams = _local5.onStartParams; _local9.onUpdateParams = _local5.onUpdateParams; _local9.onCompleteParams = _local5.onCompleteParams; _local9.onOverwriteParams = _local5.onOverwriteParams; _local9.onStartScope = _local5.onStartScope; _local9.onUpdateScope = _local5.onUpdateScope; _local9.onCompleteScope = _local5.onCompleteScope; _local9.onOverwriteScope = _local5.onOverwriteScope; _local9.onErrorScope = _local5.onErrorScope; _local9.isCaller = true; _local9.count = _local5.count; _local9.waitFrames = _local5.waitFrames; _tweenList.push(_local9); if ((((_local6 == 0)) && ((_local7 == 0)))){ _local10 = (_tweenList.length - 1); updateTweenByIndex(_local10); removeTweenByIndex(_local10); }; _local3++; }; return (true); } public static function pauseAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { pauseTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } public static function removeTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(removeTweenByIndex, _arg1, _local3)); } public static function splitTweens(_arg1:Number, _arg2:Array):uint{ var _local5:uint; var _local6:String; var _local7:Boolean; var _local3:TweenListObj = _tweenList[_arg1]; var _local4:TweenListObj = _local3.clone(false); _local5 = 0; while (_local5 < _arg2.length) { _local6 = _arg2[_local5]; if (Boolean(_local3.properties[_local6])){ _local3.properties[_local6] = undefined; delete _local3.properties[_local6]; }; _local5++; }; for (_local6 in _local4.properties) { _local7 = false; _local5 = 0; while (_local5 < _arg2.length) { if (_arg2[_local5] == _local6){ _local7 = true; break; }; _local5++; }; if (!_local7){ _local4.properties[_local6] = undefined; delete _local4.properties[_local6]; }; }; _tweenList.push(_local4); return ((_tweenList.length - 1)); } public static function updateFrame():void{ _currentTimeFrame++; } public static function resumeTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj = _tweenList[_arg1]; if ((((_local2 == null)) || (!(_local2.isPaused)))){ return (false); }; var _local3:Number = getCurrentTweeningTime(_local2); _local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused)); _local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused)); _local2.timePaused = undefined; _local2.isPaused = false; return (true); } public static function getVersion():String{ return ("AS3 1.31.71"); } public static function onEnterFrame(_arg1:Event):void{ updateTime(); updateFrame(); var _local2:Boolean; _local2 = updateTweens(); if (!_local2){ stopEngine(); }; } public static function updateTime():void{ _currentTime = getTimer(); } private static function updateTweenByIndex(_arg1:Number):Boolean{ var tTweening:TweenListObj; var mustUpdate:Boolean; var nv:Number; var t:Number; var b:Number; var c:Number; var d:Number; var pName:String; var eventScope:Object; var tScope:Object; var tProperty:Object; var pv:Number; var i = _arg1; tTweening = _tweenList[i]; if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){ return (false); }; var isOver:Boolean; var cTime:Number = getCurrentTweeningTime(tTweening); if (cTime >= tTweening.timeStart){ tScope = tTweening.scope; if (tTweening.isCaller){ do { t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1)); b = tTweening.timeStart; c = (tTweening.timeComplete - tTweening.timeStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, b, c, d); } while (!(cTime >= nv)); } else { mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates))); if (cTime >= tTweening.timeComplete){ isOver = true; mustUpdate = true; }; if (!tTweening.hasStarted){ if (Boolean(tTweening.onStart)){ eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope; try { tTweening.onStart.apply(eventScope, tTweening.onStartParams); } catch(e:Error) { handleError(tTweening, e, "onStart"); }; }; for (pName in tTweening.properties) { if (tTweening.properties[pName].isSpecialProperty){ if (Boolean(_specialPropertyList[pName].preProcess)){ tTweening.properties[pName].valueComplete = _specialPropertyList[pName].preProcess(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].originalValueComplete, tTweening.properties[pName].extra); }; pv = _specialPropertyList[pName].getValue(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra); } else { pv = tScope[pName]; }; tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv; }; mustUpdate = true; tTweening.hasStarted = true; }; if (mustUpdate){ for (pName in tTweening.properties) { tProperty = tTweening.properties[pName]; if (isOver){ nv = tProperty.valueComplete; } else { if (tProperty.hasModifier){ t = (cTime - tTweening.timeStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, 0, 1, d, tTweening.transitionParams); nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters); } else { t = (cTime - tTweening.timeStart); b = tProperty.valueStart; c = (tProperty.valueComplete - tProperty.valueStart); d = (tTweening.timeComplete - tTweening.timeStart); nv = tTweening.transition(t, b, c, d, tTweening.transitionParams); }; }; if (tTweening.rounded){ nv = Math.round(nv); }; if (tProperty.isSpecialProperty){ _specialPropertyList[pName].setValue(tScope, nv, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra); } else { tScope[pName] = nv; }; }; tTweening.updatesSkipped = 0; if (Boolean(tTweening.onUpdate)){ eventScope = (Boolean(tTweening.onUpdateScope)) ? tTweening.onUpdateScope : tScope; try { tTweening.onUpdate.apply(eventScope, tTweening.onUpdateParams); } catch(e:Error) { handleError(tTweening, e, "onUpdate"); }; }; } else { tTweening.updatesSkipped++; }; }; if (((isOver) && (Boolean(tTweening.onComplete)))){ eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope; try { tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams); } catch(e:Error) { handleError(tTweening, e, "onComplete"); }; }; return (!(isOver)); }; return (true); } public static function setTimeScale(_arg1:Number):void{ var _local2:Number; var _local3:Number; if (isNaN(_arg1)){ _arg1 = 1; }; if (_arg1 < 1E-5){ _arg1 = 1E-5; }; if (_arg1 != _timeScale){ if (_tweenList != null){ _local2 = 0; while (_local2 < _tweenList.length) { _local3 = getCurrentTweeningTime(_tweenList[_local2]); _tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1)); _tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1)); if (_tweenList[_local2].timePaused != undefined){ _tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1)); }; _local2++; }; }; _timeScale = _arg1; }; } public static function resumeAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { resumeTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{ var eventScope:Object; var pTweening = _arg1; var pError = _arg2; var pCallBackName = _arg3; if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){ eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope; try { pTweening.onError.apply(eventScope, [pTweening.scope, pError]); } catch(metaError:Error) { printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace())); }; } else { if (!Boolean(pTweening.onError)){ printError(((((String(pTweening.scope) + " raised an error while executing the '") + pCallBackName) + "'handler. \n") + pError.getStackTrace())); }; }; } private static function startEngine():void{ _engineExists = true; _tweenList = new Array(); __tweener_controller__ = new MovieClip(); __tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); _currentTimeFrame = 0; updateTime(); } public static function removeAllTweens():Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; var _local1:Boolean; _local2 = 0; while (_local2 < _tweenList.length) { removeTweenByIndex(_local2); _local1 = true; _local2++; }; return (_local1); } public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{ var _local3:Number; var _local4:Number; var _local5:String; var _local6:Array; var _local13:Function; var _local14:Object; var _local15:TweenListObj; var _local16:Number; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:String; if (!Boolean(_arg1)){ return (false); }; if ((_arg1 is Array)){ _local6 = _arg1.concat(); } else { _local6 = [_arg1]; }; var _local7:Object = TweenListObj.makePropertiesChain(_arg2); if (!_inited){ init(); }; if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){ startEngine(); }; var _local8:Number = (isNaN(_local7.time)) ? 0 : _local7.time; var _local9:Number = (isNaN(_local7.delay)) ? 0 : _local7.delay; var _local10:Array = new Array(); var _local11:Object = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true}; var _local12:Object = new Object(); for (_local5 in _local7) { if (!_local11[_local5]){ if (_specialPropertySplitterList[_local5]){ _local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters); _local3 = 0; while (_local3 < _local17.length) { if (_specialPropertySplitterList[_local17[_local3].name]){ _local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters); _local4 = 0; while (_local4 < _local18.length) { _local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false}; _local4++; }; } else { _local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false}; }; _local3++; }; } else { if (_specialPropertyModifierList[_local5] != undefined){ _local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]); _local3 = 0; while (_local3 < _local19.length) { _local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue}; _local3++; }; } else { _local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]}; }; }; }; }; for (_local5 in _local10) { if (_specialPropertyList[_local5] != undefined){ _local10[_local5].isSpecialProperty = true; } else { if (_local6[0][_local5] == undefined){ printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property.")); }; }; }; for (_local5 in _local12) { if (_local10[_local5] != undefined){ _local10[_local5].modifierParameters = _local12[_local5].modifierParameters; _local10[_local5].modifierFunction = _local12[_local5].modifierFunction; }; }; if (typeof(_local7.transition) == "string"){ _local20 = _local7.transition.toLowerCase(); _local13 = _transitionList[_local20]; } else { _local13 = _local7.transition; }; if (!Boolean(_local13)){ _local13 = _transitionList["easeoutexpo"]; }; _local3 = 0; while (_local3 < _local6.length) { _local14 = new Object(); for (_local5 in _local10) { _local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters); }; if (_local7.useFrames == true){ _local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams); } else { _local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams); }; _local15.properties = _local14; _local15.onStart = _local7.onStart; _local15.onUpdate = _local7.onUpdate; _local15.onComplete = _local7.onComplete; _local15.onOverwrite = _local7.onOverwrite; _local15.onError = _local7.onError; _local15.onStartParams = _local7.onStartParams; _local15.onUpdateParams = _local7.onUpdateParams; _local15.onCompleteParams = _local7.onCompleteParams; _local15.onOverwriteParams = _local7.onOverwriteParams; _local15.onStartScope = _local7.onStartScope; _local15.onUpdateScope = _local7.onUpdateScope; _local15.onCompleteScope = _local7.onCompleteScope; _local15.onOverwriteScope = _local7.onOverwriteScope; _local15.onErrorScope = _local7.onErrorScope; _local15.rounded = _local7.rounded; _local15.skipUpdates = _local7.skipUpdates; removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete); _tweenList.push(_local15); if ((((_local8 == 0)) && ((_local9 == 0)))){ _local16 = (_tweenList.length - 1); updateTweenByIndex(_local16); removeTweenByIndex(_local16); }; _local3++; }; return (true); } public static function registerTransition(_arg1:String, _arg2:Function):void{ if (!_inited){ init(); }; _transitionList[_arg1] = _arg2; } public static function printError(_arg1:String):void{ trace(("## [Tweener] Error: " + _arg1)); } private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{ var _local5:uint; var _local6:Array; var _local7:uint; var _local8:uint; var _local9:uint; var _local4:Boolean; if (!Boolean(_tweenList)){ return (false); }; _local5 = 0; while (_local5 < _tweenList.length) { if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){ if (_arg3.length == 0){ _arg1(_local5); _local4 = true; } else { _local6 = new Array(); _local7 = 0; while (_local7 < _arg3.length) { if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){ _local6.push(_arg3[_local7]); }; _local7++; }; if (_local6.length > 0){ _local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties); if (_local8 == _local6.length){ _arg1(_local5); _local4 = true; } else { _local9 = splitTweens(_local5, _local6); _arg1(_local9); _local4 = true; }; }; }; }; _local5++; }; return (_local4); } public static function getTweens(_arg1:Object):Array{ var _local2:uint; var _local3:String; if (!Boolean(_tweenList)){ return ([]); }; var _local4:Array = new Array(); _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ for (_local3 in _tweenList[_local2].properties) { _local4.push(_local3); }; }; _local2++; }; return (_local4); } public static function isTweening(_arg1:Object):Boolean{ var _local2:uint; if (!Boolean(_tweenList)){ return (false); }; _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ return (true); }; _local2++; }; return (false); } public static function pauseTweenByIndex(_arg1:Number):Boolean{ var _local2:TweenListObj = _tweenList[_arg1]; if ((((_local2 == null)) || (_local2.isPaused))){ return (false); }; _local2.timePaused = getCurrentTweeningTime(_local2); _local2.isPaused = true; return (true); } public static function getCurrentTweeningTime(_arg1:Object):Number{ return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime); } public static function getTweenCount(_arg1:Object):Number{ var _local2:uint; if (!Boolean(_tweenList)){ return (0); }; var _local3:Number = 0; _local2 = 0; while (_local2 < _tweenList.length) { if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){ _local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties)); }; _local2++; }; return (_local3); } private static function stopEngine():void{ _engineExists = false; _tweenList = null; _currentTime = 0; _currentTimeFrame = 0; __tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame); __tweener_controller__ = null; } public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{ var removedLocally:Boolean; var i:uint; var pName:String; var eventScope:Object; var p_scope = _arg1; var p_properties = _arg2; var p_timeStart = _arg3; var p_timeComplete = _arg4; var removed:Boolean; var tl:uint = _tweenList.length; i = 0; while (i < tl) { if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){ if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){ removedLocally = false; for (pName in _tweenList[i].properties) { if (Boolean(p_properties[pName])){ if (Boolean(_tweenList[i].onOverwrite)){ eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope; try { _tweenList[i].onOverwrite.apply(eventScope, _tweenList[i].onOverwriteParams); } catch(e:Error) { handleError(_tweenList[i], e, "onOverwrite"); }; }; _tweenList[i].properties[pName] = undefined; delete _tweenList[i].properties[pName]; removedLocally = true; removed = true; }; }; if (removedLocally){ if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){ removeTweenByIndex(i); }; }; }; }; i = (i + 1); }; return (removed); } public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{ if (!_inited){ init(); }; var _local4:SpecialPropertySplitter = new SpecialPropertySplitter(_arg2, _arg3); _specialPropertySplitterList[_arg1] = _local4; } public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{ _tweenList[_arg1] = null; if (_arg2){ _tweenList.splice(_arg1, 1); }; return (true); } public static function resumeTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(resumeTweenByIndex, _arg1, _local3)); } public static function pauseTweens(_arg1:Object, ... _args):Boolean{ var _local4:uint; var _local3:Array = new Array(); _local4 = 0; while (_local4 < _args.length) { if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){ _local3.push(_args[_local4]); }; _local4++; }; return (affectTweens(pauseTweenByIndex, _arg1, _local3)); } } }//package caurina.transitionsSection 18//TweenListObj (caurina.transitions.TweenListObj) package caurina.transitions { public class TweenListObj { public var hasStarted:Boolean; public var onUpdate:Function; public var useFrames:Boolean; public var count:Number; public var onOverwriteParams:Array; public var timeStart:Number; public var timeComplete:Number; public var onStartParams:Array; public var onUpdateScope:Object; public var rounded:Boolean; public var onUpdateParams:Array; public var properties:Object; public var onComplete:Function; public var transitionParams:Object; public var updatesSkipped:Number; public var onStart:Function; public var onOverwriteScope:Object; public var skipUpdates:Number; public var onStartScope:Object; public var scope:Object; public var isCaller:Boolean; public var timePaused:Number; public var transition:Function; public var onCompleteParams:Array; public var onError:Function; public var timesCalled:Number; public var onErrorScope:Object; public var onOverwrite:Function; public var isPaused:Boolean; public var waitFrames:Boolean; public var onCompleteScope:Object; public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){ scope = _arg1; timeStart = _arg2; timeComplete = _arg3; useFrames = _arg4; transition = _arg5; transitionParams = _arg6; properties = new Object(); isPaused = false; timePaused = undefined; isCaller = false; updatesSkipped = 0; timesCalled = 0; skipUpdates = 0; hasStarted = false; } public function clone(_arg1:Boolean):TweenListObj{ var _local3:String; var _local2:TweenListObj = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams); _local2.properties = new Array(); for (_local3 in properties) { _local2.properties[_local3] = properties[_local3].clone(); }; _local2.skipUpdates = skipUpdates; _local2.updatesSkipped = updatesSkipped; if (!_arg1){ _local2.onStart = onStart; _local2.onUpdate = onUpdate; _local2.onComplete = onComplete; _local2.onOverwrite = onOverwrite; _local2.onError = onError; _local2.onStartParams = onStartParams; _local2.onUpdateParams = onUpdateParams; _local2.onCompleteParams = onCompleteParams; _local2.onOverwriteParams = onOverwriteParams; _local2.onStartScope = onStartScope; _local2.onUpdateScope = onUpdateScope; _local2.onCompleteScope = onCompleteScope; _local2.onOverwriteScope = onOverwriteScope; _local2.onErrorScope = onErrorScope; }; _local2.rounded = rounded; _local2.isPaused = isPaused; _local2.timePaused = timePaused; _local2.isCaller = isCaller; _local2.count = count; _local2.timesCalled = timesCalled; _local2.waitFrames = waitFrames; _local2.hasStarted = hasStarted; return (_local2); } public function toString():String{ var _local3:String; var _local1 = "\n[TweenListObj "; _local1 = (_local1 + ("scope:" + String(scope))); _local1 = (_local1 + ", properties:"); var _local2:Boolean; for (_local3 in properties) { if (!_local2){ _local1 = (_local1 + ","); }; _local1 = (_local1 + ("[name:" + properties[_local3].name)); _local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart)); _local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete)); _local1 = (_local1 + "]"); _local2 = false; }; _local1 = (_local1 + (", timeStart:" + String(timeStart))); _local1 = (_local1 + (", timeComplete:" + String(timeComplete))); _local1 = (_local1 + (", useFrames:" + String(useFrames))); _local1 = (_local1 + (", transition:" + String(transition))); _local1 = (_local1 + (", transitionParams:" + String(transitionParams))); if (skipUpdates){ _local1 = (_local1 + (", skipUpdates:" + String(skipUpdates))); }; if (updatesSkipped){ _local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped))); }; if (Boolean(onStart)){ _local1 = (_local1 + (", onStart:" + String(onStart))); }; if (Boolean(onUpdate)){ _local1 = (_local1 + (", onUpdate:" + String(onUpdate))); }; if (Boolean(onComplete)){ _local1 = (_local1 + (", onComplete:" + String(onComplete))); }; if (Boolean(onOverwrite)){ _local1 = (_local1 + (", onOverwrite:" + String(onOverwrite))); }; if (Boolean(onError)){ _local1 = (_local1 + (", onError:" + String(onError))); }; if (onStartParams){ _local1 = (_local1 + (", onStartParams:" + String(onStartParams))); }; if (onUpdateParams){ _local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams))); }; if (onCompleteParams){ _local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams))); }; if (onOverwriteParams){ _local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams))); }; if (onStartScope){ _local1 = (_local1 + (", onStartScope:" + String(onStartScope))); }; if (onUpdateScope){ _local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope))); }; if (onCompleteScope){ _local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope))); }; if (onOverwriteScope){ _local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope))); }; if (onErrorScope){ _local1 = (_local1 + (", onErrorScope:" + String(onErrorScope))); }; if (rounded){ _local1 = (_local1 + (", rounded:" + String(rounded))); }; if (isPaused){ _local1 = (_local1 + (", isPaused:" + String(isPaused))); }; if (timePaused){ _local1 = (_local1 + (", timePaused:" + String(timePaused))); }; if (isCaller){ _local1 = (_local1 + (", isCaller:" + String(isCaller))); }; if (count){ _local1 = (_local1 + (", count:" + String(count))); }; if (timesCalled){ _local1 = (_local1 + (", timesCalled:" + String(timesCalled))); }; if (waitFrames){ _local1 = (_local1 + (", waitFrames:" + String(waitFrames))); }; if (hasStarted){ _local1 = (_local1 + (", hasStarted:" + String(hasStarted))); }; _local1 = (_local1 + "]\n"); return (_local1); } public static function makePropertiesChain(_arg1:Object):Object{ var _local3:Object; var _local4:Object; var _local5:Object; var _local6:Number; var _local7:Number; var _local8:Number; var _local2:Object = _arg1.base; if (_local2){ _local3 = {}; if ((_local2 is Array)){ _local4 = []; _local8 = 0; while (_local8 < _local2.length) { _local4.push(_local2[_local8]); _local8++; }; } else { _local4 = [_local2]; }; _local4.push(_arg1); _local6 = _local4.length; _local7 = 0; while (_local7 < _local6) { if (_local4[_local7]["base"]){ _local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]); } else { _local5 = _local4[_local7]; }; _local3 = AuxFunctions.concatObjects(_local3, _local5); _local7++; }; if (_local3["base"]){ delete _local3["base"]; }; return (_local3); //unresolved jump }; return (_arg1); } } }//package caurina.transitionsSection 19//wav (clock.wav) package clock { import flash.media.*; public dynamic class wav extends Sound { } }//package clockSection 20//StringUtil (com.adobe.utils.StringUtil) package com.adobe.utils { public class StringUtil { public static function beginsWith(_arg1:String, _arg2:String):Boolean{ return ((_arg2 == _arg1.substring(0, _arg2.length))); } public static function trim(_arg1:String):String{ return (_slot1.ltrim(_slot1.rtrim(_arg1))); } public static function stringsAreEqual(_arg1:String, _arg2:String, _arg3:Boolean):Boolean{ if (_arg3){ return ((_arg1 == _arg2)); }; return ((_arg1.toUpperCase() == _arg2.toUpperCase())); } public static function replace(_arg1:String, _arg2:String, _arg3:String):String{ var _local9:Number; var _local4:String = new String(); var _local5:Boolean; var _local6:Number = _arg1.length; var _local7:Number = _arg2.length; var _local8:Number = 0; while (_local8 < _local6) { if (_arg1.charAt(_local8) == _arg2.charAt(0)){ _local5 = true; _local9 = 0; while (_local9 < _local7) { if (_arg1.charAt((_local8 + _local9)) != _arg2.charAt(_local9)){ _local5 = false; break; }; _local9++; }; //unresolved if _local4 = (_local4 + _arg3); _local8 = (_local8 + (_local7 - 1)); } else { _local4 = (_local4 + _arg1.charAt(_local8)); }; _local8++; }; return (_local4); } public static function rtrim(_arg1:String):String{ var _local2:Number = _arg1.length; var _local3:Number = _local2; while (_local3 > 0) { if (_arg1.charCodeAt((_local3 - 1)) > 32){ return (_arg1.substring(0, _local3)); }; _local3--; }; return (""); } public static function endsWith(_arg1:String, _arg2:String):Boolean{ return ((_arg2 == _arg1.substring((_arg1.length - _arg2.length)))); } public static function remove(_arg1:String, _arg2:String):String{ return (_slot1.replace(_arg1, _arg2, "")); } public static function ltrim(_arg1:String):String{ var _local2:Number = _arg1.length; var _local3:Number = 0; while (_local3 < _local2) { if (_arg1.charCodeAt(_local3) > 32){ return (_arg1.substring(_local3)); }; _local3++; }; return (""); } } }//package com.adobe.utilsSection 21//CEvent (com.fuga.events.CEvent) package com.fuga.events { import flash.events.*; public class CEvent extends Event { public var params:Object;// = null public function CEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); params = _arg2; } } }//package com.fuga.eventsSection 22//CLabel (com.fuga.gui.CLabel) package com.fuga.gui { import flash.display.*; import flash.text.*; public class CLabel extends MovieClip { private var _label:TextField; public function CLabel(_arg1:String, _arg2:Boolean=false){ _label = new TextField(); super(); var _local3:TextFormat = new TextFormat("Verdana", 10, 0); _label.text = _arg1; _label.selectable = _arg2; _label.backgroundColor = 14540287; _label.background = true; _label.autoSize = TextFieldAutoSize.LEFT; addChild(_label); } public function set text(_arg1:String):void{ _label.text = _arg1; } public function setText(_arg1:String):void{ _label.text = _arg1; } } }//package com.fuga.guiSection 23//CWindow (com.fuga.gui.CWindow) package com.fuga.gui { import flash.display.*; import flash.events.*; import flash.text.*; import flash.filters.*; public class CWindow extends Sprite { protected var _height:int; protected var _width:int; private var _headerSize:int;// = 20 private var _widgetMask:Sprite; protected var _widgetHolder:Sprite; private var _title:TextField; public function CWindow(_arg1:String, _arg2:int, _arg3:int){ _width = _arg2; _height = _arg3; _widgetMask = new Sprite(); _widgetMask.graphics.lineStyle(0, 0, 0); _widgetMask.graphics.beginFill(0, 1); _widgetMask.graphics.drawRect(2, (_headerSize + 2), (_width - 3), ((_height - _headerSize) - 3)); _widgetMask.graphics.endFill(); addChild(_widgetMask); _widgetHolder = new Sprite(); _widgetHolder.mask = _widgetMask; addChild(_widgetHolder); _widgetHolder.y = _headerSize; _title = new TextField(); _title.text = _arg1; _title.selectable = (_title.mouseEnabled = false); _title.autoSize = TextFieldAutoSize.LEFT; addChild(_title); paint(); filters = [new DropShadowFilter(4, 45, 0, 0.4)]; addEventListener(MouseEvent.MOUSE_DOWN, onMouse, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, onMouse, false, 0, true); } public function paint():void{ graphics.clear(); graphics.lineStyle(1, 0); graphics.beginFill(0xFFFFFF); graphics.drawRoundRect(0, 0, _width, _height, 8); graphics.endFill(); graphics.moveTo(0, _headerSize); graphics.lineTo(_width, _headerSize); _title.y = -1; _title.x = 3; _widgetMask.graphics.clear(); _widgetMask.graphics.lineStyle(0, 0, 0); _widgetMask.graphics.beginFill(0, 1); _widgetMask.graphics.drawRect(2, (_headerSize + 2), (_width - 3), ((_height - _headerSize) - 3)); _widgetMask.graphics.endFill(); } public function destroy():void{ removeAllWidgets(); removeEventListener(MouseEvent.MOUSE_DOWN, onMouse); removeEventListener(MouseEvent.MOUSE_UP, onMouse); } public function arrangeWidgets():void{ if (_widgetHolder.numChildren == 0){ return; }; _widgetHolder.getChildAt(0).y = 2; _widgetHolder.getChildAt(0).x = 2; var _local1 = 1; while (_local1 < _widgetHolder.numChildren) { _widgetHolder.getChildAt(_local1).y = ((_widgetHolder.getChildAt((_local1 - 1)).y + _widgetHolder.getChildAt((_local1 - 1)).height) + 2); _widgetHolder.getChildAt(_local1).x = 2; _local1++; }; } public function removeWidget(_arg1:DisplayObject):void{ _widgetHolder.removeChild(_arg1); arrangeWidgets(); } public function get numWidgets():int{ return (_widgetHolder.numChildren); } public function removeAllWidgets():void{ while (_widgetHolder.numChildren > 0) { _widgetHolder.removeChildAt(0); }; } public function addWidget(_arg1:DisplayObject):void{ _widgetHolder.addChild(_arg1); arrangeWidgets(); } public function onMouse(_arg1:MouseEvent):void{ if ((_arg1.target is CWindow)){ switch (_arg1.type){ case MouseEvent.MOUSE_DOWN: if (mouseY < _headerSize){ _arg1.target.startDrag(); }; break; case MouseEvent.MOUSE_UP: _arg1.target.stopDrag(); break; }; }; } } }//package com.fuga.guiSection 24//CLogger (com.fuga.logger.CLogger) package com.fuga.logger { public class CLogger { public static var LOG_WARNING:int = 2; public static var LOG_INFO:int = 1; public static var LOG_ERROR:int = 3; private static var _logLevelNames:Array = ["---", " ", "!!!", "***"]; public static var LOG_DEBUG:int = 0; private static var _logFunctions:Array = [trace]; private static var _logLevel:int = 0; public function CLogger(_arg1:SingletonEnforcer){ } public static function log(_arg1:String, _arg2:Object=null, _arg3:int=0):void{ var _local4:String; var _local5:String; var _local6:Function; var _local7:String; var _local8:int; var _local9:int; if (_arg3 >= _logLevel){ _local4 = " ? "; if (_arg2 != null){ _local7 = ("" + _arg2); _local8 = (_local7.indexOf(" ") + 1); _local9 = _local7.indexOf("]"); _local4 = _local7.slice(_local8, _local9); }; _local5 = ((((_logLevelNames[_arg3] + " [") + _local4) + "] ") + _arg1); for each (_local6 in _logFunctions) { _local6(_local5); }; }; } public static function removeLogFunction(_arg1:Function):void{ var _local2:int = _logFunctions.indexOf(_arg1); if (_local2 > -1){ _logFunctions.splice(_local2, 1); }; } public static function addLogFunction(_arg1:Function):void{ _logFunctions.push(_arg1); } public static function setVerbosityLevel(_arg1:int):void{ _logLevel = _arg1; } } }//package com.fuga.logger class SingletonEnforcer { private function SingletonEnforcer(){ } }Section 25//CMath (com.fuga.math.CMath) package com.fuga.math { import flash.geom.*; public class CMath { public static function rad2deg(_arg1:Number):Number{ return (((_arg1 * 180) / Math.PI)); } private static function d2h(_arg1:int):String{ var _local2:Array = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; if ((((_arg1 < 0)) || ((_arg1 > 15)))){ return ("0"); }; return (_local2[_arg1]); } public static function hex2dec(_arg1:String):int{ var _local2:int = _arg1.length; var _local3:int; var _local4:int; var _local5:int = (_local2 - 1); while (_local5 >= 0) { _local4 = (_local4 + (h2d(_arg1.substr(_local5, 1)) * Math.pow(16, _local3))); _local3++; _local5--; }; return (_local4); } public static function getYAxis(_arg1:Matrix):Point{ return (new Point(_arg1.b, _arg1.d)); } public static function getXAxis(_arg1:Matrix):Point{ return (new Point(_arg1.a, _arg1.c)); } public static function deg2rad(_arg1:Number):Number{ return (((_arg1 * Math.PI) / 180)); } public static function sgn(_arg1:Number):int{ if (_arg1 > 0){ return (1); }; if (_arg1 < 0){ return (-1); }; return (0); } public static function dec2hex(_arg1:int):String{ var _local3:int; var _local2 = ""; while (_arg1 > 0) { _local3 = (_arg1 % 16); _local2 = (d2h(_local3) + _local2); _arg1 = (_arg1 - _local3); _arg1 = (_arg1 / 16); }; return (_local2); } private static function h2d(_arg1:String):int{ var _local2:Array = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; var _local3:int = _local2.indexOf(_arg1.toUpperCase()); if (_local3 == -1){ return (0); }; return (_local3); } public static function dot2d(_arg1:Point, _arg2:Point):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } } }//package com.fuga.mathSection 26//CSecureInt (com.fuga.security.CSecureInt) package com.fuga.security { public class CSecureInt { private var _s:Array; public function CSecureInt(_arg1:int, _arg2:int=0){ var _local3:int; super(); reset(_arg1); } public function get value():int{ return (calcValue()); } public function add(_arg1:int):void{ var _local2:int = (1 + Math.floor((Math.random() * (_s.length - 1)))); var _local3:int = (_arg1 / _local2); var _local4:int; var _local5:int; while (_local5 < _local2) { _s[_local5] = (_s[_local5] + _local3); _local4 = (_local4 + _local3); _local5++; }; _s[(_s.length - 1)] = (_s[(_s.length - 1)] + (_arg1 - _local4)); } public function set value(_arg1:int):void{ reset(_arg1); } private function calcValue():int{ var _local2:int; var _local1:int; for each (_local2 in _s) { _local1 = (_local1 + _local2); }; return (_local1); } private function reset(_arg1:int):void{ var _local2:int; _s = new Array(); _local2 = 0; while (_local2 < ((Math.random() * 5) + 5)) { _s.push(int(0)); _local2++; }; add(_arg1); } } }//package com.fuga.securitySection 27//C25DPositionalSound (com.fuga.soundmanager.C25DPositionalSound) package com.fuga.soundmanager { import flash.events.*; import flash.geom.*; import flash.media.*; import com.fuga.math.*; public class C25DPositionalSound { private var _xPosition:Number; private var _yPosition:Number; private var _channel:SoundChannel; private var _handle:String; private var _sound:CSoundWrapper; private var _zPosition:Number; private var _globalVolume:Number;// = 0 private var _tmpPointA:Point; private var _tmpPointB:Point; private var _tmpMatrix:Matrix;// = null private var _range:Number; public function C25DPositionalSound(_arg1:CSoundWrapper, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number=1){ _tmpPointA = new Point(0, 0); _tmpPointB = new Point(0, 0); super(); _sound = _arg1; _handle = _arg2; _xPosition = _arg3; _yPosition = _arg4; _zPosition = _arg5; _range = _arg6; _globalVolume = _arg7; if (_range <= 0){ throw (new ArgumentError("range must be positive and non-zero, o.w. bad things happen! Now don't do it again!")); }; } public function destroy():void{ if (_channel != null){ _channel.stop(); }; if (_sound.defaultLoops == CSoundWrapper.LOOPS_NO){ }; _channel = null; _sound = null; } public function update(_arg1:Number, _arg2:Matrix):void{ var _local3:Number; var _local4:Number; if (_sound.defaultLoops != CSoundWrapper.LOOPS_YES){ _local4 = Math.min(distanceTo(_arg2.tx, _arg1, _arg2.ty), _range); if (_channel == null){ startSound(_local3, _arg1, _arg2); } else { updateChannel(_local3, _arg1, _arg2); }; return; }; if (_channel == null){ if ((((((Math.abs((_arg2.ty - _zPosition)) > _range)) || ((Math.abs((_arg2.tx - _xPosition)) > _range)))) || ((Math.abs((_arg1 - _yPosition)) > _range)))){ return; }; }; _local3 = distanceTo(_arg2.tx, _arg1, _arg2.ty); if (_local3 > _range){ stopSound(); } else { if (_channel == null){ startSound(_local3, _arg1, _arg2); } else { updateChannel(_local3, _arg1, _arg2); }; }; } private function startSound(_arg1:Number, _arg2:Number, _arg3:Matrix):void{ var _local4:Number = ((_range - _arg1) / _range); var _local5:Number = 0; _tmpPointA.x = (_xPosition - _arg3.tx); _tmpPointA.y = (_zPosition - _arg3.ty); _tmpPointB = CMath.getXAxis(_arg3); if (_tmpPointA.length != 0){ _tmpPointB.y = (_tmpPointB.y / _tmpPointA.length); _tmpPointB.x = (_tmpPointB.x / _tmpPointA.length); _local5 = CMath.dot2d(_tmpPointB, _tmpPointA); } else { _local5 = 0; }; var _local6:SoundTransform = new SoundTransform(((_local4 * _sound.baseVolume) * _globalVolume), (_local5 + _sound.basePan)); var _local7:int; if (_sound.defaultLoops == CSoundWrapper.LOOPS_YES){ _local7 = int.MAX_VALUE; } else { if (_sound.defaultLoops == CSoundWrapper.LOOPS_MAYBE){ }; }; _channel = _sound.play(_sound.baseOffset, _local7, _local6); if (_sound.defaultLoops == CSoundWrapper.LOOPS_NO){ _channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete, false, 0, true); }; } private function distanceTo(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (Math.sqrt(((Math.pow((_xPosition - _arg1), 2) + Math.pow((_yPosition - _arg2), 2)) + Math.pow((_zPosition - _arg3), 2)))); } private function onSoundComplete(_arg1:Event):void{ CSoundManager.getInstance().complete25DPositionalSound(this); } public function updatePosition(_arg1:Number, _arg2:Number, _arg3:Number):void{ _xPosition = _arg1; _yPosition = _arg2; _zPosition = _arg3; } public function setGlobalVolume(_arg1:Number):void{ _globalVolume = _arg1; } public function dismantle():void{ if (_channel != null){ _channel.stop(); }; if (_sound.defaultLoops == CSoundWrapper.LOOPS_NO){ }; _channel = null; _sound = null; } public function get handle():String{ return (_handle); } private function stopSound():void{ if (_channel != null){ _channel.stop(); }; _channel = null; if (_sound.defaultLoops == CSoundWrapper.LOOPS_NO){ CSoundManager.getInstance().remove25DPositionalSound(_handle); }; } private function updateChannel(_arg1:Number, _arg2:Number, _arg3:Matrix):void{ var _local4:Number = ((_range - _arg1) / _range); var _local5:Number = 0; _tmpPointA.x = (_xPosition - _arg3.tx); _tmpPointA.y = (_zPosition - _arg3.ty); _tmpPointB = CMath.getXAxis(_arg3); if (_tmpPointA.length != 0){ _tmpPointB.y = (_tmpPointB.y / _tmpPointA.length); _tmpPointB.x = (_tmpPointB.x / _tmpPointA.length); _local5 = CMath.dot2d(_tmpPointB, _tmpPointA); } else { _local5 = 0; }; _channel.soundTransform = new SoundTransform(((_local4 * _sound.baseVolume) * _globalVolume), (_local5 + _sound.basePan)); } } }//package com.fuga.soundmanagerSection 28//C2DPositionalSound (com.fuga.soundmanager.C2DPositionalSound) package com.fuga.soundmanager { import flash.events.*; import flash.geom.*; import flash.media.*; public class C2DPositionalSound { private var _channel:SoundChannel; private var _handle:String; private var _position:Point; private var _sound:CSoundWrapper; private var _globalVolume:Number; private var _range:Number; public function C2DPositionalSound(_arg1:CSoundWrapper, _arg2:String, _arg3:Point, _arg4:Number, _arg5:Number){ _sound = _arg1; _handle = _arg2; _position = _arg3; _range = _arg4; _globalVolume = _arg5; if (_range <= 0){ throw (new ArgumentError("range must be positive and non-zero, o.w. bad things happen! Now don't do it again!")); }; } public function destroy():void{ if (_channel != null){ _channel.stop(); }; if (_sound.defaultLoops == CSoundWrapper.LOOPS_NO){ }; _channel = null; _sound = null; } public function update(_arg1:Point):void{ var _local3:Number; if (_sound.defaultLoops != CSoundWrapper.LOOPS_YES){ _local3 = Math.min(Point.distance(_position, _arg1), _range); if (_channel == null){ startSound(_local3, _arg1); } else { updateChannel(_local3, _arg1); }; return; }; if (_channel == null){ if ((((Math.abs((_arg1.x - _position.x)) > _range)) || ((Math.abs((_arg1.y - _position.y)) > _range)))){ return; }; }; var _local2:Number = Point.distance(_position, _arg1); if (_local2 > _range){ stopSound(); } else { if (_channel == null){ startSound(_local2, _arg1); } else { updateChannel(_local2, _arg1); }; }; } public function get handle():String{ return (_handle); } private function onSoundComplete(_arg1:Event):void{ CSoundManager.getInstance().complete2DPositionalSound(this); } private function startSound(_arg1:Number, _arg2:Point):void{ var _local3:Number = ((_range - _arg1) / _range); var _local4:Number = (1 - _local3); if (_arg2.x > _position.x){ _local4 = (_local4 * -1); }; var _local5:SoundTransform = new SoundTransform(((_local3 * _sound.baseVolume) * _globalVolume), (_local4 + _sound.basePan)); var _local6:int; if (_sound.defaultLoops == CSoundWrapper.LOOPS_YES){ _local6 = int.MAX_VALUE; }; _channel = _sound.play(_sound.baseOffset, _local6, _local5); if ((((_sound.defaultLoops == CSoundWrapper.LOOPS_NO)) && (!((_channel == null))))){ _channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete, false, 0, true); }; } public function updatePosition(_arg1:Point):void{ _position = _arg1; } private function stopSound():void{ if (_channel != null){ _channel.stop(); }; _channel = null; if (_sound.defaultLoops == CSoundWrapper.LOOPS_NO){ CSoundManager.getInstance().remove2DPositionalSound(_handle); }; } private function updateChannel(_arg1:Number, _arg2:Point):void{ var _local3:Number = ((_range - _arg1) / _range); var _local4:Number = (1 - _local3); if (_arg2.x > _position.x){ _local4 = (_local4 * -1); }; _channel.soundTransform = new SoundTransform(((_local3 * _sound.baseVolume) * _globalVolume), (_local4 + _sound.basePan)); } public function setGlobalVolume(_arg1:Number):void{ _globalVolume = _arg1; } } }//package com.fuga.soundmanagerSection 29//CAmbientSound (com.fuga.soundmanager.CAmbientSound) package com.fuga.soundmanager { import flash.events.*; import flash.media.*; public class CAmbientSound { private var _channel:SoundChannel; private var _handle:String; private var _playingVolume:Number; private var _sound:CSoundWrapper; private var _globalVolume:Number; public function CAmbientSound(_arg1:CSoundWrapper, _arg2:Number, _arg3:String){ _sound = _arg1; _globalVolume = _arg2; _handle = _arg3; } public function destroy():void{ if (_channel != null){ _channel.stop(); if (_channel.hasEventListener(Event.SOUND_COMPLETE)){ _channel.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete); }; _channel = null; }; } public function stop():void{ _channel.stop(); } public function get channel():SoundChannel{ return (_channel); } public function alterPlayingPan(_arg1:Number):void{ var _local2:Number = _channel.soundTransform.pan; _local2 = (_local2 + _arg1); _local2 = Math.min(1, Math.max(-1, _local2)); _channel.soundTransform = new SoundTransform(_channel.soundTransform.volume, _local2); } public function setPlayingVolume(_arg1:Number):void{ _playingVolume = (_arg1 * _sound.baseVolume); _channel.soundTransform = new SoundTransform((_playingVolume * _globalVolume), _channel.soundTransform.pan); } private function onSoundComplete(_arg1:Event):void{ CSoundManager.getInstance().ambientSoundComplete(this); } public function get handle():String{ return (_handle); } public function setPlayingPan(_arg1:Number):void{ _channel.soundTransform = new SoundTransform(_channel.soundTransform.volume, Math.min(1, Math.max(-1, _arg1))); } public function play(_arg1:Number=1, _arg2:Number=0, _arg3:String="loops_maybe", _arg4:int=0):void{ _playingVolume = (_arg1 * _sound.baseVolume); _arg2 = (_arg2 + _sound.basePan); var _local5:SoundTransform = new SoundTransform((_playingVolume * _globalVolume), _arg2); if (_arg3 == CSoundWrapper.LOOPS_MAYBE){ _arg3 = _sound.defaultLoops; }; var _local6:int; if (_arg3 == CSoundWrapper.LOOPS_YES){ _local6 = int.MAX_VALUE; } else { if (_arg3 == CSoundWrapper.LOOPS_MAYBE){ }; }; _arg4 = (_arg4 + _sound.baseOffset); _channel = _sound.play(_arg4, _local6, _local5); if (_channel != null){ _channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete, false, 0, true); }; } public function alterPlayingVolume(_arg1:Number):void{ _playingVolume = (_playingVolume * _arg1); _channel.soundTransform = new SoundTransform((_playingVolume * _globalVolume), _channel.soundTransform.pan); } public function restorePlayingVolume():void{ _playingVolume = _sound.baseVolume; _channel.soundTransform = new SoundTransform((_playingVolume * _globalVolume), _channel.soundTransform.pan); } public function restorePlayingPan():void{ _channel.soundTransform = new SoundTransform(_channel.soundTransform.volume, _sound.basePan); } public function setGlobalVolume(_arg1:Number):void{ _globalVolume = _arg1; alterPlayingVolume(1); } } }//package com.fuga.soundmanagerSection 30//CSoundManager (com.fuga.soundmanager.CSoundManager) package com.fuga.soundmanager { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.net.*; import flash.utils.*; import com.fuga.logger.*; public class CSoundManager extends EventDispatcher { private var _isMute:Boolean;// = false private var _globalVolume:Number;// = 1 private var _preMuteGlobalVol:Number;// = 1 private var _musicPlayingKey:String;// = null private var _25D_lastMicTransform:Matrix;// = null private var _normalizeOnLoad:Boolean; private var _25D_lastMicHeight:Number;// = 0 private var _playsSounds:Boolean;// = true private var _musicPlaying:CAmbientSound;// = null private var _2dPositionalSounds:Dictionary; private var _noHandleCounter:int;// = 0 private var _assetURL:String; private var _soundsXML:XML;// = null private var _playsMusic:Boolean;// = true private var _latestMicPos:Point;// = null private var _verbosityLevel:int; private var _25dPositionalSounds:Dictionary; private var _sounds:Object; private var _ambientSoundsPlaying:Dictionary; public static const DEFAULT_MUSIC_HANDLE:String = "default_music_handle"; private static const DEFAULT_BASE_VOLUME:Number = 1; private static const NO_HANDLE_PREFIX:String = "no_handle_"; private static const DEFAULT_BASE_PAN:Number = 0; private static const DEFAULT_PLAY_OFFSET:int = 0; private static const DEFAULT_LOOPS:String = "false"; private static var _instance:CSoundManager; public function CSoundManager(_arg1:SingletonEnforcer){ _sounds = new Object(); _ambientSoundsPlaying = new Dictionary(); _2dPositionalSounds = new Dictionary(); _25dPositionalSounds = new Dictionary(); _verbosityLevel = CLogger.LOG_INFO; } private function assetLoadingProgress(_arg1:ProgressEvent):void{ dispatchEvent(_arg1); } private function xmlLoaded(_arg1:Event):void{ log("XML loaded", CLogger.LOG_INFO); _soundsXML = new XML(_arg1.target.data); var _local2:Loader = new Loader(); _local2.contentLoaderInfo.addEventListener(Event.COMPLETE, assetLoaded, false, 0, true); _local2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, assetLoadingProgress, false, 0, true); _local2.load(new URLRequest(_assetURL)); } public function alterAmbientSoundVolume(_arg1:String, _arg2:Number):void{ if (!_playsSounds){ return; }; if (_ambientSoundsPlaying[_arg1] == undefined){ log((("alterAmbientSoundVolume: No sound found with handle '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; log((((("alterAmbientSoundVolume: Altering the volume of '" + _arg1) + "' by '") + _arg2) + "'"), CLogger.LOG_DEBUG); _ambientSoundsPlaying[_arg1].alterPlayingVolume(_arg2); } public function update25DPositionalSoundPosition(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number):void{ if (((!(_playsSounds)) || (_isMute))){ return; }; if (_25dPositionalSounds[_arg1] == undefined){ log((("2.5D Positional sound with handle '" + _arg1) + "' not found."), CLogger.LOG_WARNING); return; }; _25dPositionalSounds[_arg1].updatePosition(_arg2, _arg3, _arg4); } public function doesSoundKeyExist(_arg1:String):Boolean{ return (!((_sounds[_arg1] == undefined))); } public function complete2DPositionalSound(_arg1:C2DPositionalSound):void{ log((("2D pos. sound complete '" + _arg1.handle) + "'"), CLogger.LOG_DEBUG); var _local2:Object = new Object(); _local2.handle = _arg1.handle; dispatchEvent(new CSoundManagerEvent(CSoundManagerEvent.SOUND_COMPLETE, false, false, _local2)); remove2DPositionalSound(_arg1.handle); } private function assetLoaded(_arg1:Event):void{ log("SWF loaded", CLogger.LOG_INFO); setSounds(_soundsXML, _arg1.target.data, _normalizeOnLoad); dispatchEvent(new Event(Event.COMPLETE)); } public function mute():void{ log("Mute", CLogger.LOG_INFO); _preMuteGlobalVol = _globalVolume; setGlobalVolume(0); _isMute = true; } public function add25DPositionalSound(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String=null):void{ if (!_playsSounds){ log((("Stopped sound '" + _arg1) + "' from playing 'cause we don't play sounds"), CLogger.LOG_DEBUG); return; }; if (_arg6 != null){ if (((((!((_25dPositionalSounds[_arg6] == undefined))) || (!((_2dPositionalSounds[_arg6] == undefined))))) || (!((_ambientSoundsPlaying[_arg6] == undefined))))){ log((("(registering 2.5D) Sound handle already in use '" + _arg6) + "'"), CLogger.LOG_WARNING); return; }; } else { _arg6 = (NO_HANDLE_PREFIX + _noHandleCounter); _noHandleCounter++; log((("No handle for 2.5D pos. sound, given handle '" + _arg6) + "'"), CLogger.LOG_DEBUG); }; if (_sounds[_arg1] == undefined){ log((("Cannot find sound with key '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; var _local7:Array = (_sounds[_arg1] as Array); var _local8:CSoundWrapper = (_local7[Math.floor((Math.random() * _local7.length))] as CSoundWrapper); log((((("Adding 2.5D pos. sound with key '" + _arg1) + "' and handle '") + _arg6) + "'"), CLogger.LOG_DEBUG); var _local9:C25DPositionalSound = new C25DPositionalSound(_local8, _arg6, _arg2, _arg3, _arg4, _arg5, _globalVolume); _25dPositionalSounds[_arg6] = _local9; if (_25D_lastMicTransform != null){ _local9.update(_25D_lastMicHeight, _25D_lastMicTransform); }; } public function setAmbientSoundPan(_arg1:String, _arg2:Number):void{ if (!_playsSounds){ return; }; if (_ambientSoundsPlaying[_arg1] == undefined){ log((("setAmbientSoundPan: No sound found with handle '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; log((((("setAmbientSoundPan: Setting the panning of '" + _arg1) + "' to '") + _arg2) + "'"), CLogger.LOG_DEBUG); _ambientSoundsPlaying[_arg1].setPlayingPan(_arg2); } public function update25DPositionalSounds(_arg1:Number, _arg2:Matrix):void{ var _local3:C25DPositionalSound; if (!_playsSounds){ return; }; for each (_local3 in _25dPositionalSounds) { if (_local3){ _local3.update(_arg1, _arg2); }; }; } public function isSoundHandleUsed(_arg1:String):Boolean{ return (((((!((_ambientSoundsPlaying[_arg1] == undefined))) || (!((_2dPositionalSounds[_arg1] == undefined))))) || (!((_25dPositionalSounds[_arg1] == undefined))))); } public function remove2DPositionalSound(_arg1:String):void{ if (!_playsSounds){ return; }; if (_2dPositionalSounds[_arg1] == undefined){ log((("Registered 2D Positional sound with handle '" + _arg1) + "' not found"), CLogger.LOG_WARNING); return; }; log((("Removing 2D pos. sound with handle '" + _arg1) + "'"), CLogger.LOG_DEBUG); _2dPositionalSounds[_arg1].destroy(); delete _2dPositionalSounds[_arg1]; } public function playAmbientSound(_arg1:String, _arg2:String=null, _arg3:Number=1, _arg4:Number=0, _arg5:String="default", _arg6:int=0):void{ if (!_playsSounds){ log((("Stopped sound '" + _arg1) + "' from playing 'cause we don't play sounds"), CLogger.LOG_DEBUG); return; }; log((("Play ambient sound '" + _arg1) + "'"), CLogger.LOG_DEBUG); if (_arg5 == "default"){ _arg5 = CSoundWrapper.LOOPS_MAYBE; }; if (_sounds[_arg1] == undefined){ log((("Sound not found '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; var _local7:Array = (_sounds[_arg1] as Array); var _local8:CSoundWrapper = (_local7[Math.floor((Math.random() * _local7.length))] as CSoundWrapper); if (_arg2 != null){ if (((((!((_ambientSoundsPlaying[_arg2] == undefined))) || (!((_2dPositionalSounds[_arg2] == undefined))))) || (!((_25dPositionalSounds[_arg2] == undefined))))){ log((("(Playing amb.) Sound handle already in use '" + _arg2) + "'"), CLogger.LOG_WARNING); return; }; } else { _arg2 = (NO_HANDLE_PREFIX + _noHandleCounter); _noHandleCounter++; log((("No handle for ambient sound, given handle '" + _arg2) + "'"), CLogger.LOG_DEBUG); }; var _local9:CAmbientSound = new CAmbientSound(_local8, _globalVolume, _arg2); _ambientSoundsPlaying[_arg2] = _local9; _local9.play(_arg3, _arg4, _arg5, _arg6); } public function registerSound(_arg1:Class, _arg2:String):void{ var _local7:Array; var _local3:Number = DEFAULT_BASE_VOLUME; var _local4:Number = DEFAULT_BASE_PAN; var _local5:int = DEFAULT_PLAY_OFFSET; var _local6:String = DEFAULT_LOOPS; if (_local6 == "true"){ _local6 = CSoundWrapper.LOOPS_YES; } else { if (_local6 == "false"){ _local6 = CSoundWrapper.LOOPS_NO; }; }; if (_sounds[_arg2] != undefined){ _local7 = (_sounds[_arg2] as Array); } else { _local7 = new Array(); _sounds[_arg2] = _local7; }; _local7.push(new CSoundWrapper(new (_arg1), _local3, _local4, _local6, _local5)); log((((((((((("Loaded sound '" + _arg2) + "', baseVolume '") + _local3) + "', basePan '") + _local4) + "', defaultLoops '") + _local6) + "', baseOffset '") + _local5) + "'"), CLogger.LOG_DEBUG); } public function add2DPositionalSound(_arg1:String, _arg2:Point, _arg3:Number, _arg4:String=null):void{ if (!_playsSounds){ log((("Stopped sound '" + _arg1) + "' from playing 'cause we don't play sounds"), CLogger.LOG_DEBUG); return; }; if (_arg4 != null){ if (((((!((_2dPositionalSounds[_arg4] == undefined))) || (!((_ambientSoundsPlaying[_arg4] == undefined))))) || (!((_25dPositionalSounds[_arg4] == undefined))))){ log((("(registering 2D) Sound handle already in use '" + _arg4) + "'"), CLogger.LOG_WARNING); return; }; } else { _arg4 = (NO_HANDLE_PREFIX + _noHandleCounter); _noHandleCounter++; log((("No handle for 2D pos. sound, given handle '" + _arg4) + "'"), CLogger.LOG_DEBUG); }; if (_sounds[_arg1] == undefined){ log((("Cannot find sound with key '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; var _local5:Array = (_sounds[_arg1] as Array); var _local6:CSoundWrapper = (_local5[Math.floor((Math.random() * _local5.length))] as CSoundWrapper); log((((("Adding 2D pos. sound with key '" + _arg1) + "' and handle '") + _arg4) + "'"), CLogger.LOG_DEBUG); var _local7:C2DPositionalSound = new C2DPositionalSound(_local6, _arg4, _arg2, _arg3, _globalVolume); _2dPositionalSounds[_arg4] = _local7; if (_latestMicPos != null){ _local7.update(_latestMicPos); }; } public function restoreMusicVolume():void{ if (_musicPlaying == null){ log("No music to restore volume on.", CLogger.LOG_DEBUG); return; }; _musicPlaying.restorePlayingVolume(); log("Restored volume of music.", CLogger.LOG_DEBUG); } public function unmute():void{ log("Un-mute", CLogger.LOG_INFO); _isMute = false; setGlobalVolume(_preMuteGlobalVol); } public function alterMusicVolume(_arg1:Number):void{ if (_musicPlaying == null){ log("No music to alter volume on.", CLogger.LOG_DEBUG); return; }; _musicPlaying.alterPlayingVolume(_arg1); log(("Altered volume of music by " + _arg1), CLogger.LOG_DEBUG); } public function complete25DPositionalSound(_arg1:C25DPositionalSound):void{ log((("2.5D pos. sound complete '" + _arg1.handle) + "'"), CLogger.LOG_DEBUG); var _local2:Object = new Object(); _local2.handle = _arg1.handle; dispatchEvent(new CSoundManagerEvent(CSoundManagerEvent.SOUND_COMPLETE, false, false, _local2)); remove25DPositionalSound(_arg1.handle); } public function setVerbosityLevel(_arg1:int):void{ if ((((((((_arg1 == CLogger.LOG_DEBUG)) || ((_arg1 == CLogger.LOG_INFO)))) || ((_arg1 == CLogger.LOG_WARNING)))) || ((_arg1 == CLogger.LOG_ERROR)))){ _verbosityLevel = _arg1; } else { CLogger.log((("verbosity level could not be set to unrecognized level '" + _arg1) + "'"), this, CLogger.LOG_WARNING); }; } public function ambientSoundComplete(_arg1:CAmbientSound):void{ log((("Sound complete '" + _arg1.handle) + "'"), CLogger.LOG_DEBUG); removeAmbientSound(_arg1.handle); var _local2:Object = new Object(); _local2.handle = _arg1.handle; dispatchEvent(new CSoundManagerEvent(CSoundManagerEvent.SOUND_COMPLETE, false, false, _local2)); } public function setGlobalVolume(_arg1:Number):void{ var _local2:CAmbientSound; var _local3:C2DPositionalSound; var _local4:C25DPositionalSound; _arg1 = Math.max(Math.min(_arg1, 1), 0); _globalVolume = _arg1; for each (_local2 in _ambientSoundsPlaying) { _local2.setGlobalVolume(_globalVolume); }; for each (_local3 in _2dPositionalSounds) { _local3.setGlobalVolume(_globalVolume); }; for each (_local4 in _25dPositionalSounds) { _local4.setGlobalVolume(_globalVolume); }; if (_musicPlaying != null){ _musicPlaying.setGlobalVolume(_globalVolume); }; if (_latestMicPos != null){ update2DPositionalSounds(_latestMicPos); }; } private function log(_arg1:String, _arg2:int):void{ if (_arg2 >= _verbosityLevel){ CLogger.log(_arg1, this, _arg2); }; } public function update2DPositionalSoundPosition(_arg1:String, _arg2:Point):void{ if (((!(_playsSounds)) || (_isMute))){ return; }; if (_2dPositionalSounds[_arg1] == undefined){ log((("2D Positional sound with handle '" + _arg1) + "' not found."), CLogger.LOG_WARNING); return; }; _2dPositionalSounds[_arg1].updatePosition(_arg2); } public function loadSounds(_arg1:String, _arg2:String, _arg3:Boolean=true):void{ log(((("Loading sounds, xmlURL: " + _arg1) + ", assetURL: ") + _arg2), CLogger.LOG_INFO); _normalizeOnLoad = _arg3; _assetURL = _arg2; var _local4:URLLoader = new URLLoader(); _local4.addEventListener(Event.COMPLETE, xmlLoaded, false, 0, true); _local4.load(new URLRequest(_arg1)); } public function setSounds(_arg1:XML, _arg2:Sprite, _arg3:Boolean=true):void{ var element:XML; var baseVolFound:Number; var soundClass:*; var baseVolume:Number; var basePan:Number; var baseOffset:int; var defaultLoops:String; var soundsArray:Array; var pXML = _arg1; var pAssets = _arg2; var normalizeOnLoad = _arg3; var baseVolDivider:Number = 1; if (_normalizeOnLoad){ log("Normalizing base volumes on load", CLogger.LOG_INFO); baseVolDivider = 0; for each (element in pXML.elements()) { if (element.@baseVolume != undefined){ baseVolFound = new Number(element.@baseVolume); if (baseVolFound > baseVolDivider){ baseVolDivider = baseVolFound; }; }; }; if (baseVolDivider == 0){ baseVolDivider = 1; log("baseVolDivider was 0.0, set to 1.0", CLogger.LOG_DEBUG); } else { log(("Highest base volume: " + baseVolDivider), CLogger.LOG_DEBUG); }; }; for each (element in pXML.elements()) { soundClass = null; try { soundClass = (pAssets.loaderInfo.applicationDomain.getDefinition(element.@className) as Class); baseVolume = DEFAULT_BASE_VOLUME; if (element.@baseVolume != undefined){ baseVolume = (new Number(element.@baseVolume) / baseVolDivider); }; basePan = DEFAULT_BASE_PAN; if (element.@basePan != undefined){ basePan = parseFloat(element.@basePan); }; baseOffset = DEFAULT_PLAY_OFFSET; if (element.@baseOffset != undefined){ baseOffset = parseInt(element.@baseOffset); }; defaultLoops = DEFAULT_LOOPS; if (element.@loops != undefined){ defaultLoops = String(element.@loops); }; if (defaultLoops == "true"){ defaultLoops = CSoundWrapper.LOOPS_YES; } else { if (defaultLoops == "false"){ defaultLoops = CSoundWrapper.LOOPS_NO; }; }; if (_sounds[element.@key] != undefined){ soundsArray = (_sounds[element.@key] as Array); } else { soundsArray = new Array(); _sounds[element.@key] = soundsArray; }; soundsArray.push(new CSoundWrapper(new (soundClass), baseVolume, basePan, defaultLoops, baseOffset)); log((((((((((("Loaded sound '" + element.@key) + "', baseVolume '") + baseVolume) + "', basePan '") + basePan) + "', defaultLoops '") + defaultLoops) + "', baseOffset '") + baseOffset) + "'"), CLogger.LOG_DEBUG); } catch(e:Error) { CLogger.log((("no such class '" + element.@className) + "', skipped"), this, CLogger.LOG_WARNING); }; }; } public function playMusic(_arg1:String, _arg2:String=null, _arg3:Number=1, _arg4:Number=0, _arg5:String="default", _arg6:int=0):void{ if (!_playsMusic){ log((("Stopped music '" + _arg1) + "' from playing 'cause we don't play music."), CLogger.LOG_DEBUG); return; }; if (_arg1 == _musicPlayingKey){ log((("Don't start music with key '" + _arg1) + "' because music with that key is already playing"), CLogger.LOG_DEBUG); return; }; if (_arg2 == null){ _arg2 = DEFAULT_MUSIC_HANDLE; }; log((((("Play music '" + _arg1) + "' with handle '") + _arg2) + "'."), CLogger.LOG_DEBUG); if (_arg5 == "default"){ _arg5 = CSoundWrapper.LOOPS_MAYBE; }; if (_sounds[_arg1] == undefined){ log((("Sound not found for music: '" + _arg1) + "'."), CLogger.LOG_WARNING); return; }; if (_musicPlaying != null){ stopMusic(); }; var _local7:Array = (_sounds[_arg1] as Array); var _local8:CSoundWrapper = (_local7[Math.floor((Math.random() * _local7.length))] as CSoundWrapper); _musicPlaying = new CAmbientSound(_local8, _globalVolume, _arg2); _musicPlaying.play(_arg3, _arg4, _arg5, _arg6); _musicPlayingKey = _arg1; } public function getAmbientSound(_arg1:String):CAmbientSound{ if (_ambientSoundsPlaying[_arg1] == undefined){ log((("Sound not found '" + _arg1) + "'"), CLogger.LOG_WARNING); return (null); }; return (_ambientSoundsPlaying[_arg1]); } public function set playsSounds(_arg1:Boolean):void{ _playsSounds = _arg1; if (_playsSounds){ log("Started playing sounds.", CLogger.LOG_INFO); } else { stopAndClearAllSounds(); log("Stopped playing sounds.", CLogger.LOG_INFO); }; } public function remove25DPositionalSound(_arg1:String):void{ if (!_playsSounds){ return; }; if (_25dPositionalSounds[_arg1] == undefined){ log((("Registered 2.5D Positional sound with handle '" + _arg1) + "' not found"), CLogger.LOG_WARNING); return; }; log((("Removing 2.5D pos. sound with handle '" + _arg1) + "'"), CLogger.LOG_DEBUG); _25dPositionalSounds[_arg1].destroy(); delete _25dPositionalSounds[_arg1]; } public function stopAndRemoveAmbientSound(_arg1:String):void{ if (!_playsSounds){ return; }; stopAmbientSound(_arg1); removeAmbientSound(_arg1); } public function stopMusic():void{ if (_musicPlaying == null){ return; }; _musicPlaying.stop(); _musicPlayingKey = null; log((("Stopped music '" + _musicPlaying.handle) + "'."), CLogger.LOG_DEBUG); } public function stopAndClearAllSounds():void{ var _local1:CAmbientSound; var _local2:C2DPositionalSound; var _local3:C25DPositionalSound; for each (_local1 in _ambientSoundsPlaying) { _local1.destroy(); }; for each (_local2 in _2dPositionalSounds) { _local2.destroy(); }; for each (_local3 in _25dPositionalSounds) { _local3.destroy(); }; _ambientSoundsPlaying = new Dictionary(); _2dPositionalSounds = new Dictionary(); _25dPositionalSounds = new Dictionary(); } public function setMusicVolume(_arg1:Number):void{ if (_musicPlaying == null){ log("No music to alter volume on.", CLogger.LOG_DEBUG); return; }; log((("setMusicVolume: Setting the volume of the music to '" + _arg1) + "'"), CLogger.LOG_DEBUG); _musicPlaying.setPlayingVolume(_arg1); } public function alterAmbientSoundPan(_arg1:String, _arg2:Number):void{ if (!_playsSounds){ return; }; if (_ambientSoundsPlaying[_arg1] == undefined){ log((("alterAmbientSoundPan: No sound found with handle '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; log((((("alterAmbientSoundPan: Altering the panning of '" + _arg1) + "' by '") + _arg2) + "'"), CLogger.LOG_DEBUG); _ambientSoundsPlaying[_arg1].alterPlayingPan(_arg2); } public function set playsMusic(_arg1:Boolean):void{ _playsMusic = _arg1; if (_playsMusic){ log("Started playing music.", CLogger.LOG_INFO); } else { stopMusic(); log("Stopped playing music.", CLogger.LOG_INFO); }; } public function restoreAmbientSoundPan(_arg1:String):void{ if (!_playsSounds){ return; }; if (_ambientSoundsPlaying[_arg1] == undefined){ log((("restoreAmbientSoundPan: No sound found with handle '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; log((("restoreAmbientSoundPan: Restoring the panning of '" + _arg1) + "'"), CLogger.LOG_DEBUG); _ambientSoundsPlaying[_arg1].restorePlayingPan(); } public function isMute():Boolean{ return (_isMute); } public function setAmbientSoundVolume(_arg1:String, _arg2:Number):void{ if (!_playsSounds){ return; }; if (_ambientSoundsPlaying[_arg1] == undefined){ log((("setAmbientSoundVolume: No sound found with handle '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; log((((("setAmbientSoundVolume: Setting the volume of '" + _arg1) + "' to '") + _arg2) + "'"), CLogger.LOG_DEBUG); _ambientSoundsPlaying[_arg1].setPlayingVolume(_arg2); } public function get playsMusic():Boolean{ return (_playsMusic); } public function get playsSounds():Boolean{ return (_playsSounds); } public function update2DPositionalSounds(_arg1:Point):void{ var _local2:C2DPositionalSound; if (!_playsSounds){ return; }; if (_latestMicPos == null){ for each (_local2 in _2dPositionalSounds) { _local2.update(_arg1); }; } else { for each (_local2 in _2dPositionalSounds) { _local2.update(_arg1); }; }; _latestMicPos = _arg1; } private function stopAmbientSound(_arg1:String):void{ if (_ambientSoundsPlaying[_arg1] == undefined){ log((("No sound playing found with handle '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; _ambientSoundsPlaying[_arg1].stop(); log((("Stopped ambient sound '" + _arg1) + "'"), CLogger.LOG_DEBUG); var _local2:Object = new Object(); _local2.handle = _arg1; dispatchEvent(new CSoundManagerEvent(CSoundManagerEvent.SOUND_STOPPED, _local2)); } public function destroy():void{ var _local1:String; var _local2:Array; var _local3:CSoundWrapper; stopAndClearAllSounds(); _instance = null; _soundsXML = null; for (_local1 in _sounds) { _local2 = _sounds[_local1]; for each (_local3 in _local2) { _local3.destroy(); }; delete _sounds[_local1]; }; _local2 = null; _sounds = null; _ambientSoundsPlaying = null; _2dPositionalSounds = null; _25dPositionalSounds = null; _musicPlaying = null; _latestMicPos = null; _25D_lastMicTransform = null; } private function removeAmbientSound(_arg1:String):void{ if (!_playsSounds){ return; }; if (_ambientSoundsPlaying[_arg1] == undefined){ return; }; _ambientSoundsPlaying[_arg1].destroy(); delete _ambientSoundsPlaying[_arg1]; } public function restoreAmbientSoundVolume(_arg1:String):void{ if (!_playsSounds){ return; }; if (_ambientSoundsPlaying[_arg1] == undefined){ log((("restoreAmbientSoundVolume: No sound found with handle '" + _arg1) + "'"), CLogger.LOG_WARNING); return; }; log((("restoreAmbientSoundVolume: Restoring the volume of '" + _arg1) + "'"), CLogger.LOG_DEBUG); _ambientSoundsPlaying[_arg1].restorePlayingVolume(); } public static function getInstance():CSoundManager{ if (CSoundManager._instance == null){ CSoundManager._instance = new CSoundManager(new SingletonEnforcer()); CLogger.log("Created new instance", CSoundManager._instance, CLogger.LOG_INFO); }; return (CSoundManager._instance); } } }//package com.fuga.soundmanager class SingletonEnforcer { private function SingletonEnforcer(){ } }Section 31//CSoundManagerEvent (com.fuga.soundmanager.CSoundManagerEvent) package com.fuga.soundmanager { import flash.events.*; public class CSoundManagerEvent extends Event { private var _params:Object; public static const SOUND_COMPLETE:String = "soundmanager_sound_complete"; public static const SOUND_STOPPED:String = "soundmanager_sound_stopped"; public function CSoundManagerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){ super(_arg1, _arg2, _arg3); _params = _arg4; } public function get params():Object{ return (_params); } } }//package com.fuga.soundmanagerSection 32//CSoundWrapper (com.fuga.soundmanager.CSoundWrapper) package com.fuga.soundmanager { import flash.media.*; public class CSoundWrapper { private var _baseOffset:int; private var _baseVolume:Number; private var _defaultLoops:String; private var _sound:Sound; private var _basePan:Number; private var _logFunction:Function; public static const LOOPS_NO:String = "loops_no"; public static const LOOPS_YES:String = "loops_yes"; public static const LOOPS_MAYBE:String = "loops_maybe"; public function CSoundWrapper(_arg1:Sound, _arg2:Number, _arg3:Number, _arg4:String, _arg5:int){ _logFunction = myTrace; super(); _sound = _arg1; _baseVolume = _arg2; _basePan = _arg3; _defaultLoops = _arg4; _baseOffset = _arg5; } public function get baseOffset():int{ return (_baseOffset); } public function get baseVolume():Number{ return (_baseVolume); } public function get basePan():Number{ return (_basePan); } public function get defaultLoops():String{ return (_defaultLoops); } public function destroy():void{ _sound = null; _logFunction = null; } private function myTrace(_arg1:String):void{ } public function play(_arg1:int, _arg2:int, _arg3:SoundTransform):SoundChannel{ return (_sound.play(_arg1, _arg2, _arg3)); } } }//package com.fuga.soundmanagerSection 33//CNoneTransition (com.fuga.statehandler.transitions.CNoneTransition) package com.fuga.statehandler.transitions { import flash.display.*; public class CNoneTransition extends Sprite implements ITransition { private var _currentState:DisplayObject; public function start(_arg1:DisplayObject):void{ if (_arg1 != null){ _currentState = _arg1; addChild(_currentState); }; dispatchEvent(new CTransitionEvent(CTransitionEvent.TRANSITION_PEAKED)); } public function nextStateReady(_arg1:DisplayObject):void{ dispatchEvent(new CTransitionEvent(CTransitionEvent.TRANSITION_COMPLETE)); } public function update(_arg1:Number):void{ } public function destroy():void{ if (_currentState != null){ removeChild(_currentState); _currentState = null; }; } } }//package com.fuga.statehandler.transitionsSection 34//CTransitionEvent (com.fuga.statehandler.transitions.CTransitionEvent) package com.fuga.statehandler.transitions { import flash.events.*; public class CTransitionEvent extends Event { public static const TRANSITION_PEAKED:String = "TRANSITION PEAKED"; public static const TRANSITION_COMPLETE:String = "TRANSITION COMPLETE"; public function CTransitionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } } }//package com.fuga.statehandler.transitionsSection 35//CWipeTransition (com.fuga.statehandler.transitions.CWipeTransition) package com.fuga.statehandler.transitions { import flash.display.*; public class CWipeTransition extends Sprite implements ITransition { private var _comingIn:Boolean;// = true private var _wiper:Sprite; private var _wipeProgress:Number;// = 0 private var _currentState:DisplayObject; private var _wipeTime:Number; private var _eventToDispatchNextUpdate:CTransitionEvent;// = null private var _nextState:DisplayObject; public function CWipeTransition(_arg1:uint, _arg2:int, _arg3:int, _arg4:Number=0.3){ _wipeTime = _arg4; _wiper = new Sprite(); _wiper.graphics.beginFill(_arg1); _wiper.graphics.drawRect(0, 0, _arg2, _arg3); _wiper.graphics.endFill(); } public function start(_arg1:DisplayObject):void{ _currentState = _arg1; addChild(_currentState); _wiper.x = -(_wiper.width); addChild(_wiper); } public function update(_arg1:Number):void{ if (_eventToDispatchNextUpdate != null){ dispatchEvent(_eventToDispatchNextUpdate); _eventToDispatchNextUpdate = null; } else { _wipeProgress = (_wipeProgress + _arg1); if (_wipeProgress > _wipeTime){ _wipeProgress = _wipeTime; }; if (_comingIn){ _wiper.x = (-(_wiper.width) * (1 - (_wipeProgress / _wipeTime))); if (_wipeProgress >= _wipeTime){ _comingIn = false; _wipeProgress = 0; _eventToDispatchNextUpdate = new CTransitionEvent(CTransitionEvent.TRANSITION_PEAKED); }; } else { if (_nextState != null){ _wiper.x = (_wiper.width * (_wipeProgress / _wipeTime)); if (_wipeProgress >= _wipeTime){ _eventToDispatchNextUpdate = new CTransitionEvent(CTransitionEvent.TRANSITION_COMPLETE); }; }; }; }; } public function destroy():void{ if (_currentState != null){ removeChild(_currentState); _currentState = null; }; if (_nextState != null){ removeChild(_nextState); _nextState = null; }; removeChild(_wiper); _wiper = null; _eventToDispatchNextUpdate = null; } public function nextStateReady(_arg1:DisplayObject):void{ _nextState = _arg1; removeChild(_currentState); _currentState = null; addChildAt(_nextState, 0); } } }//package com.fuga.statehandler.transitionsSection 36//ITransition (com.fuga.statehandler.transitions.ITransition) package com.fuga.statehandler.transitions { import flash.display.*; public interface ITransition { function update(_arg1:Number):void; function start(_arg1:DisplayObject):void; function destroy():void; function nextStateReady(_arg1:DisplayObject):void; } }//package com.fuga.statehandler.transitionsSection 37//CStateEvent (com.fuga.statehandler.CStateEvent) package com.fuga.statehandler { import flash.events.*; public class CStateEvent extends Event { public static const LOADING_COMPLETE:String = "LOADING COMPLETE"; public function CStateEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } } }//package com.fuga.statehandlerSection 38//CStateHandler (com.fuga.statehandler.CStateHandler) package com.fuga.statehandler { import flash.display.*; import com.fuga.statehandler.transitions.*; import flash.utils.*; import com.fuga.logger.*; public class CStateHandler extends Sprite implements IStateHandler { private const RELOAD:String = "RELOAD"; private const PUSH:String = "PUSH"; private const POP:String = "POP"; private const GO_TO:String = "GO TO"; private var _stateStack:Array; private var _currentTransition:ITransition;// = null private var _nextStateID:String;// = null private var _loadedStaticStates:Dictionary; private var _isStateStatic:Dictionary; private var _paramsForNextState:Object;// = null private var _nextState:IState;// = null private var _currentStateChangeWay:String;// = null private var _availableStates:Dictionary; private var _currentState:IState;// = null public function CStateHandler(){ _availableStates = new Dictionary(); _isStateStatic = new Dictionary(); _loadedStaticStates = new Dictionary(); _stateStack = new Array(); } public function isInTranstion():Boolean{ return (!((_currentTransition == null))); } private function onStateLoaded(_arg1:CStateEvent):void{ CLogger.log("Next state loaded.", this, CLogger.LOG_DEBUG); (_nextState as DisplayObject).removeEventListener(CStateEvent.LOADING_COMPLETE, onStateLoaded); _currentTransition.nextStateReady((_nextState as DisplayObject)); } public function get currentState():IState{ return (_currentState); } public function pushState(_arg1:String, _arg2:ITransition=null, _arg3:Object=null):void{ if (_currentTransition != null){ CLogger.log("pushState: Cannot go to another state during a transition.", this, CLogger.LOG_ERROR); return; }; if (_availableStates[_arg1] == undefined){ CLogger.log((("pushState: '" + _arg1) + "' isn't a registered state"), this, CLogger.LOG_ERROR); return; }; if (_currentState != null){ if (_arg1 == _currentState.stateID){ CLogger.log((("pushState: We are already in state '" + _arg1) + "'!"), this, CLogger.LOG_ERROR); return; }; }; CLogger.log((("Pushing state '" + _arg1) + "'."), this, CLogger.LOG_INFO); _nextStateID = _arg1; _paramsForNextState = _arg3; _currentStateChangeWay = PUSH; internalStartTransition(_arg2); } public function registerState(_arg1:Class, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false):void{ _availableStates[_arg2] = _arg1; _isStateStatic[_arg2] = _arg3; if (((_arg3) && (_arg4))){ _loadedStaticStates[_arg2] = new (_arg1); _loadedStaticStates[_arg2].construct(_arg2, this, null); CLogger.log((("Registered and pre-loaded state '" + _arg2) + "'."), this, CLogger.LOG_INFO); } else { CLogger.log((("Registered state '" + _arg2) + "'."), this, CLogger.LOG_INFO); }; } public function popState(_arg1:String=null, _arg2:ITransition=null, _arg3:Object=null):void{ var _local4:Boolean; var _local5:int; if (_currentTransition != null){ CLogger.log("popState: Cannot go to another state during a transition.", this, CLogger.LOG_ERROR); return; }; if (_currentState != null){ if (_arg1 == _currentState.stateID){ CLogger.log((("popState: We are already in state '" + _arg1) + "'!"), this, CLogger.LOG_ERROR); return; }; }; _paramsForNextState = _arg3; if (_arg1 != null){ CLogger.log((("Popping to state '" + _arg1) + "'."), this, CLogger.LOG_INFO); _local4 = false; _local5 = 0; while (_local5 < _stateStack.length) { if ((_stateStack[_local5] is _availableStates[_arg1])){ _nextState = _stateStack[_local5]; processStatesRemovedFromStack(_stateStack.slice((_local5 + 1), (_stateStack.length - 1))); _stateStack = _stateStack.slice(0, _local5); _local4 = true; break; }; _local5++; }; if (!_local4){ CLogger.log((("onPopState: Couldn't return to state '" + _arg1) + "', it wasn't on the stack."), this, CLogger.LOG_ERROR); return; }; } else { if (_stateStack.length <= 1){ CLogger.log("onPopState: No state to return to!", this, CLogger.LOG_ERROR); return; }; CLogger.log("Popping top state.", this, CLogger.LOG_INFO); _nextState = _stateStack[(_stateStack.length - 2)]; _stateStack.pop(); _stateStack.pop(); }; _currentStateChangeWay = POP; internalStartTransition(_arg2); } public function update(_arg1:Number):void{ if (_currentTransition != null){ _currentTransition.update(_arg1); }; if (_currentState != null){ _currentState.update(_arg1); }; if (_nextState != null){ _nextState.update(_arg1); }; } public function goToState(_arg1:String, _arg2:ITransition=null, _arg3:Object=null):void{ if (_currentTransition != null){ CLogger.log("goToState: Cannot go to another state during a transition.", this, CLogger.LOG_ERROR); return; }; if (_availableStates[_arg1] == undefined){ CLogger.log((("goToState: '" + _arg1) + "' isn't a registered state"), this, CLogger.LOG_ERROR); return; }; if (_currentState != null){ if (_arg1 == _currentState.stateID){ CLogger.log((("goToState: We are already in state '" + _arg1) + "'!"), this, CLogger.LOG_ERROR); return; }; }; CLogger.log((("Going to state '" + _arg1) + "'."), this, CLogger.LOG_INFO); _nextStateID = _arg1; _paramsForNextState = _arg3; _stateStack.pop(); processStatesRemovedFromStack(_stateStack); _stateStack = new Array(); _currentStateChangeWay = GO_TO; internalStartTransition(_arg2); } public function reloadCurrentState(_arg1:ITransition=null, _arg2:Object=null):void{ if (_currentTransition != null){ CLogger.log("reloadCurrentState: Cannot go to another state during a transition.", this, CLogger.LOG_ERROR); return; }; if (_currentState == null){ CLogger.log("reloadCurrentState: Are not currently in any state.", this, CLogger.LOG_ERROR); return; }; if (_isStateStatic[_currentState]){ CLogger.log((("reloadCurrentState: Cannot reload current state '" + _currentState.stateID) + "' because it is static."), this, CLogger.LOG_ERROR); return; }; CLogger.log((("Reloading current state '" + _currentState.stateID) + "'."), this, CLogger.LOG_INFO); _nextStateID = _currentState.stateID; _paramsForNextState = _arg2; _stateStack.pop(); _currentStateChangeWay = RELOAD; internalStartTransition(_arg1); } private function internalStartTransition(_arg1:ITransition):void{ if (_currentState != null){ removeChild((_currentState as DisplayObject)); }; if (_arg1 == null){ _currentTransition = new CNoneTransition(); } else { _currentTransition = _arg1; }; (_currentTransition as DisplayObject).addEventListener(CTransitionEvent.TRANSITION_PEAKED, onTransitionPeaked); (_currentTransition as DisplayObject).addEventListener(CTransitionEvent.TRANSITION_COMPLETE, onTransitionComplete); addChild((_currentTransition as DisplayObject)); _currentTransition.start((_currentState as DisplayObject)); } private function onTransitionComplete(_arg1:CTransitionEvent):void{ CLogger.log("Transition complete.", this, CLogger.LOG_DEBUG); var _local2:DisplayObject = (_currentTransition as DisplayObject); removeChild(_local2); _local2.removeEventListener(CTransitionEvent.TRANSITION_PEAKED, onTransitionPeaked); _local2.removeEventListener(CTransitionEvent.TRANSITION_COMPLETE, onTransitionComplete); _currentTransition.destroy(); _currentTransition = null; if (_currentState != null){ _currentState.onPausedByStateHandler(); if (_currentStateChangeWay == PUSH){ addChild((_currentState as DisplayObject)); } else { if (!_isStateStatic[_currentState.stateID]){ _currentState.destroy(); }; }; }; _currentStateChangeWay = null; _currentState = _nextState; _nextState = null; _nextStateID = null; _paramsForNextState = null; _stateStack.push(_currentState); addChild((_currentState as DisplayObject)); _currentState.onResumedByStateHandler(); } private function processStatesRemovedFromStack(_arg1:Array):void{ var _local2:IState; for each (_local2 in _arg1) { removeChild((_local2 as DisplayObject)); if (!_isStateStatic[_local2.stateID]){ _local2.destroy(); }; }; } private function onTransitionPeaked(_arg1:CTransitionEvent):void{ CLogger.log("Transition peaked.", this, CLogger.LOG_DEBUG); if (_nextState != null){ _currentTransition.nextStateReady((_nextState as DisplayObject)); return; }; if (_loadedStaticStates[_nextStateID] != undefined){ _nextState = _loadedStaticStates[_nextStateID]; _currentTransition.nextStateReady((_nextState as DisplayObject)); return; }; _nextState = new (_availableStates[_nextStateID]); (_nextState as DisplayObject).addEventListener(CStateEvent.LOADING_COMPLETE, onStateLoaded); if (_isStateStatic[_nextStateID]){ _loadedStaticStates[_nextStateID] = _nextState; }; _nextState.construct(_nextStateID, this, _paramsForNextState); } public function destroy():void{ var _local1:IState; var _local2:IState; var _local3:String; var _local4:Boolean; if (_currentTransition != null){ (_currentTransition as DisplayObject).removeEventListener(CTransitionEvent.TRANSITION_PEAKED, onTransitionPeaked); (_currentTransition as DisplayObject).removeEventListener(CTransitionEvent.TRANSITION_COMPLETE, onTransitionComplete); _currentTransition.destroy(); }; if (_nextState != null){ if ((_nextState as DisplayObject).hasEventListener(CStateEvent.LOADING_COMPLETE)){ (_nextState as DisplayObject).removeEventListener(CStateEvent.LOADING_COMPLETE, onStateLoaded); }; _nextState.destroy(); }; for each (_local2 in _stateStack) { _local4 = false; for each (_local1 in _loadedStaticStates) { if (_local2 == _local1){ _local4 = true; break; }; }; if (!_local4){ _local2.destroy(); }; }; for each (_local1 in _loadedStaticStates) { _local1.destroy(); }; while (numChildren > 0) { removeChildAt(0); }; for (_local3 in _availableStates) { delete _availableStates[_local3]; }; _availableStates = null; for (_local3 in _isStateStatic) { delete _isStateStatic[_local3]; }; _isStateStatic = null; for (_local3 in _loadedStaticStates) { delete _loadedStaticStates[_local3]; }; _loadedStaticStates = null; _stateStack = null; _currentState = null; _nextState = null; _nextStateID = null; _paramsForNextState = null; _currentTransition = null; _currentStateChangeWay = null; } } }//package com.fuga.statehandlerSection 39//IState (com.fuga.statehandler.IState) package com.fuga.statehandler { public interface IState { function construct(_arg1:String, _arg2:IStateHandler, _arg3:Object):void; function onResumedByStateHandler():void; function update(_arg1:Number):void; function destroy():void; function get stateID():String; function onPausedByStateHandler():void; } }//package com.fuga.statehandlerSection 40//IStateHandler (com.fuga.statehandler.IStateHandler) package com.fuga.statehandler { import com.fuga.statehandler.transitions.*; public interface IStateHandler { function popState(_arg1:String=null, _arg2:ITransition=null, _arg3:Object=null):void; function reloadCurrentState(_arg1:ITransition=null, _arg2:Object=null):void; function goToState(_arg1:String, _arg2:ITransition=null, _arg3:Object=null):void; function pushState(_arg1:String, _arg2:ITransition=null, _arg3:Object=null):void; function get currentState():IState; function update(_arg1:Number):void; function destroy():void; function isInTranstion():Boolean; function registerState(_arg1:Class, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false):void; } }//package com.fuga.statehandlerSection 41//CFPSCounter (com.fuga.utils.CFPSCounter) package com.fuga.utils { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; public class CFPSCounter extends Sprite { private var _frameCount:int; private var _frameRatesMeasurements:int;// = 0 private var _accumulatedFrameRates:int;// = 0 private var _fpsLabel:TextField; private var _framesPerSecond:int; private var _warningFPS:int;// = 0 private var _nextClock:int; public static const FPS_WARNING:String = "FPS_WARNING"; public function CFPSCounter(_arg1:int=0):void{ _warningFPS = _arg1; var _local2:TextFormat = new TextFormat(); _local2.font = "Tahoma"; _local2.color = 0; _local2.size = 10; _fpsLabel = new TextField(); _fpsLabel.defaultTextFormat = _local2; _fpsLabel.background = true; _fpsLabel.backgroundColor = 0xFFFFFF; _fpsLabel.border = false; _fpsLabel.text = "whee"; _fpsLabel.width = 20; _fpsLabel.height = 16; _fpsLabel.x = 2; _fpsLabel.y = 2; _fpsLabel.text = "0"; _fpsLabel.selectable = false; addChild(_fpsLabel); reset(); } public function destroy():void{ removeChild(_fpsLabel); _fpsLabel = null; } public function getCurrentFPS():int{ return (_framesPerSecond); } public function frame():void{ _frameCount++; if (getTimer() >= _nextClock){ _nextClock = (_nextClock + 1000); _framesPerSecond = _frameCount; _frameCount = 0; _fpsLabel.text = ("" + _framesPerSecond); _accumulatedFrameRates = (_accumulatedFrameRates + _framesPerSecond); _frameRatesMeasurements++; if (_framesPerSecond < _warningFPS){ dispatchEvent(new Event(FPS_WARNING)); }; }; } public function reset():void{ _nextClock = (getTimer() + 1000); _frameCount = 0; _framesPerSecond = 0; _accumulatedFrameRates = 0; _frameRatesMeasurements = 0; } public function getAvgFrameRate():int{ if (_frameRatesMeasurements == 0){ return (0); }; return (((1000 * _accumulatedFrameRates) / _frameRatesMeasurements)); } } }//package com.fuga.utilsSection 42//CKeyboardHandler (com.fuga.utils.CKeyboardHandler) package com.fuga.utils { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.ui.*; public dynamic class CKeyboardHandler extends Proxy { public static const KEY_LEFT:int = 37; public static const KEY_0:int = 48; public static const KEY_1:int = 49; public static const KEY_2:int = 50; public static const KEY_3:int = 51; public static const KEY_4:int = 52; public static const KEY_5:int = 53; public static const KEY_6:int = 54; public static const KEY_7:int = 55; public static const KEY_8:int = 56; public static const KEY_9:int = 57; public static const KEY_A:int = 65; public static const KEY_B:int = 66; public static const KEY_C:int = 67; public static const KEY_E:int = 69; public static const KEY_F:int = 70; public static const KEY_G:int = 71; public static const KEY_H:int = 72; public static const KEY_I:int = 73; public static const KEY_J:int = 74; public static const KEY_D:int = 68; public static const KEY_L:int = 76; public static const KEY_M:int = 77; public static const KEY_N:int = 78; public static const KEY_O:int = 79; public static const KEY_P:int = 80; public static const KEY_Q:int = 81; public static const KEY_R:int = 82; public static const KEY_S:int = 83; public static const KEY_T:int = 84; public static const KEY_U:int = 85; public static const KEY_W:int = 87; public static const KEY_X:int = 88; public static const KEY_Y:int = 89; public static const KEY_K:int = 75; public static const KEY_V:int = 86; public static const KEY_Z:int = 90; public static const KEY_SHIFT:int = 16; public static const KEY_UP:int = 38; public static const KEY_DOWN:int = 40; public static const KEY_DELETE:int = 46; public static const KEY_F2:int = 113; public static const KEY_F3:int = 114; public static const KEY_F5:int = 116; public static const KEY_F7:int = 118; public static const KEY_F4:int = 115; public static const KEY_F6:int = 117; public static const KEY_ENTER:int = 13; public static const KEY_INSERT:int = 45; public static const KEY_F1:int = 112; public static const KEY_END:int = 35; public static const KEY_PGDN:int = 34; public static const KEY_F8:int = 119; public static const KEY_PGUP:int = 33; public static const KEY_HOME:int = 36; public static const KEY_SPACE:int = 32; public static const KEY_RIGHT:int = 39; private static var keysDown:Object; private static var _stage:Stage; public function CKeyboardHandler(_arg1:Stage){ construct(_arg1); } private function keyReleased(_arg1:KeyboardEvent):void{ delete keysDown[_arg1.keyCode]; } public function isUp(_arg1:uint):Boolean{ return (!(Boolean((_arg1 in keysDown)))); } public function deconstruct():void{ if (_stage != null){ _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); _stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased); }; keysDown = new Object(); _stage = null; } public function construct(_arg1:Stage):void{ _stage = _arg1; keysDown = new Object(); _stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed, false, 0, true); _stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased, false, 0, true); } public function focus(_arg1:Sprite):void{ if (_stage != null){ _stage.focus = _arg1; }; } private function keyPressed(_arg1:KeyboardEvent):void{ keysDown[_arg1.keyCode] = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ return (((_arg1 in Keyboard)) ? Keyboard[_arg1] : -1); } public function isDown(_arg1:uint):Boolean{ return (Boolean((_arg1 in keysDown))); } } }//package com.fuga.utilsSection 43//CMemoryVisualizer (com.fuga.utils.CMemoryVisualizer) package com.fuga.utils { import flash.display.*; import flash.events.*; import flash.text.*; import flash.net.*; import flash.utils.*; import com.fuga.gui.*; import flash.system.*; public class CMemoryVisualizer extends Sprite { private var _gfxHeight:int; private var _minMem:Number;// = 0 private var _memStep:Number; private var _myTimer:Timer; private var _memTextField:TextField; private var _historyLength:int; private var _memHistory:Array; private var _lastMem:Number;// = 0 private var _maxTextField:TextField; private var _gfxWidth:int; private var _maxMem:Number;// = 0 private var _minTextField:TextField; public function CMemoryVisualizer(_arg1:int=80, _arg2:int=80, _arg3:int=500):void{ _memHistory = new Array(); super(); _myTimer = new Timer(_arg3); _myTimer.addEventListener("timer", timerHandler); _myTimer.start(); _gfxWidth = _arg1; _gfxHeight = _arg2; _memStep = 2; _historyLength = ((_gfxWidth - 10) / _memStep); var _local4:int; while (_local4 < _historyLength) { _memHistory.push(0); _local4++; }; var _local5:TextFormat = new TextFormat(); _local5.font = "Tahoma"; _local5.color = 0x888888; _local5.size = 9; _local5.align = TextFormatAlign.LEFT; _memTextField = new TextField(); _memTextField.defaultTextFormat = _local5; _memTextField.width = _gfxWidth; _memTextField.height = 16; _memTextField.x = 0; _memTextField.y = ((_gfxHeight - _memTextField.height) + 2); _memTextField.autoSize = TextFieldAutoSize.LEFT; _memTextField.selectable = false; _local5 = new TextFormat(); _local5.font = "Tahoma"; _local5.color = 0x444444; _local5.size = 8; _local5.align = TextFormatAlign.RIGHT; _maxTextField = new TextField(); _maxTextField.selectable = false; _maxTextField.defaultTextFormat = _local5; _maxTextField.width = _gfxWidth; _maxTextField.x = 0; _maxTextField.y = ((_gfxHeight - (_gfxHeight * 0.8)) - 11); _maxTextField.autoSize = TextFieldAutoSize.RIGHT; _maxTextField.selectable = false; _minTextField = new TextField(); _minTextField.selectable = false; _minTextField.defaultTextFormat = _local5; _minTextField.width = _gfxWidth; _minTextField.x = 0; _minTextField.y = (_gfxHeight - 12); _minTextField.autoSize = TextFieldAutoSize.RIGHT; _minTextField.selectable = false; addChild(_memTextField); addChild(_minTextField); addChild(_maxTextField); var _local6:CLabel = new CLabel("GC"); addChild(_local6); _local6.addEventListener(MouseEvent.CLICK, forceGC); } public function timerHandler(_arg1:TimerEvent):void{ var _local2:int; var _local3:Number = (Math.round(((100 * System.totalMemory) / (0x0400 * 0x0400))) / 100); if (_minMem == 0){ _minMem = _local3; }; if ((((_local3 < _minMem)) && (!((_local3 == 0))))){ _minMem = _local3; }; if (_local3 > _maxMem){ _maxMem = _local3; }; if (_local3 > 0){ _memHistory.push(_local3); }; if (_memHistory.length > (_historyLength + 1)){ _memHistory.splice(0, 1); }; if (_local3 > (2 * _minMem)){ _minMem = _local3; }; if (_local3 < (_minMem / 2)){ _minMem = _local3; }; this.graphics.clear(); this.graphics.beginFill(0xFFFFFF, 0.5); this.graphics.lineStyle(0, 0); this.graphics.drawRect(0, 0, _gfxWidth, _gfxHeight); this.graphics.endFill(); var _local4:Number = Math.floor(_minMem); var _local5:Number = Math.ceil(_maxMem); var _local6:Number = (_local5 - _local4); var _local7:Number = ((_gfxHeight * 0.8) / _local6); this.graphics.lineStyle(0.5, 0x888888); _local2 = 0; while (_local2 <= _gfxHeight) { this.graphics.moveTo(0, (_gfxHeight - _local2)); this.graphics.lineTo(_gfxWidth, (_gfxHeight - _local2)); _local2 = (_local2 + (_gfxHeight / 4)); }; this.graphics.lineStyle(1, 0xFF0000); this.graphics.moveTo(0, Math.min(_gfxHeight, (_gfxHeight - ((_memHistory[0] - _local4) * _local7)))); _local2 = 1; while (_local2 < _memHistory.length) { this.graphics.lineTo((_local2 * _memStep), Math.min(_gfxHeight, (_gfxHeight - ((_memHistory[_local2] - _local4) * _local7)))); _local2++; }; _memTextField.text = (((("Memory: " + _local3) + " MB (") + System.totalMemory) + ")"); _maxTextField.text = ("" + _local5); _minTextField.text = ("" + _local4); _memTextField.textColor = 0; _lastMem = _local3; } private function forceGC(_arg1:MouseEvent):void{ var evt = _arg1; try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch(e) { }; } public function destroy():void{ _myTimer.stop(); _myTimer = null; } public function stopTimer():void{ _myTimer.stop(); _memHistory = null; } } }//package com.fuga.utilsSection 44//CResourceManager (com.fuga.utils.CResourceManager) package com.fuga.utils { import flash.display.*; import flash.media.*; import com.fuga.logger.*; public class CResourceManager { private var _resources:Object; private static var _instance:CResourceManager; public function CResourceManager(_arg1:SingletonEnforcer){ _resources = new Object(); } public function setResource(_arg1, _arg2:String):void{ _resources[_arg2] = _arg1; CLogger.log((("id '" + _arg2) + "' registered (set)"), this); CLogger.log("setResource() is deprecated, use addResource (maybe using the pWriteOver flag?)", this, CLogger.LOG_WARNING); throw (new Error("setResource() is deprecated (maybe using the pWriteOver flag?)")); } public function getResource(_arg1:String){ if (_resources[_arg1] == undefined){ CLogger.log((("getResource: id '" + _arg1) + "' not registered"), this, CLogger.LOG_WARNING); }; return (_resources[_arg1]); } public function disposeAll():void{ var _local1:String; for (_local1 in _resources) { delete _resources[_local1]; }; } public function createMovieClip(_arg1:String):MovieClip{ if (_resources[_arg1] == undefined){ CLogger.log((("createMovieClip: id '" + _arg1) + "' not registered"), this, CLogger.LOG_WARNING); return (null); }; var _local2:Class = _resources[_arg1]; var _local3:MovieClip = new (_local2); return (_local3); } public function addMCDefinitions(_arg1:MovieClip, _arg2:XML):void{ var post:XML; var myClass:Class; var pResource = _arg1; var pDefinitionXML = _arg2; for each (post in pDefinitionXML.elements()) { try { myClass = Class(pResource.loaderInfo.applicationDomain.getDefinition(post.@className)); _resources[post.@className] = myClass; } catch(refError:ReferenceError) { CLogger.log((("failed to create class " + post.@className) + ", class not added"), this, CLogger.LOG_ERROR); }; }; } public function destroy():void{ disposeAll(); _resources = null; _instance = null; } public function createSound(_arg1:String):Sound{ if (_resources[_arg1] == undefined){ CLogger.log((("createSound: id '" + _arg1) + "' not registered"), this, CLogger.LOG_WARNING); return (null); }; var _local2:Class = _resources[_arg1]; var _local3:Sound = new (_local2); return (_local3); } public function idIsAvailable(_arg1:String):Boolean{ return ((_resources[_arg1] == undefined)); } public function addResource(_arg1, _arg2:String, _arg3:Boolean=false):void{ if (_arg1 == null){ CLogger.log((("cannot add null resource, '" + _arg2) + "' skipped"), this, CLogger.LOG_WARNING); return; }; if (idIsAvailable(_arg2)){ _resources[_arg2] = _arg1; CLogger.log((("id '" + _arg2) + "' registered (add)"), this); } else { if (_arg3){ CLogger.log((("id '" + _arg2) + "' already taken, but will be overwritten"), this, CLogger.LOG_WARNING); _resources[_arg2] = _arg1; } else { CLogger.log((("id '" + _arg2) + "' already taken, resource not added"), this, CLogger.LOG_WARNING); }; }; } public static function getInstance():CResourceManager{ if (CResourceManager._instance == null){ CResourceManager._instance = new CResourceManager(new SingletonEnforcer()); }; return (CResourceManager._instance); } } }//package com.fuga.utils class SingletonEnforcer { private function SingletonEnforcer(){ } }Section 45//CRndm (com.fuga.utils.CRndm) package com.fuga.utils { import flash.display.*; public class CRndm { protected var seedInvalid:Boolean;// = true protected var _seed:uint;// = 0 protected var _pointer:uint;// = 0 protected var bmpd:BitmapData; protected static var _instance:CRndm; public function CRndm(_arg1:uint=0){ _seed = _arg1; bmpd = new BitmapData(1000, 200); } public function set seed(_arg1:uint):void{ if (_arg1 != _seed){ seedInvalid = true; _pointer = 0; }; _seed = _arg1; } public function random():Number{ if (seedInvalid){ bmpd.noise(_seed, 0, 0xFF, (((1 | 2) | 4) | 8)); seedInvalid = false; }; _pointer = ((_pointer + 1) % 200000); return ((((bmpd.getPixel32((_pointer % 1000), ((_pointer / 1000) >> 0)) * 0.999999999999998) + 1E-15) / 4294967295)); } public function sign(_arg1:Number=0.5):int{ return (((random())<_arg1) ? 1 : -1); } public function boolean(_arg1:Number=0.5):Boolean{ return ((random() < _arg1)); } public function float(_arg1:Number, _arg2:Number=NaN):Number{ if (isNaN(_arg2)){ _arg2 = _arg1; _arg1 = 0; }; return (((random() * (_arg2 - _arg1)) + _arg1)); } public function bit(_arg1:Number=0.5):int{ return (((random())<_arg1) ? 1 : 0); } public function reset():void{ _pointer = 0; } public function get seed():uint{ return (_seed); } public function integer(_arg1:Number, _arg2:Number=NaN):int{ if (isNaN(_arg2)){ _arg2 = _arg1; _arg1 = 0; }; return (Math.floor(float(_arg1, _arg2))); } public function set pointer(_arg1:uint):void{ _pointer = _arg1; } public function get pointer():uint{ return (_pointer); } public static function random():Number{ return (instance.random()); } public static function get pointer():uint{ return (instance.pointer); } public static function set seed(_arg1:uint):void{ instance.seed = _arg1; } public static function bit(_arg1:Number=0.5):int{ return (instance.bit(_arg1)); } public static function boolean(_arg1:Number=0.5):Boolean{ return (instance.boolean(_arg1)); } public static function get seed():uint{ return (instance.seed); } public static function get instance():CRndm{ if (_instance == null){ _instance = new (CRndm); }; return (_instance); } public static function reset():void{ instance.reset(); } public static function set pointer(_arg1:uint):void{ instance.pointer = _arg1; } public static function float(_arg1:Number, _arg2:Number=NaN):Number{ return (instance.float(_arg1, _arg2)); } public static function sign(_arg1:Number=0.5):int{ return (instance.sign(_arg1)); } public static function integer(_arg1:Number, _arg2:Number=NaN):int{ return (instance.integer(_arg1, _arg2)); } } }//package com.fuga.utilsSection 46//CSettings (com.fuga.utils.CSettings) package com.fuga.utils { public class CSettings { private static var _variables:Object = new Object(); public static function getVar(_arg1:String):String{ var _local2:String = _variables[_arg1]; if (_local2 == null){ trace((("*** [CSettings] '" + _arg1) + "' not found")); }; return (_local2); } public static function loadVars(_arg1:XML):void{ var _local2:XML; for each (_local2 in _arg1.elements()) { if (_variables[_local2.@name] != undefined){ trace((("!!! [CSettings] '" + _local2.@name) + "' already defined")); }; _variables[_local2.@name] = _local2.@value; }; } public static function setVar(_arg1:String, _arg2:String):void{ if (_variables[_arg1] != undefined){ trace((("!!! [CSettings] '" + _arg1) + "' already defined")); }; _variables[_arg1] = _arg2; } public static function disposeAll():void{ _variables = new Object(); } public static function getInt(_arg1:String):int{ return (parseInt(getVar(_arg1))); } public static function getNumber(_arg1:String):Number{ return (parseFloat(getVar(_arg1))); } } }//package com.fuga.utilsSection 47//wav (combojumpboy_1.wav) package combojumpboy_1 { import flash.media.*; public dynamic class wav extends Sound { } }//package combojumpboy_1Section 48//wav (combojumpboy_2.wav) package combojumpboy_2 { import flash.media.*; public dynamic class wav extends Sound { } }//package combojumpboy_2Section 49//wav (combojumpboy_3.wav) package combojumpboy_3 { import flash.media.*; public dynamic class wav extends Sound { } }//package combojumpboy_3Section 50//wav (falldownboy.wav) package falldownboy { import flash.media.*; public dynamic class wav extends Sound { } }//package falldownboySection 51//MCCombo_15 (gameExport_fla.MCCombo_15) package gameExport_fla { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.media.*; import flash.net.*; import flash.utils.*; import flash.accessibility.*; import flash.system.*; import flash.filters.*; import flash.external.*; import flash.ui.*; import flash.xml.*; import adobe.utils.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class MCCombo_15 extends MovieClip { public var posts:MovieClip; public function MCCombo_15(){ addFrameScript(0, frame1); } function frame1(){ setText(""); } public function setText(_arg1:String):void{ posts.n1.visible = false; posts.n2.visible = false; posts.n3.visible = false; posts.n4.visible = false; posts.n5.visible = false; posts.n6.visible = false; if (_arg1.length > 0){ posts.n1.visible = true; posts.n1.gotoAndStop((parseInt(_arg1.charAt(0)) + 1)); }; if (_arg1.length > 1){ posts.n2.visible = true; posts.n2.gotoAndStop((parseInt(_arg1.charAt(1)) + 1)); }; if (_arg1.length > 2){ posts.n3.visible = true; posts.n3.gotoAndStop((parseInt(_arg1.charAt(2)) + 1)); }; if (_arg1.length > 3){ posts.n4.visible = true; posts.n4.gotoAndStop((parseInt(_arg1.charAt(3)) + 1)); }; if (_arg1.length > 4){ posts.n5.visible = true; posts.n5.gotoAndStop((parseInt(_arg1.charAt(4)) + 1)); }; if (_arg1.length > 5){ posts.n6.visible = true; posts.n6.gotoAndStop((parseInt(_arg1.charAt(5)) + 1)); }; posts.x = ((-20 * _arg1.length) / 2); } } }//package gameExport_flaSection 52//MCScore_8 (gameExport_fla.MCScore_8) package gameExport_fla { import flash.display.*; public dynamic class MCScore_8 extends MovieClip { public var n1:MovieClip; public var n2:MovieClip; public var n3:MovieClip; public var n5:MovieClip; public var n4:MovieClip; public var n6:MovieClip; public function MCScore_8(){ addFrameScript(0, frame1); } function frame1(){ setText(""); } public function setText(_arg1:String):void{ n1.visible = false; n2.visible = false; n3.visible = false; n4.visible = false; n5.visible = false; n6.visible = false; if (_arg1.length > 0){ n1.visible = true; n1.gotoAndStop((parseInt(_arg1.charAt(0)) + 1)); }; if (_arg1.length > 1){ n2.visible = true; n2.gotoAndStop((parseInt(_arg1.charAt(1)) + 1)); }; if (_arg1.length > 2){ n3.visible = true; n3.gotoAndStop((parseInt(_arg1.charAt(2)) + 1)); }; if (_arg1.length > 3){ n4.visible = true; n4.gotoAndStop((parseInt(_arg1.charAt(3)) + 1)); }; if (_arg1.length > 4){ n5.visible = true; n5.gotoAndStop((parseInt(_arg1.charAt(4)) + 1)); }; if (_arg1.length > 5){ n6.visible = true; n6.gotoAndStop((parseInt(_arg1.charAt(5)) + 1)); }; } } }//package gameExport_flaSection 53//wav (heavyland_1.wav) package heavyland_1 { import flash.media.*; public dynamic class wav extends Sound { } }//package heavyland_1Section 54//wav (heavyland_2.wav) package heavyland_2 { import flash.media.*; public dynamic class wav extends Sound { } }//package heavyland_2Section 55//wav (heavyland_3.wav) package heavyland_3 { import flash.media.*; public dynamic class wav extends Sound { } }//package heavyland_3Section 56//CAccount (itfb.account.CAccount) package itfb.account { import com.fuga.utils.*; import itfb.highscores.trophies.*; import itfb.items.*; import com.fuga.logger.*; import com.fuga.security.*; public class CAccount { private var _coins:CSecureInt;// = null private var _newCoins:int;// = 0 private var _lastVersion:String;// = "" private var _trophies:Object;// = null private var _boosters:Object;// = null private var _storedAppearance:String;// = "" private var _appearenceIsDirty:Boolean;// = true private var _vipLevel:int;// = 0 private var _lastActive:int;// = 0 private var _characterSex:String;// = "MALE" private var _itemsOwned:Object; private var _towersOwned:Object;// = null private var _appearanceItems:Array; private static var _instance:CAccount; public function CAccount(_arg1:SingletonEnforcer){ _itemsOwned = new Object(); _appearanceItems = []; super(); _coins = new CSecureInt(0); _trophies = new Object(); _towersOwned = new Object(); _towersOwned[1] = true; _boosters = new Object(); _boosters["runner"] = new CSecureInt(6); _boosters["jumper"] = new CSecureInt(6); _boosters["combofreak"] = new CSecureInt(6); _boosters["morescore"] = new CSecureInt(6); _boosters["amplifier"] = new CSecureInt(6); _boosters["kickback"] = new CSecureInt(6); _boosters["goldmine"] = new CSecureInt(6); } public function getBoosterQuantity(_arg1:String):int{ if (_boosters[_arg1] == undefined){ CLogger.log((("no such booster '" + _arg1) + "'"), this, CLogger.LOG_ERROR); return (0); }; return ((_boosters[_arg1] as CSecureInt).value); } public function set newCoins(_arg1:int):void{ _newCoins = _arg1; } public function getSkinColor():String{ var _local1:CItem; for each (_local1 in _appearanceItems) { if (_local1.category == "skins"){ return (_local1.id); }; }; return (""); } public function addTrophy(_arg1:ATrophy, _arg2:int, _arg3:Boolean=false):int{ var _local4:int; _trophies[_arg1.id] = _arg2; CLogger.log((((("added trophy " + _arg1.id) + " (") + ATrophy.levelToString(_arg2)) + ")"), this); if (_arg3){ switch (_arg2){ case ATrophy.BRONZE: _local4 = CSettings.getInt("coins_for_bronze_trophy"); break; case ATrophy.SILVER: _local4 = CSettings.getInt("coins_for_silver_trophy"); break; case ATrophy.GOLD: _local4 = CSettings.getInt("coins_for_gold_trophy"); break; }; _coins.add(_local4); }; return (_local4); } public function addOwnedItem(_arg1:String):void{ _itemsOwned[_arg1] = true; } public function get lastActive():int{ return (_lastActive); } public function set lastVersion(_arg1:String):void{ _lastVersion = _arg1; } public function getTrophiesAsString():String{ var _local2:String; var _local1 = ""; for (_local2 in _trophies) { _local1 = (_local1 + (((_local2 + ",") + _trophies[_local2]) + "|")); }; if (_local1.length > 0){ return (_local1.substring(0, (_local1.length - 1))); }; return (""); } public function getTrophies():Object{ return (_trophies); } public function set vipLevel(_arg1:int):void{ CLogger.log(("vip level = " + _arg1), this); _vipLevel = _arg1; } public function setTrophiesFromString(_arg1:String):void{ var _local3:String; var _local4:Array; var _local2:Array = _arg1.split("|"); for each (_local3 in _local2) { _local4 = _local3.split(","); if (_local4[0] != ""){ _trophies[_local4[0]] = parseInt(_local4[1]); }; }; } public function getBoosters():Array{ var _local2:String; var _local3:int; var _local1:Array = []; for (_local2 in _boosters) { _local3 = (_boosters[_local2] as CSecureInt).value; if (_local3 >= 0){ _local1.push({name:_local2, uses:_local3}); }; }; return (_local1); } public function ownsItem(_arg1:String):Boolean{ return (!((_itemsOwned[_arg1] == undefined))); } public function addCoins(_arg1:int):void{ _coins.add(_arg1); } public function get numberOfCoins():int{ return (_coins.value); } public function ownsTower(_arg1:int):Boolean{ return (!((_towersOwned[_arg1] == undefined))); } public function addOwnedTower(_arg1:int):void{ _towersOwned[_arg1] = true; } public function get vipLevel():int{ return (_vipLevel); } public function get lastVersion():String{ return (_lastVersion); } public function changeBoosterQuantity(_arg1:String, _arg2:int):void{ if (_boosters[_arg1] == undefined){ CLogger.log((("no such booster '" + _arg1) + "'"), this, CLogger.LOG_ERROR); } else { (_boosters[_arg1] as CSecureInt).add(_arg2); }; } public function get newCoins():int{ return (_newCoins); } public function getHairColor():String{ var _local1:CItem; for each (_local1 in _appearanceItems) { if (_local1.category == "haircolors"){ return (_local1.id); }; }; return (""); } public function get showAds():Boolean{ return ((_vipLevel < 1)); } public function set lastActive(_arg1:int):void{ _lastActive = _arg1; } public function destroy():void{ _coins = null; } public function getTrophyLevel(_arg1:String):int{ if (_trophies[_arg1] == undefined){ return (ATrophy.NONE); }; return (_trophies[_arg1]); } public static function getInstance():CAccount{ if (CAccount._instance == null){ CAccount._instance = new CAccount(new SingletonEnforcer()); }; return (CAccount._instance); } } }//package itfb.account class SingletonEnforcer { private function SingletonEnforcer(){ } }Section 57//CBackend (itfb.backend.CBackend) package itfb.backend { import flash.events.*; import itfb.account.*; import flash.net.*; public class CBackend extends EventDispatcher { private var _triesLeft:int;// = 0 private var _maxTries:int;// = 1 private var _uid:String;// = "0" private var _loadQueue:Array; public static const GLOBAL:String = "global"; public static const ALL_TIME:String = "all_time"; public static const FLOOR:String = "floor"; public static const SOCIAL:String = "social"; public static const COMBO:String = "combo"; public static const NATIONAL:String = "national"; public static const THIS_WEEK:String = "this_week"; public static const SCORE:String = "score"; public static const LAST_WEEK:String = "last_week"; public function CBackend(_arg1:int=1){ _loadQueue = []; super(); _maxTries = _arg1; _uid = "421"; } public function saveTrophies(_arg1:int=0):void{ var _local2:URLVariables = new URLVariables(); _local2["do"] = "putTrophies"; _local2.trophies = CAccount.getInstance().getTrophiesAsString(); _local2.coins = _arg1; } public function registerTimeSpent(_arg1:int, _arg2:String):void{ var _local3:int = Math.ceil((Number(_arg1) / 1000)); } } }//package itfb.backendSection 58//CIcyTowerEvent (itfb.events.CIcyTowerEvent) package itfb.events { import com.fuga.events.*; public class CIcyTowerEvent extends CEvent { public static const VERIFICATION_OK:String = "VERIFICATION_OK"; public static const TOWER_BOUGHT:String = "TOWER_BOUGHT"; public static const ACCOUNT_NOT_LOADED:String = "ACCOUNT_NOT_LOADED"; public static const POPUP_DESTROYED:String = "POPUP_CLOSED"; public static const GAME_OVER:String = "GAME_OVER"; public static const BOOSTER_SELECTED:String = "BOOSTER_SELECTED"; public static const POPUP_CANCEL:String = "POPUP_CANCEL"; public static const CHANGE_LANGUAGE:String = "CHANGE_LANGUAGE "; public static const PURCHASE_RESULT:String = "PURCHASE_RESULT"; public static const REPLAY_EVENT:String = "REPLAY_EVENT"; public static const CHEAT:String = "CHEAT"; public static const CHALLENGES_LOADED:String = "CHALLENGES_LOADED"; public static const NEW_QUAKE:String = "NEW_QUAKE"; public static const RECONFIGURE_GAME:String = "RECONFIGURE_GAME"; public static const APPEARANCE_LOADED:String = "APPEARANCE_LOADED"; public static const VERIFICATION_FAIL:String = "VERIFICATION_FAIL"; public static const RETRY_GAME:String = "RETRY_GAME"; public static const GOTO_MAIN_MENU:String = "GOTO_MAIN_MENU"; public static const ITEM_CLICKED:String = "ITEM_CLICKED"; public static const COMBO_PROGRESS:String = "COMBO_PROGRESS"; public static const CLOCK_RING:String = "CLOCK_RING"; public static const USER_PROGRESS_LOADED:String = "PROGRESS_LOADED"; public static const POPUP_GIVE:String = "POPUP_GIVE"; public static const PLAYER_LANDED:String = "PLAYER_LANDED"; public static const COMBO_COMPLETE:String = "COMBO_COMPLETE"; public static const POPUP_CONFIRM:String = "POPUP_CONFIRM"; public static const ACCOUNT_LOADED:String = "ACCOUNT_LOADED"; public function CIcyTowerEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg2, _arg3, _arg4); } } }//package itfb.eventsSection 59//CMyFactory (itfb.factory.CMyFactory) package itfb.factory { import flash.display.*; import com.fuga.utils.*; import com.fuga.soundmanager.*; import flash.text.*; import flash.utils.*; public class CMyFactory { private static var trophiesXML:Class = CMyFactory_trophiesXML; private static var styleSheetCls:Class = CMyFactory_styleSheetCls; private static var towerXML:Class = CMyFactory_towerXML; private static var playerCls:Class = CMyFactory_playerCls; private static var soundsXML:Class = CMyFactory_soundsXML; private static var settingsXML:Class = CMyFactory_settingsXML; private static var languageXML:Class = CMyFactory_languageXML; public function uglyButWorks():void{ var _local1:MovieClip = new MCGameExport(); var _local2:MovieClip = new MCMenuExport(); var _local3:MovieClip = new MCSoundExport(); var _local4:MovieClip = new MCTowerExport(); } public static function createLanguageXML():XML{ var _local1:ByteArray = (new languageXML() as ByteArray); var _local2:String = _local1.readUTFBytes(_local1.length); return (new XML(_local2)); } public static function addSounds():void{ var post:XML; var className:String; var myClass:Class; var xml:XML = CMyFactory.createSoundsXML(); for each (post in xml.elements()) { className = post.@className; try { myClass = (getDefinitionByName(className) as Class); CSoundManager.getInstance().registerSound(myClass, post.@key); } catch(e:Error) { }; }; } public static function addMCDefinitions(_arg1:XML):void{ var _local2:XML; var _local3:String; var _local4:Class; for each (_local2 in _arg1.elements()) { _local3 = _local2.@className; _local4 = (getDefinitionByName(_local3) as Class); CResourceManager.getInstance().addResource(_local4, _local3); }; } public static function createTowerXML():XML{ var _local1:ByteArray = (new towerXML() as ByteArray); var _local2:String = _local1.readUTFBytes(_local1.length); return (new XML(_local2)); } public static function createPlayerBitmap():Bitmap{ return ((new playerCls() as Bitmap)); } public static function createTrophiesXML():XML{ var _local1:ByteArray = (new trophiesXML() as ByteArray); var _local2:String = _local1.readUTFBytes(_local1.length); return (new XML(_local2)); } public static function createStyleSheet():StyleSheet{ var _local1:ByteArray = (new styleSheetCls() as ByteArray); var _local2:String = _local1.readUTFBytes(_local1.length); var _local3:StyleSheet = new StyleSheet(); _local3.parseCSS(_local2); return (_local3); } public static function createSoundsXML():XML{ var _local1:ByteArray = (new soundsXML() as ByteArray); var _local2:String = _local1.readUTFBytes(_local1.length); return (new XML(_local2)); } public static function createSettingsXML():XML{ var _local1:ByteArray = (new settingsXML() as ByteArray); var _local2:String = _local1.readUTFBytes(_local1.length); return (new XML(_local2)); } } }//package itfb.factorySection 60//CMyFactory_languageXML (itfb.factory.CMyFactory_languageXML) package itfb.factory { import mx.core.*; public class CMyFactory_languageXML extends ByteArrayAsset { } }//package itfb.factorySection 61//CMyFactory_playerCls (itfb.factory.CMyFactory_playerCls) package itfb.factory { import mx.core.*; public class CMyFactory_playerCls extends BitmapAsset { } }//package itfb.factorySection 62//CMyFactory_settingsXML (itfb.factory.CMyFactory_settingsXML) package itfb.factory { import mx.core.*; public class CMyFactory_settingsXML extends ByteArrayAsset { } }//package itfb.factorySection 63//CMyFactory_soundsXML (itfb.factory.CMyFactory_soundsXML) package itfb.factory { import mx.core.*; public class CMyFactory_soundsXML extends ByteArrayAsset { } }//package itfb.factorySection 64//CMyFactory_styleSheetCls (itfb.factory.CMyFactory_styleSheetCls) package itfb.factory { import mx.core.*; public class CMyFactory_styleSheetCls extends ByteArrayAsset { } }//package itfb.factorySection 65//CMyFactory_towerXML (itfb.factory.CMyFactory_towerXML) package itfb.factory { import mx.core.*; public class CMyFactory_towerXML extends ByteArrayAsset { } }//package itfb.factorySection 66//CMyFactory_trophiesXML (itfb.factory.CMyFactory_trophiesXML) package itfb.factory { import mx.core.*; public class CMyFactory_trophiesXML extends ByteArrayAsset { } }//package itfb.factorySection 67//CSegment (itfb.game.collision.CSegment) package itfb.game.collision { import flash.display.*; import flash.geom.*; public class CSegment { private var _vector:CVector2; private var _color:uint; public function CSegment(_arg1:CVector2, _arg2:uint=0xFF00FF){ _vector = _arg1; _color = _arg2; } public function draw(_arg1:Graphics, _arg2:Point):void{ var _local3 = 16; var _local4 = 6; var _local5 = 3; _arg1.lineStyle(1, _color); _arg1.moveTo((_vector.start.x + _arg2.x), (_vector.start.y + _arg2.y)); _arg1.lineTo((_vector.end.x + _arg2.x), (_vector.end.y + _arg2.y)); var _local6:Point = Point.interpolate(_vector.start, _vector.end, 0.5); _arg1.moveTo((_local6.x + _arg2.x), (_local6.y + _arg2.y)); _arg1.lineTo(((_local6.x + (5 * _vector.normal.x)) + _arg2.x), ((_local6.y + (5 * _vector.normal.y)) + _arg2.y)); } public function get vector():CVector2{ return (_vector); } public function set vector(_arg1:CVector2):void{ _vector = _arg1; } public function destroy():void{ _vector = null; } public function toString():String{ return (_vector.toString()); } public function clone():CSegment{ var _local1:CSegment = new CSegment(null); _local1.vector = new CVector2(_vector.start.clone(), _vector.end.clone()); return (_local1); } } }//package itfb.game.collisionSection 68//CVector2 (itfb.game.collision.CVector2) package itfb.game.collision { import flash.geom.*; public class CVector2 { public var start:Point; public var length:Number; public var normal:Point; public var normalAngle:Number; public var end:Point; public function CVector2(_arg1:Point=null, _arg2:Point=null){ if (_arg1 == null){ _arg1 = new Point(); }; if (_arg2 == null){ _arg2 = new Point(); }; start = _arg1; end = _arg2; normal = new Point(); var _local3:Point = new Point(); _local3.x = (end.x - start.x); _local3.y = (end.y - start.y); normalAngle = (Math.atan2(_local3.y, _local3.x) - (Math.PI / 2)); normal.x = Math.cos(normalAngle); normal.y = Math.sin(normalAngle); length = Point.distance(start, end); } public function reverse():void{ var _local1:Point = start; start = end; end = _local1; _local1 = null; } public function toString():String{ return (((start + " -> ") + end)); } public function destroy():void{ start = (end = null); } public static function getIntersection(_arg1:CVector2, _arg2:CVector2):Point{ var _local3:Number; var _local4:Number; var _local5:Number = (((_arg1.end.x - _arg1.start.x) * (_arg2.end.y - _arg2.start.y)) - ((_arg1.end.y - _arg1.start.y) * (_arg2.end.x - _arg2.start.x))); if (_local5 == 0){ return (null); }; _local3 = ((((_arg1.start.y - _arg2.start.y) * (_arg2.end.x - _arg2.start.x)) - ((_arg1.start.x - _arg2.start.x) * (_arg2.end.y - _arg2.start.y))) / _local5); _local4 = ((((_arg1.start.y - _arg2.start.y) * (_arg1.end.x - _arg1.start.x)) - ((_arg1.start.x - _arg2.start.x) * (_arg1.end.y - _arg1.start.y))) / _local5); if ((((((((_local3 < 0)) || ((_local4 < 0)))) || ((_local3 > 1)))) || ((_local4 > 1)))){ return (null); }; return (new Point((_arg1.start.x + (_local3 * (_arg1.end.x - _arg1.start.x))), (_arg1.start.y + (_local3 * (_arg1.end.y - _arg1.start.y))))); } } }//package itfb.game.collisionSection 69//CAvatar (itfb.game.entities.CAvatar) package itfb.game.entities { import com.fuga.utils.*; import flash.events.*; import pixelizer.render.*; import itfb.events.*; import itfb.game.*; import com.fuga.events.*; import com.fuga.soundmanager.*; import flash.geom.*; import itfb.game.input.*; import itfb.game.towers.*; import pixelizer.physics.*; import pixelizer.physics.collision.*; import com.fuga.security.*; import itfb.game.particles.*; public class CAvatar extends CPxBody { private var _coins:CSecureInt; private var _numJumpsInCombo:int;// = 0 public var currentPlatform:CPlatform;// = null private var _accelerationFactor:Number;// = 1 private var _lastLevel:int;// = 0 private var _state:int;// = 0 private var _sanityCheckMaxJump:int;// = 25 private var _towerPlayer:ITowerPlayer;// = null private var _topFloor:CSecureInt; public var inputSequence:CInputSequence;// = null private var _idleWalkThreshold:Number;// = 0.5 private var _comboTimeOut:Number;// = 0 private var _rotating:Boolean;// = false private var _jumpFactor:Number;// = 1 private var _comboScore:CSecureInt; private var _particleRenderer:IParticleRenderer;// = null private var _numCombos:int;// = 0 private var _alive:Boolean;// = true private var _virtual:Boolean;// = false private var _soundViewport:CPxViewport;// = null private var _maxComboTimer:Number;// = 2 private var _maxCombo:int;// = 0 private var _rejumpFactor:Number;// = 0 private var _currentComboLevel:int;// = 0 private var _isMale:Boolean;// = true private var _numJumps:int;// = 0 private static const CHOCKED:int = 5; private static const JUMPING:int = 2; private static const WALKING:int = 1; private static const IDLE:int = 0; private static const ON_EDGE:int = 6; public function CAvatar(_arg1:String, _arg2:ITowerPlayer, _arg3:IParticleRenderer, _arg4:Boolean){ this._idleWalkThreshold = 0.5; this._idleWalkThreshold = 0.5; this._idleWalkThreshold = 0.5; this._idleWalkThreshold = 0.5; this._idleWalkThreshold = 0.5; var _loc6_:int; var _loc7_:int; this._comboScore = new CSecureInt(0); this._topFloor = new CSecureInt(0); this._coins = new CSecureInt(0); super(_arg1); this._towerPlayer = _arg2; this._particleRenderer = _arg3; this._soundViewport = this._towerPlayer.getViewPort(); this._sanityCheckMaxJump = CSettings.getInt("sanity_check_max_jump"); this._isMale = _arg4; mass = 0; frameRate = 20; gotoAndPlay("idle"); hotspot.x = (bitmapData.width / 2); hotspot.y = 133; var _loc5_:Boolean = true; _loc6_ = 0; while ((((_loc6_ < bitmapData.height)) && (_loc5_))) { _loc7_ = 32; while ((((_loc7_ < (bitmapData.width - 32))) && (_loc5_))) { if (bitmapData.getPixel(_loc7_, _loc6_) > 0){ _loc5_ = false; }; _loc7_ = (_loc7_ + 4); }; _loc6_ = (_loc6_ + 2); }; pivotOffset.x = 0; pivotOffset.y = (-45 - ((52 - _loc6_) / 2)); var _loc8_ = 16; boundingBox = new CPxBBox((-(_loc8_) / 2), -54, _loc8_, 54); } public function updateFromTowerXML(_arg1:XML):void{ if (_arg1.gameplay.jump != undefined){ this._jumpFactor = parseFloat(_arg1.gameplay.jump); }; if (_arg1.gameplay.acceleration != undefined){ this._accelerationFactor = parseFloat(_arg1.gameplay.acceleration); }; } public function get coins():int{ return (this._coins.value); } public function isVirtual():Boolean{ return (this._virtual); } override public function onFall():void{ gotoAndPlay("fall"); this._state = JUMPING; if (this.currentPlatform != null){ this.currentPlatform.rider = null; this.currentPlatform = null; }; } public function get maxCombo():int{ return (this._maxCombo); } override public function onCollision(_arg1:int):void{ var _loc2_:CWallBounceParticle; if ((_arg1 & CPxCollisionSolver.COLLISION_BOTTOM)){ if (location == IN_AIR){ this._rotating = false; rotation = 0; location = CPxBody.ON_GROUND; if (Math.abs(velocity.x) > this._idleWalkThreshold){ this._state = WALKING; gotoAndPlay("walk"); } else { this._state = IDLE; gotoAndPlay("idle"); }; }; velocity.y = 0; }; if ((((_arg1 & CPxCollisionSolver.COLLISION_LEFT)) || ((_arg1 & CPxCollisionSolver.COLLISION_RIGHT)))){ velocity.x = (-(velocity.x) * 0.9); if (Math.abs(velocity.x) > 5){ if (((this._alive) && (!((this._particleRenderer == null))))){ if (!(this._virtual)){ _loc2_ = new CWallBounceParticle(); _loc2_.position.y = this.position.y; _loc2_.position.x = (this._towerPlayer.getTower().leftWall - 10); this._particleRenderer.addParticle(_loc2_); if (velocity.x < 0){ _loc2_.flip = CPxSprite.HORIZONTAL_FLIP; _loc2_.position.x = ((this._towerPlayer.getTower().rightWall - _loc2_.bitmapData.width) + 10); }; }; if (!(this._virtual)){ if (CSoundManager.getInstance().doesSoundKeyExist((this._towerPlayer.getTower().id + "_wallHit"))){ CSoundManager.getInstance().playAmbientSound((this._towerPlayer.getTower().id + "_wallHit"), null, this.getSoundVolume()); } else { CSoundManager.getInstance().playAmbientSound("avatar_wallHit", null, this.getSoundVolume()); }; }; }; }; }; } public function get score():int{ return ((this._comboScore.value + (this._topFloor.value * 10))); } public function get floor():int{ return (this._topFloor.value); } public function setSoundViewport(_arg1:CPxViewport):void{ this._soundViewport = _arg1; } public function get numJumps():int{ return (this._numJumps); } private function scoreCombo(_arg1:int, _arg2:int):void{ var _loc3_:int = (_arg1 * _arg2); this._comboScore.add(_loc3_); if (_arg1 > this._maxCombo){ this._maxCombo = _arg1; }; } public function jump():Boolean{ if (this._rejumpFactor > 0){ velocity.y = ((-(Math.max(Math.abs((velocity.x * 2.2)), 23)) * this._jumpFactor) * this._rejumpFactor); } else { velocity.y = (-(Math.max(Math.abs((velocity.x * 2.2)), 23)) * this._jumpFactor); }; location = CPxBody.IN_AIR; this._state = JUMPING; if (velocity.y < -40){ gotoAndPlay("jump_hi"); this._rotating = true; } else { if (Math.abs(velocity.x) > 1){ gotoAndPlay("jump_med"); } else { gotoAndPlay("jump_low"); }; }; if (this.currentPlatform != null){ this.currentPlatform.rider = null; this.currentPlatform = null; }; if (!(this._virtual)){ if (this._isMale){ if (this._numJumpsInCombo > 0){ CSoundManager.getInstance().playAmbientSound("avatar_combojump_boy", null, this.getSoundVolume()); } else { CSoundManager.getInstance().playAmbientSound("avatar_jump_boy", null, this.getSoundVolume()); }; } else { if (this._numJumpsInCombo > 0){ CSoundManager.getInstance().playAmbientSound("avatar_combojump_girl", null, this.getSoundVolume()); } else { CSoundManager.getInstance().playAmbientSound("avatar_jump_girl", null, this.getSoundVolume()); }; }; }; this._rejumpFactor = 0; this._numJumps++; return (true); } public function continueCombo():void{ this._numJumpsInCombo++; this._comboTimeOut = this._maxComboTimer; dispatchEvent(new CEvent(CIcyTowerEvent.COMBO_PROGRESS, {combo:this._currentComboLevel, numJumps:this._numJumpsInCombo})); } private function finishCombo():void{ if (this._alive){ if (this._numJumpsInCombo >= 2){ this._numCombos++; this.scoreCombo(this._currentComboLevel, this._numJumpsInCombo); dispatchEvent(new CEvent(CIcyTowerEvent.COMBO_COMPLETE, {combo:this._currentComboLevel, numJumps:this._numJumpsInCombo})); } else { dispatchEvent(new CEvent(CIcyTowerEvent.COMBO_COMPLETE, {combo:0, numJumps:0})); }; }; this._currentComboLevel = 0; this._numJumpsInCombo = 0; this._comboTimeOut = 0; } public function jumpNextFrame():Boolean{ return ((this._rejumpFactor > 0)); } public function get comboScore():int{ return (this._comboScore.value); } override public function update(_arg1:Number=1):void{ var _loc3_:CTrailParticle; var _loc2_:Number = 20; if (velocity.x > _loc2_){ velocity.x = _loc2_; }; if (velocity.x < -(_loc2_)){ velocity.x = -(_loc2_); }; if (this._state != WALKING){ frameRate = 20; } else { frameRate = Math.min((10 * Math.abs(velocity.x)), 25); }; if (location == ON_GROUND){ if (this._state != WALKING){ if (Math.abs(velocity.x) > this._idleWalkThreshold){ gotoAndPlay("walk"); this._state = WALKING; }; } else { if (Math.abs(velocity.x) < this._idleWalkThreshold){ gotoAndPlay("idle"); this._state = IDLE; }; }; }; flip = ((velocity.x)<0) ? int(CPxSprite.HORIZONTAL_FLIP) : int(CPxSprite.NO_FLIP); if (this._rotating){ rotation = (rotation + (180 * _arg1)); if ((((((((this._numJumpsInCombo > 0)) && (!(this._virtual)))) && (IcyTowerMB.highQuality))) && (!((this._particleRenderer == null))))){ _loc3_ = new CTrailParticle(); _loc3_.position = this.position.clone(); _loc3_.position.y = (_loc3_.position.y - 32); this._particleRenderer.addParticle(_loc3_, null, false); }; }; if (this._comboTimeOut > 0){ this._comboTimeOut = (this._comboTimeOut - _arg1); if (this._comboTimeOut <= 0){ this._comboTimeOut = 0; this.finishCombo(); }; }; if ((this._lastLevel - this._topFloor.value) > 20){ dispatchEvent(new CEvent(CIcyTowerEvent.CHEAT)); }; super.update(_arg1); } public function get numCombos():int{ return (this._numCombos); } public function get alive():Boolean{ return (this._alive); } public function get lastFloor():int{ return (this._lastLevel); } private function killCombo():void{ this._currentComboLevel = 0; this._numJumpsInCombo = 0; this._comboTimeOut = 0; } public function move(_arg1:int):void{ var _loc2_:Number = (0.65 * this._accelerationFactor); var _loc3_:Number = (0.7 * this._accelerationFactor); var _loc4_:Number = 0.9; if (_arg1 < 0){ if (velocity.x > 0){ velocity.x = (velocity.x * _loc2_); }; velocity.x = (velocity.x - _loc3_); } else { if (_arg1 > 0){ if (velocity.x < 0){ velocity.x = (velocity.x * _loc2_); }; velocity.x = (velocity.x + _loc3_); } else { velocity.x = (velocity.x * _loc4_); }; }; } public function setVirtual(_arg1:Boolean):void{ this._virtual = _arg1; } public function get comboTimeoutPercent():Number{ return ((this._comboTimeOut / this._maxComboTimer)); } protected function getSoundVolume():Number{ var _loc1_ = 1500; var _loc2_:Rectangle = this._soundViewport.rectangle; var _loc3_:Number = 1; var _loc4_:Number = Math.abs(((_loc2_.y + 260) - position.y)); return (Number(Math.max(0, (1 - (_loc4_ / _loc1_))))); } public function onLandedOnPlatform(_arg1:CPlatform):void{ var _loc3_:CLandParticle; if (_arg1.stable){ dispatchEvent(new CEvent("top_of_the_world")); }; this.currentPlatform = _arg1; this.currentPlatform.rider = this; var _loc2_:int = (_arg1.level - this._lastLevel); this._lastLevel = _arg1.level; if (this._lastLevel > this._topFloor.value){ this._topFloor.value = this._lastLevel; }; if ((((_loc2_ == 1)) || ((_loc2_ < 0)))){ this.finishCombo(); } else { if (_loc2_ != 0){ this._currentComboLevel = (this._currentComboLevel + _loc2_); this.continueCombo(); if ((((_loc2_ > this._sanityCheckMaxJump)) || ((this._currentComboLevel > this._topFloor.value)))){ this.killCombo(); }; }; }; if (!(this._virtual)){ if (velocity.y > 10){ if (this._particleRenderer != null){ _loc3_ = new CLandParticle(1); _loc3_.position = this.position.clone(); this._particleRenderer.addParticle(_loc3_); }; if (CSoundManager.getInstance().doesSoundKeyExist(((this._towerPlayer.getTower().id + "_") + _arg1.baseType))){ CSoundManager.getInstance().playAmbientSound(((this._towerPlayer.getTower().id + "_") + _arg1.baseType), null, this.getSoundVolume()); } else { CSoundManager.getInstance().playAmbientSound("avatar_land", null, this.getSoundVolume()); }; } else { CSoundManager.getInstance().playAmbientSound("avatar_land", null, this.getSoundVolume()); }; }; this._rejumpFactor = _arg1.rejumpFactor; _arg1.onLandedOnPlatform(this); dispatchEvent(new Event(CIcyTowerEvent.PLAYER_LANDED)); } public function addCoins(_arg1:int):void{ this._coins.add(_arg1); } public function kill():void{ if (this._alive){ if (!(this._virtual)){ if (this._isMale){ CSoundManager.getInstance().playAmbientSound("avatar_falldown_boy", null, this.getSoundVolume()); } else { CSoundManager.getInstance().playAmbientSound("avatar_falldown_girl", null, this.getSoundVolume()); }; }; }; this._alive = false; } override public function destroy():void{ this._particleRenderer = null; this.inputSequence = null; this._soundViewport = null; super.destroy(); } } }//package itfb.game.entitiesSection 70//CHud (itfb.game.hud.CHud) package itfb.game.hud { import flash.display.*; import com.fuga.utils.*; import pixelizer.render.*; import pixelizer.core.repository.*; import itfb.game.entities.*; public class CHud extends Sprite { private var _handle:CPxSprite;// = null private var _hudMC:MovieClip;// = null private var _combo:CPxSprite;// = null private var _renderObject:CPxRenderObject;// = null private var _clock:CPxSprite;// = null private var _comboMode:Boolean;// = false private var _comboMC:MovieClip;// = null private var _lastImage:Bitmap;// = null private var _scoreMC:MovieClip;// = null private var _comboNumber:CPxSprite;// = null private var _playerAvatar:CAvatar;// = null private var _comboMeter:CPxSprite;// = null public function CHud(){ var _local1:CPxFrames; super(); _renderObject = new CPxRenderObject(); _hudMC = CResourceManager.getInstance().createMovieClip("MCHud"); addChild(_hudMC); if (CPxRepository.getInstance().isAvailable("hud_clock")){ CPxRepository.getInstance().createPixelizerFrames("hud_clock", _hudMC.clock); CPxRepository.getInstance().createPixelizerFrames("hud_combo", _hudMC.combo); CPxRepository.getInstance().createPixelizerFrames("hud_handle", _hudMC.handle); CPxRepository.getInstance().createPixelizerFrames("hud_combo_meter", _hudMC.comboMeter); CPxRepository.getInstance().createPixelizerFrames("hud_combo_number", _hudMC.comboNumber); _local1 = CPxRepository.getInstance().getPixelizerFrames("hud_combo_number"); _local1.addAnimation(new CPxAnimation("show", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])); _local1.addAnimation(new CPxAnimation("update", [11, 12, 13, 14, 15, 16])); _local1.addAnimation(new CPxAnimation("hide", [17, 18, 19, 20, 21, 22, 23, 24, 25, 26])); _local1.addAnimation(new CPxAnimation("hidden", [26])); }; _hudMC.removeChild(_hudMC.clock); _hudMC.removeChild(_hudMC.combo); _hudMC.removeChild(_hudMC.handle); _hudMC.removeChild(_hudMC.comboMeter); _hudMC.removeChild(_hudMC.comboNumber); _clock = new CPxSprite("hud_clock"); _clock.position.x = 550; _clock.position.y = 0; _renderObject.addChild(_clock); _handle = new CPxSprite("hud_handle"); _handle.hotspot.x = 10; _handle.hotspot.y = 31; _handle.position.x = (_clock.position.x + 44); _handle.position.y = (_clock.position.y + 52); _renderObject.addChild(_handle); _combo = new CPxSprite("hud_combo"); _combo.position.x = 570; _combo.position.y = 100; _renderObject.addChild(_combo); _comboMeter = new CPxSprite("hud_combo_meter"); _comboMeter.position.x = (_combo.position.x + 5); _comboMeter.position.y = (_combo.position.y + 4); _renderObject.addChild(_comboMeter); _comboNumber = new CPxSprite("hud_combo_number"); _comboNumber.position.x = (_combo.position.x - 22); _comboNumber.position.y = (_combo.position.y + 120); _renderObject.addChild(_comboNumber); _comboNumber.frameRate = 30; _comboNumber.gotoAndPlay("hidden"); _scoreMC = _hudMC.score; _comboMC = _hudMC.comboDigits; _comboMC.setText(""); } public function destroy():void{ _renderObject.destroy(); _renderObject = null; _lastImage = null; _combo = (_clock = (_handle = (_comboMeter = (_comboNumber = null)))); _hudMC = (_scoreMC = (_comboMC = null)); while (numChildren > 0) { removeChildAt(0); }; } public function endCombo():void{ if (_comboMode){ _comboNumber.gotoAndPlay("hide"); _comboMC.setText(""); }; _comboMode = false; } public function update(_arg1:Number):void{ _comboNumber.update(_arg1); } public function setScore(_arg1:int):void{ _scoreMC.setText(("" + _arg1)); } public function setCombo(_arg1:int, _arg2:int):void{ _comboMC.setText(("" + _arg2)); _comboNumber.gotoAndPlay((_comboMode) ? "update" : "show"); _comboMode = true; } public function setClockAngle(_arg1:Number):void{ _handle.rotation = _arg1; } public function setComboMeterLevel(_arg1:Number):void{ _comboMeter.gotoAndStop(int((_arg1 * 29))); } public function renderObject():CPxRenderObject{ return (_renderObject); } public function showScore(_arg1:Boolean):void{ _scoreMC.visible = _arg1; } } }//package itfb.game.hudSection 71//CInputPost (itfb.game.input.CInputPost) package itfb.game.input { public class CInputPost { public var left:Boolean;// = false public var jump:Boolean;// = false public var ticks:int;// = 0 public var right:Boolean;// = false public function toByte():int{ var _local1:int = ticks; if (left){ _local1 = (_local1 + 128); }; if (right){ _local1 = (_local1 + 64); }; if (jump){ _local1 = (_local1 + 32); }; return (_local1); } public function toString():String{ return ((((((("[" + left) + ",") + right) + ",") + jump) + "]")); } public function clone():CInputPost{ var _local1:CInputPost = new CInputPost(); _local1.left = left; _local1.right = right; _local1.jump = jump; _local1.ticks = ticks; return (_local1); } public function equals(_arg1:CInputPost):Boolean{ if (_arg1.left != left){ return (false); }; if (_arg1.right != right){ return (false); }; if (_arg1.jump != jump){ return (false); }; return (true); } } }//package itfb.game.inputSection 72//CInputSequence (itfb.game.input.CInputSequence) package itfb.game.input { import flash.utils.*; import itfb.utils.*; public class CInputSequence { private var _postPosition:int; private var _position:int; private var _currentPost:CInputPost;// = null private var _posts:Array; public function CInputSequence(){ _posts = new Array(); _position = 0; _postPosition = 0; _currentPost = null; } public function getInput():CInputPost{ return (_currentPost); } public function get length():int{ return (_posts.length); } public function update():void{ if (_currentPost == null){ return; }; _postPosition++; if (_postPosition > _currentPost.ticks){ _postPosition = 0; _position++; _currentPost = _posts[_position]; }; } public function restart():void{ _position = 0; _postPosition = 0; _currentPost = _posts[0]; } public function record(_arg1:CInputPost):void{ if (_currentPost == null){ _currentPost = _arg1.clone(); _posts.push(_currentPost); } else { if (((_currentPost.equals(_arg1)) && ((_currentPost.ticks < 30)))){ _currentPost.ticks++; } else { _currentPost = _arg1.clone(); _posts.push(_currentPost); }; }; } public function reset():void{ _position = 0; _postPosition = 0; _posts = new Array(); } public function toBase64():String{ var _local2:CInputPost; var _local1:ByteArray = new ByteArray(); for each (_local2 in _posts) { _local1.writeByte(_local2.toByte()); }; return (CBase64.encodeByteArray(_local1)); } public function clone():CInputSequence{ var _local1:CInputSequence = new CInputSequence(); _local1.loadFromBase64(this.toBase64()); return (_local1); } public function loadFromBase64(_arg1:String):void{ var _local4:int; var _local5:CInputPost; reset(); var _local2:ByteArray = CBase64.decodeToByteArray(_arg1); var _local3:int; while (_local3 < _local2.length) { _local4 = _local2.readUnsignedByte(); _local5 = new CInputPost(); _local5.left = ((_local4 & 128) > 0); _local5.right = ((_local4 & 64) > 0); _local5.jump = ((_local4 & 32) > 0); _local5.ticks = (_local4 & 31); record(_local5); _local3++; }; restart(); } } }//package itfb.game.inputSection 73//CFloorPartParticle (itfb.game.particles.CFloorPartParticle) package itfb.game.particles { import pixelizer.particles.*; public class CFloorPartParticle extends CPxParticle { private var _rotationSpeed:Number;// = 0 public function CFloorPartParticle(_arg1:int){ super("MCFloorBreak"); gotoAndStop(_arg1); hotspot.x = (bitmapData.width / 2); hotspot.y = (bitmapData.height / 2); _lifeTime = (0.5 + (Math.random() * 1)); _rotationSpeed = (((Math.random() - 0.5) * Math.PI) * 4); } override public function update(_arg1:Number=1):void{ velocity.y = (velocity.y + (300 * _arg1)); super.update(_arg1); } } }//package itfb.game.particlesSection 74//CLandParticle (itfb.game.particles.CLandParticle) package itfb.game.particles { import pixelizer.particles.*; public class CLandParticle extends CPxParticle { public function CLandParticle(_arg1:int){ super(("MCLand" + _arg1)); hotspot.x = (bitmapData.width / 2); hotspot.y = (bitmapData.height - 5); frameRate = 30; _lifeTime = 1; play(); } } }//package itfb.game.particlesSection 75//CTrailParticle (itfb.game.particles.CTrailParticle) package itfb.game.particles { import pixelizer.particles.*; public class CTrailParticle extends CPxParticle { private var _rotationSpeed:Number;// = 3.14159265358979 public function CTrailParticle(){ super("MCTrail"); hotspot.x = (bitmapData.width / 2); hotspot.y = (bitmapData.height / 2); velocity.x = (200 * ((Math.random() * 1) - 0.5)); velocity.y = (200 * ((Math.random() * 1) - 0.5)); frameRate = 30; _lifeTime = (1 + (2 * Math.random())); gotoAndStop(int((Math.random() * totalFrames))); _rotationSpeed = (((4 * Math.random()) * Math.PI) - (2 * Math.PI)); } override public function update(_arg1:Number=1):void{ velocity.y = (velocity.y + (250 * _arg1)); super.update(_arg1); } } }//package itfb.game.particlesSection 76//CWallBounceParticle (itfb.game.particles.CWallBounceParticle) package itfb.game.particles { import pixelizer.particles.*; public class CWallBounceParticle extends CPxParticle { public function CWallBounceParticle(){ super("MCWallBounce"); hotspot.x = 0; hotspot.y = bitmapData.height; frameRate = 30; _lifeTime = 1; play(); } } }//package itfb.game.particlesSection 77//CComboPopup (itfb.game.popups.CComboPopup) package itfb.game.popups { import flash.display.*; import com.fuga.utils.*; import flash.events.*; import itfb.game.*; import itfb.language.*; import caurina.transitions.*; import itfb.game.particles.*; public class CComboPopup extends Sprite { private var _particlesToSpawn:int;// = 0 private var _playState:CPlayState;// = null private var _bitmapData:BitmapData;// = null private var _bitmap:Bitmap;// = null public function CComboPopup(_arg1:CPlayState, _arg2:int, _arg3:int){ _playState = _arg1; _particlesToSpawn = Math.min(150, (_arg2 * 3)); var _local4:MovieClip = CResourceManager.getInstance().createMovieClip("MCGameStandardMessage"); var _local5:String = CLanguage.getInstance().getText("game", "combo_x"); _local5 = _local5.replace(/%combo%/, _arg2); _local4.setText(_local5); _bitmapData = new BitmapData(_local4.width, _local4.height, true, 0); _bitmapData.draw(_local4); _bitmap = new Bitmap(_bitmapData); addChild(_bitmap); _local4 = null; _bitmap.x = (_bitmap.x - (600 / 2)); _bitmap.y = (_bitmap.y - (_bitmap.height / 2)); scaleX = (scaleY = 0); var _local6:Number = Math.min(1, Math.max((_arg2 / 100), 0.5)); Tweener.addTween(this, {scaleX:_local6, scaleY:_local6, transition:"easeOutBounce", time:0.3, onComplete:onComboShowComplete}); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function onComboHideComplete():void{ if (parent != null){ parent.removeChild(this); }; _bitmapData.dispose(); removeChild(_bitmap); _playState = null; } private function onEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:CTrailParticle; if ((((_particlesToSpawn > 0)) && (!((_playState == null))))){ _local2 = 0; while (_local2 < 10) { _local3 = new CTrailParticle(); _local3.position.x = x; _local3.position.y = y; _local3.velocity.x = (_local3.velocity.x * ((Math.random() * 3) + 1)); _local3.velocity.y = (_local3.velocity.y * ((Math.random() * 2) + 1)); _playState.addComboMessageParticle(_local3); _particlesToSpawn--; _local2++; }; } else { removeEventListener(Event.ENTER_FRAME, onEnterFrame); }; } private function onComboShowComplete():void{ Tweener.addTween(this, {scaleX:0, scaleY:0, transition:"easeInBack", delay:1, time:0.3, onComplete:onComboHideComplete}); } } }//package itfb.game.popupsSection 78//CHurryUpPopup (itfb.game.popups.CHurryUpPopup) package itfb.game.popups { import flash.display.*; import com.fuga.utils.*; import pixelizer.render.*; import flash.geom.*; import caurina.transitions.*; public class CHurryUpPopup extends CPxSprite { public function CHurryUpPopup(_arg1:String, _arg2:Number=1, _arg3:Number=4){ var _local4:MovieClip = CResourceManager.getInstance().createMovieClip("MCGameStandardMessage"); _local4.setText(_arg1); bitmapData = new BitmapData((_local4.width * _arg2), (_local4.height * _arg2), true, 0); var _local5:Matrix = new Matrix(); _local5.scale(_arg2, _arg2); bitmapData.draw(_local4, _local5); _local4 = null; super(""); hotspot.x = (bitmapData.width / 2); hotspot.y = 0; position.y = 600; Tweener.addTween(position, {y:-100, transition:"linear", time:_arg3, onComplete:onPopupComplete}); } private function onPopupComplete():void{ if (pxParent != null){ pxParent.removeChild(this); }; destroy(); bitmapData.dispose(); bitmapData = null; } override public function render(_arg1:Point, _arg2:BitmapData, _arg3:CPxViewport, _arg4:CPxRenderStats):void{ super.render(new Point(), _arg2, new CPxViewport(630, 580), _arg4); } } }//package itfb.game.popupsSection 79//CPostGameData (itfb.game.postgame.CPostGameData) package itfb.game.postgame { public class CPostGameData { public var coinsTaken:int;// = 0 public var comboScore:int;// = 0 public var floor:Array; public var combo:Array; public var tid:int;// = 0 public var score:Array; public var cheatDetected:Boolean;// = false public var avgFPS:int;// = 0 public var numCombos:int;// = 0 public var numJumps:int;// = 0 public function CPostGameData(){ score = [-1, -1]; combo = [-1, -1]; floor = [-1, -1]; super(); } } }//package itfb.game.postgameSection 80//CPostGameWindow (itfb.game.postgame.CPostGameWindow) package itfb.game.postgame { import flash.display.*; import com.fuga.utils.*; import flash.events.*; import itfb.events.*; import itfb.language.*; import caurina.transitions.*; import itfb.ui.*; public class CPostGameWindow extends Sprite { private var _resultIsSaved:Boolean;// = true private var _enabled:Boolean;// = true private var _postGameMC:MovieClip; private var _itButtons:Array; private var _isRecord:Boolean;// = false private var _postGameData:CPostGameData;// = null private var _eventTypeOnContinueAnyway:String;// = "" public function CPostGameWindow(_arg1:CPostGameData, _arg2:Boolean){ this._itButtons = []; super(); this._postGameData = _arg1; this._isRecord = _arg2; this._postGameMC = CResourceManager.getInstance().createMovieClip("MCPostGame"); this._postGameMC.header.setText(CLanguage.getInstance().getText("postgame", (!(!(this._isRecord))) ? "new_best" : "game_over"), "center", 400); this._postGameMC.score.setText(this._postGameData.score[0], "right", 200); this._postGameMC.floors.setText(this._postGameData.floor[0], "right", 200); this._postGameMC.combos.setText(this._postGameData.combo[0], "right", 200); this._postGameMC.scoreHeader.setText(CLanguage.getInstance().getText("postgame", "score"), "left", 200); this._postGameMC.floorHeader.setText(CLanguage.getInstance().getText("postgame", "floor"), "left", 200); this._postGameMC.comboHeader.setText(CLanguage.getInstance().getText("postgame", "combo"), "left", 200); this._postGameMC.x = (CSettings.getInt("game_width") / 2); this._postGameMC.y = (CSettings.getInt("game_height") / 2); this._postGameMC.scaleX = (this._postGameMC.scaleY = 0); this._postGameMC.rotation = 90; this._postGameMC.saveWindow.visible = false; addChild(this._postGameMC); Tweener.addTween(this._postGameMC, {scaleX:1, scaleY:1, time:1.5, transition:"easeOutBounce", onComplete:this.onAppearComplete}); Tweener.addTween(this._postGameMC, {rotation:0, time:0.8, transition:"easeOutBack"}); this._itButtons.push(new CButton(this._postGameMC.btn_exit, this.onButtonClicked)); this._itButtons.push(new CButton(this._postGameMC.btn_replay, this.onButtonClicked)); this._itButtons.push(new CButton(this._postGameMC.saveWindow.btn_save, this.onButtonClicked)); this.saveResults(); } private function onHideComplete():void{ removeChild(this._postGameMC); this.destroy(); } private function onAppearComplete():void{ dispatchEvent(new Event(Event.COMPLETE)); } public function destroy():void{ var _loc1_:CButton; removeChild(this._postGameMC); this._postGameMC = null; this._postGameData = null; for each (_loc1_ in this._itButtons) { _loc1_.destroy(); }; this._itButtons = null; } private function saveResults():void{ } private function onButtonClicked(_arg1:DisplayObject):void{ if (!(this._enabled)){ return; }; switch (_arg1.name){ case "btn_exit": default: this._enabled = false; dispatchEvent(new Event(CIcyTowerEvent.GOTO_MAIN_MENU)); break; case "btn_replay": this._enabled = false; dispatchEvent(new Event(CIcyTowerEvent.RETRY_GAME)); break; case "btn_save": this._postGameMC.saveWindow.btn_save.visible = false; this.saveResults(); }; if (!(this._enabled)){ Tweener.addTween(this._postGameMC, {scaleX:0, scaleY:0, time:0.5, transition:"easeInCubic", onComplete:this.onHideComplete}); }; } } }//package itfb.game.postgameSection 81//CBumperGimmick (itfb.game.towers.gimmicks.CBumperGimmick) package itfb.game.towers.gimmicks { import pixelizer.render.*; import com.fuga.soundmanager.*; import flash.geom.*; import itfb.game.entities.*; import pixelizer.physics.collision.*; public class CBumperGimmick extends CTowerGimmick { private var _bumperRotation:Number;// = 0 private var _bumperForce:int;// = 52 public function CBumperGimmick(_arg1:Number=0){ super("MCBumper"); _bumperRotation = ((Math.PI * _arg1) / 180); if (_arg1 > 0){ flip = HORIZONTAL_FLIP; }; frameRate = 15; removeMeAfterInteraction = false; hotspot.x = (160 - ((flip == HORIZONTAL_FLIP)) ? 110 : 50); hotspot.y = 80; boundingBox = new CPxBBox(-(hotspot.x), -32, bitmapData.width, 32); } override public function onInteract(_arg1:CAvatar, _arg2:CPxViewport):void{ _arg1.continueCombo(); _arg1.velocity.x = ((-8 * _bumperForce) * Math.cos(((-(Math.PI) / 2) - _bumperRotation))); _arg1.velocity.y = (_bumperForce * Math.sin(((-(Math.PI) / 2) - _bumperRotation))); gotoAndPlay("bump"); active = false; CSoundManager.getInstance().playAmbientSound("bumper", null, getSoundVolume(_arg2)); } override public function doesInteract(_arg1:CAvatar):Boolean{ var _local2:Point; if (_arg1.velocity.y > 0){ _local2 = new Point(); _local2.x = (_arg1.position.x - position.x); _local2.y = (_arg1.position.y - position.y); return (boundingBox.overlaps(_arg1.boundingBox, _local2)); }; return (false); } } }//package itfb.game.towers.gimmicksSection 82//CPickupGimmick (itfb.game.towers.gimmicks.CPickupGimmick) package itfb.game.towers.gimmicks { import pixelizer.particles.*; import pixelizer.render.*; import itfb.game.*; import com.fuga.soundmanager.*; import flash.geom.*; import itfb.game.entities.*; import pixelizer.physics.collision.*; public class CPickupGimmick extends CTowerGimmick { private var _particleRenderer:IParticleRenderer;// = null public function CPickupGimmick(_arg1:String, _arg2:IParticleRenderer){ super(_arg1); _particleRenderer = _arg2; hotspot.x = (bitmapData.width / 2); boundingBox = new CPxBBox((-(bitmapData.width) / 2), 4, bitmapData.width, (bitmapData.height - 8)); } override public function destroy():void{ _particleRenderer = null; super.destroy(); } override public function onInteract(_arg1:CAvatar, _arg2:CPxViewport):void{ var _local3:CPxParticle; _arg1.addCoins(1); if (((!(_arg1.isVirtual())) && (!((_particleRenderer == null))))){ CSoundManager.getInstance().playAmbientSound("coinpickup", null, getSoundVolume(_arg2)); _local3 = new CPxParticle("MCCoinPickup", 0.3); _local3.frameRate = 35; _local3.hotspot = hotspot.clone(); _local3.position = position.clone(); _local3.play(); _particleRenderer.addParticle(_local3, null, false); }; } override public function doesInteract(_arg1:CAvatar):Boolean{ var _local2:Point = new Point(); _local2.x = (_arg1.position.x - position.x); _local2.y = (_arg1.position.y - position.y); return (boundingBox.overlaps(_arg1.boundingBox, _local2)); } } }//package itfb.game.towers.gimmicksSection 83//CTowerGimmick (itfb.game.towers.gimmicks.CTowerGimmick) package itfb.game.towers.gimmicks { import pixelizer.render.*; import flash.geom.*; import itfb.game.entities.*; import pixelizer.physics.*; public class CTowerGimmick extends CPxBody { public var removeMeAfterInteraction:Boolean;// = true public var active:Boolean;// = true public function CTowerGimmick(_arg1:String){ super(_arg1); } public function onInteract(_arg1:CAvatar, _arg2:CPxViewport):void{ } protected function getSoundVolume(_arg1:CPxViewport):Number{ var _local2 = 1500; var _local3:Rectangle = _arg1.rectangle; var _local4:Number = 1; var _local5:Number = Math.abs(((_local3.y + 260) - position.y)); _local4 = Math.max(0, (1 - (_local5 / _local2))); return (_local4); } public function doesInteract(_arg1:CAvatar):Boolean{ return (false); } } }//package itfb.game.towers.gimmicksSection 84//CPlatform (itfb.game.towers.CPlatform) package itfb.game.towers { import pixelizer.render.*; import flash.geom.*; import itfb.game.entities.*; import itfb.game.collision.*; import pixelizer.physics.*; public class CPlatform extends CPxRenderObject { public var rider:CPxBody;// = null public var level:int;// = 0 public var _tower:CTower;// = null private var _fallSpeed:Number;// = 0 private var _horizontalMovement:Boolean;// = false public var baseType:int;// = 0 public var segment:CSegment;// = null public var shaking:Boolean;// = false private var _fallTime:Number;// = 1 private var _falling:Boolean;// = false private var _bounds:Rectangle;// = null private var _horizontalMovementSpeed:Number;// = 1 public var _stable:Boolean;// = false private var _horizontalMovementWidth:Number;// = 0 private var _exploding:int;// = 0 private var _horizontalMovementAngle:Number;// = 0 private var _horizontalOrgPosition:Number;// = 0 private var _shakeIntensity:int;// = 0 private var _rejumpFactor:Number;// = 0 private var _isFull:Boolean;// = true public function CPlatform(_arg1:int, _arg2:int, _arg3:CVector2, _arg4:Number, _arg5:CTower, _arg6:Rectangle=null){ super(); this._tower = _arg5; this._bounds = _arg6; if (this._bounds == null){ this._bounds = new Rectangle(0, 0, 630, 0); }; this._fallTime = _arg4; this.level = _arg1; this.baseType = 1; this.segment = new CSegment(_arg3, 0xFF00FF); position.x = this.segment.vector.start.x; position.y = this.segment.vector.start.y; this._horizontalOrgPosition = position.x; this._horizontalMovementAngle = (position.x / (position.y + 0.01)); } public function get falling():Boolean{ return (this._falling); } public function get fallSpeed():Number{ return (this._fallSpeed); } public function get rejumpFactor():Number{ return (this._rejumpFactor); } public function set rejumpFactor(_arg1:Number):void{ this._rejumpFactor = _arg1; } public function deleteMe():Boolean{ return ((this._fallTime <= 0)); } public function hasHorizontalMovement():Boolean{ return (this._horizontalMovement); } public function set isFull(_arg1:Boolean):void{ this._isFull = _arg1; } public function get stable():Boolean{ return (this._stable); } public function set exploding(_arg1:Boolean):void{ if (!(_arg1)){ this._exploding = 0; } else { this._exploding = 1; }; } override public function update(_arg1:Number=1):void{ var _loc2_:Number; if (this._falling){ this._fallSpeed = (this._fallSpeed + (50 * _arg1)); this.segment.vector.start.y = (this.segment.vector.start.y + (this._fallSpeed * _arg1)); position.y = (this.segment.vector.end.y = this.segment.vector.start.y); if (this.rider != null){ this.rider.position.y = position.y; }; this._fallTime = (this._fallTime - _arg1); }; if (this._horizontalMovement){ this._horizontalMovementAngle = (this._horizontalMovementAngle + (_arg1 * this._horizontalMovementSpeed)); _loc2_ = position.x; position.x = (this._horizontalOrgPosition + (this._horizontalMovementWidth * Math.cos(this._horizontalMovementAngle))); position.x = Math.max(Math.min(position.x, (this._tower.rightWall - this.segment.vector.length)), this._tower.leftWall); this.segment.vector.start.x = position.x; this.segment.vector.end.x = (this.segment.vector.start.x + this.segment.vector.length); if (this.rider != null){ this.rider.position.x = (this.rider.position.x + (position.x - _loc2_)); }; }; if (this._shakeIntensity > 0){ position.x = (this.segment.vector.start.x + (this._shakeIntensity * (Math.random() - 0.5))); position.y = (this.segment.vector.start.y + (this._shakeIntensity * (Math.random() - 0.5))); }; super.update(_arg1); } public function setShakeIntensity(_arg1:int):void{ if (this._stable){ return; }; this._shakeIntensity = _arg1; this.shaking = true; } public function get isFull():Boolean{ return (this._isFull); } public function onLandedOnPlatform(_arg1:CAvatar):void{ if (this._exploding == 1){ this.fall(); this._shakeIntensity = 10; this._exploding = 2; this._fallTime = 0.2; }; } public function setHorizontalMovement(_arg1:Number, _arg2:Number):void{ this._horizontalMovementSpeed = _arg1; this._horizontalMovementWidth = _arg2; this._horizontalMovement = !((this._horizontalMovementSpeed == 0)); } public function set stable(_arg1:Boolean):void{ this._stable = _arg1; } override public function destroy():void{ this.segment.destroy(); this.segment = null; this.rider = null; this._tower = null; this._bounds = null; super.destroy(); } public function fall():void{ if (this._stable){ return; }; this._shakeIntensity = 0; if (this._falling){ return; }; this._falling = true; } } }//package itfb.game.towersSection 85//CTower (itfb.game.towers.CTower) package itfb.game.towers { import flash.display.*; import com.fuga.utils.*; import pixelizer.render.*; import itfb.events.*; import itfb.game.*; import com.fuga.soundmanager.*; import flash.geom.*; import pixelizer.core.repository.*; import itfb.game.entities.*; import itfb.game.collision.*; import pixelizer.physics.*; import pixelizer.physics.collision.*; import com.fuga.logger.*; import itfb.game.particles.*; import pixelizer.render.gui.widgets.*; import itfb.game.towers.gimmicks.*; public class CTower extends CPxRenderObject { private var _player:CAvatar;// = null private var _endFloorLevel:int;// = 5000 private var _floorFallTime:Number;// = 4 private var _gravity:Number;// = 1 private var _rejump:Boolean;// = false private var _lastFloorLevel:int;// = -1 private var _updateHeight:int;// = -1 private var _quakeLinePosition:Number;// = 1000 private var _explodeSpacing:Number;// = 0 private var _quakeSpacing:Number;// = 1 private var _horizontalMovementSpacing:Number;// = 0 private var _horizontalMovementWidth:Number;// = 0 private var _endFloorWidth:int;// = 3 private var _clockProgress:Number;// = 0 private var _bumperSpacing:Number;// = 0 private var _gimmicks:Array;// = null private var _floorTypes:Array; private var _lastFloorType:int;// = 0 private var _clockSpeed:Number;// = 0 private var _jumpyFactor:Number;// = 0 private var _floorSpacing:Number;// = 1 private var _towerPlayer:ITowerPlayer;// = null private var _jumpySpacing:Number;// = 0 private var _coinSpacing:Number;// = 1 private var _quakeLineSpeed:Number;// = 100 private var _wallBounds:Rectangle;// = null private var _id:String;// = "" private var _particleRenderer:IParticleRenderer;// = null private var _numQuakesLeft:Number;// = 99999 private var _virtual:Boolean;// = false private var _lastCoinPos:int;// = 0 private var _tid:int;// = 0 private var _horizontalMovementSpeed:Number;// = 0 private var _soundViewport:CPxViewport;// = null private var _jumpyFT:int;// = 1 private var _firstFloor:int;// = 1 private var _towerWidth:int;// = 520 private var _startFloorWidth:int;// = 10 private var _platforms:Array;// = null private var _horizontalMovementFT:int;// = 1 private var _maxFloors:int;// = 5000 private var _quakeLineMaxDistance:Number;// = 520 private var _explodeFT:int;// = 1 private var _random:CRndm; private var _haveCoins:Boolean;// = true private var _lastBumperPos:int;// = 0 private var _quakeActive:Boolean;// = false public function CTower(_arg1:CAvatar, _arg2:ITowerPlayer, _arg3:IParticleRenderer, _arg4:XML=null, _arg5:int=1234, _arg6:Boolean=true){ this._clockSpeed = 0; this._clockSpeed = 0; var _loc9_:Array; var _loc10_:String; this._floorTypes = []; super(); this._particleRenderer = _arg3; this._towerPlayer = _arg2; this._player = _arg1; this._haveCoins = _arg6; this._random = new CRndm(_arg5); this._platforms = new Array(); this._gimmicks = new Array(); if (_arg4 != null){ this._id = _arg4.@id; this._tid = parseInt(_arg4.@tid); _loc9_ = ("" + _arg4.graphics.floor_types).split(","); for each (_loc10_ in _loc9_) { this._floorTypes.push(parseInt(_loc10_)); }; this._gravity = parseFloat(_arg4.gameplay.gravity); this._coinSpacing = parseFloat(_arg4.gameplay.coin_spacing); this._towerWidth = parseFloat(_arg4.gameplay.tower_width); this._quakeSpacing = parseFloat(_arg4.gameplay.quake_spacing); this._quakeLineMaxDistance = parseFloat(_arg4.gameplay.quake_max_distance); this._floorSpacing = parseFloat(_arg4.gameplay.floor_spacing); this._startFloorWidth = parseFloat(_arg4.gameplay.start_floor_width); this._endFloorWidth = parseFloat(_arg4.gameplay.end_floor_width); this._endFloorLevel = parseFloat(_arg4.gameplay.end_floor_level); this._floorFallTime = parseFloat(_arg4.gameplay.floor_fall_time); if (_arg4.gameplay.first_floor != undefined){ this._firstFloor = parseInt(_arg4.gameplay.first_floor); }; if (_arg4.gameplay.rejump != undefined){ this._rejump = (_arg4.gameplay.rejump == "on"); }; if (_arg4.gameplay.bumper_spacing != undefined){ this._bumperSpacing = parseFloat(_arg4.gameplay.bumper_spacing); }; if (_arg4.gameplay.jumpy_spacing != undefined){ this._jumpySpacing = parseFloat(_arg4.gameplay.jumpy_spacing); this._jumpyFactor = parseFloat(_arg4.gameplay.jumpy_factor); this._jumpyFT = parseFloat(_arg4.gameplay.jumpy_floor_type); }; if (_arg4.gameplay.explode_spacing != undefined){ this._explodeSpacing = parseFloat(_arg4.gameplay.explode_spacing); this._explodeFT = parseFloat(_arg4.gameplay.explode_floor_type); }; if (_arg4.gameplay.num_quakes != undefined){ this._numQuakesLeft = parseInt(_arg4.gameplay.num_quakes); }; if (_arg4.gameplay.horizontal_movement_speed != undefined){ this._horizontalMovementSpeed = parseFloat(_arg4.gameplay.horizontal_movement_speed); this._horizontalMovementSpacing = parseFloat(_arg4.gameplay.horizontal_movement_spacing); this._horizontalMovementWidth = parseFloat(_arg4.gameplay.horizontal_movement_width); this._horizontalMovementFT = parseFloat(_arg4.gameplay.horizontal_movement_floor_type); }; }; var _loc7_:int = ((315 - (this._towerWidth / 2)) - 15); var _loc8_:int = ((315 + (this._towerWidth / 2)) - 15); this._wallBounds = new Rectangle(_loc7_, 0, (_loc8_ - _loc7_), 0); this._clockSpeed = (this._quakeSpacing / 30); } public function get gimmicks():Array{ return (this._gimmicks); } public function get rightWall():int{ return (this._wallBounds.right); } public function getLastFloorType():int{ return (this._lastFloorType); } public function startQuakeProgress():void{ if (this._quakeActive == false){ this._quakeActive = true; }; } public function get id():String{ return (this._id); } private function addPlatform(_arg1:CPlatform):void{ var _loc4_:CPxSprite; var _loc5_:CPxSprite; var _loc6_:CPxSprite; var _loc7_:CSegment; var _loc8_:CPxSprite; var _loc9_:CPxSprite; var _loc10_:int; var _loc11_:int; var _loc12_:int; var _loc13_:CPxSprite; var _loc14_:int; var _loc15_:CPxSprite; var _loc16_:CPxTextField; var _loc2_ = -25; if (_arg1.level == 0){ _arg1.baseType--; _loc2_ = (_loc2_ - 128); }; var _loc3_:String = ("floor_" + _arg1.baseType); if (_arg1.isFull){ _loc4_ = new CPxSprite("MCFloors"); _loc4_.position.y = _loc2_; _loc4_.gotoAndStop(_arg1.baseType); _arg1.addChild(_loc4_); } else { _loc5_ = new CPxSprite(_loc3_); _loc5_.position.y = _loc2_; _arg1.addChild(_loc5_); _loc6_ = new CPxSprite(_loc3_); _loc6_.position.x = 32; _loc6_.position.y = _loc2_; _loc6_.gotoAndStop(1); _arg1.addChild(_loc6_); _loc5_.alpha = (_loc6_.alpha = this._player.alpha); _loc7_ = _arg1.segment; _loc8_ = new CPxSprite(_loc3_); _loc8_.gotoAndStop(19); _loc8_.position.y = _loc2_; _loc8_.position.x = (_loc7_.vector.length - 32); _arg1.addChild(_loc8_); _loc9_ = new CPxSprite(_loc3_); _loc9_.gotoAndStop(18); _loc9_.position.y = _loc2_; _loc9_.position.x = (_loc7_.vector.length - 64); _arg1.addChild(_loc9_); _loc8_.alpha = (_loc9_.alpha = this._player.alpha); _loc10_ = (_loc7_.vector.length - 128); _loc11_ = 64; _loc12_ = (2 + (Math.random() * (16 - (_loc10_ / 32)))); while (_loc10_ > 0) { _loc14_ = 32; _loc13_ = new CPxSprite(_loc3_); _loc13_.gotoAndStop(_loc12_); _loc13_.position.y = _loc2_; _loc13_.position.x = _loc11_; _arg1.addChildAt(_loc13_, 0); _loc13_.alpha = this._player.alpha; _loc11_ = (_loc11_ + _loc14_); _loc10_ = (_loc10_ - _loc14_); _loc12_++; }; }; if (((!((_arg1.level == 0))) && (((_arg1.level % 10) == 0)))){ _loc15_ = new CPxSprite("MCSigns"); _loc15_.gotoAndStop(_arg1.baseType); _loc15_.position.x = ((_arg1.segment.vector.length / 2) - (_loc15_.bitmapData.width / 2)); _loc15_.position.y = (_loc2_ + 15); _loc16_ = new CPxTextField(); _loc16_.text = ("" + _arg1.level); _loc16_.position.x = ((_loc15_.bitmapData.width / 2) - _loc16_.bitmapData.width); _loc16_.position.y = 22; _loc16_.scaleX = (_loc16_.scaleY = 2); _loc15_.addChild(_loc16_); _arg1.addChild(_loc15_); }; this._platforms.push(_arg1); if (_arg1.level == 0){ addChildAt(_arg1, 0); } else { addChildAt(_arg1, 1); }; } public function set quakeLineSpeed(_arg1:Number):void{ this._quakeLineSpeed = _arg1; this._quakeLineMaxDistance = (1200 - (this._quakeLineSpeed * 2)); } private function doPhysics():void{ var _loc4_:CVector2; var _loc5_:Boolean; var _loc6_:Point; var _loc7_:int; var _loc8_:CSegment; var _loc9_:Boolean; var _loc10_:int; var _loc11_:CPlatform; var _loc1_:Point = this._player.position.clone(); this._player.velocity.y = (this._player.velocity.y + (2.1 * this._gravity)); this._player.updateX(1); this._player.updateY(1); var _loc2_:int = (this._player.boundingBox.width / 2); var _loc3_:CVector2 = new CVector2(_loc1_.clone(), this._player.position.clone()); _loc3_.start.x = (_loc3_.start.x - _loc2_); _loc3_.end.x = (_loc3_.end.x - _loc2_); _loc4_ = new CVector2(_loc1_.clone(), this._player.position.clone()); _loc4_.start.x = (_loc4_.start.x + _loc2_); _loc4_.end.x = (_loc4_.end.x + _loc2_); if (this._player.velocity.x < 0){ if ((this._player.position.x + this._player.boundingBox.x) < this.leftWall){ this._player.position.x = (this.leftWall - this._player.boundingBox.x); this._player.onCollision(CPxCollisionSolver.COLLISION_LEFT); }; }; if (this._player.velocity.x > 0){ if (((this._player.position.x + this._player.boundingBox.x) + this._player.boundingBox.width) > this.rightWall){ this._player.position.x = ((this.rightWall - this._player.boundingBox.width) - this._player.boundingBox.x); this._player.onCollision(CPxCollisionSolver.COLLISION_RIGHT); }; }; if ((((this._player.velocity.y > 0)) && (this._player.alive))){ _loc5_ = false; _loc6_ = null; _loc7_ = this._platforms.length; _loc9_ = false; _loc10_ = 0; while ((((((_loc10_ < _loc7_)) && (!(_loc9_)))) && (!(_loc5_)))) { _loc8_ = this._platforms[_loc10_].segment; if ((_loc8_.vector.start.y + 100) < this._player.position.y){ _loc5_ = true; } else { _loc6_ = CVector2.getIntersection(_loc8_.vector, _loc3_); if (_loc6_ != null){ this._player.position.y = _loc6_.y; _loc9_ = true; } else { _loc6_ = CVector2.getIntersection(_loc8_.vector, _loc4_); if (_loc6_ != null){ this._player.position.y = _loc6_.y; _loc9_ = true; }; }; }; _loc10_++; }; if (!(_loc9_)){ if (this._player.location == CPxBody.ON_GROUND){ this._player.location = CPxBody.IN_AIR; this._player.onFall(); }; } else { if (this._player.location == CPxBody.IN_AIR){ _loc11_ = this._platforms[(_loc10_ - 1)]; this._player.onLandedOnPlatform(_loc11_); }; this._player.onCollision(CPxCollisionSolver.COLLISION_BOTTOM); }; }; _loc3_.destroy(); _loc4_.destroy(); } public function stopQuakeProgress():void{ this._quakeActive = false; } public function setVirtual(_arg1:Boolean):void{ this._virtual = _arg1; } public function get gravity():Number{ return (this._gravity); } public function get platforms():Array{ return (this._platforms); } public function updateToHeight(_arg1:int, _arg2:Array):void{ var _loc3_:int; var _loc4_:int; var _loc5_:int; var _loc6_:* = 0; var _loc7_:Point; var _loc8_:Point; var _loc9_:Boolean; var _loc10_:* = false; var _loc11_:int; var _loc12_:* = 0; var _loc13_:Boolean; var _loc14_:Boolean; var _loc15_:* = NaN; var _loc16_:CPlatform; var _loc17_:CPxSprite; var _loc18_:int; var _loc19_:int; var _loc20_:* = false; var _loc21_:CBumperGimmick; var _loc22_:* = 0; if (this._updateHeight < _arg1){ return; }; this._updateHeight = Math.max((-(this._maxFloors) * 100), _arg1); while (-(this._lastFloorLevel) > (this._updateHeight / (100 * this._floorSpacing))) { this._lastFloorLevel++; if ((((this._lastFloorLevel >= this._firstFloor)) || ((this._lastFloorLevel == 0)))){ _loc3_ = ((this._endFloorWidth + ((this._startFloorWidth - this._endFloorWidth) * Math.max(0, ((this._endFloorLevel - this._lastFloorLevel) / this._endFloorLevel)))) - 1); _loc4_ = (64 + (this._random.integer(this._endFloorWidth, _loc3_) * 32)); if (this._lastFloorLevel > 1000){ _loc4_ = 96; }; _loc4_ = (_loc4_ + (this._random.integer(0, 2) * 32)); _loc5_ = (this._wallBounds.left + this._random.integer((this._towerWidth - _loc4_))); _loc6_ = int((_loc5_ + _loc4_)); _loc7_ = new Point(_loc5_, ((-(this._lastFloorLevel) * 100) * this._floorSpacing)); _loc8_ = new Point(_loc6_, ((-(this._lastFloorLevel) * 100) * this._floorSpacing)); _loc9_ = ((((this._lastFloorLevel % 50) == 0)) && ((this._lastFloorLevel < 2001))); _loc10_ = (this._lastFloorLevel == this._maxFloors); if (((_loc9_) || (_loc10_))){ _loc4_ = (32 * 20); _loc5_ = 0; _loc6_ = _loc4_; _loc7_.x = 0; _loc8_.x = _loc4_; }; _loc11_ = Math.min((this._floorTypes.length - 1), (this._lastFloorLevel / 100)); _loc12_ = int(this._floorTypes[_loc11_]); this._lastFloorType = _loc12_; _loc13_ = false; if (((!(_loc9_)) && ((this._horizontalMovementSpacing > 0)))){ if ((this._lastFloorLevel % this._horizontalMovementSpacing) == 0){ _loc13_ = true; _loc12_ = this._horizontalMovementFT; }; }; _loc14_ = false; if (((!(_loc9_)) && ((this._explodeSpacing > 0)))){ if ((this._lastFloorLevel % this._explodeSpacing) == 0){ _loc12_ = this._explodeFT; _loc14_ = true; }; }; _loc15_ = 0; if (((((!(_loc9_)) && ((this._jumpySpacing > 0)))) && (!(_loc14_)))){ if ((this._lastFloorLevel % this._jumpySpacing) == 0){ _loc15_ = this._jumpyFactor; _loc12_ = this._jumpyFT; }; }; _loc16_ = new CPlatform(this._lastFloorLevel, _loc12_, new CVector2(_loc7_, _loc8_), this._floorFallTime, this); _loc16_.stable = _loc10_; _loc16_.isFull = _loc9_; _loc16_.exploding = _loc14_; if (_loc13_){ _loc16_.setHorizontalMovement(this._horizontalMovementSpeed, this._horizontalMovementWidth); }; if (_loc15_ > 0){ _loc16_.rejumpFactor = _loc15_; }; this.addPlatform(_loc16_); if (_arg2 != null){ if (_arg2.length > 0){ while (_arg2[0].floor < this._lastFloorLevel) { _arg2.shift(); if (_arg2.length == 0){ break; }; }; if (_arg2.length == 0){ continue; }; if (_arg2[0].floor == this._lastFloorLevel){ if (!(CPxRepository.getInstance().isAvailable(("sitting_" + _arg2[0].friend.uid)))){ _loc17_ = new CPxSprite(("sitting_" + _arg2[0].friend.uid)); _loc17_.hotspot.x = (_loc17_.bitmapData.width / 2); _loc17_.hotspot.y = 118; _loc17_.hotspot.y = 135; _loc17_.position.x = (32 + (Math.random() * ((_loc6_ - _loc5_) - 64))); _loc16_.addChild(_loc17_); }; _arg2.shift(); }; }; }; if (((((_loc9_) && (this._haveCoins))) && ((this._coinSpacing > 0)))){ if (((((this._lastFloorLevel % 100) == 0)) && ((this._lastFloorLevel > 100)))){ _loc18_ = (this._lastFloorLevel / 200); _loc19_ = 0; while (_loc19_ < _loc18_) { this.addCoin(_loc16_.segment.vector.start.y); _loc19_++; }; }; }; }; }; if (this._bumperSpacing > 0){ while (this._lastBumperPos > this._updateHeight) { this._lastBumperPos = (this._lastBumperPos + (((-10 * this._bumperSpacing) * 100) * this._floorSpacing)); _loc20_ = (this._random.integer(100) >= 50); _loc21_ = new CBumperGimmick((30 * (!(!(_loc20_))) ? 1 : -1)); _loc21_.position.x = (!(!(_loc20_))) ? Number(this._wallBounds.left) : Number(this._wallBounds.right); _loc21_.position.y = (this._lastBumperPos - 50); this._gimmicks.push(_loc21_); addChild(_loc21_); }; }; if (((this._haveCoins) && ((this._coinSpacing > 0)))){ while (this._lastCoinPos > this._updateHeight) { this._lastCoinPos = (this._lastCoinPos + (((-10 * this._coinSpacing) * 100) * this._floorSpacing)); _loc22_ = this._lastCoinPos; this.addCoin(_loc22_); }; }; } public function getQuakeProgress():Number{ return (this._clockProgress); } public function drawDebug(_arg1:Graphics):void{ var _loc3_:CPlatform; _arg1.clear(); _arg1.lineStyle(1, 0xFFFF); _arg1.moveTo(this._wallBounds.left, 0); _arg1.lineTo(this._wallBounds.left, -10000); _arg1.moveTo(this._wallBounds.right, 0); _arg1.lineTo(this._wallBounds.right, -10000); var _loc2_:Point = new Point(); for each (_loc3_ in this._platforms) { _loc3_.segment.draw(_arg1, _loc2_); }; } public function get quakeSpacing():Number{ return (this._quakeSpacing); } public function get leftWall():int{ return (this._wallBounds.left); } public function isVirtual():Boolean{ return (this._virtual); } public function applyBoosters(_arg1:XML):void{ var _loc2_:XML; if (_arg1 == null){ return; }; for each (_loc2_ in _arg1.elements()) { if (_loc2_.@floor_spacing != undefined){ this._floorSpacing = (this._floorSpacing * parseFloat(_loc2_.@floor_spacing)); CLogger.log(((("Applying booster '" + _loc2_.@name) + "', floor spacing is now ") + this._floorSpacing), this); }; if (_loc2_.@coin_spacing != undefined){ this._coinSpacing = (this._coinSpacing * parseFloat(_loc2_.@coin_spacing)); CLogger.log(((("Applying booster '" + _loc2_.@name) + "', coin spacing is now ") + this._coinSpacing), this); }; if (_loc2_.@quake_spacing != undefined){ this._quakeSpacing = (this._quakeSpacing * parseFloat(_loc2_.@quake_spacing)); CLogger.log(((("Applying booster '" + _loc2_.@name) + "', quake spacing is now ") + this._quakeSpacing), this); }; if (_loc2_.@quake_line_speed != undefined){ this._quakeLineSpeed = (this._quakeLineSpeed * parseFloat(_loc2_.@quake_line_speed)); CLogger.log(((("Applying booster '" + _loc2_.@name) + "', quake line speed is now ") + this._quakeLineSpeed), this); }; }; } public function get tid():int{ return (this._tid); } public function setSoundViewport(_arg1:CPxViewport):void{ this._soundViewport = _arg1; } public function get floorSpacing():Number{ return (this._floorSpacing); } public function get quakeLineSpeed():Number{ return (this._quakeLineSpeed); } public function get quakeLinePosition():int{ return (this._quakeLinePosition); } public function updateTower(_arg1:Number, _arg2:int, _arg3:Array=null):void{ var _loc4_:CPlatform; var _loc7_:CTowerGimmick; var _loc9_:int; var _loc10_:int; var _loc11_:Number; var _loc12_:int; var _loc13_:CFloorPartParticle; var _loc14_:int; this._player.update(_arg1); this.updateToHeight(_arg2, _arg3); if (this._quakeActive){ if (this._numQuakesLeft > 0){ this._clockProgress = (this._clockProgress + (this._clockSpeed * _arg1)); } else { this._clockProgress = (this._clockProgress - ((this._clockSpeed * 16) * _arg1)); }; if (this._clockProgress >= 1){ if (this._numQuakesLeft > 0){ this._quakeLineSpeed = (this._quakeLineSpeed + 20); dispatchEvent(new CIcyTowerEvent(CIcyTowerEvent.NEW_QUAKE)); this._clockProgress--; this._numQuakesLeft--; }; }; if (this._quakeLinePosition > (_arg2 + this._quakeLineMaxDistance)){ this._quakeLinePosition = (_arg2 + this._quakeLineMaxDistance); }; this._quakeLinePosition = (this._quakeLinePosition - (_arg1 * this._quakeLineSpeed)); }; var _loc5_:int = this._platforms.length; var _loc6_:int; while (_loc6_ < _loc5_) { _loc4_ = this._platforms[_loc6_]; _loc4_.update(_arg1); if (_loc4_.segment.vector.start.y > this._quakeLinePosition){ _loc4_.fall(); } else { if ((_loc4_.segment.vector.start.y + 100) > this._quakeLinePosition){ _loc9_ = (this._quakeLinePosition - _loc4_.segment.vector.start.y); if (((!(_loc4_.shaking)) && (!(this._virtual)))){ _loc10_ = Math.abs((_loc4_.segment.vector.start.y - this._player.position.y)); _loc11_ = Math.max(0, (1 - (_loc10_ / 300))); if (_loc11_ > 0.1){ CSoundManager.getInstance().playAmbientSound("platformshake", null, this.getSoundVolume(this._soundViewport, _loc4_.position.y)); }; }; _loc4_.setShakeIntensity((10 - (_loc9_ / 10))); }; }; if (_loc4_.deleteMe()){ if (((((((!((_loc4_.pxParent == null))) && (!(this._virtual)))) && (IcyTowerMB.highQuality))) && (!((this._particleRenderer == null))))){ _loc12_ = _loc4_.segment.vector.start.x; while (_loc12_ <= _loc4_.segment.vector.end.x) { _loc13_ = new CFloorPartParticle(_loc4_.baseType); _loc13_.position.x = (_loc12_ + (Math.random() * 10)); _loc13_.position.y = ((_loc4_.segment.vector.start.y + (Math.random() * 10)) - 5); _loc13_.velocity.y = (_loc4_.fallSpeed - (Math.random() * 100)); _loc13_.velocity.x = ((Math.random() - 0.5) * 200); this._particleRenderer.addParticle(_loc13_, _loc4_.pxParent); _loc12_ = (_loc12_ + (16 + (Math.random() * 32))); }; }; this._platforms.splice(_loc6_, 1); _loc4_.destroy(); _loc5_--; } else { _loc6_++; }; }; var _loc8_:int; while (_loc8_ < this._gimmicks.length) { _loc7_ = this._gimmicks[_loc8_]; _loc7_.update(_arg1); if (_loc7_.position.y > (this._quakeLinePosition + 1200)){ removeChild(_loc7_); _loc7_.destroy(); this._gimmicks.splice(_loc8_, 1); } else { _loc8_++; }; }; this.doPhysics(); if (this._player.alive){ _loc14_ = this.gimmicks.length; _loc8_ = 0; while (_loc8_ < _loc14_) { _loc7_ = this._gimmicks[_loc8_]; if (((_loc7_.active) && (_loc7_.doesInteract(this._player)))){ _loc7_.onInteract(this._player, this._soundViewport); if (_loc7_.removeMeAfterInteraction){ if (_loc7_.pxParent != null){ _loc7_.pxParent.removeChild(_loc7_); }; _loc7_.destroy(); this._gimmicks.splice(_loc8_, 1); _loc14_--; } else { _loc8_++; }; } else { _loc8_++; }; }; }; } private function addCoin(_arg1:int):void{ var _loc2_:CPickupGimmick = new CPickupGimmick("MCCoin", this._particleRenderer); _loc2_.position.x = ((this._wallBounds.x + 40) + this._random.integer((this._wallBounds.width - 80))); _loc2_.position.y = ((_arg1 - _loc2_.bitmapData.height) - 10); this._gimmicks.push(_loc2_); addChild(_loc2_); } protected function getSoundVolume(_arg1:CPxViewport, _arg2:Number):Number{ var _loc3_ = 1500; var _loc4_:Rectangle = _arg1.rectangle; var _loc5_:Number = 1; var _loc6_:Number = Math.abs(((_loc4_.y + 260) - _arg2)); return (Number(Math.max(0, (1 - (_loc6_ / _loc3_))))); } public function rejump():Boolean{ return (this._rejump); } override public function destroy():void{ var _loc1_:CPlatform; var _loc2_:CTowerGimmick; this._particleRenderer = null; this._towerPlayer = null; this._player = null; for each (_loc1_ in this._platforms) { _loc1_.destroy(); }; this._platforms = null; for each (_loc2_ in this._gimmicks) { _loc2_.destroy(); }; this._gimmicks = null; super.destroy(); } } }//package itfb.game.towersSection 86//CTowerBackground (itfb.game.towers.CTowerBackground) package itfb.game.towers { import pixelizer.render.*; public class CTowerBackground extends CPxRenderObject { private var _lastSpecialPiece:int;// = -1 private var _backgrounds:Array; private var _tower:CTower;// = null private var _topPosition:int;// = 1000 public function CTowerBackground(_arg1:CTower){ _tower = _arg1; _backgrounds = new Array(); } public function adjustToViewport(_arg1:CPxViewport):void{ var _local4:CPxSprite; var _local5:int; var _local6:CPxSprite; var _local2:int; var _local3:int = (_arg1.rectangle.y / 2); while (_local3 < _topPosition) { _local4 = new CPxSprite("MCBackground"); _local5 = 0; if ((((Math.random() > 0.7)) && ((_local4.totalFrames > 1)))){ _local5 = (1 + Math.floor((Math.random() * (_local4.totalFrames - 1)))); if (_lastSpecialPiece == _local5){ _local5 = 0; }; }; _lastSpecialPiece = _local5; _local4.gotoAndStop(_local5); _local4.position.x = ((_tower.leftWall + ((_tower.rightWall - _tower.leftWall) / 2)) - (_local4.bitmapData.width / 2)); _local2 = ((_local4.bitmapData.height > 200)) ? 0x0100 : 128; _local4.position.y = (_topPosition - _local2); _topPosition = _local4.position.y; addChildAt(_local4, 0); }; position.y = _local3; if (_backgrounds.length > 20){ _local6 = _backgrounds.shift(); _local6.destroy(); _local6 = _backgrounds.shift(); _local6.destroy(); }; } override public function destroy():void{ var _local1:CPxSprite; for each (_local1 in _backgrounds) { removeChild(_local1); _local1.destroy(); }; _backgrounds = null; super.destroy(); _tower = null; } } }//package itfb.game.towersSection 87//CTowerForeground (itfb.game.towers.CTowerForeground) package itfb.game.towers { import pixelizer.render.*; public class CTowerForeground extends CPxRenderObject { private var _foregrounds:Array; private var _tower:CTower;// = null private var _topPosition:int;// = 1000 public function CTowerForeground(_arg1:CTower){ _tower = _arg1; _foregrounds = new Array(); } public function adjustToViewport(_arg1:CPxViewport):void{ var _local4:CPxSprite; var _local5:int; var _local6:CPxSprite; var _local2:int; var _local3:int = _arg1.rectangle.y; while (_local3 < _topPosition) { _local4 = new CPxSprite("MCSideBlock"); _local5 = Math.floor((Math.random() * _local4.totalFrames)); _local4.gotoAndStop(_local5); _local4.flip = CPxSprite.HORIZONTAL_FLIP; _local4.position.x = ((_tower.leftWall - _local4.bitmapData.width) + 32); _local2 = ((_local4.bitmapData.height > 200)) ? 0x0100 : 128; _local4.position.y = (_topPosition - _local2); _foregrounds.push(_local4); addChild(_local4); _local4 = new CPxSprite("MCSideBlock"); _local4.gotoAndStop(_local5); _local4.position.x = (_tower.rightWall - 32); _local4.position.y = (_topPosition - _local2); _foregrounds.push(_local4); addChild(_local4); _topPosition = _local4.position.y; }; position.y = (_arg1.rectangle.y * 0); if (_foregrounds.length > 40){ _local6 = _foregrounds.shift(); _local6.destroy(); _local6 = _foregrounds.shift(); _local6.destroy(); }; } override public function destroy():void{ var _local1:CPxSprite; for each (_local1 in _foregrounds) { _local1.destroy(); }; _foregrounds = null; super.destroy(); _tower = null; } } }//package itfb.game.towersSection 88//CTutorialState (itfb.game.tutorial.CTutorialState) package itfb.game.tutorial { import flash.display.*; import com.fuga.utils.*; import com.fuga.statehandler.*; import itfb.language.*; import caurina.transitions.*; import flash.net.*; import itfb.ui.*; import com.adobe.utils.*; public class CTutorialState extends Sprite implements IState { private var _stateHandler:IStateHandler;// = null private var _params:Object;// = null private var _currentPage:int;// = 1 private var _stateID:String; private var _mc:MovieClip; private var _btnNext:CButton;// = null private var _btnOK:CButton;// = null private var _counter:Number;// = 0 private var _btnPrev:CButton;// = null public function destroy():void{ this._mc = null; this._stateHandler = null; this._params = null; this._btnNext.destroy(); this._btnPrev.destroy(); this._btnOK.destroy(); this._btnOK = (this._btnNext = (this._btnPrev = null)); } public function onPausedByStateHandler():void{ } private function onButtonAction(_arg1:MovieClip):void{ switch (_arg1.name){ case "btn_left": default: this._currentPage = Math.max(1, (this._currentPage - 1)); this.gotoPage(this._currentPage); break; case "btn_right": this._currentPage = Math.min(5, (this._currentPage + 1)); this.gotoPage(this._currentPage); this._counter = -1; break; case "btn_confirm": Tweener.addTween(this._mc, {scaleX:1, scaleY:1, time:0.4, transition:"easeOutSine", onComplete:this.onCloseComplete}); }; } public function onResumedByStateHandler():void{ } public function update(_arg1:Number):void{ if (this._counter >= 0){ this._counter = (this._counter + _arg1); if (this._counter > 2){ this._counter = (this._counter - 2); this._btnNext.mc.scaleX = 1.2; this._btnNext.mc.scaleY = 1.2; Tweener.addTween(this._btnNext.mc, {scaleX:1, scaleY:1, time:0.2, transition:"easeOutSine"}); }; }; } private function onCloseComplete():void{ var _loc1_:SharedObject = SharedObject.getLocal("tut"); _loc1_.data.shown = true; _loc1_.flush(); this._stateHandler.popState(); } private function gotoPage(_arg1:int):void{ this._mc.gotoAndStop(_arg1); this._btnPrev.mc.visible = (_arg1 > 1); this._btnNext.mc.visible = (_arg1 < 5); var _loc2_:String = CLanguage.getInstance().getText("tutorial", ("page" + _arg1)); _loc2_ = StringUtil.replace(_loc2_, "%name%", ""); this._mc.tf_text.text = _loc2_; this._mc.tf_page.text = (_arg1 + "/5"); if (_arg1 == 5){ if (this._btnOK.enabled == false){ this._btnOK.mc.scaleX = 1.2; this._btnOK.mc.scaleY = 1.2; Tweener.addTween(this._btnOK.mc, {scaleX:1, scaleY:1, time:0.3, transition:"easeOutSine"}); }; this._btnOK.enabled = true; }; } public function construct(_arg1:String, _arg2:IStateHandler, _arg3:Object):void{ var _loc4_:SharedObject; this._stateID = _arg1; this._stateHandler = _arg2; this._params = _arg3; graphics.lineStyle(0, 0, 0); graphics.beginFill(0, 0.5); graphics.drawRect(-1500, -1500, 3000, 3000); graphics.endFill(); this._mc = CResourceManager.getInstance().createMovieClip("MCTutorial"); this._mc.x = (630 / 2); this._mc.y = 70; this._mc.scaleX = (this._mc.scaleY = 0); addChild(this._mc); Tweener.addTween(this._mc, {scaleX:1, scaleY:1, time:0.4, transition:"easeOutSine"}); this._btnPrev = new CButton((this._mc.getChildByName("btn_left") as MovieClip), this.onButtonAction); this._btnNext = new CButton((this._mc.getChildByName("btn_right") as MovieClip), this.onButtonAction); this._btnOK = new CButton((this._mc.getChildByName("btn_confirm") as MovieClip), this.onButtonAction); _loc4_ = SharedObject.getLocal("tut"); if (_loc4_.data.shown == undefined){ this._btnOK.enabled = true; }; this.gotoPage(this._currentPage); dispatchEvent(new CStateEvent(CStateEvent.LOADING_COMPLETE)); } public function get stateID():String{ return (this._stateID); } } }//package itfb.game.tutorialSection 89//CPlayState (itfb.game.CPlayState) package itfb.game { import flash.display.*; import com.fuga.utils.*; import com.fuga.statehandler.*; import flash.events.*; import pixelizer.particles.*; import pixelizer.render.*; import itfb.events.*; import com.fuga.events.*; import itfb.highscores.*; import com.fuga.soundmanager.*; import flash.geom.*; import itfb.language.*; import itfb.account.*; import itfb.game.input.*; import itfb.game.postgame.*; import itfb.backend.*; import itfb.interfaces.*; import itfb.game.hud.*; import itfb.ui.popups.*; import SWFStats.*; import com.fuga.logger.*; import itfb.menu.staticmenu.*; import itfb.game.popups.*; import itfb.game.particles.*; public dynamic class CPlayState extends Sprite implements IState, IQuittableState, IParticleRenderer { private var _friendsOnFloors:Array; private var _trophyTestOK:Boolean;// = true private var _renderer:CPxRenderer;// = null private var _friendsToPass:Array; private var _gameComplete:Boolean;// = false private var _averageFPS:int;// = 0 private var _stateID:String; private var _hud:CHud;// = null private var _madeWeeklyRecord:Boolean;// = false private var _paused:Boolean;// = false private var _staticViewport:CPxViewport;// = null private var _numGameOvers:int;// = 0 private var _stateHandler:IStateHandler;// = null private var _friends:Array; private var _fpsDipsBeforeQualityChange:int;// = 3 private var _showTutorial:Boolean;// = false private var _friendsListType:String;// = "all_time" private var _cheatDetected:Boolean;// = false private var _canRestartWithSpaceMode:int;// = 0 private var _keyHandler:CKeyboardHandler; private var _towerPlayer:CTowerPlayer;// = null private var _opponentBeat:Boolean;// = false private var _doUpdate:Boolean;// = true private var _params:Object;// = null private var _pxOverlay:CPxRenderObject;// = null private var _pauseKeyDown:Boolean;// = false private var _particleHandler:CPxParticleHandler;// = null private var _switchTimer:Number;// = 0 private var _currentTowerPlayer:CTowerPlayer;// = null private var _debugDraw:Sprite;// = null private var _renderStats:CPxRenderStats; private var _shakeIntensity:Number;// = 0 private var _pausePopup:CTextPopup;// = null private var _debugScreenShot:Boolean;// = false private var _updatesPerFrame:int;// = 1 private static var _playSessions:int = 0; public function CPlayState(){ this._friends = []; this._friendsOnFloors = []; this._friendsToPass = []; this._renderStats = new CPxRenderStats(); super(); } public function destroy():void{ if (this._towerPlayer.player.hasEventListener(CIcyTowerEvent.PLAYER_LANDED)){ this._towerPlayer.player.removeEventListener(CIcyTowerEvent.PLAYER_LANDED, this.onPlayerLanded); }; this._currentTowerPlayer = null; if (this._pausePopup != null){ if (this._pausePopup.hasEventListener(CIcyTowerEvent.POPUP_DESTROYED)){ this._pausePopup.removeEventListener(CIcyTowerEvent.POPUP_DESTROYED, this.unpauseGame); }; this._pausePopup.destroy(); }; if (IcyTowerMB.getStage().hasEventListener(Event.DEACTIVATE)){ IcyTowerMB.getStage().removeEventListener(Event.DEACTIVATE, this.onFocusOut); }; if (IcyTowerMB.getFPSCounter().hasEventListener(CFPSCounter.FPS_WARNING)){ IcyTowerMB.getFPSCounter().removeEventListener(CFPSCounter.FPS_WARNING, this.onLowFPS); }; while (numChildren > 0) { removeChildAt(0); }; this._stateHandler = null; this._params = null; this._keyHandler.deconstruct(); this._keyHandler = null; if (this._towerPlayer != null){ this._towerPlayer.removeEventListener(CIcyTowerEvent.GAME_OVER, this.onGameOver); this._towerPlayer.removeEventListener(CIcyTowerEvent.COMBO_PROGRESS, this.onComboProgress); this._towerPlayer.removeEventListener(CIcyTowerEvent.COMBO_COMPLETE, this.onComboComplete); this._towerPlayer.removeEventListener(CIcyTowerEvent.NEW_QUAKE, this.onNewQuake); this._towerPlayer.removeEventListener(CIcyTowerEvent.CHEAT, this.onPlayerCheatDetected); this._towerPlayer.destroy(); this._towerPlayer = null; }; this._particleHandler.destroy(); this._particleHandler = null; this._debugDraw = null; this._renderer.destroy(); this._renderer = null; this._pxOverlay.destroy(); } private function pauseGame():void{ var _loc1_:MovieClip; if (!(this._paused)){ _loc1_ = CResourceManager.getInstance().createMovieClip("MCSleepingHarold"); this._pausePopup = new CTextPopup(CLanguage.getInstance().getText("game", "game_paused_header"), ""); _loc1_.x = 120; _loc1_.y = 130; this._pausePopup.content.addChild(_loc1_); this._pausePopup.x = 315; this._pausePopup.y = 240; addChild(this._pausePopup); this._pausePopup.addEventListener(CIcyTowerEvent.POPUP_DESTROYED, this.unpauseGame); this._paused = true; }; } private function showTowerPlayer(_arg1:CTowerPlayer):void{ this._renderer.removeChild(this._towerPlayer.tower); this._renderer.removeChild(this._towerPlayer.background); this._renderer.removeChild(this._towerPlayer.foreground); this._towerPlayer.tower.setVirtual(true); this._renderer.addChildAt(_arg1.tower, 1); this._renderer.addChildAt(this._towerPlayer.player, 2); this._towerPlayer.setSoundViewport(_arg1.viewport); this._renderer.addChildAt(_arg1.background, 0); this._renderer.addChild(_arg1.foreground); _arg1.tower.setVirtual(false); this._currentTowerPlayer = _arg1; } private function cancelRestartGameState(_arg1:Event):void{ _arg1.target.removeEventListener(Event.COMPLETE, this.restartGameState); _arg1.target.removeEventListener(Event.COMPLETE, this.cancelRestartGameState); } private function onTrophyCheckerComplete(_arg1:Event):void{ if (_arg1 != null){ _arg1.target.removeEventListener(Event.COMPLETE, this.onTrophyCheckerComplete); }; var _loc2_:CPostGameData = new CPostGameData(); _loc2_.cheatDetected = this._cheatDetected; _loc2_.avgFPS = this._averageFPS; _loc2_.coinsTaken = this._towerPlayer.player.coins; _loc2_.combo[0] = this._towerPlayer.player.maxCombo; _loc2_.comboScore = this._towerPlayer.player.comboScore; _loc2_.floor[0] = this._towerPlayer.player.floor; _loc2_.numCombos = this._towerPlayer.player.numCombos; _loc2_.numJumps = this._towerPlayer.player.numJumps; _loc2_.score[0] = this._towerPlayer.player.score; _loc2_.tid = this._towerPlayer.tower.tid; Log.LevelAverageMetric("floor", this._towerPlayer.tower.id, this._towerPlayer.player.floor); Log.LevelAverageMetric("score", this._towerPlayer.tower.id, this._towerPlayer.player.score); Log.LevelAverageMetric("combo", this._towerPlayer.tower.id, this._towerPlayer.player.maxCombo); var _loc3_:CPostGameWindow = new CPostGameWindow(_loc2_, this._madeWeeklyRecord); _loc3_.addEventListener(Event.COMPLETE, this.onPostGameWindowShown); _loc3_.addEventListener(CIcyTowerEvent.RETRY_GAME, this.onPostGameAction); _loc3_.addEventListener(CIcyTowerEvent.GOTO_MAIN_MENU, this.onPostGameAction); addChild(_loc3_); CAccount.getInstance().addCoins(this._towerPlayer.player.coins); } private function showYouWinMessage():void{ var _loc3_:int; var _loc4_:CTrailParticle; this._opponentBeat = true; CSoundManager.getInstance().playAmbientSound("record"); var _loc1_:Number = 0.5; var _loc2_:CHurryUpPopup = new CHurryUpPopup(CLanguage.getInstance().getText("challenge", "you_won"), _loc1_, 2.5); this._towerPlayer.background.addChild(_loc2_); _loc2_.position.x = 470; if (IcyTowerMB.highQuality){ _loc3_ = 0; while (_loc3_ < 50) { _loc4_ = new CTrailParticle(); _loc4_.position.x = ((Math.random() * 530) + 50); _loc4_.position.y = this._towerPlayer.viewport.rectangle.bottom; _loc4_.velocity.x = (_loc4_.velocity.x * 0.8); _loc4_.velocity.y = -(((Math.random() * 500) + 500)); this.addParticle(_loc4_); _loc3_++; }; }; } private function onTopOfTheWorld(_arg1:CEvent):void{ var _loc3_:int; var _loc4_:CTrailParticle; if (this._gameComplete){ return; }; this._gameComplete = true; if (IcyTowerMB.highQuality){ _loc3_ = 0; while (_loc3_ < 100) { _loc4_ = new CTrailParticle(); if (Math.random() > 0.5){ _loc4_.position.x = ((Math.random() * 100) - 50); _loc4_.velocity.x = Math.abs(_loc4_.velocity.x); } else { _loc4_.position.x = ((Math.random() * 100) + 580); _loc4_.velocity.x = -(Math.abs(_loc4_.velocity.x)); }; _loc4_.position.y = this._towerPlayer.viewport.rectangle.bottom; _loc4_.velocity.x = (_loc4_.velocity.x * 4); _loc4_.velocity.y = -(((Math.random() * 500) + 200)); this.addParticle(_loc4_); _loc3_++; }; }; var _loc2_:CTopPopup = new CTopPopup(); _loc2_.addEventListener(CIcyTowerEvent.POPUP_CONFIRM, this.onTopPopupClosed); _loc2_.x = 315; _loc2_.y = 260; addChild(_loc2_); } public function onHomeButton():void{ if (((this._towerPlayer.player.alive) && (this._doUpdate))){ Log.LevelCounterMetric("towers_quit", this._towerPlayer.tower.id); }; if (this._doUpdate){ this.gotoMenu(); }; } private function onComboProgress(_arg1:CEvent):void{ this._hud.setCombo(_arg1.params.combo, _arg1.params.combo); } private function onFocusIn(_arg1:Event):void{ CLogger.log("focus in", this); IcyTowerMB.getStage().focus = IcyTowerMB.getStage(); } private function onNewQuake(_arg1:CEvent):void{ this._shakeIntensity = 10; var _loc2_:Number = 0.5; var _loc3_:CHurryUpPopup = new CHurryUpPopup(CLanguage.getInstance().getText("game", "hurry"), _loc2_); this._towerPlayer.background.addChild(_loc3_); _loc3_.position.x = 470; CSoundManager.getInstance().playAmbientSound("clock"); } private function onPostGameAction(_arg1:Event):void{ _arg1.target.removeEventListener(CIcyTowerEvent.RETRY_GAME, this.onPostGameAction); _arg1.target.removeEventListener(CIcyTowerEvent.GOTO_MAIN_MENU, this.onPostGameAction); switch (_arg1.type){ case CIcyTowerEvent.RETRY_GAME: default: this.restartGameState(); break; case CIcyTowerEvent.GOTO_MAIN_MENU: this.gotoMenu(); }; } private function onComboComplete(_arg1:CEvent):void{ var _loc2_:CComboPopup; if (_arg1.params.combo > 0){ _loc2_ = new CComboPopup(this, _arg1.params.combo, _arg1.params.numJumps); _loc2_.y = 380; _loc2_.x = 315; addChild(_loc2_); }; this._hud.endCombo(); } private function updateScore(_arg1:CTowerScore):int{ var _loc2_:int; if (this._towerPlayer.player.score > _arg1.score){ _arg1.score = this._towerPlayer.player.score; _loc2_++; }; if (this._towerPlayer.player.floor > _arg1.floor){ _arg1.floor = this._towerPlayer.player.floor; _loc2_ = (_loc2_ + 2); }; if (this._towerPlayer.player.maxCombo > _arg1.combo){ _arg1.combo = this._towerPlayer.player.maxCombo; _loc2_ = (_loc2_ + 4); }; return (_loc2_); } public function addParticle(_arg1:CPxParticle, _arg2:IPxRenderObject=null, _arg3:Boolean=true):void{ if (_arg2 == null){ param2 = this._renderer; }; if (_arg3){ _arg2.addChild(_arg1); } else { if (_arg2 == this._renderer){ this._renderer.addChildAt(_arg1, 2); } else { _arg2.addChild(_arg1); }; }; this._particleHandler.registerParticle(_arg1); } private function onFocusOut(_arg1:Event):void{ CLogger.log("focus out", this); this.pauseGame(); } private function onTopPopupClosed(_arg1:Event):void{ this.onGameOver(null); } public function objectFloorSort(_arg1:Object, _arg2:Object):int{ if (_arg1.floor < _arg2.floor){ return (-1); }; if (_arg1.floor > _arg2.floor){ return (1); }; return (0); } private function doEndGame():void{ this._updatesPerFrame = 1; Log.LevelCounterMetric("towers_ended", this._towerPlayer.tower.id); IcyTowerMB.getStage().removeEventListener(Event.DEACTIVATE, this.onFocusOut); IcyTowerMB.getStage().removeEventListener(Event.ACTIVATE, this.onFocusIn); this._averageFPS = IcyTowerMB.getFPSCounter().getAvgFrameRate(); if (this._cheatDetected){ this.onTrophyCheckerComplete(null); return; }; var _loc1_:int; this._madeWeeklyRecord = false; if (_loc1_ > 0){ CSoundManager.getInstance().playAmbientSound("record"); this._madeWeeklyRecord = true; }; var _loc2_:CBackend = new CBackend(); _loc2_.registerTimeSpent(this._averageFPS, "avgFrameRate"); var _loc3_:CTrophyChecker = new CTrophyChecker(this, {tid:this._towerPlayer.tower.tid, score:this._towerPlayer.player.score, floor:this._towerPlayer.player.floor, combo:this._towerPlayer.player.maxCombo, coins:0}); _loc3_.addEventListener(Event.COMPLETE, this.onTrophyCheckerComplete); _loc3_.start(); } public function get stateID():String{ return (this._stateID); } private function gotoMenu(_arg1:Event=null):void{ this._doUpdate = false; if (_arg1 != null){ _arg1.target.removeEventListener(Event.COMPLETE, this.gotoMenu); }; this._stateHandler.goToState("menu", IcyTowerMB.getStandardTransision()); } private function restartGameState(_arg1:Event=null):void{ if (_arg1 != null){ _arg1.target.removeEventListener(Event.COMPLETE, this.restartGameState); }; this._stateHandler.reloadCurrentState(IcyTowerMB.getStandardTransision(), {boosters:null, towerXML:null}); } public function addComboMessageParticle(_arg1:CPxParticle):void{ if (IcyTowerMB.highQuality){ this.addParticle(_arg1, this._pxOverlay); }; } public function onResumedByStateHandler():void{ if (this._showTutorial){ this._stateHandler.pushState("tutorial"); this._showTutorial = false; } else { if (this._keyHandler != null){ IcyTowerMB.getStage().focus = this; }; }; } private function unpauseGame(_arg1:Event):void{ if (this._paused){ if (this._pausePopup != null){ if (this._pausePopup.hasEventListener(CIcyTowerEvent.POPUP_DESTROYED)){ this._pausePopup.removeEventListener(CIcyTowerEvent.POPUP_DESTROYED, this.unpauseGame); }; this._pausePopup.destroy(); }; this._pausePopup = null; IcyTowerMB.getStage().focus = IcyTowerMB.getStage(); this._paused = false; }; } private function onPostGameWindowShown(_arg1:Event):void{ _arg1.target.removeEventListener(Event.COMPLETE, this.onPostGameWindowShown); this._canRestartWithSpaceMode = 1; } private function onPlayerLanded(_arg1:Event):void{ } private function onPlayerCheatDetected(_arg1:CIcyTowerEvent):void{ this._cheatDetected = false; } private function onLowFPS(_arg1:Event):void{ if (this._towerPlayer.player.alive){ this._fpsDipsBeforeQualityChange--; if (this._fpsDipsBeforeQualityChange < 0){ IcyTowerMB.getFPSCounter().removeEventListener(CFPSCounter.FPS_WARNING, this.onLowFPS); CStaticMenu.lowerQuality(); }; }; } public function onPausedByStateHandler():void{ } public function update(_arg1:Number):void{ if (!(this._doUpdate)){ return; }; if (this._paused){ if (((!(this._pauseKeyDown)) && (this._keyHandler.isDown(CKeyboardHandler.KEY_P)))){ this.unpauseGame(null); this._pauseKeyDown = true; }; this._pauseKeyDown = this._keyHandler.isDown(CKeyboardHandler.KEY_P); return; }; if (((!(this._pauseKeyDown)) && (this._keyHandler.isDown(CKeyboardHandler.KEY_P)))){ this.pauseGame(); }; this._pauseKeyDown = this._keyHandler.isDown(CKeyboardHandler.KEY_P); this._hud.update(_arg1); if (this._canRestartWithSpaceMode > 0){ if (this._canRestartWithSpaceMode == 1){ if (!(this._keyHandler.isDown(CKeyboardHandler.KEY_SPACE))){ this._canRestartWithSpaceMode = 2; }; }; if (this._canRestartWithSpaceMode == 2){ if (this._keyHandler.isDown(CKeyboardHandler.KEY_SPACE)){ this.restartGameState(); this._canRestartWithSpaceMode = 0; }; }; }; var _loc2_:CInputPost = new CInputPost(); _loc2_.left = ((this._keyHandler.isDown(CKeyboardHandler.KEY_LEFT)) || (this._keyHandler.isDown(CKeyboardHandler.KEY_A))); _loc2_.right = ((this._keyHandler.isDown(CKeyboardHandler.KEY_RIGHT)) || (this._keyHandler.isDown(CKeyboardHandler.KEY_D))); _loc2_.jump = ((this._keyHandler.isDown(CKeyboardHandler.KEY_SPACE)) || (this._keyHandler.isDown(CKeyboardHandler.KEY_UP))); var _loc3_:int; while (_loc3_ < this._updatesPerFrame) { this._towerPlayer.update(_arg1, _loc2_, true); this._particleHandler.update(_arg1); _loc3_++; }; this._hud.setScore(this._currentTowerPlayer.player.score); if (!(this._gameComplete)){ this._hud.setClockAngle(((Math.PI * 2) * this._currentTowerPlayer.tower.getQuakeProgress())); }; this._hud.setComboMeterLevel(this._currentTowerPlayer.player.comboTimeoutPercent); if (this._updatesPerFrame <= 16){ this._renderer.render(this._currentTowerPlayer.viewport, this._renderStats); this._pxOverlay.render(new Point(), this._renderer.bitmapData, this._staticViewport, this._renderStats); }; if (this._keyHandler.isDown(CKeyboardHandler.KEY_F1)){ CLogger.log((((this._renderStats.renderedObjects + "/") + this._renderStats.totalObjects) + " objects rendered"), this); }; } public function construct(_arg1:String, _arg2:IStateHandler, _arg3:Object):void{ this._stateID = _arg1; this._stateHandler = _arg2; this._params = _arg3; _playSessions++; this._renderer = new CPxRenderer((CSettings.getInt("game_width") * 2), CSettings.getInt("game_height")); addChild(this._renderer); this._staticViewport = new CPxViewport(this._renderer.bitmapData.width, this._renderer.bitmapData.height); var _loc4_ = -1; var _loc5_:int = (Math.random() * 999999999); var _loc6_:XML = (CResourceManager.getInstance().getResource("classic_tower.xml") as XML); this._towerPlayer = new CTowerPlayer(_loc6_, _loc5_, _loc4_, this, false, false, true); this._towerPlayer.addEventListener(CIcyTowerEvent.GAME_OVER, this.onGameOver); this._towerPlayer.addEventListener(CIcyTowerEvent.CHEAT, this.onPlayerCheatDetected); this._towerPlayer.addEventListener(CIcyTowerEvent.COMBO_PROGRESS, this.onComboProgress); this._towerPlayer.addEventListener(CIcyTowerEvent.COMBO_COMPLETE, this.onComboComplete); this._towerPlayer.addEventListener(CIcyTowerEvent.NEW_QUAKE, this.onNewQuake); this._towerPlayer.addEventListener("top_of_the_world", this.onTopOfTheWorld); CResourceManager.getInstance().addResource(_loc6_.@id, "current_tower", true); this.showTowerPlayer(this._towerPlayer); this._showTutorial = true; if (_playSessions > -1){ this._showTutorial = false; CLogger.log("dont show tutorial: play sessions", this); }; this._pxOverlay = new CPxRenderObject(); this._debugDraw = new Sprite(); addChild(this._debugDraw); this._keyHandler = new CKeyboardHandler(IcyTowerMB.getStage()); this._keyHandler.focus(this); this._particleHandler = new CPxParticleHandler(); this._hud = new CHud(); addChild(this._hud); this._pxOverlay.addChild(this._hud.renderObject()); dispatchEvent(new CStateEvent(CStateEvent.LOADING_COMPLETE)); CStaticMenu.playMusic((this._towerPlayer.tower.id + "_tower_music")); IcyTowerMB.getFPSCounter().reset(); IcyTowerMB.getFPSCounter().addEventListener(CFPSCounter.FPS_WARNING, this.onLowFPS); IcyTowerMB.getStage().addEventListener(Event.DEACTIVATE, this.onFocusOut); IcyTowerMB.getStage().addEventListener(Event.ACTIVATE, this.onFocusIn); Log.Play(); Log.LevelCounterMetric("towers_started", this._towerPlayer.tower.id); } private function onGameOver(_arg1:Event):void{ this._numGameOvers++; this.doEndGame(); } private function cancelGotoMenu(_arg1:Event):void{ _arg1.target.removeEventListener(Event.COMPLETE, this.gotoMenu); _arg1.target.removeEventListener(Event.COMPLETE, this.cancelGotoMenu); } } }//package itfb.gameSection 90//CTowerPlayer (itfb.game.CTowerPlayer) package itfb.game { import com.fuga.utils.*; import flash.events.*; import pixelizer.render.*; import itfb.events.*; import com.fuga.events.*; import pixelizer.core.repository.*; import itfb.game.input.*; import itfb.game.towers.*; import itfb.game.entities.*; import pixelizer.physics.*; public class CTowerPlayer extends EventDispatcher implements ITowerPlayer { public var foreground:CTowerForeground;// = null public var tower:CTower;// = null private var _virtual:Boolean;// = false public var _soundViewport:CPxViewport;// = null private var _friendsOnFloors:Array;// = null public var player:CAvatar;// = null public var viewport:CPxViewport;// = null private var _towerXML:XML;// = null public var background:CTowerBackground;// = null public function CTowerPlayer(_arg1:XML, _arg2:int, _arg3:int, _arg4:IParticleRenderer, _arg5:Boolean, _arg6:Boolean, _arg7:Boolean){ _virtual = _arg6; _towerXML = _arg1; viewport = new CPxViewport(CSettings.getInt("game_width"), CSettings.getInt("game_height")); viewport.rectangle.y = -500; if (CPxRepository.getInstance().isAvailable("opponent")){ player = new CAvatar("player", this, _arg4, _arg7); } else { player = new CAvatar((_virtual) ? "opponent" : "player", this, _arg4, _arg7); }; player.position.x = (315 + ((_arg3 == -1)) ? 0 : ((_arg3 == 1)) ? -150 : 150); player.inputSequence = new CInputSequence(); player.updateFromTowerXML(_towerXML); tower = new CTower(player, this, _arg4, _towerXML, _arg2, _arg5); tower.setVirtual(_virtual); tower.updateToHeight(-600, []); player.addEventListener(CIcyTowerEvent.CHEAT, onRelayEvent); player.addEventListener(CIcyTowerEvent.COMBO_PROGRESS, onRelayEvent); player.addEventListener(CIcyTowerEvent.COMBO_COMPLETE, onRelayEvent); player.addEventListener("top_of_the_world", onRelayEvent); tower.addEventListener(CIcyTowerEvent.NEW_QUAKE, onRelayEvent); background = new CTowerBackground(this.tower); foreground = new CTowerForeground(this.tower); } private function onRelayEvent(_arg1:CEvent):void{ if (((!(tower.isVirtual())) && (!(player.isVirtual())))){ dispatchEvent(new CIcyTowerEvent(_arg1.type, _arg1.params)); }; } public function update(_arg1:Number, _arg2:CInputPost, _arg3:Boolean=true):void{ var _local4:CInputPost; tower.updateTower(_arg1, (player.position.y - 199), _friendsOnFloors); if (!player.alive){ return; }; if (_arg3){ if (_arg2 != null){ player.inputSequence.record(_arg2); handlePlayerInput(_arg2); } else { _local4 = player.inputSequence.getInput(); player.inputSequence.update(); handlePlayerInput(_local4); }; }; if ((player.position.y - 199) < -750){ tower.startQuakeProgress(); }; if (viewport.rectangle.y > (player.position.y - 199)){ viewport.rectangle.y = (viewport.rectangle.y + (((player.position.y - 199) - viewport.rectangle.y) * 0.15)); }; if (viewport.rectangle.y < (player.position.y - 399)){ viewport.rectangle.y = (viewport.rectangle.y + (((player.position.y - 399) - viewport.rectangle.y) * 0.3)); }; viewport.rectangle.y = int(viewport.rectangle.y); if (player.position.y > viewport.rectangle.bottom){ player.kill(); tower.stopQuakeProgress(); dispatchEvent(new Event(CIcyTowerEvent.GAME_OVER)); }; background.adjustToViewport(viewport); foreground.adjustToViewport(viewport); } public function getTower():CTower{ return (tower); } private function handlePlayerInput(_arg1:CInputPost):void{ if (_arg1 == null){ return; }; if (_arg1.left){ player.move(-1); } else { if (_arg1.right){ player.move(1); } else { player.move(0); }; }; if (player.location == CPxBody.ON_GROUND){ if (((((_arg1.jump) || (tower.rejump()))) || (player.jumpNextFrame()))){ if (player.jump()){ }; }; }; } public function setSoundViewport(_arg1:CPxViewport):void{ _soundViewport = _arg1; player.setSoundViewport(_soundViewport); tower.setSoundViewport(_soundViewport); } public function set friendsOnFloors(_arg1:Array):void{ _friendsOnFloors = _arg1; } public function destroy():void{ player.removeEventListener(CIcyTowerEvent.CHEAT, onRelayEvent); player.removeEventListener(CIcyTowerEvent.COMBO_PROGRESS, onRelayEvent); player.removeEventListener(CIcyTowerEvent.COMBO_COMPLETE, onRelayEvent); player.removeEventListener("top_of_the_world", onRelayEvent); tower.removeEventListener(CIcyTowerEvent.NEW_QUAKE, onRelayEvent); _towerXML = null; viewport.destroy(); viewport = null; _soundViewport = null; tower.destroy(); tower = null; player.destroy(); player = null; background.destroy(); background = null; foreground.destroy(); foreground = null; _friendsOnFloors = null; } public function getViewPort():CPxViewport{ return (viewport); } } }//package itfb.gameSection 91//IParticleRenderer (itfb.game.IParticleRenderer) package itfb.game { import pixelizer.particles.*; import pixelizer.render.*; public interface IParticleRenderer { function addParticle(_arg1:CPxParticle, _arg2:IPxRenderObject=null, _arg3:Boolean=true):void; } }//package itfb.gameSection 92//ITowerPlayer (itfb.game.ITowerPlayer) package itfb.game { import pixelizer.render.*; import itfb.game.towers.*; public interface ITowerPlayer { function getTower():CTower; function getViewPort():CPxViewport; } }//package itfb.gameSection 93//ATrophy (itfb.highscores.trophies.ATrophy) package itfb.highscores.trophies { public class ATrophy { protected var _store:Boolean;// = false protected var _details:XML; protected var _canGet:Boolean;// = true protected var _type:int;// = 0 protected var _id:String;// = "idNotSet" protected var _mcClass:String;// = "mcClassNotSet" public static const GOLD:int = 300; public static const BRONZE:int = 100; public static const GAME_TYPE:int = 1; public static const SILVER:int = 200; public static const NONE:int = 0; public static const META_TYPE:int = 2; public function ATrophy(_arg1:XML):void{ _details = _arg1; if (_details == null){ trace(this, "= null"); }; _type = ((_details.@type == "game")) ? GAME_TYPE : META_TYPE; _id = _details.@id; _mcClass = _details.@mcClass; _canGet = !((("" + _details.@canGet) == "false")); _store = (("" + _details.@store) == "yes"); } public function evaluate(_arg1:Object=null):int{ return (NONE); } public function get type():int{ return (_type); } public function get store():Boolean{ return (_store); } public function get details():XML{ return (_details); } public function setCanGet(_arg1:Boolean):void{ _canGet = _arg1; } public function getDescription(_arg1:int):String{ return ("ERROR: please override this function"); } public function get id():String{ return (_id); } public function canGet():Boolean{ return (_canGet); } public static function levelToString(_arg1:int):String{ if (_arg1 == NONE){ return ("none"); }; if (_arg1 == BRONZE){ return ("bronze"); }; if (_arg1 == SILVER){ return ("silver"); }; if (_arg1 == GOLD){ return ("gold"); }; return ("none"); } } }//package itfb.highscores.trophiesSection 94//CClassicTowerTrophy (itfb.highscores.trophies.CClassicTowerTrophy) package itfb.highscores.trophies { import itfb.language.*; import com.fuga.logger.*; import com.adobe.utils.*; public class CClassicTowerTrophy extends ATrophy { public function CClassicTowerTrophy(_arg1:XML){ super(_arg1); } override public function evaluate(_arg1:Object=null):int{ if (_arg1 == null){ return (NONE); }; if (_arg1["tid"] != 1){ return (NONE); }; var _local2:int; if (_arg1["floor"] == undefined){ CLogger.log("missing parameter floor", this, CLogger.LOG_WARNING); } else { _local2 = _arg1["floor"]; }; if (_local2 >= _details.gold.floor){ return (GOLD); }; if (_local2 >= _details.silver.floor){ return (SILVER); }; if (_local2 >= _details.bronze.floor){ return (BRONZE); }; return (NONE); } private function getLevelThreshold(_arg1:int):int{ if (_arg1 == GOLD){ return (_details.gold.floor); }; if (_arg1 == SILVER){ return (_details.silver.floor); }; if (_arg1 == BRONZE){ return (_details.bronze.floor); }; return (0); } override public function getDescription(_arg1:int):String{ var _local2:String = CLanguage.getInstance().getText("trophies", (_id + "_desc")); _local2 = StringUtil.replace(_local2, "%floor%", ("" + getLevelThreshold(_arg1))); return (_local2); } } }//package itfb.highscores.trophiesSection 95//CComboGameTrophy (itfb.highscores.trophies.CComboGameTrophy) package itfb.highscores.trophies { import itfb.language.*; import com.fuga.logger.*; import com.adobe.utils.*; public class CComboGameTrophy extends ATrophy { public function CComboGameTrophy(_arg1:XML){ super(_arg1); } override public function evaluate(_arg1:Object=null):int{ if (_arg1 == null){ return (NONE); }; var _local2:int; if (_arg1["combo"] == undefined){ CLogger.log("missing parameter combo", this, CLogger.LOG_WARNING); } else { _local2 = _arg1["combo"]; }; if (_local2 >= _details.gold.combo){ return (GOLD); }; if (_local2 >= _details.silver.combo){ return (SILVER); }; if (_local2 >= _details.bronze.combo){ return (BRONZE); }; return (NONE); } private function getLevelThreshold(_arg1:int):int{ if (_arg1 == GOLD){ return (_details.gold.combo); }; if (_arg1 == SILVER){ return (_details.silver.combo); }; if (_arg1 == BRONZE){ return (_details.bronze.combo); }; return (0); } override public function getDescription(_arg1:int):String{ var _local2:String = CLanguage.getInstance().getText("trophies", (_id + "_desc")); _local2 = StringUtil.replace(_local2, "%combo%", ("" + getLevelThreshold(_arg1))); return (_local2); } } }//package itfb.highscores.trophiesSection 96//CFloorGameTrophy (itfb.highscores.trophies.CFloorGameTrophy) package itfb.highscores.trophies { import itfb.language.*; import com.fuga.logger.*; import com.adobe.utils.*; public class CFloorGameTrophy extends ATrophy { public function CFloorGameTrophy(_arg1:XML){ super(_arg1); } override public function evaluate(_arg1:Object=null):int{ if (_arg1 == null){ return (NONE); }; var _local2:int; if (_arg1["floor"] == undefined){ CLogger.log("missing parameter floor", this, CLogger.LOG_WARNING); } else { _local2 = _arg1["floor"]; }; if (_local2 >= _details.gold.floor){ return (GOLD); }; if (_local2 >= _details.silver.floor){ return (SILVER); }; if (_local2 >= _details.bronze.floor){ return (BRONZE); }; return (NONE); } private function getLevelThreshold(_arg1:int):int{ if (_arg1 == GOLD){ return (_details.gold.floor); }; if (_arg1 == SILVER){ return (_details.silver.floor); }; if (_arg1 == BRONZE){ return (_details.bronze.floor); }; return (0); } override public function getDescription(_arg1:int):String{ var _local2:String = CLanguage.getInstance().getText("trophies", (_id + "_desc")); _local2 = StringUtil.replace(_local2, "%floor%", ("" + getLevelThreshold(_arg1))); return (_local2); } } }//package itfb.highscores.trophiesSection 97//CHelloTrophy (itfb.highscores.trophies.CHelloTrophy) package itfb.highscores.trophies { import itfb.language.*; import com.fuga.logger.*; public class CHelloTrophy extends ATrophy { public function CHelloTrophy(_arg1:XML){ super(_arg1); } override public function evaluate(_arg1:Object=null):int{ if (_arg1 == null){ return (NONE); }; var _local2:int; if (_arg1["floor"] == undefined){ CLogger.log("missing parameter floor", this, CLogger.LOG_WARNING); } else { _local2 = _arg1["floor"]; }; if (_local2 >= _details.gold.floor){ return (GOLD); }; if (_local2 >= _details.silver.floor){ return (SILVER); }; if (_local2 >= _details.bronze.floor){ return (BRONZE); }; return (NONE); } private function getLevelThreshold(_arg1:int):int{ if (_arg1 == GOLD){ return (_details.gold.floor); }; if (_arg1 == SILVER){ return (_details.silver.floor); }; if (_arg1 == BRONZE){ return (_details.bronze.floor); }; return (0); } override public function getDescription(_arg1:int):String{ return (CLanguage.getInstance().getText("trophies", (_id + "_desc"))); } } }//package itfb.highscores.trophiesSection 98//CTowerScore (itfb.highscores.CTowerScore) package itfb.highscores { import flash.utils.*; import com.fuga.security.*; public class CTowerScore { private var _timeOut:int;// = 1800000 private var _floor:CSecureInt; private var _combo:CSecureInt; private var _score:CSecureInt; public var tid:int;// = 0 private var _timestamp:int; public function CTowerScore(_arg1:int, _arg2:int=0, _arg3:int=0, _arg4:int=0){ _score = new CSecureInt(0); _floor = new CSecureInt(0); _combo = new CSecureInt(0); _timestamp = (-(_timeOut) * 2); super(); tid = _arg1; _score.value = _arg2; _floor.value = _arg3; _combo.value = _arg4; } public function set combo(_arg1:int):void{ _combo.value = _arg1; _timestamp = getTimer(); } public function get floor():int{ return (_floor.value); } public function makeValid():void{ _timestamp = getTimer(); } public function get score():int{ return (_score.value); } public function stillValid():Boolean{ return (((_timestamp + _timeOut) > getTimer())); } public function get combo():int{ return (_combo.value); } public function set floor(_arg1:int):void{ _floor.value = _arg1; _timestamp = getTimer(); } public function invalidate():void{ _timestamp = (-(_timeOut) * 2); } public function set score(_arg1:int):void{ _score.value = _arg1; _timestamp = getTimer(); } public function clone():CTowerScore{ return (new CTowerScore(tid, _score.value, _floor.value, _combo.value)); } } }//package itfb.highscoresSection 99//CTrophyChecker (itfb.highscores.CTrophyChecker) package itfb.highscores { import flash.display.*; import com.fuga.utils.*; import flash.events.*; import itfb.events.*; import itfb.language.*; import itfb.account.*; import itfb.highscores.trophies.*; import flash.net.*; import flash.utils.*; import itfb.ui.popups.*; import itfb.utils.*; public class CTrophyChecker extends EventDispatcher { private var _feedCaption:String;// = "" private var _checkTimer:Timer; private var _feedName:String;// = "" private var _parent:Sprite; private var _accumulatedCoinsThroughTrophies:int;// = 0 private var _feedImages:Array; private var _numTrophies:int;// = 0 private var _scoreData:Object; private var _feedDescription:String;// = "" public function CTrophyChecker(_arg1:Sprite, _arg2:Object=null){ this._feedImages = []; super(); this._parent = _arg1; this._scoreData = _arg2; } public function start():void{ this._checkTimer = new Timer(10, 0); this._checkTimer.addEventListener(TimerEvent.TIMER, this.onTimer); this._checkTimer.start(); } private function onBackedIOError(_arg1:Event):void{ _arg1.target.removeEventListener(Event.COMPLETE, this.onBackedIOError); _arg1.target.removeEventListener(IOErrorEvent.IO_ERROR, this.onBackedIOError); } private function onTimer(_arg1:TimerEvent):void{ this._checkTimer.stop(); if (this.checkForTrophies() == false){ this._checkTimer.removeEventListener(TimerEvent.TIMER, this.onTimer); this._checkTimer = null; this._parent = null; this._scoreData = null; dispatchEvent(new Event(Event.COMPLETE)); }; } private function onTrophyPopupClosed(_arg1:Event):void{ _arg1.target.removeEventListener(CIcyTowerEvent.POPUP_CONFIRM, this.onTrophyPopupClosed); this._checkTimer.start(); } private function checkForTrophies():Boolean{ var _loc3_:ATrophy; var _loc4_:int; var _loc5_:CTrophyPopup; var _loc6_:SharedObject; var _loc7_:String; var _loc8_:String; var _loc1_:Boolean; var _loc2_:Array = CResourceManager.getInstance().getResource("trophyList"); for each (_loc3_ in _loc2_) { _loc4_ = _loc3_.evaluate(this._scoreData); if (((_loc3_.canGet()) && ((_loc4_ > CAccount.getInstance().getTrophyLevel(_loc3_.id))))){ this._accumulatedCoinsThroughTrophies = (this._accumulatedCoinsThroughTrophies + CAccount.getInstance().addTrophy(_loc3_, _loc4_, true)); _loc5_ = new CTrophyPopup(_loc3_, _loc4_); _loc5_.addEventListener(CIcyTowerEvent.POPUP_CONFIRM, this.onTrophyPopupClosed); _loc5_.x = 315; _loc5_.y = 250; this._parent.addChild(_loc5_); if (_loc3_.store){ _loc6_ = SharedObject.getLocal("trophies"); _loc6_.data.hello = _loc3_.id; _loc6_.flush(); }; if (this._feedCaption == ""){ this._feedName = CLanguage.getInstance().getText("fb_posts", "trophy_earned_name"); _loc7_ = CLanguage.getInstance().getText("fb_posts", "single_trophy_earned_caption"); _loc7_ = _loc7_.split("%player%").join("{*actor*}"); _loc7_ = _loc7_.split("%trophy%").join(CLanguage.getInstance().getText("trophies", (_loc3_.id + "_name"))); this._feedCaption = _loc7_; _loc8_ = CLanguage.getInstance().getText("fb_posts", "single_trophy_earned_description"); _loc8_ = _loc8_.split("%reqs%").join(CUtils.stripHTML(_loc3_.getDescription(_loc4_))); this._feedDescription = _loc8_; }; this._numTrophies++; _loc1_ = false; break; }; }; return (_loc1_); } } }//package itfb.highscoresSection 100//IQuittableState (itfb.interfaces.IQuittableState) package itfb.interfaces { public interface IQuittableState { function onHomeButton():void; } }//package itfb.interfacesSection 101//CItem (itfb.items.CItem) package itfb.items { import flash.display.*; public class CItem { public var type:int;// = 0 public var cost:int;// = 0 public var textureMC:MovieClip;// = null public var status:int;// = 0 private var _headCategories:Array; public var layerPriority:int;// = 0 public var special:String; public var id:String; private var _bodyCategories:Array; public var category:String; public static const NEW:int = 2; public static const OWNED:int = 1; public static const NORMAL:int = 0; public static const BOOSTER_ITEM:int = 4; public static const HIDDEN:int = 3; public static const NOBUY:int = 4; public static const BODY_ITEM:int = 2; public static const HEAD_ITEM:int = 1; public static const POCKET_ITEM:int = 0; public function CItem(){ _bodyCategories = ["skins", "shirts", "trousers", "shoes"]; _headCategories = ["haircolors", "skins", "noses", "mouths", "facial_hairs", "extras"]; super(); } public function destroy():void{ textureMC = null; } public function updateTypeFromCategory():void{ type = 0; if (category == "boosters"){ type = BOOSTER_ITEM; } else { if (_bodyCategories.indexOf(category) >= 0){ type = (type + BODY_ITEM); }; if (_headCategories.indexOf(category) >= 0){ type = (type + HEAD_ITEM); }; if (type == 0){ type = POCKET_ITEM; }; }; } public function toItemString():String{ return (((((((((((((("id:" + id) + ",") + "status:") + status) + ",") + "texture:") + textureMC) + ",") + "category:") + category) + ",") + "cost:") + cost)); } public static function layerPrioritySort(_arg1:CItem, _arg2:CItem):int{ if (_arg1.layerPriority > _arg2.layerPriority){ return (1); }; if (_arg1.layerPriority < _arg2.layerPriority){ return (-1); }; return (0); } } }//package itfb.itemsSection 102//CLanguage (itfb.language.CLanguage) package itfb.language { import com.fuga.logger.*; import flash.xml.*; public class CLanguage { private var _baseLanguage:Object; private var _currentLanguageID:String;// = "" private var _currentLanguage:Object; private static var _instance:CLanguage; public function CLanguage(_arg1:SingletonEnforcer){ _baseLanguage = {}; _currentLanguage = {}; super(); } public function destroy():void{ _instance = null; _baseLanguage = (_currentLanguage = null); } public function setBaseLanguage(_arg1:XML):void{ var _local2:XML; var _local3:Object; var _local4:XML; _baseLanguage = {}; for each (_local2 in _arg1.elements()) { if (_baseLanguage[_local2.name()] == undefined){ _baseLanguage[_local2.name()] = {}; }; _local3 = _baseLanguage[_local2.name()]; for each (_local4 in _local2.elements()) { _local3[_local4.@id] = _local4.toString(); }; }; _currentLanguageID = _arg1.@language; CLogger.log(("base language set to " + _currentLanguageID), this, CLogger.LOG_INFO); } private function htmlUnescape(_arg1:String):String{ return (new XMLDocument(_arg1).firstChild.nodeValue); } public function getText(_arg1:String, _arg2:String, _arg3:Boolean=true):String{ var _local7:Array; var _local8:int; var _local9:String; var _local4:String = getTextFromLanguageObject(_currentLanguage, _arg1, _arg2); if (_local4 == null){ _local4 = getTextFromLanguageObject(_baseLanguage, _arg1, _arg2); }; if (_local4 == null){ _local4 = (((("*** ERROR ***\nNo text data found for '" + _arg1) + "' id '") + _arg2) + "'."); }; if (_arg3){ if (_local4.indexOf("<") == -1){ _local4 = htmlUnescape(_local4); }; }; var _local5:int; var _local6:int; while (_local6 < _local4.length) { if (_local4.charAt(_local6) == "|"){ _local5++; }; _local6++; }; if (_local5 > 0){ _local7 = new Array(); _local8 = 1; while (_local8 <= _local5) { _local7.push(_local4.split("|")[_local8]); _local8 = (_local8 + 2); }; for each (_local9 in _local7) { _local4 = _local4.replace((("|" + _local9) + "|"), getText(_local9.split("/")[0], _local9.split("/")[1])); }; }; return (_local4); } public function pasteLanguage(_arg1:XML):void{ var _local2:XML; var _local3:Object; var _local4:XML; _currentLanguage = {}; for each (_local2 in _arg1.elements()) { if (_currentLanguage[_local2.name()] == undefined){ _currentLanguage[_local2.name()] = {}; }; _local3 = _currentLanguage[_local2.name()]; for each (_local4 in _local2.elements()) { _local3[_local4.@id] = _local4.toString(); }; }; _currentLanguageID = _arg1.@language; CLogger.log(("current language set to " + _currentLanguageID), this, CLogger.LOG_INFO); } public function get currentLanguage():String{ return (_currentLanguageID); } private function getTextFromLanguageObject(_arg1:Object, _arg2:String, _arg3:String):String{ if (_arg1[_arg2] != undefined){ if (_arg1[_arg2][_arg3] != undefined){ return (_arg1[_arg2][_arg3]); }; }; return (null); } public static function getInstance():CLanguage{ if (CLanguage._instance == null){ CLanguage._instance = new CLanguage(new SingletonEnforcer()); }; return (CLanguage._instance); } } }//package itfb.language class SingletonEnforcer { private function SingletonEnforcer(){ } }Section 103//CPreloadState (itfb.menu.loading.CPreloadState) package itfb.menu.loading { import flash.display.*; import com.fuga.utils.*; import com.fuga.statehandler.*; import br.com.stimuli.loading.*; import pixelizer.render.*; import com.fuga.soundmanager.*; import itfb.language.*; import pixelizer.core.repository.*; import pixelizer.utils.*; import itfb.highscores.trophies.*; import flash.net.*; import flash.utils.*; import itfb.backend.*; import com.fuga.logger.*; import itfb.menu.staticmenu.*; import itfb.factory.*; public class CPreloadState extends Sprite implements IState { private var ZIP_PARSING_RATIO:Number;// = 0.1 private var _numItemsToParse:int;// = 100 private var _startTime:int;// = 0 private var ZIP_LOADING_RATIO:Number;// = 0.1 private var MDL_PARSING_RATIO:Number;// = 0.2 private var _challengeBackend:CBackend;// = null private var _stateHandler:IStateHandler;// = null private var SWF_PARSING_RATIO:Number;// = 0 private var _params:Object;// = null private var SWF_LOADING_RATIO:Number;// = 0.3 private var _stateID:String; private var SERVER_RATIO:Number;// = 0.1 private var _progressParts:Object; private var _itemsToParse:Array; private var ITM_PARSING_RATIO:Number;// = 0.2 public function CPreloadState(){ _progressParts = new Object(); super(); } private function get versionCK():String{ if (IcyTowerMB.isLocal()){ return (""); }; return (("?ck=" + IcyTowerMB.version)); } private function onDataLoadProgress(_arg1:BulkProgressEvent):void{ var _local2:Number = ((SWF_LOADING_RATIO * _arg1.itemsLoaded) / _arg1.itemsTotal); setProgressPercent(_local2, "swfData"); updateStatus("loading data"); } public function onResumedByStateHandler():void{ } public function update(_arg1:Number):void{ } private function onDataLoaded(_arg1:BulkProgressEvent):void{ var frameWidth:int; var frameHeight:int; var playerBMP:Bitmap; var frames:CPxFrames; var towerMCContentsXML:XML; var resMan:CResourceManager; var post:XML; var floor:CPxFrames; var i:int; var trophyXML:XML; var t:CHelloTrophy; var tso:SharedObject; var availableTowers:Array; var tid:int; var towerID:String; var classXML:XML; var so:SharedObject; var evt = _arg1; frameWidth = 128; frameHeight = 160; playerBMP = CMyFactory.createPlayerBitmap(); CPxRepository.getInstance().createPixelizerFrames("player", new CPxSpriteSheet(playerBMP.bitmapData, frameWidth, frameHeight), CPxSprite.HORIZONTAL_FLIP); playerBMP.bitmapData.dispose(); frames = CPxRepository.getInstance().getPixelizerFrames("player"); frames.addAnimation(new CPxAnimation("idle2", [0], {onComplete:CPxAnimation.ANIMATION_LOOP})); frames.addAnimation(new CPxAnimation("idle", [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8], {onComplete:CPxAnimation.ANIMATION_LOOP})); frames.addAnimation(new CPxAnimation("turn", [9])); frames.addAnimation(new CPxAnimation("walk", [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21], {onComplete:CPxAnimation.ANIMATION_LOOP})); frames.addAnimation(new CPxAnimation("fall", [27, 27, 28, 28])); frames.addAnimation(new CPxAnimation("jump_low", [30])); frames.addAnimation(new CPxAnimation("jump_med", [23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28])); frames.addAnimation(new CPxAnimation("jump_hi", [32])); towerMCContentsXML = <classes> <post className="MCWallBounce" flip="true"/> <post className="MCLand1"/> <post className="MCLand2"/> <post className="MCLand3"/> <post className="MCLand4"/> <post className="MCLand5"/> <post className="MCTrail"/> <post className="MCCoin"/> <post className="MCBackground"/> <post className="MCSigns"/> <post className="MCFloors"/> <post className="MCFloorBreak"/> <post className="MCSideBlock" flip="true"/> <!-- <post className="MCComboPopup" skipPixelizer="true" /> <post className="MCFriendPopup" skipPixelizer="true" /> --> </classes> ; resMan = CResourceManager.getInstance(); CMyFactory.addMCDefinitions(towerMCContentsXML); for each (post in towerMCContentsXML.elements()) { if (post.@skipPixelizer != "true"){ CPxRepository.getInstance().createPixelizerFrames(post.@className, resMan.createMovieClip(post.@className), ((post.@flip == "true")) ? CPxSprite.HORIZONTAL_FLIP : CPxSprite.NO_FLIP); }; }; floor = CPxRepository.getInstance().getPixelizerFrames("MCFloors"); i = 0; while (i < floor.frames.length) { CPxRepository.getInstance().createPixelizerFrames(("floor_" + i), new CPxSpriteSheet(floor.frames[i], 32)); i = (i + 1); }; updateStatus("registering graphics: trophies"); resMan.addResource(CMyFactory.createTrophiesXML(), "trophies.xml"); updateStatus("creating trophies"); trophyXML = CMyFactory.createTrophiesXML(); var trophyList:Array = []; t = new CHelloTrophy(trophyXML..trophy.(@id == "hello")[0]); trophyList.push(t); trophyList.push(new CFloorGameTrophy(trophyXML..trophy.(@id == "floors1")[0])); trophyList.push(new CComboGameTrophy(trophyXML..trophy.(@id == "combo")[0])); trophyList.push(new CClassicTowerTrophy(trophyXML..trophy.(@id == "classic")[0])); tso = SharedObject.getLocal("trophies"); if (tso.data[t.id] != undefined){ t.setCanGet(false); }; CResourceManager.getInstance().addResource(trophyList, "trophyList"); updateStatus("registering towers"); availableTowers = CSettings.getVar("available_towers").split(","); tid = 1; for each (towerID in availableTowers) { resMan.addResource(CMyFactory.createTowerXML(), (towerID + "_tower.xml")); resMan.addResource(tid, ("tower_tid_" + towerID)); resMan.addResource(towerID, ("tower_id_" + tid)); tid = (tid + 1); }; updateStatus("extracting classes"); classXML = <classes> <!-- <post className="MCHint" /> <post className="MCHelp" /> <post className="MCMenuHelp" /> <post className="MCPlayHelp" /> <post className="MCShopHelp" /> <post className="MCTrophiesHelp" /> <post className="MCWorldmapHelp" /> <post className="MCButton" /> <post className="MCImageButton" /> <post className="MCFreeCoinsButton" /> <post className="MCCreditCardButton" /> <post className="MCTrophyRoom" /> <post className="MCTrophyBackground" /> <post className="MCStatsPopup" /> <post className="MCStatsWindow" /> <post className="MCStatsPost" /> <post className="MCCharacterShadow" /> <post className="MCTrophyAddict" /> <post className="MCTrophyCheapy" /> <post className="MCTrophyBigspender" /> <post className="MCTrophyChallenge" /> <post className="MCTrophyCoins" /> <post className="MCTrophyCombo2" /> <post className="MCTrophyDisco" /> <post className="MCTrophyFloors2" /> <post className="MCTrophyFriends" /> <post className="MCTrophyGift" /> <post className="MCTrophyJungle" /> <post className="MCTrophyNocoins" /> <post className="MCTrophyWestern" /> <post className="MCTowerResult" /> --> <post className="MCSpeechBubble"/> <post className="MCStaticMenu"/> <post className="MCMainMenu"/> <post className="MCHeader"/> <post className="MCText"/> <post className="MCPopup"/> <post className="MCDebugPopup"/> <post className="MCToolTip"/> <post className="MCTrophyPopup"/> <post className="MCTopPopup"/> <post className="MCTrophyClassic"/> <post className="MCTrophyCombo"/> <post className="MCTrophyFloors"/> <post className="MCTrophyHello"/> <post className="MCGameStandardMessage"/> <post className="MCGameFriendMessage"/> <!-- <post className="MCLoader" /> <post className="MCLoaderLight" /> --> <post className="MCPostGame"/> <post className="MCSleepingHarold"/> <post className="MCTutorial"/> </classes> ; CMyFactory.addMCDefinitions(classXML); classXML = <classes> <post className="MCCoinPickup"/> <post className="MCHud"/> <post className="MCFriendArrow"/> </classes> ; CMyFactory.addMCDefinitions(classXML); CPxRepository.getInstance().createPixelizerFrames("MCCoinPickup", resMan.createMovieClip("MCCoinPickup")); CSoundManager.getInstance().registerSound((getDefinitionByName("SMusic") as Class), "classic_tower_music"); updateStatus("registering more data"); resMan.addResource(CMyFactory.createStyleSheet(), "stylesheet.css"); CMyFactory.addSounds(); IcyTowerMB.getStage().addChild(new CStaticMenu()); so = SharedObject.getLocal("quality"); if (so.data.quality != undefined){ if (so.data.quality == "LOW"){ CStaticMenu.lowerQuality(); }; }; updateStatus("Get ready!"); _stateHandler.goToState("menu", IcyTowerMB.getStandardTransision()); } private function onDataLoadError(_arg1:BulkErrorEvent):void{ updateStatus("Failed to contact game server. Try again later."); setProgressPercent(0); } public function updateStatus(_arg1:String):void{ CLogger.log(("updateStatus: " + _arg1), this); } private function setProgressPercent(_arg1:Number, _arg2:String=""):void{ var _local4:Number; _progressParts[_arg2] = _arg1; var _local3:Number = 0; for each (_local4 in _progressParts) { _local3 = (_local3 + _local4); }; } public function construct(_arg1:String, _arg2:IStateHandler, _arg3:Object):void{ _stateID = _arg1; _stateHandler = _arg2; _params = _arg3; _startTime = getTimer(); CLanguage.getInstance().setBaseLanguage(CMyFactory.createLanguageXML()); CSettings.loadVars(CMyFactory.createSettingsXML()); IcyTowerMB.version = CSettings.getVar("version"); dispatchEvent(new CStateEvent(CStateEvent.LOADING_COMPLETE)); onDataLoaded(null); } public function get stateID():String{ return (_stateID); } private function get randomCK():String{ if (IcyTowerMB.isLocal()){ return (""); }; return (("?ck=" + (getTimer() + int((Math.random() * 1000000))))); } public function destroy():void{ _stateHandler = null; _params = null; } public function onPausedByStateHandler():void{ } } }//package itfb.menu.loadingSection 104//CStaticMenu (itfb.menu.staticmenu.CStaticMenu) package itfb.menu.staticmenu { import flash.display.*; import com.fuga.utils.*; import com.fuga.soundmanager.*; import flash.net.*; import flash.utils.*; import itfb.ui.*; import SWFStats.*; import com.fuga.logger.*; public class CStaticMenu extends Sprite { private var _buttons:Dictionary; private static var _menuMC:MovieClip; private static var _lastMusicHandle:String = ""; public function CStaticMenu(){ var _local2:String; var _local3:SharedObject; var _local4:MovieClip; var _local5:CButton; _buttons = new Dictionary(); super(); _menuMC = CResourceManager.getInstance().createMovieClip("MCStaticMenu"); addChild(_menuMC); var _local1:Array = ["btn_home", "btn_quality", "btn_sound", "btn_music"]; for each (_local2 in _local1) { _local4 = (_menuMC.getChildByName(_local2) as MovieClip); _local5 = new CButton(_local4, onButtonClicked, ("overlay_" + _local2)); _buttons[_local2] = _local5; }; _local3 = SharedObject.getLocal("sound"); if (_local3.data.sound == "off"){ CSoundManager.getInstance().playsSounds = false; }; if (_local3.data.music == "off"){ CSoundManager.getInstance().playsMusic = false; }; setSoundAndMusicButtons(); } private function setSoundAndMusicButtons():void{ if (CSoundManager.getInstance().playsSounds){ _menuMC.btn_sound.button.gotoAndStop("enabled"); } else { _menuMC.btn_sound.button.gotoAndStop("disabled"); }; if (CSoundManager.getInstance().playsMusic){ _menuMC.btn_music.button.gotoAndStop("enabled"); } else { _menuMC.btn_music.button.gotoAndStop("disabled"); }; } private function onButtonClicked(_arg1:Sprite):void{ var _local2:SharedObject; var _local3:String; switch (_arg1.name){ case "btn_home": Log.CustomMetric("home clicked", "static menu"); IcyTowerMB.goHome(); break; case "btn_sound": CSoundManager.getInstance().playsSounds = !(CSoundManager.getInstance().playsSounds); if (CSoundManager.getInstance().playsSounds){ Log.CustomMetric("sound unmuted", "static menu"); } else { Log.CustomMetric("sound muted", "static menu"); }; setSoundAndMusicButtons(); _local2 = SharedObject.getLocal("sound"); _local2.data.sound = (CSoundManager.getInstance().playsSounds) ? "on" : "off"; _local2.flush(); break; case "btn_music": CSoundManager.getInstance().playsMusic = !(CSoundManager.getInstance().playsMusic); if (CSoundManager.getInstance().playsMusic){ Log.CustomMetric("music unmuted", "static menu"); } else { Log.CustomMetric("music muted", "static menu"); }; if (CSoundManager.getInstance().playsMusic){ playMusic(_lastMusicHandle); }; setSoundAndMusicButtons(); _local2 = SharedObject.getLocal("sound"); _local2.data.music = (CSoundManager.getInstance().playsMusic) ? "on" : "off"; _local2.flush(); break; case "btn_quality": _local3 = IcyTowerMB.getStage().quality; if (_local3 != "LOW"){ IcyTowerMB.getStage().quality = StageQuality.LOW; } else { IcyTowerMB.getStage().quality = StageQuality.HIGH; }; Log.CustomMetric((("selected " + IcyTowerMB.getStage().quality) + " quality"), "static menu"); CLogger.log(("quality set to " + IcyTowerMB.getStage().quality), this); IcyTowerMB.highQuality = !((IcyTowerMB.getStage().quality == "LOW")); _local2 = SharedObject.getLocal("quality"); _local2.data.quality = IcyTowerMB.getStage().quality; _local2.flush(); setQualityButton(); break; }; } public static function playMusic(_arg1:String):void{ _lastMusicHandle = _arg1; CSoundManager.getInstance().playMusic(_lastMusicHandle, null, 1, 0, CSoundWrapper.LOOPS_YES); } private static function setQualityButton():void{ if (!IcyTowerMB.highQuality){ _menuMC.btn_quality.button.gotoAndStop("disabled"); } else { _menuMC.btn_quality.button.gotoAndStop("enabled"); }; } public static function lowerQuality():void{ IcyTowerMB.getStage().quality = StageQuality.LOW; IcyTowerMB.highQuality = false; setQualityButton(); } } }//package itfb.menu.staticmenuSection 105//CMenuState (itfb.menu.CMenuState) package itfb.menu { import flash.display.*; import com.fuga.utils.*; import com.fuga.statehandler.*; import flash.events.*; import itfb.highscores.*; import itfb.language.*; import itfb.account.*; import itfb.ui.*; import SWFStats.*; import com.fuga.logger.*; import itfb.menu.staticmenu.*; import flash.filters.*; public class CMenuState extends Sprite implements IState { private var _buttons:Array; private var _keyHandler:CKeyboardHandler;// = null private var _stateHandler:IStateHandler;// = null private var _updateCharacter:Boolean;// = true private var _params:Object;// = null private var _stateID:String; private var _numTrophies:int;// = 0 private var _buttonLabels:Array; private var _bgMC:MovieClip; private var _speechBubble:CSpeechBubble; private static var _showedNewsPopup:Boolean = false; public function onResumedByStateHandler():void{ CStaticMenu.playMusic("menu_music"); var _local1:CTrophyChecker = new CTrophyChecker(this); _local1.start(); } public function update(_arg1:Number):void{ } public function destroy():void{ var _local1:CButton; while (numChildren > 0) { removeChildAt(0); }; if (_bgMC != null){ _bgMC = null; }; if (_speechBubble != null){ _speechBubble.destroy(); _speechBubble = null; }; for each (_local1 in _buttons) { _local1.destroy(); }; _buttons = null; _stateHandler = null; _params = null; _keyHandler.deconstruct(); _keyHandler = null; } private function showBird():void{ _bgMC.bird.gotoAndPlay("show"); _bgMC.bird.mouseChildren = true; _bgMC.bird.buttonMouse = true; _bgMC.bird.addEventListener(MouseEvent.MOUSE_OVER, onBirdInteraction); _bgMC.bird.addEventListener(MouseEvent.MOUSE_OUT, onBirdInteraction); _bgMC.bird.addEventListener(MouseEvent.CLICK, onBirdInteraction); } private function hideBird():void{ _bgMC.bird.gotoAndPlay("hide"); _bgMC.bird.removeEventListener(MouseEvent.MOUSE_OVER, onBirdInteraction); _bgMC.bird.removeEventListener(MouseEvent.MOUSE_OUT, onBirdInteraction); _bgMC.bird.removeEventListener(MouseEvent.CLICK, onBirdInteraction); } private function onBirdInteraction(_arg1:MouseEvent):void{ switch (_arg1.type){ case MouseEvent.CLICK: CLogger.log("clicked on tweeter bird", this); break; case MouseEvent.MOUSE_OVER: _bgMC.bird.filters = [new GlowFilter(0xFFFFFF, 0.8, 5, 5)]; break; case MouseEvent.MOUSE_OUT: _bgMC.bird.filters = null; break; }; } public function construct(_arg1:String, _arg2:IStateHandler, _arg3:Object):void{ var _local4:String; var _local5:MovieClip; var _local6:CButton; _stateID = _arg1; _stateHandler = _arg2; _params = _arg3; _bgMC = CResourceManager.getInstance().createMovieClip("MCMainMenu"); _bgMC.gotoAndStop(CSettings.getInt("menu_frame")); addChild(_bgMC); _bgMC.photo.gotoAndStop(int((Math.random() * 4))); if (_bgMC.tower != null){ _bgMC.tower.gotoAndStop((CAccount.getInstance().vipLevel + 1)); }; _buttons = []; _buttonLabels = ["btn_play", "btn_fb"]; for each (_local4 in _buttonLabels) { _local5 = (_bgMC.getChildByName(_local4) as MovieClip); _local5.setText(CLanguage.getInstance().getText("menu", _local4).toUpperCase()); _local6 = new CButton(_local5, onButtonClicked, ("menu_" + _local4)); _buttons.push(_local6); }; _keyHandler = new CKeyboardHandler(IcyTowerMB.getStage()); dispatchEvent(new CStateEvent(CStateEvent.LOADING_COMPLETE)); } public function get stateID():String{ return (_stateID); } private function onButtonClicked(_arg1:Object):void{ switch (_arg1.name){ case "btn_play": Log.CustomMetric("play clicked", "menu"); _updateCharacter = false; _stateHandler.goToState("play", IcyTowerMB.getStandardTransision()); break; case "btn_fb": Log.CustomMetric("fb clicked", "menu"); IcyTowerMB.gotoFB("from menu"); break; }; if (_speechBubble != null){ _speechBubble.hide(); }; } public function onPausedByStateHandler():void{ } } }//package itfb.menuSection 106//CWindow (itfb.ui.popups.windows.CWindow) package itfb.ui.popups.windows { import flash.display.*; import flash.geom.*; import itfb.ui.*; public class CWindow extends Sprite { protected var _buttons:Array; protected var _windowSize:Point; public var mc:MovieClip;// = null protected var _content:MovieClip;// = null public function CWindow(){ _buttons = new Array(); _windowSize = new Point(); super(); graphics.lineStyle(0, 0, 0); graphics.beginFill(0xFFFFFF, 0); graphics.drawRect(-1000, -1000, 2000, 2000); graphics.endFill(); } public function destroy():void{ var _local1:CButton; for each (_local1 in _buttons) { _local1.destroy(); }; _buttons = null; } public function get content():MovieClip{ return (_content); } public function set content(_arg1:MovieClip):void{ _content = _arg1; } public function disableButtons():void{ var _local1:CButton; for each (_local1 in _buttons) { _local1.enabled = false; }; } public function enableButtons():void{ var _local1:CButton; for each (_local1 in _buttons) { _local1.enabled = true; }; } } }//package itfb.ui.popups.windowsSection 107//CWindowRegular (itfb.ui.popups.windows.CWindowRegular) package itfb.ui.popups.windows { import flash.display.*; import com.fuga.utils.*; import flash.events.*; import itfb.events.*; import itfb.ui.*; public class CWindowRegular extends CWindow { private var _removeContentOnDestroy:Boolean;// = false public function CWindowRegular(_arg1:String="MCPopup", _arg2:int=-1, _arg3:int=-1, _arg4:MovieClip=null, _arg5:Boolean=true, _arg6:Boolean=false){ var _local7:Boolean; super(); mc = CResourceManager.getInstance().createMovieClip(_arg1); addChild(mc); _content = _arg4; if (_content != null){ _removeContentOnDestroy = true; if (((!((_arg2 == 2))) && (!((_arg3 == 2))))){ mc.container.x = -((_arg2 / 2)); mc.container.y = -((_arg3 / 2)); mc.container.addChild(_content); }; if (_arg2 == -1){ _arg2 = _content.width; }; if (_arg3 == -1){ _arg3 = _content.height; }; _local7 = true; if ((((_arg2 == -2)) || ((_arg3 == -2)))){ _arg2 = mc.bg.width; _arg3 = mc.bg.height; _local7 = false; }; }; (mc.container as MovieClip).cacheAsBitmap = true; if (_local7){ mc.outline.width = _arg2; mc.outline.height = _arg3; mc.bg.width = (_arg2 - 2); mc.bg.height = (_arg3 - 2); mc.content_mask.width = (_arg2 - 2); mc.content_mask.height = (_arg3 - 2); mc.btn_cancel.y = ((_arg3 / 2) + 5); mc.btn_cancel.x = -(((_arg2 / 2) - 45)); mc.btn_confirm.y = ((_arg3 / 2) + 5); mc.btn_confirm.x = ((_arg2 / 2) - 45); }; mc.btn_cancel.visible = _arg5; mc.btn_confirm.visible = _arg6; mc.btn_up.visible = false; mc.btn_center.visible = false; mc.btn_down.visible = false; mc.middle.visible = false; _buttons.push(new CButton(mc.btn_confirm, onButton, "popup_confirm")); _buttons.push(new CButton(mc.btn_cancel, onButton, "popup_cancel")); _windowSize.x = _arg2; _windowSize.y = _arg3; } private function onButton(_arg1:Sprite):void{ switch (_arg1){ case mc.btn_confirm: disableButtons(); dispatchEvent(new Event(CIcyTowerEvent.POPUP_CONFIRM)); break; case mc.btn_cancel: dispatchEvent(new Event(CIcyTowerEvent.POPUP_CANCEL)); break; }; } override public function destroy():void{ if (((!((_content == null))) && (_removeContentOnDestroy))){ mc.container.removeChild(_content); }; _content = null; removeChild(mc); mc = null; } } }//package itfb.ui.popups.windowsSection 108//CWindowScroll (itfb.ui.popups.windows.CWindowScroll) package itfb.ui.popups.windows { import flash.display.*; import com.fuga.utils.*; import flash.events.*; import itfb.events.*; import flash.geom.*; import caurina.transitions.*; import itfb.ui.*; public class CWindowScroll extends CWindow { private var _scrollHeight:int;// = 0 private var _scrollHeightDiff:int;// = 6 private var _scrollTarget:Number;// = 0 private var _removeContentOnDestroy:Boolean;// = false private var _scrollDelta:Number;// = 0.1 private var _scrollY:int;// = 0 private var _dragging:Boolean;// = false private var _scrollPercent:Number;// = 0 private var _centerHeight:int;// = 0 public function CWindowScroll(_arg1:String="MCPopup", _arg2:int=-1, _arg3:int=-1, _arg4:MovieClip=null, _arg5:Boolean=true, _arg6:Boolean=false){ var _local7:Boolean; super(); mc = CResourceManager.getInstance().createMovieClip(_arg1); addChild(mc); _content = _arg4; if (_content != null){ _removeContentOnDestroy = true; if (((!((_arg2 == 2))) && (!((_arg3 == 2))))){ mc.container.x = -((_arg2 / 2)); mc.container.y = -((_arg3 / 2)); mc.container.addChild(_content); }; if (_arg2 == -1){ _arg2 = _content.width; }; if (_arg3 == -1){ _arg3 = _content.height; }; _local7 = true; if ((((_arg2 == -2)) || ((_arg3 == -2)))){ _arg2 = mc.bg.width; _arg3 = mc.bg.height; _local7 = false; }; }; (mc.container as MovieClip).cacheAsBitmap = true; if (_local7){ mc.outline.width = _arg2; mc.outline.height = _arg3; mc.bg.width = (_arg2 - 2); mc.bg.height = (_arg3 - 2); mc.content_mask.width = (_arg2 - 2); mc.content_mask.height = (_arg3 - 2); mc.btn_cancel.y = ((_arg3 / 2) + 5); mc.btn_cancel.x = -(((_arg2 / 2) - 45)); mc.btn_confirm.y = ((_arg3 / 2) + 5); mc.btn_confirm.x = ((_arg2 / 2) - 45); }; mc.btn_cancel.visible = _arg5; mc.btn_confirm.visible = _arg6; if (_local7){ mc.btn_up.x = (_arg2 / 2); mc.btn_up.y = -(((_arg3 / 2) - 20)); mc.btn_center.x = (_arg2 / 2); mc.btn_down.x = (_arg2 / 2); mc.btn_down.y = ((_arg3 / 2) - 20); }; mc.btn_center.y = -100000; mc.middle.x = mc.btn_center.x; mc.middle.y = 0; mc.middle.height = (mc.btn_down.y * 2); _buttons.push(new CButton(mc.btn_confirm, onButton, "popup_confirm")); _buttons.push(new CButton(mc.btn_cancel, onButton, "popup_cancel")); _buttons.push(new CButton(mc.btn_up, onButton)); _buttons.push(new CButton(mc.btn_center, onButton)); _buttons.push(new CButton(mc.btn_down, onButton)); mc.btn_center.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); IcyTowerMB.getStage().addEventListener(MouseEvent.MOUSE_UP, onMouseUp); IcyTowerMB.getStage().addEventListener(Event.MOUSE_LEAVE, onMouseUp); IcyTowerMB.getStage().addEventListener(MouseEvent.MOUSE_WHEEL, onScrollWheel); _scrollTarget = mc.btn_center.y; _windowSize.x = _arg2; _windowSize.y = _arg3; addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function onMouseUp(_arg1:Event):void{ (mc.btn_center as MovieClip).stopDrag(); _dragging = false; } public function resetContentPosition():void{ mc.btn_center.y = (_scrollTarget = -1000000); tween(); } private function onMouseDown(_arg1:Event):void{ if (!_dragging){ (mc.btn_center as MovieClip).startDrag(false, new Rectangle(mc.btn_center.x, _scrollY, 0, _scrollHeight)); _dragging = true; }; } override public function destroy():void{ if (((!((_content == null))) && (_removeContentOnDestroy))){ mc.container.removeChild(_content); }; _content = null; mc.btn_center.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); removeChild(mc); mc = null; IcyTowerMB.getStage().removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); IcyTowerMB.getStage().removeEventListener(Event.MOUSE_LEAVE, onMouseUp); IcyTowerMB.getStage().removeEventListener(MouseEvent.MOUSE_WHEEL, onScrollWheel); if (hasEventListener(Event.ENTER_FRAME)){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); }; } private function tween():void{ if (_scrollTarget < _scrollY){ _scrollTarget = _scrollY; }; if (_scrollTarget > (_scrollY + _scrollHeight)){ _scrollTarget = (_scrollY + _scrollHeight); }; Tweener.addTween(mc.btn_center, {y:_scrollTarget, transition:"easeInOutSine", time:0.1}); } private function onScrollWheel(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; if (!_dragging){ _local2 = ((_windowSize.x / 2) + 40); _local3 = ((_windowSize.y / 2) + 40); if ((((((((mc.mouseX > -(_local2))) && ((mc.mouseX < _local2)))) && ((mc.mouseY > -(_local3))))) && ((mc.mouseY < _local3)))){ _scrollTarget = (_scrollTarget - ((_arg1.delta * _scrollDelta) * _scrollHeight)); tween(); }; }; } private function onButton(_arg1:Sprite):void{ switch (_arg1){ case mc.btn_confirm: disableButtons(); dispatchEvent(new Event(CIcyTowerEvent.POPUP_CONFIRM)); break; case mc.btn_cancel: dispatchEvent(new Event(CIcyTowerEvent.POPUP_CANCEL)); break; case mc.btn_up: if (!_dragging){ _scrollTarget = (_scrollTarget - ((_scrollDelta * 3) * _scrollHeight)); tween(); }; break; case mc.btn_down: if (!_dragging){ _scrollTarget = (_scrollTarget + ((_scrollDelta * 3) * _scrollHeight)); tween(); }; break; }; } private function onEnterFrame(_arg1:Event):void{ updateContent(); } public function setScrollerVisibility(_arg1:Boolean):void{ mc.btn_up.visible = _arg1; mc.btn_center.visible = _arg1; mc.btn_down.visible = _arg1; mc.middle.visible = _arg1; } private function updateContent():void{ var _local1:int; var _local2:Number; if (_content != null){ _local1 = (content.height + 15); if (_local1 > _windowSize.y){ _content.x = -6; setScrollerVisibility(true); _windowSize.y = mc.bg.height; _windowSize.x = mc.bg.width; _local2 = (_windowSize.y / _local1); _centerHeight = (((mc.btn_down.y * 2) - mc.btn_down.height) * _local2); mc.btn_center.button.height = _centerHeight; if (_dragging){ _scrollTarget = mc.btn_center.y; }; _scrollY = (((mc.btn_up.y + (mc.btn_up.height / 2)) + (_centerHeight / 2)) - _scrollHeightDiff); _scrollHeight = (((Math.abs((mc.btn_up.y - mc.btn_down.y)) - ((mc.btn_up.height / 2) + (mc.btn_down.height / 2))) - _centerHeight) + (_scrollHeightDiff * 2)); if (mc.btn_center.y < _scrollY){ mc.btn_center.y = _scrollY; }; if (mc.btn_center.y > (_scrollY + _scrollHeight)){ mc.btn_center.y = (_scrollY + _scrollHeight); }; _scrollPercent = (((mc.btn_center.y + 0) - _scrollY) / _scrollHeight); mc.container.y = (-(((_local1 - _windowSize.y) * _scrollPercent)) - (_windowSize.y / 2)); } else { setScrollerVisibility(false); mc.container.y = (-(((_local1 - _windowSize.y) * 0)) - (_windowSize.y / 2)); _content.x = 0; }; } else { setScrollerVisibility(false); mc.container.y = (-(((_local1 - _windowSize.y) * 0)) - (_windowSize.y / 2)); _content.x = 0; }; } } }//package itfb.ui.popups.windowsSection 109//CPopup (itfb.ui.popups.CPopup) package itfb.ui.popups { import flash.display.*; import flash.events.*; import itfb.events.*; import com.fuga.events.*; import com.fuga.soundmanager.*; import caurina.transitions.*; import itfb.ui.popups.windows.*; public class CPopup extends Sprite { protected var _window:CWindow;// = null private var _destroyed:Boolean;// = false protected var _content:MovieClip;// = null public function CPopup(_arg1:Boolean=true){ if (_arg1){ graphics.lineStyle(0, 0, 0); graphics.beginFill(0, 0.3); graphics.drawRect(-1500, -1500, 3000, 3000); graphics.endFill(); }; addChild(_window); _window.addEventListener(CIcyTowerEvent.POPUP_CONFIRM, onConfirm); _window.addEventListener(CIcyTowerEvent.POPUP_CANCEL, onCancel); _window.scaleX = (_window.scaleY = 0); Tweener.addTween(_window, {scaleX:1, scaleY:1, time:0.5, transition:"easeOutBounce"}); playOpenSound(); } public function set window(_arg1:CWindow):void{ _window = _arg1; } protected function onConfirm(_arg1:Event):void{ disableAllButtons(); closeTween(); dispatchEvent(new Event(CIcyTowerEvent.POPUP_CONFIRM)); } protected function closeTween():void{ Tweener.addTween(_window, {scaleX:0, scaleY:0, time:0.3, transition:"easeInBack", onComplete:destroy}); playCloseSound(); } protected function enableAllButtons():void{ _window.enableButtons(); } protected function disableAllButtons():void{ _window.disableButtons(); } public function destroy():void{ if (_destroyed){ return; }; if (_window != null){ _window.removeEventListener(CIcyTowerEvent.POPUP_CONFIRM, onConfirm); _window.removeEventListener(CIcyTowerEvent.POPUP_CANCEL, onCancel); removeChild(_window); _window.destroy(); _window = null; }; if (parent != null){ parent.removeChild(this); }; _content = null; _destroyed = true; while (numChildren > 0) { removeChildAt(0); }; dispatchEvent(new Event(CIcyTowerEvent.POPUP_DESTROYED)); } protected function playCloseSound():void{ CSoundManager.getInstance().playAmbientSound("popdown"); } public function get window():CWindow{ return (_window); } protected function playOpenSound():void{ CSoundManager.getInstance().playAmbientSound("popup"); } protected function onCancel(_arg1:Event, _arg2:Boolean=true):void{ disableAllButtons(); if (_arg2){ closeTween(); }; dispatchEvent(new CEvent(CIcyTowerEvent.POPUP_CANCEL)); } } }//package itfb.ui.popupsSection 110//CTextPopup (itfb.ui.popups.CTextPopup) package itfb.ui.popups { import flash.display.*; import com.fuga.utils.*; import itfb.ui.popups.windows.*; public class CTextPopup extends CPopup { private var _header:MovieClip;// = null private var _text:MovieClip;// = null public function CTextPopup(_arg1:String, _arg2:String, _arg3:Boolean=true, _arg4:Boolean=false){ var _local5 = 250; var _local6 = 230; _content = new MovieClip(); if (_arg1 != ""){ _header = CResourceManager.getInstance().createMovieClip("MCHeader"); _header.setText(_arg1, "center", _local5); _header.x = (_local5 / 2); _header.y = 35; _content.addChild(_header); }; if (_arg2 != ""){ _text = CResourceManager.getInstance().createMovieClip("MCText"); _text.width = (_local5 - 20); _text.setText(_arg2, CResourceManager.getInstance().getResource("stylesheet.css")); _text.x = (_local5 / 2); _text.y = 35; _content.addChild(_text); if (_header != null){ _text.y = (_text.y + _header.y); }; }; _window = new CWindowScroll("MCPopup", _local5, _local6, _content, _arg4, _arg3); super(); } public function get content():MovieClip{ return (_content); } } }//package itfb.ui.popupsSection 111//CTopPopup (itfb.ui.popups.CTopPopup) package itfb.ui.popups { import flash.display.*; import com.fuga.utils.*; import flash.events.*; import com.fuga.soundmanager.*; import itfb.ui.popups.windows.*; import itfb.ui.*; public class CTopPopup extends CPopup { private var _buttons:Array; public function CTopPopup(){ _buttons = []; _content = CResourceManager.getInstance().createMovieClip("MCTopPopup"); _buttons.push(new CButton(_content.btn_skip, onButton)); _buttons.push(new CButton(_content.btn_fb, onButton)); _content.btn_skip.setText("SKIP", 100); _content.btn_fb.setText("PLAY ON FACEBOOK", 220); _content.setHeader("CONGRATULATIONS!"); _window = new CWindowRegular("MCPopup", 470, 400, _content, false, false); super(); } override protected function onConfirm(_arg1:Event):void{ var _local2:CButton; for each (_local2 in _buttons) { _local2.enabled = false; }; super.onConfirm(_arg1); } override protected function playOpenSound():void{ CSoundManager.getInstance().playAmbientSound("trophy"); } private function onButton(_arg1:MovieClip):void{ switch (_arg1.name){ case "btn_fb": IcyTowerMB.gotoFB("from top"); break; case "btn_skip": break; }; onConfirm(null); } override public function destroy():void{ var _local1:CButton; for each (_local1 in _buttons) { _local1.destroy(); }; _buttons = null; super.destroy(); } } }//package itfb.ui.popupsSection 112//CTrophyPopup (itfb.ui.popups.CTrophyPopup) package itfb.ui.popups { import flash.display.*; import com.fuga.utils.*; import flash.events.*; import com.fuga.soundmanager.*; import itfb.language.*; import itfb.ui.popups.windows.*; import itfb.highscores.trophies.*; import itfb.ui.*; public class CTrophyPopup extends CPopup { private var _buttons:Array; public function CTrophyPopup(_arg1:ATrophy, _arg2:int){ var bodyText:String; var trophiesXML:XML; var temp:XML; var trophyClassName:String; var trophyMC:MovieClip; var replaceString:Array; var j:int; var key:String; var newText:String; var pTrophy = _arg1; var pTrophyLevel = _arg2; _buttons = []; _content = CResourceManager.getInstance().createMovieClip("MCTrophyPopup"); _buttons.push(new CButton(_content.btn_skip, onButton)); _buttons.push(new CButton(_content.btn_fb, onButton)); _content.btn_skip.setText("SKIP", 100); _content.btn_fb.setText("CLAIM ON FACEBOOK", 220); _content.setHeader(CLanguage.getInstance().getText("trophies", (pTrophy.id + "_name"))); _window = new CWindowRegular("MCPopup", 240, 365, _content, false, false); bodyText = pTrophy.getDescription(pTrophyLevel); var level:int = pTrophyLevel; var languangeRefs:int; var i:int; while (i < bodyText.length) { if (bodyText.charAt(i) == "%"){ languangeRefs = (languangeRefs + 1); }; i = (i + 1); }; if (languangeRefs > 0){ replaceString = new Array(); j = 1; while (j <= languangeRefs) { replaceString.push(bodyText.split("%")[j]); j = (j + 2); }; for each (key in replaceString) { newText = ""; if (level == 0){ newText = (newText + "<span class=\"red\">"); } else { newText = (newText + "<span class=\"green\">"); }; newText = (newText + pTrophy.details.child(ATrophy.levelToString(Math.max(ATrophy.BRONZE, level))).child(key)); newText = (newText + "</span>"); bodyText = bodyText.replace((("%" + key) + "%"), newText); }; }; _content.setText(bodyText); var coins:int; switch (pTrophyLevel){ case ATrophy.BRONZE: coins = CSettings.getInt("coins_for_bronze_trophy"); break; case ATrophy.SILVER: coins = CSettings.getInt("coins_for_silver_trophy"); break; case ATrophy.GOLD: coins = CSettings.getInt("coins_for_gold_trophy"); break; }; _content.setCoins(coins); trophiesXML = CResourceManager.getInstance().getResource("trophies.xml"); var list:XMLList = trophiesXML..trophy.(@id == pTrophy.id); temp = list[0]; trophyClassName = temp.@mcClass; trophyMC = CResourceManager.getInstance().createMovieClip(trophyClassName); trophyMC.gotoAndStop(ATrophy.levelToString(pTrophyLevel)); _content.trophy.addChild(trophyMC); super(); } override protected function onConfirm(_arg1:Event):void{ var _local2:CButton; for each (_local2 in _buttons) { _local2.enabled = false; }; super.onConfirm(_arg1); } override protected function playOpenSound():void{ CSoundManager.getInstance().playAmbientSound("trophy"); } private function onButton(_arg1:MovieClip):void{ switch (_arg1.name){ case "btn_fb": IcyTowerMB.gotoFB("from trophy"); break; case "btn_skip": break; }; onConfirm(null); } override public function destroy():void{ var _local1:CButton; for each (_local1 in _buttons) { _local1.destroy(); }; _buttons = null; super.destroy(); } } }//package itfb.ui.popupsSection 113//CButton (itfb.ui.CButton) package itfb.ui { import flash.display.*; import flash.events.*; import com.fuga.soundmanager.*; import itfb.language.*; import caurina.transitions.*; import flash.utils.*; import com.fuga.logger.*; public class CButton extends Sprite { protected var _toolTipTimer:Timer;// = null protected var _enabled:Boolean;// = true protected var _soundPrefix:String; public var toolTipString:String;// = "" private var _baseTooltipID:String;// = "" protected var _animate:Boolean;// = true protected var _toolTip:CToolTip;// = null protected var _buttonMC:MovieClip; protected var _onClickFunction:Function;// = null protected var _selectable:Boolean;// = false protected var _selected:Boolean;// = false protected var _toolTipID:String;// = "" public function CButton(_arg1:MovieClip, _arg2:Function, _arg3:String="", _arg4:Boolean=true, _arg5:Boolean=false, _arg6:String=null, _arg7:Boolean=true){ _onClickFunction = _arg2; _enabled = _arg4; _selectable = _arg5; _soundPrefix = _arg6; _animate = _arg7; _baseTooltipID = _arg3; updateTooltip(); if (_soundPrefix == null){ _soundPrefix = "button"; }; if (_arg1 == null){ CLogger.log((("button MC is null (" + _arg3) + ")"), this, CLogger.LOG_WARNING); } else { if (_arg1.icon1 != null){ _arg1.icon1.stop(); }; if (_arg1.icon2 != null){ _arg1.icon2.stop(); }; }; _buttonMC = _arg1; _buttonMC.mouseChildren = false; _buttonMC.buttonMode = _enabled; _buttonMC.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); _buttonMC.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); _buttonMC.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); _buttonMC.addEventListener(MouseEvent.CLICK, onMouseClick); if (_enabled){ if (_buttonMC.hitTestPoint(IcyTowerMB.getStage().mouseX, IcyTowerMB.getStage().mouseY)){ if (_animate){ _buttonMC.gotoAndStop("over"); }; } else { if (_animate){ _buttonMC.gotoAndStop("out"); }; }; } else { if (_animate){ _buttonMC.gotoAndStop("disabled"); }; }; } public function updateTooltip():void{ var _local1 = "tooltips"; if (_baseTooltipID.indexOf("/") >= 0){ _toolTipID = _baseTooltipID.substr((_baseTooltipID.indexOf("/") + 1)); _local1 = _baseTooltipID.substring(0, _baseTooltipID.indexOf("/")); } else { _toolTipID = _baseTooltipID; }; toolTipString = CLanguage.getInstance().getText(_local1, _toolTipID); } public function onMouseDown(_arg1:MouseEvent):void{ if (_enabled){ if (_animate){ _buttonMC.gotoAndStop("down"); }; }; } public function get enabled():Boolean{ return (_enabled); } public function destroy():void{ while (numChildren > 0) { removeChildAt(0); }; if (_buttonMC){ _buttonMC.removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver); _buttonMC.removeEventListener(MouseEvent.MOUSE_OUT, onMouseOut); _buttonMC.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); _buttonMC.removeEventListener(MouseEvent.CLICK, onMouseClick); _buttonMC = null; }; if (_toolTip != null){ IcyTowerMB.getStage().removeChild(_toolTip); _toolTip.destroy(); _toolTip = null; }; if (_toolTipTimer != null){ _toolTipTimer.stop(); if (_toolTipTimer.hasEventListener(TimerEvent.TIMER)){ _toolTipTimer.removeEventListener(TimerEvent.TIMER, onToolTipTimerComplete); }; _toolTipTimer = null; }; } public function get mc():MovieClip{ return (_buttonMC); } public function setTooltip(_arg1:String):void{ toolTipString = _arg1; _toolTipID = "none"; } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; _buttonMC.buttonMode = _enabled; if (_enabled){ if (_buttonMC.hitTestPoint(IcyTowerMB.getStage().mouseX, IcyTowerMB.getStage().mouseY)){ if (_animate){ _buttonMC.gotoAndStop("over"); }; } else { if (_animate){ _buttonMC.gotoAndStop("out"); }; }; } else { if (_animate){ _buttonMC.gotoAndStop("disabled"); }; }; } public function get selected():Boolean{ return (_selected); } protected function onMouseOver(_arg1:MouseEvent):void{ if (_enabled){ if (_soundPrefix != null){ CSoundManager.getInstance().playAmbientSound((_soundPrefix + "_over")); }; if (!_selected){ if (_animate){ _buttonMC.gotoAndStop("over"); if (_buttonMC.icon1 != null){ _buttonMC.icon1.play(); }; if (_buttonMC.icon2 != null){ _buttonMC.icon2.play(); }; }; }; }; if ((((_toolTip == null)) && (!((_toolTipID == ""))))){ _toolTipTimer = new Timer(250, 1); _toolTipTimer.addEventListener(TimerEvent.TIMER, onToolTipTimerComplete); _toolTipTimer.start(); }; } public function onToolTipHidden():void{ if (_toolTip != null){ _toolTip.destroy(); }; _toolTip = null; } private function onToolTipTimerComplete(_arg1:TimerEvent):void{ if (_toolTip != null){ Tweener.removeTweens(_toolTip); _toolTip.destroy(); _toolTip = null; }; var _local2:Stage = IcyTowerMB.getStage(); _toolTip = new CToolTip(toolTipString, _local2.mouseX, _local2.mouseY); _toolTip.scaleX = (_toolTip.scaleY = 0.4); _local2.addChild(_toolTip); Tweener.addTween(_toolTip, {scaleX:1, scaleY:1, transition:"easeOutCubic", time:0.1, delay:0.05}); } protected function onMouseOut(_arg1:MouseEvent):void{ if (_enabled){ if (_soundPrefix != null){ }; if (!_selected){ if (_animate){ _buttonMC.gotoAndStop("out"); if (_buttonMC.icon1 != null){ _buttonMC.icon1.stop(); }; if (_buttonMC.icon2 != null){ _buttonMC.icon2.stop(); }; }; }; }; if (_toolTipTimer != null){ if (_toolTipTimer.running){ _toolTipTimer.stop(); _toolTipTimer.removeEventListener(TimerEvent.TIMER, onToolTipTimerComplete); }; }; if (_toolTip != null){ Tweener.removeTweens(_toolTip); Tweener.addTween(_toolTip, {scaleX:0, scaleY:0, transition:"easeInCubic", time:0.05, onComplete:onToolTipHidden}); }; } public function onMouseClick(_arg1:MouseEvent):void{ if (enabled){ if (_soundPrefix != null){ CSoundManager.getInstance().playAmbientSound((_soundPrefix + "_click")); }; if (_selectable){ _selected = true; if (_animate){ _buttonMC.gotoAndPlay("selected"); }; } else { if (_animate){ _buttonMC.gotoAndStop("over"); }; }; if (_onClickFunction != null){ _onClickFunction(_buttonMC); }; if (_toolTipTimer != null){ if (_toolTipTimer.running){ _toolTipTimer.stop(); _toolTipTimer.removeEventListener(TimerEvent.TIMER, onToolTipTimerComplete); }; }; if (_toolTip != null){ Tweener.removeTweens(_toolTip); Tweener.addTween(_toolTip, {scaleX:0, scaleY:0, transition:"easeInCubic", time:0.05, onComplete:onToolTipHidden}); }; }; } public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_selected){ if (_animate){ _buttonMC.gotoAndStop("selected"); }; } else { if (_animate){ _buttonMC.gotoAndStop("out"); }; }; } } }//package itfb.uiSection 114//CSpeechBubble (itfb.ui.CSpeechBubble) package itfb.ui { import flash.display.*; import com.fuga.utils.*; import caurina.transitions.*; public class CSpeechBubble extends Sprite { private var _gfx:MovieClip; private var _myWidth:int;// = 0 public function CSpeechBubble(_arg1:String, _arg2:Number=1, _arg3:int=-1){ _myWidth = _arg3; _gfx = CResourceManager.getInstance().createMovieClip("MCSpeechBubble"); setText(_arg1); _gfx.scaleX = (_gfx.scaleY = 0); addChild(_gfx); Tweener.addTween(_gfx, {scaleX:1, scaleY:1, transition:"easeOutBack", time:0.2, delay:_arg2}); } public function destroy():void{ if (_gfx != null){ if (_gfx.textBox != null){ _gfx.textBox.destroy(); }; removeChild(_gfx); }; _gfx = null; } public function hide():void{ Tweener.addTween(_gfx, {scaleX:0, scaleY:0, transition:"easeInOutSine", time:0.1}); } public function setText(_arg1:String):void{ _gfx.setText(_arg1, CResourceManager.getInstance().getResource("stylesheet.css"), _myWidth); } } }//package itfb.uiSection 115//CToolTip (itfb.ui.CToolTip) package itfb.ui { import flash.display.*; import com.fuga.utils.*; import com.fuga.soundmanager.*; import flash.text.*; public class CToolTip extends MovieClip { private var _css:StyleSheet; private var _toolTip:MovieClip;// = null public function CToolTip(_arg1:String, _arg2:int, _arg3:int, _arg4:MovieClip=null){ _css = new StyleSheet(); super(); x = _arg2; y = _arg3; mouseChildren = false; mouseEnabled = false; cacheAsBitmap = true; if (_arg4 == null){ _toolTip = CResourceManager.getInstance().createMovieClip("MCToolTip"); addChild(_toolTip); } else { _toolTip = _arg4; }; setText(_arg1); CSoundManager.getInstance().playAmbientSound("tooltip"); } public function destroy():void{ while (numChildren > 0) { removeChildAt(0); }; _css = null; _toolTip.textBox.destroy(); if (_toolTip.parent != null){ _toolTip.parent.removeChild(_toolTip); }; if (parent != null){ parent.removeChild(this); }; _toolTip = null; } private function setText(_arg1:String):void{ var _local2:TextField = _toolTip.textBox.tf_text; _toolTip.textBox.setText(_arg1, CResourceManager.getInstance().getResource("stylesheet.css")); var _local3:int; var _local4 = 15; var _local5 = 758; var _local6 = 520; var _local7 = 11; var _local8:int = x; var _local9:int = y; _toolTip.bg.height = ((_local2.textHeight + 19) + (_local2.numLines * 2)); x = (x + _local3); y = (y + _local4); var _local10:int = width; var _local11:int = height; if (x < 0){ x = 0; }; if ((x + _local10) > _local5){ x = (_local5 - _local10); }; if (y < 0){ y = 0; }; if ((y + _local11) > _local6){ y = (_local6 - _local11); }; if ((y - (_local4 / 8)) < _local9){ y = (_local9 - (_local11 + (_local4 / 8))); y = (y + _local11); _toolTip.bg.y = (_toolTip.bg.y - _local11); _local2.y = (_local2.y - _local11); }; } } }//package itfb.uiSection 116//CBase64 (itfb.utils.CBase64) package itfb.utils { import flash.utils.*; public class CBase64 { public static const version:String = "1.1.0"; private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; public function CBase64(){ throw (new Error("Base64 class is static container only")); } public static function encode(_arg1:String):String{ var _local2:ByteArray = new ByteArray(); _local2.writeUTFBytes(_arg1); return (encodeByteArray(_local2)); } public static function encodeByteArray(_arg1:ByteArray):String{ var _local3:Array; var _local5:uint; var _local6:uint; var _local7:uint; var _local2 = ""; var _local4:Array = new Array(4); _arg1.position = 0; while (_arg1.bytesAvailable > 0) { _local3 = new Array(); _local5 = 0; while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) { _local3[_local5] = _arg1.readUnsignedByte(); _local5++; }; _local4[0] = ((_local3[0] & 252) >> 2); _local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4)); _local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6)); _local4[3] = (_local3[2] & 63); _local6 = _local3.length; while (_local6 < 3) { _local4[(_local6 + 1)] = 64; _local6++; }; _local7 = 0; while (_local7 < _local4.length) { _local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7])); _local7++; }; }; return (_local2); } public static function decode(_arg1:String):String{ var _local2:ByteArray = decodeToByteArray(_arg1); return (_local2.readUTFBytes(_local2.length)); } public static function decodeToByteArray(_arg1:String):ByteArray{ var _local6:uint; var _local7:uint; var _local2:ByteArray = new ByteArray(); var _local3:Array = new Array(4); var _local4:Array = new Array(3); var _local5:uint; while (_local5 < _arg1.length) { _local6 = 0; while ((((_local6 < 4)) && (((_local5 + _local6) < _arg1.length)))) { _local3[_local6] = BASE64_CHARS.indexOf(_arg1.charAt((_local5 + _local6))); _local6++; }; _local4[0] = ((_local3[0] << 2) + ((_local3[1] & 48) >> 4)); _local4[1] = (((_local3[1] & 15) << 4) + ((_local3[2] & 60) >> 2)); _local4[2] = (((_local3[2] & 3) << 6) + _local3[3]); _local7 = 0; while (_local7 < _local4.length) { if (_local3[(_local7 + 1)] == 64){ break; }; _local2.writeByte(_local4[_local7]); _local7++; }; _local5 = (_local5 + 4); }; _local2.position = 0; return (_local2); } } }//package itfb.utilsSection 117//CUtils (itfb.utils.CUtils) package itfb.utils { public class CUtils { public static function stripHTML(_arg1:String):String{ return (_arg1.replace(/<.*?>/g, "")); } public static function removeNamespaces(... _args):String{ _args[0] = _args[0].replace(/xmlns[^"]+\"[^"]+\"/g, ""); var _local2:Array = _args[0].match(/\"[^"]*\"/g); _args[0] = _args[0].replace(/\"[^"]*\"/g, "%attribute value%"); _args[0] = _args[0].replace(/(<\/?|\s)\w+\:/g, "$1"); while (_args[0].indexOf("%attribute value%") > 0) { _args[0] = _args[0].replace("%attribute value%", _local2.shift()); }; return (_args[0]); } public static function convertToFormatNumber(_arg1:int):String{ var _local2 = ""; var _local3:int; var _local4:int = String(_arg1).length; while (_local4 >= 0) { _local2 = (String(_arg1).charAt(_local4) + _local2); if ((((_local3 >= 3)) && (!((_local4 == 0))))){ _local2 = ("." + _local2); _local3 = 0; }; _local3++; _local4--; }; return (_local2); } } }//package itfb.utilsSection 118//CDebugApp (itfb.CDebugApp) package itfb { import flash.display.*; import com.fuga.utils.*; public class CDebugApp extends MovieClip { private static var _memVis:CMemoryVisualizer = null; protected static var _isDebugApp:Boolean = true; public function CDebugApp(){ _memVis = new CMemoryVisualizer((758 - 128)); _memVis.x = 128; _memVis.y = 522; addChild(_memVis); } public function getSecretKey():String{ return ("f146d48212749241935dced649aee981"); } protected function canStartLocalGame():Boolean{ return (true); } } }//package itfbSection 119//wav (jumpboy_1.wav) package jumpboy_1 { import flash.media.*; public dynamic class wav extends Sound { } }//package jumpboy_1Section 120//wav (jumpboy_2.wav) package jumpboy_2 { import flash.media.*; public dynamic class wav extends Sound { } }//package jumpboy_2Section 121//wav (jumpboy_3.wav) package jumpboy_3 { import flash.media.*; public dynamic class wav extends Sound { } }//package jumpboy_3Section 122//wav (land_1.wav) package land_1 { import flash.media.*; public dynamic class wav extends Sound { } }//package land_1Section 123//wav (land_2.wav) package land_2 { import flash.media.*; public dynamic class wav extends Sound { } }//package land_2Section 124//wav (land_3.wav) package land_3 { import flash.media.*; public dynamic class wav extends Sound { } }//package land_3Section 125//buttonGfx_29 (MCMenuExport_fla.buttonGfx_29) package MCMenuExport_fla { import flash.display.*; public dynamic class buttonGfx_29 extends MovieClip { public function buttonGfx_29(){ addFrameScript(3, frame4, 8, frame9, 14, frame15); } function frame15(){ stop(); } function frame9(){ stop(); } function frame4(){ stop(); } } }//package MCMenuExport_flaSection 126//buttonGfxGreen_53 (MCMenuExport_fla.buttonGfxGreen_53) package MCMenuExport_fla { import flash.display.*; public dynamic class buttonGfxGreen_53 extends MovieClip { public function buttonGfxGreen_53(){ addFrameScript(3, frame4, 8, frame9, 14, frame15); } function frame15(){ stop(); } function frame9(){ stop(); } function frame4(){ stop(); } } }//package MCMenuExport_flaSection 127//MCBasicShadowedTHolder_5 (MCMenuExport_fla.MCBasicShadowedTHolder_5) package MCMenuExport_fla { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.media.*; import flash.net.*; import flash.utils.*; import flash.accessibility.*; import flash.system.*; import flash.filters.*; import flash.external.*; import flash.ui.*; import flash.xml.*; import adobe.utils.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class MCBasicShadowedTHolder_5 extends MovieClip { public var text2:MovieClip; public var text1:MovieClip; public function MCBasicShadowedTHolder_5(){ addFrameScript(0, frame1); } function frame1(){ } public function setText(_arg1:String, _arg2:String="center", _arg3:int=-1):void{ var _local4:int = text1.tf_text.width; if (_arg3 != -1){ text1.tf_text.width = (text2.tf_text.width = _arg3); } else { _arg3 = _local4; }; var _local5:TextFormat = text1.tf_text.getTextFormat(); _local5.leading = 2; if (_arg2 == "center"){ _local5.align = TextFormatAlign.CENTER; }; if (_arg2 == "left"){ _local5.align = TextFormatAlign.LEFT; }; if (_arg2 == "right"){ _local5.align = TextFormatAlign.RIGHT; }; if (_arg2 == "justify"){ _local5.align = TextFormatAlign.JUSTIFY; }; _local5.letterSpacing = -0.5; var _local6:TextFormat = text2.tf_text.getTextFormat(); _local6.leading = 2; if (_arg2 == "center"){ _local6.align = TextFormatAlign.CENTER; }; if (_arg2 == "left"){ _local6.align = TextFormatAlign.LEFT; }; if (_arg2 == "right"){ _local6.align = TextFormatAlign.RIGHT; }; if (_arg2 == "justify"){ _local6.align = TextFormatAlign.JUSTIFY; }; _local6.letterSpacing = -0.5; text1.tf_text.defaultTextFormat = _local5; text2.tf_text.defaultTextFormat = _local6; text1.tf_text.text = _arg1.toUpperCase(); text2.tf_text.text = _arg1.toUpperCase(); if (_arg2 == "center"){ text1.tf_text.autoSize = TextFieldAutoSize.CENTER; text2.tf_text.autoSize = TextFieldAutoSize.CENTER; }; if ((((_arg2 == "left")) || ((_arg2 == "justify")))){ text1.tf_text.autoSize = TextFieldAutoSize.LEFT; text2.tf_text.autoSize = TextFieldAutoSize.LEFT; }; if (_arg2 == "right"){ text1.tf_text.autoSize = TextFieldAutoSize.CENTER; text2.tf_text.autoSize = TextFieldAutoSize.CENTER; }; var _local7:int = ((_arg3 - _local4) / 2); if (_arg2 == "left"){ x = (x + _local7); } else { if (_arg2 == "right"){ x = (x - (_local7 * 2)); }; }; if (_arg2 == "center"){ text1.tf_text.x = -((text1.tf_text.width / 2)); text2.tf_text.x = -((text2.tf_text.width / 2)); }; } } }//package MCMenuExport_flaSection 128//MCButtonGreen_52 (MCMenuExport_fla.MCButtonGreen_52) package MCMenuExport_fla { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.media.*; import flash.net.*; import flash.utils.*; import flash.accessibility.*; import flash.system.*; import flash.filters.*; import flash.external.*; import flash.ui.*; import flash.xml.*; import adobe.utils.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class MCButtonGreen_52 extends MovieClip { public var button:MovieClip; public var textBox:MCHeader; public function MCButtonGreen_52(){ addFrameScript(0, frame1, 3, frame4, 4, frame5, 8, frame9, 9, frame10, 14, frame15); } function frame1(){ button.gotoAndStop("out"); } function frame4(){ stop(); } function frame5(){ button.gotoAndStop("over"); } function frame9(){ stop(); } public function setText(_arg1:String, _arg2:int=-1, _arg3:int=-1):void{ var _local4:Number = textBox.height; var _local5:int = _arg2; if (_local5 == -1){ _local5 = 200; }; textBox.setText(_arg1, "center", _local5); textBox.textBox.y = (textBox.textBox.y - (((textBox.height - _local4) / 2) * 1.2)); if (_arg2 == -1){ textBox.textBox.text1.tf_text.width = (textBox.textBox.text1.tf_text.textWidth + 5); textBox.textBox.text1.tf_text.x = -((textBox.textBox.text1.tf_text.width / 2)); textBox.textBox.text2.tf_text.width = (textBox.textBox.text2.tf_text.textWidth + 5); textBox.textBox.text2.tf_text.x = -((textBox.textBox.text2.tf_text.width / 2)); }; if (_arg2 == -1){ button.width = (textBox.width + 30); } else { button.width = _arg2; }; if (_arg3 == -1){ button.height = (textBox.height + 10); } else { button.height = _arg3; }; } function frame15(){ stop(); } function frame10(){ button.gotoAndStop("down"); } } }//package MCMenuExport_flaSection 129//MCCancelButton_38 (MCMenuExport_fla.MCCancelButton_38) package MCMenuExport_fla { import flash.display.*; public dynamic class MCCancelButton_38 extends MovieClip { public function MCCancelButton_38(){ addFrameScript(4, frame5, 13, frame14, 18, frame19); } function frame5(){ stop(); } function frame19(){ stop(); } function frame14(){ stop(); } } }//package MCMenuExport_flaSection 130//MCComfirmButton_11 (MCMenuExport_fla.MCComfirmButton_11) package MCMenuExport_fla { import flash.display.*; public dynamic class MCComfirmButton_11 extends MovieClip { public function MCComfirmButton_11(){ addFrameScript(4, frame5, 13, frame14, 18, frame19, 30, frame31, 36, frame37); } function frame14(){ stop(); } function frame37(){ gotoAndStop("out"); } function frame19(){ stop(); } function frame5(){ stop(); } function frame31(){ stop(); } } }//package MCMenuExport_flaSection 131//MCMenuButton_Play_54 (MCMenuExport_fla.MCMenuButton_Play_54) package MCMenuExport_fla { import flash.display.*; public dynamic class MCMenuButton_Play_54 extends MovieClip { public var icon1:MovieClip; public var textBox:MCHeader; public function MCMenuButton_Play_54(){ addFrameScript(0, frame1, 3, frame4, 8, frame9, 14, frame15); } function frame15(){ stop(); } function frame9(){ stop(); } function frame1(){ } function frame4(){ stop(); } public function setText(_arg1:String){ textBox.setText(_arg1, "center", 180); } } }//package MCMenuExport_flaSection 132//MCPostGameExitButton_26 (MCMenuExport_fla.MCPostGameExitButton_26) package MCMenuExport_fla { import flash.display.*; public dynamic class MCPostGameExitButton_26 extends MovieClip { public function MCPostGameExitButton_26(){ addFrameScript(4, frame5, 13, frame14, 18, frame19); } function frame5(){ stop(); } function frame19(){ stop(); } function frame14(){ stop(); } } }//package MCMenuExport_flaSection 133//MCPostGameReplayButton_25 (MCMenuExport_fla.MCPostGameReplayButton_25) package MCMenuExport_fla { import flash.display.*; public dynamic class MCPostGameReplayButton_25 extends MovieClip { public function MCPostGameReplayButton_25(){ addFrameScript(4, frame5, 13, frame14, 18, frame19, 30, frame31, 36, frame37); } function frame14(){ stop(); } function frame37(){ gotoAndStop("out"); } function frame19(){ stop(); } function frame5(){ stop(); } function frame31(){ stop(); } } }//package MCMenuExport_flaSection 134//MCScrollButtonCenter_42 (MCMenuExport_fla.MCScrollButtonCenter_42) package MCMenuExport_fla { import flash.display.*; public dynamic class MCScrollButtonCenter_42 extends MovieClip { public var button:MovieClip; public function MCScrollButtonCenter_42(){ addFrameScript(8, frame9, 19, frame20, 34, frame35); } function frame20(){ stop(); } function frame9(){ stop(); } function frame35(){ stop(); } } }//package MCMenuExport_flaSection 135//MCScrollButtonDown_43 (MCMenuExport_fla.MCScrollButtonDown_43) package MCMenuExport_fla { import flash.display.*; public dynamic class MCScrollButtonDown_43 extends MovieClip { public var button:MovieClip; public function MCScrollButtonDown_43(){ addFrameScript(8, frame9, 19, frame20, 34, frame35); } function frame20(){ stop(); } function frame9(){ stop(); } function frame35(){ stop(); } } }//package MCMenuExport_flaSection 136//MCScrollButtonGfx_41 (MCMenuExport_fla.MCScrollButtonGfx_41) package MCMenuExport_fla { import flash.display.*; public dynamic class MCScrollButtonGfx_41 extends MovieClip { public function MCScrollButtonGfx_41(){ addFrameScript(8, frame9, 19, frame20); } function frame20(){ stop(); } function frame9(){ stop(); } } }//package MCMenuExport_flaSection 137//MCScrollButtonUp_40 (MCMenuExport_fla.MCScrollButtonUp_40) package MCMenuExport_fla { import flash.display.*; public dynamic class MCScrollButtonUp_40 extends MovieClip { public var button:MovieClip; public function MCScrollButtonUp_40(){ addFrameScript(8, frame9, 19, frame20, 34, frame35); } function frame20(){ stop(); } function frame9(){ stop(); } function frame35(){ stop(); } } }//package MCMenuExport_flaSection 138//MCStaticButton_19 (MCMenuExport_fla.MCStaticButton_19) package MCMenuExport_fla { import flash.display.*; public dynamic class MCStaticButton_19 extends MovieClip { public function MCStaticButton_19(){ addFrameScript(8, frame9, 19, frame20); } function frame20(){ stop(); } function frame9(){ stop(); } } }//package MCMenuExport_flaSection 139//MCStaticHomeButton_18 (MCMenuExport_fla.MCStaticHomeButton_18) package MCMenuExport_fla { import flash.display.*; public dynamic class MCStaticHomeButton_18 extends MovieClip { public var button:MovieClip; public function MCStaticHomeButton_18(){ addFrameScript(8, frame9, 19, frame20, 34, frame35); } function frame20(){ stop(); } function frame9(){ stop(); } function frame35(){ stop(); } } }//package MCMenuExport_flaSection 140//MCStaticMusicButton_22 (MCMenuExport_fla.MCStaticMusicButton_22) package MCMenuExport_fla { import flash.display.*; public dynamic class MCStaticMusicButton_22 extends MovieClip { public var button:MovieClip; public function MCStaticMusicButton_22(){ addFrameScript(8, frame9, 19, frame20, 34, frame35); } function frame20(){ stop(); } function frame9(){ stop(); } function frame35(){ stop(); } } }//package MCMenuExport_flaSection 141//MCStaticQualityButton_20 (MCMenuExport_fla.MCStaticQualityButton_20) package MCMenuExport_fla { import flash.display.*; public dynamic class MCStaticQualityButton_20 extends MovieClip { public var button:MovieClip; public function MCStaticQualityButton_20(){ addFrameScript(8, frame9, 19, frame20, 34, frame35); } function frame20(){ stop(); } function frame9(){ stop(); } function frame35(){ stop(); } } }//package MCMenuExport_flaSection 142//MCStaticSoundButton_21 (MCMenuExport_fla.MCStaticSoundButton_21) package MCMenuExport_fla { import flash.display.*; public dynamic class MCStaticSoundButton_21 extends MovieClip { public var button:MovieClip; public function MCStaticSoundButton_21(){ addFrameScript(8, frame9, 19, frame20, 34, frame35); } function frame20(){ stop(); } function frame9(){ stop(); } function frame35(){ stop(); } } }//package MCMenuExport_flaSection 143//shopArrowRight_12 (MCMenuExport_fla.shopArrowRight_12) package MCMenuExport_fla { import flash.display.*; public dynamic class shopArrowRight_12 extends MovieClip { public function shopArrowRight_12(){ addFrameScript(3, frame4, 8, frame9, 14, frame15); } function frame15(){ stop(); } function frame9(){ stop(); } function frame4(){ stop(); } } }//package MCMenuExport_flaSection 144//bg_bricks_3 (MCTowerExport_fla.bg_bricks_3) package MCTowerExport_fla { import flash.display.*; public dynamic class bg_bricks_3 extends MovieClip { public function bg_bricks_3(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MCTowerExport_flaSection 145//mp3 (menu.mp3) package menu { import flash.media.*; public dynamic class mp3 extends Sound { } }//package menuSection 146//wav (mouseclick.wav) package mouseclick { import flash.media.*; public dynamic class wav extends Sound { } }//package mouseclickSection 147//wav (mouseout.wav) package mouseout { import flash.media.*; public dynamic class wav extends Sound { } }//package mouseoutSection 148//wav (mouseover.wav) package mouseover { import flash.media.*; public dynamic class wav extends Sound { } }//package mouseoverSection 149//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.2.0.3958"; 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.coreSection 150//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; } }//package mx.coreSection 151//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.2.0.3958"; 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.coreSection 152//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.coreSection 153//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.display.*; import flash.events.*; 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.coreSection 154//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.coreSection 155//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.coreSection 156//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import flash.utils.*; import mx.core.*; public class NameUtil { mx_internal static const VERSION:String = "3.2.0.3958"; 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.utilsSection 157//CPxAnimation (pixelizer.core.repository.CPxAnimation) package pixelizer.core.repository { public class CPxAnimation { public var label:String;// = "" public var params:Object;// = null public var frameSequence:Array;// = null public static const ANIMATION_STOP:int = 2; public static const ANIMATION_GOTO:int = 3; public static const ANIMATION_LOOP:int = 1; public function CPxAnimation(_arg1:String, _arg2:Array, _arg3:Object=null){ label = _arg1; frameSequence = _arg2; params = ((_arg3 == null)) ? new Object() : _arg3; if (params.onComplete == undefined){ params.onComplete = ANIMATION_STOP; }; } public function destroy():void{ frameSequence = null; params = null; } public function toString():String{ return ((((("[ " + label) + ": ") + frameSequence) + " ]")); } } }//package pixelizer.core.repositorySection 158//CPxFont (pixelizer.core.repository.CPxFont) package pixelizer.core.repository { import flash.display.*; import flash.geom.*; public class CPxFont { private var _glyphs:Array; private var _maxHeight:int;// = 0 private var _glyphString:String; private static var ZERO_POINT:Point = new Point(); public static var DEFAULT_FONT:String = "DEFAULT_FONT"; public function CPxFont(_arg1:BitmapData, _arg2:String){ var _local4:uint; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:BitmapData; super(); _glyphs = []; _glyphString = _arg2; var _local3:int; while (_local3 < 0x0100) { _glyphs.push(null); _local3++; }; if (_arg1 != null){ _local4 = _arg1.getPixel(0, 0); _local5 = 0; _local6 = 0; while (_local6 < _arg1.height) { _local7 = 0; _local8 = 0; while (_local8 < _arg1.width) { if (_arg1.getPixel(_local8, _local6) != _local4){ _local9 = _local8; _local10 = _local6; while (_arg1.getPixel(_local9, _local6) != _local4) { _local9++; }; while (_arg1.getPixel(_local8, _local10) != _local4) { _local10++; }; _local11 = (_local9 - _local8); _local12 = (_local10 - _local6); _local13 = new BitmapData(_local11, _local12, true, 0); _local13.copyPixels(_arg1, new Rectangle(_local8, _local6, _local11, _local12), ZERO_POINT, null, null, true); setGlyph(_glyphString.charCodeAt(_local5), _local13); _local5++; if (_local12 > _local7){ _local7 = _local12; }; if (_local12 > _maxHeight){ _maxHeight = _local12; }; _local8 = (_local8 + _local11); }; _local8++; }; _local6 = (_local6 + _local7); _local6++; }; }; } public function destroy():void{ var _local1:BitmapData; var _local2:int; while (_local2 < _glyphs.length) { _local1 = _glyphs[_local2]; if (_local1 != null){ _glyphs[_local2].dispose(); }; _local2++; }; _glyphs = null; } public function getTextWidth(_arg1:String):int{ var _local4:int; var _local5:BitmapData; var _local2:int; var _local3:int; while (_local3 < _arg1.length) { _local4 = _arg1.charCodeAt(_local3); _local5 = _glyphs[_local4]; if (_local5 != null){ _local2 = (_local2 + _local5.width); }; _local3++; }; return (_local2); } public function getTextHeight(_arg1:String):int{ return (_maxHeight); } public function setGlyph(_arg1:int, _arg2:BitmapData):void{ if (_glyphs[_arg1] != null){ _glyphs[_arg1].dispose(); }; _glyphs[_arg1] = _arg2; if (_arg2.height > _maxHeight){ _maxHeight = _arg2.height; }; } public function render(_arg1:BitmapData, _arg2:String):void{ var _local5:int; var _local6:BitmapData; var _local3:Point = new Point(); _arg1.fillRect(_arg1.rect, 0); var _local4:int; while (_local4 < _arg2.length) { _local5 = _arg2.charCodeAt(_local4); _local6 = _glyphs[_local5]; if (_local6 != null){ _arg1.copyPixels(_local6, _local6.rect, _local3, null, null, true); _local3.x = (_local3.x + _local6.width); }; _local4++; }; } } }//package pixelizer.core.repositorySection 159//CPxFrames (pixelizer.core.repository.CPxFrames) package pixelizer.core.repository { import flash.display.*; import pixelizer.render.*; import pixelizer.logging.*; public class CPxFrames { private var _availableFlips:int; public var frames:Array;// = null public var vFlipFrames:Array;// = null private var _animations:Object;// = null public var hFlipFrames:Array;// = null public function CPxFrames(){ _availableFlips = CPxSprite.NO_FLIP; super(); frames = new Array(); hFlipFrames = new Array(); vFlipFrames = new Array(); _animations = new Object(); } public function addAnimation(_arg1:CPxAnimation):void{ if (_animations[_arg1.label] != undefined){ _arg1.destroy(); } else { _animations[_arg1.label] = _arg1; }; } public function hasAnimation(_arg1:String):Boolean{ return (!((_animations[_arg1] == undefined))); } public function getAnimation(_arg1:String):CPxAnimation{ if (_animations[_arg1] == undefined){ CPxLog.log((("no such animation '" + _arg1) + "'"), this, CPxLog.LOG_WARNING); }; return (_animations[_arg1]); } public function addAvailableFlip(_arg1:int):void{ _availableFlips = (_availableFlips | _arg1); } public function destroy():void{ var _local1:int; var _local2:CPxAnimation; _local1 = 0; while (_local1 < frames.length) { (frames[_local1] as BitmapData).dispose(); _local1++; }; _local1 = 0; while (_local1 < hFlipFrames.length) { (hFlipFrames[_local1] as BitmapData).dispose(); _local1++; }; _local1 = 0; while (_local1 < vFlipFrames.length) { (vFlipFrames[_local1] as BitmapData).dispose(); _local1++; }; frames = null; hFlipFrames = null; vFlipFrames = null; for each (_local2 in _animations) { _local2.destroy(); }; _animations = null; } public function get availableFlips():int{ return (_availableFlips); } public function createDefaultAnimation():void{ var _local1:Array = []; var _local2:int; while (_local2 < frames.length) { _local1.push(_local2); _local2++; }; var _local3:CPxAnimation = new CPxAnimation(CPxSprite.DEFAULT_ANIMATION, _local1, {onComplete:CPxAnimation.ANIMATION_STOP}); addAnimation(_local3); } } }//package pixelizer.core.repositorySection 160//CPxRepository (pixelizer.core.repository.CPxRepository) package pixelizer.core.repository { import flash.display.*; import pixelizer.render.*; import flash.geom.*; import pixelizer.utils.*; import pixelizer.*; import pixelizer.logging.*; public class CPxRepository { private var _framesRepository:Object; private var _fontRepository:Object; private var _transparentFrames:Boolean;// = true private static var _instance:CPxRepository; public function CPxRepository(_arg1:SingletonEnforcer){ _framesRepository = new Object(); _fontRepository = new Object(); } public function disposeAll(_arg1:Boolean=true):void{ var _local2:CPxFrames; var _local3:CPxFont; for each (_local2 in _framesRepository) { _local2.destroy(); }; _framesRepository = new Object(); for each (_local3 in _fontRepository) { _local3.destroy(); }; _fontRepository = new Object(); if (_arg1){ createPixelizerFrames("PIXELIZER_LOGO", CPxLogoCreator.createLogoBitmap()); setPixelizerFont(CPxFont.DEFAULT_FONT, CPxDefaultFontCreator.createDefaultFont()); }; } private function generateFlippedBitmapData(_arg1:CPxFrames, _arg2:int):void{ var _local3:BitmapData; var _local4:Matrix; var _local6:BitmapData; var _local5:int; while (_local5 < _arg1.frames.length) { _local6 = _arg1.frames[_local5]; if ((_arg2 & CPxSprite.HORIZONTAL_FLIP)){ _local3 = new BitmapData(_local6.width, _local6.height, _transparentFrames, 0); _local4 = new Matrix(-1, 0, 0, 1, _local6.width, 0); _local3.draw(_local6, _local4); _arg1.hFlipFrames.push(_local3); _arg1.addAvailableFlip(CPxSprite.HORIZONTAL_FLIP); }; if ((_arg2 & CPxSprite.VERTICAL_FLIP)){ _local3 = new BitmapData(_local6.width, _local6.height, _transparentFrames, 0); _local4 = new Matrix(1, 0, 0, -1, 0, _local6.height); _local3.draw(_local6, _local4); _arg1.vFlipFrames.push(_local3); _arg1.addAvailableFlip(CPxSprite.VERTICAL_FLIP); }; _local5++; }; } public function setPixelizerFrames(_arg1:String, _arg2:CPxFrames):void{ if (_framesRepository[_arg1] != undefined){ if (_arg1 != "PIXELIZER_LOGO"){ _framesRepository[_arg1].destroy(); }; }; if (_arg1 != "PIXELIZER_LOGO"){ _framesRepository[_arg1] = _arg2; }; } private function createSheetSprites(_arg1:String, _arg2:CPxSpriteSheet):CPxFrames{ var _local6:Boolean; var _local7:int; var _local8:int; var _local9:int; var _local3:CPxFrames = new CPxFrames(); var _local4:BitmapData; var _local5:BitmapData; _local5 = _arg2.bitmapData; if (_local5 != null){ _local6 = false; _local7 = 0; _local8 = 0; _local9 = 0; while (!(_local6)) { _local4 = new BitmapData(_arg2.spriteWidth, _arg2.spriteHeight, _transparentFrames, 0); _local4.copyPixels(_local5, new Rectangle(_local7, _local8, _arg2.spriteWidth, _arg2.spriteHeight), new Point()); _local3.frames.push(_local4); if ((_local7 + _arg2.spriteWidth) < _local5.width){ _local7 = (_local7 + _arg2.spriteWidth); } else { _local7 = 0; if ((_local8 + _arg2.spriteHeight) < _local5.height){ _local8 = (_local8 + _arg2.spriteHeight); } else { _local6 = true; }; }; _local9++; }; } else { CPxLog.log("failed to create sheet data", this, CPxLog.LOG_ERROR); }; return (_local3); } public function createPixelizerFrames(_arg1:String, _arg2:DisplayObject, _arg3:int=0):CPxFrames{ var _local4:CPxFrames; var _local5:String; var _local6:int; var _local7:int; var _local8:Rectangle; var _local9:Number; var _local10:Number; var _local11:BitmapData; var _local12:BitmapData; if (_framesRepository[_arg1] != undefined){ CPxLog.log((("'" + _arg1) + "' already defined, overwriting"), this, CPxLog.LOG_WARNING); }; if ((_arg2 is CPxSpriteSheet)){ _local4 = createSheetSprites(_arg1, (_arg2 as CPxSpriteSheet)); } else { _local4 = new CPxFrames(); if ((_arg2 is MovieClip)){ _local7 = MovieClip(_arg2).totalFrames; _local6 = 1; while (_local6 <= _local7) { MovieClip(_arg2).gotoAndStop(_local6); _local8 = _arg2.getBounds(_arg2); _local9 = (_local8.x + _local8.width); _local10 = (_local8.y + _local8.height); _local11 = new BitmapData(_local9, _local10, _transparentFrames, 0); _local11.draw(_arg2); _local4.frames.push(_local11); _local6++; }; } else { if ((((_arg2.width == 0)) || ((_arg2.height == 0)))){ CPxLog.log((("invalid dimensions in '" + _arg1) + "'"), this, CPxLog.LOG_ERROR); }; _local12 = new BitmapData(_arg2.width, _arg2.height, _transparentFrames, 0); _local12.draw(_arg2); _local4.frames.push(_local12); }; }; if ((_arg3 & CPxSprite.HORIZONTAL_FLIP)){ generateFlippedBitmapData(_local4, CPxSprite.HORIZONTAL_FLIP); }; if ((_arg3 & CPxSprite.VERTICAL_FLIP)){ generateFlippedBitmapData(_local4, CPxSprite.VERTICAL_FLIP); }; _local4.createDefaultAnimation(); _framesRepository[_arg1] = _local4; CPxLog.log(((((((("id " + _arg1) + " with ") + _local4.frames.length) + " frames created (") + ((_arg3 & CPxSprite.VERTICAL_FLIP)) ? "v" : "") + ((_arg3 & CPxSprite.HORIZONTAL_FLIP)) ? "h" : "") + ")"), this); return (_local4); } public function setPixelizerFont(_arg1:String, _arg2:CPxFont):void{ if (_fontRepository[_arg1] != undefined){ _fontRepository[_arg1].destroy(); }; _fontRepository[_arg1] = _arg2; } public function getPixelizerFrames(_arg1:String):CPxFrames{ return (_framesRepository[_arg1]); } public function createPixelizerFont(_arg1:String, _arg2:Bitmap, _arg3:String):void{ var _local4:CPxFont = new CPxFont(_arg2.bitmapData, _arg3); _fontRepository[_arg1] = _local4; } public function destroy():void{ disposeAll(false); _instance = null; _framesRepository = null; _fontRepository = null; } public function getPixelizerFont(_arg1:String):CPxFont{ if (_fontRepository[_arg1] == null){ CPxLog.log((("no such font '" + _arg1) + "'"), this, CPxLog.LOG_WARNING); }; return (_fontRepository[_arg1]); } public function isAvailable(_arg1:String):Boolean{ return ((_framesRepository[_arg1] == undefined)); } public static function getInstance():CPxRepository{ if (CPxRepository._instance == null){ CPxRepository._instance = new CPxRepository(new SingletonEnforcer()); if (!CPxPixelizer.isInitialized()){ CPxPixelizer.init(); }; }; return (CPxRepository._instance); } } }//package pixelizer.core.repository class SingletonEnforcer { private function SingletonEnforcer(){ } }Section 161//CPxLog (pixelizer.logging.CPxLog) package pixelizer.logging { public class CPxLog { public static var LOG_WARNING:int = 2; public static var LOG_INFO:int = 1; public static var LOG_ERROR:int = 3; private static var _logLevelNames:Array = [" ", "---", "!!!", "***"]; public static var LOG_DEBUG:int = 0; private static var _logFunctions:Array = [trace]; private static var _logLevel:int = 0; public static function log(_arg1:String, _arg2:Object=null, _arg3:int=0):void{ var _local4:String; var _local5:String; var _local6:Function; var _local7:String; var _local8:int; var _local9:int; if (_arg3 >= _logLevel){ _local4 = " ? "; if (_arg2 != null){ _local7 = ("" + _arg2); _local8 = (_local7.indexOf(" ") + 1); _local9 = _local7.indexOf("]"); _local4 = _local7.slice(_local8, _local9); }; _local5 = ((((_logLevelNames[_arg3] + " [") + _local4) + "] ") + _arg1); for each (_local6 in _logFunctions) { _local6(_local5); }; }; } public static function removeLogFunction(_arg1:Function):void{ var _local2:int = _logFunctions.indexOf(_arg1); if (_local2 > -1){ _logFunctions.splice(_local2, 1); }; } public static function addLogFunction(_arg1:Function):void{ _logFunctions.push(_arg1); } public static function setVerbosityLevel(_arg1:int):void{ _logLevel = _arg1; } } }//package pixelizer.loggingSection 162//CPxMath (pixelizer.math.CPxMath) package pixelizer.math { import flash.geom.*; public class CPxMath { public static function rad2deg(_arg1:Number):Number{ return (((_arg1 * 180) / Math.PI)); } private static function d2h(_arg1:int):String{ var _local2:Array = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; if ((((_arg1 < 0)) || ((_arg1 > 15)))){ return ("0"); }; return (_local2[_arg1]); } public static function hex2dec(_arg1:String):int{ var _local2:int = _arg1.length; var _local3:int; var _local4:int; var _local5:int = (_local2 - 1); while (_local5 >= 0) { _local4 = (_local4 + (h2d(_arg1.substr(_local5, 1)) * Math.pow(16, _local3))); _local3++; _local5--; }; return (_local4); } public static function getYAxis(_arg1:Matrix):Point{ return (new Point(_arg1.b, _arg1.d)); } public static function getXAxis(_arg1:Matrix):Point{ return (new Point(_arg1.a, _arg1.c)); } public static function deg2rad(_arg1:Number):Number{ return (((_arg1 * Math.PI) / 180)); } public static function sgn(_arg1:Number):int{ if (_arg1 > 0){ return (1); }; if (_arg1 < 0){ return (-1); }; return (0); } public static function dec2hex(_arg1:int):String{ var _local3:int; var _local2 = ""; while (_arg1 > 0) { _local3 = (_arg1 % 16); _local2 = (d2h(_local3) + _local2); _arg1 = (_arg1 - _local3); _arg1 = (_arg1 / 16); }; return (_local2); } private static function h2d(_arg1:String):int{ var _local2:Array = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; var _local3:int = _local2.indexOf(_arg1.toUpperCase()); if (_local3 == -1){ return (0); }; return (_local3); } public static function dot2d(_arg1:Point, _arg2:Point):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } } }//package pixelizer.mathSection 163//CPxParticle (pixelizer.particles.CPxParticle) package pixelizer.particles { import pixelizer.render.*; import flash.geom.*; public class CPxParticle extends CPxSprite { protected var _lifeTime:Number;// = 10 public var velocity:Point;// = null public function CPxParticle(_arg1:String, _arg2:Number=10){ super(_arg1); _lifeTime = _arg2; velocity = new Point(); } public function get isAlive():Boolean{ return ((_lifeTime > 0)); } override public function update(_arg1:Number=1):void{ position.x = (position.x + (velocity.x * _arg1)); position.y = (position.y + (velocity.y * _arg1)); _lifeTime = (_lifeTime - _arg1); super.update(_arg1); } } }//package pixelizer.particlesSection 164//CPxParticleHandler (pixelizer.particles.CPxParticleHandler) package pixelizer.particles { public class CPxParticleHandler { private var _numActiveParticles:int;// = 0 private var _particles:Array; public function CPxParticleHandler(){ _particles = new Array(); super(); } public function get numParticles():int{ return (_numActiveParticles); } public function update(_arg1:Number=1):void{ var _local2:int; var _local3:CPxParticle; var _local4:Boolean; while (_local2 < _numActiveParticles) { _local3 = _particles[_local2]; _local3.update(_arg1); if (!_local3.isAlive){ if (_local3.pxParent != null){ _local3.pxParent.removeChild(_local3); }; _particles[_local2] = null; _particles.splice(_local2, 1); _local3.destroy(); _numActiveParticles--; } else { _local2++; }; }; } public function registerParticle(_arg1:CPxParticle):void{ _particles[_numActiveParticles] = _arg1; _numActiveParticles++; } public function destroy():void{ var _local2:CPxParticle; var _local1:int; while (_particles.length > 0) { _local2 = _particles[_local1]; if (_local2.pxParent != null){ _local2.pxParent.removeChild(_local2); _local2.destroy(); }; delete _particles[_local1]; _particles.splice(_local1, 1); }; _particles = null; } } }//package pixelizer.particlesSection 165//CPxBBox (pixelizer.physics.collision.CPxBBox) package pixelizer.physics.collision { import flash.geom.*; public class CPxBBox { public var width:Number; public var height:Number; public var bottom:Number; public var top:Number; public var left:Number; public var x:Number; public var y:Number; public var right:Number; public function CPxBBox(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ x = _arg1; y = _arg2; width = _arg3; height = _arg4; top = y; left = x; right = (left + width); bottom = (top + height); } public function overlaps(_arg1:CPxBBox, _arg2:Point):Boolean{ if ((x + width) < (_arg1.x + _arg2.x)){ return (false); }; if ((_arg1.x + _arg1.width) < (x - _arg2.x)){ return (false); }; if ((y + height) < (_arg1.y + _arg2.y)){ return (false); }; if ((_arg1.y + _arg1.height) < (y - _arg2.y)){ return (false); }; return (true); } } }//package pixelizer.physics.collisionSection 166//CPxCollisionMap (pixelizer.physics.collision.CPxCollisionMap) package pixelizer.physics.collision { import flash.display.*; import pixelizer.render.*; import pixelizer.logging.*; public class CPxCollisionMap { private var _height:int; private var _width:int; private var _solidTile:CPxCollisionTile; private var _tiles:Array; private var _needsDebugDrawUpdate:Boolean; private var _tileClass:Class; private var _tileSize:int; public function CPxCollisionMap(_arg1:int, _arg2:int, _arg3:int, _arg4:Class){ _tileClass = _arg4; _tileSize = _arg3; _solidTile = new _tileClass(CPxCollisionTile.TILE_COLLISION_SOLID); reset(_arg1, _arg2); } private function drawDebugUsingSprite(_arg1:Sprite, _arg2:Boolean):void{ var _local6:int; var _local7:int; var _local8:int; var _local9:CPxCollisionTile; var _local3:Number = 0; var _local4:Graphics = _arg1.graphics; _local4.clear(); var _local5:int; for (;_local5 < _height;_local5++) { _local6 = (_local5 * _tileSize); if (_arg2){ if ((_local6 + 32) < -(_arg1.y)){ continue; }; //unresolved if } else { _local7 = 0; while (_local7 < _width) { _local8 = (_local7 * _tileSize); if (_arg2){ if ((_local8 + 32) < -(_arg1.x)){ break; }; //unresolved if } else { _local9 = getTile(_local7, _local5); if (_local9.collisionType != CPxCollisionTile.TILE_COLLISION_NONE){ switch (_local9.collisionType){ case CPxCollisionTile.TILE_COLLISION_SOLID: _local4.lineStyle(0, 0xAA00AA, 1); break; case CPxCollisionTile.TILE_COLLISION_JUMP_THROUGH: _local4.lineStyle(0, 0xAAAA, 1); break; }; switch (_local9.collisionShape){ case CPxCollisionTile.SHAPE_FULL_SQUARE: _local4.drawRect((_local8 + _local3), (_local6 + _local3), (_tileSize - _local3), (_tileSize - _local3)); break; case CPxCollisionTile.SHAPE_SLOPE_45_BR: _local4.moveTo(((_local8 + tileSize) - _local3), ((_local6 + tileSize) - _local3)); _local4.lineTo(((_local8 + tileSize) - _local3), (_local6 + _local3)); _local4.lineTo((_local8 + _local3), ((_local6 + tileSize) - _local3)); _local4.lineTo(((_local8 + tileSize) - _local3), ((_local6 + tileSize) - _local3)); break; case CPxCollisionTile.SHAPE_SLOPE_45_BL: _local4.moveTo((_local8 + _local3), ((_local6 + tileSize) - _local3)); _local4.lineTo((_local8 + _local3), (_local6 + _local3)); _local4.lineTo(((_local8 + tileSize) - _local3), ((_local6 + tileSize) - _local3)); _local4.lineTo((_local8 + _local3), ((_local6 + tileSize) - _local3)); break; }; }; }; _local7++; }; }; }; } public function get width():int{ return (_width); } public function get tileSize():int{ return (_tileSize); } public function reset(_arg1:int, _arg2:int):void{ _width = _arg1; _height = _arg2; _tiles = new Array(); var _local3:int; while (_local3 < (_width * _height)) { _tiles.push(new _tileClass(CPxCollisionTile.TILE_COLLISION_NONE)); _local3++; }; _needsDebugDrawUpdate = true; } public function getTile(_arg1:int, _arg2:int):CPxCollisionTile{ if ((((((((_arg1 < 0)) || ((_arg1 >= _width)))) || ((_arg2 < 0)))) || ((_arg2 >= _height)))){ CPxLog.log((((("tile pos out of bounds (" + _arg1) + ",") + _arg2) + ")"), this, CPxLog.LOG_WARNING); return (_solidTile); }; return (_tiles[(_arg1 + (_arg2 * _width))]); } public function get height():int{ return (_height); } public function shouldDoDebugDrawUpdate():void{ _needsDebugDrawUpdate = true; } public function drawDebug(_arg1, _arg2:Boolean=true):void{ if ((_arg1 is Sprite)){ drawDebugUsingSprite(_arg1, _arg2); } else { drawDebugUsingRenderer(_arg1); }; } private function drawDebugUsingRenderer(_arg1:CPxRenderer):void{ var _local3:CPxSprite; var _local4:CPxSprite; var _local5:CPxCollisionTile; var _local6:int; var _local7:int; if (!_needsDebugDrawUpdate){ return; }; _needsDebugDrawUpdate = false; var _local2:Array = new Array(); for each (_local3 in _arg1.children) { _local2.push(_local3); }; for each (_local3 in _local2) { _local3.destroy(); }; _arg1.children.splice(0, _arg1.children.length); _local6 = 0; while (_local6 < _height) { _local7 = 0; while (_local7 < _width) { _local5 = getTile(_local7, _local6); if (_local5.collisionType != CPxCollisionTile.TILE_COLLISION_NONE){ _local4 = new CPxSprite(((("__collision_" + _local5.collisionType) + "_") + _local5.collisionShape)); _local4.position.x = (_local7 * _tileSize); _local4.position.y = (_local6 * _tileSize); _arg1.addChild(_local4); }; _local7++; }; _local6++; }; } public function destroy():void{ _tiles = null; _solidTile = null; _tileClass = null; } } }//package pixelizer.physics.collisionSection 167//CPxCollisionSolver (pixelizer.physics.collision.CPxCollisionSolver) package pixelizer.physics.collision { import pixelizer.render.*; import flash.geom.*; import pixelizer.physics.*; public class CPxCollisionSolver { public static const COLLISION_ALL:int = 15; public static const COLLISION_LEFT:int = 4; public static const HORIZONTAL:int = 1; public static const COLLISION_TOP:int = 2; public static const BOUNDING_BOX:int = 1; public static const NO_COLLISION:int = 0; public static const VERTICAL:int = 2; public static const COLLISION_BOTTOM:int = 1; public static const PIXEL_PERFECT:int = 2; public static const COLLISION_RIGHT:int = 8; private static var _pointB:Point = new Point(); private static var _pointA:Point = new Point(); protected function checkUpDown(_arg1:CPxCollisionMap, _arg2:CPxBody):int{ var _local3:int; var _local4:int; var _local5:int; var _local6:Number; var _local11:CPxCollisionTile; var _local12:Boolean; var _local7:Boolean; var _local8:Boolean; var _local9:int; _local3 = ((_arg2.position.y + _arg2.boundingBox.y) / _arg1.tileSize); _local4 = ((_arg2.position.y + _arg2.boundingBox.bottom) / _arg1.tileSize); _local6 = (_arg2.boundingBox.width / Math.ceil((_arg2.boundingBox.width / _arg1.tileSize))); var _local10:Number = 0; while ((((_local10 <= _arg2.boundingBox.width)) && (!(_local7)))) { _local5 = Math.floor((((_arg2.position.x + _arg2.boundingBox.x) + _local10) / _arg1.tileSize)); if (_arg2.velocity.y >= 0){ _local11 = _arg1.getTile(_local5, _local4); if ((_arg2.downCollisionFlags & _local11.collisionType) > 0){ _local12 = true; if (((((((_arg2.upCollisionFlags & _arg1.getTile(_local5, _local3).collisionType) == 0)) && ((_arg2.location == CPxBody.IN_AIR)))) && ((_arg2.lastTileY >= _local4)))){ _local12 = false; }; if (_local12){ if (_arg2.location != CPxBody.ON_GROUND){ _arg2.position.y = (_local4 * _arg1.tileSize); _local9 = (_local9 | COLLISION_BOTTOM); }; _local7 = true; _local8 = false; }; } else { _local8 = true; }; } else { if ((_arg2.upCollisionFlags & _arg1.getTile(_local5, _local3).collisionType) > 0){ _arg2.position.y = (((_local3 + 1) * _arg1.tileSize) - _arg2.boundingBox.y); _local9 = (_local9 | COLLISION_TOP); }; }; _local10 = (_local10 + _local6); }; if (((_local8) && ((_arg2.location == CPxBody.ON_GROUND)))){ _arg2.location = CPxBody.IN_AIR; }; _arg2.lastTileY = _local4; return (_local9); } public function isInside(_arg1:CPxRenderObject, _arg2:Point, _arg3:int=1):Boolean{ switch (_arg3){ case BOUNDING_BOX: if (_arg2.x < (_arg1.position.x - _arg1.hotspot.x)){ return (false); }; if (_arg2.x > ((_arg1.position.x - _arg1.hotspot.x) + _arg1.bitmapData.width)){ return (false); }; if (_arg2.y < (_arg1.position.y - _arg1.hotspot.y)){ return (false); }; if (_arg2.y > ((_arg1.position.y - _arg1.hotspot.y) + _arg1.bitmapData.height)){ return (false); }; return (true); case PIXEL_PERFECT: if (isInside(_arg1, _arg2, BOUNDING_BOX)){ return (!((0 == _arg1.bitmapData.getPixel((_arg2.x - (_arg1.position.x - _arg1.hotspot.x)), (_arg2.y - (_arg1.position.y - _arg1.hotspot.y)))))); }; return (false); }; return (false); } public function body2collisionMap(_arg1:CPxBody, _arg2:CPxCollisionMap, _arg3:int):void{ var _local4:int = _arg1.location; var _local5:int; if (_arg3 == HORIZONTAL){ _local5 = (_local5 | checkLeftRight(_arg2, _arg1)); }; if (_arg3 == VERTICAL){ _local5 = (_local5 | checkUpDown(_arg2, _arg1)); }; if (_local5 != 0){ _arg1.onCollision(_local5); }; if (_local4 != _arg1.location){ if ((((_local4 == CPxBody.ON_GROUND)) && ((_arg1.location == CPxBody.IN_AIR)))){ _arg1.onFall(); }; }; } public function collides(_arg1:CPxSprite, _arg2:CPxSprite, _arg3:int=1):Boolean{ switch (_arg3){ case BOUNDING_BOX: if (((_arg1.position.x - _arg1.hotspot.x) + _arg1.bitmapData.width) < (_arg2.position.x - _arg2.hotspot.x)){ return (false); }; if ((_arg1.position.x - _arg1.hotspot.x) > ((_arg2.position.x - _arg2.hotspot.x) + _arg2.bitmapData.width)){ return (false); }; if (((_arg1.position.y - _arg1.hotspot.y) + _arg1.bitmapData.height) < (_arg2.position.y - _arg2.hotspot.y)){ return (false); }; if ((_arg1.position.y - _arg1.hotspot.y) > ((_arg2.position.y - _arg2.hotspot.y) + _arg2.bitmapData.height)){ return (false); }; return (true); case PIXEL_PERFECT: if (collides(_arg1, _arg2, BOUNDING_BOX)){ _pointA.x = (_arg1.position.x - _arg1.hotspot.x); _pointA.y = (_arg1.position.y - _arg1.hotspot.y); _pointB.x = (_arg2.position.x - _arg2.hotspot.x); _pointB.y = (_arg2.position.y - _arg2.hotspot.y); return (_arg1.bitmapData.hitTest(_pointA, 1, _arg2.bitmapData, _pointB, 1)); }; return (false); }; return (false); } protected function checkLeftRight(_arg1:CPxCollisionMap, _arg2:CPxBody):int{ var _local5:int; var _local6:int; var _local7:int; var _local8:Number; var _local9:Boolean; var _local3:Number = 2; var _local4:Number = 0.5; var _local10:int; _local6 = Math.floor((((_arg2.position.x + _arg2.boundingBox.x) - _local3) / _arg1.tileSize)); _local7 = Math.floor((((_arg2.position.x + _arg2.boundingBox.right) + _local3) / _arg1.tileSize)); _local8 = ((_arg2.boundingBox.height - (_local4 * 2)) / Math.ceil(((_arg2.boundingBox.height - (_local4 * 2)) / _arg1.tileSize))); var _local11:Number = 0; while ((((_local11 <= _arg2.boundingBox.height)) && (!(_local9)))) { _local5 = Math.floor(((((_arg2.position.y + _arg2.boundingBox.y) + _local11) + _local4) / _arg1.tileSize)); if (_arg2.velocity.x < 0){ if ((_arg2.sidewaysCollisionFlags & _arg1.getTile(_local6, _local5).collisionType) > 0){ _arg2.position.x = ((((_local6 + 1) * _arg1.tileSize) - _arg2.boundingBox.x) + _local3); _local10 = (_local10 | COLLISION_LEFT); _local9 = true; }; } else { if (_arg2.velocity.x > 0){ if ((_arg2.sidewaysCollisionFlags & _arg1.getTile(_local7, _local5).collisionType) > 0){ _arg2.position.x = ((((_local7 * _arg1.tileSize) - _arg2.boundingBox.x) - _arg2.boundingBox.width) - _local3); _local10 = (_local10 | COLLISION_RIGHT); _local9 = true; }; }; }; _local11 = (_local11 + _local8); }; return (_local10); } } }//package pixelizer.physics.collisionSection 168//CPxCollisionTile (pixelizer.physics.collision.CPxCollisionTile) package pixelizer.physics.collision { import flash.geom.*; public class CPxCollisionTile { public var size:int;// = 16 public var collisionType:int;// = 0 public var collisionShape:int;// = 0 public static const SHAPE_HALF_SQUARE_T:int = 11; public static const SHAPE_SLOPE_45_TL:int = 5; public static const SHAPE_SLOPE_45_TR:int = 4; public static const TILE_COLLISION_SOLID:int = 4; public static const SHAPE_FULL_SQUARE:int = 1; public static const SHAPE_RAISED_SLOPE_22_RB:int = 19; public static const SHAPE_SLOPE_22_LT:int = 22; public static const SHAPE_SLOPE_22_RB:int = 20; public static const SHAPE_RAISED_SLOPE_22_RT:int = 18; public static const SHAPE_RAISED_SLOPE_22_BL:int = 9; public static const SHAPE_SLOPE_22_RT:int = 17; public static const SHAPE_RAISED_SLOPE_22_BR:int = 8; public static const SHAPE_NONE:int = 0; public static const SHAPE_SLOPE_22_BL:int = 10; public static const SHAPE_SLOPE_22_BR:int = 7; public static const TILE_COLLISION_JUMP_THROUGH:int = 2; public static const SHAPE_SLOPE_45_BL:int = 3; public static const SHAPE_RAISED_SLOPE_22_TL:int = 14; public static const SHAPE_RAISED_SLOPE_22_LB:int = 24; public static const SHAPE_RAISED_SLOPE_22_TR:int = 13; public static const SHAPE_SLOPE_45_BR:int = 2; public static const SHAPE_SLOPE_22_TL:int = 15; public static const SHAPE_SLOPE_22_TR:int = 12; public static const SHAPE_HALF_SQUARE_B:int = 6; public static const SHAPE_RAISED_SLOPE_22_LT:int = 23; public static const SHAPE_SLOPE_22_LB:int = 25; public static const TILE_COLLISION_NONE:int = 1; public static const SHAPE_HALF_SQUARE_L:int = 21; public static const SHAPE_HALF_SQUARE_R:int = 16; public function CPxCollisionTile(_arg1:int){ collisionType = _arg1; } public function isInside(_arg1:int, _arg2:int):Boolean{ if (collisionShape == SHAPE_NONE){ return (false); }; if (collisionShape == SHAPE_FULL_SQUARE){ return (true); }; switch (collisionShape){ case SHAPE_SLOPE_45_BR: if (((size - _arg1) - 1) <= _arg2){ return (true); }; break; case SHAPE_SLOPE_45_BL: if (_arg1 <= _arg2){ return (true); }; break; case SHAPE_SLOPE_45_TR: if (_arg2 <= _arg1){ return (true); }; break; case SHAPE_SLOPE_45_TL: if (_arg2 <= ((size - _arg1) - 1)){ return (true); }; break; }; return (false); } public function getCorrectionVector(_arg1:int, _arg2:int, _arg3:int=0):Point{ var _local4:Point = new Point(); if (collisionShape == SHAPE_NONE){ return (_local4); }; switch (_arg3){ case 0: switch (collisionShape){ case SHAPE_SLOPE_45_TL: case SHAPE_SLOPE_45_TR: case SHAPE_FULL_SQUARE: _local4.y = (-(_arg2) - 1); break; case SHAPE_SLOPE_45_BR: _local4.y = -((((_arg1 + 2) + _arg2) - size)); break; case SHAPE_SLOPE_45_BL: _local4.y = -(((-(_arg1) + 1) + _arg2)); break; }; break; case 1: switch (collisionShape){ case SHAPE_SLOPE_45_BR: case SHAPE_SLOPE_45_BL: case SHAPE_FULL_SQUARE: _local4.y = (size - _arg2); break; case SHAPE_SLOPE_45_TL: _local4.y = -(((_arg1 + _arg2) - size)); break; case SHAPE_SLOPE_45_TR: _local4.y = -(((-(_arg1) + _arg2) - 1)); break; }; break; case 2: switch (collisionShape){ case SHAPE_SLOPE_45_TL: case SHAPE_SLOPE_45_BL: case SHAPE_FULL_SQUARE: _local4.x = (-(_arg1) - 1); break; case SHAPE_SLOPE_45_BR: _local4.x = -((((_arg1 + 2) + _arg2) - size)); break; case SHAPE_SLOPE_45_TR: _local4.x = -(((_arg1 + 1) - _arg2)); break; }; break; case 3: switch (collisionShape){ case SHAPE_SLOPE_45_BR: case SHAPE_SLOPE_45_TR: case SHAPE_FULL_SQUARE: _local4.x = (size - _arg1); break; case SHAPE_SLOPE_45_TL: _local4.x = -(((_arg1 + _arg2) - size)); break; case SHAPE_SLOPE_45_BL: _local4.x = -(((_arg1 - _arg2) - 1)); break; }; break; }; return (_local4); } } }//package pixelizer.physics.collisionSection 169//CPxBody (pixelizer.physics.CPxBody) package pixelizer.physics { import flash.display.*; import pixelizer.render.*; import flash.geom.*; import pixelizer.physics.collision.*; public class CPxBody extends CPxSprite { public var acceleration:Point; public var boundingBox:CPxBBox; public var sidewaysCollisionFlags:int; public var velocity:Point; public var lastPosition:Point; public var restitution:Number;// = 0 public var upCollisionFlags:int; public var mass:Number;// = 0 public var location:int; public var downCollisionFlags:int; public var lastTileY:int;// = 0 public static const IN_AIR:int = 1; public static const ON_GROUND:int = 0; public function CPxBody(_arg1:String){ downCollisionFlags = (0xFFFF ^ CPxCollisionTile.TILE_COLLISION_NONE); upCollisionFlags = (0xFFFF ^ (CPxCollisionTile.TILE_COLLISION_NONE | CPxCollisionTile.TILE_COLLISION_JUMP_THROUGH)); sidewaysCollisionFlags = (0xFFFF ^ (CPxCollisionTile.TILE_COLLISION_NONE | CPxCollisionTile.TILE_COLLISION_JUMP_THROUGH)); super(_arg1); location = IN_AIR; acceleration = new Point(); velocity = new Point(); lastPosition = new Point(); boundingBox = new CPxBBox(-(bitmapData.width), -(bitmapData.height), bitmapData.width, bitmapData.height); } public function onFall():void{ } public function onCollision(_arg1:int):void{ if ((_arg1 & CPxCollisionSolver.COLLISION_BOTTOM)){ velocity.y = (velocity.y * -(restitution)); if (velocity.y > -50){ velocity.y = 0; location = ON_GROUND; }; }; if ((_arg1 & CPxCollisionSolver.COLLISION_TOP)){ velocity.y = (velocity.y * -(restitution)); }; if ((_arg1 & CPxCollisionSolver.COLLISION_LEFT)){ velocity.x = (velocity.x * -(restitution)); }; if ((_arg1 & CPxCollisionSolver.COLLISION_RIGHT)){ velocity.x = (velocity.x * -(restitution)); }; } public function applyForce(_arg1:Point):void{ velocity.x = (velocity.x + _arg1.x); velocity.y = (velocity.y + _arg1.y); } public function updateX(_arg1:Number=1):void{ lastPosition.x = position.x; velocity.x = (velocity.x + ((mass * acceleration.x) * _arg1)); position.x = (position.x + (velocity.x * _arg1)); acceleration.x = 0; } public function drawDebug(_arg1:Sprite):void{ _arg1.graphics.drawRect((position.x + boundingBox.x), (position.y + boundingBox.y), boundingBox.width, boundingBox.height); } override public function destroy():void{ boundingBox = null; super.destroy(); } public function updateY(_arg1:Number=1):void{ lastPosition.y = position.y; velocity.y = (velocity.y + ((mass * acceleration.y) * _arg1)); position.y = (position.y + (velocity.y * _arg1)); acceleration.y = 0; } } }//package pixelizer.physicsSection 170//CPxTextField (pixelizer.render.gui.widgets.CPxTextField) package pixelizer.render.gui.widgets { import flash.display.*; import pixelizer.core.repository.*; public class CPxTextField extends CPxWidget { protected var _text:String;// = "" private var _font:CPxFont; public static var DEFAULT_FONT:String = "DEFAULT_FONT"; public function CPxTextField(_arg1:String="DEFAULT_FONT"){ _font = CPxRepository.getInstance().getPixelizerFont(_arg1); text = " "; } public function set text(_arg1:String):void{ _text = _arg1; setTextField(_text); } protected function setTextField(_arg1:String):void{ var _local2:int = _font.getTextWidth(_arg1); var _local3:int = _font.getTextHeight(_arg1); if (bitmapData != null){ bitmapData.dispose(); }; bitmapData = new BitmapData(_local2, _local3, true, 0); bitmapData.lock(); _font.render(bitmapData, _arg1); bitmapData.unlock(); } override public function destroy():void{ _font = null; if (bitmapData != null){ bitmapData.dispose(); }; super.destroy(); } public function get text():String{ return (_text); } } }//package pixelizer.render.gui.widgetsSection 171//CPxWidget (pixelizer.render.gui.widgets.CPxWidget) package pixelizer.render.gui.widgets { import flash.events.*; import pixelizer.render.*; public class CPxWidget extends CPxRenderObject { public var id:String;// = "" protected var _hasFocus:Boolean;// = false public function loseFocus():void{ _hasFocus = false; } public function onClicked():void{ dispatchEvent(new MouseEvent(MouseEvent.CLICK)); gainFocus(); } public function gainFocus():void{ _hasFocus = true; } } }//package pixelizer.render.gui.widgetsSection 172//CPxRenderer (pixelizer.render.CPxRenderer) package pixelizer.render { import flash.display.*; import flash.geom.*; import flash.utils.*; import pixelizer.*; public class CPxRenderer extends Bitmap implements IPxRenderObject { private var _staticViewport:CPxViewport; private var _logo:CPxSprite;// = null private var _children:Array; public static const ZERO_POINT:Point = new Point(); public function CPxRenderer(_arg1:int, _arg2:int){ bitmapData = new BitmapData(_arg1, _arg2, true, 0); _children = new Array(); _logo = new CPxSprite("PIXELIZER_LOGO"); _logo.position.x = ((_arg1 - _logo.bitmapData.width) - 1); _logo.position.y = ((_arg2 - _logo.bitmapData.height) - 1); _staticViewport = new CPxViewport(_arg1, _arg2); } public function set pxParent(_arg1:IPxRenderObject):void{ } public function get numChildren():int{ return (_children.length); } public function addChildAt(_arg1:IPxRenderObject, _arg2:int):void{ if (_arg1.pxParent != null){ _arg1.pxParent.removeChild(_arg1); }; _children.splice(_arg2, 0, _arg1); _arg1.pxParent = this; } public function get pxParent():IPxRenderObject{ return (null); } public function render(_arg1:CPxViewport, _arg2:CPxRenderStats):void{ var _local3:CPxRenderObject; _arg2.reset(); _arg2.renderTime = getTimer(); bitmapData.lock(); bitmapData.fillRect(bitmapData.rect, 0); var _local4:int = _children.length; var _local5:int; while (_local5 < _local4) { _local3 = _children[_local5]; if (_local3.visible){ _local3.render(ZERO_POINT, bitmapData, _arg1, _arg2); }; _local5++; }; if (CPxPixelizer.showLogo){ _logo.render(ZERO_POINT, bitmapData, _staticViewport, _arg2); }; bitmapData.unlock(); _arg2.renderTime = (getTimer() - _arg2.renderTime); } public function get children():Array{ return (_children); } public function removeChild(_arg1:IPxRenderObject):void{ var _local2:int; while (_local2 < _children.length) { if (_children[_local2] == _arg1){ _children.splice(_local2, 1); _arg1.pxParent = null; return; }; _local2++; }; } public function destroy():void{ bitmapData.dispose(); bitmapData = null; _children = null; _logo.destroy(); _logo = null; _staticViewport.destroy(); _staticViewport = null; } public function addChild(_arg1:IPxRenderObject):void{ if (_arg1.pxParent != null){ _arg1.pxParent.removeChild(_arg1); }; _children.push(_arg1); _arg1.pxParent = this; } } }//package pixelizer.renderSection 173//CPxRenderObject (pixelizer.render.CPxRenderObject) package pixelizer.render { import flash.display.*; import flash.events.*; import flash.geom.*; import pixelizer.logging.*; public class CPxRenderObject extends EventDispatcher implements IPxRenderObject { public var bitmapData:BitmapData;// = null public var children:Array;// = null public var position:Point;// = null private var _useColorTransform:int;// = 0 private var _globalTopLeft_:Point; private var _parent:IPxRenderObject;// = null public var scaleX:Number;// = 1 public var scaleY:Number;// = 1 public var hotspot:Point;// = null private var _alpha:Number;// = 1 private var _matrix:Matrix;// = null private var _bufferTopLeft_:Point; private var _colorTransform:ColorTransform;// = null public var visible:Boolean;// = true public var pivotOffset:Point;// = null public var rotation:Number;// = 0 public function CPxRenderObject(){ _bufferTopLeft_ = new Point(); _globalTopLeft_ = new Point(); pivotOffset = new Point(); position = new Point(); hotspot = new Point(); children = []; _matrix = new Matrix(); _colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0); } public function addChild(_arg1:IPxRenderObject):void{ if (_arg1.pxParent != null){ _arg1.pxParent.removeChild(_arg1); }; children.push(_arg1); _arg1.pxParent = this; } public function addChildAt(_arg1:IPxRenderObject, _arg2:int):void{ if (_arg1.pxParent != null){ _arg1.pxParent.removeChild(_arg1); }; if ((((_arg2 < 0)) || ((_arg2 >= children.length)))){ CPxLog.log("index out of bounds, added last", this, CPxLog.LOG_WARNING); addChild(_arg1); } else { children.splice(_arg2, 0, _arg1); _arg1.pxParent = this; }; } public function render(_arg1:Point, _arg2:BitmapData, _arg3:CPxViewport, _arg4:CPxRenderStats):void{ var _local5:CPxRenderObject; _arg4.totalObjects++; _globalTopLeft_.x = ((_arg1.x + position.x) - hotspot.x); _globalTopLeft_.y = ((_arg1.y + position.y) - hotspot.y); if (bitmapData != null){ if (_globalTopLeft_.x < _arg3.rectangle.right){ if ((_globalTopLeft_.x + bitmapData.width) >= _arg3.rectangle.left){ if (_globalTopLeft_.y < _arg3.rectangle.bottom){ if ((_globalTopLeft_.y + bitmapData.height) >= _arg3.rectangle.top){ _bufferTopLeft_.x = (_globalTopLeft_.x - _arg3.rectangle.x); _bufferTopLeft_.y = (_globalTopLeft_.y - _arg3.rectangle.y); if ((((((((_useColorTransform > 0)) || (!((rotation == 0))))) || (!((scaleX == 1))))) || (!((scaleY == 1))))){ _matrix.identity(); _matrix.translate(-(hotspot.x), -(hotspot.y)); if (((!((scaleX == 1))) || (!((scaleY == 1))))){ _matrix.scale(scaleX, scaleY); }; if (rotation != 0){ _matrix.translate(-(pivotOffset.x), -(pivotOffset.y)); _matrix.rotate(rotation); _matrix.translate(pivotOffset.x, pivotOffset.y); }; _matrix.translate((_bufferTopLeft_.x + hotspot.x), (_bufferTopLeft_.y + hotspot.y)); if (_useColorTransform > 0){ _arg2.draw(bitmapData, _matrix, _colorTransform); } else { _arg2.draw(bitmapData, _matrix); }; } else { _arg2.copyPixels(bitmapData, bitmapData.rect, _bufferTopLeft_, null, null, true); }; _arg4.renderedObjects++; }; }; }; }; }; var _local6:int = children.length; _globalTopLeft_.x = (_globalTopLeft_.x + hotspot.x); _globalTopLeft_.y = (_globalTopLeft_.y + hotspot.y); var _local7:int; while (_local7 < _local6) { _local5 = children[_local7]; if (_local5.visible){ _local5.render(_globalTopLeft_, _arg2, _arg3, _arg4); }; _local7++; }; } public function set colorTransform(_arg1:ColorTransform):void{ _colorTransform = _arg1; } public function set pxParent(_arg1:IPxRenderObject):void{ _parent = _arg1; } public function get numChildren():int{ return (children.length); } public function getChildAt(_arg1:int):CPxRenderObject{ return (children[_arg1]); } public function set alpha(_arg1:Number):void{ _alpha = _arg1; _colorTransform.alphaOffset = (0xFF * (_alpha - 1)); if (_alpha < 1){ _useColorTransform = (_useColorTransform | 1); } else { _useColorTransform = (_useColorTransform & ~(1)); }; } public function get pxParent():IPxRenderObject{ return (_parent); } public function update(_arg1:Number=1):void{ var _local2:CPxRenderObject; var _local3:int = children.length; var _local4:int; while (_local4 < _local3) { _local2 = children[_local4]; _local2.update(_arg1); _local4++; }; } public function get alpha():Number{ return (_alpha); } public function get colorTransform():ColorTransform{ return (_colorTransform); } public function set useColorTransform(_arg1:Boolean):void{ if (_arg1){ _useColorTransform = 2; } else { _useColorTransform = 0; }; } public function destroy():void{ var _local1:CPxRenderObject; for each (_local1 in children) { _local1.destroy(); }; children = []; if (_parent != null){ _parent.removeChild(this); _parent = null; }; pivotOffset = null; position = null; hotspot = null; _matrix = null; _colorTransform = null; _bufferTopLeft_ = null; _globalTopLeft_ = null; } public function removeChild(_arg1:IPxRenderObject):void{ var _local2:int; while (_local2 < children.length) { if (children[_local2] == _arg1){ children.splice(_local2, 1); _arg1.pxParent = null; return; }; _local2++; }; } } }//package pixelizer.renderSection 174//CPxRenderStats (pixelizer.render.CPxRenderStats) package pixelizer.render { public class CPxRenderStats { public var totalObjects:int;// = 0 public var renderTime:int;// = 0 public var renderedObjects:int;// = 0 public function reset():void{ renderedObjects = 0; totalObjects = 0; renderTime = 0; } } }//package pixelizer.renderSection 175//CPxSprite (pixelizer.render.CPxSprite) package pixelizer.render { import pixelizer.core.repository.*; import pixelizer.logging.*; import pixelizer.math.*; public class CPxSprite extends CPxRenderObject { protected var _frames:CPxFrames;// = null private var _flipDirection:int;// = 0 private var _defaultAnimation:CPxAnimation;// = null protected var _currentAnimation:CPxAnimation;// = null private var _playDirection:int;// = 1 private var _frameRate:Number;// = 0.1 protected var _playing:Boolean;// = false private var _frameCounter:Number;// = 0 private var _currentAnimationFrameID:Number;// = 0 public static const VERTICAL_FLIP:int = 2; public static const HORIZONTAL_FLIP:int = 1; public static const NO_FLIP:int = 0; public static const DEFAULT_ANIMATION:String = "DEFAULT_ANIMATION"; public function CPxSprite(_arg1:String){ if (_arg1 != ""){ _frames = CPxRepository.getInstance().getPixelizerFrames(_arg1); if (_frames == null){ CPxLog.log((("no frames in repository for id '" + _arg1) + "'"), this, CPxLog.LOG_WARNING); return; }; _currentAnimationFrameID = 0; _currentAnimation = (_defaultAnimation = _frames.getAnimation(DEFAULT_ANIMATION)); updateBitmapData(); }; } public function stop():void{ _playing = false; } public function gotoAndPlay(_arg1:Object=null, _arg2:int=1):void{ if (_arg1 == null){ _arg1 = DEFAULT_ANIMATION; }; if (!(_arg1 is int)){ if (!_frames.hasAnimation(("" + _arg1))){ CPxLog.log((("no such animation '" + _arg1) + "'"), this, CPxLog.LOG_WARNING); return; }; }; if ((_arg1 is int)){ _currentAnimation = _frames.getAnimation(DEFAULT_ANIMATION); _currentAnimationFrameID = (_arg1 as int); } else { _currentAnimation = _frames.getAnimation(("" + _arg1)); if (_currentAnimation == null){ _currentAnimation = _frames.getAnimation(DEFAULT_ANIMATION); }; _currentAnimationFrameID = 0; }; _playDirection = CPxMath.sgn(_arg2); _playing = true; _frameCounter = 0; updateBitmapData(); } override public function update(_arg1:Number=1):void{ if (_frames != null){ if (_playing){ _frameCounter = (_frameCounter + _arg1); if (_frameCounter >= _frameRate){ while ((((_frameCounter >= _frameRate)) && (_playing))) { _currentAnimationFrameID = (_currentAnimationFrameID + _playDirection); _frameCounter = (_frameCounter - _frameRate); if (_currentAnimationFrameID >= _currentAnimation.frameSequence.length){ if (_currentAnimation.params.onComplete != undefined){ switch (_currentAnimation.params.onComplete){ case CPxAnimation.ANIMATION_LOOP: _currentAnimationFrameID = 0; break; case CPxAnimation.ANIMATION_GOTO: gotoAndPlay(_currentAnimation.params.goto); break; default: _currentAnimationFrameID = (_currentAnimation.frameSequence.length - 1); _playing = false; break; }; } else { _currentAnimationFrameID = (_currentAnimation.frameSequence.length - 1); _playing = false; }; }; }; updateBitmapData(); }; }; }; super.update(_arg1); } public function set currentAnimationFrame(_arg1:int):void{ _currentAnimationFrameID = _arg1; updateBitmapData(); } public function get frameRate():Number{ return (_frameRate); } public function forceFrame(_arg1:int):void{ _currentAnimation = _defaultAnimation; _currentAnimationFrameID = _arg1; _playing = false; updateBitmapData(); } public function gotoAndStop(_arg1:Object=null):void{ if (_arg1 == null){ _arg1 = DEFAULT_ANIMATION; }; if ((_arg1 is int)){ _currentAnimation = _frames.getAnimation(DEFAULT_ANIMATION); _currentAnimationFrameID = (_arg1 as int); } else { _currentAnimation = _frames.getAnimation((_arg1 as String)); if (_currentAnimation == null){ _currentAnimation = _frames.getAnimation(DEFAULT_ANIMATION); }; _currentAnimationFrameID = 0; }; _playing = false; updateBitmapData(); } public function get totalFrames():int{ return (_frames.frames.length); } public function set flip(_arg1:int):void{ if (_arg1 == NO_FLIP){ _flipDirection = _arg1; } else { if ((_arg1 & _frames.availableFlips) == 0){ } else { _flipDirection = _arg1; }; }; updateBitmapData(); } public function set frameRate(_arg1:Number):void{ _frameRate = (1 / _arg1); } private function updateBitmapData():void{ if (_frames != null){ if ((((_currentAnimationFrameID >= _currentAnimation.frameSequence.length)) || ((_currentAnimationFrameID < 0)))){ CPxLog.log(((("frame id out of bounds in animation " + _currentAnimation.frameSequence) + " ") + _currentAnimationFrameID), this, CPxLog.LOG_ERROR); }; switch (_flipDirection){ case NO_FLIP: bitmapData = _frames.frames[_currentAnimation.frameSequence[int(_currentAnimationFrameID)]]; break; case HORIZONTAL_FLIP: bitmapData = _frames.hFlipFrames[_currentAnimation.frameSequence[int(_currentAnimationFrameID)]]; break; case VERTICAL_FLIP: bitmapData = _frames.vFlipFrames[_currentAnimation.frameSequence[int(_currentAnimationFrameID)]]; break; }; if (bitmapData == null){ CPxLog.log((((("frame '" + _currentAnimation.frameSequence[int(_currentAnimationFrameID)]) + "' not available for animation '") + _currentAnimation.label) + "'"), this, CPxLog.LOG_WARNING); _playing = false; _currentAnimationFrameID = 0; bitmapData = _frames.frames[0]; }; }; } public function get flip():int{ return (_flipDirection); } public function get currentAnimationLabel():String{ return (_currentAnimation.label); } public function get currentAnimationFrame():int{ return (_currentAnimationFrameID); } public function play(_arg1:int=1):void{ _playDirection = CPxMath.sgn(_arg1); _frameCounter = 0; _playing = true; } override public function destroy():void{ _frames = null; super.destroy(); } public function get currentFrame():int{ return (_currentAnimation.frameSequence[_currentAnimationFrameID]); } } }//package pixelizer.renderSection 176//CPxViewport (pixelizer.render.CPxViewport) package pixelizer.render { import flash.geom.*; public class CPxViewport { private var _bounds:Rectangle;// = null public var rectangle:Rectangle;// = null public function CPxViewport(_arg1:int, _arg2:int){ rectangle = new Rectangle(0, 0, _arg1, _arg2); _bounds = rectangle.clone(); } public function setBounds(_arg1:Point, _arg2:Point):void{ _bounds = new Rectangle(_arg1.x, _arg1.y, (_arg2.x - _arg1.x), (_arg2.y - _arg1.y)); } public function destroy():void{ rectangle = null; _bounds = null; } public function setPosition(_arg1:int, _arg2:int):void{ rectangle.x = _arg1; rectangle.y = _arg2; if (rectangle.x < _bounds.x){ rectangle.x = _bounds.x; }; if (rectangle.right > _bounds.right){ rectangle.x = (_bounds.right - rectangle.width); }; if (rectangle.y < _bounds.y){ rectangle.y = _bounds.y; }; if (rectangle.bottom > _bounds.bottom){ rectangle.y = (_bounds.bottom - rectangle.height); }; } } }//package pixelizer.renderSection 177//IPxRenderObject (pixelizer.render.IPxRenderObject) package pixelizer.render { public interface IPxRenderObject { function removeChild(_arg1:IPxRenderObject):void; function get pxParent():IPxRenderObject; function addChild(_arg1:IPxRenderObject):void; function set pxParent(_arg1:IPxRenderObject):void; } }//package pixelizer.renderSection 178//CPxDefaultFontCreator (pixelizer.utils.CPxDefaultFontCreator) package pixelizer.utils { import flash.display.*; import pixelizer.core.repository.*; public final class CPxDefaultFontCreator { private static var _defaultFontData:String = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((("( )::4x6::0000::0000::0000::0000::0000::0000;" + "(!)::2x6::10::10::10::00::10::00;") + "(\")::4x6::1010::1010::0000::0000::0000::0000;") + "(#)::4x6::0100::1110::0100::1110::0100::0000;") + "($)::4x6::1110::0110::1100::1110::0000::0000;") + "(%)::4x6::1000::0100::0010::0100::1000::0000;") + "(&)::4x6::0000::0100::1110::0100::0000::0000;") + "(')::3x6::010::100::000::000::000::000;") + "(()::3x6::010::100::100::100::010::000;") + "())::3x6::100::010::010::010::100::000;") + "(*)::4x6::0000::1110::0000::1110::0000::0000;") + "(+)::4x6::0000::0100::1110::0100::0000::0000;") + "(,)::2x6::00::00::00::00::10::10;") + "(-)::4x6::0000::0000::1110::0000::0000::0000;") + "(.)::2x6::00::00::00::00::10::00;") + "(/)::4x6::0010::0010::0100::1000::1000::0000;") + "(0)::4x6::1110::1010::1010::1010::1110::0000;") + "(1)::4x6::1100::0100::0100::0100::1110::0000;") + "(2)::4x6::1100::0010::0100::1000::1110::0000;") + "(3)::4x6::1110::0010::0110::0010::1110::0000;") + "(4)::4x6::1010::1010::1110::0010::0010::0000;") + "(5)::4x6::1110::1000::1100::0010::1100::0000;") + "(6)::4x6::0110::1000::1110::1010::1110::0000;") + "(7)::4x6::1110::0010::0100::1000::1000::0000;") + "(8)::4x6::1110::1010::1110::1010::1110::0000;") + "(9)::4x6::1110::1010::1110::0010::1100::0000;") + "(:)::2x6::00::00::10::00::10::00;") + "(;)::2x6::00::00::10::00::10::10;") + "(<)::4x6::0010::0100::1000::0100::0010::0000;") + "(=)::4x6::0000::1110::0000::1110::0000::0000;") + "(>)::4x6::1000::0100::0010::0100::1000::0000;") + "(?)::4x6::1100::0010::0100::0000::0100::0000;") + "(@)::5x6::01100::10110::10110::10000::01100::00000;") + "(A)::4x6::1100::1010::1110::1010::1010::0000;") + "(B)::4x6::1100::1010::1100::1010::1100::0000;") + "(C)::4x6::0110::1000::1000::1000::1110::0000;") + "(D)::4x6::1100::1010::1010::1010::1100::0000;") + "(E)::4x6::1110::1000::1100::1000::1110::0000;") + "(F)::4x6::1110::1000::1100::1000::1000::0000;") + "(G)::4x6::0110::1000::1000::1010::1110::0000;") + "(H)::4x6::1010::1010::1110::1010::1010::0000;") + "(I)::4x6::1110::0100::0100::0100::1110::0000;") + "(J)::4x6::1110::0010::0010::0010::1100::0000;") + "(K)::4x6::1010::1010::1100::1010::1010::0000;") + "(L)::4x6::1000::1000::1000::1000::1110::0000;") + "(M)::6x6::100010::110110::101010::100010::100010::000000;") + "(N)::5x6::10010::11010::10110::10010::10010::00000;") + "(O)::4x6::0110::1010::1010::1010::1100::0000;") + "(P)::4x6::1100::1010::1100::1000::1000::0000;") + "(Q)::4x6::1100::1010::1010::1010::0111::0000;") + "(R)::4x6::1100::1010::1100::1010::1010::0000;") + "(S)::4x6::0110::1000::0100::0010::1110::0000;") + "(T)::4x6::1110::0100::0100::0100::0100::0000;") + "(U)::4x6::1010::1010::1010::1010::1100::0000;") + "(V)::4x6::1010::1010::1010::1010::0100::0000;") + "(W)::6x6::100010::100010::101010::110110::100010::000000;") + "(X)::4x6::1010::1010::0100::1010::1010::0000;") + "(Y)::4x6::1010::1010::0100::0100::0100::0000;") + "(Z)::4x6::1110::0010::0100::1000::1110::0000;") + "([)::3x6::110::100::100::100::110::000;") + "()::4x6::1000::1000::0100::0010::0010::0000;") + "(])::3x6::110::010::010::010::110::000;") + "(^)::4x6::0100::1110::0000::0000::0000::0000;") + "(^)::4x6::0100::1110::0000::0000::0000::0000;") + "(^)::4x6::0100::1110::0000::0000::0000::0000;") + "(a)::4x6::0000::0000::0110::1010::1110::0000;") + "(b)::4x6::1000::1000::1100::1010::1110::0000;") + "(c)::4x6::0000::0000::1110::1000::1110::0000;") + "(d)::4x6::0010::0010::0110::1010::1110::0000;") + "(e)::4x6::0000::0000::0110::1100::1110::0000;") + "(f)::4x6::0010::0100::0110::0100::0100::0000;") + "(g)::4x6::0000::0110::1010::1110::0010::0100;") + "(h)::4x6::1000::1000::1100::1010::1010::0000;") + "(i)::4x6::0100::0000::1100::0100::1110::0000;") + "(j)::4x6::0010::0000::0110::0010::0010::1100;") + "(k)::4x6::0000::1000::1010::1100::1010::0000;") + "(l)::4x6::0100::0100::0100::0100::0110::0000;") + "(m)::6x6::000000::000000::111100::101010::101010::000000;") + "(n)::4x6::0000::0000::1100::1010::1010::0000;") + "(o)::4x6::0000::0000::0110::1010::1100::0000;") + "(p)::4x6::0000::0000::1100::1010::1100::1000;") + "(q)::4x6::0000::0000::0110::1010::0110::0010;") + "(r)::4x6::0000::0000::0110::1000::1000::0000;") + "(s)::3x6::000::110::100::010::110::000;") + "(t)::3x6::000::100::110::100::010::000;") + "(u)::4x6::0000::0000::1010::1010::0110::0000;") + "(v)::4x6::0000::0000::1010::1010::0100::0000;") + "(w)::6x6::000000::000000::101010::101010::011110::000000;") + "(x)::4x6::0000::0000::1010::0100::1010::0000;") + "(y)::4x6::0000::0000::1010::1110::0010::0100;") + "(z)::4x6::0000::1110::0110::1000::1110::0000;") + "({)::4x6::0110::0100::1100::0100::0110::0000;") + "(|)::2x6::10::10::10::10::10::10;") + "(})::4x6::1100::0100::0110::0100::1100::0000;") + "(^)::4x6::0100::1110::0000::0000::0000::0000;") + "(^)::4x6::0100::1110::0000::0000::0000::0000"); public static function createDefaultFont():CPxFont{ var _local3:String; var _local4:Array; var _local5:int; var _local6:int; var _local7:int; var _local8:BitmapData; var _local9:int; var _local10:String; var _local11:int; var _local12:int; var _local1:CPxFont = new CPxFont(null, ""); var _local2:Array = _defaultFontData.split(";"); for each (_local3 in _local2) { if (_local3.length > 1){ _local4 = _local3.split("::"); _local5 = parseInt((_local4[1] as String).charAt(0)); _local6 = parseInt((_local4[1] as String).charAt(2)); _local7 = (_local4[0] as String).charCodeAt(1); _local8 = new BitmapData(_local5, _local6, true, 0); _local8.lock(); _local9 = 2; while (_local9 <= (_local6 + 1)) { _local10 = _local4[_local9]; _local11 = 0; while (_local11 < _local5) { _local12 = parseInt(_local10.charAt(_local11)); if (_local12 == 1){ _local8.setPixel32(_local11, (_local9 - 2), 4290822336); }; _local11++; }; _local9++; }; _local8.unlock(); _local1.setGlyph(_local7, _local8); }; }; return (_local1); } } }//package pixelizer.utilsSection 179//CPxLogoCreator (pixelizer.utils.CPxLogoCreator) package pixelizer.utils { import flash.display.*; public class CPxLogoCreator { private static var _logoData:String = ((((((((("11111110" + "12221112") + "12121112") + "12221112") + "12111112") + "12121212") + "12112112") + "11121212") + "11111112") + "02222222"); public static function createLogoBitmap():Bitmap{ var _local3:int; var _local1:Bitmap = new Bitmap(new BitmapData(8, 10, true, 0)); var _local2:int; while (_local2 < _local1.bitmapData.height) { _local3 = 0; while (_local3 < _local1.bitmapData.width) { if (_logoData.charAt((_local3 + (_local2 * 8))) == "1"){ _local1.bitmapData.setPixel32(_local3, _local2, 2298478591); }; if (_logoData.charAt((_local3 + (_local2 * 8))) == "2"){ _local1.bitmapData.setPixel32(_local3, _local2, 2281767169); }; _local3++; }; _local2++; }; return (_local1); } } }//package pixelizer.utilsSection 180//CPxSpriteSheet (pixelizer.utils.CPxSpriteSheet) package pixelizer.utils { import flash.display.*; public class CPxSpriteSheet extends Bitmap { public var spriteWidth:int; public var spriteHeight:int; public function CPxSpriteSheet(_arg1:BitmapData, _arg2:int, _arg3:int=0xFFFF){ spriteWidth = Math.min(_arg2, _arg1.width); spriteHeight = Math.min(_arg3, _arg1.height); bitmapData = _arg1; } } }//package pixelizer.utilsSection 181//CPxPixelizer (pixelizer.CPxPixelizer) package pixelizer { import pixelizer.core.repository.*; import pixelizer.utils.*; public final class CPxPixelizer { public static var COPYRIGHT:String = "(c) 2010 - Muskedunder Interactive (www.muskedunder.com)"; private static var _isInitialized:Boolean = false; public static var APPLICATION:String = "Pixelizer Game Engine"; public static var AUTHOR:String = "Johan Peitz"; private static var _showLogo:Boolean = true; public static function get showLogo():Boolean{ return (_showLogo); } public static function isInitialized():Boolean{ return (_isInitialized); } public static function init(_arg1:Boolean=true):void{ if (!_isInitialized){ _isInitialized = true; _showLogo = _arg1; trace(">>>"); trace(">>>", CPxPixelizer.APPLICATION, "by", CPxPixelizer.AUTHOR, " | ", CPxPixelizer.COPYRIGHT); trace(">>>"); CPxRepository.getInstance().createPixelizerFrames("PIXELIZER_LOGO", CPxLogoCreator.createLogoBitmap()); CPxRepository.getInstance().setPixelizerFont(CPxFont.DEFAULT_FONT, CPxDefaultFontCreator.createDefaultFont()); }; } public static function destroy():void{ if (_isInitialized){ CPxRepository.getInstance().destroy(); _isInitialized = false; }; } } }//package pixelizerSection 182//wav (platformshake_1.wav) package platformshake_1 { import flash.media.*; public dynamic class wav extends Sound { } }//package platformshake_1Section 183//wav (platformshake_2.wav) package platformshake_2 { import flash.media.*; public dynamic class wav extends Sound { } }//package platformshake_2Section 184//wav (platformshake_3.wav) package platformshake_3 { import flash.media.*; public dynamic class wav extends Sound { } }//package platformshake_3Section 185//wav (popdown.wav) package popdown { import flash.media.*; public dynamic class wav extends Sound { } }//package popdownSection 186//wav (popup.wav) package popup { import flash.media.*; public dynamic class wav extends Sound { } }//package popupSection 187//wav (record.wav) package record { import flash.media.*; public dynamic class wav extends Sound { } }//package recordSection 188//Log (SWFStats.Log) package SWFStats { import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.external.*; public final class Log { private static const PingR:Timer = new Timer(30000); private static const Random:Number = Math.random(); private static const PingF:Timer = new Timer(60000); public static var GUID:String = ""; private static var Plays:int = 0; private static var Enabled:Boolean = false; private static var FirstPing:Boolean = true; private static var Pings:int = 0; public static var SourceUrl:String; private static var HighestGoal:int = 0; public static var SWFID:int = 0; private static function GetCookie(_arg1:String):int{ var _local2:SharedObject = SharedObject.getLocal("swfstats"); if (_local2.data[_arg1] == undefined){ return (0); }; return (int(_local2.data[_arg1])); } private static function SaveCookie(_arg1:String, _arg2:int):void{ var _local3:SharedObject = SharedObject.getLocal("swfstats"); _local3.data[_arg1] = _arg2.toString(); _local3.flush(); } public static function View(_arg1:int=0, _arg2:String="", _arg3:String=""):void{ SWFID = _arg1; GUID = _arg2; Enabled = true; if ((((SWFID == 0)) || ((GUID == "")))){ Enabled = false; return; }; if (((((!((_arg3.indexOf("http://") == 0))) && (!((Security.sandboxType == "localWithNetwork"))))) && (!((Security.sandboxType == "localTrusted"))))){ Enabled = false; return; }; SourceUrl = GetUrl(_arg3); if ((((SourceUrl == null)) || ((SourceUrl == "")))){ Enabled = false; return; }; Security.allowDomain("http://tracker.swfstats.com/"); Security.allowInsecureDomain("http://tracker.swfstats.com/"); Security.loadPolicyFile("http://tracker.swfstats.com/crossdomain.xml"); Security.allowDomain("http://utils.swfstats.com/"); Security.allowInsecureDomain("http://utils.swfstats.com/"); Security.loadPolicyFile("http://utils.swfstats.com/crossdomain.xml"); var _local4:int = GetCookie("views"); _local4++; SaveCookie("views", _local4); Send("View", ("views=" + _local4)); PingF.addEventListener(TimerEvent.TIMER, PingServer); PingF.start(); } public static function LevelCounterMetric(_arg1:String, _arg2):void{ if (!Enabled){ return; }; Send("LevelMetric", ((("name=" + escape(_arg1)) + "&level=") + _arg2)); } private static function Send(_arg1:String, _arg2:String):void{ var _local3:URLLoader = new URLLoader(); _local3.addEventListener(IOErrorEvent.IO_ERROR, ErrorHandler); _local3.addEventListener(HTTPStatusEvent.HTTP_STATUS, StatusChange); _local3.addEventListener(SecurityErrorEvent.SECURITY_ERROR, ErrorHandler); _local3.load(new URLRequest(((((((((((("http://tracker.swfstats.com/Games/" + _arg1) + ".html?guid=") + GUID) + "&swfid=") + SWFID) + "&") + _arg2) + "&url=") + SourceUrl) + "&") + Random))); } public static function Play():void{ if (!Enabled){ return; }; Plays++; Send("Play", ("plays=" + Plays)); } private static function GetUrl(_arg1:String):String{ var url:String; var defaulturl = _arg1; if (ExternalInterface.available){ try { url = String(ExternalInterface.call("window.location.href.toString")); } catch(s:Error) { url = defaulturl; }; } else { if (defaulturl.indexOf("http://") == 0){ url = defaulturl; }; }; if ((((((url == null)) || ((url == "")))) || ((url == "null")))){ if ((((Security.sandboxType == "localWithNetwork")) || ((Security.sandboxType == "localTrusted")))){ url = "http://local-testing/"; } else { url = null; }; }; return (url); } private static function ErrorHandler(... _args):void{ Enabled = false; } public static function LevelRangedMetric(_arg1:String, _arg2, _arg3:int):void{ if (!Enabled){ return; }; Send("LevelMetricRanged", ((((("name=" + escape(_arg1)) + "&level=") + _arg2) + "&value=") + _arg3)); } private static function StatusChange(... _args):void{ } public static function Goal(_arg1:int, _arg2:String):void{ if (!Enabled){ return; }; if (HighestGoal >= _arg1){ return; }; HighestGoal = _arg1; Send("Goal", ((("goal=" + _arg1) + "&name=") + escape(_arg2))); } private static function PingServer(... _args):void{ if (!Enabled){ return; }; Pings++; Send("Ping", (((FirstPing) ? "&firstping=yes" : "" + "&pings=") + Pings)); if (FirstPing){ PingF.stop(); PingR.addEventListener(TimerEvent.TIMER, PingServer); PingR.start(); FirstPing = false; }; } public static function LevelAverageMetric(_arg1:String, _arg2, _arg3:int):void{ if (!Enabled){ return; }; Send("LevelMetricAverage", ((((("name=" + escape(_arg1)) + "&level=") + _arg2) + "&value=") + _arg3)); } public static function CustomMetric(_arg1:String, _arg2:String=null):void{ if (!Enabled){ return; }; if (_arg2 == null){ _arg2 = ""; }; Send("CustomMetric", ((("name=" + escape(_arg1)) + "&group=") + escape(_arg2))); } } }//package SWFStatsSection 189//wav (tooltip.wav) package tooltip { import flash.media.*; public dynamic class wav extends Sound { } }//package tooltipSection 190//wav (trophy.wav) package trophy { import flash.media.*; public dynamic class wav extends Sound { } }//package trophySection 191//wav (wallhit_1.wav) package wallhit_1 { import flash.media.*; public dynamic class wav extends Sound { } }//package wallhit_1Section 192//wav (wallhit_2.wav) package wallhit_2 { import flash.media.*; public dynamic class wav extends Sound { } }//package wallhit_2Section 193//wav (wallhit_3.wav) package wallhit_3 { import flash.media.*; public dynamic class wav extends Sound { } }//package wallhit_3Section 194//gfxBubble (gfxBubble) package { import flash.display.*; public dynamic class gfxBubble extends MovieClip { } }//packageSection 195//IcyTowerMB (IcyTowerMB) package { import flash.display.*; import com.fuga.utils.*; import com.fuga.statehandler.*; import com.fuga.statehandler.transitions.*; import flash.events.*; import itfb.game.*; import flash.text.*; import flash.net.*; import itfb.*; import com.fuga.gui.*; import itfb.menu.loading.*; import itfb.game.tutorial.*; import pixelizer.*; import itfb.interfaces.*; import SWFStats.*; import com.fuga.logger.*; import itfb.menu.*; public class IcyTowerMB extends CDebugApp { private var _logWindow:CWindow; private var _logs:Array; private var _logField:TextField; public var _mochiads_game_id:String;// = "ab26cc621cd7e11a" private static var _globalLoaderInfo:LoaderInfo; private static var _highQuality:Boolean = true; private static var _goHome:Boolean = false; private static var _progStatCounter:int = 0; private static var _userIP:String = ""; private static var _stageRef:Stage; private static var _localConnectionName:String = null; private static var _stateHandler:IStateHandler; private static var _version:String = ""; private static var _gameURL:String = ""; private static var _backendData:Object = {}; private static var _preLoaderMC:MovieClip = null; private static var _localConnection:LocalConnection = null; private static var _fpsCounter:CFPSCounter = null; private static var _keyboard:CKeyboardHandler = null; public function IcyTowerMB(){ _logs = []; super(); CLogger.log("ICY TOWER FACEBOOK", this, CLogger.LOG_INFO); addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } private function onAddedToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); _stageRef = stage; _stageRef.frameRate = 30; _stageRef.stageFocusRect = false; this.tabEnabled = false; this.tabChildren = false; Log.View(325, "a583851e-c5d2-4d26-9724-13e5bf0b72f6", root.loaderInfo.loaderURL); if (canStartLocalGame()){ _logWindow = new CWindow("LOG", 640, 420); _logWindow.x = 10; _logWindow.y = 570; _logField = new TextField(); _logField.autoSize = TextFieldAutoSize.LEFT; _logWindow.addWidget(_logField); CLogger.addLogFunction(logThis); }; CLogger.log("Starting Local Game", this, CLogger.LOG_INFO); initGame(); } private function showPreLoaderStatusMessage(_arg1:String):void{ if (_preLoaderMC != null){ _preLoaderMC.tf_status.text = _arg1; }; } private function initGame():void{ CPxPixelizer.init(); _stateHandler = new CStateHandler(); _stageRef.addChild((_stateHandler as CStateHandler)); _stateHandler.registerState(CPreloadState, "preload"); _stateHandler.registerState(CMenuState, "menu"); _stateHandler.registerState(CPlayState, "play"); _stateHandler.registerState(CTutorialState, "tutorial"); _stateHandler.goToState("preload"); _fpsCounter = new CFPSCounter(25); _fpsCounter.x = 734; if (canStartLocalGame()){ _stageRef.addChild(_fpsCounter); }; if (canStartLocalGame()){ _keyboard = new CKeyboardHandler(_stageRef); }; addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function onEnterFrame(_arg1:Event):void{ var _local2:IQuittableState; _fpsCounter.frame(); _stateHandler.update((1 / 30)); if (_goHome){ _local2 = (_stateHandler.currentState as IQuittableState); if (_local2 != null){ _local2.onHomeButton(); }; _goHome = false; }; } private function logThis(_arg1:String):void{ _logs.push(_arg1); if (_logs.length > 32){ _logs.shift(); }; _logField.text = ""; var _local2:int = (_logs.length - 1); while (_local2 >= 0) { _logField.appendText((_logs[_local2] + "\n")); _local2--; }; } public static function getBackendData():Object{ return (_backendData); } public static function set highQuality(_arg1:Boolean):void{ _highQuality = _arg1; } public static function getStage():Stage{ return (_stageRef); } public static function getFPSCounter():CFPSCounter{ return (_fpsCounter); } public static function getPreLoaderMC():MovieClip{ return (_preLoaderMC); } public static function getStandardTransision():ITransition{ return (new CWipeTransition(0xFFFFFF, 630, 520, 0.3)); } public static function get version():String{ return (_version); } public static function isLocal():Boolean{ return (true); } public static function gotoFB(_arg1:String):void{ Log.CustomMetric(_arg1, "goto fb"); navigateToURL(new URLRequest(CSettings.getVar("fb_url")), "_blank"); } public static function goHome():void{ _goHome = true; } public static function getDataPath():String{ return ((_gameURL + "data/")); } public static function getStateHandler():CStateHandler{ return ((_stateHandler as CStateHandler)); } public static function navigateToURLInSameWindow(_arg1:String):void{ navigateToURL(new URLRequest(_arg1)); } public static function getUserIP():String{ return (_userIP); } public static function getCurrentStateID():String{ return (_stateHandler.currentState.stateID); } public static function isDebugApp():Boolean{ return (_isDebugApp); } public static function goToUrl(_arg1:String):void{ if (_localConnection != null){ _localConnection.send(_localConnectionName, "callFBJS", "document.setLocation", [_arg1]); } else { CLogger.log("no local connection, url opening skipped", "[object IcyTowerFB]"); }; } public static function get highQuality():Boolean{ return (_highQuality); } public static function set version(_arg1:String):void{ _version = _arg1; } } }//packageSection 196//MCBackground (MCBackground) package { import flash.display.*; public dynamic class MCBackground extends MovieClip { } }//packageSection 197//MCButton (MCButton) package { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.media.*; import flash.net.*; import flash.utils.*; import flash.accessibility.*; import flash.system.*; import flash.filters.*; import flash.external.*; import flash.ui.*; import flash.xml.*; import adobe.utils.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class MCButton extends MovieClip { public var button:MovieClip; public var textBox:MCHeader; public function MCButton(){ addFrameScript(0, frame1, 3, frame4, 4, frame5, 8, frame9, 9, frame10, 14, frame15); } function frame1(){ button.gotoAndStop("out"); } function frame4(){ stop(); } function frame5(){ button.gotoAndStop("over"); } function frame9(){ stop(); } public function setText(_arg1:String, _arg2:int=-1, _arg3:int=-1):void{ var _local4:Number = textBox.height; var _local5:int = _arg2; if (_local5 == -1){ _local5 = 200; }; textBox.setText(_arg1, "center", _local5); textBox.textBox.y = (textBox.textBox.y - (((textBox.height - _local4) / 2) * 1.2)); if (_arg2 == -1){ textBox.textBox.text1.tf_text.width = (textBox.textBox.text1.tf_text.textWidth + 5); textBox.textBox.text1.tf_text.x = -((textBox.textBox.text1.tf_text.width / 2)); textBox.textBox.text2.tf_text.width = (textBox.textBox.text2.tf_text.textWidth + 5); textBox.textBox.text2.tf_text.x = -((textBox.textBox.text2.tf_text.width / 2)); }; if (_arg2 == -1){ button.width = (textBox.width + 30); } else { button.width = _arg2; }; if (_arg3 == -1){ button.height = (textBox.height + 10); } else { button.height = _arg3; }; } function frame15(){ stop(); } function frame10(){ button.gotoAndStop("down"); } } }//packageSection 198//MCClock (MCClock) package { import flash.display.*; public dynamic class MCClock extends MovieClip { } }//packageSection 199//MCCoin (MCCoin) package { import flash.display.*; public dynamic class MCCoin extends MovieClip { } }//packageSection 200//MCCoinPickup (MCCoinPickup) package { import flash.display.*; public dynamic class MCCoinPickup extends MovieClip { } }//packageSection 201//MCComboMeter (MCComboMeter) package { import flash.display.*; public dynamic class MCComboMeter extends MovieClip { } }//packageSection 202//MCDebugPopup (MCDebugPopup) package { import flash.display.*; public dynamic class MCDebugPopup extends MovieClip { public var textBox:MCText; } }//packageSection 203//MCFloorBreak (MCFloorBreak) package { import flash.display.*; public dynamic class MCFloorBreak extends MovieClip { } }//packageSection 204//MCFloors (MCFloors) package { import flash.display.*; public dynamic class MCFloors extends MovieClip { } }//packageSection 205//MCFriendArrow (MCFriendArrow) package { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.media.*; import flash.net.*; import flash.utils.*; import flash.accessibility.*; import flash.system.*; import flash.filters.*; import flash.external.*; import flash.ui.*; import flash.xml.*; import adobe.utils.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class MCFriendArrow extends MovieClip { public var container:MovieClip; public var numbers:MovieClip; public function MCFriendArrow(){ addFrameScript(0, frame1, 3, frame4, 9, frame10); } function frame4(){ stop(); } function frame1(){ } function frame10(){ stop(); } public function setText(_arg1:String):void{ numbers.setText(_arg1); } } }//packageSection 206//MCGameExport (MCGameExport) package { import flash.display.*; public dynamic class MCGameExport extends MovieClip { } }//packageSection 207//MCGameFriendMessage (MCGameFriendMessage) package { import flash.display.*; public dynamic class MCGameFriendMessage extends MovieClip { public var textBox:MCHeader; public function MCGameFriendMessage(){ addFrameScript(0, frame1); } function frame1(){ } public function setText(_arg1:String):void{ textBox.setText(_arg1, "left", 260); } } }//packageSection 208//MCGameStandardMessage (MCGameStandardMessage) package { import flash.display.*; public dynamic class MCGameStandardMessage extends MovieClip { public var textBox:MCHeader; public function MCGameStandardMessage(){ addFrameScript(0, frame1); } function frame1(){ } public function setText(_arg1:String):void{ textBox.setText(_arg1, "center", 350); } } }//packageSection 209//MCHeader (MCHeader) package { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.media.*; import flash.net.*; import flash.utils.*; import flash.accessibility.*; import flash.system.*; import flash.filters.*; import flash.external.*; import flash.ui.*; import flash.xml.*; import adobe.utils.*; import flash.errors.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class MCHeader extends MovieClip { public var textBox:MovieClip; public function MCHeader(){ addFrameScript(0, frame1); } function frame1(){ } public function setText(_arg1:String, _arg2:String="center", _arg3:int=-1):void{ textBox.setText(_arg1, _arg2, _arg3); } } }//packageSection 210//MCHud (MCHud) package { import flash.display.*; public dynamic class MCHud extends MovieClip { public var handle:MovieClip; public var score:MovieClip; public var comboDigits:MovieClip; public var clock:MCClock; public var comboNumber:MovieClip; public var comboMeter:MovieClip; public var combo:MCComboMeter; } }//packageSection 211//MCLand1 (MCLand1) package { import flash.display.*; public dynamic class MCLand1 extends MovieClip { } }//packageSection 212//MCLand2 (MCLand2) package { import flash.display.*; public dynamic class MCLand2 extends MovieClip { } }//packageSection 213//MCLand3 (MCLand3) package { import flash.display.*; public dynamic class MCLand3 extends MovieClip { } }//packageSection 214//MCLand4 (MCLand4) package { import flash.display.*; public dynamic class MCLand4 extends MovieClip { } }//packageSection 215//MCLand5 (MCLand5) package { import flash.display.*; public dynamic class MCLand5 extends MovieClip { } }//packageSection 216//MCLoadingScreen (MCLoadingScreen) package { import flash.display.*; public dynamic class MCLoadingScreen extends MovieClip { public var loadingBar:MovieClip; } }//packageSection 217//MCMainMenu (MCMainMenu) package { import flash.display.*; public dynamic class MCMainMenu extends MovieClip { public var photo:MovieClip; public var btn_play:MovieClip; public var tower:MovieClip; public var speechBubble:MovieClip; public var btn_fb:MovieClip; } }//packageSection 218//MCMenuExport (MCMenuExport) package { import flash.display.*; public dynamic class MCMenuExport extends MovieClip { } }//packageSection 219//MCPopup (MCPopup) package { import flash.display.*; public dynamic class MCPopup extends MovieClip { public var container:MovieClip; public var btn_down:MovieClip; public var outline:MovieClip; public var bg:MovieClip; public var content_mask:MovieClip; public var middle:MovieClip; public var btn_center:MovieClip; public var btn_cancel:MovieClip; public var btn_up:MovieClip; public var btn_confirm:MovieClip; } }//packageSection 220//MCPostGame (MCPostGame) package { import flash.display.*; public dynamic class MCPostGame extends MovieClip { public var header:MCHeader; public var score:MCHeader; public var saveWindow:MovieClip; public var btn_exit:MovieClip; public var score_symbol:MovieClip; public var floors:MCHeader; public var btn_replay:MovieClip; public var combos:MCHeader; public var floors_symbol:MovieClip; public var combos_symbol:MovieClip; public var floorHeader:MCHeader; public var comboHeader:MCHeader; public var scoreHeader:MCHeader; } }//packageSection 221//MCSideBlock (MCSideBlock) package { import flash.display.*; public dynamic class MCSideBlock extends MovieClip { } }//packageSection 222//MCSigns (MCSigns) package { import flash.display.*; public dynamic class MCSigns extends MovieClip { } }//packageSection 223//MCSleepingHarold (MCSleepingHarold) package { import flash.display.*; public dynamic class MCSleepingHarold extends MovieClip { } }//packageSection 224//MCSoundExport (MCSoundExport) package { import flash.display.*; public dynamic class MCSoundExport extends MovieClip { } }//packageSection 225//MCSpeechBubble (MCSpeechBubble) package { import flash.display.*; import flash.text.*; public dynamic class MCSpeechBubble extends MovieClip { public var bubble:gfxBubble; public var textBox:MCText; public function MCSpeechBubble(){ addFrameScript(0, frame1); } function frame1(){ } public function setText(_arg1:String, _arg2:StyleSheet=null, _arg3:int=-1):void{ if (_arg3 > 1){ textBox.width = (_arg3 - 20); bubble.width = _arg3; bubble.x = -(_arg3); textBox.x = -((_arg3 / 2)); }; textBox.height = 10; textBox.setText(_arg1, _arg2, "center", "top"); bubble.height = (textBox.height + 50); textBox.tf_text.y = -((textBox.height / 2)); bubble.y = -(bubble.height); textBox.y = -(((bubble.height / 2) + 11)); } } }//packageSection 226//MCSpeechBubble2 (MCSpeechBubble2) package { import flash.display.*; import flash.text.*; public dynamic class MCSpeechBubble2 extends MovieClip { public var bubble:MovieClip; public var textBox:MCText; public function MCSpeechBubble2(){ addFrameScript(0, frame1); } function frame1(){ } public function setText(_arg1:String, _arg2:StyleSheet=null, _arg3:int=-1):void{ if (_arg3 > 1){ textBox.width = (_arg3 - 20); bubble.width = _arg3; bubble.x = -(_arg3); textBox.x = -((_arg3 / 2)); }; textBox.height = 10; textBox.setText(_arg1, _arg2, "center", "top"); bubble.height = (textBox.height + 50); textBox.tf_text.y = -((textBox.height / 2)); bubble.y = 0; textBox.y = ((bubble.height / 2) + 8); } } }//packageSection 227//MCStaticMenu (MCStaticMenu) package { import flash.display.*; public dynamic class MCStaticMenu extends MovieClip { public var btn_music:MovieClip; public var btn_quality:MovieClip; public var btn_home:MovieClip; public var btn_sound:MovieClip; } }//packageSection 228//MCText (MCText) package { import flash.display.*; import flash.text.*; public dynamic class MCText extends MovieClip { public var tf_text:TextField; public function MCText(){ addFrameScript(0, frame1); } function frame1(){ tf_text.mouseWheelEnabled = false; } public function get textHeight():Number{ return (tf_text.textHeight); } public function destroy():void{ tf_text.styleSheet = null; } public function setText(_arg1:String, _arg2:StyleSheet=null, _arg3:String="center", _arg4:String="top"):void{ var _local5:int; var _local6:int; var _local7:int; var _local8:int; if (((!((scaleX == 1))) || (!((scaleY == 1))))){ _local5 = tf_text.width; _local6 = tf_text.height; _local7 = width; _local8 = height; scaleX = (scaleY = 1); tf_text.width = _local7; tf_text.x = -((_local7 / 2)); if (_arg4 == "top"){ tf_text.y = -((_local8 / 2)); }; if (_arg4 == "middle"){ tf_text.y = (-((_local8 / 2)) + (_local6 / 1.4)); }; if (_arg4 == "bottom"){ tf_text.y = (-((_local8 / 2)) + (_local6 * 1.6)); }; }; if (_arg3 == TextFieldAutoSize.LEFT){ _arg1 = (("<span class=\"leftAlign\">" + _arg1) + "</span>"); }; if (_arg3 == TextFieldAutoSize.RIGHT){ _arg1 = (("<span class=\"rightAlign\">" + _arg1) + "</span>"); }; if (_arg3 == TextFieldAutoSize.CENTER){ _arg1 = (("<span class=\"centerAlign\">" + _arg1) + "</span>"); }; if (_arg2 != null){ tf_text.styleSheet = _arg2; }; tf_text.htmlText = _arg1; tf_text.autoSize = _arg3; } } }//packageSection 229//MCToolTip (MCToolTip) package { import flash.display.*; public dynamic class MCToolTip extends MovieClip { public var bg:MovieClip; public var textBox:MCText; } }//packageSection 230//MCTopPopup (MCTopPopup) package { import flash.display.*; public dynamic class MCTopPopup extends MovieClip { public var btn_skip:MCButton; public var header:MCHeader; public var btn_fb:MovieClip; public function MCTopPopup(){ addFrameScript(0, frame1); } public function setHeader(_arg1:String){ header.setText(_arg1, "center", 220); } function frame1(){ } } }//packageSection 231//MCTowerExport (MCTowerExport) package { import flash.display.*; public dynamic class MCTowerExport extends MovieClip { } }//packageSection 232//MCTrail (MCTrail) package { import flash.display.*; public dynamic class MCTrail extends MovieClip { } }//packageSection 233//MCTrophyClassic (MCTrophyClassic) package { import flash.display.*; public dynamic class MCTrophyClassic extends MovieClip { public function MCTrophyClassic(){ addFrameScript(8, frame9, 18, frame19, 28, frame29, 39, frame40); } function frame40(){ stop(); } function frame29(){ stop(); } function frame9(){ stop(); } function frame19(){ stop(); } } }//packageSection 234//MCTrophyCombo (MCTrophyCombo) package { import flash.display.*; public dynamic class MCTrophyCombo extends MovieClip { public function MCTrophyCombo(){ addFrameScript(8, frame9, 18, frame19, 28, frame29, 39, frame40); } function frame40(){ stop(); } function frame29(){ stop(); } function frame9(){ stop(); } function frame19(){ stop(); } } }//packageSection 235//MCTrophyFloors (MCTrophyFloors) package { import flash.display.*; public dynamic class MCTrophyFloors extends MovieClip { public function MCTrophyFloors(){ addFrameScript(8, frame9, 18, frame19, 28, frame29, 39, frame40); } function frame40(){ stop(); } function frame29(){ stop(); } function frame9(){ stop(); } function frame19(){ stop(); } } }//packageSection 236//MCTrophyHello (MCTrophyHello) package { import flash.display.*; public dynamic class MCTrophyHello extends MovieClip { public function MCTrophyHello(){ addFrameScript(8, frame9, 18, frame19, 28, frame29, 39, frame40); } function frame40(){ stop(); } function frame29(){ stop(); } function frame9(){ stop(); } function frame19(){ stop(); } } }//packageSection 237//MCTrophyPopup (MCTrophyPopup) package { import flash.display.*; import flash.text.*; public dynamic class MCTrophyPopup extends MovieClip { public var btn_skip:MCButton; public var header:MCHeader; public var trophy:MovieClip; public var coinBox:MCText; public var textBox:MCText; public var btn_fb:MovieClip; public function MCTrophyPopup(){ addFrameScript(0, frame1); } public function setCoins(_arg1:String){ coinBox.tf_text.htmlText = _arg1; textBox.tf_text.autoSize = TextFieldAutoSize.LEFT; } function frame1(){ } public function setHeader(_arg1:String){ header.setText(_arg1, "center", 220); } public function setText(_arg1:String){ textBox.tf_text.htmlText = _arg1; textBox.tf_text.autoSize = TextFieldAutoSize.CENTER; } } }//packageSection 238//MCTutorial (MCTutorial) package { import flash.display.*; import flash.text.*; public dynamic class MCTutorial extends MovieClip { public var tf_text:TextField; public var btn_right:MovieClip; public var btn_left:MovieClip; public var tf_page:TextField; public var btn_confirm:MovieClip; } }//packageSection 239//MCWallBounce (MCWallBounce) package { import flash.display.*; public dynamic class MCWallBounce extends MovieClip { } }//packageSection 240//MyPreLoader (MyPreLoader) package { import flash.events.*; import flash.display.*; import flash.utils.*; public class MyPreLoader extends MovieClip { private var _gfx:MovieClip;// = null public function MyPreLoader(){ stop(); _gfx = new MCLoadingScreen(); _gfx.loadingBar.stop(); addChild(_gfx); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function init():void{ var _local2:Object; var _local1:Class = Class(getDefinitionByName("IcyTowerMB")); removeChild(_gfx); if (_local1){ _local2 = new (_local1); addChild((_local2 as DisplayObject)); }; } private function onEnterFrame(_arg1:Event):void{ var _local2:Number; if (framesLoaded == totalFrames){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); init(); } else { _local2 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal); _gfx.loadingBar.gotoAndStop(int((100 * _local2))); }; } } }//packageSection 241//SMusic (SMusic) package { import flash.media.*; public dynamic class SMusic extends Sound { } }//package
Library Items
Symbol 1 Graphic | Used by:13 | |
Symbol 2 Graphic | Used by:3 | |
Symbol 3 MovieClip | Uses:2 | Used by:13 198 |
Symbol 4 Graphic | Used by:13 | |
Symbol 5 Graphic | Used by:10 | |
Symbol 6 Graphic | Used by:7 | |
Symbol 7 MovieClip | Uses:6 | Used by:8 |
Symbol 8 MovieClip | Uses:7 | Used by:10 |
Symbol 9 Graphic | Used by:10 | |
Symbol 10 MovieClip | Uses:5 8 9 | Used by:13 |
Symbol 11 Bitmap | Used by:12 | |
Symbol 12 Graphic | Uses:11 | Used by:13 |
Symbol 13 MovieClip {MCLoadingScreen} [MCLoadingScreen] | Uses:1 3 4 10 12 | |
Symbol 14 Graphic | Used by:15 | |
Symbol 15 MovieClip {MCTowerExport_fla.bg_bricks_3} [MCTowerExport_fla.bg_bricks_3] | Uses:14 | Used by:18 |
Symbol 16 Graphic | Used by:17 | |
Symbol 17 MovieClip | Uses:16 | Used by:18 |
Symbol 18 MovieClip {MCBackground} [MCBackground] | Uses:15 17 | Used by:76 |
Symbol 19 Graphic | Used by:20 | |
Symbol 20 MovieClip {MCSideBlock} [MCSideBlock] | Uses:19 | Used by:33 76 |
Symbol 21 Graphic | Used by:33 | |
Symbol 22 Graphic | Used by:23 | |
Symbol 23 MovieClip | Uses:22 | Used by:33 |
Symbol 24 Graphic | Used by:25 | |
Symbol 25 MovieClip | Uses:24 | Used by:33 |
Symbol 26 Graphic | Used by:33 | |
Symbol 27 Graphic | Used by:33 | |
Symbol 28 Graphic | Used by:33 | |
Symbol 29 Graphic | Used by:33 | |
Symbol 30 Graphic | Used by:33 | |
Symbol 31 Graphic | Used by:33 | |
Symbol 32 Graphic | Used by:33 | |
Symbol 33 MovieClip {MCFloors} [MCFloors] | Uses:20 21 23 25 26 27 28 29 30 31 32 | Used by:76 |
Symbol 34 Graphic | Used by:40 45 | |
Symbol 35 Graphic | Used by:40 | |
Symbol 36 Graphic | Used by:40 | |
Symbol 37 Graphic | Used by:40 | |
Symbol 38 Graphic | Used by:40 | |
Symbol 39 Graphic | Used by:40 | |
Symbol 40 MovieClip {MCSigns} [MCSigns] | Uses:34 35 36 37 38 39 | Used by:76 |
Symbol 41 Graphic | Used by:45 | |
Symbol 42 Graphic | Used by:45 | |
Symbol 43 Graphic | Used by:45 | |
Symbol 44 Graphic | Used by:45 | |
Symbol 45 MovieClip {MCFloorBreak} [MCFloorBreak] | Uses:34 41 42 43 44 | Used by:76 |
Symbol 46 Graphic | Used by:47 | |
Symbol 47 MovieClip | Uses:46 | Used by:55 56 57 58 59 |
Symbol 48 Graphic | Used by:55 56 57 58 59 | |
Symbol 49 Graphic | Used by:50 | |
Symbol 50 MovieClip | Uses:49 | Used by:55 56 57 58 59 |
Symbol 51 Graphic | Used by:52 | |
Symbol 52 MovieClip | Uses:51 | Used by:55 56 57 58 59 |
Symbol 53 Graphic | Used by:54 | |
Symbol 54 MovieClip | Uses:53 | Used by:55 56 57 58 59 |
Symbol 55 MovieClip {MCLand1} [MCLand1] | Uses:47 48 50 52 54 | Used by:76 |
Symbol 56 MovieClip {MCLand2} [MCLand2] | Uses:47 48 50 52 54 | Used by:76 |
Symbol 57 MovieClip {MCLand3} [MCLand3] | Uses:47 48 50 52 54 | Used by:76 |
Symbol 58 MovieClip {MCLand4} [MCLand4] | Uses:47 48 50 52 54 | Used by:76 |
Symbol 59 MovieClip {MCLand5} [MCLand5] | Uses:47 48 50 52 54 | Used by:76 |
Symbol 60 Graphic | Used by:68 | |
Symbol 61 Graphic | Used by:68 | |
Symbol 62 Graphic | Used by:68 | |
Symbol 63 Graphic | Used by:68 | |
Symbol 64 Graphic | Used by:68 | |
Symbol 65 Graphic | Used by:68 | |
Symbol 66 Graphic | Used by:68 | |
Symbol 67 Graphic | Used by:68 | |
Symbol 68 MovieClip {MCTrail} [MCTrail] | Uses:60 61 62 63 64 65 66 67 | Used by:76 |
Symbol 69 Graphic | Used by:74 | |
Symbol 70 Graphic | Used by:74 | |
Symbol 71 Graphic | Used by:74 | |
Symbol 72 Graphic | Used by:74 | |
Symbol 73 Graphic | Used by:74 | |
Symbol 74 MovieClip {MCWallBounce} [MCWallBounce] | Uses:69 70 71 72 73 | Used by:76 |
Symbol 75 Sound {SMusic} [SMusic] | Used by:76 | |
Symbol 76 MovieClip {MCTowerExport} [MCTowerExport] | Uses:18 33 40 20 45 55 56 57 58 59 68 74 75 | |
Symbol 77 Bitmap | Used by:78 | |
Symbol 78 Graphic | Uses:77 | Used by:79 |
Symbol 79 MovieClip {MCSleepingHarold} [MCSleepingHarold] | Uses:78 | Used by:281 |
Symbol 80 Graphic | Used by:88 | |
Symbol 81 Graphic | Used by:88 | |
Symbol 82 Graphic | Used by:88 | |
Symbol 83 Font | Used by:84 97 98 214 215 255 | |
Symbol 84 EditableText | Uses:83 | Used by:85 |
Symbol 85 MovieClip | Uses:84 | Used by:86 |
Symbol 86 MovieClip {MCMenuExport_fla.MCBasicShadowedTHolder_5} [MCMenuExport_fla.MCBasicShadowedTHolder_5] | Uses:85 | Used by:87 |
Symbol 87 MovieClip {MCHeader} [MCHeader] | Uses:86 | Used by:88 90 158 171 232 243 256 280 |
Symbol 88 MovieClip {MCGameFriendMessage} [MCGameFriendMessage] | Uses:80 81 82 87 | Used by:281 |
Symbol 89 Graphic | Used by:90 261 264 267 270 | |
Symbol 90 MovieClip {MCGameStandardMessage} [MCGameStandardMessage] | Uses:89 87 | Used by:281 |
Symbol 91 Graphic | Used by:95 | |
Symbol 92 Graphic | Used by:93 | |
Symbol 93 MovieClip | Uses:92 | Used by:95 |
Symbol 94 Graphic | Used by:95 | |
Symbol 95 MovieClip | Uses:91 93 94 | Used by:120 |
Symbol 96 Graphic | Used by:120 | |
Symbol 97 EditableText | Uses:83 | Used by:120 |
Symbol 98 EditableText | Uses:83 | Used by:120 |
Symbol 99 Graphic | Used by:107 145 | |
Symbol 100 Graphic | Used by:107 145 | |
Symbol 101 Graphic | Used by:107 145 | |
Symbol 102 Graphic | Used by:107 145 | |
Symbol 103 Graphic | Used by:107 | |
Symbol 104 Graphic | Used by:107 145 | |
Symbol 105 Graphic | Used by:107 145 | |
Symbol 106 Graphic | Used by:107 | |
Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] | Uses:99 100 101 102 103 104 105 106 | Used by:120 192 |
Symbol 108 Graphic | Used by:112 | |
Symbol 109 Graphic | Used by:112 | |
Symbol 110 Graphic | Used by:112 | |
Symbol 111 Graphic | Used by:112 | |
Symbol 112 MovieClip {MCMenuExport_fla.shopArrowRight_12} [MCMenuExport_fla.shopArrowRight_12] | Uses:108 109 110 111 | Used by:120 |
Symbol 113 Graphic | Used by:120 | |
Symbol 114 Graphic | Used by:120 | |
Symbol 115 Graphic | Used by:120 | |
Symbol 116 Graphic | Used by:120 | |
Symbol 117 Graphic | Used by:118 | |
Symbol 118 MovieClip | Uses:117 | Used by:120 |
Symbol 119 Graphic | Used by:120 | |
Symbol 120 MovieClip {MCTutorial} [MCTutorial] | Uses:95 96 97 98 107 112 113 114 115 116 118 119 | Used by:281 |
Symbol 121 Graphic | Used by:122 | |
Symbol 122 MovieClip | Uses:121 | Used by:126 |
Symbol 123 Font | Used by:124 | |
Symbol 124 EditableText | Uses:123 | Used by:125 |
Symbol 125 MovieClip {MCText} [MCText] | Uses:124 | Used by:126 159 194 273 276 280 |
Symbol 126 MovieClip {MCToolTip} [MCToolTip] | Uses:122 125 | Used by:281 |
Symbol 127 Graphic | Used by:129 | |
Symbol 128 Graphic | Used by:129 185 | |
Symbol 129 MovieClip {MCMenuExport_fla.MCStaticButton_19} [MCMenuExport_fla.MCStaticButton_19] | Uses:127 128 | Used by:131 133 135 137 |
Symbol 130 Graphic | Used by:131 | |
Symbol 131 MovieClip {MCMenuExport_fla.MCStaticHomeButton_18} [MCMenuExport_fla.MCStaticHomeButton_18] | Uses:129 130 | Used by:138 |
Symbol 132 Graphic | Used by:133 | |
Symbol 133 MovieClip {MCMenuExport_fla.MCStaticQualityButton_20} [MCMenuExport_fla.MCStaticQualityButton_20] | Uses:129 132 | Used by:138 |
Symbol 134 Graphic | Used by:135 | |
Symbol 135 MovieClip {MCMenuExport_fla.MCStaticSoundButton_21} [MCMenuExport_fla.MCStaticSoundButton_21] | Uses:129 134 | Used by:138 |
Symbol 136 Graphic | Used by:137 | |
Symbol 137 MovieClip {MCMenuExport_fla.MCStaticMusicButton_22} [MCMenuExport_fla.MCStaticMusicButton_22] | Uses:129 136 | Used by:138 |
Symbol 138 MovieClip {MCStaticMenu} [MCStaticMenu] | Uses:131 133 135 137 | Used by:281 |
Symbol 139 Graphic | Used by:171 | |
Symbol 140 Graphic | Used by:141 | |
Symbol 141 MovieClip | Uses:140 | Used by:171 |
Symbol 142 Graphic | Used by:145 151 180 | |
Symbol 143 Graphic | Used by:145 | |
Symbol 144 Graphic | Used by:145 | |
Symbol 145 MovieClip {MCMenuExport_fla.MCPostGameReplayButton_25} [MCMenuExport_fla.MCPostGameReplayButton_25] | Uses:99 100 101 102 142 143 104 105 144 | Used by:171 |
Symbol 146 Graphic | Used by:151 180 | |
Symbol 147 Graphic | Used by:151 180 | |
Symbol 148 Graphic | Used by:151 | |
Symbol 149 Graphic | Used by:151 180 | |
Symbol 150 Graphic | Used by:151 180 | |
Symbol 151 MovieClip {MCMenuExport_fla.MCPostGameExitButton_26} [MCMenuExport_fla.MCPostGameExitButton_26] | Uses:146 147 142 148 149 150 | Used by:171 |
Symbol 152 Graphic | Used by:159 | |
Symbol 153 Graphic | Used by:157 | |
Symbol 154 Graphic | Used by:157 | |
Symbol 155 Graphic | Used by:157 | |
Symbol 156 Graphic | Used by:157 | |
Symbol 157 MovieClip {MCMenuExport_fla.buttonGfx_29} [MCMenuExport_fla.buttonGfx_29] | Uses:153 154 155 156 | Used by:158 |
Symbol 158 MovieClip {MCButton} [MCButton] | Uses:157 87 | Used by:159 256 280 |
Symbol 159 MovieClip | Uses:152 158 125 | Used by:171 |
Symbol 160 Graphic | Used by:164 | |
Symbol 161 Graphic | Used by:164 167 170 | |
Symbol 162 Graphic | Used by:164 | |
Symbol 163 Graphic | Used by:164 167 170 | |
Symbol 164 MovieClip | Uses:160 161 162 163 | Used by:171 |
Symbol 165 Graphic | Used by:167 | |
Symbol 166 Graphic | Used by:167 | |
Symbol 167 MovieClip | Uses:165 161 166 163 | Used by:171 |
Symbol 168 Graphic | Used by:170 | |
Symbol 169 Graphic | Used by:170 | |
Symbol 170 MovieClip | Uses:168 161 169 163 | Used by:171 |
Symbol 171 MovieClip {MCPostGame} [MCPostGame] | Uses:139 141 145 151 159 164 167 170 87 | Used by:281 |
Symbol 172 Graphic | Used by:173 | |
Symbol 173 MovieClip | Uses:172 | Used by:192 |
Symbol 174 Graphic | Used by:175 | |
Symbol 175 MovieClip | Uses:174 | Used by:192 |
Symbol 176 MovieClip | Used by:192 | |
Symbol 177 Graphic | Used by:178 | |
Symbol 178 MovieClip | Uses:177 | Used by:192 |
Symbol 179 Graphic | Used by:180 | |
Symbol 180 MovieClip {MCMenuExport_fla.MCCancelButton_38} [MCMenuExport_fla.MCCancelButton_38] | Uses:146 147 142 179 149 150 | Used by:192 |
Symbol 181 Graphic | Used by:182 | |
Symbol 182 MovieClip | Uses:181 | Used by:192 |
Symbol 183 Graphic | Used by:185 | |
Symbol 184 Graphic | Used by:185 | |
Symbol 185 MovieClip {MCMenuExport_fla.MCScrollButtonGfx_41} [MCMenuExport_fla.MCScrollButtonGfx_41] | Uses:183 184 128 | Used by:187 188 191 |
Symbol 186 Graphic | Used by:187 | |
Symbol 187 MovieClip {MCMenuExport_fla.MCScrollButtonUp_40} [MCMenuExport_fla.MCScrollButtonUp_40] | Uses:185 186 | Used by:192 |
Symbol 188 MovieClip {MCMenuExport_fla.MCScrollButtonCenter_42} [MCMenuExport_fla.MCScrollButtonCenter_42] | Uses:185 | Used by:192 |
Symbol 189 Graphic | Used by:191 | |
Symbol 190 Graphic | Used by:191 | |
Symbol 191 MovieClip {MCMenuExport_fla.MCScrollButtonDown_43} [MCMenuExport_fla.MCScrollButtonDown_43] | Uses:185 189 190 | Used by:192 |
Symbol 192 MovieClip {MCPopup} [MCPopup] | Uses:173 175 176 178 107 180 182 187 188 191 | Used by:281 |
Symbol 193 Graphic | Used by:194 | |
Symbol 194 MovieClip {MCDebugPopup} [MCDebugPopup] | Uses:193 125 | Used by:281 |
Symbol 195 Graphic | Used by:253 | |
Symbol 196 Graphic | Used by:198 | |
Symbol 197 Graphic | Used by:198 | |
Symbol 198 MovieClip | Uses:196 3 197 | Used by:253 |
Symbol 199 Graphic | Used by:209 | |
Symbol 200 Graphic | Used by:201 | |
Symbol 201 MovieClip | Uses:200 | Used by:209 280 |
Symbol 202 Graphic | Used by:209 | |
Symbol 203 Graphic | Used by:209 | |
Symbol 204 Graphic | Used by:209 | |
Symbol 205 Graphic | Used by:209 | |
Symbol 206 Graphic | Used by:209 | |
Symbol 207 Graphic | Used by:209 | |
Symbol 208 Graphic | Used by:209 | |
Symbol 209 MovieClip | Uses:199 201 202 203 204 205 206 207 208 | Used by:253 |
Symbol 210 Bitmap | Used by:212 | |
Symbol 211 Bitmap | Used by:212 | |
Symbol 212 Graphic | Uses:210 211 | Used by:253 |
Symbol 213 Graphic | Used by:216 | |
Symbol 214 Text | Uses:83 | Used by:216 |
Symbol 215 Text | Uses:83 | Used by:216 |
Symbol 216 MovieClip | Uses:213 214 215 | Used by:253 |
Symbol 217 Graphic | Used by:226 | |
Symbol 218 Bitmap | Used by:219 254 | |
Symbol 219 Graphic | Uses:218 | Used by:226 |
Symbol 220 Bitmap | Used by:221 254 | |
Symbol 221 Graphic | Uses:220 | Used by:226 |
Symbol 222 Bitmap | Used by:223 254 | |
Symbol 223 Graphic | Uses:222 | Used by:226 |
Symbol 224 Bitmap | Used by:225 254 | |
Symbol 225 Graphic | Uses:224 | Used by:226 |
Symbol 226 MovieClip | Uses:217 219 221 223 225 | Used by:253 |
Symbol 227 Graphic | Used by:231 | |
Symbol 228 Graphic | Used by:231 | |
Symbol 229 Graphic | Used by:231 | |
Symbol 230 Graphic | Used by:231 | |
Symbol 231 MovieClip {MCMenuExport_fla.buttonGfxGreen_53} [MCMenuExport_fla.buttonGfxGreen_53] | Uses:227 228 229 230 | Used by:232 |
Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] | Uses:231 87 | Used by:253 256 280 |
Symbol 233 Graphic | Used by:243 | |
Symbol 234 Graphic | Used by:239 | |
Symbol 235 Graphic | Used by:239 | |
Symbol 236 Graphic | Used by:239 | |
Symbol 237 Graphic | Used by:239 | |
Symbol 238 Graphic | Used by:239 | |
Symbol 239 MovieClip | Uses:234 235 236 237 238 | Used by:243 |
Symbol 240 Graphic | Used by:243 | |
Symbol 241 Graphic | Used by:243 | |
Symbol 242 Graphic | Used by:243 | |
Symbol 243 MovieClip {MCMenuExport_fla.MCMenuButton_Play_54} [MCMenuExport_fla.MCMenuButton_Play_54] | Uses:233 87 239 240 241 242 | Used by:253 |
Symbol 244 Graphic | Used by:245 | |
Symbol 245 MovieClip | Uses:244 | Used by:253 |
Symbol 246 Graphic | Used by:252 | |
Symbol 247 Graphic | Used by:252 | |
Symbol 248 Graphic | Used by:252 | |
Symbol 249 Graphic | Used by:252 | |
Symbol 250 Graphic | Used by:252 | |
Symbol 251 Graphic | Used by:252 | |
Symbol 252 MovieClip | Uses:246 247 248 249 250 251 | Used by:253 |
Symbol 253 MovieClip {MCMainMenu} [MCMainMenu] | Uses:195 198 209 212 216 226 232 243 245 252 | Used by:281 |
Symbol 254 Graphic | Uses:224 218 222 220 | Used by:256 |
Symbol 255 Text | Uses:83 | Used by:256 |
Symbol 256 MovieClip {MCTopPopup} [MCTopPopup] | Uses:254 255 158 232 87 | Used by:281 |
Symbol 257 Graphic | Used by:258 | |
Symbol 258 MovieClip | Uses:257 | Used by:261 264 267 270 |
Symbol 259 Graphic | Used by:260 | |
Symbol 260 MovieClip | Uses:259 | Used by:261 |
Symbol 261 MovieClip {MCTrophyCombo} [MCTrophyCombo] | Uses:258 89 260 | Used by:281 |
Symbol 262 Graphic | Used by:263 | |
Symbol 263 MovieClip | Uses:262 | Used by:264 |
Symbol 264 MovieClip {MCTrophyClassic} [MCTrophyClassic] | Uses:258 89 263 | Used by:281 |
Symbol 265 Graphic | Used by:266 | |
Symbol 266 MovieClip | Uses:265 | Used by:267 |
Symbol 267 MovieClip {MCTrophyHello} [MCTrophyHello] | Uses:258 89 266 | Used by:281 |
Symbol 268 Graphic | Used by:269 | |
Symbol 269 MovieClip | Uses:268 | Used by:270 |
Symbol 270 MovieClip {MCTrophyFloors} [MCTrophyFloors] | Uses:258 89 269 | Used by:281 |
Symbol 271 Graphic | Used by:272 | |
Symbol 272 MovieClip {gfxBubble} [gfxBubble] | Uses:271 | Used by:273 |
Symbol 273 MovieClip {MCSpeechBubble} [MCSpeechBubble] | Uses:272 125 | Used by:281 |
Symbol 274 Graphic | Used by:275 | |
Symbol 275 MovieClip | Uses:274 | Used by:276 |
Symbol 276 MovieClip {MCSpeechBubble2} [MCSpeechBubble2] | Uses:275 125 | Used by:281 |
Symbol 277 Graphic | Used by:280 | |
Symbol 278 Graphic | Used by:279 | |
Symbol 279 MovieClip {MCCoin} [MCCoin] | Uses:278 | Used by:280 |
Symbol 280 MovieClip {MCTrophyPopup} [MCTrophyPopup] | Uses:277 279 125 158 232 87 201 | Used by:281 |
Symbol 281 MovieClip {MCMenuExport} [MCMenuExport] | Uses:79 88 90 120 126 138 171 192 194 253 256 261 264 267 270 273 276 280 | |
Symbol 282 ShapeTweening | Used by:285 | |
Symbol 283 Graphic | Used by:285 | |
Symbol 284 Graphic | Used by:285 | |
Symbol 285 MovieClip {MCCoinPickup} [MCCoinPickup] | Uses:282 283 284 | Used by:338 |
Symbol 286 Graphic | Used by:287 | |
Symbol 287 MovieClip | Uses:286 | Used by:288 |
Symbol 288 MovieClip {MCClock} [MCClock] | Uses:287 | Used by:329 |
Symbol 289 Graphic | Used by:290 | |
Symbol 290 MovieClip | Uses:289 | Used by:291 |
Symbol 291 MovieClip {MCComboMeter} [MCComboMeter] | Uses:290 | Used by:329 |
Symbol 292 Graphic | Used by:303 326 | |
Symbol 293 Graphic | Used by:303 | |
Symbol 294 Graphic | Used by:303 | |
Symbol 295 Graphic | Used by:303 | |
Symbol 296 Graphic | Used by:303 | |
Symbol 297 Graphic | Used by:303 | |
Symbol 298 Graphic | Used by:303 | |
Symbol 299 Graphic | Used by:303 | |
Symbol 300 Graphic | Used by:303 | |
Symbol 301 Graphic | Used by:303 | |
Symbol 302 Graphic | Used by:303 | |
Symbol 303 MovieClip | Uses:292 293 294 295 296 297 298 299 300 301 302 | Used by:304 |
Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] | Uses:303 | Used by:329 |
Symbol 305 Graphic | Used by:306 | |
Symbol 306 MovieClip | Uses:305 | Used by:329 |
Symbol 307 Graphic | Used by:310 | |
Symbol 308 Graphic | Used by:309 | |
Symbol 309 MovieClip | Uses:308 | Used by:310 |
Symbol 310 MovieClip | Uses:307 309 | Used by:329 |
Symbol 311 Graphic | Used by:315 | |
Symbol 312 Graphic | Used by:313 | |
Symbol 313 MovieClip | Uses:312 | Used by:315 |
Symbol 314 Graphic | Used by:315 | |
Symbol 315 MovieClip | Uses:311 313 314 | Used by:329 |
Symbol 316 Graphic | Used by:326 | |
Symbol 317 Graphic | Used by:326 | |
Symbol 318 Graphic | Used by:326 | |
Symbol 319 Graphic | Used by:326 | |
Symbol 320 Graphic | Used by:326 | |
Symbol 321 Graphic | Used by:326 | |
Symbol 322 Graphic | Used by:326 | |
Symbol 323 Graphic | Used by:326 | |
Symbol 324 Graphic | Used by:326 | |
Symbol 325 Graphic | Used by:326 | |
Symbol 326 MovieClip | Uses:292 316 317 318 319 320 321 322 323 324 325 | Used by:327 |
Symbol 327 MovieClip | Uses:326 | Used by:328 |
Symbol 328 MovieClip {gameExport_fla.MCCombo_15} [gameExport_fla.MCCombo_15] | Uses:327 | Used by:329 337 |
Symbol 329 MovieClip {MCHud} [MCHud] | Uses:288 291 304 306 310 315 328 | Used by:338 |
Symbol 330 Bitmap | Used by:331 335 | |
Symbol 331 Graphic | Uses:330 | Used by:337 |
Symbol 332 Graphic | Used by:333 | |
Symbol 333 MovieClip | Uses:332 | Used by:337 |
Symbol 334 Graphic | Used by:337 | |
Symbol 335 Graphic | Uses:330 | Used by:337 |
Symbol 336 Graphic | Used by:337 | |
Symbol 337 MovieClip {MCFriendArrow} [MCFriendArrow] | Uses:331 333 334 328 335 336 | Used by:338 |
Symbol 338 MovieClip {MCGameExport} [MCGameExport] | Uses:285 329 337 | |
Symbol 339 Sound {menu.mp3} [menu.mp3] | Used by:368 | |
Symbol 340 Sound {mouseclick.wav} [mouseclick.wav] | Used by:368 | |
Symbol 341 Sound {mouseout.wav} [mouseout.wav] | Used by:368 | |
Symbol 342 Sound {mouseover.wav} [mouseover.wav] | Used by:368 | |
Symbol 343 Sound {popdown.wav} [popdown.wav] | Used by:368 | |
Symbol 344 Sound {popup.wav} [popup.wav] | Used by:368 | |
Symbol 345 Sound {tooltip.wav} [tooltip.wav] | Used by:368 | |
Symbol 346 Sound {clock.wav} [clock.wav] | Used by:368 | |
Symbol 347 Sound {combojumpboy_1.wav} [combojumpboy_1.wav] | Used by:368 | |
Symbol 348 Sound {combojumpboy_2.wav} [combojumpboy_2.wav] | Used by:368 | |
Symbol 349 Sound {combojumpboy_3.wav} [combojumpboy_3.wav] | Used by:368 | |
Symbol 350 Sound {falldownboy.wav} [falldownboy.wav] | Used by:368 | |
Symbol 351 Sound {heavyland_1.wav} [heavyland_1.wav] | Used by:368 | |
Symbol 352 Sound {heavyland_2.wav} [heavyland_2.wav] | Used by:368 | |
Symbol 353 Sound {heavyland_3.wav} [heavyland_3.wav] | Used by:368 | |
Symbol 354 Sound {jumpboy_1.wav} [jumpboy_1.wav] | Used by:368 | |
Symbol 355 Sound {jumpboy_2.wav} [jumpboy_2.wav] | Used by:368 | |
Symbol 356 Sound {jumpboy_3.wav} [jumpboy_3.wav] | Used by:368 | |
Symbol 357 Sound {land_1.wav} [land_1.wav] | Used by:368 | |
Symbol 358 Sound {land_2.wav} [land_2.wav] | Used by:368 | |
Symbol 359 Sound {land_3.wav} [land_3.wav] | Used by:368 | |
Symbol 360 Sound {platformshake_1.wav} [platformshake_1.wav] | Used by:368 | |
Symbol 361 Sound {platformshake_2.wav} [platformshake_2.wav] | Used by:368 | |
Symbol 362 Sound {platformshake_3.wav} [platformshake_3.wav] | Used by:368 | |
Symbol 363 Sound {record.wav} [record.wav] | Used by:368 | |
Symbol 364 Sound {trophy.wav} [trophy.wav] | Used by:368 | |
Symbol 365 Sound {wallhit_1.wav} [wallhit_1.wav] | Used by:368 | |
Symbol 366 Sound {wallhit_2.wav} [wallhit_2.wav] | Used by:368 | |
Symbol 367 Sound {wallhit_3.wav} [wallhit_3.wav] | Used by:368 | |
Symbol 368 MovieClip {MCSoundExport} [MCSoundExport] | Uses:339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | |
Symbol 369 BinaryData {itfb.factory.CMyFactory_soundsXML} | ||
Symbol 370 BinaryData {itfb.factory.CMyFactory_languageXML} | ||
Symbol 371 BinaryData {itfb.factory.CMyFactory_settingsXML} | ||
Symbol 372 BinaryData {itfb.factory.CMyFactory_styleSheetCls} | ||
Symbol 373 Bitmap {itfb.factory.CMyFactory_playerCls} | ||
Symbol 374 BinaryData {itfb.factory.CMyFactory_trophiesXML} | ||
Symbol 375 BinaryData {itfb.factory.CMyFactory_towerXML} |
Instance Names
"loadingBar" | Symbol 13 MovieClip {MCLoadingScreen} [MCLoadingScreen] Frame 1 | Symbol 10 MovieClip |
"tf_text" | Symbol 85 MovieClip Frame 1 | Symbol 84 EditableText |
"text2" | Symbol 86 MovieClip {MCMenuExport_fla.MCBasicShadowedTHolder_5} [MCMenuExport_fla.MCBasicShadowedTHolder_5] Frame 1 | Symbol 85 MovieClip |
"text1" | Symbol 86 MovieClip {MCMenuExport_fla.MCBasicShadowedTHolder_5} [MCMenuExport_fla.MCBasicShadowedTHolder_5] Frame 1 | Symbol 85 MovieClip |
"textBox" | Symbol 87 MovieClip {MCHeader} [MCHeader] Frame 1 | Symbol 86 MovieClip {MCMenuExport_fla.MCBasicShadowedTHolder_5} [MCMenuExport_fla.MCBasicShadowedTHolder_5] |
"textBox" | Symbol 88 MovieClip {MCGameFriendMessage} [MCGameFriendMessage] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"textBox" | Symbol 90 MovieClip {MCGameStandardMessage} [MCGameStandardMessage] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"tf_text" | Symbol 120 MovieClip {MCTutorial} [MCTutorial] Frame 1 | Symbol 97 EditableText |
"tf_page" | Symbol 120 MovieClip {MCTutorial} [MCTutorial] Frame 1 | Symbol 98 EditableText |
"btn_confirm" | Symbol 120 MovieClip {MCTutorial} [MCTutorial] Frame 1 | Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] |
"btn_left" | Symbol 120 MovieClip {MCTutorial} [MCTutorial] Frame 1 | Symbol 112 MovieClip {MCMenuExport_fla.shopArrowRight_12} [MCMenuExport_fla.shopArrowRight_12] |
"btn_right" | Symbol 120 MovieClip {MCTutorial} [MCTutorial] Frame 1 | Symbol 112 MovieClip {MCMenuExport_fla.shopArrowRight_12} [MCMenuExport_fla.shopArrowRight_12] |
"tf_text" | Symbol 125 MovieClip {MCText} [MCText] Frame 1 | Symbol 124 EditableText |
"bg" | Symbol 126 MovieClip {MCToolTip} [MCToolTip] Frame 1 | Symbol 122 MovieClip |
"textBox" | Symbol 126 MovieClip {MCToolTip} [MCToolTip] Frame 1 | Symbol 125 MovieClip {MCText} [MCText] |
"button" | Symbol 131 MovieClip {MCMenuExport_fla.MCStaticHomeButton_18} [MCMenuExport_fla.MCStaticHomeButton_18] Frame 1 | Symbol 129 MovieClip {MCMenuExport_fla.MCStaticButton_19} [MCMenuExport_fla.MCStaticButton_19] |
"button" | Symbol 133 MovieClip {MCMenuExport_fla.MCStaticQualityButton_20} [MCMenuExport_fla.MCStaticQualityButton_20] Frame 1 | Symbol 129 MovieClip {MCMenuExport_fla.MCStaticButton_19} [MCMenuExport_fla.MCStaticButton_19] |
"button" | Symbol 135 MovieClip {MCMenuExport_fla.MCStaticSoundButton_21} [MCMenuExport_fla.MCStaticSoundButton_21] Frame 1 | Symbol 129 MovieClip {MCMenuExport_fla.MCStaticButton_19} [MCMenuExport_fla.MCStaticButton_19] |
"button" | Symbol 137 MovieClip {MCMenuExport_fla.MCStaticMusicButton_22} [MCMenuExport_fla.MCStaticMusicButton_22] Frame 1 | Symbol 129 MovieClip {MCMenuExport_fla.MCStaticButton_19} [MCMenuExport_fla.MCStaticButton_19] |
"btn_home" | Symbol 138 MovieClip {MCStaticMenu} [MCStaticMenu] Frame 1 | Symbol 131 MovieClip {MCMenuExport_fla.MCStaticHomeButton_18} [MCMenuExport_fla.MCStaticHomeButton_18] |
"btn_quality" | Symbol 138 MovieClip {MCStaticMenu} [MCStaticMenu] Frame 1 | Symbol 133 MovieClip {MCMenuExport_fla.MCStaticQualityButton_20} [MCMenuExport_fla.MCStaticQualityButton_20] |
"btn_sound" | Symbol 138 MovieClip {MCStaticMenu} [MCStaticMenu] Frame 1 | Symbol 135 MovieClip {MCMenuExport_fla.MCStaticSoundButton_21} [MCMenuExport_fla.MCStaticSoundButton_21] |
"btn_music" | Symbol 138 MovieClip {MCStaticMenu} [MCStaticMenu] Frame 1 | Symbol 137 MovieClip {MCMenuExport_fla.MCStaticMusicButton_22} [MCMenuExport_fla.MCStaticMusicButton_22] |
"button" | Symbol 158 MovieClip {MCButton} [MCButton] Frame 1 | Symbol 157 MovieClip {MCMenuExport_fla.buttonGfx_29} [MCMenuExport_fla.buttonGfx_29] |
"textBox" | Symbol 158 MovieClip {MCButton} [MCButton] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"btn_save" | Symbol 159 MovieClip Frame 1 | Symbol 158 MovieClip {MCButton} [MCButton] |
"saving" | Symbol 159 MovieClip Frame 1 | Symbol 125 MovieClip {MCText} [MCText] |
"btn_replay" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 145 MovieClip {MCMenuExport_fla.MCPostGameReplayButton_25} [MCMenuExport_fla.MCPostGameReplayButton_25] |
"btn_exit" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 151 MovieClip {MCMenuExport_fla.MCPostGameExitButton_26} [MCMenuExport_fla.MCPostGameExitButton_26] |
"saveWindow" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 159 MovieClip |
"score_symbol" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 164 MovieClip |
"combos_symbol" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 167 MovieClip |
"floors_symbol" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 170 MovieClip |
"floors" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"combos" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"score" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"scoreHeader" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"floorHeader" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"comboHeader" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"header" | Symbol 171 MovieClip {MCPostGame} [MCPostGame] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"button" | Symbol 187 MovieClip {MCMenuExport_fla.MCScrollButtonUp_40} [MCMenuExport_fla.MCScrollButtonUp_40] Frame 1 | Symbol 185 MovieClip {MCMenuExport_fla.MCScrollButtonGfx_41} [MCMenuExport_fla.MCScrollButtonGfx_41] |
"button" | Symbol 188 MovieClip {MCMenuExport_fla.MCScrollButtonCenter_42} [MCMenuExport_fla.MCScrollButtonCenter_42] Frame 1 | Symbol 185 MovieClip {MCMenuExport_fla.MCScrollButtonGfx_41} [MCMenuExport_fla.MCScrollButtonGfx_41] |
"button" | Symbol 191 MovieClip {MCMenuExport_fla.MCScrollButtonDown_43} [MCMenuExport_fla.MCScrollButtonDown_43] Frame 1 | Symbol 185 MovieClip {MCMenuExport_fla.MCScrollButtonGfx_41} [MCMenuExport_fla.MCScrollButtonGfx_41] |
"bg" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 173 MovieClip |
"content_mask" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 175 MovieClip |
"container" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 176 MovieClip |
"outline" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 178 MovieClip |
"btn_confirm" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] |
"btn_cancel" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 180 MovieClip {MCMenuExport_fla.MCCancelButton_38} [MCMenuExport_fla.MCCancelButton_38] |
"middle" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 182 MovieClip |
"btn_up" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 187 MovieClip {MCMenuExport_fla.MCScrollButtonUp_40} [MCMenuExport_fla.MCScrollButtonUp_40] |
"btn_center" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 188 MovieClip {MCMenuExport_fla.MCScrollButtonCenter_42} [MCMenuExport_fla.MCScrollButtonCenter_42] |
"btn_down" | Symbol 192 MovieClip {MCPopup} [MCPopup] Frame 1 | Symbol 191 MovieClip {MCMenuExport_fla.MCScrollButtonDown_43} [MCMenuExport_fla.MCScrollButtonDown_43] |
"textBox" | Symbol 194 MovieClip {MCDebugPopup} [MCDebugPopup] Frame 1 | Symbol 125 MovieClip {MCText} [MCText] |
"character" | Symbol 209 MovieClip Frame 1 | Symbol 201 MovieClip |
"button" | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] Frame 1 | Symbol 231 MovieClip {MCMenuExport_fla.buttonGfxGreen_53} [MCMenuExport_fla.buttonGfxGreen_53] |
"textBox" | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"textBox" | Symbol 243 MovieClip {MCMenuExport_fla.MCMenuButton_Play_54} [MCMenuExport_fla.MCMenuButton_Play_54] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"icon1" | Symbol 243 MovieClip {MCMenuExport_fla.MCMenuButton_Play_54} [MCMenuExport_fla.MCMenuButton_Play_54] Frame 1 | Symbol 239 MovieClip |
"tower" | Symbol 253 MovieClip {MCMainMenu} [MCMainMenu] Frame 1 | Symbol 209 MovieClip |
"photo" | Symbol 253 MovieClip {MCMainMenu} [MCMainMenu] Frame 1 | Symbol 226 MovieClip |
"btn_fb" | Symbol 253 MovieClip {MCMainMenu} [MCMainMenu] Frame 1 | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] |
"btn_play" | Symbol 253 MovieClip {MCMainMenu} [MCMainMenu] Frame 1 | Symbol 243 MovieClip {MCMenuExport_fla.MCMenuButton_Play_54} [MCMenuExport_fla.MCMenuButton_Play_54] |
"speechBubble" | Symbol 253 MovieClip {MCMainMenu} [MCMainMenu] Frame 1 | Symbol 245 MovieClip |
"btn_skip" | Symbol 256 MovieClip {MCTopPopup} [MCTopPopup] Frame 1 | Symbol 158 MovieClip {MCButton} [MCButton] |
"btn_fb" | Symbol 256 MovieClip {MCTopPopup} [MCTopPopup] Frame 1 | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] |
"header" | Symbol 256 MovieClip {MCTopPopup} [MCTopPopup] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"bubble" | Symbol 273 MovieClip {MCSpeechBubble} [MCSpeechBubble] Frame 1 | Symbol 272 MovieClip {gfxBubble} [gfxBubble] |
"textBox" | Symbol 273 MovieClip {MCSpeechBubble} [MCSpeechBubble] Frame 1 | Symbol 125 MovieClip {MCText} [MCText] |
"bubble" | Symbol 276 MovieClip {MCSpeechBubble2} [MCSpeechBubble2] Frame 1 | Symbol 275 MovieClip |
"textBox" | Symbol 276 MovieClip {MCSpeechBubble2} [MCSpeechBubble2] Frame 1 | Symbol 125 MovieClip {MCText} [MCText] |
"coinBox" | Symbol 280 MovieClip {MCTrophyPopup} [MCTrophyPopup] Frame 1 | Symbol 125 MovieClip {MCText} [MCText] |
"textBox" | Symbol 280 MovieClip {MCTrophyPopup} [MCTrophyPopup] Frame 1 | Symbol 125 MovieClip {MCText} [MCText] |
"btn_skip" | Symbol 280 MovieClip {MCTrophyPopup} [MCTrophyPopup] Frame 1 | Symbol 158 MovieClip {MCButton} [MCButton] |
"btn_fb" | Symbol 280 MovieClip {MCTrophyPopup} [MCTrophyPopup] Frame 1 | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] |
"header" | Symbol 280 MovieClip {MCTrophyPopup} [MCTrophyPopup] Frame 1 | Symbol 87 MovieClip {MCHeader} [MCHeader] |
"trophy" | Symbol 280 MovieClip {MCTrophyPopup} [MCTrophyPopup] Frame 1 | Symbol 201 MovieClip |
"n1" | Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] Frame 1 | Symbol 303 MovieClip |
"n2" | Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] Frame 1 | Symbol 303 MovieClip |
"n3" | Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] Frame 1 | Symbol 303 MovieClip |
"n4" | Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] Frame 1 | Symbol 303 MovieClip |
"n5" | Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] Frame 1 | Symbol 303 MovieClip |
"n6" | Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] Frame 1 | Symbol 303 MovieClip |
"holder" | Symbol 315 MovieClip Frame 1 | Symbol 313 MovieClip |
"n1" | Symbol 327 MovieClip Frame 1 | Symbol 326 MovieClip |
"n2" | Symbol 327 MovieClip Frame 1 | Symbol 326 MovieClip |
"n3" | Symbol 327 MovieClip Frame 1 | Symbol 326 MovieClip |
"n4" | Symbol 327 MovieClip Frame 1 | Symbol 326 MovieClip |
"n5" | Symbol 327 MovieClip Frame 1 | Symbol 326 MovieClip |
"n6" | Symbol 327 MovieClip Frame 1 | Symbol 326 MovieClip |
"posts" | Symbol 328 MovieClip {gameExport_fla.MCCombo_15} [gameExport_fla.MCCombo_15] Frame 1 | Symbol 327 MovieClip |
"clock" | Symbol 329 MovieClip {MCHud} [MCHud] Frame 1 | Symbol 288 MovieClip {MCClock} [MCClock] |
"combo" | Symbol 329 MovieClip {MCHud} [MCHud] Frame 1 | Symbol 291 MovieClip {MCComboMeter} [MCComboMeter] |
"score" | Symbol 329 MovieClip {MCHud} [MCHud] Frame 1 | Symbol 304 MovieClip {gameExport_fla.MCScore_8} [gameExport_fla.MCScore_8] |
"handle" | Symbol 329 MovieClip {MCHud} [MCHud] Frame 1 | Symbol 306 MovieClip |
"comboMeter" | Symbol 329 MovieClip {MCHud} [MCHud] Frame 1 | Symbol 310 MovieClip |
"comboNumber" | Symbol 329 MovieClip {MCHud} [MCHud] Frame 1 | Symbol 315 MovieClip |
"comboDigits" | Symbol 329 MovieClip {MCHud} [MCHud] Frame 1 | Symbol 328 MovieClip {gameExport_fla.MCCombo_15} [gameExport_fla.MCCombo_15] |
"container" | Symbol 337 MovieClip {MCFriendArrow} [MCFriendArrow] Frame 1 | Symbol 333 MovieClip |
"numbers" | Symbol 337 MovieClip {MCFriendArrow} [MCFriendArrow] Frame 1 | Symbol 328 MovieClip {gameExport_fla.MCCombo_15} [gameExport_fla.MCCombo_15] |
Special Tags
FileAttributes (69) | Timeline Frame 1 | Access network only, Metadata present, AS3. |
SWFMetaData (77) | Timeline Frame 1 | 458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..." |
ScriptLimits (65) | Timeline Frame 1 | MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds |
ExportAssets (56) | Timeline Frame 1 | Symbol 13 as "MCLoadingScreen" |
ExportAssets (56) | Timeline Frame 2 | Symbol 76 as "MCTowerExport" |
ExportAssets (56) | Timeline Frame 2 | Symbol 281 as "MCMenuExport" |
ExportAssets (56) | Timeline Frame 2 | Symbol 338 as "MCGameExport" |
ExportAssets (56) | Timeline Frame 2 | Symbol 368 as "MCSoundExport" |
ExportAssets (56) | Timeline Frame 2 | Symbol 18 as "MCBackground" |
ExportAssets (56) | Timeline Frame 2 | Symbol 74 as "MCWallBounce" |
ExportAssets (56) | Timeline Frame 2 | Symbol 55 as "MCLand1" |
ExportAssets (56) | Timeline Frame 2 | Symbol 58 as "MCLand4" |
ExportAssets (56) | Timeline Frame 2 | Symbol 68 as "MCTrail" |
ExportAssets (56) | Timeline Frame 2 | Symbol 57 as "MCLand3" |
ExportAssets (56) | Timeline Frame 2 | Symbol 20 as "MCSideBlock" |
ExportAssets (56) | Timeline Frame 2 | Symbol 56 as "MCLand2" |
ExportAssets (56) | Timeline Frame 2 | Symbol 40 as "MCSigns" |
ExportAssets (56) | Timeline Frame 2 | Symbol 45 as "MCFloorBreak" |
ExportAssets (56) | Timeline Frame 2 | Symbol 33 as "MCFloors" |
ExportAssets (56) | Timeline Frame 2 | Symbol 59 as "MCLand5" |
ExportAssets (56) | Timeline Frame 2 | Symbol 75 as "SMusic" |
ExportAssets (56) | Timeline Frame 2 | Symbol 138 as "MCStaticMenu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 264 as "MCTrophyClassic" |
ExportAssets (56) | Timeline Frame 2 | Symbol 79 as "MCSleepingHarold" |
ExportAssets (56) | Timeline Frame 2 | Symbol 270 as "MCTrophyFloors" |
ExportAssets (56) | Timeline Frame 2 | Symbol 126 as "MCToolTip" |
ExportAssets (56) | Timeline Frame 2 | Symbol 192 as "MCPopup" |
ExportAssets (56) | Timeline Frame 2 | Symbol 90 as "MCGameStandardMessage" |
ExportAssets (56) | Timeline Frame 2 | Symbol 256 as "MCTopPopup" |
ExportAssets (56) | Timeline Frame 2 | Symbol 253 as "MCMainMenu" |
ExportAssets (56) | Timeline Frame 2 | Symbol 194 as "MCDebugPopup" |
ExportAssets (56) | Timeline Frame 2 | Symbol 261 as "MCTrophyCombo" |
ExportAssets (56) | Timeline Frame 2 | Symbol 267 as "MCTrophyHello" |
ExportAssets (56) | Timeline Frame 2 | Symbol 88 as "MCGameFriendMessage" |
ExportAssets (56) | Timeline Frame 2 | Symbol 280 as "MCTrophyPopup" |
ExportAssets (56) | Timeline Frame 2 | Symbol 273 as "MCSpeechBubble" |
ExportAssets (56) | Timeline Frame 2 | Symbol 276 as "MCSpeechBubble2" |
ExportAssets (56) | Timeline Frame 2 | Symbol 120 as "MCTutorial" |
ExportAssets (56) | Timeline Frame 2 | Symbol 171 as "MCPostGame" |
ExportAssets (56) | Timeline Frame 2 | Symbol 329 as "MCHud" |
ExportAssets (56) | Timeline Frame 2 | Symbol 337 as "MCFriendArrow" |
ExportAssets (56) | Timeline Frame 2 | Symbol 285 as "MCCoinPickup" |
ExportAssets (56) | Timeline Frame 2 | Symbol 349 as "combojumpboy_3.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 344 as "popup.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 366 as "wallhit_2.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 353 as "heavyland_3.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 365 as "wallhit_1.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 363 as "record.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 364 as "trophy.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 367 as "wallhit_3.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 343 as "popdown.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 341 as "mouseout.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 351 as "heavyland_1.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 359 as "land_3.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 347 as "combojumpboy_1.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 358 as "land_2.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 352 as "heavyland_2.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 360 as "platformshake_1.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 345 as "tooltip.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 357 as "land_1.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 346 as "clock.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 350 as "falldownboy.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 355 as "jumpboy_2.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 354 as "jumpboy_1.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 361 as "platformshake_2.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 356 as "jumpboy_3.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 348 as "combojumpboy_2.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 362 as "platformshake_3.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 339 as "menu.mp3" |
ExportAssets (56) | Timeline Frame 2 | Symbol 340 as "mouseclick.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 342 as "mouseover.wav" |
ExportAssets (56) | Timeline Frame 2 | Symbol 15 as "MCTowerExport_fla.bg_bricks_3" |
ExportAssets (56) | Timeline Frame 2 | Symbol 137 as "MCMenuExport_fla.MCStaticMusicButton_22" |
ExportAssets (56) | Timeline Frame 2 | Symbol 135 as "MCMenuExport_fla.MCStaticSoundButton_21" |
ExportAssets (56) | Timeline Frame 2 | Symbol 131 as "MCMenuExport_fla.MCStaticHomeButton_18" |
ExportAssets (56) | Timeline Frame 2 | Symbol 133 as "MCMenuExport_fla.MCStaticQualityButton_20" |
ExportAssets (56) | Timeline Frame 2 | Symbol 125 as "MCText" |
ExportAssets (56) | Timeline Frame 2 | Symbol 188 as "MCMenuExport_fla.MCScrollButtonCenter_42" |
ExportAssets (56) | Timeline Frame 2 | Symbol 187 as "MCMenuExport_fla.MCScrollButtonUp_40" |
ExportAssets (56) | Timeline Frame 2 | Symbol 180 as "MCMenuExport_fla.MCCancelButton_38" |
ExportAssets (56) | Timeline Frame 2 | Symbol 107 as "MCMenuExport_fla.MCComfirmButton_11" |
ExportAssets (56) | Timeline Frame 2 | Symbol 191 as "MCMenuExport_fla.MCScrollButtonDown_43" |
ExportAssets (56) | Timeline Frame 2 | Symbol 87 as "MCHeader" |
ExportAssets (56) | Timeline Frame 2 | Symbol 232 as "MCMenuExport_fla.MCButtonGreen_52" |
ExportAssets (56) | Timeline Frame 2 | Symbol 158 as "MCButton" |
ExportAssets (56) | Timeline Frame 2 | Symbol 243 as "MCMenuExport_fla.MCMenuButton_Play_54" |
ExportAssets (56) | Timeline Frame 2 | Symbol 279 as "MCCoin" |
ExportAssets (56) | Timeline Frame 2 | Symbol 272 as "gfxBubble" |
ExportAssets (56) | Timeline Frame 2 | Symbol 112 as "MCMenuExport_fla.shopArrowRight_12" |
ExportAssets (56) | Timeline Frame 2 | Symbol 151 as "MCMenuExport_fla.MCPostGameExitButton_26" |
ExportAssets (56) | Timeline Frame 2 | Symbol 145 as "MCMenuExport_fla.MCPostGameReplayButton_25" |
ExportAssets (56) | Timeline Frame 2 | Symbol 304 as "gameExport_fla.MCScore_8" |
ExportAssets (56) | Timeline Frame 2 | Symbol 328 as "gameExport_fla.MCCombo_15" |
ExportAssets (56) | Timeline Frame 2 | Symbol 291 as "MCComboMeter" |
ExportAssets (56) | Timeline Frame 2 | Symbol 288 as "MCClock" |
ExportAssets (56) | Timeline Frame 2 | Symbol 129 as "MCMenuExport_fla.MCStaticButton_19" |
ExportAssets (56) | Timeline Frame 2 | Symbol 185 as "MCMenuExport_fla.MCScrollButtonGfx_41" |
ExportAssets (56) | Timeline Frame 2 | Symbol 86 as "MCMenuExport_fla.MCBasicShadowedTHolder_5" |
ExportAssets (56) | Timeline Frame 2 | Symbol 231 as "MCMenuExport_fla.buttonGfxGreen_53" |
ExportAssets (56) | Timeline Frame 2 | Symbol 157 as "MCMenuExport_fla.buttonGfx_29" |
SerialNumber (41) | Timeline Frame 1 |
Labels
"MyPreLoader" | Frame 1 |
"IcyTowerMB" | Frame 2 |
"out" | Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] Frame 1 |
"over" | Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] Frame 10 |
"down" | Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] Frame 15 |
"disabled" | Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] Frame 25 |
"enabled" | Symbol 107 MovieClip {MCMenuExport_fla.MCComfirmButton_11} [MCMenuExport_fla.MCComfirmButton_11] Frame 35 |
"out" | Symbol 112 MovieClip {MCMenuExport_fla.shopArrowRight_12} [MCMenuExport_fla.shopArrowRight_12] Frame 1 |
"over" | Symbol 112 MovieClip {MCMenuExport_fla.shopArrowRight_12} [MCMenuExport_fla.shopArrowRight_12] Frame 5 |
"down" | Symbol 112 MovieClip {MCMenuExport_fla.shopArrowRight_12} [MCMenuExport_fla.shopArrowRight_12] Frame 10 |
"enabled" | Symbol 129 MovieClip {MCMenuExport_fla.MCStaticButton_19} [MCMenuExport_fla.MCStaticButton_19] Frame 1 |
"disabled" | Symbol 129 MovieClip {MCMenuExport_fla.MCStaticButton_19} [MCMenuExport_fla.MCStaticButton_19] Frame 10 |
"out" | Symbol 131 MovieClip {MCMenuExport_fla.MCStaticHomeButton_18} [MCMenuExport_fla.MCStaticHomeButton_18] Frame 1 |
"over" | Symbol 131 MovieClip {MCMenuExport_fla.MCStaticHomeButton_18} [MCMenuExport_fla.MCStaticHomeButton_18] Frame 10 |
"down" | Symbol 131 MovieClip {MCMenuExport_fla.MCStaticHomeButton_18} [MCMenuExport_fla.MCStaticHomeButton_18] Frame 25 |
"out" | Symbol 133 MovieClip {MCMenuExport_fla.MCStaticQualityButton_20} [MCMenuExport_fla.MCStaticQualityButton_20] Frame 1 |
"over" | Symbol 133 MovieClip {MCMenuExport_fla.MCStaticQualityButton_20} [MCMenuExport_fla.MCStaticQualityButton_20] Frame 10 |
"down" | Symbol 133 MovieClip {MCMenuExport_fla.MCStaticQualityButton_20} [MCMenuExport_fla.MCStaticQualityButton_20] Frame 25 |
"out" | Symbol 135 MovieClip {MCMenuExport_fla.MCStaticSoundButton_21} [MCMenuExport_fla.MCStaticSoundButton_21] Frame 1 |
"over" | Symbol 135 MovieClip {MCMenuExport_fla.MCStaticSoundButton_21} [MCMenuExport_fla.MCStaticSoundButton_21] Frame 10 |
"down" | Symbol 135 MovieClip {MCMenuExport_fla.MCStaticSoundButton_21} [MCMenuExport_fla.MCStaticSoundButton_21] Frame 25 |
"out" | Symbol 137 MovieClip {MCMenuExport_fla.MCStaticMusicButton_22} [MCMenuExport_fla.MCStaticMusicButton_22] Frame 1 |
"over" | Symbol 137 MovieClip {MCMenuExport_fla.MCStaticMusicButton_22} [MCMenuExport_fla.MCStaticMusicButton_22] Frame 10 |
"down" | Symbol 137 MovieClip {MCMenuExport_fla.MCStaticMusicButton_22} [MCMenuExport_fla.MCStaticMusicButton_22] Frame 25 |
"out" | Symbol 145 MovieClip {MCMenuExport_fla.MCPostGameReplayButton_25} [MCMenuExport_fla.MCPostGameReplayButton_25] Frame 1 |
"over" | Symbol 145 MovieClip {MCMenuExport_fla.MCPostGameReplayButton_25} [MCMenuExport_fla.MCPostGameReplayButton_25] Frame 10 |
"down" | Symbol 145 MovieClip {MCMenuExport_fla.MCPostGameReplayButton_25} [MCMenuExport_fla.MCPostGameReplayButton_25] Frame 15 |
"disabled" | Symbol 145 MovieClip {MCMenuExport_fla.MCPostGameReplayButton_25} [MCMenuExport_fla.MCPostGameReplayButton_25] Frame 25 |
"enabled" | Symbol 145 MovieClip {MCMenuExport_fla.MCPostGameReplayButton_25} [MCMenuExport_fla.MCPostGameReplayButton_25] Frame 35 |
"out" | Symbol 151 MovieClip {MCMenuExport_fla.MCPostGameExitButton_26} [MCMenuExport_fla.MCPostGameExitButton_26] Frame 1 |
"over" | Symbol 151 MovieClip {MCMenuExport_fla.MCPostGameExitButton_26} [MCMenuExport_fla.MCPostGameExitButton_26] Frame 10 |
"down" | Symbol 151 MovieClip {MCMenuExport_fla.MCPostGameExitButton_26} [MCMenuExport_fla.MCPostGameExitButton_26] Frame 15 |
"out" | Symbol 157 MovieClip {MCMenuExport_fla.buttonGfx_29} [MCMenuExport_fla.buttonGfx_29] Frame 1 |
"over" | Symbol 157 MovieClip {MCMenuExport_fla.buttonGfx_29} [MCMenuExport_fla.buttonGfx_29] Frame 5 |
"down" | Symbol 157 MovieClip {MCMenuExport_fla.buttonGfx_29} [MCMenuExport_fla.buttonGfx_29] Frame 10 |
"out" | Symbol 158 MovieClip {MCButton} [MCButton] Frame 1 |
"over" | Symbol 158 MovieClip {MCButton} [MCButton] Frame 5 |
"down" | Symbol 158 MovieClip {MCButton} [MCButton] Frame 10 |
"out" | Symbol 180 MovieClip {MCMenuExport_fla.MCCancelButton_38} [MCMenuExport_fla.MCCancelButton_38] Frame 1 |
"over" | Symbol 180 MovieClip {MCMenuExport_fla.MCCancelButton_38} [MCMenuExport_fla.MCCancelButton_38] Frame 10 |
"down" | Symbol 180 MovieClip {MCMenuExport_fla.MCCancelButton_38} [MCMenuExport_fla.MCCancelButton_38] Frame 15 |
"enabled" | Symbol 185 MovieClip {MCMenuExport_fla.MCScrollButtonGfx_41} [MCMenuExport_fla.MCScrollButtonGfx_41] Frame 1 |
"disabled" | Symbol 185 MovieClip {MCMenuExport_fla.MCScrollButtonGfx_41} [MCMenuExport_fla.MCScrollButtonGfx_41] Frame 10 |
"out" | Symbol 187 MovieClip {MCMenuExport_fla.MCScrollButtonUp_40} [MCMenuExport_fla.MCScrollButtonUp_40] Frame 1 |
"over" | Symbol 187 MovieClip {MCMenuExport_fla.MCScrollButtonUp_40} [MCMenuExport_fla.MCScrollButtonUp_40] Frame 10 |
"down" | Symbol 187 MovieClip {MCMenuExport_fla.MCScrollButtonUp_40} [MCMenuExport_fla.MCScrollButtonUp_40] Frame 25 |
"out" | Symbol 188 MovieClip {MCMenuExport_fla.MCScrollButtonCenter_42} [MCMenuExport_fla.MCScrollButtonCenter_42] Frame 1 |
"over" | Symbol 188 MovieClip {MCMenuExport_fla.MCScrollButtonCenter_42} [MCMenuExport_fla.MCScrollButtonCenter_42] Frame 10 |
"down" | Symbol 188 MovieClip {MCMenuExport_fla.MCScrollButtonCenter_42} [MCMenuExport_fla.MCScrollButtonCenter_42] Frame 25 |
"out" | Symbol 191 MovieClip {MCMenuExport_fla.MCScrollButtonDown_43} [MCMenuExport_fla.MCScrollButtonDown_43] Frame 1 |
"over" | Symbol 191 MovieClip {MCMenuExport_fla.MCScrollButtonDown_43} [MCMenuExport_fla.MCScrollButtonDown_43] Frame 10 |
"down" | Symbol 191 MovieClip {MCMenuExport_fla.MCScrollButtonDown_43} [MCMenuExport_fla.MCScrollButtonDown_43] Frame 25 |
"out" | Symbol 231 MovieClip {MCMenuExport_fla.buttonGfxGreen_53} [MCMenuExport_fla.buttonGfxGreen_53] Frame 1 |
"over" | Symbol 231 MovieClip {MCMenuExport_fla.buttonGfxGreen_53} [MCMenuExport_fla.buttonGfxGreen_53] Frame 5 |
"down" | Symbol 231 MovieClip {MCMenuExport_fla.buttonGfxGreen_53} [MCMenuExport_fla.buttonGfxGreen_53] Frame 10 |
"out" | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] Frame 1 |
"over" | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] Frame 5 |
"down" | Symbol 232 MovieClip {MCMenuExport_fla.MCButtonGreen_52} [MCMenuExport_fla.MCButtonGreen_52] Frame 10 |
"out" | Symbol 243 MovieClip {MCMenuExport_fla.MCMenuButton_Play_54} [MCMenuExport_fla.MCMenuButton_Play_54] Frame 1 |
"over" | Symbol 243 MovieClip {MCMenuExport_fla.MCMenuButton_Play_54} [MCMenuExport_fla.MCMenuButton_Play_54] Frame 5 |
"down" | Symbol 243 MovieClip {MCMenuExport_fla.MCMenuButton_Play_54} [MCMenuExport_fla.MCMenuButton_Play_54] Frame 10 |
"none" | Symbol 261 MovieClip {MCTrophyCombo} [MCTrophyCombo] Frame 1 |
"bronze" | Symbol 261 MovieClip {MCTrophyCombo} [MCTrophyCombo] Frame 10 |
"silver" | Symbol 261 MovieClip {MCTrophyCombo} [MCTrophyCombo] Frame 20 |
"gold" | Symbol 261 MovieClip {MCTrophyCombo} [MCTrophyCombo] Frame 30 |
"none" | Symbol 264 MovieClip {MCTrophyClassic} [MCTrophyClassic] Frame 1 |
"bronze" | Symbol 264 MovieClip {MCTrophyClassic} [MCTrophyClassic] Frame 10 |
"silver" | Symbol 264 MovieClip {MCTrophyClassic} [MCTrophyClassic] Frame 20 |
"gold" | Symbol 264 MovieClip {MCTrophyClassic} [MCTrophyClassic] Frame 30 |
"none" | Symbol 267 MovieClip {MCTrophyHello} [MCTrophyHello] Frame 1 |
"bronze" | Symbol 267 MovieClip {MCTrophyHello} [MCTrophyHello] Frame 10 |
"silver" | Symbol 267 MovieClip {MCTrophyHello} [MCTrophyHello] Frame 20 |
"gold" | Symbol 267 MovieClip {MCTrophyHello} [MCTrophyHello] Frame 30 |
"none" | Symbol 270 MovieClip {MCTrophyFloors} [MCTrophyFloors] Frame 1 |
"bronze" | Symbol 270 MovieClip {MCTrophyFloors} [MCTrophyFloors] Frame 10 |
"silver" | Symbol 270 MovieClip {MCTrophyFloors} [MCTrophyFloors] Frame 20 |
"gold" | Symbol 270 MovieClip {MCTrophyFloors} [MCTrophyFloors] Frame 30 |
"up" | Symbol 337 MovieClip {MCFriendArrow} [MCFriendArrow] Frame 1 |
"down" | Symbol 337 MovieClip {MCFriendArrow} [MCFriendArrow] Frame 5 |
|